1 Raphael.el.anim = function(opts){
  2     if(opts['target']){
  3         if(opts['easing']){
  4             this.animateWith(opts['target'], opts['attrs'], opts['ms'], opts['callback']);
  5         }else{
  6             this.animateWith(opts['target'], opts['attrs'], opts['ms'], opts['easing'], opts['callback']);
  7         }
  8     }else{
  9         if(opts['easing']){
 10             this.animate(opts['attrs'], opts['ms'], opts['callback']);
 11         }else{
 12             this.animate(opts['attrs'], opts['ms'], opts['easing'], opts['callback']);
 13         }        
 14     }
 15 };
 16 
 17 Raphael.fn.anim = Raphael.el.anim;