title: FancyBox 'Uncaught TypeError: Cannot call method 'hide' of undefined'
body: <p>I've been screwing around with fancybox. I work in the CakePHP Framework and I made an admin panel. This panel has a few options which I load via AJAX into an Div over the page itself.</p>
  
  <p>Now when I put an image in this div and try to use Fancybox I get this error when I click on a image (to enlarge it):</p>
  
  <pre><code>Uncaught TypeError: Cannot call method 'hide' of undefined
  N
  I
  b.fn.fancybox
  f.event.dispatch
  f.event.add.h.handle.i
  </code></pre>
  
  <p>Now this is my ajax loader (functions.js) </p>
  
  <pre><code>$(".cmsPage").click(function() {
      var url = $(this).attr("href");
  
      $.ajax({
          url: url,
          success: function(data){
              $("#admin_wrapper").fadeIn('slow');
              $("#admin_content").fadeIn('slow');
              $("#admin_close").fadeIn('slow');
              $("#admin_content").html(data);
  
          }
      });
      return false;
  });
  </code></pre>
  
  <p>admin_content is where the images are displayed:</p>
  
  <pre><code>#admin_content{
      display:none;
      position:absolute;
      z-index:10;
      background-color:#fff;
      opacity:1;
      width:1000px;
      min-height:500px;
      top:1%;
      color:black;
      padding:10px;
      margin:10px;
      border:solid black 1px;
      border-radius:5px;          
  }
  </code></pre>
  
  <p>But if I go to the page itself (without using ajax) it works perfectly fine.</p>
  
  <p>Is there something that overrules fancybox? The error is not that clear to me. I tried everything <a href="http://groups.google.com/group/fancybox/tree/browse_frm/month/2010-08/c43fd9a7b7ff8774?rnum=141&amp;_done=%2Fgroup%2Ffancybox%2Fbrowse_frm%2Fmonth%2F2010-08%3Ffwc%3D1%26" rel="nofollow noreferrer">in here</a> But I am not using wordpress.</p>