$(document).ready(function(){

	$('ul.sub li').append('<span class="separator"> / </span>');
	$('ul.sub li:last-child span').remove();

//	$('ul.sub').stop().animate({ opacity: 0}, 0 );
	$('ul.sub').css('display','none');
/*
	$('#menu li.section-title span').bind("mouseover", function () { 
		$(this).parent().find('ul').css('display','block');
//		$(this).parent().find('ul').stop().animate({ height: 25}, 300 );
		$(this).parent().find('ul').stop().animate({ opacity: 1}, 300 );
    });

	$('#menu li.section-title').bind("mouseleave", function () { 
		$(this).parent().find('ul').css('display','none');
//		$(this).parent().find('ul').stop().animate({ height: 0}, 150 );
		$(this).parent().find('ul').stop().animate({ opacity: 0}, 150 );
	});
*/
	$('#menu li.section-title').bind("click", function () { 
		var first_link = $(this).children().children().children().attr("href");
		window.location = first_link;
	});
	
	// rendi visibile sub menu attivo
	$('ul.sub li.active').parent().parent().addClass('active');
	$('ul.sub li.active').parent().css('display','block');
	
	
//	if(($('#content #dida').html())!=""){
//		$('#content #dida').after('<p id="scroll"><a id="up" href="#"><span class="ir">up</span></a> <a id="down" href="#"><span class="ir">down</span></a></p>');
//	}
	
	/*	
	$('#scroll a#up').bind("click", function (event) {
		event.preventDefault();
		$("#dida").scrollTo( '-=60px', 800 );
	});
	$('#scroll a#down').bind("click", function (event) {
		event.preventDefault();
		$("#dida").scrollTo( '+=60px', 800 );
	});
	*/
});