jQuery Gallery - Why does the large image open in another window?
<p>I have a simple jQuery gallery here: <a href="http://encoreazalea.com/ee/the-collection/in-the-landscape" rel="nofollow">http://encoreazalea.com/ee/the-collection/in-the-landscape</a></p>

<p>When you click on one of the thumbnails the larger image is supposed to display to the left in the preview image area. However, it opens in another window.</p>

<p>Here is the HTML:</p>

<pre><code>&lt;div id="preview"&gt;
&lt;img id="photo_large" src="http://encoreazalea.com/ee/landscape-gallery/landscape16.jpg" class="gallery" alt="photo gallery" /&gt;
&lt;img id="photo_large" src="http://encoreazalea.com/ee/landscape-gallery/landscape15.jpg" class="gallery" alt="photo gallery" /&gt;
&lt;img id="photo_large" src="http://encoreazalea.com/ee/landscape-gallery/landscape14.jpg" class="gallery" alt="photo gallery" /&gt;
&lt;img id="photo_large" src="http://encoreazalea.com/ee/landscape-gallery/landscape12.jpg" class="gallery" alt="photo gallery" /&gt;
&lt;img id="photo_large" src="http://encoreazalea.com/ee/landscape-gallery/landscape13.jpg" class="gallery" alt="photo gallery" /&gt;
&lt;img id="photo_large" src="http://encoreazalea.com/ee/landscape-gallery/landscape11.jpg" class="gallery" alt="photo gallery" /&gt;
&lt;img id="photo_large" src="http://encoreazalea.com/ee/landscape-gallery/landscape10.jpg" class="gallery" alt="photo gallery" /&gt;
&lt;img id="photo_large" src="http://encoreazalea.com/ee/landscape-gallery/landscape9.jpg" class="gallery" alt="photo gallery" /&gt;
&lt;img id="photo_large" src="http://encoreazalea.com/ee/landscape-gallery/landscape8.jpg" class="gallery" alt="photo gallery" /&gt;
&lt;img id="photo_large" src="http://encoreazalea.com/ee/landscape-gallery/landscape6.jpg" class="gallery" alt="photo gallery" /&gt;
&lt;img id="photo_large" src="http://encoreazalea.com/ee/landscape-gallery/landscape7.jpg" class="gallery" alt="photo gallery" /&gt;
&lt;img id="photo_large" src="http://encoreazalea.com/ee/landscape-gallery/landscape5.jpg" class="gallery" alt="photo gallery" /&gt;
&lt;/div&gt;

&lt;/div&gt;&lt;!-- end #content-hub --&gt;

&lt;div id="sidebar"&gt;
&lt;a href="http://encoreazalea.com/ee/landscape-gallery/landscape16.jpg" title="Landscape16"&gt;&lt;img class="gallery" src="http://encoreazalea.com/ee/landscape-gallery/landscape16_tn.jpg" alt="photo gallery"  /&gt;&lt;/a&gt;
&lt;a href="http://encoreazalea.com/ee/landscape-gallery/landscape15.jpg" title="Landscape15"&gt;&lt;img class="gallery" src="http://encoreazalea.com/ee/landscape-gallery/landscape15_tn.jpg" alt="photo gallery"  /&gt;&lt;/a&gt;
&lt;a href="http://encoreazalea.com/ee/landscape-gallery/landscape14.jpg" title="Landscape14"&gt;&lt;img class="gallery" src="http://encoreazalea.com/ee/landscape-gallery/landscape14_tn.jpg" alt="photo gallery"  /&gt;&lt;/a&gt;
&lt;a href="http://encoreazalea.com/ee/landscape-gallery/landscape12.jpg" title="Landscape12"&gt;&lt;img class="gallery" src="http://encoreazalea.com/ee/landscape-gallery/landscape12_tn.jpg" alt="photo gallery"  /&gt;&lt;/a&gt;
&lt;a href="http://encoreazalea.com/ee/landscape-gallery/landscape13.jpg" title="Landscape13"&gt;&lt;img class="gallery" src="http://encoreazalea.com/ee/landscape-gallery/landscape13_tn.jpg" alt="photo gallery"  /&gt;&lt;/a&gt;
&lt;a href="http://encoreazalea.com/ee/landscape-gallery/landscape11.jpg" title="Landscape11"&gt;&lt;img class="gallery" src="http://encoreazalea.com/ee/landscape-gallery/landscape11_tn.jpg" alt="photo gallery"  /&gt;&lt;/a&gt;
&lt;a href="http://encoreazalea.com/ee/landscape-gallery/landscape10.jpg" title="Landscape10"&gt;&lt;img class="gallery" src="http://encoreazalea.com/ee/landscape-gallery/landscape10_tn.jpg" alt="photo gallery"  /&gt;&lt;/a&gt;
&lt;a href="http://encoreazalea.com/ee/landscape-gallery/landscape9.jpg" title="Landscape9"&gt;&lt;img class="gallery" src="http://encoreazalea.com/ee/landscape-gallery/landscape9_tn.jpg" alt="photo gallery"  /&gt;&lt;/a&gt;
&lt;a href="http://encoreazalea.com/ee/landscape-gallery/landscape8.jpg" title="Landscape8"&gt;&lt;img class="gallery" src="http://encoreazalea.com/ee/landscape-gallery/landscape8_tn.jpg" alt="photo gallery"  /&gt;&lt;/a&gt;
&lt;a href="http://encoreazalea.com/ee/landscape-gallery/landscape6.jpg" title="Landscape6"&gt;&lt;img class="gallery" src="http://encoreazalea.com/ee/landscape-gallery/landscape6_tn.jpg" alt="photo gallery"  /&gt;&lt;/a&gt;
&lt;a href="http://encoreazalea.com/ee/landscape-gallery/landscape7.jpg" title="Landscape7"&gt;&lt;img class="gallery" src="http://encoreazalea.com/ee/landscape-gallery/landscape7_tn.jpg" alt="photo gallery"  /&gt;&lt;/a&gt;
&lt;a href="http://encoreazalea.com/ee/landscape-gallery/landscape5.jpg" title="Landscape5"&gt;&lt;img class="gallery" src="http://encoreazalea.com/ee/landscape-gallery/landscape5_tn.jpg" alt="photo gallery"  /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;!-- end #sidebar --&gt;
</code></pre>

<p>Here is the jQuery:</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function() {
    $("a:has(img.gallery)").click(function() {
        var largePath = $(this).attr("href");
        var caption = $(this).attr("title");
        $("#photo_large").attr({ src: largePath});
        $("#caption1").text(caption);
        return false;
    });
});

&lt;/script&gt;
</code></pre>

<p>I could use some eyes with a better prescription to look at this and help me see what I am missing.</p>

<p>Thanks.</p>
