title: jQuery tools: open an Overlay manually with a function call?
body: <p>I have several "a"-tags on my page that trigger an overlay:</p>
  
  <pre><code>&lt;a href="prelevel.htm" rel="#overlay" id="lvl1" style="text-decoration:none"&gt;&lt;/a&gt;
  &lt;a href="prelevel.htm" rel="#overlay" id="lvl2" style="text-decoration:none"&gt;&lt;/a&gt;    
  </code></pre>
  
  <p>Now I want to open one of these overlays with a function-call.
  I tried several things and finally came to this solution:</p>
  
  <pre><code>function openOverlay(id){
      $("a[id=" + id + "]").overlay().load();
  }
  </code></pre>
  
  <p>This works but it seems that with the load() - function all the javascript code on my page is executed again and that causes the destruction of my user interface.</p>
  
  <p>I use this function to create my overlays:</p>
  
  <pre><code>$(function() {
        $("a[rel]").overlay({
          api : true,
          mask : '#DCDBDB',
          effect : 'apple',
          onBeforeLoad : function() {
                   var wrap = this.getOverlay().find(".contentWrap");
                       wrap.load(this.getTrigger().attr("href"));
              }
          });
  });
  </code></pre>
  
  <p>Any suggestions?</p>