I have the following script which gets the index of the selected tab:
http://jsfiddle.net/oshirowanen/eWncA/
Is it possible to get the id instead, if the li's had id's. If it is easier to get it from elsewhere, then that would also be fine, i.e. the related div tags, or somewhere else.