title: Using javascript/jquery scripts inside a colorbox window
body: <p>I'm using colorbox to preview products in a popup window but I'd also like to use <a href="http://www.professorcloud.com/mainsite/cloud-zoom.htm" rel="nofollow">Cloud Zoom</a> inside the colorbox.
  For some reason that I cant figure out, cloudzoom fails to work when inside the colorbox, works fine when it's called in a regular browser window. I searched a bit before posting but there's not much on those two scripts together. PERHAPS, I need to use onComplete:function() after the call to colorbox but I'm not sure how to do that.</p>
  
  <p>This is my code for the test page I've created where cloud zoom works fine  on the page but not when loaded to colorbox. Here's a <a href="http://db.tt/zn2MHUdY" rel="nofollow">link with all the files</a> (js, css) in case you want to try it out yourselves.</p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
  &lt;title&gt;Test page&lt;/title&gt;
  &lt;script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="./js/jquery.colorbox-min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="./js/cloud-zoom.1.0.2.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  $(document).ready(function() {
      $('a.items').colorbox({ width:"80%", height:"90%", href:function(){ return this.href + " #prodpreview"; }});
  });
  &lt;/script&gt;
  &lt;link rel="stylesheet" type="text/css" href="./css/cloud-zoom.css" /&gt;
  &lt;link rel="stylesheet" type="text/css" href="./css/colorbox.css" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;a href="test.php" class="items"&gt;Test&lt;/a&gt;
  
  &lt;div id="prodpreview" style="margin-top:20px;"&gt;
  &lt;a href="https://www.google.com/images/srpr/logo3w.png" class="cloud-zoom" id="zoom1" rel="position:'inside', showTitle: false, adjustX:-4, adjustY:-4" style="position:relative; display:block;"&gt;
  &lt;img src="https://www.google.com/images/srpr/logo3w.png" width="150"/&gt;
  &lt;/a&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>