title: $.fancybox.close(); close all instances
body: <p>I use fancybox for status information, f.e. after succesfull login appear a box with message and that box disappear after some time, the code looks:</p>
  
  <pre><code>&lt;a href="#status" id="click-status"&gt;&lt;/a&gt;
  &lt;div id="status" class="status"&gt;You were succesfully logged in&lt;/div&gt;
  &lt;script type="text/javascript"&gt;
  $("#click-status").fancybox({
  afterLoad  : function() { setTimeout("$.fancybox.close();", 4000); },
  helpers    : {
  overlay    : null
                 }
  }).trigger("click");
  </code></pre>
  
  <p>then on the site I check some information about user and if a user has not actived account, then appear new fancybox in iframe (I do not see the firt one that is ok), where is written: please active your account, settiemout is not defined. The code looks:</p>
  
  <pre><code>&lt;a id="box-inactive-user" href="box-inactive-user.php"&gt;&lt;/a&gt;
  $(document).ready(function(){
  $("#box-inactive-user").fancybox({
  "type" : "iframe",
  }).trigger('click');
  });
  </code></pre>
  
  <p>and now the problem: the function </p>
  
  <pre><code>afterLoad  : function() { setTimeout("$.fancybox.close();", 4000); }
  </code></pre>
  
  <p>defined in first instance close all two instances! I do not want first instance hide all other fancybox instances. Is there a way, that fancybox code close only the instance in which is defined?</p>
  
  <p>Thanks for solution</p>