```coffeescript
# This mess is probably going to get replaced with something like:
# http://ricostacruz.com/jquery.transit/
module.exports =
  fade: ($el, options) ->
    $el.
      attr('data-state', 'fade-out').
      one($.support.transition.end, ->
        options.out() if options?.out?
        $el.
          attr('data-state', 'fade-in').
          one($.support.transition.end, ->
            options.in() if options?.in?
          ).emulateTransitionEnd 250
      ).emulateTransitionEnd 250
```

Allow duration to be configured
user
```coffeescript
module.exports =
  fade: ($el, options = {}) ->
    $el.
      attr('data-state', 'fade-out').
      one($.support.transition.end, ->
        options.out() if options.out?
        $el.
          attr('data-state', 'fade-in').
          one($.support.transition.end, ->
            options.in() if options.in?
          ).emulateTransitionEnd (options.duration or 250)
      ).emulateTransitionEnd (options.duration or 250)
```
assistant