    
    
    
    function AtivamenuFinal(){
        
				a = "#"+menu_selecionado;
				//alert(a)
				
			
				quel =  $(a);
			
				
				quem = $(quel).parent("li")
			
				
				num = $("li.menu_cat").index($(quem)[0]) 
				
				  
				$('ul.menu').accordion( "activate", num );
			   //$('ul.menu').accordion( "activate", -1 )
				
 
			 
    
    
    
    }
    
    
    
 
 
 

   //$(function () {
      
  function AtivaMenu(){
    
  
 $('ul.menu').accordion({
         header: 'h2',
         selectedClass: 'ativado',
           event: 'click',
        	 alwaysOpen:false,
        	 autoHeight: false
      });

    
    // $('ul.menu').accordion();

    
 	 	$('ul.menu').accordion( "activate", -1 )
		b = window.setTimeout("AtivamenuFinal()",500);
      };
    
    

     
 
    
    
    
     $(document).ready(function () {
     
      $('ul.blockContentSubMenu').hide(); // hide all ULs inside LI.drawer except the first one
       
       AtivaMenu();
       });
   
   
   
   
/*
   	function AtivaMenu(){
   				
   				var last = "";
   	
				$('H2.menuTitulo').click(function () {
				
				
					if($(this).attr("id")==last)return;
				
					// hide all the drawer contents
					$('ul.blockContentSubMenu:visible').slideUp().prev().removeClass('ativado');
			
						//	setTimeout("AtivaMenu",500);
				
							//desabilita temporariamente
					
					
					// show the associated drawer content to 'this' (this is the current H2 element)
					// since the drawer content is the next element after the clicked H2, we find
					// it and show it using this:
					$(this).addClass('ativado').next().slideDown();
					
				
			
					last = $(this).attr("id");
					
					//alert(last);
					
				  });
 
   	}
   
*/