diff -r b52509cf73af -r c2458c3b0365 LightboxGallery.php --- a/LightboxGallery.php Wed May 27 09:37:06 2009 -0400 +++ b/LightboxGallery.php Mon Aug 03 16:46:52 2009 -0400 @@ -34,9 +34,17 @@ { global $db, $session, $paths, $template, $plugins; // Common objects - $template->add_header(''); - $template->add_header(''); - $template->add_header(''); + if ( method_exists($template, 'preload_js') && method_exists($template, 'add_header_js') ) + { + $template->preload_js(array('jquery', 'jquery-ui')); + $template->add_header_js(''); + } + else + { + $template->add_header(''); + $template->add_header(''); + $template->add_header(''); + } $template->add_header(''); $template->add_header('"; }