function do_init(){
	
	opacityImages();
	//categoriesMenuOpen();
	
}

function opacityImages(){
	
	$$('img.imgThumbs').each(function(img){
	
		img.onmouseover=function(){ this.setStyle('opacity',0.5); }

		img.onmouseout=function(){ this.setStyle('opacity',1); }

	});
	
}


function categoriesMenuOpen(){
	
	var menuHeight=($('menu').offsetHeight);
	
	if(menuHeight<300){
		
		$('menuContainer').setStyle('height',menuHeight+'px');
		var imgLogoTop=(menuHeight+3);
		
		$('contArrows').setStyle('padding','0px');
		$('arrowUp').setStyle('display','none');
		$('arrowDown').setStyle('display','none');

	}else{
		
		$('menuContainer').setStyle('height','295px');
		var imgLogoTop=305;
		$('arrowDown').setStyle('top','307px');
		scorriMenuCategorie();
		
	}
	
	$('titoloMenuCategorie').addEvents({
		'mouseenter': function(){
			// Always sets the duration of the tween to 1000 ms and a bouncing transition
			// And then tweens the height of the element
			this.set('tween', {
				duration: 1000,
				transition: Fx.Transitions.Expo.easeOut // This could have been also 'bounce:out'
			}).tween('height', (menuHeight+25)+'px');
			$('loghettoCat').set('tween',{duration: 750}).tween('top',imgLogoTop+'px');
		},
		'mouseleave': function(){
			// Resets the tween and changes the element back to its original size
			this.set('tween', {}).tween('height', '20px');
			$('loghettoCat').set('tween').tween('top','0px');
		}
	});

}

function scorriMenuCategorie() {
	var myScroller = new Scroller('menuContainer', {area: 50, velocity: 0.2});
	
	myScroller.start();

}


