

/********************************************************************************************************************/
/***************************************** * NAVIGATION * ***********************************************************/
/********************************************************************************************************************/
 
$(document).ready(function()
						   
{ 
   var navDelayItem = [];  
    $( "#mainNav > li" ).hover(  
         function () {  
             var id = $.data( this );  
             var $this = $( this );  
           navDelayItem[id] = setTimeout( function() {  
               $this.children( 'ul' ).fadeIn( 200 );  
                 navDelayItem[id] = "";  
             }, 300 );  
         },  
         function () {  
             var id = $.data( this );  
             if ( navDelayItem[id] != "" ) {  
               clearTimeout( navDelayItem[id] );  
             } else {  
                 $( this ).children( "ul" ).fadeOut( 200 );  
            }  
         }  
     );  		
   
});



/********************************************************************************************************************/
/***************************************** * entire div hightlights, homepage * ***********************************************************/
/********************************************************************************************************************/

$(document).ready(function(){
						   
	$(".pane-list li").click(function(){
    	window.location=$(this).find("a").attr("href");return false;
	});

}); //close doc ready


/********************************************************************************************************************/
/***************************************** * tabs on landing pages * ***************************************************/
/********************************************************************************************************************/

$(document).ready(function(){
			
	var maxDivs = 6;
	for (var x = 1; x <= maxDivs; x++)					   
	{
		var tab = "#tab_" + x;
		var div = "#content_" + x;
		if(x != 1)
		{
			$("#content_" + x).hide();
			
		}
		else
		{
			$("#tab_" + x).addClass("current");
		}
		clickTab(tab, div);
	}
	function clickTab(tab, div)
	{
		
		$(tab).click(function(){	
			for (var x = 1; x <= maxDivs; x++)					   
			{
				$("#content_" + x).hide();
				$("#tab_" + x).removeClass("current");
			}
			$(this).addClass("current");
			$(div).fadeIn(400);	
		});
	}
	clickTab("tab_1", "content_1");
	
});


