   #
   # @param routes [Object] object with routes
   # @param fn [Function] callback, which will be called, after routes will be defined
-  # @event application:hashchange - generate, when url change
+  # @event application:urlchange - generate, when url change
   # @event application:404 - generate, if given url not matched with given routes
   # @event application:run - generate, after application running
   create: (routes, fn = ->) ->

      Sirius.Application.logger("Url change to: #{current}")
      Sirius.Application.adapter.fire(document, "application:urlchange", current, prev)

      for part in arr
        f = part[0]
        r = f.match(current)
        if r && !result

      [url, action]

    dispatcher = (e) ->
      prev = current
      result = false
      route_array = null

      if event.type == "hashchange"
        # hashchange
        route_array = array_of_routes
        current = window.location.hash
      else
        #plain
        route_array = plain_routes
        href = e.target.href # TODO the same for hashchange
        history.pushState({href: href}, "#{href}", href)
        pathname = window.location.pathname
