// JavaScript Document

$(document).ready(function(){

	$("a.zoom_fancybox").fancybox({
		'titleShow'     : false
	});	

	// Muestra y oculta los menús	
	$('.menu_desplegable ul li:has(ul)').hover(
		function(e)
		{
			$(this).find('ul').show();
		},
		function(e)
		{
			$(this).find('ul').hide();
		}
	);



	/* CARRO DE COMPRA */
	/*
	$("#resumen_carro_de_la_compra").click(
	  function () {
		 $('#lista_carro_compra').slideToggle("slow");
	  }	  
	);
*/
	
	$("#carro_de_la_compra").click(
	  function () {
		 $(this).find('#lista_carro_compra').slideDown("slow");
	  }	  
	);
	$("#carro_de_la_compra").mouseleave(
	  function () {
		 $(this).find('#lista_carro_compra').slideUp("slow");
	  }	  
	);

	
	/* OTROS*/

	

	
	/* SLIDE BOX */
	
	//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
	
	//Vertical Sliding
	$('.boxgrid.slidedown').hover(function(){
		$(".cover", this).stop().animate({top:'-160px'},{queue:false,duration:300});
		}, function() {
		$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:300});
	});
	
	//Horizontal Sliding
	$('.boxgrid.slideright').hover(function(){
		$(".cover", this).stop().animate({left:'-325px'},{queue:false,duration:300});
		}, function() {
		$(".cover", this).stop().animate({left:'0px'},{queue:false,duration:300});
	});
	
	//Diagnal Sliding
	$('.boxgrid.thecombo').hover(function(){
		$(".cover", this).stop().animate({top:'160px', left:'325px'},{queue:false,duration:300});
		}, function() {
		$(".cover", this).stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});
	});
	
	//Partial Sliding (Only show some of background)
	$('.boxgrid.peek').hover(function(){
		$(".cover", this).stop().animate({top:'90px'},{queue:false,duration:160});
		}, function() {
		$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:160});
	});
	
	//Full Caption Sliding (Hidden to visible)
	$('.boxgrid.captionfull').hover(function(){
		$(".cover", this).stop().animate({top:'160px'},{queue:false,duration:160});
		}, function() {
		$(".cover", this).stop().animate({top:'160px'},{queue:false,duration:160});
	});
	
	//Caption Sliding (Partially Hidden to visible)
	$('.boxgrid.caption').hover(function(){
		$(".cover", this).stop().animate({top:'160px'},{queue:false,duration:160});
		}, function() {
		$(".cover", this).stop().animate({top:'220px'},{queue:false,duration:160});
	});
	
	/* FANCY BOX - I FRAME */
	$(".iframeFancyBox").fancybox({
		'width'				: '75%',
		'height'			: '75%',
		'autoScale'			: false,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});	
});




