jQuery: click() function doesn't work with PrettyPhoto
<p>I am using PrettyPhoto in a website. It shows an inline content when you click an image.</p>

<pre><code>&lt;a href="#verObra" rel="prettyPhoto"&gt;Work name.&lt;/a&gt;
</code></pre>

<p>The inline content to show is:</p>

<pre><code>&lt;div id="verObra1" class="verObra"&gt;
    &lt;div class="galObra"&gt;
        &lt;div id="imgAmpliada"&gt;
            &lt;img src="images/showObra.jpg" alt="" /&gt;
        &lt;/div&gt;&lt;!-- /#Ampliada --&gt;

        &lt;ul class="thumbs"&gt;
            &lt;li&gt;&lt;a href="#" rel="prettyPhoto[pp_gal]"&gt;&lt;img src="images/thumb.jpg" alt=""/&gt;&lt;/a&gt;
            &lt;li&gt;&lt;a href="#" rel="prettyPhoto[pp_gal]"&gt;&lt;img src="images/thumb.jpg" alt=""/&gt;&lt;/a&gt;
        &lt;/ul&gt;
    &lt;/div&gt;&lt;!-- /.galObra --&gt;
         &lt;div class="descObra"&gt;
             &lt;h3&gt;Titulo de la obra&lt;/h3&gt;
             &lt;p&gt;The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains.&lt;/p&gt;
         &lt;/div&gt;&lt;!-- /.descObra --&gt;
&lt;/div&gt;&lt;!-- /#VerObra1 --&gt;
</code></pre>

<p>I want that when you click in a thumbnail (.thumbs li a) in the modal window, it changes the above image (#imgAmpliada img). I've tried with this code, but nothing:</p>

<pre><code>$(function() {
    $(".thumbs li a").click(function() {
        var image = $(this).attr("rel");
        $('#imgAmpliada').hide();
        $('#imgAmpliada').fadeIn('slow');
        $('#imgAmpliada').html('&lt;img src="' + image + '"/&gt;');
        return false;
    });
});

$("a[rel^='prettyPhoto']").prettyPhoto({show_title: false, default_width: 800});
</code></pre>

<p>Please, could someone explain me why it is not working? Thanks!</p>
