Thanks for this fantasic mod!
I have it working except for the jQuery side.
When I check a compare box, the javascript fires (I have tested this with an alert) but the product image doesn't appear in the compare box at the top of the screen. The 'compare' button doesn't show at the top of the screen either.
However, if I refresh the page, the products do appear in the box so something behind the scenes is working.

Has anybody any ideas what is going wrong?