$(document).ready(function(){
	
	// scrollable box
	$('.BoxSelect div').hide();
	$(".BoxSelect > a").click(function(e){
	e.preventDefault();
	if($(this).next().css("display")!="none"){
	  $(this).next().slideToggle('slow');
	}else{
	  $('.BoxSelect div').slideUp('slow');
	  $(this).next().slideToggle('slow');
	}
	
	return false;
	});
	
	$('body').click(function(){
	$('.BoxSelect div').slideUp('slow');
	});
	
	// menu esquerdo
	 $('#siteMenuPrincipal > li > a').bind('click',function() {
	  
	  var $next = $(this).next();
	  if ($next.is(':visible')) return false;
	  $(this).parent().parent().find('li > ul:visible').slideUp('normal');
	  $next.slideDown('normal');
	  return false;
	
	});	
	
	if ( document.getElementById('superbox') ) {
	 $.superbox.settings = {
			
			overlayOpacity: .8, // Background opaqueness
			loadTxt: "Carregando...", // Loading text
			closeTxt: "Fechar", // "Close" button text
			prevTxt: "Anterior", // "Previous" button text
			nextTxt: "Proximo" // "Next" button text

	  };
	  $.superbox();
	  
	}


	calendarioAbre('mes=&ano=','calendarioAbre');

});
