       deferred
     else
       $element.css(lastFrame)
-      resolvedPromise()
+      resolvedDeferred()
       
   ANIMATION_PROMISE_KEY = 'up-animation-promise'
 

    element = document.createElement(tagName)
    element.innerHTML = html if isPresent(html)
    element
    
  debug = (message, args...) ->
    message = "[UP] #{message}"
    console.debug(message, args...)

  warn = (message, args...) ->
    message = "[UP] #{message}"
    console.warn(message, args...)

  error = (args...) ->
    args[0] = "[UP] #{args[0]}"
    console.error(args...)
    asString = stringifyConsoleArgs(args)
    $error = presence($('.up-error')) || $('<div class="up-error"></div>').prependTo('body')
    # $error = $('body')
    $error.addClass('up-error')
    $error.text(asString)
    # alert "#{asString}\n\nOpen the developer console for details."
    throw new Error(asString)

  CONSOLE_PLACEHOLDERS = /\%[odisf]/g

  emptyJQuery: emptyJQuery

)()

up.error = up.util.error
up.warn = up.util.warn
up.debug = up.util.debug
