// 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 hide01 = false;
		$("#nav-products").hover(function(){          
		   if (hide01) clearTimeout(hide01);
            $("#dropdown-products").show();
			$(this).addClass("active");
        }, function() {
			hide01 = setTimeout(function() {$("#dropdown-products").hide();});
			$("#nav-products").removeClass("active");
        });
        $("#dropdown-products").hover(function(){
            if (hide01) clearTimeout(hide01);
            $("#nav-products").addClass("active");
        }, function() {
			hide01 = setTimeout(function() {$("#dropdown-products").hide();});
			$("#dropdown-products").stop().show();
			$("#nav-products").removeClass("active");
        });

        var hide02 = false;
		$("#nav-use").hover(function(){          
		   if (hide02) clearTimeout(hide02);
            $("#dropdown-use").show();
			$(this).addClass("active");
        }, function() {
			hide02 = setTimeout(function() {$("#dropdown-use").hide();});
			$("#nav-use").removeClass("active");
        });
        $("#dropdown-use").hover(function(){
            if (hide02) clearTimeout(hide02);
            $("#nav-use").addClass("active");
        }, function() {
			hide02 = setTimeout(function() {$("#dropdown-use").hide();});
			$("#dropdown-use").stop().show();
			$("#nav-use").removeClass("active");
        });
		
        var hide03 = false;
		$("#nav-customerCare").hover(function(){          
		   if (hide03) clearTimeout(hide03);
            $("#dropdown-customerCare").show();
			$(this).addClass("active");
        }, function() {
			hide03 = setTimeout(function() {$("#dropdown-customerCare").hide();});
			$("#nav-customerCare").removeClass("active");
        });
        $("#dropdown-customerCare").hover(function(){
            if (hide03) clearTimeout(hide03);
            $("#nav-customerCare").addClass("active");
        }, function() {
			hide03 = setTimeout(function() {$("#dropdown-customerCare").hide();});
			$("#dropdown-customerCare").stop().show();
			$("#nav-customerCare").removeClass("active");
        });
		
        var hide04 = false;
		$("#nav-store").hover(function(){          
		   if (hide04) clearTimeout(hide04);
            $("#dropdown-store").show();
			$(this).addClass("active");
        }, function() {
			hide04 = setTimeout(function() {$("#dropdown-store").hide();});
			$("#nav-store").removeClass("active");
        });
        $("#dropdown-store").hover(function(){
            if (hide04) clearTimeout(hide04);
            $("#nav-store").addClass("active");
        }, function() {
			hide04 = setTimeout(function() {$("#dropdown-store").hide();});
			$("#dropdown-store").stop().show();
			$("#nav-store").removeClass("active");
        });
		
        var hide05 = false;
		$("#nav-community").hover(function(){          
		   if (hide05) clearTimeout(hide05);
            $("#dropdown-community").show();
			$(this).addClass("active");
        }, function() {
			hide05 = setTimeout(function() {$("#dropdown-community").hide();});
			$("#nav-community").removeClass("active");
        });
        $("#dropdown-community").hover(function(){
            if (hide05) clearTimeout(hide05);
            $("#nav-community").addClass("active");
        }, function() {
			hide05 = setTimeout(function() {$("#dropdown-community").hide();});
			$("#dropdown-community").stop().show();
			$("#nav-community").removeClass("active");
        });
		
        var hide06 = false;
		$("#nav-company").hover(function(){          
		   if (hide06) clearTimeout(hide06);
            $("#dropdown-company").show();
			$(this).addClass("active");
        }, function() {
			hide06 = setTimeout(function() {$("#dropdown-company").hide();});
			$("#nav-company").removeClass("active");
        });
        $("#dropdown-company").hover(function(){
            if (hide06) clearTimeout(hide06);
            $("#nav-company").addClass("active");
        }, function() {
			hide06 = setTimeout(function() {$("#dropdown-company").hide();});
			$("#dropdown-company").stop().show();
			$("#nav-company").removeClass("active");
        });
		
        var hide07 = false;
		$("#nav-global").hover(function(){          
		   if (hide07) clearTimeout(hide07);
            $("#dropdown-global").show();
			$(this).addClass("active");
        }, function() {
			hide07 = setTimeout(function() {$("#dropdown-global").hide();});
			$("#nav-global").removeClass("active");
        });
        $("#dropdown-global").hover(function(){
            if (hide07) clearTimeout(hide07);
            $("#nav-global").addClass("active");
        }, function() {
			hide07 = setTimeout(function() {$("#dropdown-global").hide();});
			$("#dropdown-global").stop().show();
			$("#nav-global").removeClass("active");
        });
		
		
});
