    * updateSettings  .ultimateFlash({Object} options)                       ~ {Object} settings
    * auto            .ultimateFlash('auto', {ArrayOrObject} obj)            ~ {Array} ajFlashes | {Boolean} false
    * ajaxSuccess     .ultimateFlash('ajaxSuccess'[, Arguments successArgs = []])
-   * ajaxError       .ultimateFlash('ajaxError'[, String text = settings.defaultErrorText][, Arguments errorArgs = []])
+   * ajaxError       .ultimateFlash('ajaxError'[, String text = settings.translations.defaultErrorText][, Arguments errorArgs = []])
   ###
   $.fn.ultimateFlash = ->
-    return @  unless @length
+    a = args arguments
+    argsLength = a.length
+    # Shall return the Widget, if have arguments and last argument of the call is a Boolean true.
+    _returnWidget =
+      if argsLength and _.isBoolean a[argsLength - 1]
+        argsLength--
+        a.pop()
+      else
+        false
+    unless @length
+      return if _returnWidget then undefined else @
+    # Get the first
     jContainer = @eq 0
+    # Try to get the Widget-object, controlling everything that happens in our magical container.
     widget = jContainer.data UltimateFlashWidget.defaults.constants.widgetDataKey
-    argsLength = arguments.length
-    _returnWidget = argsLength && arguments[argsLength - 1] == true
-    if widget and widget.jContainer[0] == jContainer[0]
-      a = args arguments
-      if argsLength and typeof a[0] == 'string'
+    if widget and widget.jContainer[0] is jContainer[0]
+      if argsLength and _.isString a[0]
         command = a.shift()
       else
         return widget  if _returnWidget
         return jContainer  unless argsLength
         command = 'updateSettings'
-      if $.isFunction widget[command]
+      if _.isFunction widget[command]
         return widget[command].apply widget, a
       else
         $.error "Command [#{command}] does not exist on jQuery.ultimateFlash()"
     else
-      options = if argsLength then arguments[0] else {}
-      widget = new UltimateFlashWidget jContainer, options
-      jContainer.data UltimateFlashWidget.defaults.constants.widgetDataKey, widget
+      options = if argsLength then a[0] else {}
+      if $.isPlainObject options
+        widget = new UltimateFlashWidget jContainer, options
+        jContainer.data UltimateFlashWidget.defaults.constants.widgetDataKey, widget
+      else
+        $.error "First argument of jQuery.ultimateFlash() must be plain object"
     if _returnWidget then widget else jContainer
 
 )( jQuery )

    text

  _hide: (jFlash) ->
    clearTimeout jFlash.data 'timeout_id'
    _self = @
    jFlash.slideUp @settings.slideTime, -> $(@).remove()  if _self.settings.removeOnHide

  _setTimeout: (jFlash) ->
    timeoutId = false
    if @settings.showTime or @settings.showTimePerChar
      timeoutId = setTimeout =>
          @_hide jFlash
        , @settings.showTime + jFlash.text().length * @settings.showTimePerChar
      jFlash.data 'timeout_id', timeoutId
    timeoutId

  getSettings: ->
    @settings


class UltimateFlashWidget

  @defaults =
    constants:
      widgetDataKey: 'ultimate_flash'
    locales:
