// $Id: shadowbox_auto.js,v 1.1.4.4.2.4.2.1 2010/04/03 05:53:55 nicholasalipaz Exp $ Drupal.behaviors.shadowbox = function (context) { var settings = Drupal.settings.shadowbox; if (settings.auto_enable_all_images == 1) { $("a[href$='jpg'], a[href$='png'], a[href$='gif'], a[href$='jpeg'], a[href$='bmp'], a[href$='JPG'], a[href$='PNG'], a[href$='GIF'], a[href$='JPEG'], a[href$='BMP']").each(function() { if (settings.auto_gallery == 1) { $(this).attr('rel', 'shadowbox[gallery]'); } else { $(this).attr('rel', 'shadowbox'); }; }); }; Shadowbox.setup(); };