 
 
     _toggleLevels: ->
-      console.log 'toggleLevels function'
       for level in @levels
         if level.getAttribute('data-level') >= @level + 1
           $(level).removeClass 'off-screen-level-open'

    _bindEvents: =>

      bodyClickBinding = (el) =>
        @_resetMenu()
        el.removeEventListener @eventType, bodyClickBinding

      @trigger.bind @eventType, (event) =>
        event.stopPropagation()
        event.preventDefault()
        if @open
          @_resetMenu()
        else
          @_openMenu()
          document.addEventListener @eventType, (event) =>
            if @open and not hasParent(event.target, @el.id)
              bodyClickBinding document

      @_toggleLevels()

    #opens the menu
    openMenu: (subLevel) =>
      ++@level

      levelFactor = (@level - 1) * @options.levelSpacing
