
$(document).ready(function(){


	$(".nav").superfish({
		pathClass : 'current',
		animation : {opacity:'show'},
		delay : 1000
	});

	$(".nav >li.sfHover > a").css("color","#F26522");
	
	$("#header2 #logo1 A").click(function(){
		$("#header2 #logo1").hide();		
		$("#header2 #logo").show();	
		return false;
	});
	
	$("#header1 #beta").click(function(){
		$("#header2 #logo1").toggle();		
		$("#header2 #logo").toggle();
		return false;	
	});
	
	/**************************************************************/
	
	$('.tprocurara').click(function(){
		$(this).val("");
		$(this).css({color:"black", fontStyle:"normal"});
	});

			
	$('.zimajuda').tooltip({showBody: " - "});
	$('.zimajuda1').tooltip({top: -90, left:0,showBody: " - "});
	$('.zimajuda2').tooltip({left: -300,showBody: " - "});
	
	var intervalId = setInterval(esconde, 10000);
	function esconde() {
		$('.msg').fadeOut('slow');
		clearInterval(intervalId);
	} 
	
	$(".msg, .msgErro").click(function(){esconde();})
	$("#teasingFechar").click(function(){$('#teasing').fadeOut('slow');})

	$('#tabeladir1 tr:odd').addClass('branco');
	$('#tabeladir2 tr:odd').addClass('branco');		

	$(".notLogin").livequery('click',function(){
		$("#layerLogin").modal({onShow: modalShow, onClose: modalClose});
    	return false;
	});
	
	$('#reclamo2').load("/reclamozib.html");
 	$('#minhasStats ul li a').click(function(){
 		$('#reclamo2').load("/reclamozib.html");
 	});

});


	function resetLayer(){
		$("#layerLogin").insertAfter('body').hide();
	}
	
	function modalShow(dialog){
		$('#grafico').hide();
		$('#graficoj').hide();		
		$('.periodoGrafico').hide();
		dialog.container.slideDown('slow');	 
	
	}
	
	function modalClose(dialog){
		$('#grafico').show();
		$('#graficoj').show();
		$('#semanal').show();
		$.modal.close();
	}
	
	

