Tab Switching with 2 Button States

Tab Switching with 2 Button States

I hope I'm posting in the right place. I looking to create an image banner rotater with tabs switching the images.  On first click of a tab, I'm looking for the function to switch to that tab's associated image.  After the image is active, the next time you click on that same tab, it would kick you to some URL within the site.

It would function like on the Yahoo! homepage: the tab box with NEWS | WORLD | LOCAL | FINANCE

Does anyone know of an existing jQuery function to do this?