title: close fancy box from function from within open 'fancybox'
body: <p>Hi all i want to be able to close fancyBox when it is open from within.</p>
  
  <p>I have tried the following but to no avail:</p>
  
  <pre><code>function closeFancyBox(html){
      var re = /.*Element insert complete!.*/gi;
      if( html.search( re ) == 0 ){
          $.fancybox.close();
          //alert("foo");
      }
  }
  </code></pre>
  
  <p>foo will open in dialog but will not close down. any hints?</p>