jQuery UI tabs controlled by a list problem.

jQuery UI tabs controlled by a list problem.

I am using jQuery 1.4.2 and jQueryUI 1.8.2.
A standard 2 column layout is set up (nav and content).
I have a left hand navigation of possible items to open in tabs. The right column is tabs.

<ol id="menu">
<li value="8"><a href="#">Item 1</a></li>
<li value="15"><a href="#">Item 2</a></li>
</ol>

I have those popping the tab content by:
$('#menu').children().click(function(){
$(this).toggleClass("selected").siblings().removeClass("selected");
if($(this).hasClass("selected")){
load_project($(this).attr('value'), $(this).text());
}else{
//unselected
}
});
function load_project(val, pname){
projects = tabs.children('ul').text();

if(projects.match(pname)){
//tabs.children('ul').children('li').children('a').children('span');
      //already open
      }else{
tabs.tabs("add", "ajax/load_project.php?id="+val, pname);
}
}


The solution I want:
When selecting an already open item, to refocus the item. If the item already open, it will not be added, code above prevents.

I am trying to get the index of the tab by using jQuery, but I'm new to jQuery. I can get a list of the items, but do not know how to parse the objects for an index.
With the indx i am planning to use the jQuery UI api for tabs and the select method.
I am trying to apply a string comparison to achieve this...

Something like:
if( $('myobjects').text() == item_name) return index_num;

The above is obviously not correct.
Is there an elegant way to do this?