title: jQuery how to set first tab active?
body: <pre><code> $( '#xxx' ).tabs({
  select: function(event, ui) { 
  var theSelectedTab2 = ui.index;
  
  if (theSelectedTab2  == 0) {
  $('ul li.ep_s1').removeClass('ep_s1').addClass('ep_s-click1');
  if ($('ul li#h13').hasClass('ep_l-click1')) {
     $('ul li#h13').removeClass('ep_l-click1').addClass('ep_l1');
  }}
  else if (theSelectedTab2  == 1 ) {
  $('ul li.ep_l1').removeClass('ep_l1').addClass('ep_l-click1');
  if ($('ul li#h12').hasClass('ep_sidebar_friends-click1')) {
     $('ul li#h12').removeClass('ep_s-click1').addClass('ep_s1');
  }}
   }
  }); 
  </code></pre>
  
  <p>if i use <code>selected: 0</code> it will set up the first tab as active but it will now go through the <code>if (theSelectedTab2  == 0)</code> statement and go through adding those classes. </p>
  
  <p>if after the page loads i click on those tabs the script works perfect.</p>
  
  <p>basically i want when the page loads the <code>if (theSelectedTab2  == 0)</code> statement and everything that happens inside it to be active.</p>
  
  <p>thanks</p>