click() not working as expected
<pre><code>$j('#carousel').jcarousel({
    vertical: true,
    scroll: 1,
    auto: 2,
    wrap: 'last',
    initCallback: mycarousel_initCallback
});
$j('div#slideshow-carousel a img').css({
    'opacity': '0.5'
});
$j('div#slideshow-carousel a img:first').css({
    'opacity': '1.0'
});
$j('div#slideshow-carousel li a').hover(
function () {
    if (!$j(this).has('span').length) {
        $j('div#slideshow-carousel li a img').stop(true, true).css({
            'opacity': '0.5'
        });
        $j(this).stop(true, true).children('img').css({
            'opacity': '1.0'
        });
    }
}, function () {
    $j('div#slideshow-carousel li a img').stop(true, true).css({
        'opacity': '0.5'
    });
    $j('div#slideshow-carousel li a').each(function () {
        if ($j(this).has('span').length) $j(this).children('img').css({
            'opacity': '1.0'
        });
    });
}).click(function () {
    $j('div#slideshow-main li').removeClass('active');
    $j('div#slideshow-main li.' + $j(this).attr('rel')).addClass('active');
    return false;
});
</code></pre>

<p>This simple carousel script works perfectly except the click part; nothing happens on clicking the thumbnails, they should be applied the 'active' class.</p>
