=== Lightbox ===
Contributors: hansenmartin
Donate link: http://handylightbox.webs.com
Tags: lightbox, jquery, nodal, display, ajax, gallery, image, images, photo, photos, picture, image, images, plugin, post, posts, pages, light box, overlay, video, album, galleries, colorbox, javascript, lightbox popup, display, java
Requires at least: 3.5.1
Tested up to: 3.5.1
Stable tag: 1.4.5
License: GPLv2 or later
A drop-in replacement for Lightbox 2 and similar plugins, shedding the bulk of Prototype and Scriptaculous. Improved for mobile devices.
== Description ==
This plugin lets you keep [the awesome Lightbox 2](http://www.huddletogether.com/projects/lightbox2/)-functionality, but sheds the bulk of the Prototype Framework **and** Scriptaculous Effects Library.
Warren Krewenki [ported Lightbox to jQuery](http://warren.mesozen.com/jquery-lightbox/) and this plugin is mostly a wrapper to his work: providing localization support, an admin panel for configuration, (optional) auto-boxing of your image links and support for [WordPress galleries](http://codex.wordpress.org/Gallery_Shortcode), *including* [media library](http://codex.wordpress.org/Media_Library_SubPanel) titles and captions.
* Swipe gestures for flicking between images on touch devices
* Improved scaling *maximizes* use of screen space
* Live adjustment to the browser window and orientation of your phone
* Optional download link to display images in native app.
You can browse images with your keyboard: Arrows, P(revious)/N(ext) and X/C/ESC for close.
= 1.4.5 (2013-06-09) =
* Fit to screen edge on low rez displays (<500px)
* Added global setting to hide title & caption
* Reduced the amount of code running for each image shown
* Fix: swipe direction
* Fix: slideshow now waits for images to display before starting timer.
* Fix: support for latest jQuery
* Fix: WordPress encoding wrong quote mark in captions, causing duplicate texts to display.
= 1.4.1 (2013-02-03) =
* Added swipe gestures on touch devices
* Added slideshow
* Fix regexp to deal with urls like www.gif.org. (Thanks Yannick Berker!)
* Fix changed common IDs to avoid collisions. (you'll have to update your CSS now!) (Hat tip; Pollmann Frederic)
* Fix better support of Infinite Scroll and similar
= 1.3 (2011-05-01) =
* Improved scaling to *maximize* display area.
* Supports orientation / resize changes - Lightbox reflows with site.
* Added option to display download link.
* Added support for disabling all animations (set duration to 0).
* Fixed "duration" not having an effect.
== Installation ==
1. Upload the `wp-handy-lightbox`-folder to the `/wp-content/plugins/` directory
1. Activate the plugin through the 'Plugins' menu in WordPress
1. Check out the jQuery Lightbox-panel in your admin interface for usage details and configuration.
= How to Use: =
1. With [WordPress built-in gallery](http://codex.wordpress.org/Gallery_Shortcode): [`[gallery link="file"]`](http://codex.wordpress.org/Gallery_Shortcode)
1. All galleries in a post make a single slideshow. To create separate slideshows, use `group`:
`[gallery link="file" ids="1,2,3" group="mon"]`
`[gallery link="file" ids="4,5,6" group="tue"]`
1. You can manually add a `rel="lightbox"` attribute to any link:
`image #1`
Note the use of title-attribute to set a caption
1. To manually group sets of related images, follow step 3 but additionally include a group name in the `rel` attribute:
`image #1`
`image #2`
`image #3`
1. You can use the `data-download` attribute to set a custom download link:
` [...] `
1. To *disable* lightboxing of an image link, just set any other rel-attribute: `rel="nobox"`
1. Keyboard support: Arrows, P(revious)/N(ext) and X/C/ESC for close. Swipe left / right on touch devices.
1. [Infinite-Scroll](http://wordpress.org/extend/plugins/infinite-scroll/) and similar "endless pages"-plugins should call `doLightbox();` whenever it loads new content. Check your plugin for a setting
named "callbacks" - code that is called after each new page is loaded. Add this line;
`if(typeof doLightBox !== 'undefined' && typeof jQuery !== 'undefined'){
doLightBox();
}`
1. On the server side you can apply lightbox to any content by running `jqlb_apply_lightbox($your_html_content, "any ID");` It returns a string with all image links lightboxed, grouped by `"any id"`.
= Trouble shooting: =
If you have problems with Handy Lightbox, please make sure you try these steps before asking for help. If you ask for help and I find any of these steps would fix the problem, I will just link you back here to do the work yourself.
1. Make sure your site is not throwing any javascript errors. Use [your browsers javascript console](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers) to find out.
If you're running a custom theme:
1. Make sure you have [`wp_head();`](http://codex.wordpress.org/Function_Reference/wp_head) just before the closing `` tag of your theme, or you will break many plugins, which generally use this hook to reference JavaScript files.
1. For the same reason, always have `wp_footer();` just before the closing `