This seems great. Thank you khebs for sharing. To test it quickly I used ykey's sample code.
Just to inform: In IE 9 the unselected tabs appear blue whereas they are white in other browsers.
Edit: The error message below is from a script of Roboform Firefox plugin. Maybe you want to investigate the reason. (rfhelper32.js (line 348))
Also when I change the tab in Firefox 6, firebug throws lots of same exception shown in the picture below. However this error doesn't appear in Chrome 14 console.