// 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-div").fadeIn();			
		}, function() {
			$("#Image39").attr({ src:"images/whatismaxtend_hov.png"}
			);
            // Fades out the DIV and removes the 'active' class from the main nav menu item
        hide = setTimeout(function() { $("#hidden-div").fadeOut("fast"); }); $("#Image39").attr({ src:"images/whatismaxtend.png"});
        }); 
		// Ensures the DIV displays when your mouse moves away from the main nav menu item
        $("#hidden-div").hover(function(){
            if (hide) clearTimeout(hide); $("#Image39").attr({ src:"images/whatismaxtend_hov.png"})
        }, function() {
			// If your mouse moves out of the displayed hidden DIV, the DIv fades out and removes the 'active' class
        hide = setTimeout(function() { $("#hidden-div").fadeOut("fast"); });
			$("#hidden-div").fadeIn();
			$("#Image39").attr({ src:"images/whatismaxtend.png"});
        
		});
	});
	
$(document).ready(function() {
        var hide = false;
        // Shows the DIV on hover with a fade in
		$("#menu2").hover(function(){          
		   if (hide) clearTimeout(hide);
            $("#hidden-div2").fadeIn();			
		}, function() {
			$("#Image38").attr({ src:"images/maxsystems_hov.png"}
			);
            // Fades out the DIV and removes the 'active' class from the main nav menu item
        hide = setTimeout(function() { $("#hidden-div2").fadeOut("fast"); }); $("#Image38").attr({ src:"images/maxsystems.png"});
        }); 
		// Ensures the DIV displays when your mouse moves away from the main nav menu item
        $("#hidden-div2").hover(function(){
            if (hide) clearTimeout(hide); $("#Image38").attr({ src:"images/maxsystems_hov.png"})
        }, function() {
			// If your mouse moves out of the displayed hidden DIV, the DIv fades out and removes the 'active' class
        hide = setTimeout(function() { $("#hidden-div2").fadeOut("fast"); });
			$("#hidden-div2").fadeIn();
			$("#Image38").attr({ src:"images/maxsystems.png"});
        
		});
	});

$(document).ready(function() {
        var hide = false;
        // Shows the DIV on hover with a fade in
		$("#menu3").hover(function(){          
		   if (hide) clearTimeout(hide);
            $("#hidden-div3").fadeIn();			
		}, function() {
			$("#Image40").attr({ src:"images/techspecs_hov.png"}
			);
            // Fades out the DIV and removes the 'active' class from the main nav menu item
        hide = setTimeout(function() { $("#hidden-div3").fadeOut("fast"); }); $("#Image40").attr({ src:"images/techspecs.png"});
        }); 
		// Ensures the DIV displays when your mouse moves away from the main nav menu item
        $("#hidden-div3").hover(function(){
            if (hide) clearTimeout(hide); $("#Image40").attr({ src:"images/techspecs_hov.png"})
        }, function() {
			// If your mouse moves out of the displayed hidden DIV, the DIv fades out and removes the 'active' class
        hide = setTimeout(function() { $("#hidden-div3").fadeOut("fast"); });
			$("#hidden-div3").fadeIn();
			$("#Image40").attr({ src:"images/techspecs.png"});
        
		});
	});
	
$(document).ready(function() {
        var hide = false;
        // Shows the DIV on hover with a fade in
		$("#menu4").hover(function(){          
		   if (hide) clearTimeout(hide);
            $("#hidden-div4").fadeIn();			
		}, function() {
			$("#Image41").attr({ src:"images/experience_hov.png"}
			);
            // Fades out the DIV and removes the 'active' class from the main nav menu item
        hide = setTimeout(function() { $("#hidden-div4").fadeOut("fast"); }); $("#Image41").attr({ src:"images/experience.png"});
        }); 
		// Ensures the DIV displays when your mouse moves away from the main nav menu item
        $("#hidden-div4").hover(function(){
            if (hide) clearTimeout(hide); $("#Image41").attr({ src:"images/experience_hov.png"})
        }, function() {
			// If your mouse moves out of the displayed hidden DIV, the DIv fades out and removes the 'active' class
        hide = setTimeout(function() { $("#hidden-div4").fadeOut("fast"); });
			$("#hidden-div4").fadeIn();
			$("#Image41").attr({ src:"images/experience.png"});
        
		});
	});
	
$(document).ready(function() {
        var hide = false;
        // Shows the DIV on hover with a fade in
		$("#menu5").hover(function(){          
		   if (hide) clearTimeout(hide);
            $("#hidden-div5").fadeIn();			
		}, function() {
			$("#Image42").attr({ src:"images/network_hov.png"}
			);
            // Fades out the DIV and removes the 'active' class from the main nav menu item
        hide = setTimeout(function() { $("#hidden-div5").fadeOut("fast"); }); $("#Image42").attr({ src:"images/network.png"});
        }); 
		// Ensures the DIV displays when your mouse moves away from the main nav menu item
        $("#hidden-div5").hover(function(){
            if (hide) clearTimeout(hide); $("#Image42").attr({ src:"images/network_hov.png"})
        }, function() {
			// If your mouse moves out of the displayed hidden DIV, the DIv fades out and removes the 'active' class
        hide = setTimeout(function() { $("#hidden-div5").fadeOut("fast"); });
			$("#hidden-div5").fadeIn();
			$("#Image42").attr({ src:"images/network.png"});
        
		});
	});
	
$(document).ready(function() {
        var hide = false;
        // Shows the DIV on hover with a fade in
		$("#menu6").hover(function(){          
		   if (hide) clearTimeout(hide);
            $("#hidden-div6").fadeIn();			
		}, function() {
			$("#Image43").attr({ src:"images/contact_hov.png"}
			);
            // Fades out the DIV and removes the 'active' class from the main nav menu item
        hide = setTimeout(function() { $("#hidden-div6").fadeOut("fast"); }); $("#Image43").attr({ src:"images/contact.png"});
        }); 
		// Ensures the DIV displays when your mouse moves away from the main nav menu item
        $("#hidden-div6").hover(function(){
            if (hide) clearTimeout(hide); $("#Image43").attr({ src:"images/contact_hov.png"})
        }, function() {
			// If your mouse moves out of the displayed hidden DIV, the DIv fades out and removes the 'active' class
        hide = setTimeout(function() { $("#hidden-div6").fadeOut("fast"); });
			$("#hidden-div6").fadeIn();
			$("#Image43").attr({ src:"images/contact.png"});
        
		});
	});
