 
         return true
 
-      $(document).on "click", (event) ->
+      angular.element(document).bind "click", (event) ->
         if $menuScope.items.length > 0
           $scope.$apply -> reset()
 


        reset()

      element.on "keydown", (event) ->
        switch event.which
          when keys.DOWN
            $scope.$apply ->

      if inside
        element.after $compile(menuEl) $menuScope
      else
        angular.element(document.body).append $compile(menuEl) $menuScope

      #
      # @event
