function addMega()
{
	jQuery(this).addClass("hovering");
}

function removeMega()
{
	jQuery(this).removeClass("hovering");
}

jQuery(document).ready(function(){ 
	
	//fix centering flir images
	jQuery("h2.box-title span.flir-replaced, .follow-us span.flir-replaced").prepend('<span class="fixer"></span>');
	jQuery("a.toggler span.flir-replaced").prepend('<span class="fixer"></span>');
	
	if( typeof jQuery.fn.toggleElements == 'function')
	{
		jQuery('div.user-toggler').toggleElements( 
			{ fxAnimation:'fade', fxSpeed:'slow', className:'toggler' } );    
	}
	 
	jQuery("p.read-more").each(
		function(i){
			obj = jQuery(this);
			obj.click( function(){
				obj.prev("div.full-content").toggle("slow", function(){                           
					if(jQuery(this).css('display') == 'none')
						obj.find("a").html('Continua &gt;');
					else
						obj.find("a").html('Chiudi &lt;');
				});
			})
		}
	);
	
	if( typeof jQuery.fn.customExpose == 'function')
	{  
		if ('v'=='\v') {
			//welcome to IE )) 
			jQuery(".banner").customExpose({
				color: null
			});
		}
		else
		{
			jQuery(".banner").customExpose();    
		}
	}

	if( typeof jQuery.fn.customSlider == 'function')
	{
		jQuery("#palinsesto").customSlider({
			itemClass: '.palinsesto-items'
		}); 
		
		jQuery("#focuson").customSlider({
			itemClass: '.focus_item'
		}); 
				
		jQuery("#itinerari").customSlider({
			itemClass: '.itinerari_item'
		}); 
						
		jQuery("#progetti").customSlider({
			itemClass: '.project_item'
		}); 
	}
	
	jQuery('.home .row-title div.next img').hover(
		function(){
			jQuery(this).attr('src', 'images/title-arrow-hover.png'); 
		},
		function(){
			jQuery(this).attr('src', 'images/title-arrow.png');  
		}
	)

					 
});