
//Função Aparecer/Desaparecer Sub-Menu do Menu Principal	
	var valor = "";
	$(document).ready(function(){
		//$('dd:not(:first)').hide();
		//$('dt:not(#none):first').css({backgroundImage:'url("imagens/sub_aberto.gif")'});
		$('dt:not(#none) a').click(function(){
			valor = $(this).parent().css('background-image');
			valor = parseInt(valor.indexOf("sub_fechado"));
			if (valor != -1){
			$(this).parent().css({backgroundImage:'url("imagens/sub_aberto.gif")'});
			} else{
			$(this).parent().css({backgroundImage:'url("imagens/sub_fechado.gif")'});
			}
			$(this).parent().next().slideToggle('normal');
			return false;
		});
	});

//Função Aumentar e Diminuir Letra
var pg_int;
$(document).ready(function(){
	$('iframe').load(function(){ 
	pg_int = document.getElementById('pagina').contentWindow.document.body;
	document.getElementById('voltar').innerHTML = document.getElementById('pagina').src;
	//alert(document.getElementById('voltar').innerHTML);
	});
});
function letra(varia){
	if (pg_int.innerHTML != ""){
		var titulo = pg_int.getElementsByTagName('h1'); //Título do Conteúdo Interno
		var paragrafo = pg_int.getElementsByTagName('p'); //Parágrafos do Conteúdo Interno
		var tabela = pg_int.getElementsByTagName('td'); //Tabelas do Conteúdo Interno
		var topico = pg_int.getElementsByTagName('li'); //Tópicos do Conteúdo Interno
		var corpo = pg_int; //Corpo do Conteúdo Interno

	switch (varia){
	case 1: //Pequeno
		tamanho = 1;
		titulo[0].style.fontSize = 'small';
		corpo.style.fontSize = 'x-small';
		for(i=0;i<=paragrafo.length-1;i++){paragrafo[i].style.fontSize = 'x-small';}
		for(i=0;i<=topico.length-1;i++){topico[i].style.fontSize = 'x-small';}
		for(i=0;i<=tabela.length-1;i++){tabela[i].style.fontSize = 'x-small';}
	break;
	case 2: //Médio
		tamanho = 2;
		titulo[0].style.fontSize = 'medium';	
		corpo.style.fontSize = 'small';
		for(i=0;i<=paragrafo.length-1;i++){paragrafo[i].style.fontSize = 'small';}
		for(i=0;i<=topico.length-1;i++){topico[i].style.fontSize = 'small';}
		for(i=0;i<=tabela.length-1;i++){tabela[i].style.fontSize = 'small';}
	break;	
	case 3:	//Grande
		tamanho = 3;
		titulo[0].style.fontSize = 'large';	
		corpo.style.fontSize = 'medium';
		for(i=0;i<=paragrafo.length-1;i++){paragrafo[i].style.fontSize = 'medium';}
		for(i=0;i<=topico.length-1;i++){topico[i].style.fontSize = 'medium';}
		for(i=0;i<=tabela.length-1;i++){tabela[i].style.fontSize = 'medium';}
	
	}
	}
}

//Função voltar

function voltar(){
parent.window['pagina'].history.go(-1);

/*
	endereco = document.getElementById("voltar").innerHTML;
	coisa = endereco.substr(endereco.lastIndexOf("/")+1,endereco.lastIndexOf(".")-(endereco.lastIndexOf("/")+1));
	/*alert(coisa);*/
	if(coisa=="inicio"){
		textos(coisa , "comum");
	}else{
		textos(coisa , "noticia");		
	}
		/*document.getElementById("pagina").src = endereco;*/
}

$(document).ready(function(){
	if (document.getElementById("voltar").innerHTML != document.getElementById("pagina").src){
		document.getElementById("voltar").innerHTML = document.getElementById("pagina").src;
	}
});

//Função sombra de texto

$(document).ready(function(){
  //$(".sombra").textShadow("#000",1,1);
})
