     e.preventDefault()
     timeout = parseInt(link.dataset.menuShowDelay ? @menuTimeout, 10)
 
-    Timeout.clear @refreshTimeout
-    @refreshTimeout = Timeout.set timeout, =>
-      @currentMenu =
-        if @currentMenu == target
-          @closestMenuId $target
-        else
-          target
-      @refresh()
+    @setMenu timeout, =>
+      if @currentMenu == target
+        @closestMenuId $target
+      else
+        target
 
 
 

    link = e.currentTarget
    timeout = parseInt(link.dataset.menuShowDelay ? @menuTimeout, 10)

    Timeout.clear @refreshTimeout
    @refreshTimeout = Timeout.set timeout, =>
      @currentMenu = link.dataset.menuTarget
      @currentMenu ?= @closestMenuId $(link)
      @refresh()



  onMouseLeave: (e) =>
    $target = $(e.currentTarget)

    Timeout.clear @refreshTimeout
    @refreshTimeout = Timeout.set @menuTimeout, =>
      @currentMenu = @parentsMenuId $target
      @refresh()


  hideMenu: =>
    Timeout.clear @refreshTimeout
    @refreshTimeout = Timeout.set @menuTimeout, =>
      @currentMenu = null
      @refresh()


  refresh: =>

        Fade.in menu
        @$menuLink(menuId).addClass('js-menu--active')
        $(menu).trigger 'menu:showing'


  setMenu: (delay, menuFunc) =>
    delay ?= @menuTimeout
    Timeout.clear @refreshTimeout

    @refreshTimeout = Timeout.set delay, =>
      @currentMenu = menuFunc?()
      @refresh()
