/* Author: 

*/

// FadeIn Content
$(document).ready(function(){
		$('#content').fadeIn(750);
});

$(document).ready(function(){
		$('#footer').fadeIn(3000);
});


// 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").stop(false, true).slideDown();
            // The main nav menu item is assigned the 'active' CSS class
			$(this).addClass("current");
        }, function() {
            // Fades out the DIV and removes the 'active' class from the main nav menu item
			hide = setTimeout(function() {$("#hidden-div").stop(false, true).slideUp("fast");});
			$("#menu1").removeClass("current");
        });
		// Ensures the DIV displays when your mouse moves away from the main nav menu item
        $("#hidden-div").hover(function(){
            if (hide) clearTimeout(hide);
            $("#menu1").addClass("current");
        }, 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").slideUp("fast");});
			$("#hidden-div").stop(false, true).fadeIn();
			$("#menu1").removeClass("current");
        });
	});
	
	
// TBWines Panel
$(document).ready(function() {
	
	// Expand Panel
	$("#open").click(function(){
		$("div#panel").slideDown("fast");
	});	
	
	// Collapse Panel
	$("#close").click(function(){
		$("div#panel").slideUp("fast");	
	});		
	
	// Toggle TBW Graphic
	$("#toggle a").click(function () {
		$("#toggle a").toggle();
	});		
		
});












