title: Open prettyPhoto gallery using onclick?
body: <p>I am trying to open prettyPhoto from click event. 
  All goes perfect when it is one image, but I need to open a gallery. Pleassee help! </p>
  
  <p>Thanks in advance and sorry my bad english!!</p>
  
  <p>This is the code</p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;a href="http://domain.com/bigimage.jpg" onclick="return fancybox(this);&gt;&lt;img scr="http://domain.com/smallimage.jpg" /&gt;&lt;/a&gt;
  </code></pre>
  
  <p><strong>JSCode:</strong></p>
  
  <pre><code>function fancybox(elem) {
      elem = jQuery(elem);
      //elem = jQuery('#gallery_one img').attr('src');
  
      if (!elem.data("fancybox")) {
          elem.data("fancybox", true);
          elem.prettyPhoto({
               opacity:0.80,
               default_width:500,
               default_height:344,
               theme:'light_square'
          });
          elem.prettyPhoto().trigger('click');
          alert(elem);
      }
  return false; 
  }
  </code></pre>