// destacaFoto "nuestros productos"
$(document).ready(function(){

//Larger thumbnail preview 
$("ul.destacaFoto li").hover(function() {
	$(this).css({'z-index' : '10'}); /*Agregamos un valor de z-index mayor para que la imagen se mantenga arriba */
	$(this).find('img').addClass("hover").stop() /* Agregamos la clase "hover" */
		.animate({
			marginTop: '-105px', /* Las siguientes 4 lineas alinean verticalmente la imagen */
			marginLeft: '-110px', 
			top: '50%', 
			left: '50%', 
			width: '184px', /* Nuevo ancho imagen */
			height: '172px', /* Nuevo alto imagen */
			padding: '20px'
		}, 200); /* Velocidad animacion del "hover" */
	} , function() {
	$(this).css({'z-index' : '0'}); /* Restauramos z-index a 0 */
	$(this).find('img').removeClass("hover").stop() /* Quitamos la clase "hover" y detenemos la animacion */
		.animate({
			marginTop: '0', /* Restauramos el valor de alineacion como el default */
			marginLeft: '0',
			top: '0', 
			left: '0', 
			width: '162px', /* Restauramos el ancho como al inicio */
			height: '134px', /* Restauramos el alto como al inicio */
			padding: '0px'
		}, 400); /* Velocidad animacion */
});

	$("ul.destacaFoto li a").click(function() {
		var mainImage = $(this).attr("href"); //Find Image Name
		$("#main_view img").attr({ src: mainImage });
		return false;		
	});
});

// DestacaFoto "sala de prensa"

$(document).ready(function(){

//Larger thumbnail preview 
$("ul.destacaFotoPrensa li").hover(function() {
	$(this).css({'z-index' : '10'}); /*Agregamos un valor de z-index mayor para que la imagen se mantenga arriba */
	$(this).find('img').addClass("hover").stop() /* Agregamos la clase "hover" */
		.animate({
			marginTop: '-105px', /* Las siguientes 4 lineas alinean verticalmente la imagen */
			marginLeft: '-145px', 
			top: '50%', 
			left: '50%', 
			width: '258px', /* Nuevo ancho imagen */
			height: '172px', /* Nuevo alto imagen */
			padding: '20px'
		}, 200); /* Velocidad animacion del "hover" */
	} , function() {
	$(this).css({'z-index' : '0'}); /* Restauramos z-index a 0 */
	$(this).find('img').removeClass("hover").stop() /* Quitamos la clase "hover" y detenemos la animacion */
		.animate({
			marginTop: '0', /* Restauramos el valor de alineacion como el default */
			marginLeft: '0',
			top: '0', 
			left: '0', 
			width: '216px', /* Restauramos el ancho como al inicio */
			height: '144px', /* Restauramos el alto como al inicio */
			padding: '0px'
		}, 400); /* Velocidad animacion */
});

	$("ul.destacaFotoPrensa li a").click(function() {
		var mainImage = $(this).attr("href"); //Find Image Name
		$("#main_view img").attr({ src: mainImage });
		return false;		
	});
});

// DestacaFoto "Klippan"

$(document).ready(function(){
//Larger thumbnail preview 
$("ul.destacaFotoKlippan li").hover(function() {
	$(this).css({'z-index' : '10'}); /*Agregamos un valor de z-index mayor para que la imagen se mantenga arriba */
	$(this).find('img').addClass("hover").stop() /* Agregamos la clase "hover" */
		.animate({
			marginTop: '-80px', /* Las siguientes 4 lineas alinean verticalmente la imagen */
			marginLeft: '-110px', 
			top: '50%', 
			left: '50%', 
			width: '200px', /* Nuevo ancho imagen */
			height: '100px', /* Nuevo alto imagen */
			padding: '20px'
		}, 200); /* Velocidad animacion del "hover" */
	} , function() {
	$(this).css({'z-index' : '0'}); /* Restauramos z-index a 0 */
	$(this).find('img').removeClass("hover").stop() /* Quitamos la clase "hover" y detenemos la animacion */
		.animate({
			marginTop: '0', /* Restauramos el valor de alineacion como el default */
			marginLeft: '0',
			top: '0', 
			left: '0', 
			width: '162px', /* Restauramos el ancho como al inicio */
			height: '81px', /* Restauramos el alto como al inicio */
			padding: '0px'
		}, 400); /* Velocidad animacion */
});

	$("ul.destacaFotoKlippan li a").click(function() {
		var mainImage = $(this).attr("href"); //Find Image Name
		$("#main_view img").attr({ src: mainImage });
		return false;		
	});
});


// DestacaFoto "ganadores"

$(document).ready(function(){
//Larger thumbnail preview 
$("ul.destacaFotoGanadores li").hover(function() {
	$(this).css({'z-index' : '10'}); /*Agregamos un valor de z-index mayor para que la imagen se mantenga arriba */
	$(this).find('img').addClass("hover").stop() /* Agregamos la clase "hover" */
		.animate({
			marginTop: '-145px', /* Las siguientes 4 lineas alinean verticalmente la imagen */
			marginLeft: '-190px', 
			top: '50%', 
			left: '50%', 
			width: '368px', /* Nuevo ancho imagen */
			height: '244px', /* Nuevo alto imagen */
			padding: '20px'
		}, 200); /* Velocidad animacion del "hover" */
	} , function() {
	$(this).css({'z-index' : '0'}); /* Restauramos z-index a 0 */
	$(this).find('img').removeClass("hover").stop() /* Quitamos la clase "hover" y detenemos la animacion */
		.animate({
			marginTop: '0', /* Restauramos el valor de alineacion como el default */
			marginLeft: '0',
			top: '0', 
			left: '0', 
			width: '330px', /* Restauramos el ancho como al inicio */
			height: '219px', /* Restauramos el alto como al inicio */
			padding: '0px'
		}, 400); /* Velocidad animacion */
});

	$("ul.destacaFotoGanadores li a").click(function() {
		var mainImage = $(this).attr("href"); //Find Image Name
		$("#main_view img").attr({ src: mainImage });
		return false;		
	});
});
