//
// JavaScript para o Pet Imagem
// # Autor Alexandre Lopes - Guache WD
// # <alexandre_lopes@guachewd.com>
//
$(document).ready(function(){
	
	var height = $(document).height();
	
	$("#carregando").hide();
	
	$("#carregando").ajaxStart(function(){$(this).css({"height":height}).show();});
	
	$("#carregando").ajaxStop(function(){$(this).hide();});
	
	$("dd").hide();
	
	$("dt a").css({"display":"block"});
	
	$("dt a").click(function(){
		var rel = $(this).attr("rel");
		var href= $(this).attr("href");
		if(rel == "avisos")
		{
			$(this).click(function(){location.href = href});
		}
		else if(rel == "contato")
		{
			$(this).click(function(){location.href = href});
		}
		else if(rel == "equipe_medica")
		{
			$(this).click(function(){location.href = href});
		}
		else if(rel == "localizacao")
		{
			$(this).click(function(){location.href = href});
		}
		else if(rel == "noticias")
		{
			$(this).click(function(){location.href = href});
		}
		else if(rel == "parceiros")
		{
			$(this).click(function(){location.href = href});
		}
		else if(rel == "slide")
		{
			$(this).click(function(){location.href = href});
		}
		else
		{
			$("dd").slideUp("slow");
			$(this).parent().next().slideDown("slow");
			return false;
		}
	});
	
});