// jDiv - a jQuery plugin
// (c) Skyrocket Labs
// http://www.skyrocketlabs.com
// fred@skyrocketlabs.com
// Created: 10.24.2009
// Last updated: 02.06.2010

// DISPLAYS HIDDEN DIVS AS SUBMENUS ON HOVER

$(document).ready(function() {
        var hide = false;
        // Shows the DIV on hover with a fade in
		$("#menu1").hover(function(){          
		   if (hide) clearTimeout(hide);
            $("#hidden-cnt1").fadeIn();
            // The main nav menu item is assigned the 'active' CSS class
			$(this).addClass("active");
        }, function() {
            // Fades out the DIV and removes the 'active' class from the main nav menu item
			hide = setTimeout(function() {$("#hidden-cnt1").fadeOut("fast");});
			$("#menu1").removeClass("active");
        });
		// Ensures the DIV displays when your mouse moves away from the main nav menu item
        $("#hidden-cnt1").hover(function(){
            if (hide) clearTimeout(hide);
            $("#menu1").addClass("active");
        }, function() {
            // If your mouse moves out of the displayed hidden DIV, the DIv fades out and removes the 'active' class
			hide = setTimeout(function() {$("#hidden-cnt1").fadeOut("fast");});
			$("#menu1").removeClass("active");
        });
	});

$(document).ready(function() {
        var hide = false;
        // Shows the DIV on hover with a fade in
		$("#menu2").hover(function(){          
		   if (hide) clearTimeout(hide);
            $("#hidden-cnt2").fadeIn();
            // The main nav menu item is assigned the 'active' CSS class
			$(this).addClass("active");
        }, function() {
            // Fades out the DIV and removes the 'active' class from the main nav menu item
			hide = setTimeout(function() {$("#hidden-cnt2").fadeOut("fast");});
			$("#menu2").removeClass("active");
        });
		// Ensures the DIV displays when your mouse moves away from the main nav menu item
        $("#hidden-cnt2").hover(function(){
            if (hide) clearTimeout(hide);
            $("#menu2").addClass("active");
        }, function() {
            // If your mouse moves out of the displayed hidden DIV, the DIv fades out and removes the 'active' class
			hide = setTimeout(function() {$("#hidden-cnt2").fadeOut("fast");});
			$("#menu2").removeClass("active");
        });
	});

$(document).ready(function() {
        var hide = false;
        // Shows the DIV on hover with a fade in
		$("#menu3").hover(function(){          
		   if (hide) clearTimeout(hide);
            $("#hidden-cnt3").fadeIn();
            // The main nav menu item is assigned the 'active' CSS class
			$(this).addClass("active");
        }, function() {
            // Fades out the DIV and removes the 'active' class from the main nav menu item
			hide = setTimeout(function() {$("#hidden-cnt3").fadeOut("fast");});
			$("#menu3").removeClass("active");
        });
		// Ensures the DIV displays when your mouse moves away from the main nav menu item
        $("#hidden-cnt3").hover(function(){
            if (hide) clearTimeout(hide);
            $("#menu3").addClass("active");
        }, function() {
            // If your mouse moves out of the displayed hidden DIV, the DIv fades out and removes the 'active' class
			hide = setTimeout(function() {$("#hidden-cnt3").fadeOut("fast");});
			$("#menu3").removeClass("active");
        });
	});

$(document).ready(function() {
        var hide = false;
        // Shows the DIV on hover with a fade in
		$("#menu4").hover(function(){          
		   if (hide) clearTimeout(hide);
            $("#hidden-cnt4").fadeIn();
            // The main nav menu item is assigned the 'active' CSS class
			$(this).addClass("active");
        }, function() {
            // Fades out the DIV and removes the 'active' class from the main nav menu item
			hide = setTimeout(function() {$("#hidden-cnt4").fadeOut("fast");});
			$("#menu4").removeClass("active");
        });
		// Ensures the DIV displays when your mouse moves away from the main nav menu item
        $("#hidden-cnt4").hover(function(){
            if (hide) clearTimeout(hide);
            $("#menu4").addClass("active");
        }, function() {
            // If your mouse moves out of the displayed hidden DIV, the DIv fades out and removes the 'active' class
			hide = setTimeout(function() {$("#hidden-cnt4").fadeOut("fast");});
			$("#menu4").removeClass("active");
        });
	});

$(document).ready(function() {
        var hide = false;
        // Shows the DIV on hover with a fade in
		$("#menu5").hover(function(){          
		   if (hide) clearTimeout(hide);
            $("#hidden-cnt5").fadeIn();
            // The main nav menu item is assigned the 'active' CSS class
			$(this).addClass("active");
        }, function() {
            // Fades out the DIV and removes the 'active' class from the main nav menu item
			hide = setTimeout(function() {$("#hidden-cnt5").fadeOut("fast");});
			$("#menu5").removeClass("active");
        });
		// Ensures the DIV displays when your mouse moves away from the main nav menu item
        $("#hidden-cnt5").hover(function(){
            if (hide) clearTimeout(hide);
            $("#menu5").addClass("active");
        }, function() {
            // If your mouse moves out of the displayed hidden DIV, the DIv fades out and removes the 'active' class
			hide = setTimeout(function() {$("#hidden-cnt5").fadeOut("fast");});
			$("#menu5").removeClass("active");
        });
	});

$(document).ready(function() {
        var hide = false;
        // Shows the DIV on hover with a fade in
		$("#menu6").hover(function(){          
		   if (hide) clearTimeout(hide);
            $("#hidden-cnt6").fadeIn();
            // The main nav menu item is assigned the 'active' CSS class
			$(this).addClass("active");
        }, function() {
            // Fades out the DIV and removes the 'active' class from the main nav menu item
			hide = setTimeout(function() {$("#hidden-cnt6").fadeOut("fast");});
			$("#menu6").removeClass("active");
        });
		// Ensures the DIV displays when your mouse moves away from the main nav menu item
        $("#hidden-cnt6").hover(function(){
            if (hide) clearTimeout(hide);
            $("#menu6").addClass("active");
        }, function() {
            // If your mouse moves out of the displayed hidden DIV, the DIv fades out and removes the 'active' class
			hide = setTimeout(function() {$("#hidden-cnt6").fadeOut("fast");});
			$("#menu6").removeClass("active");
        });
	});

$(document).ready(function() {
        var hide = false;
        // Shows the DIV on hover with a fade in
		$("#menu7").hover(function(){          
		   if (hide) clearTimeout(hide);
            $("#hidden-cnt7").fadeIn();
            // The main nav menu item is assigned the 'active' CSS class
			$(this).addClass("active");
        }, function() {
            // Fades out the DIV and removes the 'active' class from the main nav menu item
			hide = setTimeout(function() {$("#hidden-cnt7").fadeOut("fast");});
			$("#menu7").removeClass("active");
        });
		// Ensures the DIV displays when your mouse moves away from the main nav menu item
        $("#hidden-cnt7").hover(function(){
            if (hide) clearTimeout(hide);
            $("#menu7").addClass("active");
        }, function() {
            // If your mouse moves out of the displayed hidden DIV, the DIv fades out and removes the 'active' class
			hide = setTimeout(function() {$("#hidden-cnt7").fadeOut("fast");});
			$("#menu7").removeClass("active");
        });
	});