window.addEvent('domready', function(){
	//First Example
	var el = $('thebg'), abouthead = $('red_wine'), producthead = $('orange_kitchen'), homehead = $('foam_tile'), galleryhead = $('tan_tile'), contacthead = $('blue_tub'),
		color = el.getStyle('backgroundColor');
		
	
	$('hometrigger').addEvents({
		mouseenter: function(){
			// This morphes the opacity and backgroundColor
			el.morph({
				'background-color': '#617972'
			});
			homehead.set('opacity', 0).morph({
				'opacity': 1
			});
			
			
		},
		mouseleave: function(){
			// Morphes back to the original style
			el.morph({
				backgroundColor: color
			});
			
			homehead.morph({
				opacity: 0
			});
		}
	});
	
	
	$('abouttrigger').addEvents({
		mouseenter: function(){
			// This morphes the opacity and backgroundColor
			el.morph({
				'background-color': '#845046'
			});
			abouthead.set('opacity', 0).morph({
				'opacity': 1
			});
			
			
		},
		mouseleave: function(){
			// Morphes back to the original style
			el.morph({
				backgroundColor: color
			});
			
			abouthead.morph({
				opacity: 0
			});
		}
	});
	
	
	$('producttrigger').addEvents({
		mouseenter: function(){
			// This morphes the opacity and backgroundColor
			el.morph({
				'background-color': '#c07739'
			});
			producthead.set('opacity', 0).morph({
				'opacity': 1
			});
			
			
		},
		mouseleave: function(){
			// Morphes back to the original style
			el.morph({
				backgroundColor: color
			});
			
			producthead.morph({
				opacity: 0
			});
		}
	});
	
	
	$('gallerytrigger').addEvents({
		mouseenter: function(){
			// This morphes the opacity and backgroundColor
			el.morph({
				'background-color': '#897053'
			});
			galleryhead.set('opacity', 0).morph({
				'opacity': 1
			});
			
			
		},
		mouseleave: function(){
			// Morphes back to the original style
			el.morph({
				backgroundColor: color
			});
			
			galleryhead.morph({
				opacity: 0
			});
		}
	});
	
	
	$('contacttrigger').addEvents({
		mouseenter: function(){
			// This morphes the opacity and backgroundColor
			el.morph({
				'background-color': '#3d6c8d'
			});
			contacthead.set('opacity', 0).morph({
				'opacity': 1
			});
			
			
		},
		mouseleave: function(){
			// Morphes back to the original style
			el.morph({
				backgroundColor: color
			});
			
			contacthead.morph({
				opacity: 0
			});
		}
	});
	
	$('producttrigger_menu').addEvents({
		mouseenter: function(){
			// This morphes the opacity and backgroundColor
			el.morph({
				'background-color': '#c07739'
			});
			producthead.set('opacity', 1).morph({
				'opacity': 1
			});
			
			
		},
		mouseleave: function(){
			// Morphes back to the original style
			el.morph({
				backgroundColor: color
			});
			
			producthead.morph({
				opacity: 0
			});
		}
	});
	
	
	$('gallery_menu').addEvents({
		mouseenter: function(){
			// This morphes the opacity and backgroundColor
			el.morph({
				'background-color': '#897053'
			});
			galleryhead.set('opacity', 1).morph({
				'opacity': 1
			});
			
			
		},
		mouseleave: function(){
			// Morphes back to the original style
			el.morph({
				backgroundColor: color
			});
			
			galleryhead.morph({
				opacity: 0
			});
		}
	});
});