// SPECIAL EFFECTS
// 
// use class .fadeIn to apply a slow fade-in to ANY element.
// 

jQuery(document).ready(function (){
	//jQuery(".fadeIn").hide().fadeIn(400);
	jQuery(".fadeIn").hover(
	  function () {
	  	jQuery(this).hide().fadeIn(800);
	  }, 
	  function () {
		
	  }
	);
});


$(document).ready(function(){
	$("#menulist img").hover(
	  function () {
		$(this).animate({marginTop: 15},100);
	  }, 
	  function () {
		$(this).animate({marginTop: 0},100);
	  }
	);
});


// 
// use #btn_ + a number from 1 to 4 to create a fadeIn menu.
// 

jQuery(document).ready(function(){
	
	jQuery("#btn_1").hover(
	  function () {
	  	jQuery("#imgextra").show();
		jQuery("#imgextra_1").fadeIn("fast");
	  }, 
	  function () {
		jQuery(".imgextra").hide();
	  }
	);

	jQuery("#btn_2").hover(
	  function () {
	  	jQuery("#imgextra").show();
		jQuery("#imgextra_2").fadeIn("fast");
	  }, 
	  function () {
		jQuery(".imgextra").hide();
	  }
	);
	
	jQuery("#btn_3").hover(
	  function () {
	  	jQuery("#imgextra").show();
		jQuery("#imgextra_3").fadeIn("fast");
	  }, 
	  function () {
		jQuery(".imgextra").hide();
	  }
	);
	
	jQuery("#btn_4").hover(
	  function () {
	  	jQuery("#imgextra").show();
		jQuery("#imgextra_4").fadeIn("fast");
	  }, 
	  function () {
		jQuery(".imgextra").hide();
	  }
	);
	
});



jQuery(document).ready(function(){
   
    
	jQuery("#docOut").hover(
	  function () {
		if (jQuery.browser.msie) {
			jQuery('#docuimgextra').animate({top:'-=200px'},{duration:100});	
		}
		else {
	  		jQuery('#docuimgextra').animate({top:'-=200px'},{duration:100});
		}
	  }, 
	  function () {
		
	  }
	);
	
	jQuery("#btn_1,#btn_2,#btn_3").hover(
	  function () {
	  	if (jQuery.browser.msie) {
			jQuery('#docuimgextra').animate({top:'+=200px'},{duration:100});	
		}
		else {
	  		jQuery('#docuimgextra').animate({top:'+=200px'},{duration:100});
		}
	  }, 
	  function () {
		
	  }
	);

});







// 
// Animated Bottles of Wine
// 

