
// THICKBOX ON-DEMAND PLUGIN
        $.fn.useThickbox = function(){
                return this.each(function(){
                        $(this).click(function(){
                                var t = this.title || this.name || null;
                                var g = this.rel || false;
                                TB_show(t,this.href,g);
                                this.blur();
                                return false;
                        });
                });
        }

// AUTO-APPLY THICKBOX
        $(document).ready(function() {
               $("a[@href*='.jpg']").useThickbox();
               $("a[@href*='.gif']").useThickbox();
               $("a[@href*='.png']").useThickbox();
        });

