// JavaScript Document
$(function(){
	altura = $("body").height() - 260
	if(altura <= 250){
		altura = 250
	}
	$("#conteudo").height(altura)
	alturaCurva = altura - 120
	$(".curva div").height(alturaCurva)
	$("#texto").height(alturaCurva)
	$(window).resize(function(){
							  altura = $("body").height() - 260
							  if(altura <= 250){
								  altura = 250
							  }
							  $("#conteudo").height(altura)
							  alturaCurva = altura - 120
							  $(".curva div").height(alturaCurva)
							  $("#texto").height(alturaCurva)
							  alturaSlide = $("#slide img").height()/(-2)
							  $("#slide img").css({marginTop:alturaSlide})
							  })
	if(pagina == "home"){
		backgroundPadrao = 0
	}
	if(pagina == "quemSomos"){
		backgroundPadrao = -100
	}
	if(pagina == "fotos"){
		backgroundPadrao = -200
	}
	if(pagina == "contato"){
		backgroundPadrao = -300
	}
	$("#nav").animate({backgroundPosition:"(0px "+backgroundPadrao+")"})
	$("#nav li").hover(function(){
								background = -($("#nav li").index($(this)[0]))*100
								$("#nav").stop().animate({backgroundPosition:"(0px "+background+")"})
								}, function(){
								$("#nav").stop().animate({backgroundPosition:"(0px "+backgroundPadrao+")"})
								})
	$("#nav li a").hover(function(){
								$(this).stop().animate({paddingTop:20,height:30},"fast")
								}, function(){
								$(this).stop().animate({paddingTop:15,height:35},"fast")
								})
	
})
window.onload = function(){
	alturaSlide = $("#slide img").height()/(-2)
	$("#slide img").css({marginTop:alturaSlide})
}					  
