I'm using thickbox to make an overlay on my homepage and category pages. I have a random number of posts pulled into each of these pages. i am calling thickbox on the li.post element with the following settings
<a href="<?php the_permalink() ?>?KeepThis=true&height=450&width=805&modal=true" title="<?php printf(__('%s', 'veryplaintxt'), wp_specialchars(get_the_title(), 1)) ?>" class="thickbox">
and using the Q2W3 plugin to call thickbox.
The problem is that when i click on one of the posts the first time, everything seems to work fine. If i then close the page and click on another post, the main overlay loads ok but i get the TB_Title and TB_AjaxContent boxes repeating once with the first AjaxContent box containing the content and the second TB_Title and AjaxContent box underneath it blank.
If I close this and open another I get 4 boxes, next time 16 and so on.
Obviously the script is being called several times but I can't think why, except that the window being called into the AjaxContent box is the single.php template which also calls the same header scripts as the main window thus calling thickbox again within it. I haven't tested it by removing the header from single.php yet as I wondered if there's a way of disabling it another way and not having to rewrite a new header.
Is this indeed the problem or is it something else. I read somewhere else that I could alter the init but i don't want to be hacking at the core
Any help greatly appreciated as I'm running out of time