/*!
*Autor: Alexandre do Prado Servian
*Data:05/05/2011
*email:alexandreservian@gmail.com
*/
$(document).ready(function(){
	voltar_top();
	menu();
	lupa();
	descfoto();
	descfotolat();
	
	
})

function voltar_top(){
	$('.nav_ul .li2 a').click(function(){
    $('html, body').animate({scrollTop:0}, 'slow');
  });
}

function menu(){
	$('.menu .a2').css({backgroundPosition: "0px 20px"});
	$('.menu .a2').hover(function (){
		$(this).stop().animate({backgroundPosition:"(0px -20px)"},{duration:400});
	},function(){
		$(this).stop().animate({backgroundPosition:"(0px 20px)"}, {duration:400});
	})

}
function descfoto(){
	$('.img_li').hover(function(){
		descricao = $(this).find('.desc');
		descricao.stop().animate({bottom: "-260px"}, 400 );
	},
	function () {
	$('.desc').stop();
	$('.desc').animate({bottom: "-305px"}, 500 );
	})

}
function descfotolat(){
$('.box-frota').hover(function(){
		descricao = $(this).find('.desc-frota');
		descricao.stop().animate({right: "0"}, 400 );
	},
	function () {
	$('.desc-frota').stop();
	$('.desc-frota').animate({right: "-240px"}, 500 );
	})

}
function lupa(){
	$('.lupa').hover(function(){
		$(this).find(".bg").css({display:"block"});
	},
	function () {
	$(this).find(".bg").css({display:"none"});
	})
}
