   
   animation
 
+dontAnimate = (speed, easing, callback) ->
+  options = jQuery.speed speed, easing, callback
+  this.each((i, el) -> options.old.call el) if options.old
+  this
+
 addAnimation = (el, animation) ->
   cssAnimations = $(el).data('cssAnimations') ? {}
   cssAnimations[animation.name] = animation

  .cssAnimate(fadeIn, speed, easing, callback)

jQuery.fn.cssStop = (animationName) ->
  $(this).each (i, el) -> removeAnimation el, animationName

jQuery.fn.cssAnimate = (name, speed, easing, callback) ->
  animation = createAnimation name, speed, easing, callback
  this.each (i, el) -> addAnimation el, animation

  removeAnimation this, event.originalEvent.animationName

jQuery.fn.cssFadeOut = (speed, easing, callback) ->
  if $.fx.off
    this.css display: 'none'
    return dontAnimate.call this, speed, easing, callback
  
  {fadeIn, fadeOut} = jQuery.cssAnimations
  animation = createAnimation fadeOut, speed, easing, callback
  
