jQuery(document).ready(function($){
	
	//Detalhes
	$('ul li:first-child').addClass('first')
	$('ul li:last-child').addClass('last')	
	$('.moduletable:last-child').addClass('last')
	$('.items-row:last-child').addClass('last')
	$('dl dt:first-child').addClass('first')
	//Detalhes
	
	//Menu
	$('#menu ul li').hover(
		function() {
			//$(this).addClass("actives");
			$(this).find('> ul').stop(false, true).fadeIn();
			$(this).find('> ul > li > span').css('display', 'none');
			$(this).find('>ul ul').stop(false, true).fadeOut('fast');
		},
		function() {
			$(this).removeClass("actives");        
			$(this).find('ul').stop(false, true).fadeOut('fast');
			}
		);
	$('#menu ul li').hover(
		function() {
			$(this).addClass("active");
		},
		function() {
			$(this).removeClass("active");        
		});
	//Menu
	 $('.vermodulo').click( function() {
		 //Pegando informações do modulo
		 var descricao 	= $($(this).attr('rel')).html();
		 var modulo 	= $(this).attr('title');
		 //Animação
		 $("#modulo-descricao").addClass('ativo');
		 $('#modulo-descricao').slideUp("slow", function(){
			 //Preechendo dados
			 var htmlLateral = '';
			 	 htmlLateral = htmlLateral + '<h2>' + modulo + '</h2>';
			 	 htmlLateral = htmlLateral + descricao;
			 	 htmlLateral = htmlLateral + '';		 	 
			 	 $('#modulo-descricao').html(htmlLateral);		
		 });
		 //Animação
		 $('#modulo-descricao').slideDown("slow", function(){
			 //Preechendo dados
			 var htmlLateral = '';
			 	 htmlLateral = htmlLateral + '<h2>' + modulo + '</h2>';
			 	 htmlLateral = htmlLateral + descricao;
			 	 htmlLateral = htmlLateral + '';		 	 
			 	 $('#modulo-descricao').html(htmlLateral);		
		 });
		 return false;
   });

});
