var ChainEvents = new Class(
{
  //extends the event class
  Implements : Events
  
  //implements the chain class
  ,eventChain : new Chain()
  

  //chains all events from a type
  ,chainEvent : function(type)
  {
    type = Events.removeOn(type);
    
    if (!this.$events || !this.$events[type]) return this;
    
    this.$events[type].each(function(event)
    {
      this.eventChain.chain(event);
    }.bind(this));
    
  }


  //fires chained events and invokes them with args
  ,fireChainedEvents: function(args)
  {
    var chainSize = this.eventChain.$chain.length;
    
    //call chain
    for(var i = 0; i < chainSize; i++)
    { 
      var returnVal = this.eventChain.callChain(args); 
    }
    
  }
  
});
