$(document).ready(function(){
    
	cor_link = "#f8f8f8"; /* cor do estado normal */
	cor_hover  = "#99cc00"; /* mouse hover */
	font_cor_hover = "#ffffff"; /* cor da fonte no hover */
	font_cor_link = "#333333"; /* cor da fonte no link */
	
	
		/*** LOCACAO ***/
	$("#locacao").click(function(){
      $("#locacao_box").animate({opacity:"show"},"slow");
    });
	
	$("#locacao").mouseover(function(){
      $("#locacao").animate({ backgroundColor:"#fefefe",color:font_cor_hover},"fast");
	  $("#locacao_box").animate({top:250},"slow");
    });
	
	$("#locacao").hover(
      function () {
       $("#locacao").animate({ backgroundColor:cor_hover},"fast");
      }, 
      function () {
        $("#locacao").animate({ backgroundColor:cor_link,color:font_cor_link},"fast");
      }
    );
	
	// funcionar com formulario
	$("#locacao_box").hover(
      function () {
       
      }, 
      function () {
        $("#locacao_box").animate({opacity:"hide"},"slow");
      }
    );
	
	/* ----------------------------------------------------------- */
	
	

	
	/*** ADMINISTRACAO ***/
	$("#administracao").click(function(){
      $("#administracao_box").animate({opacity:"show"},"slow");
    });
	
	$("#administracao").mouseover(function(){
      $("#administracao").animate({ backgroundColor:"#fefefe",color:font_cor_hover},"fast");
	  $("#administracao_box").animate({top:250},"slow");
    });
	
	$("#administracao").hover(
      function () {
       $("#administracao").animate({ backgroundColor:cor_hover},"fast");
      }, 
      function () {
        $("#administracao").animate({ backgroundColor:cor_link,color:font_cor_link},"fast");
      }
    );
	
	// funcionar com formulario
	$("#administracao_box").hover(
      function () {
       
      }, 
      function () {
        $("#administracao_box").animate({opacity:"hide"},"slow");
      }
    );
	
	/* ----------------------------------------------------------- */
	
	
	/*** SEGURO ***/
	$("#seguros").click(function(){
      $("#seguros_box").animate({opacity:"show"},"slow");
    });
	
	$("#seguros").mouseover(function(){
      $("#seguros").animate({ backgroundColor:"#fefefe",color:font_cor_hover},"fast");
	  $("#seguros_box").animate({top:180},"slow");
    });
	
	$("#seguros").hover(
      function () {
       $("#seguros").animate({ backgroundColor:cor_hover},"fast");
      }, 
      function () {
        $("#seguros").animate({ backgroundColor:cor_link,color:font_cor_link},"fast");
      }
    );
	
	// funcionar com formulario
	$("#seguros_box").hover(
      function () {
       
      }, 
      function () {
        $("#seguros_box").animate({opacity:"hide"},"slow");
      }
    );
	/* ----------------------------------------------------------- */
	
	
		/*** AVALIACAO ***/
	$("#avaliacao").click(function(){
      top.location.href("?pag=avaliacao");
    });
	
	$("#avaliacao").mouseover(function(){
      $("#avaliacao").animate({ backgroundColor:"#fefefe",color:font_cor_hover},"fast");
	  $("#avaliacao_box").animate({top:450},"slow");
    });
	
	$("#avaliacao").hover(
      function () {
       $("#avaliacao").animate({ backgroundColor:cor_hover},"fast");
      }, 
      function () {
        $("#avaliacao").animate({ backgroundColor:cor_link,color:font_cor_link},"fast");
      }
    );
	
	// funcionar com formulario
	$("#avaliacao_box").hover(
      function () {
       
      }, 
      function () {
        $("#avaliacao_box").animate({opacity:"hide"},"slow");
      }
    );
	
	/* ----------------------------------------------------------- */
	
	
	
	/*** FINANCIAMENTO ***/
	$("#financiamento").click(function(){
      $("#financiamento_box").animate({opacity:"show"},"slow");
    });
	
	$("#financiamento").mouseover(function(){
      $("#financiamento").animate({ backgroundColor:"#fefefe",color:font_cor_hover},"fast");
	  $("#financiamento_box").animate({top:150},"slow");
    });
	
	$("#financiamento").hover(
      function () {
       $("#financiamento").animate({ backgroundColor:cor_hover},"fast");
      }, 
      function () {
        $("#financiamento").animate({ backgroundColor:cor_link,color:font_cor_link},"fast");
      }
    );
	
	// funcionar com formulario
	$("#financiamento_box").hover(
      function () {
       
      }, 
      function () {
        $("#financiamento_box").animate({opacity:"hide"},"slow");
      }
    );
	/* ----------------------------------------------------------- */
	
	/* Busca imovel */
	$(".busca_btn").hover( function(e){
	 $(".busca_btn").css('background-position','0 -27'); 
    },function(e){
	 $(".busca_btn").css('background-position','0 0'); 
	});
	/* /Busca imovel*/
	
	
	/* muda fundo 'outros imoveis' */
	/*$(".alinha_imovel").hover( function(e){
	 $(this).animate({backgroundColor:"#E7F2D9"},"fast"); 
    },function(e){
	 $(this).animate({backgroundColor:"#fff"},"slow"); 
	});
	/* ----------- */	
	/* /muda fundo */
	
	/* efeitos form avaliacao */
	cor_input_a = "#E7F2D9";
	cor_input_hover = "#fff";
	$('.input').focus(function(){
 
  	$(this).animate({backgroundColor:cor_input_a},"fast");
	$(this).css("border","#6d8e56 2px solid");
 
	});
 
	$('.input').blur(function(){
 
	$(this).animate({backgroundColor:cor_input_hover},"fast");
 	$(this).css("border","#999 1px solid");
	
	});
	/* /efeitos avaliacao */
	
	/* bt submit */
	alinha_imovel_a = "#fff";
	alinha_imovel_hover = "#b9ea97";
	
	$(".submit").hover( function(e){
	 $(this).css("backgroundColor","#336633"); 
    },function(e){
	 $(this).css("backgroundColor","#6d8e56"); 
	});
	/* /bt submit */
	
	$(".box_imovel").hover(function(){$(this).toggleClass('box_imovel_hover');},
	function(){$(this).toggleClass('box_imovel_hover')});
});

