// JavaScript Document

// TOP NAVIGATION
$(function(){
	$('ul.nav li.link').bind('mouseover',function(){
		var $anchor = $(this);
		$($anchor).stop().animate(
			{marginTop:"0px"},900,'easeOutExpo'
		)
	});
	$('ul.nav li.link').bind('mouseout',function(){
		var $anchor = $(this);
		$($anchor).stop().animate(
			{marginTop:"-40px"},900,'easeInExpo'
		)
	});	
});

// SOCIAL AND BB NAVIGATION
$(function(){
	$('.social#fb').bind('mouseover',function(){
		var $anchor = $(this);
		$($anchor).stop().animate(
			{marginBottom:"40px"},500,'easeOutElastic'
		);
	});
	$('.social#tw').bind('mouseover',function(){
		var $anchor = $(this);
		$($anchor).stop().animate(
			{marginBottom:"40px"},500,'easeOutElastic'
		);
	});
	$('.social#bb').bind('mouseover',function(){
		var $anchor = $(this);
		$($anchor).stop().animate(
			{marginBottom:"40px"},500,'easeOutElastic'
		);
	});
	$('.social').bind('mouseout',function(){
		var $anchor = $(this);
		$($anchor).stop().animate(
			{marginBottom:"0px", width:"40px"},300,'easeOutExpo'
		);
	});
	
});

// PREVIOUS AND NEXT NAVIGATION
$(function(){
	$('div.navPrev').mouseover(function(){
		$('div.navPrevText').show();
	});
	$('div.navPrev').mouseout(function(){
		$('div.navPrevText').hide();
	});
		
});
$(function(){
	$('div.navNext').mouseover(function(){
		$('div.navNextText').show();
	});
	$('div.navNext').mouseout(function(){
		$('div.navNextText').hide();
	});
		
});
function MouseClick(noSct){
	document.getElementById("runNum").value=noSct;	

}
function MousePrev(noSct){	
	if(document.getElementById("runNum").value<=1){
		document.getElementById("prevPage").href="#section1";
		document.getElementById("runNum").value=1;
	}else{
		var PrevPage = --noSct;
		document.getElementById("prevPage").href="#section"+PrevPage;
	} 
	document.getElementById("runNum").value=noSct;	
}
function MouseNext(noSct){	
	if(document.getElementById("runNum").value>=4){
		document.getElementById("nextPage").href="#section4";
		document.getElementById("runNum").value=4;
	}else{
		var NextPage = ++noSct;
		document.getElementById("nextPage").href="#section"+NextPage;
	} 
	document.getElementById("runNum").value=noSct;	
}
