window.addEvent('domready', function(){

//pictures opacity

	
	// We are setting the opacity of the element to 0.5 and adding two events
	$$('.moo_opacity').set('opacity', 1).addEvents({
		mouseenter: function(){
			// This morphes the opacity and backgroundColor
			this.morph({
				'opacity': 0.5
				 
				
			});
		},
		mouseleave: function(){
			// Morphes back to the original style
			this.morph({
				opacity: 1
				
			});
		}
	});


//links opacity


var el = $$('.whitebox'),
		color = el.getStyle('backgroundColor');

	
	// We are setting the opacity of the element to 0.5 and adding two events
	$$('.whitebox').set('opacity', 1).addEvents({
		mouseenter: function(){
		
		this.setStyle('cursor','pointer');

		// This morphes the opacity and backgroundColor
			this.morph({
				duration: 300,
				'opacity': 1,
				'background-color': '#726C47'
				
			});
		},
		mouseleave: function(){
			// Morphes back to the original style
			this.morph({
				duration: 300,
				opacity: 1,
				'background-color':color
				
			});
		}
	});







	// Second Example
	
	// The same as before: adding events
	
	$('mymenu1').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.Bounce.easeOut // This could have been also 'bounce:out'
			}).tween('height', '200px');
		},
		'mouseleave': function(){
			// Resets the tween and changes the element back to its original size
			this.set('tween', {}).tween('height', '115px');
		}
	});
	
	
	
	$('mymenu2').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.Bounce.easeOut // This could have been also 'bounce:out'
			}).tween('height', '200px');
		},
		'mouseleave': function(){
			// Resets the tween and changes the element back to its original size
			this.set('tween', {}).tween('height', '115px');
		}
	});
	
	
	$('mymenu3').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.Bounce.easeOut // This could have been also 'bounce:out'
			}).tween('height', '200px');
		},
		'mouseleave': function(){
			// Resets the tween and changes the element back to its original size
			this.set('tween', {}).tween('height', '115px');
		}
	});
	
	$$('.myOtherElement').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.Bounce.easeOut // This could have been also 'bounce:out'
			}).tween('height', '500px');
		},
		'mouseleave': function(){
			// Resets the tween and changes the element back to its original size
			this.set('tween', {}).tween('height', '220px');
		}
	});

	
	
	
	
});