title: how to check if fancybox exists on page already
body: <p>I am trying to check if a fancybox has been loaded already. If so then I run an ajax script to put content inside.</p>
  
  <p>If not I open a fancybox iframe and it fetches content.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>if ($('div#fancybox-frame:empty').length &gt;0) { 
      alert('it is empty');
  
  $.fancybox({
     'width': '80%',
      'height': '80%',
      'autoScale': true,
      'transitionIn': 'fade',
      'transitionOut': 'fade',   
      'type': 'iframe', 
      'href': '/show_photo'
  });
   }
   else{
      alert('it is full');   
      $.ajax({
          type: "GET",
          url: "/show_photo",
          success: function(data){
          cropping_arrived();
          }
      });
    }
  });
  </code></pre>
  
  <p>It always returns that it is full even when I know there is not fancybox open.</p>
  
  <p>Any ideas?</p>