// LINK POSITIONS FOR NAV WITH REGIONS BUTTON
//var mainLinkBgPos = new Array(0,-114,-212,-306,-390);

// LINK POSITIONS FOR NAV WITHOUT REGIONS BUTTON
var mainLinkBgPos = new Array(0,-114,-212,0,-306);
var showBlock1;
var showBlock2;
var showBlock3;
$(document).ready(function(){

//  MAIN NAV STARTS  =====================================================================
	$('.mainNavLink').mouseenter(function(){
		var currentLink = $(this).attr('rel');
		$('#mainNavLink'+currentLink).css({'cursor' : 'pointer'});
		$('#mainNavLink'+currentLink).stop().animate({backgroundPosition : (mainLinkBgPos[currentLink-1])+'px -26px'}, 250);
	});
	$('.mainNavLink').mouseleave(function(){
		var currentLink = $(this).attr('rel');
		$('#mainNavLink'+currentLink).css({'cursor' : 'pointer'});
		$('#mainNavLink'+currentLink).stop().animate({backgroundPosition : (mainLinkBgPos[currentLink-1])+'px 0px'}, 450);
	});
//  MAIN NAV ENDS  =======================================================================	
//  HOME FEATURES START  =================================================================
	featureBlock1();
	function featureBlock1(){
		var showNumber=(Math.floor(Math.random()*12))+1;
		showBlock1 = showNumber;
		featureBlock2();
	};
	function featureBlock2(){
		var showNumber=(Math.floor(Math.random()*12))+1;
		if(showNumber != showBlock1){
			showBlock2 = showNumber;
			featureBlock3();
		}else {
			featureBlock2();	
		};
	};
	function featureBlock3(){
		var showNumber=(Math.floor(Math.random()*12))+1;
		if((showNumber != showBlock1) && (showNumber != showBlock2)){
			showBlock3 = showNumber;
			featureDisplay();
		} else {
			featureBlock3();	
		};
	};
	function featureDisplay(){
		$("#home-feature-"+showBlock1).show();
		$("#home-feature-"+showBlock2).show();
		$("#home-feature-"+showBlock3).show();
	};
	$('#bodyHome input').click(function(){
		if(this.name == this.value){
			$(this).attr('value', '');			
		}
	});
							   
							   
//  HOME FEATURES ENDS  ==================================================================
});
