-## About ColorBox:
+## About Colorbox:
A customizable lightbox plugin for jQuery. See the [project page](http://jacklmoore.com/colorbox/) for documentation and a demonstration, and the [FAQ](http://jacklmoore.com/colorbox/faq/) for solutions and examples to common issues. Released under the [MIT license](http://www.opensource.org/licenses/mit-license.php).
-## Translations Welcome
-Send me your language configuration files. See /i18n/jquery.colorbox-de.js as an example.
-
## Changelog:
-### Version 1.3.32 - 2013/1/31
+##### Version 1.6.3 - 2015/07/27
+
+* Fixed regression that caused error in IE8 when the calculated initial size was negative. Fixes #741
+
+##### Version 1.6.2 - 2015/07/13
+
+* Fixed iframe attribute name (allowFullScreen to allowFullscreen). Fixes #737
+
+##### Version 1.6.1 - 2015/05/14
+
+* Replaced the inline onclick handler for cboxPhoto with a namespaced event for easier unbinding. Fixes #719.
+
+##### Version 1.6.0 - 2015/03/03
+
+* Added two new properties that expose how `<img>` and `<iframe>` elements are created, to give users direct control over those elements. Fixes #700.
+
+##### Version 1.5.15 - 2015/02/25
+
+* Adding to NPM, merged white-space cleanup & new language file.
+
+##### Version 1.5.14 - 2014/9/9
+
+* When opening, append Colorbox to the DOM if it was detached for whatever reason. Fixes #645.
+
+##### Version 1.5.13 - 2014/8/4
+
+* Fixed regression introduced with v1.5.12 with legacy versions of jQuery (1.3x-1.6x). References #628.
+
+##### Version 1.5.12 - 2014/7/31
+
+* Allowed setting the overlay opacity via CSS, by setting Colorbox's opacity property to false. References #628.
+
+##### Version 1.5.11 - 2014/7/31
+
+* Fixed bug where setting opacity to 0 was ignored. Fixes #628.
+
+##### Version 1.5.10 - 2014/6/26
+
+* Minor misc. tweaks (merging pull requests #611, #612, #615, #619, #620).
+
+##### Version 1.5.9 - 2014/4/25
+
+* Fixed inline content bug when using child selectors. Fixes #599
+
+##### Version 1.5.8 - 2014/4/15
+
+* Fixed accidental leak of global variable. References #591
+* Enabled strict mode. Fixes #597
+
+##### Version 1.5.7 - 2014/4/15
+
+* Fix potential error when calling Colorbox directly. References #591
+* Potentially worked around browser limitation of reporting that an image height and width is 0 immediately after onload. Fixes #535
+
+##### Version 1.5.6 - 2014/4/4
+
+* Applied maxWidth and maxHeight to the initialWidth and initialHeight. Fixes #391
+
+##### Version 1.5.5 - 2014/3/13
+
+* Allow setting the overlay opacity through CSS, rather than having to use Colorbox's opacity property. Fixes #580
+
+##### Version 1.5.4 - 2014/3/7
+
+* Fixed potential issue where IE9+ wouldn't close the modal when clicking on the overlay. Fixes #576
+
+##### Version 1.5.3 - 2014/3/4
+
+* Added access to settings object in callbacks.
+
+##### Version 1.5.2 - 2014/2/28
+
+* Added svg to image types regex.
+
+##### Version 1.5.1 - 2014/2/27
+
+* Fixed regression that broke direct calls to Colorbox, ie. $.colorbox(…)
+
+##### Version 1.5.0 - 2014/2/27
+
+* Changed when the className is applied: immediately on open, but only updated immediately prior to transition. Fixes #565
+* Fixed potential style flash if #cboxLoadedContent is given a background. Fixes #567
+* Misc. code cleanup
+
+##### Version 1.4.37 - 2014/2/11
+
+* Fixed potential error when resizing. Fixes #254
+* Added Microsoft's JPEG XR to photo detection regex.
+
+##### Version 1.4.33 - 2013/10/31
+
+* Fixed an issue where private events propagated to the document in versions of jQuery prior to 1.7. Fixes #525, Fixes #526
+
+##### Version 1.4.32 - 2013/10/16
+
+* Updated stylesheets to avoid issue with using `div {max-width:100%}` (Fixes #520)
+
+##### Version 1.4.31 - 2013/9/25
+
+* Used setAttribute to set londesc, so that the value is accessible via DOM Node longDesc property #508
+
+##### Version 1.4.30 - 2013/9/24
+
+* Added longdesc and aria-describedby attributes to photos. Fixes #508
+
+##### Version 1.4.29 - 2013/9/10
+
+* Fixed a slideshow regression from 1.4.27
+* Fixed a potential issue with the starting size of #cboxLoadedContent
+
+##### Version 1.4.28 - 2013/9/4
+
+* Fixed a potential issue with using the open property with mixed slideshow and non-slideshow groups
+
+##### Version 1.4.27 - 2013/7/16
+
+* Fixed a width calculation issue relating to using margin:auto on #cboxLoadedContent.
+
+##### Version 1.4.26 - 2013/6/30
+
+* Fixed a regression in IE7 and IE8 that was causing an error.
+
+##### Version 1.4.25 - 2013/6/28
+
+* Use an animation speed of zero between same-sized content (fixed).
+* Removed temporary fix for jQuery UI 1.8
+
+##### Version 1.4.24 - 2013/6/24
+
+* Added closeButton option. Set to false to remove the close button.
+
+##### Version 1.4.23 - 2013/6/23
+
+* Bugfix loading overlay/graphic append order
+
+##### Version 1.4.22 - 2013/6/19
+
+* Updated manifest files for the jQuery plugin repository and Bower (no changes to plugin)
+
+##### Version 1.4.21 - 2013/6/6
+
+* Replaced new Image() with document.createElement('img') to avoid a potential bug in Chrome 27.
+
+##### Version 1.4.20 - 2013/6/5
+
+* Fixing bug/typo from last update.
+
+##### Version 1.4.19 - 2013/6/3
+
+* Fixed bug where Colorbox was capturing ctrl+click on assigned links on windows browsers with jQuery 1.7+, rather than ignoring.
+
+##### Version 1.4.18 - 2013/5/30
+
+* Fixed a scroll position issue when using $.colorbox.resize()
+
+##### Version 1.4.17 - 2013/5/23
+
+* Possible fix for a Chrome 27 issue (https://github.com/jackmoore/colorbox/pull/438#issuecomment-18334804)
+
+##### Version 1.4.16 - 2013/5/20
+
+* Added trapFocus setting to allow disabling of focus trapping
+
+##### Version 1.4.15 - 2013/4/22
+
+* Added .webp to list of recognized image extensions
+
+##### Version 1.4.14 - 2013/4/16
+
+* Added fadeOut property to control the closing fadeOut speed.
+* Removed longdesc attribute for now.
+
+##### Version 1.4.13 - 2013/4/11
+
+* Fixed an error involving IE7/IE8 and legacy versions of jQuery
+
+##### Version 1.4.12 - 2013/4/9
+
+* Fixed a potential conflict with Twitter Bootstrap default img styles.
+
+##### Version 1.4.11 - 2013/4/9
+
+* Added `type='button'` to buttons to prevent accidental form submission
+* Added alt and longdesc attributes to photo content if they are present on the calling element.
+
+##### Version 1.4.10 - 2013/4/2
+
+* Better 'old IE' feature detection that fixes an error with jQuery 2.0.0pre.
+
+##### Version 1.4.9 - 2013/4/2
+
+* Fixes bug introduced in previous version.
+
+##### Version 1.4.8 - 2013/4/2
+
+* Dropped IE6 support.
+* Fixed other issues with $.colorbox.remove.
+
+##### Version 1.4.7 - 2013/4/1
+
+* Prevented an error if $.colorbox.remove is called during the transition.
+
+##### Version 1.4.6 - 2013/3/19
+
+* Minor change to work around a jQuery 1.4.2 bug for legacy users.
+
+##### Version 1.4.5 - 2013/3/10
+
+* Minor change to apply the close and className properties sooner.
+
+##### Version 1.4.4 - 2013/3/10
+
+* Fixed an issue with percent-based heights in iOS
+* Fixed an issue with ajax requests being applied at the wrong time.
+
+##### Version 1.4.3 - 2013/2/18
+
+* Made image preloading aware of retina settings.
+
+##### Version 1.4.2 - 2013/2/18
+
+* Removed $.contains for compatibility with jQuery 1.3.x
+
+##### Version 1.4.1 - 2013/2/14
+
+* Ignored left and right arrow keypresses if combined with the alt key.
+
+##### Version 1.4.0 - 2013/2/12
+
+* Better accessibility:
+ * Replaced div controls with buttons
+ * Tabbed navigation confined to modal window
+ * Added aria role
+
+##### Version 1.3.34 - 2013/2/4
+
+* Updated manifest for plugins.jquery.com
+
+##### Version 1.3.33 - 2013/2/4
+
+* Added retina display properties: retinaImage, retinaUrl, retinaSuffix
+* Fixed iframe scrolling on iOS devices.
+
+##### Version 1.3.32 - 2013/1/31
* Improved internal event subscribing & fixed event bug introduced in v1.3.21
-### Version 1.3.31 - 2013/1/28
+##### Version 1.3.31 - 2013/1/28
* Fixed a size-calculation bug introduced in the previous commit.
-### Version 1.3.30 - 2013/1/25
+##### Version 1.3.30 - 2013/1/25
-* Delayed border-width calculations until after opening, to avoid a bug in FF when using ColorBox in a hidden iframe.
+* Delayed border-width calculations until after opening, to avoid a bug in FF when using Colorbox in a hidden iframe.
-### Version 1.3.29 - 2013/1/24
+##### Version 1.3.29 - 2013/1/24
* Fixes bug with bubbling delegated events, introduced in the previous commit.
-### Version 1.3.28 - 2013/1/24
+##### Version 1.3.28 - 2013/1/24
* Fixed compatibility issue with old versions of jQuery (1.3.2-1.4.2)
-### Version 1.3.27 - 2013/1/23
+##### Version 1.3.27 - 2013/1/23
* Added className property.
-### Version 1.3.26 - 2013/1/23
+##### Version 1.3.26 - 2013/1/23
* Minor bugfix: clear the onload event handler after photo has loaded.
-### Version 1.3.25 - 2013/1/23
+##### Version 1.3.25 - 2013/1/23
* Removed grunt file & added Bower component.json.
-### Version 1.3.24 - 2013/1/22
+##### Version 1.3.24 - 2013/1/22
* Added generated files (jquery.colorbox.js / jquery.colorbox-min.js) back to the repository.
-### Version 1.3.23 - 2013/1/18
+##### Version 1.3.23 - 2013/1/18
-* Minor bugfix for calling ColorBox on empty jQuery collections without a selector.
+* Minor bugfix for calling Colorbox on empty jQuery collections without a selector.
-### Version 1.3.22 - 2013/1/17
+##### Version 1.3.22 - 2013/1/17
* Recommit for plugins.jquery.com
-### Version 1.3.21 - 2013/1/15
+##### Version 1.3.21 - 2013/1/15
Files Changed: *.js
-* Fixed compatability issues with jQuery 1.9
+* Fixed compatibility issues with jQuery 1.9
-### Version 1.3.20 - August 15 2012
+##### Version 1.3.20 - August 15 2012
Files Changed:jquery.colorbox.js
* Added temporary workaround for jQuery-UI 1.8 bug (http://bugs.jquery.com/ticket/12273)
* Added *.jpe extension to the list of image types.
-### Version 1.3.19 - December 08 2011
+##### Version 1.3.19 - December 08 2011
Files Changed:jquery.colorbox.js, colorbox.css (all)
* Fixed bug related to using the 'fixed' property.
* Removed $.colorbox.init() as it will no longer be needed (will self-init when called).
* Removed use of $.browser.
-### Version 1.3.18 - October 07 2011
+##### Version 1.3.18 - October 07 2011
Files Changed:jquery.colorbox.js/jquery.colorbox-min.js, colorbox.css (all) and example 1's controls.png
-* Fixed a regression where Flash content displayed in ColorBox would be reloaded if the browser window was resized.
-* Added safety check to make sure that ColorBox's markup is only added to the DOM a single time, even if $.colorbox.init() is called multiple times. This will allow site owners to manually initialize ColorBox if they need it before the DOM has finished loading.
+* Fixed a regression where Flash content displayed in Colorbox would be reloaded if the browser window was resized.
+* Added safety check to make sure that Colorbox's markup is only added to the DOM a single time, even if $.colorbox.init() is called multiple times. This will allow site owners to manually initialize Colorbox if they need it before the DOM has finished loading.
* Updated the example index.html files to be HTML5 compliant.
* Changed the slideshow behavior so that it immediately moves to the next slide when the slideshow is started.
* Minor regex bugfix to allow automatic detection of image URLs that include fragments.
-### Version 1.3.17 - May 11 2011
+##### Version 1.3.17 - May 11 2011
Files Changed:jquery.colorbox.js/jquery.colorbox-min.js
* Added properties "top", "bottom", "left" and "right" to specify a position relative to the viewport, rather than using the default centering.
-* Added property "data" to specify GET or POST data when using Ajax. ColorBox's ajax functionality is handled by jQuery's .load() method, so the data property works the same way as it does with .load().
-* Added property "fixed" which can provide fixed positioning for ColorBox, rather than absolute positioning. This will allow ColorBox to remain in a fixed position within the visitors viewport, despite scrolling. IE6 support for this was not added, it will continue to use the default absolute positioning.
+* Added property "data" to specify GET or POST data when using Ajax. Colorbox's ajax functionality is handled by jQuery's .load() method, so the data property works the same way as it does with .load().
+* Added property "fixed" which can provide fixed positioning for Colorbox, rather than absolute positioning. This will allow Colorbox to remain in a fixed position within the visitors viewport, despite scrolling. IE6 support for this was not added, it will continue to use the default absolute positioning.
* Fixed ClearType problem with IE7.
* Minor fixes.
-### Version 1.3.16 - March 01 2011
+##### Version 1.3.16 - March 01 2011
Files Changed:jquery.colorbox.js/jquery.colorbox-min.js, colorbox.css (all) and example 4 background png files
* Better IE related transparency workarounds. IE7 and up now uses the same background image sprite as other browsers.
* Added new property: 'fastIframe' and set it to true by default. Setting to fastIframe:false will delay the loading graphic removal and onComplete event until iframe has completely loaded.
* Ability to redefine $.colorbox.close (or prev, or next) at any time.
-### Version 1.3.15 - October 27 2010
+##### Version 1.3.15 - October 27 2010
Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
* Minor fixes for specific cases.
-### Version 1.3.14 - October 27 2010
+##### Version 1.3.14 - October 27 2010
Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
* In IE6, closing an iframe when using HTTPS no longer generates a security warning.
-### Version 1.3.13 - October 22 2010
+##### Version 1.3.13 - October 22 2010
Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
* Changed the index.html example files to use YouTube's new embedded link format.
-* By default, ColorBox returns focus to the element it was launched from once it closes. This can now be disabled by setting the 'returnFocus' property to false. Focus was causing problems for some users who had their anchor elements inside animated containers.
+* By default, Colorbox returns focus to the element it was launched from once it closes. This can now be disabled by setting the 'returnFocus' property to false. Focus was causing problems for some users who had their anchor elements inside animated containers.
* Minor bug fix involved in using a combination of slideshow and non-slideshow content.
-### Version 1.3.12 - October 20 2010
+##### Version 1.3.12 - October 20 2010
Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
* Minor bug fix involved in preloading images when using a function as a value for the href property.
-### Version 1.3.11 - October 19 2010
+##### Version 1.3.11 - October 19 2010
Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
* Fixed the slideshow functionality that broke with 1.3.10
* The slideshow now respects the loop property.
-### Version 1.3.10 - October 16 2010
+##### Version 1.3.10 - October 16 2010
Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
* Fixed compatibility with jQuery 1.4.3
* The 'open' property now accepts a function as a value, like all of the other properties.
* Preloading now loads the correct href for images when using a dynamic (function) value for the href property.
-* Fixed bug in Safari 3 for Win where ColorBox centered on the document, rather than the visitor's viewport.
-* May have fixed an issue in Opera 10.6+ where ColorBox would rarely/randomly freeze up while switching between photos in a group.
+* Fixed bug in Safari 3 for Win where Colorbox centered on the document, rather than the visitor's viewport.
+* May have fixed an issue in Opera 10.6+ where Colorbox would rarely/randomly freeze up while switching between photos in a group.
* Some functionality better encapsulated & minor performance improvements.
-### Version 1.3.9 - July 7 2010
+##### Version 1.3.9 - July 7 2010
Files Changed: jquery.colorbox.js/jquery.colorbox-min.js/ all colorbox.css (the core styles)
* Fixed a problem where iframed youtube videos would cause a security alert in IE.
* More code is event driven now, making the source easier to grasp.
* Removed some unnecessary style from the core CSS.
-### Version 1.3.8 - June 21 2010
+##### Version 1.3.8 - June 21 2010
Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
* Fixed a bug in Chrome where it would sometimes render photos at 0 by 0 width and height (behavior introduced in recent update to Chrome).
* Fixed a bug where the onClosed callback would fire twice (only affected 1.3.7).
-* Fixed a bug in IE7 that existed with some iframed websites that use JS to reposition the viewport caused ColorBox to move out of position.
+* Fixed a bug in IE7 that existed with some iframed websites that use JS to reposition the viewport caused Colorbox to move out of position.
* Abstracted the identifiers (HTML ids & classes, and JS plugin name, method, and events) so that the plugin can be easily rebranded.
* Small changes to improve either code readability or compression.
-### Version 1.3.7 - June 13 2010
+##### Version 1.3.7 - June 13 2010
Files Changed: jquery.colorbox.js/jquery.colorbox-min.js/index.html
* $.colorbox can now be used for direct calls and accessing public methods. Example: $.colorbox.close();
* Resize now accepts 'width', 'innerWidth', 'height' and 'innerHeight'. Example: $.colorbox.resize({width:"100%"})
* Added option (loop:false) to disable looping in a group.
* Added options (escKey:false, arrowKey:false) to disable esc-key and arrow-key bindings.
-* Added method for removing ColorBox from a document: $.colorbox.remove();
+* Added method for removing Colorbox from a document: $.colorbox.remove();
* Fixed a bug where iframed URLs would be truncated if they contained an unencoded apostrophe.
* Now uses the exact href specified on an anchor, rather than the version returned by 'this.href'. This was causing "#example" to be normalized to "http://domain/#example" which interfered with how some users were setting up links to inline content.
* Changed example documents over to HTML5.
-### Version 1.3.6 - Jan 13 2010
+##### Version 1.3.6 - Jan 13 2010
Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
-* Small change to make ColorBox compatible with jQuery 1.4
+* Small change to make Colorbox compatible with jQuery 1.4
-### Version 1.3.5 - December 15 2009
+##### Version 1.3.5 - December 15 2009
Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
* Fixed a bug introduced in 1.3.4 with IE7's display of example 2 and 3, and auto-width in Opera.
* Fixed a bug introduced in 1.3.4 where colorbox could not be launched by triggering an element's click event through JavaScript.
* Minor refinements.
-### Version 1.3.4 - December 5 2009
+##### Version 1.3.4 - December 5 2009
Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
-* Event delegation is now used for elements that ColorBox is assigned to, rather than individual click events.
-* Additional callbacks have been added to represent other stages of ColorBox's lifecycle. Available callbacks, in order of their execution: onOpen, onLoad, onComplete, onCleanup, onClosed These take place at the same time as the event hooks, but will be better suited than the hooks for targeting specific instances of ColorBox.
+* Event delegation is now used for elements that Colorbox is assigned to, rather than individual click events.
+* Additional callbacks have been added to represent other stages of Colorbox's lifecycle. Available callbacks, in order of their execution: onOpen, onLoad, onComplete, onCleanup, onClosed These take place at the same time as the event hooks, but will be better suited than the hooks for targeting specific instances of Colorbox.
* Ajax content is now immediately added to the DOM to be more compatible if that content contains script tags.
* Focus is now returned to the calling element on closing.
* Fixed a bug where maxHeight and maxWidth did not work for non-photo content.
-* Direct calls no longer need 'open:true', it is assumed. Example: `$.fn.colorbox({html:'<p>Hi</p>'});`
+* Direct calls no longer need 'open:true', it is assumed. Example: `$.colorbox({html:'<p>Hi</p>'});`
-### Version 1.3.3 - November 7 2009
+##### Version 1.3.3 - November 7 2009
Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
-* Changed $.fn.colorbox.element() to return a jQuery object rather the DOM element.
+* Changed $.colorbox.element() to return a jQuery object rather the DOM element.
* jQuery.colorbox-min.js is compressed with Google's Closure Compiler rather than YUI Compressor.
-### Version 1.3.2 - October 27 2009
+##### Version 1.3.2 - October 27 2009
Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
-* Added 'innerWidth' and 'innerHeight' options to allow people to easily set the size dimensions for ColorBox, without having to anticipate the size of the borders and buttons.
+* Added 'innerWidth' and 'innerHeight' options to allow people to easily set the size dimensions for Colorbox, without having to anticipate the size of the borders and buttons.
* Renamed 'scrollbars' option to 'scrolling' to be in keeping with the existing HTML attribute. The option now also applies to iframes.
* Bug fix: In Safari, positioning occassionally incorrect when using '100%' dimensions.
* Bug fix: In IE6, the background overlay is briefly not full size when first viewing.
-* Bug fix: In Firefox, opening ColorBox causes a split second shift with a small minority of webpage layouts.
+* Bug fix: In Firefox, opening Colorbox causes a split second shift with a small minority of webpage layouts.
* Simplified code in a few areas.
-### Version 1.3.1 - September 16 2009
+##### Version 1.3.1 - September 16 2009
Files Changed: jquery.colorbox.js/jquery.colorbox-min.js/colorbox.css/colorbox-ie.css(removed)
* Removed the IE-only stylesheets and conditional comments for example styles 1 & 4. All CSS is handled by a single CSS file for all examples.
* Removed user-agent sniffing from the js and replaced it with feature detection. This will allow correct rendering for visitors masking their agent type.
-### Version 1.3.0 - September 15 2009
+##### Version 1.3.0 - September 15 2009
Files Changed: jquery.colorbox.js/jquery.colorbox-min.js/colorbox.css
-* Added $.fn.colorbox.resize() method to allow ColorBox to resize it's height if it's contents change.
+* Added $.colorbox.resize() method to allow Colorbox to resize it's height if it's contents change.
* Added 'scrollbars' option to allow users to turn off scrollbars when using the resize() method.
* Renamed the 'resize' option to be less ambiguous. It's now 'scalePhotos'.
* Renamed the 'cbox_close' event to be less ambiguous. It's now 'cbox_cleanup'. It is the first thing to happen in the close method while the 'cbox_closed' event is the last to happen.
-* Fixed a bug with the slideshow mouseover graphics that appeared after ColorBox is opened a 2nd time.
+* Fixed a bug with the slideshow mouseover graphics that appeared after Colorbox is opened a 2nd time.
* Fixed a bug where ClearType may not work in IE6&7 if using the fade transition.
* Minor code optimizations to increase compression.
-### Version 1.2.9 - August 7 2009
+##### Version 1.2.9 - August 7 2009
Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
* Minor change to enable use with $.getScript();
* Minor change to the timing of the 'cbox_load' event so that it is more useful.
* Added a direct link to a YouTube video to the examples.
-### Version 1.2.8 - August 5 2009
+##### Version 1.2.8 - August 5 2009
Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
* Fixed a bug with the overlay in IE6
* Fixed a bug where left & right keypress events might be prematurely unbound.
-### Version 1.2.7 - July 31 2009
+##### Version 1.2.7 - July 31 2009
Files Changed: jquery.colorbox.js/jquery.colorbox-min.js, example stylesheets and background images (core styles have not changed and the updates will not affect existing user themes / old example themes)
* Code cleanup and reduction, better organization and documentation in the full source.
-* Added ability to use functions in place of static values for ColorBox's options (thanks Ken!).
-* Added an option for straight HTML. Example: `$.fn.colorbox({html:'<p>Howdy</p>', open:true})`
-* Added an event for the beginning of the closing process. This is in addition to the event that already existed for when ColorBox had completely closed. 'cbox_close' and 'cbox_closed' respectively.
-* Fixed a minor bug in IE6 that would cause a brief content shift in the parent document when opening ColorBox.
-* Fixed a minor bug in IE6 that would reveal select elements that had a hidden visibility after closing ColorBox.
-* The 'esc' key is unbound now when ColorBox is not open, to avoid any potential conflicts.
+* Added ability to use functions in place of static values for Colorbox's options (thanks Ken!).
+* Added an option for straight HTML. Example: `$.colorbox({html:'<p>Howdy</p>', open:true})`
+* Added an event for the beginning of the closing process. This is in addition to the event that already existed for when Colorbox had completely closed. 'cbox_close' and 'cbox_closed' respectively.
+* Fixed a minor bug in IE6 that would cause a brief content shift in the parent document when opening Colorbox.
+* Fixed a minor bug in IE6 that would reveal select elements that had a hidden visibility after closing Colorbox.
+* The 'esc' key is unbound now when Colorbox is not open, to avoid any potential conflicts.
* Used background sprites for examples 1 & 4. Put IE-only (non-sprite) background images in a separate folder.
* Example themes 1, 3, & 4 received slight visual tweaks.
* Optimized pngs for smaller file size.
* Added slices, grid, and correct sizing to the Adobe Illustrator file, all theme files are now export ready!
-### Version 1.2.6 - July 15 2009
+##### Version 1.2.6 - July 15 2009
Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
* Fixed a bug with fixed width/height images in Opera 9.64.
-* Fixed a bug with trying to set a value for rel during a direct call to ColorBox. Example: `$.fn.colorbox({rel:'foo', open:true});`
-* Changed how href/rel/title settings are determined to avoid users having to manually update ColorBox settings if they use JavaScript to update any of those attributes, after ColorBox has been defined.
+* Fixed a bug with trying to set a value for rel during a direct call to Colorbox. Example: `$.colorbox({rel:'foo', open:true});`
+* Changed how href/rel/title settings are determined to avoid users having to manually update Colorbox settings if they use JavaScript to update any of those attributes, after Colorbox has been defined.
* Fixed a FF3 bug where the back button was disabled after closing an iframe.
-### Version 1.2.5 - June 23 2009
+##### Version 1.2.5 - June 23 2009
Files Changed: jquery.colorbox.js/jquery.colorbox-min.js
* Changed the point at which iframe srcs are set (to eliminate the need to refresh the iframe once it has been added to the DOM).
* Removed unnecessary return values for a very slight code reduction.
-### Version 1.2.4 - June 9 2009
+##### Version 1.2.4 - June 9 2009
Files Changed: jquery.colorbox.js, jquery.colorbox-min.js
-* Fixed an issue where ColorBox may not close completely if it is closed during a transition animation.
+* Fixed an issue where Colorbox may not close completely if it is closed during a transition animation.
* Minor code reduction.
-### Version 1.2.3 - June 4 2009
+##### Version 1.2.3 - June 4 2009
* Fixed a png transparency stacking issue in IE.
* More accurate Ajax auto-sizing if the user was depending on the #cboxLoadedContent ID for CSS styling.
-* Added a public function for returning the current html element that ColorBox is associated with. Example use: var that = $.fn.colorbox.element();
+* Added a public function for returning the current html element that Colorbox is associated with. Example use: var that = $.colorbox.element();
* Added bicubic scaling for resized images in the original IE7.
* Removed the IE6 stylesheet and png files from Example 3. It now uses the same png file for the controls that the rest of the browsers use (an alpha transparency PNG8). This example now only has 2 graphics files and 1 stylesheet.
-### Version 1.2.2 - May 28 2009
+##### Version 1.2.2 - May 28 2009
* Fixed an issue with the 'resize' option.
-### Version 1.2.1 - May 28 2009
+##### Version 1.2.1 - May 28 2009
* Note: If you are upgrading, update your jquery.colorbox.js and colorbox.css files.
* Added photo resizing.
-* Added a maximum width and maximum height. Example: {height:800, maxHeight:'100%'}, would allow the box to be a maximum potential height of 800px, instead of a fixed height of 800px. With maxHeight of 100% the height of ColorBox cannot exceed the height of the browser window.
-* Added 'rel' setting to add the ability to set an alternative rel for any ColorBox call. This allows the user to group any combination of elements together for a gallery, or to override an existing rel. attribute so those element are not grouped together, without having to alter their rel in the HTML.
-* Added a 'photo' setting to force ColorBox to display a link as a photo. Use this when automatic photo detection fails (such as using a url like 'photo.php' instead of 'photo.jpg', 'photo.jpg#1', or 'photo.jpg?pic=1')
-* Removed the need to ever create disposable elements to call colorbox on. ColorBox can now be called directly, without being associated with any existing element, by using the following format:
- `$.fn.colorbox({open:true, href:'yourLink.xxx'});`
-* ColorBox settings are now persistent and unique for each element. This allows for extremely flexible options for individual elements. You could use this to create a gallery in which each page in the gallery has different settings. One could be a photo with a fade transition, next could be an inline element with an elastic transition with a set width and height, etc.
+* Added a maximum width and maximum height. Example: {height:800, maxHeight:'100%'}, would allow the box to be a maximum potential height of 800px, instead of a fixed height of 800px. With maxHeight of 100% the height of Colorbox cannot exceed the height of the browser window.
+* Added 'rel' setting to add the ability to set an alternative rel for any Colorbox call. This allows the user to group any combination of elements together for a gallery, or to override an existing rel. attribute so those element are not grouped together, without having to alter their rel in the HTML.
+* Added a 'photo' setting to force Colorbox to display a link as a photo. Use this when automatic photo detection fails (such as using a url like 'photo.php' instead of 'photo.jpg', 'photo.jpg#1', or 'photo.jpg?pic=1')
+* Removed the need to ever create disposable elements to call colorbox on. Colorbox can now be called directly, without being associated with any existing element, by using the following format:
+ `$.colorbox({open:true, href:'yourLink.xxx'});`
+* Colorbox settings are now persistent and unique for each element. This allows for extremely flexible options for individual elements. You could use this to create a gallery in which each page in the gallery has different settings. One could be a photo with a fade transition, next could be an inline element with an elastic transition with a set width and height, etc.
* For user callbacks, 'this' now refers to the element colorbox was opened from.
* Fixed a minor grouping issue with IE6, when transition type is set to 'none'.
* Added an Adobe Illustrator file that contains the borders and buttons used in the various examples.
-### Version 1.2 - May 13 2009
+##### Version 1.2 - May 13 2009
* Added a slideshow feature.
-* Added re-positioning on browser resize. If the browser is resized, ColorBox will recenter itself onscreen.
+* Added re-positioning on browser resize. If the browser is resized, Colorbox will recenter itself onscreen.
* Added hooks for key events: cbox_open, cbox_load, cbox_complete, cbox_closed.
* Fixed an IE transparency-stacking problem, where transparent PNGs would show through to the background overlay.
* Fixed an IE iframe issue where the ifame might shift up and to the left under certain circumstances.
* Changed how the JS is structured to be better organized and increase compression. Increased documentation.
* Changed CSS :hover states to a .hover class. This sidesteps a minor IE8 bug with css hover states and allows easier access to hover state user styles from the JavaScript.
* Changed: elements added to the DOM have new ID's. The naming is more consistent and less likely to cause conflicts with existing website stylesheets. All stylesheets have been updated.
-* Changed the behavior for prev/next links so that ColorBox does not get hung up on broken links. A visitor can now skip through broken or long-loading links by clicking prev/next buttons.
+* Changed the behavior for prev/next links so that Colorbox does not get hung up on broken links. A visitor can now skip through broken or long-loading links by clicking prev/next buttons.
* Changed the naming of variables in the parameter map to be more concise and intuitive.
* Removed colorbox.css. Combined the colorbox.css styles with jquery.colorbox.js: the css file was not large enough to warrant being a separate file.
-### Version 1.1.6 - April 28 2009
+##### Version 1.1.6 - April 28 2009
* Prevented the default action of the next & previous anchors and the left and right keys for gallery mode.
-* Fixed a bug where the title element was being added back to the DOM when closing ColorBox while using inline content.
+* Fixed a bug where the title element was being added back to the DOM when closing Colorbox while using inline content.
* Fixed a bug where IE7 would crash for example 2.
* Smaller filesize: removed a small amount of unused code and rewrote the HTML injection with less syntax.
-* Added a public method for closing ColorBox: $.fn.colorbox.close(). This will allow iframe users to add an event to close ColorBox without having to create an additional function.
+* Added a public method for closing Colorbox: $.colorbox.close(). This will allow iframe users to add an event to close Colorbox without having to create an additional function.
-### Version 1.1.5 - April 11 2009
-* Fixed minor issues with exiting ColorBox.
+##### Version 1.1.5 - April 11 2009
+* Fixed minor issues with exiting Colorbox.
-### Version 1.1.4 - April 08 2009
-* Fixed a bug in the fade transition where ColorBox not close completely if instructed to close during the fade-in portion of the transition.
+##### Version 1.1.4 - April 08 2009
+* Fixed a bug in the fade transition where Colorbox not close completely if instructed to close during the fade-in portion of the transition.
-### Version 1.1.3 - April 06 2009
-* Fixed an IE6&7 issue with using ColorBox to display animated GIFs.
+##### Version 1.1.3 - April 06 2009
+* Fixed an IE6&7 issue with using Colorbox to display animated GIFs.
-### Version 1.1.2 - April 05 2009
-* Added ability to change content when ColorBox is already open.
+##### Version 1.1.2 - April 05 2009
+* Added ability to change content when Colorbox is already open.
* Added vertical photo centering now works for all browsers (this feature previously excluded IE6&7).
* Added namespacing to the esc-key keydown event for people who want to disable it: "keydown.colorClose"
-* Added 'title' setting to add the ability to set an alternative title for any ColorBox call.
+* Added 'title' setting to add the ability to set an alternative title for any Colorbox call.
* Fixed rollover navigation issue with IE8. (Added JS-based rollover state due to a browser-bug.)
* Fixed an overflow issue for when the fixed width/height is smaller than the size of a photo.
-* Fixed a bug in the fade transition where the border would still come up if ColorBox was closed mid-transition.
+* Fixed a bug in the fade transition where the border would still come up if Colorbox was closed mid-transition.
* Switch from JSMin to Yui Compressor for minification. Minified code now under 7KB.
-### Version 1.1.1 - March 31 2009
+##### Version 1.1.1 - March 31 2009
* More robust image detection regex. Now detects image file types with url fragments and/or query strings.
* Added 'nofollow' exception to rel grouping.
-* Changed how images are loaded into the DOM to prevent premature size calculation by ColorBox.
+* Changed how images are loaded into the DOM to prevent premature size calculation by Colorbox.
* Added timestamp to iframe name to prevent caching - this was a problem in some browsers if the user had multiple iframes and the visitor left the page and came back, or if they refreshed the page.
-### Version 1.1.0 - March 21 2009
+##### Version 1.1.0 - March 21 2009
* Animation is now much smoother and less resource intensive.
* Added support for % sizing.
* Callback option added.
-* Inline content now preserves JavaScript events, and changes made while ColorBox is open are also preserved.
-* Added 'href' setting to add the ability to set an alternative href for any anchor, or to assign the ColorBox event to non-anchors.
+* Inline content now preserves JavaScript events, and changes made while Colorbox is open are also preserved.
+* Added 'href' setting to add the ability to set an alternative href for any anchor, or to assign the Colorbox event to non-anchors.
Example: $('button').colorbox({'href':'process.php'})
Example: $('a[href='http://msn.com']).colorbox({'href':'http://google.com', iframe:true});
* Photos are now horizontally centered if they are smaller than the lightbox size. Also vertically centered for browsers newer than IE7.
* Buttons in the examples are now included in the 'protected zone'. The lightbox will never expand it's borders or buttons beyond an accessible area of the screen.
* Keypress events don't queue up by holding down the arrow keys.
-* Added option to close ColorBox by clicking on the background overlay.
+* Added option to close Colorbox by clicking on the background overlay.
* Added 'none' transition setting.
* Changed 'contentIframe' and 'contentInline' to 'inline' and 'iframe'. Removed 'contentAjax' because it is automatically assumed for non-image file types.
* Changed 'contentWidth' and 'contentHeight' to 'fixedWidth' and 'fixedHeight'. These sizes now reflect the total size of the lightbox, not just the inner content. This is so users can accurately anticipate % sizes without fear of creating scrollbars.
* Added a minified version.
* Code passes JSLint.
-### Version 1.0.5 - March 11 2009
+##### Version 1.0.5 - March 11 2009
* Redo: Fixed a bug where IE would cut off the bottom portion of a photo, if the photo was larger than the document dimensions.
-### Version 1.0.4 - March 10 2009
+##### Version 1.0.4 - March 10 2009
* Added an option to allow users to automatically open the lightbox. Example usage: $(".colorbox").colorbox({open:true});
* Fixed a bug where IE would cut off the bottom portion of a photo, if the photo was larger than the document dimensions.
-### Version 1.0.3 - March 09 2009
+##### Version 1.0.3 - March 09 2009
* Fixed vertical centering for Safari 3.0.x.
-### Version 1.0.2 - March 06 2009
+##### Version 1.0.2 - March 06 2009
* Corrected a typo.
* Changed the content-type check so that it does not assume all links to photos should actually display photos. This allows for Ajax/inline/and iframe calls on anchors linking to picture file types.
-### Version 1.0.1 - March 05 2009
+##### Version 1.0.1 - March 05 2009
* Fixed keydown events (esc, left arrow, right arrow) for Webkit browsers.
-### Version 1.0 - March 03 2009
+##### Version 1.0 - March 03 2009
* First release
--- /dev/null
+{
+ "name": "jquery-colorbox",
+ "description": "jQuery lightbox and modal window plugin",
+ "dependencies": {
+ "jquery": ">=1.3.2"
+ },
+ "keywords": [
+ "modal",
+ "lightbox",
+ "gallery",
+ "popup",
+ "ui",
+ "jquery-plugin"
+ ],
+ "authors": [
+ {
+ "name": "Jack Moore",
+ "url": "http://www.jacklmoore.com",
+ "email": "hello@jacklmoore.com"
+ }
+ ],
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://www.opensource.org/licenses/mit-license.php"
+ }
+ ],
+ "homepage": "http://www.jacklmoore.com/colorbox",
+ "main": "jquery.colorbox.js",
+ "ignore": [
+ "colorbox.jquery.json",
+ "colorbox.ai",
+ "content",
+ "example1/index.html",
+ "example2/index.html",
+ "example3/index.html",
+ "example4/index.html",
+ "example5/index.html"
+ ]
+}
\ No newline at end of file
/*
- ColorBox Core Style:
+ Colorbox Core Style:
The following CSS is consistent between example themes and should not be altered.
*/
#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
+#cboxWrapper {max-width:none;}
#cboxOverlay{position:fixed; width:100%; height:100%;}
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
#cboxContent{position:relative;}
-#cboxLoadedContent{overflow:auto;}
+#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
#cboxTitle{margin:0;}
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
-.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none;}
-.cboxIframe{width:100%; height:100%; display:block; border:0;}
+.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
+.cboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;}
#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
/*
User Style:
- Change the following styles to modify the appearance of ColorBox. They are
+ Change the following styles to modify the appearance of Colorbox. They are
ordered & tabbed in a way that represents the nesting of the generated HTML.
*/
-#cboxOverlay{background:#000;}
-#colorbox{}
+#cboxOverlay{background:#000; opacity: 0.9; filter: alpha(opacity = 90);}
+#colorbox{outline:0;}
#cboxTopLeft{width:14px; height:14px; background:url(images/controls.png) no-repeat 0 0;}
#cboxTopCenter{height:14px; background:url(images/border.png) repeat-x top left;}
#cboxTopRight{width:14px; height:14px; background:url(images/controls.png) no-repeat -36px 0;}
#cboxTitle{position:absolute; bottom:-25px; left:0; text-align:center; width:100%; font-weight:bold; color:#7C7C7C;}
#cboxCurrent{position:absolute; bottom:-25px; left:58px; font-weight:bold; color:#7C7C7C;}
- #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{position:absolute; bottom:-29px; background:url(images/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;}
+ /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
+ #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; position:absolute; bottom:-29px; background:url(images/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;}
+
+ /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
+ #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
+
#cboxPrevious{left:0px; background-position: -51px -25px;}
#cboxPrevious:hover{background-position:-51px 0px;}
#cboxNext{left:27px; background-position:-75px -25px;}
+++ /dev/null
-{
- "name": "colorbox",
- "title": "ColorBox",
- "description": "A lightweight customizable lightbox plugin",
- "keywords": [
- "modal",
- "lightbox",
- "window",
- "popup",
- "ui"
- ],
- "version": "1.3.32",
- "author": {
- "name": "Jack Moore",
- "url": "http://www.jacklmoore.com",
- "email": "jack@colorpowered.com"
- },
- "licenses": [
- {
- "type": "MIT",
- "url": "http://www.opensource.org/licenses/mit-license.php"
- }
- ],
- "homepage": "http://jacklmoore.com/colorbox",
- "demo": "http://jacklmoore.com/colorbox",
- "download": "http://jacklmoore.com/colorbox/colorbox.zip",
- "dependencies": {
- "jquery": ">=1.3.2"
- }
-}
\ No newline at end of file
+++ /dev/null
-{
- "name": "jquery-autosize",
- "version": "1.3.32",
- "main": "./jquery.autosize.js",
- "dependencies": {
- "jquery": ">=1.3.2"
- }
-}
\ No newline at end of file
/*
- ColorBox Core Style:
+ Colorbox Core Style:
The following CSS is consistent between example themes and should not be altered.
*/
#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
+#cboxWrapper {max-width:none;}
#cboxOverlay{position:fixed; width:100%; height:100%;}
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
#cboxContent{position:relative;}
-#cboxLoadedContent{overflow:auto;}
+#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
#cboxTitle{margin:0;}
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
-.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none;}
-.cboxIframe{width:100%; height:100%; display:block; border:0;}
+.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
+.cboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;}
#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
/*
User Style:
- Change the following styles to modify the appearance of ColorBox. They are
+ Change the following styles to modify the appearance of Colorbox. They are
ordered & tabbed in a way that represents the nesting of the generated HTML.
*/
-#cboxOverlay{background:url(images/overlay.png) repeat 0 0;}
-#colorbox{}
+#cboxOverlay{background:url(images/overlay.png) repeat 0 0; opacity: 0.9; filter: alpha(opacity = 90);}
+#colorbox{outline:0;}
#cboxTopLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -101px 0;}
#cboxTopRight{width:21px; height:21px; background:url(images/controls.png) no-repeat -130px 0;}
#cboxBottomLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -101px -29px;}
#cboxLoadedContent{margin-bottom:28px;}
#cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;}
#cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;}
+ #cboxLoadingOverlay{background:url(images/loading_background.png) no-repeat center center;}
+ #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;}
+
+ /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
+ #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
+
+ /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
+ #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
+
#cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;}
#cboxPrevious{position:absolute; bottom:0; left:0; background:url(images/controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;}
#cboxPrevious:hover{background-position:-75px -25px;}
#cboxNext{position:absolute; bottom:0; left:27px; background:url(images/controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;}
#cboxNext:hover{background-position:-50px -25px;}
- #cboxLoadingOverlay{background:url(images/loading_background.png) no-repeat center center;}
- #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;}
#cboxClose{position:absolute; bottom:0; right:0; background:url(images/controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;}
#cboxClose:hover{background-position:-25px -25px;}
.cboxIE #cboxMiddleLeft,
.cboxIE #cboxMiddleRight {
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);
-}
-
-/*
- The following provides PNG transparency support for IE6
- Feel free to remove this and the /ie6/ directory if you have dropped IE6 support.
-*/
-.cboxIE6 #cboxTopLeft{background:url(images/ie6/borderTopLeft.png);}
-.cboxIE6 #cboxTopCenter{background:url(images/ie6/borderTopCenter.png);}
-.cboxIE6 #cboxTopRight{background:url(images/ie6/borderTopRight.png);}
-.cboxIE6 #cboxBottomLeft{background:url(images/ie6/borderBottomLeft.png);}
-.cboxIE6 #cboxBottomCenter{background:url(images/ie6/borderBottomCenter.png);}
-.cboxIE6 #cboxBottomRight{background:url(images/ie6/borderBottomRight.png);}
-.cboxIE6 #cboxMiddleLeft{background:url(images/ie6/borderMiddleLeft.png);}
-.cboxIE6 #cboxMiddleRight{background:url(images/ie6/borderMiddleRight.png);}
-
-.cboxIE6 #cboxTopLeft,
-.cboxIE6 #cboxTopCenter,
-.cboxIE6 #cboxTopRight,
-.cboxIE6 #cboxBottomLeft,
-.cboxIE6 #cboxBottomCenter,
-.cboxIE6 #cboxBottomRight,
-.cboxIE6 #cboxMiddleLeft,
-.cboxIE6 #cboxMiddleRight {
- _behavior: expression(this.src = this.src ? this.src : this.currentStyle.backgroundImage.split('"')[1], this.style.background = "none", this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + this.src + ", sizingMethod='scale')");
-}
+}
\ No newline at end of file
<html>
<head>
<meta charset='utf-8'/>
- <title>ColorBox Examples</title>
+ <title>Colorbox Examples</title>
<style>
body{font:12px/1.2 Verdana, sans-serif; padding:0 10px;}
a:link, a:visited{text-decoration:none; color:#416CE5; border-bottom:1px solid #416CE5;}
h2{font-size:13px; margin:15px 0 0 0;}
</style>
<link rel="stylesheet" href="colorbox.css" />
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="../jquery.colorbox.js"></script>
<script>
$(document).ready(function(){
- //Examples of how to assign the ColorBox event to elements
+ //Examples of how to assign the Colorbox event to elements
$(".group1").colorbox({rel:'group1'});
$(".group2").colorbox({rel:'group2', transition:"fade"});
$(".group3").colorbox({rel:'group3', transition:"none", width:"75%", height:"75%"});
$(".group4").colorbox({rel:'group4', slideshow:true});
$(".ajax").colorbox();
- $(".youtube").colorbox({iframe:true, innerWidth:425, innerHeight:344});
+ $(".youtube").colorbox({iframe:true, innerWidth:640, innerHeight:390});
$(".vimeo").colorbox({iframe:true, innerWidth:500, innerHeight:409});
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
$(".inline").colorbox({inline:true, width:"50%"});
onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
});
+
+ $('.non-retina').colorbox({rel:'group5', transition:'none'})
+ $('.retina').colorbox({rel:'group5', transition:'none', retinaImage:true, retinaUrl:true});
//Example of preserving a JavaScript event for inline calls.
$("#click").click(function(){
</script>
</head>
<body>
- <h1>ColorBox Demonstration</h1>
+ <h1>Colorbox Demonstration</h1>
<h2>Elastic Transition</h2>
<p><a class="group1" href="../content/ohoopee1.jpg" title="Me and my grandfather on the Ohoopee.">Grouped Photo 1</a></p>
<p><a class="group1" href="../content/ohoopee2.jpg" title="On the Ohoopee as a child">Grouped Photo 2</a></p>
<h2>Other Content Types</h2>
<p><a class='ajax' href="../content/ajax.html" title="Homer Defined">Outside HTML (Ajax)</a></p>
- <p><a class='youtube' href="http://www.youtube.com/embed/617ANIA5Rqs?rel=0&wmode=transparent" title="The Knife: We Share Our Mother's Health">Flash / Video (Iframe/Direct Link To YouTube)</a></p>
+ <p><a class='youtube' href="http://www.youtube.com/embed/VOJyrQa_WR4?rel=0&wmode=transparent">Flash / Video (Iframe/Direct Link To YouTube)</a></p>
<p><a class='vimeo' href="http://player.vimeo.com/video/2285902" title="Röyksopp: Remind Me">Flash / Video (Iframe/Direct Link To Vimeo)</a></p>
<p><a class='iframe' href="http://wikipedia.com">Outside Webpage (Iframe)</a></p>
<p><a class='inline' href="#inline_content">Inline HTML</a></p>
<h2>Demonstration of using callbacks</h2>
<p><a class='callbacks' href="../content/marylou.jpg" title="Marylou on Cumberland Island">Example with alerts</a>. Callbacks and event-hooks allow users to extend functionality without having to rewrite parts of the plugin.</p>
+
+ <h2>Retina Images</h2>
+ <p><a class="retina" href="../content/daisy.jpg" title="Retina">Retina</a></p>
+ <p><a class="non-retina" href="../content/daisy.jpg" title="Non-Retina">Non-Retina</a></p>
+
<!-- This contains the hidden content for inline calls -->
<div style='display:none'>
<div id='inline_content' style='padding:10px; background:#fff;'>
<p>The inline option preserves bound JavaScript events and changes, and it puts the content back where it came from when it is closed.</p>
<p><a id="click" href="#" style='padding:5px; background:#ccc;'>Click me, it will be preserved!</a></p>
- <p><strong>If you try to open a new ColorBox while it is already open, it will update itself with the new content.</strong></p>
+ <p><strong>If you try to open a new Colorbox while it is already open, it will update itself with the new content.</strong></p>
<p>Updating Content Example:<br />
<a class="ajax" href="../content/ajax.html">Click here to load new content</a></p>
</div>
/*
- ColorBox Core Style:
+ Colorbox Core Style:
The following CSS is consistent between example themes and should not be altered.
*/
#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
+#cboxWrapper {max-width:none;}
#cboxOverlay{position:fixed; width:100%; height:100%;}
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
#cboxContent{position:relative;}
-#cboxLoadedContent{overflow:auto;}
+#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
#cboxTitle{margin:0;}
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
-.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none;}
-.cboxIframe{width:100%; height:100%; display:block; border:0;}
+.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
+.cboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;}
#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
/*
User Style:
- Change the following styles to modify the appearance of ColorBox. They are
+ Change the following styles to modify the appearance of Colorbox. They are
ordered & tabbed in a way that represents the nesting of the generated HTML.
*/
-#cboxOverlay{background:#fff;}
-#colorbox{}
- #cboxContent{margin-top:32px; overflow:visible;}
+#cboxOverlay{background:#fff; opacity: 0.9; filter: alpha(opacity = 90);}
+#colorbox{outline:0;}
+ #cboxContent{margin-top:32px; overflow:visible; background:#000;}
.cboxIframe{background:#fff;}
#cboxError{padding:50px; border:1px solid #ccc;}
#cboxLoadedContent{background:#000; padding:1px;}
#cboxLoadingOverlay{background:#000;}
#cboxTitle{position:absolute; top:-22px; left:0; color:#000;}
#cboxCurrent{position:absolute; top:-22px; right:205px; text-indent:-9999px;}
- #cboxSlideshow, #cboxPrevious, #cboxNext, #cboxClose{text-indent:-9999px; width:20px; height:20px; position:absolute; top:-20px; background:url(images/controls.png) no-repeat 0 0;}
+
+ /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
+ #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; text-indent:-9999px; width:20px; height:20px; position:absolute; top:-20px; background:url(images/controls.png) no-repeat 0 0;}
+
+ /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
+ #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
+
#cboxPrevious{background-position:0px 0px; right:44px;}
#cboxPrevious:hover{background-position:0px -25px;}
#cboxNext{background-position:-25px 0px; right:22px;}
<html>
<head>
<meta charset='utf-8'/>
- <title>ColorBox Examples</title>
+ <title>Colorbox Examples</title>
<style>
body{font:12px/1.2 Verdana, sans-serif; padding:0 10px;}
a:link, a:visited{text-decoration:none; color:#416CE5; border-bottom:1px solid #416CE5;}
h2{font-size:13px; margin:15px 0 0 0;}
</style>
<link rel="stylesheet" href="colorbox.css" />
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="../jquery.colorbox.js"></script>
<script>
$(document).ready(function(){
- //Examples of how to assign the ColorBox event to elements
+ //Examples of how to assign the Colorbox event to elements
$(".group1").colorbox({rel:'group1'});
$(".group2").colorbox({rel:'group2', transition:"fade"});
$(".group3").colorbox({rel:'group3', transition:"none", width:"75%", height:"75%"});
$(".group4").colorbox({rel:'group4', slideshow:true});
$(".ajax").colorbox();
- $(".youtube").colorbox({iframe:true, innerWidth:425, innerHeight:344});
+ $(".youtube").colorbox({iframe:true, innerWidth:640, innerHeight:390});
$(".vimeo").colorbox({iframe:true, innerWidth:500, innerHeight:409});
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
$(".inline").colorbox({inline:true, width:"50%"});
onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
});
+
+ $('.non-retina').colorbox({rel:'group5', transition:'none'})
+ $('.retina').colorbox({rel:'group5', transition:'none', retinaImage:true, retinaUrl:true});
//Example of preserving a JavaScript event for inline calls.
$("#click").click(function(){
</script>
</head>
<body>
- <h1>ColorBox Demonstration</h1>
+ <h1>Colorbox Demonstration</h1>
<h2>Elastic Transition</h2>
<p><a class="group1" href="../content/ohoopee1.jpg" title="Me and my grandfather on the Ohoopee.">Grouped Photo 1</a></p>
<p><a class="group1" href="../content/ohoopee2.jpg" title="On the Ohoopee as a child">Grouped Photo 2</a></p>
<h2>Other Content Types</h2>
<p><a class='ajax' href="../content/ajax.html" title="Homer Defined">Outside HTML (Ajax)</a></p>
- <p><a class='youtube' href="http://www.youtube.com/embed/617ANIA5Rqs?rel=0&wmode=transparent" title="The Knife: We Share Our Mother's Health">Flash / Video (Iframe/Direct Link To YouTube)</a></p>
+ <p><a class='youtube' href="http://www.youtube.com/embed/VOJyrQa_WR4?rel=0&wmode=transparent">Flash / Video (Iframe/Direct Link To YouTube)</a></p>
<p><a class='vimeo' href="http://player.vimeo.com/video/2285902" title="Röyksopp: Remind Me">Flash / Video (Iframe/Direct Link To Vimeo)</a></p>
<p><a class='iframe' href="http://wikipedia.com">Outside Webpage (Iframe)</a></p>
<p><a class='inline' href="#inline_content">Inline HTML</a></p>
<h2>Demonstration of using callbacks</h2>
<p><a class='callbacks' href="../content/marylou.jpg" title="Marylou on Cumberland Island">Example with alerts</a>. Callbacks and event-hooks allow users to extend functionality without having to rewrite parts of the plugin.</p>
+
+ <h2>Retina Images</h2>
+ <p><a class="retina" href="../content/daisy.jpg" title="Retina">Retina</a></p>
+ <p><a class="non-retina" href="../content/daisy.jpg" title="Non-Retina">Non-Retina</a></p>
+
<!-- This contains the hidden content for inline calls -->
<div style='display:none'>
<div id='inline_content' style='padding:10px; background:#fff;'>
<p>The inline option preserves bound JavaScript events and changes, and it puts the content back where it came from when it is closed.</p>
<p><a id="click" href="#" style='padding:5px; background:#ccc;'>Click me, it will be preserved!</a></p>
- <p><strong>If you try to open a new ColorBox while it is already open, it will update itself with the new content.</strong></p>
+ <p><strong>If you try to open a new Colorbox while it is already open, it will update itself with the new content.</strong></p>
<p>Updating Content Example:<br />
<a class="ajax" href="../content/ajax.html">Click here to load new content</a></p>
</div>
/*
- ColorBox Core Style:
+ Colorbox Core Style:
The following CSS is consistent between example themes and should not be altered.
*/
#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
+#cboxWrapper {max-width:none;}
#cboxOverlay{position:fixed; width:100%; height:100%;}
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
#cboxContent{position:relative;}
-#cboxLoadedContent{overflow:auto;}
+#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
#cboxTitle{margin:0;}
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
-.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none;}
-.cboxIframe{width:100%; height:100%; display:block; border:0;}
+.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
+.cboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;}
#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
/*
User Style:
- Change the following styles to modify the appearance of ColorBox. They are
+ Change the following styles to modify the appearance of Colorbox. They are
ordered & tabbed in a way that represents the nesting of the generated HTML.
*/
-#cboxOverlay{background:#000;}
-#colorbox{}
- #cboxContent{margin-top:20px;}
+#cboxOverlay{background:#000; opacity: 0.9; filter: alpha(opacity = 90);}
+#colorbox{outline:0;}
+ #cboxContent{margin-top:20px;background:#000;}
.cboxIframe{background:#fff;}
#cboxError{padding:50px; border:1px solid #ccc;}
#cboxLoadedContent{border:5px solid #000; background:#fff;}
#cboxTitle{position:absolute; top:-20px; left:0; color:#ccc;}
#cboxCurrent{position:absolute; top:-20px; right:0px; color:#ccc;}
+ #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;}
+
+ /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
+ #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
+
+ /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
+ #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
+
#cboxSlideshow{position:absolute; top:-20px; right:90px; color:#fff;}
#cboxPrevious{position:absolute; top:50%; left:5px; margin-top:-32px; background:url(images/controls.png) no-repeat top left; width:28px; height:65px; text-indent:-9999px;}
#cboxPrevious:hover{background-position:bottom left;}
#cboxNext{position:absolute; top:50%; right:5px; margin-top:-32px; background:url(images/controls.png) no-repeat top right; width:28px; height:65px; text-indent:-9999px;}
#cboxNext:hover{background-position:bottom right;}
- #cboxLoadingOverlay{background:#000;}
- #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;}
#cboxClose{position:absolute; top:5px; right:5px; display:block; background:url(images/controls.png) no-repeat top center; width:38px; height:19px; text-indent:-9999px;}
- #cboxClose:hover{background-position:bottom center;}
\ No newline at end of file
+ #cboxClose:hover{background-position:bottom center;}
<html>
<head>
<meta charset='utf-8'/>
- <title>ColorBox Examples</title>
+ <title>Colorbox Examples</title>
<style>
body{font:12px/1.2 Verdana, sans-serif; padding:0 10px;}
a:link, a:visited{text-decoration:none; color:#416CE5; border-bottom:1px solid #416CE5;}
h2{font-size:13px; margin:15px 0 0 0;}
</style>
<link rel="stylesheet" href="colorbox.css" />
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="../jquery.colorbox.js"></script>
<script>
$(document).ready(function(){
- //Examples of how to assign the ColorBox event to elements
+ //Examples of how to assign the Colorbox event to elements
$(".group1").colorbox({rel:'group1'});
$(".group2").colorbox({rel:'group2', transition:"fade"});
$(".group3").colorbox({rel:'group3', transition:"none", width:"75%", height:"75%"});
$(".group4").colorbox({rel:'group4', slideshow:true});
$(".ajax").colorbox();
- $(".youtube").colorbox({iframe:true, innerWidth:425, innerHeight:344});
+ $(".youtube").colorbox({iframe:true, innerWidth:640, innerHeight:390});
$(".vimeo").colorbox({iframe:true, innerWidth:500, innerHeight:409});
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
$(".inline").colorbox({inline:true, width:"50%"});
onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
});
+
+ $('.non-retina').colorbox({rel:'group5', transition:'none'})
+ $('.retina').colorbox({rel:'group5', transition:'none', retinaImage:true, retinaUrl:true});
//Example of preserving a JavaScript event for inline calls.
$("#click").click(function(){
</script>
</head>
<body>
- <h1>ColorBox Demonstration</h1>
+ <h1>Colorbox Demonstration</h1>
<h2>Elastic Transition</h2>
<p><a class="group1" href="../content/ohoopee1.jpg" title="Me and my grandfather on the Ohoopee.">Grouped Photo 1</a></p>
<p><a class="group1" href="../content/ohoopee2.jpg" title="On the Ohoopee as a child">Grouped Photo 2</a></p>
<h2>Other Content Types</h2>
<p><a class='ajax' href="../content/ajax.html" title="Homer Defined">Outside HTML (Ajax)</a></p>
- <p><a class='youtube' href="http://www.youtube.com/embed/617ANIA5Rqs?rel=0&wmode=transparent" title="The Knife: We Share Our Mother's Health">Flash / Video (Iframe/Direct Link To YouTube)</a></p>
+ <p><a class='youtube' href="http://www.youtube.com/embed/VOJyrQa_WR4?rel=0&wmode=transparent">Flash / Video (Iframe/Direct Link To YouTube)</a></p>
<p><a class='vimeo' href="http://player.vimeo.com/video/2285902" title="Röyksopp: Remind Me">Flash / Video (Iframe/Direct Link To Vimeo)</a></p>
<p><a class='iframe' href="http://wikipedia.com">Outside Webpage (Iframe)</a></p>
<p><a class='inline' href="#inline_content">Inline HTML</a></p>
<h2>Demonstration of using callbacks</h2>
<p><a class='callbacks' href="../content/marylou.jpg" title="Marylou on Cumberland Island">Example with alerts</a>. Callbacks and event-hooks allow users to extend functionality without having to rewrite parts of the plugin.</p>
+
+ <h2>Retina Images</h2>
+ <p><a class="retina" href="../content/daisy.jpg" title="Retina">Retina</a></p>
+ <p><a class="non-retina" href="../content/daisy.jpg" title="Non-Retina">Non-Retina</a></p>
+
<!-- This contains the hidden content for inline calls -->
<div style='display:none'>
<div id='inline_content' style='padding:10px; background:#fff;'>
<p>The inline option preserves bound JavaScript events and changes, and it puts the content back where it came from when it is closed.</p>
<p><a id="click" href="#" style='padding:5px; background:#ccc;'>Click me, it will be preserved!</a></p>
- <p><strong>If you try to open a new ColorBox while it is already open, it will update itself with the new content.</strong></p>
+ <p><strong>If you try to open a new Colorbox while it is already open, it will update itself with the new content.</strong></p>
<p>Updating Content Example:<br />
<a class="ajax" href="../content/ajax.html">Click here to load new content</a></p>
</div>
/*
- ColorBox Core Style:
+ Colorbox Core Style:
The following CSS is consistent between example themes and should not be altered.
*/
#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
+#cboxWrapper {max-width:none;}
#cboxOverlay{position:fixed; width:100%; height:100%;}
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
#cboxContent{position:relative;}
-#cboxLoadedContent{overflow:auto;}
+#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
#cboxTitle{margin:0;}
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
-.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none;}
-.cboxIframe{width:100%; height:100%; display:block; border:0;}
+.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
+.cboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;}
#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
/*
User Style:
- Change the following styles to modify the appearance of ColorBox. They are
+ Change the following styles to modify the appearance of Colorbox. They are
ordered & tabbed in a way that represents the nesting of the generated HTML.
*/
-#cboxOverlay{background:#fff;}
-#colorbox{}
+#cboxOverlay{background:#fff; opacity: 0.9; filter: alpha(opacity = 90);}
+#colorbox{outline:0;}
#cboxTopLeft{width:25px; height:25px; background:url(images/border1.png) no-repeat 0 0;}
#cboxTopCenter{height:25px; background:url(images/border1.png) repeat-x 0 -50px;}
#cboxTopRight{width:25px; height:25px; background:url(images/border1.png) no-repeat -25px 0;}
#cboxLoadedContent{margin-bottom:20px;}
#cboxTitle{position:absolute; bottom:0px; left:0; text-align:center; width:100%; color:#999;}
#cboxCurrent{position:absolute; bottom:0px; left:100px; color:#999;}
+ #cboxLoadingOverlay{background:#fff url(images/loading.gif) no-repeat 5px 5px;}
+
+ /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
+ #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
+
+ /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
+ #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
+
#cboxSlideshow{position:absolute; bottom:0px; right:42px; color:#444;}
#cboxPrevious{position:absolute; bottom:0px; left:0; color:#444;}
#cboxNext{position:absolute; bottom:0px; left:63px; color:#444;}
- #cboxLoadingOverlay{background:#fff url(images/loading.gif) no-repeat 5px 5px;}
#cboxClose{position:absolute; bottom:0; right:0; display:block; color:#444;}
/*
.cboxIE #cboxMiddleLeft,
.cboxIE #cboxMiddleRight {
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);
-}
-
-/*
- The following provides PNG transparency support for IE6
- Feel free to remove this and the /ie6/ directory if you have dropped IE6 support.
-*/
-.cboxIE6 #cboxTopLeft{background:url(images/ie6/borderTopLeft.png);}
-.cboxIE6 #cboxTopCenter{background:url(images/ie6/borderTopCenter.png);}
-.cboxIE6 #cboxTopRight{background:url(images/ie6/borderTopRight.png);}
-.cboxIE6 #cboxBottomLeft{background:url(images/ie6/borderBottomLeft.png);}
-.cboxIE6 #cboxBottomCenter{background:url(images/ie6/borderBottomCenter.png);}
-.cboxIE6 #cboxBottomRight{background:url(images/ie6/borderBottomRight.png);}
-.cboxIE6 #cboxMiddleLeft{background:url(images/ie6/borderMiddleLeft.png);}
-.cboxIE6 #cboxMiddleRight{background:url(images/ie6/borderMiddleRight.png);}
-
-.cboxIE6 #cboxTopLeft,
-.cboxIE6 #cboxTopCenter,
-.cboxIE6 #cboxTopRight,
-.cboxIE6 #cboxBottomLeft,
-.cboxIE6 #cboxBottomCenter,
-.cboxIE6 #cboxBottomRight,
-.cboxIE6 #cboxMiddleLeft,
-.cboxIE6 #cboxMiddleRight {
- _behavior: expression(this.src = this.src ? this.src : this.currentStyle.backgroundImage.split('"')[1], this.style.background = "none", this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + this.src + ", sizingMethod='scale')");
-}
+}
\ No newline at end of file
<html>
<head>
<meta charset='utf-8'/>
- <title>ColorBox Examples</title>
+ <title>Colorbox Examples</title>
<style>
body{font:12px/1.2 Verdana, sans-serif; padding:0 10px;}
a:link, a:visited{text-decoration:none; color:#416CE5; border-bottom:1px solid #416CE5;}
h2{font-size:13px; margin:15px 0 0 0;}
</style>
<link rel="stylesheet" href="colorbox.css" />
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="../jquery.colorbox.js"></script>
<script>
$(document).ready(function(){
- //Examples of how to assign the ColorBox event to elements
+ //Examples of how to assign the Colorbox event to elements
$(".group1").colorbox({rel:'group1'});
$(".group2").colorbox({rel:'group2', transition:"fade"});
$(".group3").colorbox({rel:'group3', transition:"none", width:"75%", height:"75%"});
$(".group4").colorbox({rel:'group4', slideshow:true});
$(".ajax").colorbox();
- $(".youtube").colorbox({iframe:true, innerWidth:425, innerHeight:344});
+ $(".youtube").colorbox({iframe:true, innerWidth:640, innerHeight:390});
$(".vimeo").colorbox({iframe:true, innerWidth:500, innerHeight:409});
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
$(".inline").colorbox({inline:true, width:"50%"});
onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
});
+
+ $('.non-retina').colorbox({rel:'group5', transition:'none'})
+ $('.retina').colorbox({rel:'group5', transition:'none', retinaImage:true, retinaUrl:true});
//Example of preserving a JavaScript event for inline calls.
$("#click").click(function(){
</script>
</head>
<body>
- <h1>ColorBox Demonstration</h1>
+ <h1>Colorbox Demonstration</h1>
<h2>Elastic Transition</h2>
<p><a class="group1" href="../content/ohoopee1.jpg" title="Me and my grandfather on the Ohoopee.">Grouped Photo 1</a></p>
<p><a class="group1" href="../content/ohoopee2.jpg" title="On the Ohoopee as a child">Grouped Photo 2</a></p>
<h2>Other Content Types</h2>
<p><a class='ajax' href="../content/ajax.html" title="Homer Defined">Outside HTML (Ajax)</a></p>
- <p><a class='youtube' href="http://www.youtube.com/embed/617ANIA5Rqs?rel=0&wmode=transparent" title="The Knife: We Share Our Mother's Health">Flash / Video (Iframe/Direct Link To YouTube)</a></p>
+ <p><a class='youtube' href="http://www.youtube.com/embed/VOJyrQa_WR4?rel=0&wmode=transparent">Flash / Video (Iframe/Direct Link To YouTube)</a></p>
<p><a class='vimeo' href="http://player.vimeo.com/video/2285902" title="Röyksopp: Remind Me">Flash / Video (Iframe/Direct Link To Vimeo)</a></p>
<p><a class='iframe' href="http://wikipedia.com">Outside Webpage (Iframe)</a></p>
<p><a class='inline' href="#inline_content">Inline HTML</a></p>
<h2>Demonstration of using callbacks</h2>
<p><a class='callbacks' href="../content/marylou.jpg" title="Marylou on Cumberland Island">Example with alerts</a>. Callbacks and event-hooks allow users to extend functionality without having to rewrite parts of the plugin.</p>
+
+ <h2>Retina Images</h2>
+ <p><a class="retina" href="../content/daisy.jpg" title="Retina">Retina</a></p>
+ <p><a class="non-retina" href="../content/daisy.jpg" title="Non-Retina">Non-Retina</a></p>
+
<!-- This contains the hidden content for inline calls -->
<div style='display:none'>
<div id='inline_content' style='padding:10px; background:#fff;'>
<p>The inline option preserves bound JavaScript events and changes, and it puts the content back where it came from when it is closed.</p>
<p><a id="click" href="#" style='padding:5px; background:#ccc;'>Click me, it will be preserved!</a></p>
- <p><strong>If you try to open a new ColorBox while it is already open, it will update itself with the new content.</strong></p>
+ <p><strong>If you try to open a new Colorbox while it is already open, it will update itself with the new content.</strong></p>
<p>Updating Content Example:<br />
<a class="ajax" href="../content/ajax.html">Click here to load new content</a></p>
</div>
/*
- ColorBox Core Style:
+ Colorbox Core Style:
The following CSS is consistent between example themes and should not be altered.
*/
#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
+#cboxWrapper {max-width:none;}
#cboxOverlay{position:fixed; width:100%; height:100%;}
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
#cboxContent{position:relative;}
-#cboxLoadedContent{overflow:auto;}
+#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
#cboxTitle{margin:0;}
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
-.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none;}
-.cboxIframe{width:100%; height:100%; display:block; border:0;}
+.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
+.cboxIframe{width:100%; height:100%; display:block; border:0; padding:0; margin:0;}
#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}
/*
User Style:
- Change the following styles to modify the appearance of ColorBox. They are
+ Change the following styles to modify the appearance of Colorbox. They are
ordered & tabbed in a way that represents the nesting of the generated HTML.
*/
-#cboxOverlay{background:#000;}
-#colorbox{}
+#cboxOverlay{background:#000; opacity: 0.9; filter: alpha(opacity = 90);}
+#colorbox{outline:0;}
#cboxTopLeft{width:14px; height:14px; background:url(images/controls.png) no-repeat 0 0;}
#cboxTopCenter{height:14px; background:url(images/border.png) repeat-x top left;}
#cboxTopRight{width:14px; height:14px; background:url(images/controls.png) no-repeat -36px 0;}
#cboxTitle{position:absolute; bottom:-25px; left:0; text-align:center; width:100%; font-weight:bold; color:#7C7C7C;}
#cboxCurrent{position:absolute; bottom:-25px; left:58px; font-weight:bold; color:#7C7C7C;}
- #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{position:absolute; bottom:-29px; background:url(images/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;}
+ /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
+ #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; position:absolute; bottom:-29px; background:url(images/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;}
+
+ /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
+ #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}
+
#cboxPrevious{left:0px; background-position: -51px -25px;}
#cboxPrevious:hover{background-position:-51px 0px;}
#cboxNext{left:27px; background-position:-75px -25px;}
<html>
<head>
<meta charset='utf-8'/>
- <title>ColorBox Examples</title>
+ <title>Colorbox Examples</title>
<style>
body{font:12px/1.2 Verdana, sans-serif; padding:0 10px;}
a:link, a:visited{text-decoration:none; color:#416CE5; border-bottom:1px solid #416CE5;}
h2{font-size:13px; margin:15px 0 0 0;}
</style>
<link rel="stylesheet" href="colorbox.css" />
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="../jquery.colorbox.js"></script>
<script>
$(document).ready(function(){
- //Examples of how to assign the ColorBox event to elements
+ //Examples of how to assign the Colorbox event to elements
$(".group1").colorbox({rel:'group1'});
$(".group2").colorbox({rel:'group2', transition:"fade"});
$(".group3").colorbox({rel:'group3', transition:"none", width:"75%", height:"75%"});
$(".group4").colorbox({rel:'group4', slideshow:true});
$(".ajax").colorbox();
- $(".youtube").colorbox({iframe:true, innerWidth:425, innerHeight:344});
+ $(".youtube").colorbox({iframe:true, innerWidth:640, innerHeight:390});
$(".vimeo").colorbox({iframe:true, innerWidth:500, innerHeight:409});
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
$(".inline").colorbox({inline:true, width:"50%"});
onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
});
+
+ $('.non-retina').colorbox({rel:'group5', transition:'none'})
+ $('.retina').colorbox({rel:'group5', transition:'none', retinaImage:true, retinaUrl:true});
//Example of preserving a JavaScript event for inline calls.
$("#click").click(function(){
</script>
</head>
<body>
- <h1>ColorBox Demonstration</h1>
+ <h1>Colorbox Demonstration</h1>
<h2>Elastic Transition</h2>
<p><a class="group1" href="../content/ohoopee1.jpg" title="Me and my grandfather on the Ohoopee.">Grouped Photo 1</a></p>
<p><a class="group1" href="../content/ohoopee2.jpg" title="On the Ohoopee as a child">Grouped Photo 2</a></p>
<h2>Other Content Types</h2>
<p><a class='ajax' href="../content/ajax.html" title="Homer Defined">Outside HTML (Ajax)</a></p>
- <p><a class='youtube' href="http://www.youtube.com/embed/617ANIA5Rqs?rel=0&wmode=transparent" title="The Knife: We Share Our Mother's Health">Flash / Video (Iframe/Direct Link To YouTube)</a></p>
+ <p><a class='youtube' href="http://www.youtube.com/embed/VOJyrQa_WR4?rel=0&wmode=transparent">Flash / Video (Iframe/Direct Link To YouTube)</a></p>
<p><a class='vimeo' href="http://player.vimeo.com/video/2285902" title="Röyksopp: Remind Me">Flash / Video (Iframe/Direct Link To Vimeo)</a></p>
<p><a class='iframe' href="http://wikipedia.com">Outside Webpage (Iframe)</a></p>
<p><a class='inline' href="#inline_content">Inline HTML</a></p>
<h2>Demonstration of using callbacks</h2>
<p><a class='callbacks' href="../content/marylou.jpg" title="Marylou on Cumberland Island">Example with alerts</a>. Callbacks and event-hooks allow users to extend functionality without having to rewrite parts of the plugin.</p>
+
+ <h2>Retina Images</h2>
+ <p><a class="retina" href="../content/daisy.jpg" title="Retina">Retina</a></p>
+ <p><a class="non-retina" href="../content/daisy.jpg" title="Non-Retina">Non-Retina</a></p>
+
<!-- This contains the hidden content for inline calls -->
<div style='display:none'>
<div id='inline_content' style='padding:10px; background:#fff;'>
<p>The inline option preserves bound JavaScript events and changes, and it puts the content back where it came from when it is closed.</p>
<p><a id="click" href="#" style='padding:5px; background:#ccc;'>Click me, it will be preserved!</a></p>
- <p><strong>If you try to open a new ColorBox while it is already open, it will update itself with the new content.</strong></p>
+ <p><strong>If you try to open a new Colorbox while it is already open, it will update itself with the new content.</strong></p>
<p>Updating Content Example:<br />
<a class="ajax" href="../content/ajax.html">Click here to load new content</a></p>
</div>
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Arabic (ar)
+ translated by: A.Rhman Sayes
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "الصورة {current} من {total}",
+ previous: "السابق",
+ next: "التالي",
+ close: "إغلاق",
+ xhrError: "حدث خطأ أثناء تحميل المحتوى.",
+ imgError: "حدث خطأ أثناء تحميل الصورة.",
+ slideshowStart: "تشغيل العرض",
+ slideshowStop: "إيقاف العرض"
+});
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Bulgarian (bg)
+ translated by: Marian M.Bida
+ site: webmax.bg
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "изображение {current} от {total}",
+ previous: "предишна",
+ next: "следваща",
+ close: "затвори",
+ xhrError: "Неуспешно зареждане на съдържанието.",
+ imgError: "Неуспешно зареждане на изображението.",
+ slideshowStart: "пусни слайд-шоу",
+ slideshowStop: "спри слайд-шоу"
+});
--- /dev/null
+/*
+jQuery Colorbox language configuration
+language: Bengali (bn)
+translated by: Arkaprava Majumder
+http://github.com/arkaindas
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+current: "ছবি {current} এর {total}",
+previous: "আগে",
+next: "পরে",
+close: "বন্ধ",
+xhrError: "এই কন্টেন্ট লোড করা যায়নি.",
+imgError: "এই ছবিটি লোড করা যায়নি.",
+slideshowStart: "স্লাইডশো শুরু",
+slideshowStop: "স্লাইডশো বন্ধ"
+});
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Catala (ca)
+ translated by: eduard salla
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "Imatge {current} de {total}",
+ previous: "Anterior",
+ next: "Següent",
+ close: "Tancar",
+ xhrError: "Error en la càrrega del contingut.",
+ imgError: "Error en la càrrega de la imatge."
+});
/*
- jQuery ColorBox language configuration
+ jQuery Colorbox language configuration
language: Czech (cs)
translated by: Filip Novak
site: mame.napilno.cz/filip-novak
next: "Následující",
close: "Zavřít",
xhrError: "Obsah se nepodařilo načíst.",
- imgError: "Obrázek se nepodařilo načíst."
+ imgError: "Obrázek se nepodařilo načíst.",
+ slideshowStart: "Spustit slideshow",
+ slideshowStop: "Zastavit slideshow"
});
\ No newline at end of file
/*
- jQuery ColorBox language configuration
+ jQuery Colorbox language configuration
language: Danish (da)
translated by: danieljuhl
site: danieljuhl.dk
next: "Næste",
close: "Luk",
xhrError: "Indholdet fejlede i indlæsningen.",
- imgError: "Billedet fejlede i indlæsningen."
+ imgError: "Billedet fejlede i indlæsningen.",
+ slideshowStart: "Start slideshow",
+ slideshowStop: "Stop slideshow"
});
/*
- jQuery ColorBox language configuration
+ jQuery Colorbox language configuration
language: German (de)
translated by: wallenium
*/
next: "Vor",
close: "Schließen",
xhrError: "Dieser Inhalt konnte nicht geladen werden.",
- imgError: "Dieses Bild konnte nicht geladen werden."
+ imgError: "Dieses Bild konnte nicht geladen werden.",
+ slideshowStart: "Slideshow starten",
+ slideshowStop: "Slideshow anhalten"
});
\ No newline at end of file
/*
- jQuery ColorBox language configuration
+ jQuery Colorbox language configuration
language: Spanish (es)
translated by: migolo
*/
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Estonian (et)
+ translated by: keevitaja
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "{current}/{total}",
+ previous: "eelmine",
+ next: "järgmine",
+ close: "sulge",
+ xhrError: "Sisu ei õnnestunud laadida.",
+ imgError: "Pilti ei õnnestunud laadida.",
+ slideshowStart: "Käivita slaidid",
+ slideshowStop: "Peata slaidid"
+});
\ No newline at end of file
--- /dev/null
+/*\r
+ jQuery Colorbox language configuration\r
+ language: Persian (Farsi)\r
+ translated by: Mahdi Jaberzadeh Ansari (MJZSoft)\r
+ site: www.mjzsoft.ir\r
+ email: mahdijaberzadehansari (at) yahoo.co.uk\r
+ Please note : Persian language is right to left like arabic.\r
+*/\r
+jQuery.extend(jQuery.colorbox.settings, {\r
+ current: "تصویر {current} از {total}",\r
+ previous: "قبلی",\r
+ next: "بعدی",\r
+ close: "بستن",\r
+ xhrError: "متاسفانه محتویات مورد نظر قابل نمایش نیست.",\r
+ imgError: "متاسفانه بارگذاری این عکس با مشکل مواجه شده است.",\r
+ slideshowStart: "آغاز نمایش خودکار",\r
+ slideshowStop: "توقف نمایش خودکار"\r
+});\r
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Finnish (fi)
+ translated by: Mikko
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "Kuva {current} / {total}",
+ previous: "Edellinen",
+ next: "Seuraava",
+ close: "Sulje",
+ xhrError: "Sisällön lataaminen epäonnistui.",
+ imgError: "Kuvan lataaminen epäonnistui.",
+ slideshowStart: "Aloita kuvaesitys.",
+ slideshowStop: "Lopeta kuvaesitys."
+});
/*
- jQuery ColorBox language configuration
+ jQuery Colorbox language configuration
language: French (fr)
translated by: oaubert
*/
jQuery.extend(jQuery.colorbox.settings, {
-current: "image {current} sur {total}",
-previous: "précédente",
-next: "suivante",
-close: "fermer",
-xhrError: "Impossible de charger ce contenu.",
-imgError: "Impossible de charger cette image."
+ current: "image {current} sur {total}",
+ previous: "précédente",
+ next: "suivante",
+ close: "fermer",
+ xhrError: "Impossible de charger ce contenu.",
+ imgError: "Impossible de charger cette image.",
+ slideshowStart: "démarrer la présentation",
+ slideshowStop: "arrêter la présentation"
});
-
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Galician (gl)
+ translated by: donatorouco
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "Imaxe {current} de {total}",
+ previous: "Anterior",
+ next: "Seguinte",
+ close: "Pechar",
+ xhrError: "Erro na carga do contido.",
+ imgError: "Erro na carga da imaxe."
+});
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Greek (gr)
+ translated by: S.Demirtzoglou
+ site: webiq.gr
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "Εικόνα {current} από {total}",
+ previous: "Προηγούμενη",
+ next: "Επόμενη",
+ close: "Απόκρυψη",
+ xhrError: "Το περιεχόμενο δεν μπόρεσε να φορτωθεί.",
+ imgError: "Απέτυχε η φόρτωση της εικόνας.",
+ slideshowStart: "Έναρξη παρουσίασης",
+ slideshowStop: "Παύση παρουσίασης"
+});
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Hebrew (he)
+ translated by: David Cohen
+ site: dav.co.il
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "תמונה {current} מתוך {total}",
+ previous: "הקודם",
+ next: "הבא",
+ close: "סגור",
+ xhrError: "שגיאה בטעינת התוכן.",
+ imgError: "שגיאה בטעינת התמונה.",
+ slideshowStart: "התחל מצגת",
+ slideshowStop: "עצור מצגת"
+});
--- /dev/null
+/*\r
+ jQuery Colorbox language configuration\r
+ language: Croatian (hr)\r
+ translated by: Mladen Bicanic (base.hr)\r
+*/\r
+jQuery.extend(jQuery.colorbox.settings, {\r
+ current: "Slika {current} od {total}",\r
+ previous: "Prethodna",\r
+ next: "Sljedeća",\r
+ close: "Zatvori",\r
+ xhrError: "Neuspješno učitavanje sadržaja.",\r
+ imgError: "Neuspješno učitavanje slike.",\r
+ slideshowStart: "Pokreni slideshow",\r
+ slideshowStop: "Zaustavi slideshow"\r
+});
\ No newline at end of file
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Hungarian (hu)
+ translated by: kovadani
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "{current}/{total} kép",
+ previous: "Előző",
+ next: "Következő",
+ close: "Bezár",
+ xhrError: "A tartalmat nem sikerült betölteni.",
+ imgError: "A képet nem sikerült betölteni.",
+ slideshowStart: "Diavetítés indítása",
+ slideshowStop: "Diavetítés leállítása"
+});
\ No newline at end of file
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Indonesian (id)
+ translated by: sarwasunda
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "ke {current} dari {total}",
+ previous: "Sebelumnya",
+ next: "Berikutnya",
+ close: "Tutup",
+ xhrError: "Konten ini tidak dapat dimuat.",
+ imgError: "Gambar ini tidak dapat dimuat.",
+ slideshowStart: "Putar",
+ slideshowStop: "Berhenti"
+});
/*
- jQuery ColorBox language configuration
+ jQuery Colorbox language configuration
language: Italian (it)
translated by: maur8ino
*/
next: "Successiva",
close: "Chiudi",
xhrError: "Errore nel caricamento del contenuto.",
- imgError: "Errore nel caricamento dell'immagine."
+ imgError: "Errore nel caricamento dell'immagine.",
+ slideshowStart: "Inizia la presentazione",
+ slideshowStop: "Termina la presentazione"
});
--- /dev/null
+/*\r
+ jQuery Colorbox language configuration\r
+ language: Japanaese (ja)\r
+ translated by: Hajime Fujimoto\r
+*/\r
+jQuery.extend(jQuery.colorbox.settings, {\r
+ current: "{total}枚中{current}枚目",\r
+ previous: "前",\r
+ next: "次",\r
+ close: "閉じる",\r
+ xhrError: "コンテンツの読み込みに失敗しました",\r
+ imgError: "画像の読み込みに失敗しました",\r
+ slideshowStart: "スライドショー開始",\r
+ slideshowStop: "スライドショー終了"\r
+});\r
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Korean (kr)
+ translated by: lunareffect
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "총 {total} 중 {current}",
+ previous: "이전",
+ next: "다음",
+ close: "닫기",
+ xhrError: "컨텐츠를 불러오는 데 실패했습니다.",
+ imgError: "이미지를 불러오는 데 실패했습니다.",
+ slideshowStart: "슬라이드쇼 시작",
+ slideshowStop: "슬라이드쇼 중지"
+});
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Lithuanian (lt)
+ translated by: Tomas Norkūnas
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "Nuotrauka {current} iš {total}",
+ previous: "Atgal",
+ next: "Pirmyn",
+ close: "Uždaryti",
+ xhrError: "Nepavyko užkrauti turinio.",
+ imgError: "Nepavyko užkrauti nuotraukos.",
+ slideshowStart: "Pradėti automatinę peržiūrą",
+ slideshowStop: "Sustabdyti automatinę peržiūrą"
+});
\ No newline at end of file
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Latvian (lv)
+ translated by: Matiss Roberts Treinis
+ site: x0.lv
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "attēls {current} no {total}",
+ previous: "iepriekšējais",
+ next: "nākamais",
+ close: "aizvērt",
+ xhrError: "Neizdevās ielādēt saturu.",
+ imgError: "Neizdevās ielādēt attēlu.",
+ slideshowStart: "sākt slaidrādi",
+ slideshowStop: "apturēt slaidrādi"
+});
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Myanmar (my)
+ translated by: Yan Naing
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "ပုံ {total} မှာ {current} မြောက်ပုံ",
+ previous: "ရှေ့သို့",
+ next: "နောက်သို့",
+ close: "ပိတ်မည်",
+ xhrError: "ပါဝင်သော အကြောင်းအရာများ ဖော်ပြရာတွင် အနည်းငယ် ချို့ယွင်းမှုရှိနေပါသည်",
+ imgError: "ပုံပြသရာတွင် အနည်းငယ် ချို့ယွင်းချက် ရှိနေပါသည်",
+ slideshowStart: "ပုံများ စတင်ပြသမည်",
+ slideshowStop: "ပုံပြသခြင်း ရပ်ဆိုင်မည်"
+});
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Dutch (nl)
+ translated by: barryvdh
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "Afbeelding {current} van {total}",
+ previous: "Vorige",
+ next: "Volgende",
+ close: "Sluiten",
+ xhrError: "Deze inhoud kan niet geladen worden.",
+ imgError: "Deze afbeelding kan niet geladen worden.",
+ slideshowStart: "Diashow starten",
+ slideshowStop: "Diashow stoppen"
+});
\ No newline at end of file
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Norwegian (no)
+ translated by: lars-erik
+ site: markedspartner.no
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "Bilde {current} av {total}",
+ previous: "Forrige",
+ next: "Neste",
+ close: "Lukk",
+ xhrError: "Feil ved lasting av innhold.",
+ imgError: "Feil ved lasting av bilde.",
+ slideshowStart: "Start lysbildefremvisning",
+ slideshowStop: "Stopp lysbildefremvisning"
+});
--- /dev/null
+/*\r
+ jQuery Colorbox language configuration\r
+ language: Polski (pl)\r
+ translated by: Tomasz Wasiński\r
+ site: 2bevisible.pl\r
+*/\r
+jQuery.extend(jQuery.colorbox.settings, {\r
+ current: "{current}. obrazek z {total}",\r
+ previous: "Poprzedni",\r
+ next: "Następny",\r
+ close: "Zamknij",\r
+ xhrError: "Nie udało się załadować treści.",\r
+ imgError: "Nie udało się załadować obrazka.",\r
+ slideshowStart: "rozpocznij pokaz slajdów",\r
+ slideshowStop: "zatrzymaj pokaz slajdów"\r
+});
\ No newline at end of file
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Brazilian Portuguese (pt-BR)
+ translated by: ReinaldoMT
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "Imagem {current} de {total}",
+ previous: "Anterior",
+ next: "Próxima",
+ close: "Fechar",
+ slideshowStart: "iniciar apresentação de slides",
+ slideshowStop: "parar apresentação de slides",
+ xhrError: "Erro ao carregar o conteúdo.",
+ imgError: "Erro ao carregar a imagem."
+});
\ No newline at end of file
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Romanian (ro)
+ translated by: shurub3l
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "imagine {current} din {total}",
+ previous: "precedenta",
+ next: "următoarea",
+ close: "închideți",
+ xhrError: "Acest conținut nu poate fi încărcat.",
+ imgError: "Această imagine nu poate fi încărcată",
+ slideshowStart: "începeți prezentarea (slideshow)",
+ slideshowStop: "opriți prezentarea (slideshow)"
+});
\ No newline at end of file
/*\r
- jQuery ColorBox language configuration\r
+ jQuery Colorbox language configuration\r
language: Russian (ru)\r
translated by: Marfa\r
- site: themarfa.name\r
+ site: themarfa.name\r
*/\r
jQuery.extend(jQuery.colorbox.settings, {\r
current: "изображение {current} из {total}",\r
- previous: "пÑ\80едÑ\8bдÑ\83Ñ\89ее",\r
- next: "следующее",\r
+ previous: "назад",\r
+ next: "вперёд",\r
close: "закрыть",\r
xhrError: "Не удалось загрузить содержимое.",\r
- imgError: "Не удалось загрузить изображение."\r
+ imgError: "Не удалось загрузить изображение.",\r
+ slideshowStart: "начать слайд-шоу",\r
+ slideshowStop: "остановить слайд-шоу"\r
});
\ No newline at end of file
--- /dev/null
+/*\r
+ jQuery Colorbox language configuration\r
+ language: Slovenian (si)\r
+ translated by: Boštjan Pišler (pisler.si)\r
+*/\r
+jQuery.extend(jQuery.colorbox.settings, {\r
+ current: "Slika {current} od {total}",\r
+ previous: "Prejšnja",\r
+ next: "Naslednja",\r
+ close: "Zapri",\r
+ xhrError: "Vsebine ni bilo mogoče naložiti.",\r
+ imgError: "Slike ni bilo mogoče naložiti.",\r
+ slideshowStart: "Zaženi prezentacijo",\r
+ slideshowStop: "Zaustavi prezentacijo"\r
+});
\ No newline at end of file
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Slovak (sk)
+ translated by: Jaroslav Kostal
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "{current}. obrázok z {total}",
+ previous: "Predchádzajúci",
+ next: "Následujúci",
+ close: "Zatvoriť",
+ xhrError: "Obsah sa nepodarilo načítať.",
+ imgError: "Obrázok sa nepodarilo načítať.",
+ slideshowStart: "Spustiť slideshow",
+ slideshowStop: "zastaviť slideshow"
+});
\ No newline at end of file
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Serbian (sr)
+ translated by: Sasa Stefanovic (baguje.com)
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "Slika {current} od {total}",
+ previous: "Prethodna",
+ next: "Sledeća",
+ close: "Zatvori",
+ xhrError: "Neuspešno učitavanje sadržaja.",
+ imgError: "Neuspešno učitavanje slike.",
+ slideshowStart: "Pokreni slideshow",
+ slideshowStop: "Zaustavi slideshow"
+});
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Swedish (sv)
+ translated by: Mattias Reichel
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "Bild {current} av {total}",
+ previous: "Föregående",
+ next: "Nästa",
+ close: "Stäng",
+ xhrError: "Innehållet kunde inte laddas.",
+ imgError: "Den här bilden kunde inte laddas.",
+ slideshowStart: "Starta bildspel",
+ slideshowStop: "Stoppa bildspel"
+});
\ No newline at end of file
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Turkish (tr)
+ translated by: Caner ÖNCEL
+ site: egonomik.com
+
+ edited by: Sinan Eldem
+ www.sinaneldem.com.tr
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "Görsel {current} / {total}",
+ previous: "Önceki",
+ next: "Sonraki",
+ close: "Kapat",
+ xhrError: "İçerik yüklenirken hata meydana geldi.",
+ imgError: "Resim yüklenirken hata meydana geldi.",
+ slideshowStart: "Slaytı Başlat",
+ slideshowStop: "Slaytı Durdur"
+});
--- /dev/null
+/*
+ jQuery ColorBox language configuration
+ language: Ukrainian (uk)
+ translated by: Andrew
+ http://acisoftware.com.ua
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "зображення {current} з {total}",
+ previous: "попереднє",
+ next: "наступне",
+ close: "закрити",
+ xhrError: "Не вдалося завантажити вміст.",
+ imgError: "Не вдалося завантажити зображення.",
+ slideshowStart: "почати слайд-шоу",
+ slideshowStop: "зупинити слайд-шоу"
+});
\ No newline at end of file
--- /dev/null
+/*\r
+ jQuery Colorbox language configuration\r
+ language: Chinese Simplified (zh-CN)\r
+ translated by: zhao weiming\r
+*/\r
+jQuery.extend(jQuery.colorbox.settings, {\r
+ current: "当前图像 {current} 总共 {total}",\r
+ previous: "前一页",\r
+ next: "后一页",\r
+ close: "关闭",\r
+ xhrError: "此内容无法加载",\r
+ imgError: "此图片无法加载",\r
+ slideshowStart: "开始播放幻灯片",\r
+ slideshowStop: "停止播放幻灯片"\r
+});
\ No newline at end of file
--- /dev/null
+/*
+ jQuery Colorbox language configuration
+ language: Chinese Traditional (zh-TW)
+ translated by: Atans Chiu
+*/
+jQuery.extend(jQuery.colorbox.settings, {
+ current: "圖片 {current} 總共 {total}",
+ previous: "上一頁",
+ next: "下一頁",
+ close: "關閉",
+ xhrError: "此內容載入失敗.",
+ imgError: "此圖片加入失敗.",
+ slideshowStart: "開始幻燈片",
+ slideshowStop: "結束幻燈片"
+});
-(function($,document,window){var defaults={transition:"elastic",speed:300,width:false,initialWidth:"600",innerWidth:false,maxWidth:false,height:false,initialHeight:"450",innerHeight:false,maxHeight:false,scalePhotos:true,scrolling:true,inline:false,html:false,iframe:false,fastIframe:true,photo:false,href:false,title:false,rel:false,opacity:.9,preloading:true,className:false,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",open:false,returnFocus:true,reposition:true,loop:true,slideshow:false,slideshowAuto:true,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:false,onLoad:false,onComplete:false,onCleanup:false,onClosed:false,overlayClose:true,escKey:true,arrowKey:true,top:false,bottom:false,left:false,right:false,fixed:false,data:undefined},colorbox="colorbox",prefix="cbox",boxElement=prefix+"Element",event_open=prefix+"_open",event_load=prefix+"_load",event_complete=prefix+"_complete",event_cleanup=prefix+"_cleanup",event_closed=prefix+"_closed",event_purge=prefix+"_purge",isIE=!$.support.leadingWhitespace,isIE6=isIE&&!window.XMLHttpRequest,event_ie6=prefix+"_IE6",$overlay,$box,$wrap,$content,$topBorder,$leftBorder,$rightBorder,$bottomBorder,$related,$window,$loaded,$loadingBay,$loadingOverlay,$title,$current,$slideshow,$next,$prev,$close,$groupControls,$events=$({}),settings,interfaceHeight,interfaceWidth,loadedHeight,loadedWidth,element,index,photo,open,active,closing,loadingTimer,publicMethod,div="div",className,init;function $tag(tag,id,css){var element=document.createElement(tag);if(id){element.id=prefix+id}if(css){element.style.cssText=css}return $(element)}function getIndex(increment){var max=$related.length,newIndex=(index+increment)%max;return newIndex<0?max+newIndex:newIndex}function setSize(size,dimension){return Math.round((/%/.test(size)?(dimension==="x"?$window.width():$window.height())/100:1)*parseInt(size,10))}function isImage(url){return settings.photo||/\.(gif|png|jp(e|g|eg)|bmp|ico)((#|\?).*)?$/i.test(url)}function makeSettings(){var i,data=$.data(element,colorbox);if(data==null){settings=$.extend({},defaults);if(console&&console.log){console.log("Error: cboxElement missing settings object")}}else{settings=$.extend({},data)}for(i in settings){if($.isFunction(settings[i])&&i.slice(0,2)!=="on"){settings[i]=settings[i].call(element)}}settings.rel=settings.rel||element.rel||$(element).data("rel")||"nofollow";settings.href=settings.href||$(element).attr("href");settings.title=settings.title||element.title;if(typeof settings.href==="string"){settings.href=$.trim(settings.href)}}function trigger(event,callback){$(document).trigger(event);$events.trigger(event);if($.isFunction(callback)){callback.call(element)}}function slideshow(){var timeOut,className=prefix+"Slideshow_",click="click."+prefix,clear,set,start,stop;if(settings.slideshow&&$related[1]){clear=function(){clearTimeout(timeOut)};set=function(){if(settings.loop||$related[index+1]){timeOut=setTimeout(publicMethod.next,settings.slideshowSpeed)}};start=function(){$slideshow.html(settings.slideshowStop).unbind(click).one(click,stop);$events.bind(event_complete,set).bind(event_load,clear).bind(event_cleanup,stop);$box.removeClass(className+"off").addClass(className+"on")};stop=function(){clear();$events.unbind(event_complete,set).unbind(event_load,clear).unbind(event_cleanup,stop);$slideshow.html(settings.slideshowStart).unbind(click).one(click,function(){publicMethod.next();start()});$box.removeClass(className+"on").addClass(className+"off")};if(settings.slideshowAuto){start()}else{stop()}}else{$box.removeClass(className+"off "+className+"on")}}function launch(target){if(!closing){element=target;makeSettings();$related=$(element);index=0;if(settings.rel!=="nofollow"){$related=$("."+boxElement).filter(function(){var data=$.data(this,colorbox),relRelated;if(data){relRelated=$(this).data("rel")||data.rel||this.rel}return relRelated===settings.rel});index=$related.index(element);if(index===-1){$related=$related.add(element);index=$related.length-1}}if(!open){open=active=true;$box.css({visibility:"hidden",display:"block"});$loaded=$tag(div,"LoadedContent","width:0; height:0; overflow:hidden").appendTo($content);interfaceHeight=$topBorder.height()+$bottomBorder.height()+$content.outerHeight(true)-$content.height();interfaceWidth=$leftBorder.width()+$rightBorder.width()+$content.outerWidth(true)-$content.width();loadedHeight=$loaded.outerHeight(true);loadedWidth=$loaded.outerWidth(true);if(settings.returnFocus){$(element).blur();$events.one(event_closed,function(){$(element).focus()})}$overlay.css({opacity:parseFloat(settings.opacity),cursor:settings.overlayClose?"pointer":"auto",visibility:"visible"}).show();settings.w=setSize(settings.initialWidth,"x");settings.h=setSize(settings.initialHeight,"y");publicMethod.position();if(isIE6){$window.bind("resize."+event_ie6+" scroll."+event_ie6,function(){$overlay.css({width:$window.width(),height:$window.height(),top:$window.scrollTop(),left:$window.scrollLeft()})}).trigger("resize."+event_ie6)}slideshow();trigger(event_open,settings.onOpen);$groupControls.add($title).hide();$close.html(settings.close).show()}publicMethod.load(true)}}function appendHTML(){if(!$box&&document.body){init=false;$window=$(window);$box=$tag(div).attr({id:colorbox,"class":isIE?prefix+(isIE6?"IE6":"IE"):""}).hide();$overlay=$tag(div,"Overlay",isIE6?"position:absolute":"").hide();$loadingOverlay=$tag(div,"LoadingOverlay").add($tag(div,"LoadingGraphic"));$wrap=$tag(div,"Wrapper");$content=$tag(div,"Content").append($title=$tag(div,"Title"),$current=$tag(div,"Current"),$next=$tag(div,"Next"),$prev=$tag(div,"Previous"),$slideshow=$tag(div,"Slideshow"),$close=$tag(div,"Close"));$wrap.append($tag(div).append($tag(div,"TopLeft"),$topBorder=$tag(div,"TopCenter"),$tag(div,"TopRight")),$tag(div,false,"clear:left").append($leftBorder=$tag(div,"MiddleLeft"),$content,$rightBorder=$tag(div,"MiddleRight")),$tag(div,false,"clear:left").append($tag(div,"BottomLeft"),$bottomBorder=$tag(div,"BottomCenter"),$tag(div,"BottomRight"))).find("div div").css({"float":"left"});$loadingBay=$tag(div,false,"position:absolute; width:9999px; visibility:hidden; display:none");$groupControls=$next.add($prev).add($current).add($slideshow);$(document.body).append($overlay,$box.append($wrap,$loadingBay))}}function addBindings(){function clickHandler(e){if(!(e.which>1||e.shiftKey||e.altKey||e.metaKey)){e.preventDefault();launch(this)}}if($box){if(!init){init=true;$next.click(function(){publicMethod.next()});$prev.click(function(){publicMethod.prev()});$close.click(function(){publicMethod.close()});$overlay.click(function(){if(settings.overlayClose){publicMethod.close()}});$(document).bind("keydown."+prefix,function(e){var key=e.keyCode;if(open&&settings.escKey&&key===27){e.preventDefault();publicMethod.close()}if(open&&settings.arrowKey&&$related[1]){if(key===37){e.preventDefault();$prev.click()}else if(key===39){e.preventDefault();$next.click()}}});if($.isFunction($.fn.on)){$(document).on("click."+prefix,"."+boxElement,clickHandler)}else{$("."+boxElement).live("click."+prefix,clickHandler)}}return true}return false}if($.colorbox){return}$(appendHTML);publicMethod=$.fn[colorbox]=$[colorbox]=function(options,callback){var $this=this;options=options||{};appendHTML();if(addBindings()){if($.isFunction($this)){$this=$("<a/>");options.open=true}else if(!$this[0]){return $this}if(callback){options.onComplete=callback}$this.each(function(){$.data(this,colorbox,$.extend({},$.data(this,colorbox)||defaults,options))}).addClass(boxElement);if($.isFunction(options.open)&&options.open.call($this)||options.open){launch($this[0])}}return $this};publicMethod.position=function(speed,loadedCallback){var css,top=0,left=0,offset=$box.offset(),scrollTop,scrollLeft;$window.unbind("resize."+prefix);$box.css({top:-9e4,left:-9e4});scrollTop=$window.scrollTop();scrollLeft=$window.scrollLeft();if(settings.fixed&&!isIE6){offset.top-=scrollTop;offset.left-=scrollLeft;$box.css({position:"fixed"})}else{top=scrollTop;left=scrollLeft;$box.css({position:"absolute"})}if(settings.right!==false){left+=Math.max($window.width()-settings.w-loadedWidth-interfaceWidth-setSize(settings.right,"x"),0)}else if(settings.left!==false){left+=setSize(settings.left,"x")}else{left+=Math.round(Math.max($window.width()-settings.w-loadedWidth-interfaceWidth,0)/2)}if(settings.bottom!==false){top+=Math.max($window.height()-settings.h-loadedHeight-interfaceHeight-setSize(settings.bottom,"y"),0)}else if(settings.top!==false){top+=setSize(settings.top,"y")}else{top+=Math.round(Math.max($window.height()-settings.h-loadedHeight-interfaceHeight,0)/2)}$box.css({top:offset.top,left:offset.left,visibility:"visible"});speed=$box.width()===settings.w+loadedWidth&&$box.height()===settings.h+loadedHeight?0:speed||0;$wrap[0].style.width=$wrap[0].style.height="9999px";function modalDimensions(that){$topBorder[0].style.width=$bottomBorder[0].style.width=$content[0].style.width=parseInt(that.style.width,10)-interfaceWidth+"px";$content[0].style.height=$leftBorder[0].style.height=$rightBorder[0].style.height=parseInt(that.style.height,10)-interfaceHeight+"px"}css={width:settings.w+loadedWidth+interfaceWidth,height:settings.h+loadedHeight+interfaceHeight,top:top,left:left};if(speed===0){$box.css(css)}$box.dequeue().animate(css,{duration:speed,complete:function(){modalDimensions(this);active=false;$wrap[0].style.width=settings.w+loadedWidth+interfaceWidth+"px";$wrap[0].style.height=settings.h+loadedHeight+interfaceHeight+"px";if(settings.reposition){setTimeout(function(){$window.bind("resize."+prefix,publicMethod.position)},1)}if(loadedCallback){loadedCallback()}},step:function(){modalDimensions(this)}})};publicMethod.resize=function(options){if(open){options=options||{};if(options.width){settings.w=setSize(options.width,"x")-loadedWidth-interfaceWidth}if(options.innerWidth){settings.w=setSize(options.innerWidth,"x")}$loaded.css({width:settings.w});if(options.height){settings.h=setSize(options.height,"y")-loadedHeight-interfaceHeight}if(options.innerHeight){settings.h=setSize(options.innerHeight,"y")}if(!options.innerHeight&&!options.height){$loaded.css({height:"auto"});settings.h=$loaded.height()}$loaded.css({height:settings.h});publicMethod.position(settings.transition==="none"?0:settings.speed)}};publicMethod.prep=function(object){if(!open){return}var callback,speed=settings.transition==="none"?0:settings.speed;$loaded.empty().remove();$loaded=$tag(div,"LoadedContent").append(object);function getWidth(){settings.w=settings.w||$loaded.width();settings.w=settings.mw&&settings.mw<settings.w?settings.mw:settings.w;return settings.w}function getHeight(){settings.h=settings.h||$loaded.height();settings.h=settings.mh&&settings.mh<settings.h?settings.mh:settings.h;return settings.h}$loaded.hide().appendTo($loadingBay.show()).css({width:getWidth(),overflow:settings.scrolling?"auto":"hidden"}).css({height:getHeight()}).prependTo($content);$loadingBay.hide();$(photo).css({"float":"none"});callback=function(){var total=$related.length,iframe,frameBorder="frameBorder",allowTransparency="allowTransparency",complete;if(!open){return}function removeFilter(){if(isIE){$box[0].style.removeAttribute("filter")}}complete=function(){clearTimeout(loadingTimer);$loadingOverlay.remove();trigger(event_complete,settings.onComplete)};if(isIE){if(photo){$loaded.fadeIn(100)}}$title.html(settings.title).add($loaded).show();if(total>1){if(typeof settings.current==="string"){$current.html(settings.current.replace("{current}",index+1).replace("{total}",total)).show()}$next[settings.loop||index<total-1?"show":"hide"]().html(settings.next);$prev[settings.loop||index?"show":"hide"]().html(settings.previous);if(settings.slideshow){$slideshow.show()}if(settings.preloading){$.each([getIndex(-1),getIndex(1)],function(){var src,img,i=$related[this],data=$.data(i,colorbox);if(data&&data.href){src=data.href;if($.isFunction(src)){src=src.call(i)}}else{src=$(i).attr("href")}if(src&&(isImage(src)||data.photo)){img=new Image;img.src=src}})}}else{$groupControls.hide()}if(settings.iframe){iframe=$tag("iframe")[0];if(frameBorder in iframe){iframe[frameBorder]=0}if(allowTransparency in iframe){iframe[allowTransparency]="true"}if(!settings.scrolling){iframe.scrolling="no"}$(iframe).attr({src:settings.href,name:(new Date).getTime(),"class":prefix+"Iframe",allowFullScreen:true,webkitAllowFullScreen:true,mozallowfullscreen:true}).one("load",complete).appendTo($loaded);$events.one(event_purge,function(){iframe.src="//about:blank"});if(settings.fastIframe){$(iframe).trigger("load")}}else{complete()}if(settings.transition==="fade"){$box.fadeTo(speed,1,removeFilter)}else{removeFilter()}};if(settings.transition==="fade"){$box.fadeTo(speed,0,function(){publicMethod.position(0,callback)})}else{publicMethod.position(speed,callback)}};publicMethod.load=function(launched){var href,setResize,prep=publicMethod.prep,$inline;active=true;photo=false;element=$related[index];if(!launched){makeSettings()}if(className){$box.add($overlay).removeClass(className)}if(settings.className){$box.add($overlay).addClass(settings.className)}className=settings.className;trigger(event_purge);trigger(event_load,settings.onLoad);settings.h=settings.height?setSize(settings.height,"y")-loadedHeight-interfaceHeight:settings.innerHeight&&setSize(settings.innerHeight,"y");settings.w=settings.width?setSize(settings.width,"x")-loadedWidth-interfaceWidth:settings.innerWidth&&setSize(settings.innerWidth,"x");settings.mw=settings.w;settings.mh=settings.h;if(settings.maxWidth){settings.mw=setSize(settings.maxWidth,"x")-loadedWidth-interfaceWidth;settings.mw=settings.w&&settings.w<settings.mw?settings.w:settings.mw}if(settings.maxHeight){settings.mh=setSize(settings.maxHeight,"y")-loadedHeight-interfaceHeight;settings.mh=settings.h&&settings.h<settings.mh?settings.h:settings.mh}href=settings.href;loadingTimer=setTimeout(function(){$loadingOverlay.appendTo($content)},100);if(settings.inline){$inline=$tag(div).hide().insertBefore($(href)[0]);$events.one(event_purge,function(){$inline.replaceWith($loaded.children())});prep($(href))}else if(settings.iframe){prep(" ")}else if(settings.html){prep(settings.html)}else if(isImage(href)){$(photo=new Image).addClass(prefix+"Photo").bind("error",function(){settings.title=false;prep($tag(div,"Error").html(settings.imgError))}).one("load",function(){var percent;if(settings.scalePhotos){setResize=function(){photo.height-=photo.height*percent;photo.width-=photo.width*percent};if(settings.mw&&photo.width>settings.mw){percent=(photo.width-settings.mw)/photo.width;setResize()}if(settings.mh&&photo.height>settings.mh){percent=(photo.height-settings.mh)/photo.height;setResize()}}if(settings.h){photo.style.marginTop=Math.max(settings.mh-photo.height,0)/2+"px"}if($related[1]&&(settings.loop||$related[index+1])){photo.style.cursor="pointer";photo.onclick=function(){publicMethod.next()}}if(isIE){photo.style.msInterpolationMode="bicubic"}setTimeout(function(){prep(photo)},1)});setTimeout(function(){photo.src=href},1)}else if(href){$loadingBay.load(href,settings.data,function(data,status){prep(status==="error"?$tag(div,"Error").html(settings.xhrError):$(this).contents())})}};publicMethod.next=function(){if(!active&&$related[1]&&(settings.loop||$related[index+1])){index=getIndex(1);publicMethod.load()}};publicMethod.prev=function(){if(!active&&$related[1]&&(settings.loop||index)){index=getIndex(-1);publicMethod.load()}};publicMethod.close=function(){if(open&&!closing){closing=true;open=false;trigger(event_cleanup,settings.onCleanup);$window.unbind("."+prefix+" ."+event_ie6);$overlay.fadeTo(200,0);$box.stop().fadeTo(300,0,function(){$box.add($overlay).css({opacity:1,cursor:"auto"}).hide();trigger(event_purge);$loaded.empty().remove();setTimeout(function(){closing=false;trigger(event_closed,settings.onClosed)},1)})}};publicMethod.remove=function(){$([]).add($box).add($overlay).remove();$box=null;$("."+boxElement).removeData(colorbox).removeClass(boxElement);$(document).unbind("click."+prefix)};publicMethod.element=function(){return $(element)};publicMethod.settings=defaults})(jQuery,document,window);
\ No newline at end of file
+/*!
+ Colorbox 1.6.3
+ license: MIT
+ http://www.jacklmoore.com/colorbox
+*/
+(function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-cbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(A+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in x[0]&&!x[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),x.focus())}function c(t){c.str!==t&&(x.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){A=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+te).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),A=W.index(_.el),-1===A&&(W=W.add(_.el),A=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),ae.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!$){$=q=!0,c(_.get("className")),x.css({visibility:"hidden",display:"block",opacity:""}),I=n(se,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(I),j=T.height()+k.height()+b.outerHeight(!0)-b.height(),D=C.width()+H.width()+b.outerWidth(!0)-b.width(),N=I.outerHeight(!0),z=I.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=Math.max((l!==!1?Math.min(h,a(l,"x")):h)-z-D,0),_.h=Math.max((f!==!1?Math.min(s,a(f,"y")):s)-N-j,0),I.css({width:"",height:_.h}),J.position(),u(ee),_.get("onOpen"),O.add(F).hide(),x.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),ae.one(re,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&ae.one(re,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?B.html(_.get("close")).appendTo(b):B.appendTo("<div/>"),w()}}function p(){x||(V=!1,E=t(i),x=n(se).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(se,"Overlay").hide(),L=t([n(se,"LoadingOverlay")[0],n(se,"LoadingGraphic")[0]]),y=n(se,"Wrapper"),b=n(se,"Content").append(F=n(se,"Title"),R=n(se,"Current"),P=t('<button type="button"/>').attr({id:Z+"Previous"}),K=t('<button type="button"/>').attr({id:Z+"Next"}),S=n("button","Slideshow"),L),B=t('<button type="button"/>').attr({id:Z+"Close"}),y.append(n(se).append(n(se,"TopLeft"),T=n(se,"TopCenter"),n(se,"TopRight")),n(se,!1,"clear:left").append(C=n(se,"MiddleLeft"),b,H=n(se,"MiddleRight")),n(se,!1,"clear:left").append(n(se,"BottomLeft"),k=n(se,"BottomCenter"),n(se,"BottomRight"))).find("div div").css({"float":"left"}),M=n(se,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),O=K.add(P).add(R).add(S)),e.body&&!x.parent().length&&t(e.body).append(v,x.append(y,M))}function m(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),f(this))}return x?(V||(V=!0,K.click(function(){J.next()}),P.click(function(){J.prev()}),B.click(function(){J.close()}),v.click(function(){_.get("overlayClose")&&J.close()}),t(e).bind("keydown."+Z,function(t){var e=t.keyCode;$&&_.get("escKey")&&27===e&&(t.preventDefault(),J.close()),$&&_.get("arrowKey")&&W[1]&&!t.altKey&&(37===e?(t.preventDefault(),P.click()):39===e&&(t.preventDefault(),K.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+Z,"."+te,i):t("."+te).live("click."+Z,i)),!0):!1}function w(){var e,o,r,h=J.prep,d=++le;if(q=!0,U=!1,u(he),u(ie),_.get("onLoad"),_.h=_.get("height")?a(_.get("height"),"y")-N-j:_.get("innerHeight")&&a(_.get("innerHeight"),"y"),_.w=_.get("width")?a(_.get("width"),"x")-z-D:_.get("innerWidth")&&a(_.get("innerWidth"),"x"),_.mw=_.w,_.mh=_.h,_.get("maxWidth")&&(_.mw=a(_.get("maxWidth"),"x")-z-D,_.mw=_.w&&_.w<_.mw?_.w:_.mw),_.get("maxHeight")&&(_.mh=a(_.get("maxHeight"),"y")-N-j,_.mh=_.h&&_.h<_.mh?_.h:_.mh),e=_.get("href"),Q=setTimeout(function(){L.show()},100),_.get("inline")){var c=t(e);r=t("<div>").hide().insertBefore(c),ae.one(he,function(){r.replaceWith(c)}),h(c)}else _.get("iframe")?h(" "):_.get("html")?h(_.get("html")):s(_,e)?(e=l(_,e),U=_.get("createImg"),t(U).addClass(Z+"Photo").bind("error."+Z,function(){h(n(se,"Error").html(_.get("imgError")))}).one("load",function(){d===le&&setTimeout(function(){var e;_.get("retinaImage")&&i.devicePixelRatio>1&&(U.height=U.height/i.devicePixelRatio,U.width=U.width/i.devicePixelRatio),_.get("scalePhotos")&&(o=function(){U.height-=U.height*e,U.width-=U.width*e},_.mw&&U.width>_.mw&&(e=(U.width-_.mw)/U.width,o()),_.mh&&U.height>_.mh&&(e=(U.height-_.mh)/U.height,o())),_.h&&(U.style.marginTop=Math.max(_.mh-U.height,0)/2+"px"),W[1]&&(_.get("loop")||W[A+1])&&(U.style.cursor="pointer",t(U).bind("click."+Z,function(){J.next()})),U.style.width=U.width+"px",U.style.height=U.height+"px",h(U)},1)}),U.src=e):e&&M.load(e,_.get("data"),function(e,i){d===le&&h("error"===i?n(se,"Error").html(_.get("xhrError")):t(this).contents())})}var v,x,y,b,T,C,H,k,W,E,I,M,L,F,R,S,K,P,B,O,_,j,D,N,z,A,U,$,q,G,Q,J,V,X={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),n=t(this).data("cbox-iframe-attrs");return"object"==typeof n&&t.each(n,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},Y="colorbox",Z="cbox",te=Z+"Element",ee=Z+"_open",ie=Z+"_load",ne=Z+"_complete",oe=Z+"_cleanup",re=Z+"_closed",he=Z+"_purge",ae=t("<a/>"),se="div",le=0,de={},ce=function(){function t(){clearTimeout(h)}function e(){(_.get("loop")||W[A+1])&&(t(),h=setTimeout(J.next,_.get("slideshowSpeed")))}function i(){S.html(_.get("slideshowStop")).unbind(s).one(s,n),ae.bind(ne,e).bind(ie,t),x.removeClass(a+"off").addClass(a+"on")}function n(){t(),ae.unbind(ne,e).unbind(ie,t),S.html(_.get("slideshowStart")).unbind(s).one(s,function(){J.next(),i()}),x.removeClass(a+"on").addClass(a+"off")}function o(){r=!1,S.hide(),t(),ae.unbind(ne,e).unbind(ie,t),x.removeClass(a+"off "+a+"on")}var r,h,a=Z+"Slideshow_",s="click."+Z;return function(){r?_.get("slideshow")||(ae.unbind(oe,o),o()):_.get("slideshow")&&W[1]&&(r=!0,ae.one(oe,o),_.get("slideshowAuto")?i():n(),S.show())}}();t[Y]||(t(p),J=t.fn[Y]=t[Y]=function(e,i){var n,o=this;return e=e||{},t.isFunction(o)&&(o=t("<a/>"),e.open=!0),o[0]?(p(),m()&&(i&&(e.onComplete=i),o.each(function(){var i=t.data(this,Y)||{};t.data(this,Y,t.extend(i,e))}).addClass(te),n=new r(o[0],e),n.get("open")&&f(o[0])),o):o},J.position=function(e,i){function n(){T[0].style.width=k[0].style.width=b[0].style.width=parseInt(x[0].style.width,10)-D+"px",b[0].style.height=C[0].style.height=H[0].style.height=parseInt(x[0].style.height,10)-j+"px"}var r,h,s,l=0,d=0,c=x.offset();if(E.unbind("resize."+Z),x.css({top:-9e4,left:-9e4}),h=E.scrollTop(),s=E.scrollLeft(),_.get("fixed")?(c.top-=h,c.left-=s,x.css({position:"fixed"})):(l=h,d=s,x.css({position:"absolute"})),d+=_.get("right")!==!1?Math.max(E.width()-_.w-z-D-a(_.get("right"),"x"),0):_.get("left")!==!1?a(_.get("left"),"x"):Math.round(Math.max(E.width()-_.w-z-D,0)/2),l+=_.get("bottom")!==!1?Math.max(o()-_.h-N-j-a(_.get("bottom"),"y"),0):_.get("top")!==!1?a(_.get("top"),"y"):Math.round(Math.max(o()-_.h-N-j,0)/2),x.css({top:c.top,left:c.left,visibility:"visible"}),y[0].style.width=y[0].style.height="9999px",r={width:_.w+z+D,height:_.h+N+j,top:l,left:d},e){var g=0;t.each(r,function(t){return r[t]!==de[t]?(g=e,void 0):void 0}),e=g}de=r,e||x.css(r),x.dequeue().animate(r,{duration:e||0,complete:function(){n(),q=!1,y[0].style.width=_.w+z+D+"px",y[0].style.height=_.h+N+j+"px",_.get("reposition")&&setTimeout(function(){E.bind("resize."+Z,J.position)},1),t.isFunction(i)&&i()},step:n})},J.resize=function(t){var e;$&&(t=t||{},t.width&&(_.w=a(t.width,"x")-z-D),t.innerWidth&&(_.w=a(t.innerWidth,"x")),I.css({width:_.w}),t.height&&(_.h=a(t.height,"y")-N-j),t.innerHeight&&(_.h=a(t.innerHeight,"y")),t.innerHeight||t.height||(e=I.scrollTop(),I.css({height:"auto"}),_.h=I.height()),I.css({height:_.h}),e&&I.scrollTop(e),J.position("none"===_.get("transition")?0:_.get("speed")))},J.prep=function(i){function o(){return _.w=_.w||I.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w}function a(){return _.h=_.h||I.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h}if($){var d,g="none"===_.get("transition")?0:_.get("speed");I.remove(),I=n(se,"LoadedContent").append(i),I.hide().appendTo(M.show()).css({width:o(),overflow:_.get("scrolling")?"auto":"hidden"}).css({height:a()}).prependTo(b),M.hide(),t(U).css({"float":"none"}),c(_.get("className")),d=function(){function i(){t.support.opacity===!1&&x[0].style.removeAttribute("filter")}var n,o,a=W.length;$&&(o=function(){clearTimeout(Q),L.hide(),u(ne),_.get("onComplete")},F.html(_.get("title")).show(),I.show(),a>1?("string"==typeof _.get("current")&&R.html(_.get("current").replace("{current}",A+1).replace("{total}",a)).show(),K[_.get("loop")||a-1>A?"show":"hide"]().html(_.get("next")),P[_.get("loop")||A?"show":"hide"]().html(_.get("previous")),ce(),_.get("preloading")&&t.each([h(-1),h(1)],function(){var i,n=W[this],o=new r(n,t.data(n,Y)),h=o.get("href");h&&s(o,h)&&(h=l(o,h),i=e.createElement("img"),i.src=h)})):O.hide(),_.get("iframe")?(n=_.get("createIframe"),_.get("scrolling")||(n.scrolling="no"),t(n).attr({src:_.get("href"),"class":Z+"Iframe"}).one("load",o).appendTo(I),ae.one(he,function(){n.src="//about:blank"}),_.get("fastIframe")&&t(n).trigger("load")):o(),"fade"===_.get("transition")?x.fadeTo(g,1,i):i())},"fade"===_.get("transition")?x.fadeTo(g,0,function(){J.position(0,d)}):J.position(g,d)}},J.next=function(){!q&&W[1]&&(_.get("loop")||W[A+1])&&(A=h(1),f(W[A]))},J.prev=function(){!q&&W[1]&&(_.get("loop")||A)&&(A=h(-1),f(W[A]))},J.close=function(){$&&!G&&(G=!0,$=!1,u(oe),_.get("onCleanup"),E.unbind("."+Z),v.fadeTo(_.get("fadeOut")||0,0),x.stop().fadeTo(_.get("fadeOut")||0,0,function(){x.hide(),v.hide(),u(he),I.remove(),setTimeout(function(){G=!1,u(re),_.get("onClosed")},1)}))},J.remove=function(){x&&(x.stop(),t[Y].close(),x.stop(!1,!0).remove(),v.remove(),G=!1,x=null,t("."+te).removeData(Y).removeClass(te),t(e).unbind("click."+Z).unbind("keydown."+Z))},J.element=function(){return t(_.el)},J.settings=X)})(jQuery,document,window);
\ No newline at end of file
-/*
- jQuery ColorBox v1.3.32 - 2013-01-31
- (c) 2013 Jack Moore - jacklmoore.com/colorbox
- license: http://www.opensource.org/licenses/mit-license.php
+/*!
+ Colorbox 1.6.3
+ license: MIT
+ http://www.jacklmoore.com/colorbox
*/
(function ($, document, window) {
var
// Default settings object.
// See http://jacklmoore.com/colorbox for details.
defaults = {
+ // data sources
+ html: false,
+ photo: false,
+ iframe: false,
+ inline: false,
+
+ // behavior and appearance
transition: "elastic",
speed: 300,
+ fadeOut: 300,
width: false,
initialWidth: "600",
innerWidth: false,
maxHeight: false,
scalePhotos: true,
scrolling: true,
- inline: false,
- html: false,
- iframe: false,
- fastIframe: true,
- photo: false,
- href: false,
- title: false,
- rel: false,
opacity: 0.9,
preloading: true,
className: false,
+ overlayClose: true,
+ escKey: true,
+ arrowKey: true,
+ top: false,
+ bottom: false,
+ left: false,
+ right: false,
+ fixed: false,
+ data: undefined,
+ closeButton: true,
+ fastIframe: true,
+ open: false,
+ reposition: true,
+ loop: true,
+ slideshow: false,
+ slideshowAuto: true,
+ slideshowSpeed: 2500,
+ slideshowStart: "start slideshow",
+ slideshowStop: "stop slideshow",
+ photoRegex: /\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,
+ // alternate image paths for high-res displays
+ retinaImage: false,
+ retinaUrl: false,
+ retinaSuffix: '@2x.$1',
+
+ // internationalization
current: "image {current} of {total}",
previous: "previous",
next: "next",
xhrError: "This content failed to load.",
imgError: "This image failed to load.",
- open: false,
+ // accessbility
returnFocus: true,
- reposition: true,
- loop: true,
- slideshow: false,
- slideshowAuto: true,
- slideshowSpeed: 2500,
- slideshowStart: "start slideshow",
- slideshowStop: "stop slideshow",
+ trapFocus: true,
+
+ // callbacks
onOpen: false,
onLoad: false,
onComplete: false,
onCleanup: false,
onClosed: false,
- overlayClose: true,
- escKey: true,
- arrowKey: true,
- top: false,
- bottom: false,
- left: false,
- right: false,
- fixed: false,
- data: undefined
+
+ rel: function() {
+ return this.rel;
+ },
+ href: function() {
+ // using this.href would give the absolute url, when the href may have been inteded as a selector (e.g. '#container')
+ return $(this).attr('href');
+ },
+ title: function() {
+ return this.title;
+ },
+ createImg: function() {
+ var img = new Image();
+ var attrs = $(this).data('cbox-img-attrs');
+
+ if (typeof attrs === 'object') {
+ $.each(attrs, function(key, val){
+ img[key] = val;
+ });
+ }
+
+ return img;
+ },
+ createIframe: function() {
+ var iframe = document.createElement('iframe');
+ var attrs = $(this).data('cbox-iframe-attrs');
+
+ if (typeof attrs === 'object') {
+ $.each(attrs, function(key, val){
+ iframe[key] = val;
+ });
+ }
+
+ if ('frameBorder' in iframe) {
+ iframe.frameBorder = 0;
+ }
+ if ('allowTransparency' in iframe) {
+ iframe.allowTransparency = "true";
+ }
+ iframe.name = (new Date()).getTime(); // give the iframe a unique name to prevent caching
+ iframe.allowFullscreen = true;
+
+ return iframe;
+ }
},
-
+
// Abstracting the HTML and event identifiers for easy rebranding
colorbox = 'colorbox',
prefix = 'cbox',
boxElement = prefix + 'Element',
-
+
// Events
event_open = prefix + '_open',
event_load = prefix + '_load',
event_cleanup = prefix + '_cleanup',
event_closed = prefix + '_closed',
event_purge = prefix + '_purge',
-
- // Special Handling for IE
- isIE = !$.support.leadingWhitespace, // IE6 to IE8
- isIE6 = isIE && !window.XMLHttpRequest, // IE6
- event_ie6 = prefix + '_IE6',
// Cached jQuery Object Variables
$overlay,
$prev,
$close,
$groupControls,
- $events = $({}),
-
+ $events = $('<a/>'), // $({}) would be prefered, but there is an issue with jQuery 1.4.2
+
// Variables for cached values or use across multiple functions
settings,
interfaceHeight,
interfaceWidth,
loadedHeight,
loadedWidth,
- element,
index,
photo,
open,
loadingTimer,
publicMethod,
div = "div",
- className,
+ requests = 0,
+ previousCSS = {},
init;
// ****************
// HELPER FUNCTIONS
// ****************
-
- // Convience function for creating new jQuery objects
+
+ // Convenience function for creating new jQuery objects
function $tag(tag, id, css) {
var element = document.createElement(tag);
return $(element);
}
+ // Get the window height using innerHeight when available to avoid an issue with iOS
+ // http://bugs.jquery.com/ticket/6724
+ function winheight() {
+ return window.innerHeight ? window.innerHeight : $(window).height();
+ }
+
+ function Settings(element, options) {
+ if (options !== Object(options)) {
+ options = {};
+ }
+
+ this.cache = {};
+ this.el = element;
+
+ this.value = function(key) {
+ var dataAttr;
+
+ if (this.cache[key] === undefined) {
+ dataAttr = $(this.el).attr('data-cbox-'+key);
+
+ if (dataAttr !== undefined) {
+ this.cache[key] = dataAttr;
+ } else if (options[key] !== undefined) {
+ this.cache[key] = options[key];
+ } else if (defaults[key] !== undefined) {
+ this.cache[key] = defaults[key];
+ }
+ }
+
+ return this.cache[key];
+ };
+
+ this.get = function(key) {
+ var value = this.value(key);
+ return $.isFunction(value) ? value.call(this.el, this) : value;
+ };
+ }
+
// Determine the next and previous members in a group.
function getIndex(increment) {
var
max = $related.length,
newIndex = (index + increment) % max;
-
+
return (newIndex < 0) ? max + newIndex : newIndex;
}
// Convert '%' and 'px' values to integers
function setSize(size, dimension) {
- return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : $window.height()) / 100) : 1) * parseInt(size, 10));
+ return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10));
}
-
+
// Checks an href to see if it is a photo.
- // There is a force photo option (photo: true) for hrefs that cannot be matched by this regex.
- function isImage(url) {
- return settings.photo || /\.(gif|png|jp(e|g|eg)|bmp|ico)((#|\?).*)?$/i.test(url);
+ // There is a force photo option (photo: true) for hrefs that cannot be matched by the regex.
+ function isImage(settings, url) {
+ return settings.get('photo') || settings.get('photoRegex').test(url);
}
- // Assigns function results to their respective properties
- function makeSettings() {
- var i,
- data = $.data(element, colorbox);
-
- if (data == null) {
- settings = $.extend({}, defaults);
- if (console && console.log) {
- console.log('Error: cboxElement missing settings object');
- }
- } else {
- settings = $.extend({}, data);
+ function retinaUrl(settings, url) {
+ return settings.get('retinaUrl') && window.devicePixelRatio > 1 ? url.replace(settings.get('photoRegex'), settings.get('retinaSuffix')) : url;
+ }
+
+ function trapFocus(e) {
+ if ('contains' in $box[0] && !$box[0].contains(e.target) && e.target !== $overlay[0]) {
+ e.stopPropagation();
+ $box.focus();
}
-
- for (i in settings) {
- if ($.isFunction(settings[i]) && i.slice(0, 2) !== 'on') { // checks to make sure the function isn't one of the callbacks, they will be handled at the appropriate time.
- settings[i] = settings[i].call(element);
- }
+ }
+
+ function setClass(str) {
+ if (setClass.str !== str) {
+ $box.add($overlay).removeClass(setClass.str).addClass(str);
+ setClass.str = str;
}
-
- settings.rel = settings.rel || element.rel || $(element).data('rel') || 'nofollow';
- settings.href = settings.href || $(element).attr('href');
- settings.title = settings.title || element.title;
-
- if (typeof settings.href === "string") {
- settings.href = $.trim(settings.href);
+ }
+
+ function getRelated(rel) {
+ index = 0;
+
+ if (rel && rel !== false && rel !== 'nofollow') {
+ $related = $('.' + boxElement).filter(function () {
+ var options = $.data(this, colorbox);
+ var settings = new Settings(this, options);
+ return (settings.get('rel') === rel);
+ });
+ index = $related.index(settings.el);
+
+ // Check direct calls to Colorbox.
+ if (index === -1) {
+ $related = $related.add(settings.el);
+ index = $related.length - 1;
+ }
+ } else {
+ $related = $(settings.el);
}
}
- function trigger(event, callback) {
+ function trigger(event) {
// for external use
$(document).trigger(event);
-
// for internal use
- $events.trigger(event);
+ $events.triggerHandler(event);
+ }
- if ($.isFunction(callback)) {
- callback.call(element);
+ var slideshow = (function(){
+ var active,
+ className = prefix + "Slideshow_",
+ click = "click." + prefix,
+ timeOut;
+
+ function clear () {
+ clearTimeout(timeOut);
}
- }
- // Slideshow functionality
- function slideshow() {
- var
- timeOut,
- className = prefix + "Slideshow_",
- click = "click." + prefix,
- clear,
- set,
- start,
- stop;
-
- if (settings.slideshow && $related[1]) {
- clear = function () {
- clearTimeout(timeOut);
- };
+ function set() {
+ if (settings.get('loop') || $related[index + 1]) {
+ clear();
+ timeOut = setTimeout(publicMethod.next, settings.get('slideshowSpeed'));
+ }
+ }
- set = function () {
- if (settings.loop || $related[index + 1]) {
- timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed);
- }
- };
+ function start() {
+ $slideshow
+ .html(settings.get('slideshowStop'))
+ .unbind(click)
+ .one(click, stop);
- start = function () {
- $slideshow
- .html(settings.slideshowStop)
- .unbind(click)
- .one(click, stop);
+ $events
+ .bind(event_complete, set)
+ .bind(event_load, clear);
- $events
- .bind(event_complete, set)
- .bind(event_load, clear)
- .bind(event_cleanup, stop);
+ $box.removeClass(className + "off").addClass(className + "on");
+ }
- $box.removeClass(className + "off").addClass(className + "on");
- };
-
- stop = function () {
- clear();
-
- $events
- .unbind(event_complete, set)
- .unbind(event_load, clear)
- .unbind(event_cleanup, stop);
-
- $slideshow
- .html(settings.slideshowStart)
- .unbind(click)
- .one(click, function () {
- publicMethod.next();
- start();
- });
+ function stop() {
+ clear();
- $box.removeClass(className + "on").addClass(className + "off");
- };
-
- if (settings.slideshowAuto) {
- start();
- } else {
- stop();
- }
- } else {
+ $events
+ .unbind(event_complete, set)
+ .unbind(event_load, clear);
+
+ $slideshow
+ .html(settings.get('slideshowStart'))
+ .unbind(click)
+ .one(click, function () {
+ publicMethod.next();
+ start();
+ });
+
+ $box.removeClass(className + "on").addClass(className + "off");
+ }
+
+ function reset() {
+ active = false;
+ $slideshow.hide();
+ clear();
+ $events
+ .unbind(event_complete, set)
+ .unbind(event_load, clear);
$box.removeClass(className + "off " + className + "on");
}
- }
- function launch(target) {
- if (!closing) {
-
- element = target;
-
- makeSettings();
-
- $related = $(element);
-
- index = 0;
-
- if (settings.rel !== 'nofollow') {
- $related = $('.' + boxElement).filter(function () {
- var data = $.data(this, colorbox),
- relRelated;
-
- if (data) {
- relRelated = $(this).data('rel') || data.rel || this.rel;
+ return function(){
+ if (active) {
+ if (!settings.get('slideshow')) {
+ $events.unbind(event_cleanup, reset);
+ reset();
+ }
+ } else {
+ if (settings.get('slideshow') && $related[1]) {
+ active = true;
+ $events.one(event_cleanup, reset);
+ if (settings.get('slideshowAuto')) {
+ start();
+ } else {
+ stop();
}
-
- return (relRelated === settings.rel);
- });
- index = $related.index(element);
-
- // Check direct calls to ColorBox.
- if (index === -1) {
- $related = $related.add(element);
- index = $related.length - 1;
+ $slideshow.show();
}
}
-
+ };
+
+ }());
+
+
+ function launch(element) {
+ var options;
+
+ if (!closing) {
+
+ options = $(element).data(colorbox);
+
+ settings = new Settings(element, options);
+
+ getRelated(settings.get('rel'));
+
if (!open) {
open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys.
-
+
+ setClass(settings.get('className'));
+
// Show colorbox so the sizes can be calculated in older versions of jQuery
- $box.css({visibility:'hidden', display:'block'});
-
- $loaded = $tag(div, 'LoadedContent', 'width:0; height:0; overflow:hidden').appendTo($content);
+ $box.css({visibility:'hidden', display:'block', opacity:''});
+
+ $loaded = $tag(div, 'LoadedContent', 'width:0; height:0; overflow:hidden; visibility:hidden');
+ $content.css({width:'', height:''}).append($loaded);
// Cache values needed for size calculations
- interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();//Subtraction needed for IE6
+ interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();
interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width();
loadedHeight = $loaded.outerHeight(true);
loadedWidth = $loaded.outerWidth(true);
- if (settings.returnFocus) {
- $(element).blur();
+ // Opens inital empty Colorbox prior to content being loaded.
+ var initialWidth = setSize(settings.get('initialWidth'), 'x');
+ var initialHeight = setSize(settings.get('initialHeight'), 'y');
+ var maxWidth = settings.get('maxWidth');
+ var maxHeight = settings.get('maxHeight');
+
+ settings.w = Math.max((maxWidth !== false ? Math.min(initialWidth, setSize(maxWidth, 'x')) : initialWidth) - loadedWidth - interfaceWidth, 0);
+ settings.h = Math.max((maxHeight !== false ? Math.min(initialHeight, setSize(maxHeight, 'y')) : initialHeight) - loadedHeight - interfaceHeight, 0);
+
+ $loaded.css({width:'', height:settings.h});
+ publicMethod.position();
+
+ trigger(event_open);
+ settings.get('onOpen');
+
+ $groupControls.add($title).hide();
+
+ $box.focus();
+
+ if (settings.get('trapFocus')) {
+ // Confine focus to the modal
+ // Uses event capturing that is not supported in IE8-
+ if (document.addEventListener) {
+
+ document.addEventListener('focus', trapFocus, true);
+
+ $events.one(event_closed, function () {
+ document.removeEventListener('focus', trapFocus, true);
+ });
+ }
+ }
+
+ // Return focus on closing
+ if (settings.get('returnFocus')) {
$events.one(event_closed, function () {
- $(element).focus();
+ $(settings.el).focus();
});
}
-
- $overlay.css({
- opacity: parseFloat(settings.opacity),
- cursor: settings.overlayClose ? "pointer" : "auto",
- visibility: 'visible'
- }).show();
-
- // Opens inital empty ColorBox prior to content being loaded.
- settings.w = setSize(settings.initialWidth, 'x');
- settings.h = setSize(settings.initialHeight, 'y');
- publicMethod.position();
+ }
- if (isIE6) {
- $window.bind('resize.' + event_ie6 + ' scroll.' + event_ie6, function () {
- $overlay.css({width: $window.width(), height: $window.height(), top: $window.scrollTop(), left: $window.scrollLeft()});
- }).trigger('resize.' + event_ie6);
- }
-
- slideshow();
+ var opacity = parseFloat(settings.get('opacity'));
+ $overlay.css({
+ opacity: opacity === opacity ? opacity : '',
+ cursor: settings.get('overlayClose') ? 'pointer' : '',
+ visibility: 'visible'
+ }).show();
- trigger(event_open, settings.onOpen);
-
- $groupControls.add($title).hide();
-
- $close.html(settings.close).show();
+ if (settings.get('closeButton')) {
+ $close.html(settings.get('close')).appendTo($content);
+ } else {
+ $close.appendTo('<div/>'); // replace with .detach() when dropping jQuery < 1.4
}
-
- publicMethod.load(true);
+
+ load();
}
}
- // ColorBox's markup needs to be added to the DOM prior to being called
+ // Colorbox's markup needs to be added to the DOM prior to being called
// so that the browser will go ahead and load the CSS background images.
function appendHTML() {
- if (!$box && document.body) {
+ if (!$box) {
init = false;
-
$window = $(window);
- $box = $tag(div).attr({id: colorbox, 'class': isIE ? prefix + (isIE6 ? 'IE6' : 'IE') : ''}).hide();
- $overlay = $tag(div, "Overlay", isIE6 ? 'position:absolute' : '').hide();
- $loadingOverlay = $tag(div, "LoadingOverlay").add($tag(div, "LoadingGraphic"));
+ $box = $tag(div).attr({
+ id: colorbox,
+ 'class': $.support.opacity === false ? prefix + 'IE' : '', // class for optional IE8 & lower targeted CSS.
+ role: 'dialog',
+ tabindex: '-1'
+ }).hide();
+ $overlay = $tag(div, "Overlay").hide();
+ $loadingOverlay = $([$tag(div, "LoadingOverlay")[0],$tag(div, "LoadingGraphic")[0]]);
$wrap = $tag(div, "Wrapper");
$content = $tag(div, "Content").append(
$title = $tag(div, "Title"),
$current = $tag(div, "Current"),
- $next = $tag(div, "Next"),
- $prev = $tag(div, "Previous"),
- $slideshow = $tag(div, "Slideshow"),
- $close = $tag(div, "Close")
+ $prev = $('<button type="button"/>').attr({id:prefix+'Previous'}),
+ $next = $('<button type="button"/>').attr({id:prefix+'Next'}),
+ $slideshow = $tag('button', "Slideshow"),
+ $loadingOverlay
);
-
- $wrap.append( // The 3x3 Grid that makes up ColorBox
+
+ $close = $('<button type="button"/>').attr({id:prefix+'Close'});
+
+ $wrap.append( // The 3x3 Grid that makes up Colorbox
$tag(div).append(
$tag(div, "TopLeft"),
$topBorder = $tag(div, "TopCenter"),
$tag(div, "BottomRight")
)
).find('div div').css({'float': 'left'});
-
- $loadingBay = $tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none');
-
- $groupControls = $next.add($prev).add($current).add($slideshow);
+ $loadingBay = $tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;');
+
+ $groupControls = $next.add($prev).add($current).add($slideshow);
+ }
+ if (document.body && !$box.parent().length) {
$(document.body).append($overlay, $box.append($wrap, $loadingBay));
}
}
- // Add ColorBox's event bindings
+ // Add Colorbox's event bindings
function addBindings() {
function clickHandler(e) {
// ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt.
// See: http://jacklmoore.com/notes/click-events/
- if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey)) {
+ if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey || e.ctrlKey)) {
e.preventDefault();
launch(this);
}
publicMethod.close();
});
$overlay.click(function () {
- if (settings.overlayClose) {
+ if (settings.get('overlayClose')) {
publicMethod.close();
}
});
-
+
// Key Bindings
$(document).bind('keydown.' + prefix, function (e) {
var key = e.keyCode;
- if (open && settings.escKey && key === 27) {
+ if (open && settings.get('escKey') && key === 27) {
e.preventDefault();
publicMethod.close();
}
- if (open && settings.arrowKey && $related[1]) {
+ if (open && settings.get('arrowKey') && $related[1] && !e.altKey) {
if (key === 37) {
e.preventDefault();
$prev.click();
});
if ($.isFunction($.fn.on)) {
+ // For jQuery 1.7+
$(document).on('click.'+prefix, '.'+boxElement, clickHandler);
- } else { // For jQuery 1.3.x -> 1.6.x
+ } else {
+ // For jQuery 1.3.x -> 1.6.x
+ // This code is never reached in jQuery 1.9, so do not contact me about 'live' being removed.
+ // This is not here for jQuery 1.9, it's here for legacy users.
$('.'+boxElement).live('click.'+prefix, clickHandler);
}
}
return false;
}
- // Don't do anything if ColorBox already exists.
- if ($.colorbox) {
+ // Don't do anything if Colorbox already exists.
+ if ($[colorbox]) {
return;
}
// ****************
// PUBLIC FUNCTIONS
- // Usage format: $.fn.colorbox.close();
- // Usage from within an iframe: parent.$.fn.colorbox.close();
+ // Usage format: $.colorbox.close();
+ // Usage from within an iframe: parent.jQuery.colorbox.close();
// ****************
-
+
publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) {
- var $this = this;
-
+ var settings;
+ var $obj = this;
+
options = options || {};
-
+
+ if ($.isFunction($obj)) { // assume a call to $.colorbox
+ $obj = $('<a/>');
+ options.open = true;
+ }
+
+ if (!$obj[0]) { // colorbox being applied to empty collection
+ return $obj;
+ }
+
appendHTML();
if (addBindings()) {
- if ($.isFunction($this)) { // assume a call to $.colorbox
- $this = $('<a/>');
- options.open = true;
- } else if (!$this[0]) { // colorbox being applied to empty collection
- return $this;
- }
-
+
if (callback) {
options.onComplete = callback;
}
-
- $this.each(function () {
- $.data(this, colorbox, $.extend({}, $.data(this, colorbox) || defaults, options));
+
+ $obj.each(function () {
+ var old = $.data(this, colorbox) || {};
+ $.data(this, colorbox, $.extend(old, options));
}).addClass(boxElement);
-
- if (($.isFunction(options.open) && options.open.call($this)) || options.open) {
- launch($this[0]);
+
+ settings = new Settings($obj[0], options);
+
+ if (settings.get('open')) {
+ launch($obj[0]);
}
}
-
- return $this;
+
+ return $obj;
};
publicMethod.position = function (speed, loadedCallback) {
offset = $box.offset(),
scrollTop,
scrollLeft;
-
+
$window.unbind('resize.' + prefix);
// remove the modal so that it doesn't influence the document width/height
scrollTop = $window.scrollTop();
scrollLeft = $window.scrollLeft();
- if (settings.fixed && !isIE6) {
+ if (settings.get('fixed')) {
offset.top -= scrollTop;
offset.left -= scrollLeft;
$box.css({position: 'fixed'});
}
// keeps the top and left positions within the browser's viewport.
- if (settings.right !== false) {
- left += Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(settings.right, 'x'), 0);
- } else if (settings.left !== false) {
- left += setSize(settings.left, 'x');
+ if (settings.get('right') !== false) {
+ left += Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(settings.get('right'), 'x'), 0);
+ } else if (settings.get('left') !== false) {
+ left += setSize(settings.get('left'), 'x');
} else {
left += Math.round(Math.max($window.width() - settings.w - loadedWidth - interfaceWidth, 0) / 2);
}
-
- if (settings.bottom !== false) {
- top += Math.max($window.height() - settings.h - loadedHeight - interfaceHeight - setSize(settings.bottom, 'y'), 0);
- } else if (settings.top !== false) {
- top += setSize(settings.top, 'y');
+
+ if (settings.get('bottom') !== false) {
+ top += Math.max(winheight() - settings.h - loadedHeight - interfaceHeight - setSize(settings.get('bottom'), 'y'), 0);
+ } else if (settings.get('top') !== false) {
+ top += setSize(settings.get('top'), 'y');
} else {
- top += Math.round(Math.max($window.height() - settings.h - loadedHeight - interfaceHeight, 0) / 2);
+ top += Math.round(Math.max(winheight() - settings.h - loadedHeight - interfaceHeight, 0) / 2);
}
$box.css({top: offset.top, left: offset.left, visibility:'visible'});
- // setting the speed to 0 to reduce the delay between same-sized content.
- speed = ($box.width() === settings.w + loadedWidth && $box.height() === settings.h + loadedHeight) ? 0 : speed || 0;
-
// this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly,
// but it has to be shrank down around the size of div#colorbox when it's done. If not,
// it can invoke an obscure IE bug when using iframes.
$wrap[0].style.width = $wrap[0].style.height = "9999px";
-
- function modalDimensions(that) {
- $topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = (parseInt(that.style.width,10) - interfaceWidth)+'px';
- $content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = (parseInt(that.style.height,10) - interfaceHeight)+'px';
+
+ function modalDimensions() {
+ $topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = (parseInt($box[0].style.width,10) - interfaceWidth)+'px';
+ $content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = (parseInt($box[0].style.height,10) - interfaceHeight)+'px';
}
css = {width: settings.w + loadedWidth + interfaceWidth, height: settings.h + loadedHeight + interfaceHeight, top: top, left: left};
- if(speed===0){ // temporary workaround to side-step jQuery-UI 1.8 bug (http://bugs.jquery.com/ticket/12273)
+ // setting the speed to 0 if the content hasn't changed size or position
+ if (speed) {
+ var tempSpeed = 0;
+ $.each(css, function(i){
+ if (css[i] !== previousCSS[i]) {
+ tempSpeed = speed;
+ return;
+ }
+ });
+ speed = tempSpeed;
+ }
+
+ previousCSS = css;
+
+ if (!speed) {
$box.css(css);
}
+
$box.dequeue().animate(css, {
- duration: speed,
+ duration: speed || 0,
complete: function () {
- modalDimensions(this);
-
+ modalDimensions();
+
active = false;
-
+
// shrink the wrapper down to exactly the size of colorbox to avoid a bug in IE's iframe implementation.
$wrap[0].style.width = (settings.w + loadedWidth + interfaceWidth) + "px";
$wrap[0].style.height = (settings.h + loadedHeight + interfaceHeight) + "px";
-
- if (settings.reposition) {
+
+ if (settings.get('reposition')) {
setTimeout(function () { // small delay before binding onresize due to an IE8 bug.
$window.bind('resize.' + prefix, publicMethod.position);
}, 1);
}
- if (loadedCallback) {
+ if ($.isFunction(loadedCallback)) {
loadedCallback();
}
},
- step: function () {
- modalDimensions(this);
- }
+ step: modalDimensions
});
};
publicMethod.resize = function (options) {
+ var scrolltop;
+
if (open) {
options = options || {};
-
+
if (options.width) {
settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth;
}
+
if (options.innerWidth) {
settings.w = setSize(options.innerWidth, 'x');
}
+
$loaded.css({width: settings.w});
-
+
if (options.height) {
settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight;
}
+
if (options.innerHeight) {
settings.h = setSize(options.innerHeight, 'y');
}
+
if (!options.innerHeight && !options.height) {
+ scrolltop = $loaded.scrollTop();
$loaded.css({height: "auto"});
settings.h = $loaded.height();
}
+
$loaded.css({height: settings.h});
-
- publicMethod.position(settings.transition === "none" ? 0 : settings.speed);
+
+ if(scrolltop) {
+ $loaded.scrollTop(scrolltop);
+ }
+
+ publicMethod.position(settings.get('transition') === "none" ? 0 : settings.get('speed'));
}
};
if (!open) {
return;
}
-
- var callback, speed = settings.transition === "none" ? 0 : settings.speed;
-
- $loaded.empty().remove(); // Using empty first may prevent some IE7 issues.
+
+ var callback, speed = settings.get('transition') === "none" ? 0 : settings.get('speed');
+
+ $loaded.remove();
$loaded = $tag(div, 'LoadedContent').append(object);
-
+
function getWidth() {
settings.w = settings.w || $loaded.width();
settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w;
settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h;
return settings.h;
}
-
+
$loaded.hide()
.appendTo($loadingBay.show())// content has to be appended to the DOM for accurate size calculations.
- .css({width: getWidth(), overflow: settings.scrolling ? 'auto' : 'hidden'})
+ .css({width: getWidth(), overflow: settings.get('scrolling') ? 'auto' : 'hidden'})
.css({height: getHeight()})// sets the height independently from the width in case the new width influences the value of height.
.prependTo($content);
-
+
$loadingBay.hide();
-
+
// floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width.
- //$(photo).css({'float': 'none', marginLeft: 'auto', marginRight: 'auto'});
-
+
$(photo).css({'float': 'none'});
-
+ setClass(settings.get('className'));
+
callback = function () {
var total = $related.length,
iframe,
- frameBorder = 'frameBorder',
- allowTransparency = 'allowTransparency',
complete;
-
+
if (!open) {
return;
}
-
- function removeFilter() {
- if (isIE) {
+
+ function removeFilter() { // Needed for IE8 in versions of jQuery prior to 1.7.2
+ if ($.support.opacity === false) {
$box[0].style.removeAttribute('filter');
}
}
-
+
complete = function () {
clearTimeout(loadingTimer);
- $loadingOverlay.remove();
- trigger(event_complete, settings.onComplete);
+ $loadingOverlay.hide();
+ trigger(event_complete);
+ settings.get('onComplete');
};
-
- if (isIE) {
- //This fadeIn helps the bicubic resampling to kick-in.
- if (photo) {
- $loaded.fadeIn(100);
- }
- }
-
- $title.html(settings.title).add($loaded).show();
-
+
+
+ $title.html(settings.get('title')).show();
+ $loaded.show();
+
if (total > 1) { // handle grouping
- if (typeof settings.current === "string") {
- $current.html(settings.current.replace('{current}', index + 1).replace('{total}', total)).show();
- }
-
- $next[(settings.loop || index < total - 1) ? "show" : "hide"]().html(settings.next);
- $prev[(settings.loop || index) ? "show" : "hide"]().html(settings.previous);
-
- if (settings.slideshow) {
- $slideshow.show();
+ if (typeof settings.get('current') === "string") {
+ $current.html(settings.get('current').replace('{current}', index + 1).replace('{total}', total)).show();
}
-
+
+ $next[(settings.get('loop') || index < total - 1) ? "show" : "hide"]().html(settings.get('next'));
+ $prev[(settings.get('loop') || index) ? "show" : "hide"]().html(settings.get('previous'));
+
+ slideshow();
+
// Preloads images within a rel group
- if (settings.preloading) {
+ if (settings.get('preloading')) {
$.each([getIndex(-1), getIndex(1)], function(){
- var src,
- img,
+ var img,
i = $related[this],
- data = $.data(i, colorbox);
-
- if (data && data.href) {
- src = data.href;
- if ($.isFunction(src)) {
- src = src.call(i);
- }
- } else {
- src = $(i).attr('href');
- }
+ settings = new Settings(i, $.data(i, colorbox)),
+ src = settings.get('href');
- if (src && (isImage(src) || data.photo)) {
- img = new Image();
+ if (src && isImage(settings, src)) {
+ src = retinaUrl(settings, src);
+ img = document.createElement('img');
img.src = src;
}
});
} else {
$groupControls.hide();
}
-
- if (settings.iframe) {
- iframe = $tag('iframe')[0];
-
- if (frameBorder in iframe) {
- iframe[frameBorder] = 0;
- }
-
- if (allowTransparency in iframe) {
- iframe[allowTransparency] = "true";
- }
- if (!settings.scrolling) {
+ if (settings.get('iframe')) {
+
+ iframe = settings.get('createIframe');
+
+ if (!settings.get('scrolling')) {
iframe.scrolling = "no";
}
-
+
$(iframe)
.attr({
- src: settings.href,
- name: (new Date()).getTime(), // give the iframe a unique name to prevent caching
- 'class': prefix + 'Iframe',
- allowFullScreen : true, // allow HTML5 video to go fullscreen
- webkitAllowFullScreen : true,
- mozallowfullscreen : true
+ src: settings.get('href'),
+ 'class': prefix + 'Iframe'
})
.one('load', complete)
.appendTo($loaded);
-
+
$events.one(event_purge, function () {
iframe.src = "//about:blank";
});
- if (settings.fastIframe) {
+ if (settings.get('fastIframe')) {
$(iframe).trigger('load');
}
} else {
complete();
}
-
- if (settings.transition === 'fade') {
+
+ if (settings.get('transition') === 'fade') {
$box.fadeTo(speed, 1, removeFilter);
} else {
removeFilter();
}
};
-
- if (settings.transition === 'fade') {
+
+ if (settings.get('transition') === 'fade') {
$box.fadeTo(speed, 0, function () {
publicMethod.position(0, callback);
});
}
};
- publicMethod.load = function (launched) {
- var href, setResize, prep = publicMethod.prep, $inline;
-
+ function load () {
+ var href, setResize, prep = publicMethod.prep, $inline, request = ++requests;
+
active = true;
-
+
photo = false;
-
- element = $related[index];
-
- if (!launched) {
- makeSettings();
- }
- if (className) {
- $box.add($overlay).removeClass(className);
- }
- if (settings.className) {
- $box.add($overlay).addClass(settings.className);
- }
- className = settings.className;
-
trigger(event_purge);
-
- trigger(event_load, settings.onLoad);
-
- settings.h = settings.height ?
- setSize(settings.height, 'y') - loadedHeight - interfaceHeight :
- settings.innerHeight && setSize(settings.innerHeight, 'y');
-
- settings.w = settings.width ?
- setSize(settings.width, 'x') - loadedWidth - interfaceWidth :
- settings.innerWidth && setSize(settings.innerWidth, 'x');
-
+ trigger(event_load);
+ settings.get('onLoad');
+
+ settings.h = settings.get('height') ?
+ setSize(settings.get('height'), 'y') - loadedHeight - interfaceHeight :
+ settings.get('innerHeight') && setSize(settings.get('innerHeight'), 'y');
+
+ settings.w = settings.get('width') ?
+ setSize(settings.get('width'), 'x') - loadedWidth - interfaceWidth :
+ settings.get('innerWidth') && setSize(settings.get('innerWidth'), 'x');
+
// Sets the minimum dimensions for use in image scaling
settings.mw = settings.w;
settings.mh = settings.h;
-
+
// Re-evaluate the minimum width and height based on maxWidth and maxHeight values.
// If the width or height exceed the maxWidth or maxHeight, use the maximum values instead.
- if (settings.maxWidth) {
- settings.mw = setSize(settings.maxWidth, 'x') - loadedWidth - interfaceWidth;
+ if (settings.get('maxWidth')) {
+ settings.mw = setSize(settings.get('maxWidth'), 'x') - loadedWidth - interfaceWidth;
settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw;
}
- if (settings.maxHeight) {
- settings.mh = setSize(settings.maxHeight, 'y') - loadedHeight - interfaceHeight;
+ if (settings.get('maxHeight')) {
+ settings.mh = setSize(settings.get('maxHeight'), 'y') - loadedHeight - interfaceHeight;
settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh;
}
-
- href = settings.href;
-
+
+ href = settings.get('href');
+
loadingTimer = setTimeout(function () {
- $loadingOverlay.appendTo($content);
+ $loadingOverlay.show();
}, 100);
-
- if (settings.inline) {
+
+ if (settings.get('inline')) {
+ var $target = $(href);
// Inserts an empty placeholder where inline content is being pulled from.
- // An event is bound to put inline content back when ColorBox closes or loads new content.
- $inline = $tag(div).hide().insertBefore($(href)[0]);
+ // An event is bound to put inline content back when Colorbox closes or loads new content.
+ $inline = $('<div>').hide().insertBefore($target);
$events.one(event_purge, function () {
- $inline.replaceWith($loaded.children());
+ $inline.replaceWith($target);
});
- prep($(href));
- } else if (settings.iframe) {
+ prep($target);
+ } else if (settings.get('iframe')) {
// IFrame element won't be added to the DOM until it is ready to be displayed,
// to avoid problems with DOM-ready JS that might be trying to run in that iframe.
prep(" ");
- } else if (settings.html) {
- prep(settings.html);
- } else if (isImage(href)) {
- $(photo = new Image())
+ } else if (settings.get('html')) {
+ prep(settings.get('html'));
+ } else if (isImage(settings, href)) {
+
+ href = retinaUrl(settings, href);
+
+ photo = settings.get('createImg');
+
+ $(photo)
.addClass(prefix + 'Photo')
- .bind('error',function () {
- settings.title = false;
- prep($tag(div, 'Error').html(settings.imgError));
+ .bind('error.'+prefix,function () {
+ prep($tag(div, 'Error').html(settings.get('imgError')));
})
.one('load', function () {
- var percent;
-
- if (settings.scalePhotos) {
- setResize = function () {
- photo.height -= photo.height * percent;
- photo.width -= photo.width * percent;
- };
- if (settings.mw && photo.width > settings.mw) {
- percent = (photo.width - settings.mw) / photo.width;
- setResize();
+ if (request !== requests) {
+ return;
+ }
+
+ // A small pause because some browsers will occassionaly report a
+ // img.width and img.height of zero immediately after the img.onload fires
+ setTimeout(function(){
+ var percent;
+
+ if (settings.get('retinaImage') && window.devicePixelRatio > 1) {
+ photo.height = photo.height / window.devicePixelRatio;
+ photo.width = photo.width / window.devicePixelRatio;
}
- if (settings.mh && photo.height > settings.mh) {
- percent = (photo.height - settings.mh) / photo.height;
- setResize();
+
+ if (settings.get('scalePhotos')) {
+ setResize = function () {
+ photo.height -= photo.height * percent;
+ photo.width -= photo.width * percent;
+ };
+ if (settings.mw && photo.width > settings.mw) {
+ percent = (photo.width - settings.mw) / photo.width;
+ setResize();
+ }
+ if (settings.mh && photo.height > settings.mh) {
+ percent = (photo.height - settings.mh) / photo.height;
+ setResize();
+ }
}
- }
-
- if (settings.h) {
- photo.style.marginTop = Math.max(settings.mh - photo.height, 0) / 2 + 'px';
- }
-
- if ($related[1] && (settings.loop || $related[index + 1])) {
- photo.style.cursor = 'pointer';
- photo.onclick = function () {
- publicMethod.next();
- };
- }
-
- if (isIE) {
- photo.style.msInterpolationMode = 'bicubic';
- }
-
- setTimeout(function () { // A pause because Chrome will sometimes report a 0 by 0 size otherwise.
+
+ if (settings.h) {
+ photo.style.marginTop = Math.max(settings.mh - photo.height, 0) / 2 + 'px';
+ }
+
+ if ($related[1] && (settings.get('loop') || $related[index + 1])) {
+ photo.style.cursor = 'pointer';
+
+ $(photo).bind('click.'+prefix, function () {
+ publicMethod.next();
+ });
+ }
+
+ photo.style.width = photo.width + 'px';
+ photo.style.height = photo.height + 'px';
prep(photo);
}, 1);
});
-
- setTimeout(function () { // A pause because Opera 10.6+ will sometimes not run the onload function otherwise.
- photo.src = href;
- }, 1);
+
+ photo.src = href;
+
} else if (href) {
- $loadingBay.load(href, settings.data, function (data, status) {
- prep(status === 'error' ? $tag(div, 'Error').html(settings.xhrError) : $(this).contents());
+ $loadingBay.load(href, settings.get('data'), function (data, status) {
+ if (request === requests) {
+ prep(status === 'error' ? $tag(div, 'Error').html(settings.get('xhrError')) : $(this).contents());
+ }
});
}
- };
-
+ }
+
// Navigates to the next page/image in a set.
publicMethod.next = function () {
- if (!active && $related[1] && (settings.loop || $related[index + 1])) {
+ if (!active && $related[1] && (settings.get('loop') || $related[index + 1])) {
index = getIndex(1);
- publicMethod.load();
+ launch($related[index]);
}
};
-
+
publicMethod.prev = function () {
- if (!active && $related[1] && (settings.loop || index)) {
+ if (!active && $related[1] && (settings.get('loop') || index)) {
index = getIndex(-1);
- publicMethod.load();
+ launch($related[index]);
}
};
- // Note: to use this within an iframe use the following format: parent.$.fn.colorbox.close();
+ // Note: to use this within an iframe use the following format: parent.jQuery.colorbox.close();
publicMethod.close = function () {
if (open && !closing) {
-
+
closing = true;
-
open = false;
-
- trigger(event_cleanup, settings.onCleanup);
-
- $window.unbind('.' + prefix + ' .' + event_ie6);
-
- $overlay.fadeTo(200, 0);
-
- $box.stop().fadeTo(300, 0, function () {
-
- $box.add($overlay).css({'opacity': 1, cursor: 'auto'}).hide();
-
+ trigger(event_cleanup);
+ settings.get('onCleanup');
+ $window.unbind('.' + prefix);
+ $overlay.fadeTo(settings.get('fadeOut') || 0, 0);
+
+ $box.stop().fadeTo(settings.get('fadeOut') || 0, 0, function () {
+ $box.hide();
+ $overlay.hide();
trigger(event_purge);
-
- $loaded.empty().remove(); // Using empty first may prevent some IE7 issues.
-
+ $loaded.remove();
+
setTimeout(function () {
closing = false;
- trigger(event_closed, settings.onClosed);
+ trigger(event_closed);
+ settings.get('onClosed');
}, 1);
});
}
};
- // Removes changes ColorBox made to the document, but does not remove the plugin
- // from jQuery.
+ // Removes changes Colorbox made to the document, but does not remove the plugin.
publicMethod.remove = function () {
- $([]).add($box).add($overlay).remove();
+ if (!$box) { return; }
+
+ $box.stop();
+ $[colorbox].close();
+ $box.stop(false, true).remove();
+ $overlay.remove();
+ closing = false;
$box = null;
$('.' + boxElement)
.removeData(colorbox)
.removeClass(boxElement);
- $(document).unbind('click.'+prefix);
+ $(document).unbind('click.'+prefix).unbind('keydown.'+prefix);
};
- // A method for fetching the current element ColorBox is referencing.
+ // A method for fetching the current element Colorbox is referencing.
// returns a jQuery object.
publicMethod.element = function () {
- return $(element);
+ return $(settings.el);
};
publicMethod.settings = defaults;
--- /dev/null
+{
+ "name": "jquery-colorbox",
+ "description": "jQuery lightbox and modal window plugin.",
+ "version": "1.6.3",
+ "keywords": [
+ "modal",
+ "lightbox",
+ "gallery",
+ "popup",
+ "ui",
+ "jquery-plugin"
+ ],
+ "author": {
+ "name": "Jack Moore",
+ "url": "http://www.jacklmoore.com",
+ "email": "hello@jacklmoore.com"
+ },
+ "main": "jquery.colorbox.js",
+ "license": "MIT",
+ "homepage": "http://www.jacklmoore.com/colorbox",
+ "demo": "http://www.jacklmoore.com/colorbox",
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/jackmoore/colorbox.git"
+ },
+ "dependencies": {
+ "jquery": ">=1.3.2"
+ }
+}