window.addEvent('domready', function() {
									 



   	//var effectlogoR = new Fx.Tween('logo', {duration:2000});
	
/*	var effectlogo = new Fx.Tween('logo', {
		duration:1000, 
		transition: Fx.Transitions.Bounce.easeOut,
		onComplete: function(){
			effectlogoR.start('margin-top', 300, 170).delay(10000);
		}
	});*/
	
	
	$('logo').addEvent('click',function(){
		this.set('tween',{duration:1000, transition: Fx.Transitions.Bounce.easeOut, link:'chain'});
		this.tween('margin-top', 300);
		//delay(1000);
		this.tween('margin-top', 170);
	});

	/*var effectlogospecchioR = new Fx.Tween('logo_specchio', {duration:2000});
	var effectlogospecchio = new Fx.Tween('logo_specchio', {
		duration:1000, 
		transition: Fx.Transitions.Bounce.easeOut,
		onComplete: function(){
			effectlogospecchioR.start('margin-top', 0, 80).delay(10000);
		}

	});*/


	var effect1 = new Fx.Tween('barra-menu', {
		duration:1000, 
		transition: Fx.Transitions.Elastic.easeOut
	});	
	var effect2 = new Fx.Tween('apDiv2', {
		duration:1200, 
		transition: Fx.Transitions.Elastic.easeOut
	});
	var effect3 = new Fx.Tween('apDiv4', {
		duration:1400, 
		transition: Fx.Transitions.Elastic.easeOut
	});
	

    
/*	$('logo').addEvent('click', function(e){
		effectlogo.start('margin-top', 170, 300);
		//effectlogospecchio.start('margin-top', 80,0);
	});*/
	
	effect1.start('left', -200, 242);
	effect2.start('left', -200, 226);
	effect3.start('left', -200, 400);



	/*$$('div.menuitem').addEvent('mouseenter', function(e){
		e.stop();													  
		var a=new Fx.Tween(e.target, { 
			duration:100, 
			transition: Fx.Transitions.Sine.easeInOut,
			link:'chain'
			
		});
		q=30;
		a.start('margin-left',0, -q);
		a.start('margin-left',-q, q);
		a.start('margin-left',q, 0);
	});*/
	
	/*$$('div.menuitem').addEvents({
		mouseenter: function() {
			this.set('tween',{duration:100, transition: Fx.Transitions.Elastic.easeIn});
			this.tween('margin-left','30px');
		}
	});*/
	
	var items=	$$('div.menuitem');
	
	items.each(function(element){
		element.set('tween',{duration:100, transition: Fx.Transitions.Sine.easeInOut, link:'chain'});
		element.addEvent('mouseenter', function(){
			q=30;
			this.tween('margin-left',0, -q);
			this.tween('margin-left',-q, q);
			this.tween('margin-left',q, 0);
		});
	});

	
	/*$$('div.lavoro img').addEvent('mouseenter', function(e){ e.stop();															
		var a=new Fx.Tween(e.target, {duration:300,transition: Fx.Transitions.Sine.easeInOut });
		q=57; a.start('width',q,q+100);
	});*/
	
	/*$$('div.lavoro img').addEvent('mouseenter', function(e){ e.stop();															
		var a=new Fx.Tween(e.target, {duration:300,transition: Fx.Transitions.Sine.easeInOut });
		q=e.target.getStyle('width'); a.start('width',q,'100px');
	});*/
	
	
	var limg=$$('div.lavoro img');
	limg.each(function(e){ e.set('morph',{duration:300, transition: Fx.Transitions.Sine.easeInOut}); });
	limg.addEvents({
		mouseenter: function(){ 
			//this.set('morph',{duration:300, transition: Fx.Transitions.Sine.easeInOut});
			this.morph({width:75, height:75});
		},
		mouseleave: function(){ 
			//this.set('morph',{duration:300, transition: Fx.Transitions.Sine.easeInOut});
			//this.tween('width','57px');
			this.morph({width:57, height:57});
		}
	});
	


	
	/*$$('div.lavoro img').addEvent('mouseleave', function(e){ e.stop();															
		var a=new Fx.Tween(e.target, {duration:300,transition: Fx.Transitions.Sine.easeInOut });
		q=e.target.getStyle('width'); a.start('width',q,'57px');
	});*/
	
	/*$$('div.lavoro img').addEvent('mouseleave', function(e){ e.stop();
		var a=new Fx.Tween(e.target, { duration:300, transition: Fx.Transitions.Sine.easeInOut });
		q=57; a.start('width',q+100,q);
	});

	$$('div.lavoro img').addEvent('mouseenter', function(e){ e.stop();
		var a=new Fx.Tween(e.target, { 	duration:300, transition: Fx.Transitions.Sine.easeInOut	});
		q=57; a.start('height',q,q+100);
	});

	$$('div.lavoro img').addEvent('mouseleave', function(e){ e.stop();
		var a=new Fx.Tween(e.target, { 	duration:300, transition: Fx.Transitions.Sine.easeInOut	});
		q=57; a.start('height',q+100,q);
	});*/
	

	
	

});

