attachRollOverEvent = function(imageId){
	$(imageId).mouseover( function(){ $(this).attr("src", $(this).attr("src").split('_off').join('_on')) } );
	$(imageId).mouseout( function(){ $(this).attr("src", $(this).attr("src").split('_on').join('_off')) } );
}


$(document).ready(function(){
	$(document).pngFix(); 
	attachRollOverEvent("#menu a img.roll");
	$("#redStripe").height($(document).height());
	setInterval ('$("#redStripe").height($(document).height());', 500 ); 
});


function showCalendar(url){
	$("#calendar").empty();
	$("#calendar").html('<div style="margin:auto;"><br/><br/><br/><br/><img src="img/ajax-loader.gif" border="0" /></div>');
	$("#calendar").load(url);	
}

function showEventiPerData(data){
	if($("#eventi_home").length > 0){
		$("#eventi_home").empty();
		$("#eventi_home").html('<div style="margin:auto;text-align:center;width:100%"><br/><br/><img src="img/ajax-loader.gif" border="0" /></div>');
		$("#eventi_home").load('eventi/per-data/'+data);	
	}else{
		location.href = 'eventi/calendario/?data='+data;
	}
}


function showFacebox(url){
	jQuery.facebox(function() {
	  jQuery.get(url, function(data) {
	    jQuery.facebox(data)
	  })
	})
}

