uncaught exception: cannot call methods on tabs prior to initialization
Its pretty straight forward as the exception says. Your tabs must be initialized before you can work on them. So initialize them.
function(){
$("ul.tabs").tabs();
}
or simply by using
$("ul.tabs").tabs().tabs($("div.panes > div"), action);
I don't know what do you expect to get using this code, but it's wrong.
You shouldn't pass selector as an attribute for .tabs()
method.
Look at the jQuery UI Tabs API for how to use it.