jQuery(document).ready(function(){
	
	var src_1 = "../img/vinosimg/select_1.png";
	var src_2 = "../img/vinosimg/select_2.png";
	var src_3 = "../img/vinosimg/select_3.png";
	var src_4 = "../img/vinosimg/select_4.png";
	var src_5 = "../img/vinosimg/select_5.png";
	var src_6 = "../img/vinosimg/select_6.png";
	var desc_1 = "&quot;Aromas.&quot;";
	var desc_2 = "&quot;Aromas que recuerdan.&quot;";
	var desc_3 = "&quot;Aromas que recuerdan un bosque.&quot;";
	var desc_4 = "&quot;Aromas que recuerdan un bosque nativo.&quot;";
	var desc_5 = "&quot;Aromas que recuerdan un bosque nativo con peumos.&quot;";
	var desc_6 = "&quot;Aromas que recuerdan un bosque nativo con peumos y boldos.&quot;";
   
    
	jQuery("#btl_1").hover(
	  function () {
	  	jQuery('#selector').animate({marginLeft:'67px'},{queue:false,duration:100});
		jQuery('#description h3').html(desc_1);
		jQuery('#selector').find('img').attr({src: src_1});
	  }, 
	  function () {
		
	  }
	);
	
	jQuery("#btl_2").hover(
	  function () {
	  	jQuery('#selector').animate({marginLeft:'216px'},{queue:false,duration:100});
		jQuery('#description h3').html(desc_2);
		jQuery('#selector').find('img').attr({src: src_2});
	  }, 
	  function () {
	  	
	  }
	);
	
	jQuery("#btl_3").hover(
	  function () {
	  	jQuery('#selector').animate({marginLeft:'367px'},{queue:false,duration:100});
		jQuery('#description h3').html(desc_3);
		jQuery('#selector').find('img').attr({src: src_3});
	  }, 
	  function () {
	  	
	  }
	);
	
	jQuery("#btl_4").hover(
	  function () {
	  	jQuery('#selector').animate({marginLeft:'514px'},{queue:false,duration:100});
		jQuery('#description h3').html(desc_4);
		jQuery('#selector').find('img').attr({ src: src_4});
	  }, 
	  function () {
	  	
	  }
	);
	
	jQuery("#btl_5").hover(
	  function () {
	  	jQuery('#selector').animate({marginLeft:'661px'},{queue:false,duration:100});
		jQuery('#description h3').html(desc_5);
		jQuery('#selector').find('img').attr({src: src_5});
	  }, 
	  function () {
	  	
	  }
	);
	
	jQuery("#btl_6").hover(
	  function () {
		jQuery('#selector').animate({marginLeft:'809px'},{queue:false,duration:100});
		jQuery('#description h3').html(desc_6);
		jQuery('#selector').find('img').attr({src: src_6});
	  }, 
	  function () {
	  	
	  }
	);
	
	
	jQuery("#btl_1").click(
	  function () {
	  	 runIt_1();
	  }
	);
	
	jQuery("#btl_2").click(
	  function () {
	  	 runIt_2();
	  }
	);
		
	jQuery("#btl_3").click(
	  function () {
	  	 runIt_3();
	  }
	);

	jQuery("#btl_4").click(
	  function () {
	  	 runIt_4();
	  }
	);

	jQuery("#btl_5").click(
	  function () {
	  	 runIt_5();
	  }
	);

	jQuery("#btl_6").click(
	  function () {
	  	 runIt_6();
	  }
	);

	function runIt_1() {
		//jQuery('#btl_2').animate({top:'+=350'},1000);;
		//jQuery('#btl_3').animate({left:'+=368'},1000);
		//jQuery('#btl_4').animate({left:'+=368'},1000);
		//jQuery('#btl_5').animate({left:'+=368'},1000);
		//jQuery('#btl_6').animate({left:'+=368'},1000);
		
		jQuery('#btl_2').animate({opacity:0},500);
		jQuery('#btl_3').animate({opacity:0},500);
		jQuery('#btl_4').animate({opacity:0},500);
		jQuery('#btl_5').animate({opacity:0},500);
		jQuery('#btl_6').animate({opacity:0},500);
		//jQuery('#selector').animate({marginLeft:'+=357'},500);
		jQuery('#btl_1').animate({left:'+=368'},1000,loadIt_1);
		jQuery('#selector').animate({opacity:0},500);
    }
	
	function loadIt_1() {
		//jQuery("#menubox").load("vinos_elrincon.html #menubox");
		window.location.replace("vinos_elrincon.html");
    }

	function runIt_2() {
		jQuery('#btl_1').animate({opacity:0},500);
		jQuery('#btl_3').animate({opacity:0},500);
		jQuery('#btl_4').animate({opacity:0},500);
		jQuery('#btl_5').animate({opacity:0},500);
		jQuery('#btl_6').animate({opacity:0},500);
		//jQuery('#selector').animate({marginLeft:'+=357'},500);
		jQuery('#btl_2').animate({left:'+=218'},1000,loadIt_2);
		jQuery('#selector').animate({opacity:0},500);
    }
	
	function loadIt_2() {
		//jQuery("#menubox").load("vinos_elrincon.html #menubox");
		window.location.replace("vinos_svmmavarietalis.html");
    }
	
	function runIt_3() {
		jQuery('#btl_2').animate({opacity:0},500);
		jQuery('#btl_1').animate({opacity:0},500);
		jQuery('#btl_4').animate({opacity:0},500);
		jQuery('#btl_5').animate({opacity:0},500);
		jQuery('#btl_6').animate({opacity:0},500);
		//jQuery('#selector').animate({marginLeft:'+=357'},500);
		jQuery('#btl_3').animate({left:'+=68'},1000,loadIt_3);
		jQuery('#selector').animate({opacity:0},500);
    }
	
	function loadIt_3() {
		//jQuery("#menubox").load("vinos_elrincon.html #menubox");
		window.location.replace("vinos_syrah.html");
    }
	

	
	function runIt_4() {
		jQuery('#btl_2').animate({opacity:0},500);
		jQuery('#btl_3').animate({opacity:0},500);
		jQuery('#btl_1').animate({opacity:0},500);
		jQuery('#btl_5').animate({opacity:0},500);
		jQuery('#btl_6').animate({opacity:0},500);
		//jQuery('#selector').animate({marginLeft:'+=357'},500);
		jQuery('#btl_4').animate({left:'-=77'},1000,loadIt_4);
		jQuery('#selector').animate({opacity:0},500);
    }
   
   	function loadIt_4() {
		//jQuery("#menubox").load("vinos_elrincon.html #menubox");
		window.location.replace("vinos_petitverdot.html");
    }
	
			function runIt_5() {
		jQuery('#btl_2').animate({opacity:0},500);
		jQuery('#btl_3').animate({opacity:0},500);
		jQuery('#btl_4').animate({opacity:0},500);
		jQuery('#btl_1').animate({opacity:0},500);
		jQuery('#btl_6').animate({opacity:0},500);
		//jQuery('#selector').animate({marginLeft:'+=357'},500);
		jQuery('#btl_5').animate({left:'-=225'},1000,loadIt_5);
		jQuery('#selector').animate({opacity:0},500);
    }
	
	function loadIt_5() {
		//jQuery("#menubox").load("vinos_elrincon.html #menubox");
		window.location.replace("vinos_cabernetsauvignon.html");
    }
	
		function runIt_6() {
		jQuery('#btl_2').animate({opacity:0},500);
		jQuery('#btl_3').animate({opacity:0},500);
		jQuery('#btl_4').animate({opacity:0},500);
		jQuery('#btl_5').animate({opacity:0},500);
		jQuery('#btl_1').animate({opacity:0},500);
		//jQuery('#selector').animate({marginLeft:'+=357'},500);
		jQuery('#btl_6').animate({left:'-=370'},1000,loadIt_6);
		jQuery('#selector').animate({opacity:0},500);
    }
	
	function loadIt_6() {
		//jQuery("#menubox").load("vinos_elrincon.html #menubox");
		window.location.replace("vinos_emeritvs.html");
    }
	
  });




