$(function() {
  		$('ul#esquedamenu li.parent > a').click(function() {
  			$('ul.sub-menu', $(this).parent()).slideToggle('fast', function() {
  				$(this).parent().toggleClass('aberto');
  			});
			return false;
  		});
  	});

	function menusel(categoria){
		$('#dep_'+categoria).parent().toggleClass('aberto');
		$('ul.sub-menu', $('#dep_'+categoria).parent()).fadeIn('slow', function() { });
	}
	
function carregando(){
	setTimeout('execarregando()', 1000);
	
}
function execarregando(){
	$("#loadingALL").fadeIn("slow");
}

function atualizar()
{
   if(navigator.userAgent.indexOf("MSIE") != -1){
   	history.go(0);
   }else{
   	window.location.reload();
   }
}

function popup(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',status=no,scrollbars='+scroll+''
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function limparCamposNews(){
	setTimeout('document.all.formnews.reset();', 2000);
}
