I think you would be more likely to receive a usefull answer to this in the Templates forum. But changing the style of the tab when clicked setting CSS attribute display to none on active tab and setting the same attribute to [empty string] on the tab should be displayed should help you along.