/* 005 */


$(function(){
    $('#convenio').accordion({
    autoheight:false
    });
});



$(document).ready(function(){
	$("a[rel=externo]").attr('target','_blank');
});

$(document).ready(function(){
	$("a[href^=http]").attr('target','_blank');
});


hs.graphicsDir = 'JQuery/highslide/graphics/';
hs.wrapperClassName = 'wide-border';


$(document).ready(function(){  
	
	$('#exibir').click(function(event){  
		event.preventDefault();  
		$("#publicidade").show("slow");  
	});  

	$('#ocultar').click(function(event){  
		event.preventDefault();  
		$("#publicidade").hide("slow");  
	}); 
	

		
});  
        
    
    


    
$(document).ready(function(){  
        
    $("#galeria1").hide(""); 
    $('#galeria1 a').lightBox();		

    $('#galeria_bv a').lightBox();		


    $("#rodape_page_enviar").hide(""); 
    $("#bv_deixerecado").hide(""); 	

});  
            
        


function exibir_galeria(div_alterar, botao_alterar){ 

    
    var div = document.getElementById(div_alterar) 
    
    /* se conteúdo está escondido, mostra e troca o valor do botão para: esconde */ 
    if (div.style.display == 'none') { 
	
		document.getElementById(botao_alterar).value=' esconder galeria de imagens ';
        $("#" + div_alterar).show("slow");  
    } else { 
    /* se conteúdo está a mostra, esconde o conteúdo e troca o valor do botão para: mostra */ 
        $("#" + div_alterar).hide("slow");  
		document.getElementById(botao_alterar).value=' ver galeria de imagens ';
    } 
} 			

function exibir_div(div_alterar){

	var div = document.getElementById(div_alterar) 
    
    if (div.style.display == 'none') { 
        $("#" + div_alterar).show("slow");  
    } else { 
        $("#" + div_alterar).hide("slow");  
    } 
	
}


function AtivaScript(thing){


	if(thing == 's3slider'){
			var getdivs, currentdiv;
			
				tagname = document.getElementsByTagName('div').length;
				for(var o=0; o < tagname ; o++){
				//for(var o in tagname){	
					currentdiv=document.getElementsByTagName("div")[o];
					getdivs=currentdiv.getAttribute("id");
			
					if(getdivs){
						if(getdivs.indexOf(thing)>=0){
									
							$(document).ready(function() { 
							   $('#s3slider').s3Slider({ 
								  timeOut: 3500
							   });
							}); 
			
			
						}
					}
				}
	}
	
		
}



function troca_texto(de, para){
	return replace(de, para);
}




/*
ON READY: Resize iframe #grade
*/
$(function(){
	set_h = function (e) {
		var p = e.contentDocument || e.contentWindow.document;
		e.height = $(p.body).height() + 35;
	};
	
	$('#grade').each(function(){
		$(this).load(function(){
			set_h(this);
		});
		set_h(this);
	});

});	



$(window).load(function() {
	$('#slider').nivoSlider({
        effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
        animSpeed:500, //Slide transition speed
        pauseTime:3000
    });
	
	
});