// 
// Change Background Opacity to Increase Legibility
// 

jQuery(document).ready(function(){
	
	jQuery("#alpha_50").click(
	  function () {
	  	 jQuery('#label').css({ opacity:0.5 });
	  }
	);
	
	jQuery("#alpha_100").click(
	  function () {
	  	 jQuery('#label').css({ opacity:1 });
	  }
	);
	
		jQuery("#alpha_70").click(
	  function () {
	  	 jQuery('#label').css({ opacity:0.8 });
	  }
	);
		
});



// 
// Very Simple Image Gallery
// 


jQuery(document).ready(function(){
	
	//jQuery("#gallery_box img").fadeTo("slow", 0.5);
	
	jQuery("#gallery_box img").hover(
	  function () {
		jQuery(this).css({borderColor: "#ffffff"});
		//jQuery(this).fadeTo('fast',1);
		//jQuery('#selector').animate({marginLeft:'809px'},{queue:false,duration:100});
	  }, 
	  function () {
	  	jQuery(this).css({borderColor: "#967B34"});
		//jQuery(this).fadeTo("slow", 0.5);
	  }
	);
	
	jQuery("#gallery_list a").click(
	  function () {
		var newsrc = jQuery(this).find("img").attr("src");
		jQuery("#gallery_show").hide().fadeIn(500);
		jQuery("#gallery_show").find('img').attr({src: newsrc});
	  }
	);
	
  });

