/**
* jQuery Lightbox
* Version 0.5 - 11/29/2007
* @author Warren Krewenki
*
* Changes by:
* @author Krzysztof Kotowicz :
* - bugfix: multiple instances of Lightbox galleries allowed
* (using opts variable instead of $.fn.lightbox.defaults)
* - bugfix: use var for local variables in a few functions
* - added support for navbarOnTop setting
* - added support for displayTitle setting
* - added support for slideNavBar setting (with slideNavBarSpeed)
* - added support for displayHelp setting
* - added support for fitToScreen setting (ported Lightbox VinDSL hack)
* (see http://www.huddletogether.com/forum/comments.php?DiscussionID=307)
* - plugin now uses jQuery.width() and jQuery.height()
* - removed eval() calls
* - removed destroyElement - uses jQuery.remove()
* - use of prevLinkText, nextLinkText and help
* - all strings are now placed in opts.strings to allow for customization/translation
*
* Based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
* Originally written to make use of the Prototype framework, and Script.acalo.us, now altered to use jQuery.
*
**/
(function($){
var opts;
$.fn.lightbox = function(options){
// build main options
opts = $.extend({}, $.fn.lightbox.defaults, options);
// initalize the lightbox
$.fn.lightbox.initialize();
return this.each(function(){
$(this).click(function(){
$(this).lightbox.start(this);
return false;
});
});
};
// lightbox functions
$.fn.lightbox.initialize = function(){
$('#overlay').remove();
$('#lightbox').remove();
opts.inprogress = false;
var outerImage = '