title: jQuery colorbox. Custom closing animation
body: <p>I wanted to override default animation of colorbox popup. I've easily managed to slide it out from any position on the page, that creates an illusion that it's poping out from inside an element, and user can see where the data is coming from.</p>
  
  <pre><code>   onOpen: function () {
              $('#colorbox').css({ 'left': $(element).offset().left + 'px', 'top': $(element).offset().top + 'px' });
          }
  </code></pre>
  
  <p>Now, it works when it gets opened. At closing time it just fades out. But I want it disappear the same way as it opens. I'm trying to put something like this into onCleanup:</p>
  
  <pre><code>onCleanup: function () {
              $('#colorbox').animate({ 'left': $(element).offset().left + 'px', 'top': $(element).offset().top + 'px', width: '0px', height: '0px' }, { queue: false });
  
          }
  </code></pre>
  
  <p>but it doesn't work. It still just fades out. Help me please.</p>