$(document).ready(function(){
/*	$("#abrir_cadast").click(function () {
       $("#fcadastro").slideDown(800);
    });	
   
	$("#a-sendmail").toggle(
			   function() {
				  $("#sendmail").slideDown(800);
			   },
			   function() {
				  $("#sendmail").slideUp(800); 
	});	
	
});*/
/* Inserindo links na li 
$(".conhec_rel_not li, .list_not_rel li").hover(
  function () {
	$(this).addClass("hov");
  }, 
  function () {
	$(this).removeClass("hov");
});
$(".conhec_rel_not li, .list_not_rel li").click(function() {
	window.location = $(this).find("a").attr("href");
});
$('#myselectbox_input').hover{function() {
	$("#menu li").addClass("tira_position");
	},function() {
	$("#menu li").removeClass("tira_position");
});
$('#myselectbox_container').hover{function() {
	$("#menu li").addClass("tira_position");
	},function() {
	$("#menu li").removeClass("tira_position");
});*/
/* Slides busca avan�ada*/
$(".vis").toggle(
		   function() {
			  $(this).addClass("fec");
			  $(this).text("Fechar");
			  $(this).parent().parent().parent().find("iframe").slideDown(800);
		   },
		   function() {
			  $(this).removeClass("fec");
			  $(this).text("Visualizar");
			  $(this).parent().parent().parent().find("iframe").slideUp(800);
});	
/*$(".vis").toggle(
		   function() {
			  $(this).parent().parent().parent().find("iframe").slideDown(800);
		   },
		   function() {
			  $(this).parent().parent().parent().find("iframe").slideUp(800);
});	*/
$(".clr_txt").focus(function () {
	if($(this).attr("value") == 'Ache tudo aqui'){
		  $(this).attr({ value: "" });
	}
});
$(".clr_txt").blur(function () {
	if($(this).attr("value") == ''){
		  $(this).attr({ value: "Ache tudo aqui" });
	}
});


/* Config Tooltip*/
/*$("#faixas li .fxs").toggle(
	   function() {
		  $(this).addClass("play");
	   },
	   function() {
		  $(this).removeClass("play"); 
	   }
); */
});
// FOR�A LINKS A ABRIREM EM UMA NOVA JANELA

window.onload = function(){
    if(document.getElementsByTagName) {
        var anchors = document.getElementsByTagName('a');
        for(var i=0; i<anchors.length; i++) {
            var anc = anchors[i];
            if(anc.getAttribute("href") && anc.getAttribute('rel')=='externo') { 
			// <-- � necess�rio inserir rel="externo" no link
                anc.target = '_blank';
                var title = anc.title + ' (Este link abre uma nova janela)'; 
				// <-- Insere este texto no final do Title do link
                anc.title = title;
            }
        }
    }
}

/* Font-Size */
var tagAlvo = new Array('p'); 
var tagAlvo2 = new Array('li');
var tamanhos = new Array( '11px','12px','13px','14px','15px','16px','17px' );
var tamanhoInicial = 4;
 
function mudaTamanho( idAlvo,acao ){
  if (!document.getElementById) return
  var selecionados = null,tamanho = tamanhoInicial,i,j,tagsAlvo;
  tamanho +=  acao;
  if ( tamanho < 0 ) tamanho = 0;
  if ( tamanho > 6 ) tamanho = 6;
  tamanhoInicial = tamanho;
  if ( !( selecionados = document.getElementById( idAlvo ) ) ) selecionados = document.getElementsByTagName( idAlvo )[ 0 ];
  
  selecionados.style.fontSize = tamanhos[ tamanho ];
  
  for ( i = 0; i < tagAlvo.length; i++ ){
    tagsAlvo = selecionados.getElementsByTagName( tagAlvo[ i ] );
    for ( j = 0; j < tagsAlvo.length; j++ ) tagsAlvo[ j ].style.fontSize = tamanhos[ tamanho ];
  }
  for ( i = 0; i < tagAlvo2.length; i++ ){
    tagsAlvo = selecionados.getElementsByTagName( tagAlvo2[ i ] );
    for ( j = 0; j < tagsAlvo.length; j++ ) tagsAlvo[ j ].style.fontSize = tamanhos[ tamanho ];
  }  
}

/* Slides busca avan�ada*/
/*
$(".vis").toggle(
		   function() {
			  $(this).addClass("fech");
			  $(this).parent().parent().parent().find("iframe").slideDown(800);
		   },
		   function() {
			   $(this).removeClass("fech");
			  $(this).parent().parent().parent().find("iframe").slideUp(800);
});	
*/
