jQuery UI Closable Tabs
The closable tabs are created by simply adding a few special classes combined with a unique tabs configuration object. When all tabs except one are closed, the tab bar is hidden. When a new tab is added, the tab bar is shown.

The tab configuration and custom css can be viewed in the source. Closable tabs do not work with tabs created from existing markup.

Added Dynamically