

var $j = jQuery.noConflict();

/*
 * function showSubNav
 *
 *
 */
 
 
	var DDtimeout	= 700;
	var DDclosetimer	= 0;
	var lastDropDownShown = 0;
	var triggeredOnce = false;
	function showDropDown( theMain ) {
		mcancelclosetime();
		if ( triggeredOnce == false && lastDropDownShown != theMain){
			
			 triggeredOnce = true;
			  hideDropDown(lastDropDownShown) 
			  //$j("#"+theMain+".subnav").css('display','none');
			  $j("#"+theMain+".subnav").show(300, function(){  triggeredOnce = false; });
			  lastDropDownShown = theMain;
		}
	}
	function hideDropDown(  ) {
			var tempLastDD = lastDropDownShown;
		  $j("#"+lastDropDownShown+".subnav").hide(300, function(){ clearLastDropDown(tempLastDD); });
		  
	}
	
	function clearLastDropDown(tempLastDD){
		if (lastDropDownShown == tempLastDD){ lastDropDownShown = 0; }
	}
	// go close timer
	function mclosetime()	{		DDclosetimer = window.setTimeout(hideDropDown, DDtimeout);	}
	
	// cancel close timer
	function mcancelclosetime()	{
		if(DDclosetimer)
		{
			window.clearTimeout(DDclosetimer);
			DDclosetimer = null;
		}
	}

	document.onClick = lastDropDownShown; 
	$j(document).ready(function(){
		$j('.subnav').hover(function(){ mcancelclosetime() },function(){mclosetime()});
		$j('.hasSubNav').hover(function(){mcancelclosetime()},function(){});
	})