title: Fancybox Recursion causes a stack overflow
body: <p>It seems that when I add an afterClose callback to my fancybox I'm getting this error:</p>
  
  <blockquote>
    <p>Uncaught RangeError: Maximum call stack size exceeded</p>
  </blockquote>
  
  <p>This is the code I am using:</p>
  
  <pre><code>$("a.termsLink").fancybox({
      type            : 'iframe', 
      fitToView       : false,
      width           : 450,
      height          : 600,
      afterClose  : function(){
          $('#regForm').click();
      }
  });
  </code></pre>
  
  <p>What is supposed to happen is when the termsLink box closes, the regForm is supposed to open. I've expiremented with differnt callbacks, but the issue that I am running into seems to be unaffected by this. </p>
  
  <p>The solution appears to be as follows: </p>
  
  <pre><code>    afterClose      : function(){
          setTimeout(function(){$('#regForm').click();}, 1);
      }
  </code></pre>
  
  <p>However that feels like a very hacky method to me, the issue seems to be that the fancybox code trys to call the new box while the animation for the other box is still running, which causes this issue. Is this a documented issue with FancyBox? Or is this a function of the way jQuery animation event work? Is there a more elegant solution to this issue?</p>