title: jQuery UI Tabs not disposing of resources
body: <p>I have three pages, <code>admin.php</code>, <code>user_admin.php</code>, and <code>client_admin.php</code> with corresponding JS source files <code>admin.js</code>, <code>user_admin.js</code>, and <code>client_admin.js</code>, and I'm having a problem with jQuery UI's tabs not disposing of resources properly.</p>
  
  <p><code>admin.php</code> is a placeholder for <code>user_admin.php</code> and <code>client_admin.php</code>, where each one of those is set up as a tab that is loaded dynamically. Here is the body for <code>admin.php</code>:</p>
  
  <pre><code>&lt;body&gt;
      &lt;div id="tabs" style="width: 1000px; margin-left: auto; margin-right: auto;"&gt;
          &lt;ul&gt;
              &lt;li&gt;&lt;a href="user_admin.php"&gt;User Admin&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="client_admin.php"&gt;Client Admin&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
          &lt;div id="user_admin"&gt;
          &lt;/div&gt;
          &lt;div id="client_admin"&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>with the following code to initialize jQuery-UI tabs:</p>
  
  <pre><code>$( "#tabs" ).tabs(
  {
      cookie      : { expires: 9999 },
      cache       : false,
      ajaxOptions :
      {
          error : function( xhr, status, index, anchor )
          {
              $( anchor.hash ).html( "Error: could not load this tab" );
          }
      },
      show : function( event, ui )
      {
          previous_tab = ui.index;
          $( "#ui-tabs-" + previous_tab ).empty();
      }
  });
  </code></pre>
  
  <p>The problem lies in <code>user_admin.php</code>, where I'm including <code>colorbox</code> and attaching it to links (with href's to the page that I want to load) that pop up another page, as shown here:</p>
  
  <pre><code>$( '.modal' ).colorbox(
  {
      iframe          : true,
      slideshow       : false,
      title           : false,
      innerWidth      : 600,
      innerHeight     : 420,
      returnFocus     : false,
      slideshowStart  : "",
      slideshowStop   : "",
      current         : "",
      previous        : "",
      next            : "",
      close           : ""
  });
  </code></pre>
  
  <p>This works...however, if I try to click on the client admin tab, and come back to the user admin tab and click on a link that launches <code>colorbox</code> again, it will load <code>colorbox</code> twice, with the same content, and will keep stacking colorboxes every time I come back to the user admin tab.</p>
  
  <p>So, back to my point...how do I get jQuery UI to dump all of the resources including JS libaries of the current tab?</p>