title: fancybox opening on refresh not click
body: <p>I've been sitting for days going through blogs, code, forum anything that would help me solve the problem.</p>
  
  <p>What I'm trying to do is show a thum image on a page with a summary of information, that on click a bigger image opens in fancybox.</p>
  
  <p>But I have all images in a mysql database and a php page that calls them, here's the code and scripts I'm using.</p>
  
  <pre><code>&lt;script type="text/javascript" src="../lib/jquery-1.10.1.min.js"&gt;&lt;/script&gt;
  &lt;!-- Add fancyBox main JS and CSS files --&gt;
  &lt;script type="text/javascript" src="../source/jquery.fancybox.js?v=2.1.5"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" type="text/css" href="../source/jquery.fancybox.css?v=2.1.5" media="screen" /&gt;
  
  &lt;script type="text/javascript"&gt;
  $(document).ready(function() {
  $.fancybox({ href: "/images/big_pic.php?id=905", type: "image"})
  });
  &lt;/script&gt;
  
  &lt;a class="fancybox" rel="group" href="/images/big_pic.php?id=905"&gt;&lt;img src="h/images/small_pic.php?id=905" alt="" /&gt;&lt;/a&gt;
  </code></pre>
  
  <p>I have the thumb showing and on page refresh it goes to the fancybox, but on click goes to the /images/big_pic.php?id=905.</p>
  
  <p>I am wanting to use fancybox on several sites and want to buy the licence, but there's no point in buying it if it won't work! Going absolutely nuts with this. </p>
  
  <p>Hoping someone can help me.</p>