title: fancybox.open is undefined but loading from console I can open it?
body: <p>My fancybox integration struggles continue....but I am making progress. My page loads and I see no errors in the debug console. When I click my button that should open fancybox I get...</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'open' of undefined.
  </code></pre>
  
  <p>I had this error yesterday but then I couldn't access fancybox from the console either.</p>
  
  <p>I improved how my scripts are injected into the header and...I still get the error on my click event.</p>
  
  <p><strong>BUT</strong></p>
  
  <p>now I can load fancybox from the console and it works great. So I'm figuring I'm just not referencing something correctly for my click event to see it.</p>
  
  <p>In my click handler I do this...</p>
  
  <pre><code>$.fancybox.open((....});
  and I get the undefined error.
  </code></pre>
  
  <p>at the console I do the same thing...</p>
  
  <pre><code>$.fancybox.open((....});
  </code></pre>
  
  <p>and it works??</p>
  
  <p>So I thought I'd check and see if my click handler could even see the fancybox object. I added this to my event handler.</p>
  
  <pre><code>var fncy = $.fancybox;
  </code></pre>
  
  <p>set a breakpoint and it is undefined. So I am at a loss as to why my event handler can't see fancy box but the console can....</p>
  
  <p>Just to clarify again the event handler is NOT firing until the user clicks a button so it seems to me that the fancy box scripts etc. have all loaded no??</p>
  
  <p>Very grateful for any light that can be shed.</p>
  
  <p>JB</p>
  
  <hr>
  
  <p>@Dave Yes I have doc ready call as...</p>
  
  <pre><code>$(document).ready(function ()
  {
     $('.fncy').fancybox();
  });
  </code></pre>
  
  <p>This is my html element...</p>
  
  <pre><code>&lt;div&gt;&lt;span class="fncy"&gt;&lt;/span&gt;&lt;/div&gt;
  </code></pre>
  
  <p>When I query this element in the console I get...</p>
  
  <pre><code>$('.fncy')
  []
  </code></pre>
  
  <p>when I query an object in the demo page...</p>
  
  <pre><code>$('.various')
  [
   &lt;a class=​"various fancybox.ajax".....&gt;a bunch of elements
  ]
  </code></pre>
  
  <p>Is  a bad choice to bind fancybox to?</p>