So after some more searching online and some trial and error, I found this works perfectly for me.
var tab_idx;
function getSelectedTabIndex() {
return jQuery("#tabs").tabs('option', 'active');
}
tab_idx = getSelectedTabIndex();