// JavaScript Document
$(document).ready(function(){
	
	$('.conteudo').css({'opacity' : 1});
	
	swfobject.embedSWF("swf/home.swf", "home", "100%", "100%", "9.0.0", "expressInstall.swf", {embed: true}, {wmode:'transparent'});
	
	swfobject.embedSWF("swf/diga.swf", "diga", 35, 18, "9.0.0", "expressInstall.swf", {embed: true}, {wmode:'transparent'});
	
	$('.menusuave li a').hover( function(){
		$(this).stop().animate({'opacity' : 1},{queue:false, duration: 'slow'});
	},function(){
		$(this).stop().animate({'opacity' : 0},{queue:false, duration: 'slow'});
	});
	$(document).keydown(function(e) {
		if(e.keyCode == 27){
			fechar('');
		}
	});
	$('.anos ul li a').click(function (){
		var offset =($(this).attr('rel')-1) * 380;
		$('#vaivem').animate({'left':-offset}, 600);
		return false;
	});
	$('.home').css({'height': $(window).height()-160, 'opacity' : 1, 'margin' : 0});	
	if($('.content').height()>($(window).height()-160)){
		$('.footer').css({'position' : 'absolute', 'bottom' : -240});
	}else{
		$('.content').animate({'margin-top' : (($(window).height()-160)/2) - (($('.content').height())/2)}, 'slow');
	}
});



