Jquery perform click on <img>
<p>I am working with an external JavaScript plugin that I can not edit and works by click on the a list of thumbnail images. </p>

<p>For styling purpose I have had to wrap the images in an <code>&lt;a&gt;</code> with:</p>

<pre><code>if(img.parent("a").length == 0){
    img.wrap('&lt;a /&gt;');
}
</code></pre>

<p>Is there a way I can add a click for the <code>&lt;a&gt;</code> I have inserted which then makes this JavaScript plugin call the actions for click on a image. </p>

<p>I have tried this although doesn't work and gives the error: <code>Too much recursion</code>:</p>

<pre><code>$("#thumbs a").live("click", function(){
    $(this).find("img").click();
});
</code></pre>
