.tabs('select', index) problem

.tabs('select', index) problem


Hello,
I have a search interface on my page and I want to show search results
in a tab. When the search is performed for the first time, it works
fine - new tab appears and gets active. However, when i try to search
one more time, nothing happens, the tab with search results doesn't
get activated (search results get updated however). here's a sample
code:
if (searchPerformed == 0) {
$("#notebook").tabs("add", "/ajax/search?query=" + query,
"search results", 1);
} else {
$("#notebook").tabs("url", 1, "/ajax/search?query=" + query);
$("#notebook").tabs("load", 1);
}
$("#notebook").tabs("select", 1);
Any ideas what's wrong with that?