window.addEvent('domready', function() {
		var el = $('myElement');
		var anotherEl = $('anotherElement');
	$('click2').addEvent('click', function(e) {
									   
		e.stop();
		div2();Tiempo = $clear(Tiempo);	
	});
	$('click1').addEvent('click', function(e) {
		
		e.stop();
		div1();
		Tiempo = $clear(Tiempo);
	});	
	$('click3').addEvent('click', function(e) {
		 
		e.stop();
		div3();
		Tiempo = $clear(Tiempo);
	});


function div2(){
	var morph = new Fx.Morph(anotherEl);
	morph.start({
	left: -515
		});
	}
function div1(){
	anotherEl.morph('div.demoElement');
	}
function div3(){
	anotherEl.morph('div.myClass');
	}
	
var x=1;
var automatica = function(){
	if (x < 2){
		div1(),
		x++
		}
	else if (x < 3){
		div2(),
		x++
		}
	else if (x < 4){
		div3(),
		x=1
		}
	  }
var Tiempo = automatica.periodical(5000);
});


	
