title: FancyBox iframe returns parent.$ as undefined (using WordPress)
body: <p>I'm trying to close <a href="http://fancybox.net/" rel="noreferrer">FancyBox</a> from within the iframe, but <code>parent.$</code> is always <code>undefined</code>.
  This is my iframe JavaScript:</p>
  
  <pre><code> &lt;script type='text/javascript' 
    src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'&gt;
   &lt;/script&gt;
   &lt;script type="text/javascript"&gt;
   jQuery(document).ready(function($){
       (function($) {
           $.fn.closeFancyBox = function() {
               $(this).click(function() {
                   parent.$.fancybox.close();
               });
           };
        })(jQuery);
        $('#cancel').closeFancyBox();
        });
   });
   &lt;/script&gt;
  </code></pre>
  
  <p>Replacing <code>parent.$.fancybox.close();</code> with <code>alert('clicked');</code> works just fine. I don't understand why <code>parent.$</code> is <code>undefined</code> when the iframe is in the same domain.</p>
  
  <p>I'm using WordPress 2.9.1, with the FancyBox for Wordpress plugin.</p>
  
  <ul>
  <li>main page: <code>//server.local/web/test/index.php</code></li>
  <li>iframe page: <code>//server.local/web/test/wp-content/plugins/wp-test/test.htm</code></li>
  </ul>
  
  <p>The first of these urls is the main page, the second is the iframe page; <code>server.local</code> is my home test server.</p>
  
  <p>Any ideas? I can pastebin the entire source if it would be helpful.</p>