wiki: jQuery UI Tabs [DE]
... and have a closer look to the snippet "Sorting of (template) areas" for the cps: "tabs", "image <div>" and "image special".
(The condition for processing head (title/register) and content separately).
e.g. using the simple standard template: