 		else if typeof tab is "string"
 			obj = @getTab(tab)
 		if obj
+
 			if @get("currentTab") is obj
 
 				tabDom = obj._dom;

			unless contentContainer
				contentContainer = @_getTabContentDom(obj)
			obj.remove()
			$(contentContainer).remove() if contentContainer?.parentNode is @_doms.contents
		@refreshNavButtons()
		return true


		dom = tab.getDom()
		if dom.parentNode isnt container
			container.appendChild(dom)
		contentDom = tab.getContentDom()

		if not contentDom?.parentNode
			d = $.xCreate({
				tagName: "content",
				name: tab.get("name")
			})
			tab.set("contentContainer", d)
			@getContentsContainer().appendChild(d)
			d.appendChild(contentDom)

		return

	addTab: (tab)->
		if tab.constructor == Object::constructor
			tab = new cola.TabButton(tab)
		tab.set("parent", @)

		@_tabRender(tab)if @_dom
		@refreshNavButtons()

		return tab

	getTab: (index)->
		tabs = @getTabsContainer()
		tabButtonDom = null

		if typeof index == "string"
			$tabDom = $(tabs).find(">tab[name='" + index + "']")
			if $tabDom.length > 0
				tabButtonDom = $tabDom[0]

		else if typeof index == "number"
			$tabDom = $(tabs).find(">tab")
			if index < $tabDom.length
				tabButtonDom = $tabDom[index]
		else if index instanceof cola.TabButton
			return index
		if tabButtonDom
			return cola.widget(tabButtonDom)

		return null

	removeTab: (tab)->
		if tab instanceof cola.TabButton
