     a.appendTo(li)
     li.appendTo(ul)
 
-
     panel = $('<div/>')
     panel.appendTo( @el ).addClass('tab-content')
     @tabPanels[ tabId ] = { handle: li, panel: panel, a: a }

      panel = self.el.find(selector)
      panel.addClass('tab-content')
      panel.hide()
      self.el.trigger('addtab', panel)

  hidePanels: -> @el.find('.tab-content').hide()


    a.click (e) =>
      @hidePanels()
      panel.show()
      @el.trigger('activatetab',[panel])
      return false

    cb panel if cb
