
$(document).ready(function(){
	function showPrimary1() {
		$(".SecondaryWrapper", $(this)).animate({ marginTop: "-185px" }, { queue:false, duration:500 })
		.fadeIn("fast");
	};
	function hidePrimary1(e) {
        if (!e) var e = window.event;
		$(".SecondaryWrapper", $(this)).animate({ marginTop: "-165px" }, { queue:false, duration:500 }).fadeOut("slow");
        if (e.target && !IsEmpty(e.target) && e.target != "javascript:")
        {
            //window.location = e.target;
        }
	};

	function showPrimary3() {
		$(".SecondaryWrapper", $(this)).animate({ marginTop: "-245px" }, { queue:false, duration:500 })
		.fadeIn("fast");
	};
	function hidePrimary3() {
		$(".SecondaryWrapper", $(this)).animate({ marginTop: "-225px" }, { queue:false, duration:500 }).fadeOut("slow");
	};

	function showPrimary4() {
		$(".SecondaryWrapper", $(this)).animate({ marginTop: "-195px" }, { queue:false, duration:500 })
		.fadeIn("fast");
	};
	function hidePrimary4() {
		$(".SecondaryWrapper", $(this)).animate({ marginTop: "-175px" }, { queue:false, duration:500 }).fadeOut("slow");
	};
	
	
	function showSecondary1() {
		$(".ThirdWrapper", $(this)).animate({ left: "120px" }, { queue:false, duration:500 }).fadeIn("fast");
		$(this.firstChild).toggleClass("On");
	};
	function hideSecondary1() {
		$(".ThirdWrapper", $(this)).animate({ left: "100px" }, { queue:false, duration:500 }).fadeOut("fast");
		$(this.firstChild).toggleClass("On");
	};

	function showSecondary3() {
		$(".ThirdWrapper", $(this)).animate({ left: "150px" }, { queue:false, duration:500 }).fadeIn("fast");
		$(this.firstChild).toggleClass("On");
	};
	function hideSecondary3() {
		$(".ThirdWrapper", $(this)).animate({ left: "130px" }, { queue:false, duration:500 }).fadeOut("fast");
		$(this.firstChild).toggleClass("On");
		$(".ThirdWrapper").css({display:"none"});
	};
	
	function showThird3a() {
		$(".FourthWrapper", $(this)).animate({ left: "86px" }, { queue:false, duration:500 })
		.fadeIn("fast");
		$(this.firstChild).toggleClass("On");
	};
	function hideThird3a() {
		$(".FourthWrapper", $(this)).animate({ left: "66px" }, { queue:false, duration:500 })
		.fadeOut("fast");
		$(this.firstChild).toggleClass("On");
		$(".FourthWrapper").css({display:"none"});
	};

	function showThird3b() {
		$(".FourthWrapper", $(this)).animate({ left: "115px" }, { queue:false, duration:500 })
		.fadeIn("fast");
		$(this.firstChild).toggleClass("On");
	};
	function hideThird3b() {
		$(".FourthWrapper", $(this)).animate({ left: "95px" }, { queue:false, duration:500 })
		.fadeOut("fast");
		$(this.firstChild).toggleClass("On");
		$(".FourthWrapper").css({display:"none"});
	};

	function showThird3c() {
		$(".FourthWrapper", $(this)).animate({ left: "95px" }, { queue:false, duration:500 })
		.fadeIn("fast");
		$(this.firstChild).toggleClass("On");
	};
	function hideThird3c() {
		$(".FourthWrapper", $(this)).animate({ left: "75px" }, { queue:false, duration:500 })
		.fadeOut("fast");
		$(this.firstChild).toggleClass("On");
		$(".FourthWrapper").css({display:"none"});
	};
	
    $("li.Primary1").hoverIntent({
      sensitivity: 1,      // number = sensitivity threshold (must be 1 or higher)
      interval: 50,        // number = milliseconds for onMouseOver polling interval
      over: showPrimary1,  // function = onMouseOver callback (required)
      timeout: 300,        // number = milliseconds delay before onMouseOut
      out: hidePrimary1    // function = onMouseOut callback (required)
    });
	$("li.Primary3").hoverIntent({
	  sensitivity: 1,      // number = sensitivity threshold (must be 1 or higher)
	  interval: 50,        // number = milliseconds for onMouseOver polling interval
	  over: showPrimary3,  // function = onMouseOver callback (required)
	  timeout: 300,        // number = milliseconds delay before onMouseOut
	  out: hidePrimary3    // function = onMouseOut callback (required)
	});
	$("li.Primary4").hoverIntent({
	  sensitivity: 1,      // number = sensitivity threshold (must be 1 or higher)
	  interval: 50,        // number = milliseconds for onMouseOver polling interval
	  over: showPrimary4,  // function = onMouseOver callback (required)
	  timeout: 300,        // number = milliseconds delay before onMouseOut
	  out: hidePrimary4    // function = onMouseOut callback (required)
	});
    $("li.Secondary1").hoverIntent({
      sensitivity: 1,       // number = sensitivity threshold (must be 1 or higher)
      interval: 50,         // number = milliseconds for onMouseOver polling interval
      over: showSecondary1, // function = onMouseOver callback (required)
      timeout: 100,        // number = milliseconds delay before onMouseOut
      out: hideSecondary1   // function = onMouseOut callback (required)
    });
	$("li.Secondary3").hoverIntent({
	  sensitivity: 1,       // number = sensitivity threshold (must be 1 or higher)
	  interval: 50,         // number = milliseconds for onMouseOver polling interval
	  over: showSecondary3, // function = onMouseOver callback (required)
	  timeout: 100,         // number = milliseconds delay before onMouseOut
	  out: hideSecondary3   // function = onMouseOut callback (required)
	});
	$("li.Third3a").hoverIntent({
	  sensitivity: 1,       // number = sensitivity threshold (must be 1 or higher)
	  interval: 50,         // number = milliseconds for onMouseOver polling interval
	  over: showThird3a,    // function = onMouseOver callback (required)
	  timeout: 100,         // number = milliseconds delay before onMouseOut
	  out: hideThird3a      // function = onMouseOut callback (required)
	});
	$("li.Third3b").hoverIntent({
	  sensitivity: 1,       // number = sensitivity threshold (must be 1 or higher)
	  interval: 50,         // number = milliseconds for onMouseOver polling interval
	  over: showThird3b,    // function = onMouseOver callback (required)
	  timeout: 100,         // number = milliseconds delay before onMouseOut
	  out: hideThird3b      // function = onMouseOut callback (required)
	});
	$("li.Third3c").hoverIntent({
	  sensitivity: 1,       // number = sensitivity threshold (must be 1 or higher)
	  interval: 50,         // number = milliseconds for onMouseOver polling interval
	  over: showThird3c,    // function = onMouseOver callback (required)
	  timeout: 100,         // number = milliseconds delay before onMouseOut
	  out: hideThird3c      // function = onMouseOut callback (required)
	});
});
