 
       # passing an appendMenuTo option when initializing a kylemenu helps get aroud popup being hidden
       # by overflow:scroll on its parents
-      # but by doing so we need to make sure that click events still get propigated up in case we
+      # but by doing so we need to make sure that click events still get propagated up in case we
       # were delegating events to a parent container
       if @opts.appendMenuTo
         popupInstance = @$menu.data('popup')

        @$placeholder = $('<span style="display:none;">').insertAfter(@$menu)
        @$menu.bind 'click', => @$placeholder.trigger arguments...

      @$menu.bind
        menuselect: @close
        popupopen: @onOpen
        popupclose: @onClose


    open: ->
      @$menu.popup 'open'

    select: (e, ui) =>
      if e.originalEvent?.type != "click" && $target = $(ui.item).find('a')
        $target.trigger('click')
        window.location = $target.attr('href')
      @$menu.popup('close').removeClass "ui-state-open"

    onClose: =>
