// 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
		$("#nav02").hover(function(){
		    $("#hidden-div").css( 'display', 'block' );
        	$("#nav02 img").attr( "src", "http://3ust.com/wp-content/themes/3ust/img/nav02_on.jpg" );
        }, function() {
            // Fades out the DIV and removes the 'active' class from the main nav menu item
			$("#hidden-div").css( 'display', 'none' );
			$("#nav02").removeClass("active");
        });
		// Ensures the DIV displays when your mouse moves away from the main nav menu item
        $("#hidden-div").hover(function(){
            $("#hidden-div").css( 'display', 'block' );
        	$("#nav02 img").attr( "src", "http://3ust.com/wp-content/themes/3ust/img/nav02_on.jpg" );
        }, function() {
            // If your mouse moves out of the displayed hidden DIV, the DIv fades out and removes the 'active' class
			$("#hidden-div").css( 'display', 'none' );
			$("#nav02").removeClass("active");
        	$("#nav02 img").attr( "src", "http://3ust.com/wp-content/themes/3ust/img/nav02.jpg" );
        });
	});
