$(document).ready(function(){	
        $('#signup').hover(
            function(){ // Change the input image's source when we "roll on"
                $(this).attr({ src : '/wp-content/themes/wineworks/images/signup_over.png'});
            },
            function(){ // Change the input image's source back to the default on "roll off"
                $(this).attr({ src : '/wp-content/themes/wineworks/images/signup.png'});             }
        );
        $('#comment').hover(
            function(){ // Change the input image's source when we "roll on"
                $(this).attr({ src : '/wp-content/themes/wineworks/images/sendCommentsOver.png'});
            },
            function(){ // Change the input image's source back to the default on "roll off"
                $(this).attr({ src : '/wp-content/themes/wineworks/images/sendComments.png'});             }
        );
        
     
	$('#menuDownload').hover(
		function(){
			$(this).attr({src: '/wp-content/themes/wineworks/images/downloadRollover.png'});
		},
		function(){
			$(this).attr({src: '/wp-content/themes/wineworks/images/download.png'});
		});
		
		$('#twitter').hover(
		function(){
			$(this).attr({src: '/wp-content/themes/wineworks/images/twitterRollover.png'});
		},
		function(){
			$(this).attr({src: '/wp-content/themes/wineworks/images/twitter.png'});
		});

	//$('#mc_embed_signup').dialog();  
        /*
        	control the hide and show of the wine spot to indicate
        	navigation of the first order
        */
	/*$('#firstLevelNav').hover(
		function() {
			// on hover
		},
		function() {
			// leaving the table
			$('.indicator').fadeOut();
			$('.activeIndicator').fadeIn("fast");		
		});
*/
/*
       $('.mainNav').hover(
        	function(){
			$('.indicator').fadeOut('fast');
        		// hide the active indicator
        		// show the one the user just hovered over
        		var x = '#'+$(this).attr('id')+'Indicator';
        		$(x).fadeIn("fast");
        		
        	},
        	function(){
        		// the user has moved on so hide the indicator
        		var x = '#'+$(this).attr('id')+'Indicator';
        		$(x).fadeOut("fast");
        		//$('.activeIndicator').show("slow");
        	}	
        	);
*/ 
    		
	$('#mc_embed_signup_frame').dialog({autoOpen:false,zIndex:3999, modal: true });

     	   	
                $('#contactFormTitle').corner();
                $('#contactFormFrame').corner();
                $('#mc_embed_signup').corner("round 8xp").parent().css('padding','4px').corner("round 10px");

		//$('#s6').after('<div id="lNav"></div>')
		$('#s6').cycle({
			fx: 'scrollLeft', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
			pager: '#lNav',
			pause: 1,
			next: '#s6',
			timeout:8000,
			 next:          null,  // selector for element to use as click trigger for next slide 
    prev:          null  // selector for element to use as click trigger for previous slide 
      // selector for element to use as click trigger for previous slide 
	});
	});


function Signup ()
{
	$('#mc_embed_signup_frame').dialog('open').show();
}


function HideSignup ()
{
        $('#mc-embedded-subscribe-form').submit();
	$('#mc_embed_signup_frame').dialog('close');
}

function SendNote () {
        $('#cformContact').show();
}

function HideNote () {
//	$('#cformContact').hide();
}
