Best way to find the current URL of a jQuery UI tab?

Best way to find the current URL of a jQuery UI tab?


Is there a recommended way to discover the current URL of a jQuery UI
tab? Right now I'm doing the following, and it looks really fragile:
var menu = $('#main_menu');
...
var a = $('a', menu).eq(index)[0];
var currURL = $.data(a, 'load.tabs');
This wouldn't be a problem, but I'm trying to change the content
(thus, the URL) of some tabs on the fly, _and_ I'm trying to integrate
it all with jquery.history.js. When using the back button, I need to
check the current URL for a tab to make sure it differs from the URL
which I want to load into the tab; otherwise I'll get an infinite
reload loop.
Thanks for any advice. Apologies if my ramblings are unintelligible.
--
Mitch