Jquery Lightbox and thumbnailviewer 2 problems

Jquery Lightbox and thumbnailviewer 2 problems

Hello,

I'm using Jquery lightbox to display images in the nice lightbox style, I'm also using thumbnailviewer 2 to switch between different colours of a product. I've modified a line in thumbnailviewier to insert the correct html to activate lightbox when the link is clicked.

But it doesn't work, it simply opens the image by itself as if it was a regular link, i belive i know why! but i don't know how to fix this.

Jquery Lightbox uses this script at the end of the page to load all class="lightbox" items into the gallery which is:

<script type="text/javascript">
$(function() {
   $('a.lightbox').lightBox(); // Select all links with lightbox class
});
</script>


When i hover over each thumbnail the image inside by preview div is changed by javascript, its missed out on the "lightbox" scan.

Is there a way to modify the lightbox function to repeatidly look for things with lightbox? or look when the document changes?

Sorry if this is a bit lacking in specific code for each item, but i can't show off the work as its still under wraps at the moment.

Thanks