$(document).ready(function(){
	/*PNG TRANSPARENTE*/
	$('div#general').pngFix();
	
	/*DESTAQUE DOS BOTÕES DO NAVIGATION*/	
	$('ul#nav_institucional>li').each(function(index){
		var hrefAtual = $('a',this).attr('href');
		if(discoverAtualFileMainMenu(hrefAtual)==discoverAtualFileMainMenu(window.location.href)){
			$(this).addClass('li_nav_active');
		}else{
			$(this).remove('li_nav_active');
		}
	});	
	//retorna somente a page
	function discoverAtualFileMainMenu(hrefAtual){		
		if((hrefAtual.lastIndexOf(".php")+5) == (hrefAtual.lastIndexOf("/")+1)){
			urlFinal = hrefAtual.substring(hrefAtual.lastIndexOf(".php")+5,hrefAtual.length)
		}else{
			urlFinal = hrefAtual.substring(hrefAtual.lastIndexOf(".php")+5,hrefAtual.lastIndexOf("/")+1)
		}
		return urlFinal;
	}
	

	/*SCRIPT DROPDOWN OV*/
	$('.bt_sub_mn').hover(
		function(){
			$(this).addClass('li_nav_active');
			$(this).find('div').fadeIn('fast');
		},function(){
			$(this).removeClass('li_nav_active');
			$(this).find('div').fadeOut('fast');
		}
	);
		
	
});
