       parent.children('.menu-item').children("input[name$='[rgt]']").val(rgt)
 
       rgt + 1
+
 
   $.fn.extend effectiveMenuEditor: (option, args...) ->
     @each ->

        event.stopPropagation()

      @menu.on 'dragover', 'li', (event) =>
        return false unless @draggable

        node = $(event.currentTarget)

        if (node.hasClass('dropdown') || node.hasClass('dropdown-submenu')) && !node.hasClass('open') # This is a menu, expand it
          @menu.find('.open').removeClass('open')
          node.parentsUntil(@menu, 'li').andSelf().addClass('open')
        else
          event.preventDefault()

        # If I don't have the placeholder class already
        if node.hasClass('placeholder') == false

        node.before(event.originalEvent.dataTransfer.getData('text/html'))

        @menu.removeClass('dragging').find('.placeholder').removeClass('placeholder')
        @menu.find('.effective-menu-expand').remove()
        @menu.find('.open').removeClass('open')
        node.parentsUntil(@menu, 'li').addClass('open')

        @draggable.remove() if @draggable
        @draggable = null
        @droppable = null

        event.stopPropagation()
        event.preventDefault()

    convertToDropdown: (node) ->
      return false if node.hasClass('dropdown') || node.hasClass('effective-menu-expand') #|| node.children('.expand').length > 0

      node.append(@menu.data('effective-menu-expand-html'))
      node.addClass('dropdown').addClass('open')
      console.log node.children('a')

      node.children('a').attr('data-toggle', 'dropdown')


    serialize: (retval) ->

