function initMenu() {
	var opcion = $$(".apagado");
	var textolink = $$(".colorlink");
 
	opcion.each(function( o, x ){ 
		color = $(opcion[x]).getStyle('backgroundColor');
		
		// We are setting the opacity of the element to 0.5 and adding two events
		$(opcion[x]).addEvents({
		mouseenter: function(){
			// This morphes the opacity and backgroundColor
			this.morph({
				'background-color': '#269EAC'
			});
			$(textolink[x]).morph({
				color: '#ffffff'
		    });
		},
		mouseleave: function(){
			// Morphes back to the original style
			this.morph({
				backgroundColor: color
			});
			$(textolink[x]).morph({
				color: '#474747'
		    });
		}
		});	
  });
	
  // Menu lateral
	var opcion2 = $$(".elemento");
	var textolink2 = $$(".colorlink2");
	var barrascroll = $$(".standby");
	
	// The same as before: adding events
	opcion2.each(function( o, x ){ 
		$(opcion2[x]).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
				$(barrascroll[x]).set('tween', {
					duration: 800,
					transition: Fx.Transitions.Bounce.easeOut // This could have been also 'bounce:out'
				}).tween('width', '250px');
				$(textolink2[x]).morph({
					color: '#ffffff'
		    	});
			},
			'mouseleave': function(){
			// Resets the tween and changes the element back to its original size
				$(barrascroll[x]).set('tween', {}).tween('width', '5px');
				$(textolink2[x]).morph({
					color: '#474747'
		    	});
			}
		});
   });
}
window.addEvent('domready', initMenu);