jQuery onClick code only firing for first element
<p>I am finding trouble getting my thumbnails to open the larger images when clicked. It only seems to work with the first thumbnail, but I can't figure out why.</p>

<p>Here is the code I am working with:</p>

<pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery.cycle.all.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery.colorbox-min.js"&gt;&lt;/script&gt;

&lt;script type="text/javascript"&gt;    
$('#main ul:first-child').show();

$('#thumb li').click(function(){
    var navItem = $(this).index();
    $('#main ul').hide();
    $('#main ul:nth-child('+(navItem+1)+')').show();
    return false;
});

$('#main ul a').colorbox();

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

<p>Any help?? </p>
