var SimpleFader = new Class({
  initialize:function(imagesWrapper)
  {
    this.ImageWrappers = $(imagesWrapper).getElements('div');
    this.ImageWrappers[0].style.display="block";
    this.ImageWrappers[1].style.display="none";
   // this.ImageWrappers[2].style.display="none";
 	
    this.Els = [];
 
    $$("#" + imagesWrapper + " div").each(function(item)
    {
      this.Els.include(new Fx.Morph(item,{duration:5000, transitions:Fx.Transitions.Sine.easeOut, link:'cancel'}));
    }.bind(this));             
 
    this.currentEl = this.Els[0];
    this.current = 0;
    this.Fade.periodical(5000, this);
  },
 
  Fade:function()
  {
    this.currentEl.start({"display" : ["block", "none"]});
    (this.current != this.Els.length - 1)?this.current++:this.current=0;
 
    this.Els[this.current].start({"display" : ["none", "block"]});
    this.currentEl = this.Els[this.current];              
  }
}); 
 
window.addEvent('domready', function()
{
  //you should make an instance of the Fader class here:
  var fader = new SimpleFader('imagesWrapper');
});