title: How to open a fancybox from an gInfowindow link
body: <p>I am using google maps API V2 and i need to open a fancybox, from within an infowindow. 
  I tried this(but didnt work):</p>
  
  <pre><code>    GEvent.addListener(marker1, "click", function() {
          var cnt = '&lt;div&gt; &lt;a id="fancybox" href="http://www.google.com/"&gt;Link&lt;/a&gt;&lt;/div&gt;';  
      marker1.openInfoWindowHtml(cnt);  
  
      });  
  </code></pre>
  
  <p>I dont understand why it does not work, because when i do the same but not as a parameter(just in a link somewhere in the page), it works:</p>
  
  <pre><code> &lt;a id="fancybox" href="fancybox/example/1_b.jpg"&gt;&lt;img src="fancybox/example/1_s.jpg" alt=""/&gt;&lt;/a&gt;
  </code></pre>
  
  <p>To add the fancy box plugin i use this:</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="fancybox/fancybox/jquery.fancybox-1.3.4.pack.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="fancybox/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" /&gt;
  &lt;script type="text/javascript"&gt;
  $(document).ready(function() {
      $("a#fancybox").fancybox();
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>So as you see, the problem is that when calling the fancy box, from within <strong>openInfoWindowHtml()</strong>, it doesnt work.</p>
  
  <p>Ill appreciate some help.</p>
  
  <hr>
  
  <p>map is now on the link: <a href="http://joostudio.info/test/" rel="nofollow">http://joostudio.info/test/</a></p>
  
  <p>As you can see, from bottom image fancybox works just fine but when I call it from map infowindow it jus doesn't work.</p>
  
  <p>Here is complete page source code</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
  &lt;meta charset=utf-8&gt;
  &lt;title&gt;test&lt;/title&gt;
  &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="fancybox/fancybox/jquery.fancybox-1.3.4.pack.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="fancybox/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" /&gt;
  &lt;script type="text/javascript"&gt;
  $(document).ready(function() {
      $("a#fb").fancybox();
  });
  &lt;/script&gt;
  &lt;script src="http://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"&gt;&lt;/script&gt; 
  &lt;script type="text/javascript"&gt;
  var map;
  
  function runmap() {
  
          var myLatlng = new google.maps.LatLng(43.154541,19.12315);
  
          var myOptions = {
          zoom: 10,
          center: myLatlng,
          mapTypeId: google.maps.MapTypeId.ROADMAP
          };
  
          map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);
  
          var infowindow = new google.maps.InfoWindow({});
  
          var marker1 = new google.maps.Marker({
              map: map,
              position: new google.maps.LatLng(43.145086,19.090633),
          });
  
          google.maps.event.addListener(marker1, "click", function () {
              infowindow.setContent('&lt;a class="fb" href="fancybox/example/1_b.jpg"&gt;&lt;img src="fancybox/example/1_s.jpg" alt=""/&gt;&lt;/a&gt;');
              infowindow.open(map, marker1);
          });
  
  }
  &lt;/script&gt;
  
  &lt;/head&gt;
  
  &lt;body onload="runmap()"&gt;
  &lt;div id="map_canvas" style="width: 972px; height: 500px"&gt;&lt;/div&gt;
  &lt;/br&gt;
  &lt;a id="fb" href="fancybox/example/1_b.jpg"&gt;&lt;img src="fancybox/example/1_s.jpg" alt=""/&gt;&lt;/a&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>How can I simply call fancybox from google maps v3 marker?</p>
  
  <p>Thanks a lot</p>