Check out the Ext javascript library.

Tab demo is here.

It can take your existing divs and render them into a tab panel with just a few linkes of javascript. Example:

Code:
var tabs = new Ext.TabPanel({
    applyTo: 'my-tabs',
    activeTab: 0,
    deferredRender: false,
    autoTabs: true
});

// This markup will be converted to a TabPanel from the code above
<div id="my-tabs">
    <div class="x-tab" title="Tab 1">A simple tab</div>
    <div class="x-tab" title="Tab 2">Another one</div>
</div>
_________________________
~ John