//ANIMACION BOTONES HOME

$(document).ready(function(){
	$(".buttona").hover(function(){
		$(".buttona img")
		.animate({top:"19px"}, 200).animate({top:"25px"}, 200) // first jump
		.animate({top:"22px"}, 100).animate({top:"25px"}, 100) // second jump
		.animate({top:"23px"}, 100).animate({top:"25px"}, 100); // the last jump 
	},function() { $(".buttona").stop(true).animate(300); });
	
	$(".buttonb").hover(function(){
		$(".buttonb img")
		.animate({top:"22px"}, 200).animate({top:"28px"}, 200) // first jump
		.animate({top:"25px"}, 100).animate({top:"28px"}, 100) // second jump
		.animate({top:"26px"}, 100).animate({top:"28px"}, 100); // the last jump
	},function() { $(".buttonb").stop(true).animate(300); });
	
	$(".buttonc").hover(function(){
		$(".buttonc img")
		.animate({top:"22px"}, 200).animate({top:"28px"}, 200) // first jump
		.animate({top:"25px"}, 100).animate({top:"28px"}, 100) // second jump
		.animate({top:"26px"}, 100).animate({top:"28px"}, 100); // the last jump
	},function() { $(".buttonc").stop(true).animate(300); });
	
	$(".buttond").hover(function(){
		$(".buttond img")
		.animate({top:"16px"}, 200).animate({top:"22px"}, 200) // first jump
		.animate({top:"19px"}, 100).animate({top:"22px"}, 100) // second jump
		.animate({top:"21px"}, 100).animate({top:"22px"}, 100); // the last jump
	},function() { $(".buttond").stop(true).animate(300); });
	
	$(".buttone").hover(function(){
		$(".buttone img")
		.animate({top:"16px"}, 200).animate({top:"22px"}, 200) // first jump
		.animate({top:"19px"}, 100).animate({top:"22px"}, 100) // second jump
		.animate({top:"21px"}, 100).animate({top:"22px"}, 100); // the last jump
	},function() { $(".buttone").stop(true).animate(300); });
	
	$(".buttonf").hover(function(){
		$(".buttonf img")
		.animate({top:"22px"}, 200).animate({top:"28px"}, 200) // first jump
		.animate({top:"25px"}, 100).animate({top:"28px"}, 100) // second jump
		.animate({top:"26px"}, 100).animate({top:"28px"}, 100); // the last jump
	},function() { $(".buttonf").stop(true).animate(300); });
});

//PROJECT FINDER: FILTER
function pf_filter(Item, Type)
{	$('#filter_'+ Type).attr("value", Item);
	$('#option_'+ Type).fadeOut('slow');
	if (Type=="zone") 
		$.ajax({type: "POST", url: "system/cliente/php/ajax.php", data: "zone="+ Item,
		success: function(data) 
		{	$('#option_country').html(data);
			//if (data.indexOf("<!-- set_see_all -->")!=-1)
				$("#filter_country").attr("value", "See all");
		}});
}

//PROJECT FINDER: IMGS
var Actual=0;
function pf_imgs(Incr, Imgs)
{	//Actual=parseInt($("#img_cont").html());
	Actual+=Incr;
	if (Actual<0) Actual=Imgs.length-1;
	if (Actual>=Imgs.length) Actual=0;
	$("#img_cont").html(Actual+1)
	$("#imagen_pfinder").attr("src", Imgs[Actual]);
}
