// 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-brazi").hover(function(){          
		   if (hide01) clearTimeout(hide01);
            $("#dropdown-brazi").show();
			$(this).addClass("active");
        }, function() {
			hide01 = setTimeout(function() {$("#dropdown-brazi").hide();});
			$("#nav-brazi").removeClass("active");
        });
        $("#dropdown-brazi").hover(function(){
            if (hide01) clearTimeout(hide01);
            $("#nav-brazi").addClass("active");
        }, function() {
			hide01 = setTimeout(function() {$("#dropdown-brazi").hide();});
			$("#dropdown-brazi").stop().show();
			$("#nav-brazi").removeClass("active");
        });

        var hide02 = false;
		$("#nav-decoratiuni").hover(function(){          
		   if (hide02) clearTimeout(hide02);
            $("#dropdown-decoratiuni").show();
			$(this).addClass("active");
        }, function() {
			hide02 = setTimeout(function() {$("#dropdown-decoratiuni").hide();});
			$("#nav-decoratiuni").removeClass("active");
        });
        $("#dropdown-decoratiuni").hover(function(){
            if (hide02) clearTimeout(hide02);
            $("#nav-decoratiuni").addClass("active");
        }, function() {
			hide02 = setTimeout(function() {$("#dropdown-decoratiuni").hide();});
			$("#dropdown-decoratiuni").stop().show();
			$("#nav-decoratiuni").removeClass("active");
        });
		
        var hide03 = false;
		$("#nav-cadouri").hover(function(){          
		   if (hide03) clearTimeout(hide03);
            $("#dropdown-cadouri").show();
			$(this).addClass("active");
        }, function() {
			hide03 = setTimeout(function() {$("#dropdown-cadouri").hide();});
			$("#nav-cadouri").removeClass("active");
        });
        $("#dropdown-cadouri").hover(function(){
            if (hide03) clearTimeout(hide03);
            $("#nav-cadouri").addClass("active");
        }, function() {
			hide03 = setTimeout(function() {$("#dropdown-cadouri").hide();});
			$("#dropdown-cadouri").stop().show();
			$("#nav-cadouri").removeClass("active");
        });		
		
		var hide04 = false;
		$("#nav-tendinte").hover(function(){          
		   if (hide04) clearTimeout(hide04);
            $("#dropdown-tendinte").show();
			$(this).addClass("active");
        }, function() {
			hide04 = setTimeout(function() {$("#dropdown-tendinte").hide();});
			$("#nav-tendinte").removeClass("active");
        });
        $("#dropdown-tendinte").hover(function(){
            if (hide04) clearTimeout(hide04);
            $("#nav-tendinte").addClass("active");
        }, function() {
			hide04 = setTimeout(function() {$("#dropdown-tendinte").hide();});
			$("#dropdown-tendinte").stop().show();
			$("#nav-tendinte").removeClass("active");
        });	
});
