/* requires <script language="javascript" type="text/javascript" src="/virtualDir/js/jquery.js"></script> */

$(document).ready(function(){
	// Start the home page slideshow cycler
	//$('#cycler').cycle();		
	
	// Load the ads if they exist
	if(ads && ads.length != 0 && (typeof loadpage == 'function')) {
		loadpage();		
	}
	
	var config = {
    	over: function(){ setSubNav( this, 'show' ); }, // function = onMouseOver callback (REQUIRED)    
    	timeout: 300, // number = milliseconds delay before onMouseOut    
    	out: function(){ setSubNav( this, 'hide' ); }   // function = onMouseOut callback (REQUIRED)    
	};
	$("#menu0").find( "li" ).hoverIntent( config );
});

//*** This is for the ads info request window  ***//
function open_advertising_request(ChamberName, BGColor, FontColor)	
{					
	strChamberName = ChamberName
	strBGColor = BGColor
	strFontColor = FontColor
	window.open("http://portal.lawtonprinting.com/advertisingInfoRequest/advertisingInfoRequest.asp?chamberName=" + strChamberName + "&BGcolor=" + strBGColor + "&fontColor=" + strFontColor  , "_blank", "scrollbars=no, resizable=no, width=450, height=450")
}



/**
* hoverIntent r6 // 2011.02.26 // jQuery 1.5.1+
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
*/
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type=="mouseenter"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.bind('mouseenter',handleHover).bind('mouseleave',handleHover)}})(jQuery);
