$(document).ready(function(){
	$('#sidebar ul li').hover(
	function(){
		$('ul',this).show()
	},function(){
		$('ul',this).hide()	
	})
	
	$("a.lightbox").fancybox({
		'overlayShow'	: true,
		'overlayColor'	: '#000',
		'overlayOpacity': '0.9',
		'transitionIn'	: 'fade',
		'transitionOut'	: 'fade',
		'centerOnScroll': true,
		'margin'		: 5,
		'padding'		: 5,
		'width'			: 640,
		'height'		: 480
	});
	
	$('.contentTab:first').show()
	
	$('.tabTitle h2').click(function(){
		$('.tabTitle h2').removeClass('active')
		
		$('.contentTab').delay(250).slideUp(250)
		$('.contentTab#'+$(this).attr('class')).delay(500).animate({opacity:'toggle',height:'toggle'},1000)
		$(this).addClass('active')
	})
	

 	
    //  Get the parameter value after the # symbol
    var url=document.URL.split('#')[1];
    if(url == undefined){
        url = '';
    }
 
    // If the parameter exists create the message and insert into our paragraph
    if(url == 'privati'){
        $('.tabTitle h2').removeClass('active')
		$('.tabTitle h2:eq(2)').addClass('active')
		$('.contentTab').hide()
		$('.contentTab#per-i-privati').delay(500).animate({opacity:'toggle',height:'toggle'},1000)
    }
	
}) // fine jQuery
