lokesh/lightbox2 — pull request #248 by MadBender (2014-06-12 16:25:41+00:00)
Title: Added ability to manually create and configure Lightbox objects

I used Lightbox in my project and found that to change its options you must change script source code. Which is not good if you plan to update it or have different options (for different pages or different clients). So I made this fix and ask you to include it into your code. Note that it has small incompatibility with older version, because Lightbox object is no more created in .js script, now the user must manually create it when the page loads. You may need to update the documentation if you accept this.

Changes
LIghtbox is now accessible from the global namespace.
Removed automatic Lightbox initialization from script file. Now the user must explicitly create a lightbox to activate it.
The minimal code to create lightbox is:
```
$(function() {
new Lightbox();
}
```
You can also specify options in Lightbox constructor:
```
$(function() {
new Lightbox({ fadeDuration: 0, resizeDuration: 0 });
}
```
or you can change default options for all lightboxes (put this to page template or some script that is executed on every page):
```
Lightbox.setDefaultOptions({fadeDuration: 0, resizeDuration: 0});
```