jQuery Nested Tabs useing

jQuery Nested Tabs useing

Hi!

I'm newbie in useing jQuery. I have a problem with Tabs. I have elements with same ID's on two different tabs. For example datepicker input fields. But when I clicked on the second tab's datepicker input field the first tab's filled out.
It is suggested to use elements by different ID-s on a whole page?
Or it is possible to delete the last selected tabs content when I clicked to another one? How?
I use the following code:

 $("#tabs,#sub-container-1,#sub-container-2").tabs({
  select: function(e,ui) {
   previousIndex=ui.index;
   $("#ui-tabs-"+previousIndex).empty();
 });

This is the right to do this?

Thanks for helping.
BR,
 Sanyi