function setEqualHeight(columns)  
{  
	var tallestcolumn = 0;  
	columns.each(  
		function()  
		{  
			currentHeight = $(this).height();  
			if(currentHeight > tallestcolumn)  
			{  
				tallestcolumn  = currentHeight;  
			}  
		}  
	);  
	columns.height(tallestcolumn);  
}

$(document).ready(function() {
	
	// Expand Panel
	$("#open").click(function(){
		$("div#panel").slideDown("slow");
	
	});	
	
	// Collapse Panel
	$("#close").click(function(){
		$("div#panel").slideUp("slow");	
	});		
	
	// Switch buttons from "Log In | Register" to "Close Panel" on click
	$("#toggle a").click(function () {
		$("#toggle a").toggle();
	});

	// lightbox
	$("a.group_images").fancybox({ 
		'overlayShow'				: true,
		'easingIn'				: 'easeOutBack',
		'easingOut'				: 'easeInBack',
		'hideOnContentClick'			: true
	});

	
	// scroller verticale
	if ( $("#stdPanel").length > 0 ) {
		$('#stdPanel').jScrollPane();
	}

	// parifica altezza colonne affiancate
	 setEqualHeight($(".equal_height")); 
	
});