title: Closing only particular FancyBox when having multiple Fancybox
body: <p>In a given page, I have multiple instances of Fancybox items that will show up an video when clicked on a link.</p>
  
  <p>Apart from those, I have a function running every 5 seconds to get data from a URL and display another fancybox based on the return value.</p>
  
  <p>The problem is that, as the setInterval function runs always, even if the actual video is played, it closes that video as I use $.fancybox.close().</p>
  
  <p>All I wanted is to close only the fanybox identified by myModal. </p>
  
  <p>This is the jQuery that I use.</p>
  
  <pre><code>$(document).ready(function() {           
  
      function myplugin() {             
           $.getJSON("get-status.php", function (data) {                        
               $.each(data, function (key, status) {   
                   if(status &gt; 0) {
                      $("#myModal").fancybox().click();
                   }else{
                      $.fancybox.close(); // Works. But closes other open Fancybox if any
                      //$("#myModal").fancybox().close();    // Does not work
                   }
               });       
          });  
      };
  
      $(function() {
         setInterval(function() { myplugin() }, 5000);
      });
  });
  </code></pre>