I have a small Javascript used to swap images using a href links. Everything is OK except when I call those a ref inside the page using Ajax. I need to find a way to initialize again the script after calling new links. Here is the JS:
<script type="text/javascript">
$('a.thumbnail').click(function(){ var src = $(this).attr('href');
if (src != $('img#largeImg').attr('src').replace(/\?(.*)/,'')){
    $('img#largeImg').stop().animate({
        opacity: '0'
    }, function(){
        $(this).attr('src', src+'?'+Math.floor(Math.random()*(10*100)));
    }).load(function(){
        $(this).stop().animate({
            opacity: '1'
        });
    });
}
return false;
});
Thank you