window.addEvent('domready', function(){
	//First Example

	
	var el = $('myElement'),
		color = el.getStyle('backgroundColor');
	
	// We are setting the opacity of the element to 0.5 and adding two events
	$('myElement').set('background-color', '#fff').addEvents({
		mouseenter: function(){
			// This morphes the opacity and backgroundColor
			this.morph({
				'background-color': '#f60'
			});
			$('about').morph({
				'color': '#fff',
			});
			$('thumb1').morph({
				'opacity': 1,
			});
		},
		mouseleave: function(){
			// Morphes back to the original style
			this.morph({
				backgroundColor: color
			});
			$('about').morph({
				'color': '#333',
			});
			$('thumb1').morph({
				opacity: 0.5,
				backgroundColor: color
			});
		}
	});
var el = $('myElement2'),
		color = el.getStyle('backgroundColor');
	
	// We are setting the opacity of the element to 0.5 and adding two events
	$('myElement2').addEvents({
		mouseenter: function(){
			// This morphes the opacity and backgroundColor
			this.morph({
				'background-color': '#f60'
			});
			$('port').morph({
				'color': '#fff',
			});
			$('thumb2').morph({
				'opacity': 1,
			});
		},
		mouseleave: function(){
			// Morphes back to the original style
			this.morph({
				backgroundColor: color
			});
			$('port').morph({
				'color': '#333',
			});
			$('thumb2').morph({
				opacity: 0.5,
			});
		}
	});
	var el = $('myElement3'),
		color = el.getStyle('backgroundColor');
	
	// We are setting the opacity of the element to 0.5 and adding two events
	$('myElement3').addEvents({
		mouseenter: function(){
			
			this.morph({
				'background-color': '#f60'
			});
			$('contact').morph({
				'color': '#fff',
			});
			
			$('thumb3').morph({
				'opacity': 1,
			});

			// This morphes the opacity and backgroundColor
			
		},
		mouseleave: function(){
			// Morphes back to the original style
			this.morph({
				backgroundColor: color
			});
			$('contact').morph({
				'color': '#333',
			});
			$('thumb3').morph({
				opacity: 0.5,
			});
		}
	});
	// Second Example
	
	// The same as before: adding events
	$('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', '132px');
		},
		'mouseleave': function(){
			// Resets the tween and changes the element back to its original size
			this.set('tween', {}).tween('height', '22px');
		}
	});
	
$('thumb1').set('opacity', 0.5).addEvents({
		mouseenter: function(){
			// This morphes the opacity and backgroundColor
			this.morph({	   				
				'opacity': 1,
			});
			$('about').morph({
				'color': '#fff',
			});
			$('myElement').morph({
				'background-color': '#f60'
			});
		},
		mouseleave: function(){
			// Morphes back to the original style
			this.morph({
				opacity: 0.5,
			});
			$('about').morph({
				'color': '#333',
			});
			$('myElement').morph({
				backgroundColor: color
			});
		}
	});

$('thumb2').set('opacity', 0.5).addEvents({
		mouseenter: function(){
			// This morphes the opacity and backgroundColor
			this.morph({
				'opacity': 1,
			});
			$('port').morph({
				'color': '#fff',
			});
			$('myElement2').morph({
				'background-color': '#f60'
			});
		},
		mouseleave: function(){
			// Morphes back to the original style
			this.morph({
				opacity: 0.5,
			});
			$('port').morph({
				'color': '#333',
			});
			$('myElement2').morph({
				backgroundColor: color
			});
			
		}
	});

$('thumb3').set('opacity', 0.4).addEvents({
		mouseenter: function(){
			// This morphes the opacity and backgroundColor
			this.morph({
				'opacity': 1,
			});
			$('contact').morph({
				'color': '#fff',
			});
			$('myElement3').morph({
				'background-color': '#f60'
			});
		},
		mouseleave: function(){
			// Morphes back to the original style
			this.morph({
				opacity: 0.5,
			});
			$('contact').morph({
				'color': '#333',
			});
			$('myElement3').morph({
				backgroundColor: color
			});
		}
	});


  
});


	

