title: jQuery tools: How to close an overlay?
body: <p>I have an edit form that I'm displaying as an overlay using Jquery Tools.</p>
  
  <p>On my object list view page, each object has <code>&lt;a href="#" class="edit_button"&gt;Edit&lt;/a&gt;</code>. All of these are attached to the same overlay form with:</p>
  
  <pre><code>        $(".edit_button[rel]").overlay({ top: '5px',
              fixed: false,
  
              mask: {
                  color: '#ebecff',
                  loadSpeed: 200,
                  opacity: 0.9
              }
          });
  </code></pre>
  
  <p>The edit form overlay contains a cancel button:</p>
  
  <pre><code>&lt;a href="#" class="cancel"&gt;Cancel&lt;/a&gt;
  </code></pre>
  
  <p>How can I make this cancel button close the overlay? It seems that the only way I can get access to the Overlay API object is to use the selector that created it - in this case <code>$('.edit').each()</code> since I don't know which one triggered the overlay. </p>
  
  <p>What I really want to do is something like:</p>
  
  <pre><code>$('.cancel').click(function(e){
      var target = e.originalTarget || e.srcElement;
      $(target).parent().parent().getOverlay().close();
  });
  </code></pre>
  
  <p>but this doesn't work.</p>
  
  <p>Is there any way I can close the overlay without doing:</p>
  
  <pre><code>$(".edit_button[rel]").each(function() {
      $(this).overlay().close();
  });
  </code></pre>
  
  <p>?</p>