


function blendIn(){
       var d = document.getElementById('blend');
       d.style.display="inline";
}
function blendOut(){
       var d = document.getElementById('blend');
       d.style.display="none";
}
       
       
function scrolling() {
	// Smoother scrolling on #local links
	jQuery(function( $ ){
	   $.localScroll({
			axis:'xy',
			//queue:true,
			duration: 1600,
			easing:'easeInOutExpo',
			hash:true		
		});
	});
}



function showLogRes() { 
	// Display the log_res div, for alerts and results
	$('#log_res').addClass("ajax_loading").animate({ 
		opacity: 1
		}, 1000 )
		.css("display", "block");
}

function showResponse(responseText, statusText)  { 
	$('#log_res').removeClass("ajax_loading"); 
}


$(document).ready(function() { 


	//fadeIn
	var m = $('#main');
	m.hide();
	m.fadeIn(7000);

	


	// Go to #home at loading //
	document.location.hash = '#home';
	
	
	//$('#subMenu li a').removeClass("subMenuActive");
	//$('#subMenu li a').click().addClass("subMenuActive");
	
		
	// Record history for using with browser's back/forward arrows //
	$.ajaxHistory.initialize();
		
	// Add smooth movement on anchors links //
	scrolling();
	

	

	
	// Add tooltips on #releases_grid rollover //
	$(function() {
		$('#releases_grid *').tooltip();
	});

	// Validate and send the #contact form //
	var options = { 
		target:        '#log_res',  
		beforeSubmit:  showLogRes,  
		success:       showResponse
	}; 
	$('#emailForm').ajaxForm(options);
	
	
});




