// Menu Hover Script
var $j = jQuery.noConflict();
     
 // Use jQuery via $j(...)
 $j(document).ready(function(){
		var config = {    
			sensitivity: 1, // number = sensitivity threshold (must be 1 or higher)    
			interval: 1, // number = milliseconds for onMouseOver polling interval    
			over: function () {
				$j(">ul", this).css({"visibility":"visible"}).show();
				$j(">a", this).addClass("hover");
			}, // function = onMouseOver callback (REQUIRED)    
			timeout: 1, // number = milliseconds delay before onMouseOut    
			out: function () {
				$j(">ul", this).css({"display":"none"}).hide();
				$j(">a", this).removeClass("hover");
			} // function = onMouseOut callback (REQUIRED)    
		};	
		var config2 = {    
		 sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
		 interval: 50, // number = milliseconds for onMouseOver polling interval    
		 over: function () {
			 			$j(">ul", this).css({"z-index":"100"}).show();
						$j(this).css({"z-index":"100"});
						var li_Width = 0;
						$j(">ul li", this).each(
							function () {
								if (li_Width<$j(this).width())
								{
								li_Width = $j(this).width();
								}
							}
						);
						$j(">ul li", this).width(li_Width+5);
					}, // function = onMouseOver callback (REQUIRED)    
		 timeout: 200, // number = milliseconds delay before onMouseOut    
		 out: function () {$j(">ul", this).css({"z-index":"1"}).hide(); $j(this).css({"z-index":"1"});} // function = onMouseOut callback (REQUIRED)    
		};

		$j("#main-menu>li").hoverIntent(config);
		$j("#main-menu li li").hoverIntent(config2);
		$j("#main-menu li li").hover(
			function () {$j(">a", this).css({"background-color" : "#fdf4f1"});},
			function () {$j(">a", this).css({"background-color" : "#F5F7F8"});}
		);
		
 });

