? .DS_Store
? .thickbox.js.swp
? my_busted_thickbox.js
Index: thickbox.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/thickbox/thickbox.js,v
retrieving revision 1.8.2.8
diff -u -p -r1.8.2.8 thickbox.js
--- thickbox.js	6 Nov 2008 18:53:17 -0000	1.8.2.8
+++ thickbox.js	8 Feb 2009 02:52:46 -0000
@@ -10,13 +10,7 @@
 
 // Initialize Thickbox.
 Drupal.behaviors.initThickbox = function (context) {
-  tb_init('a.thickbox, area.thickbox, input.thickbox'); // pass where to apply thickbox
-  imgLoader = new Image(); // preload image
-};
-
-//add thickbox to href & area elements that have a class of .thickbox
-function tb_init(domChunk) {
-  $(domChunk).click(function() {
+  $('a,area,input', context).filter('.thickbox:not(.initThickbox-processed)').addClass('initThickbox-processed').click(function() {
     var t = this.title || this.name || null;
     var a = this.href || this.alt;
     var g = this.rel || false;
@@ -24,7 +18,8 @@ function tb_init(domChunk) {
     this.blur();
     return false;
   });
-}
+  imgLoader = new Image(); // preload image
+};
 
 function tb_show(caption, url, imageGroup) { //function called when the user clicks on a thickbox link
 
@@ -268,7 +263,7 @@ function tb_show(caption, url, imageGrou
         $('#TB_ajaxContent').load(url += '&random=' + (new Date().getTime()),function() { //to do a post change this load method
           tb_position();
           $('#TB_load').remove();
-          tb_init('#TB_ajaxContent a.thickbox');
+          Drupal.attachBehaviors('#TB_ajaxContent a.thickbox');
           $('#TB_window').css({display:'block', opacity: 0}).animate({opacity: 1}, 400);
         });
       }
