/*! Slimbox v2.04 - The ultimate lightweight Lightbox clone for jQuery (c) 2007-2010 Christophe Beyls MIT-style license. Modified by Neil Storer to add the following feature(s): 1) the ability to resize the images in the slide show by using the following two options on the "slimbox" function call: slideHeight, slideWidth. both options can take either: an integer the value of which denotes PIXELS e.g. {slideWidth: 300, slideHeight: 200} or a string specifying the PERCENTAGE size of the slide image e.g. {slideWidth: "50%", slideHeight: "50%"} 2) the ability to enable the user to specify a "slideInterval" option that will show a PLAY/PAUSE button that the user can press to enable the slides to be flipped automatically evry "slideInterval" seconds. Modified by Florian Hoech to add the following feature(s): 3) the ability to automatically reduce the size of the images in the slide show if they are larger than the given maxima by using the following two options on the "slimbox" function call: maxHeight, maxWidth. both options can take either: an integer the value of which denotes PIXELS e.g. {maxWidth: 600, maxHeight: 400} or a string specifying the PERCENTAGE size of the viewport e.g. {maxWidth: "95%", maxHeight: "95%"} default is 95% of the viewport. 4) Bugfix: If html has overflow:hidden and body has overflow:scroll, and the page is scrolled, the image position was not correct in IE < 9 5) Automatically skip duplicates in galleries */ (function($) { // DOM elements var overlay, center, image, slide, sizer, prevLink, nextLink, playPauseLink, closeBtn, bottomContainer, bottom, caption, number; /* Initialization */ $(function() { // Append the Slimbox HTML code at the bottom of the document $("body").append( $([ overlay = $('
')[0], center = $('
')[0], bottomContainer = $('
')[0] ]).css("display", "none") ); image = $('
').appendTo(center).append( sizer = $('
').append([ slide = $('')[0] ])[0] )[0]; bottom = $('
').appendTo(bottomContainer).append([ closeBtn = $('Close')[0], caption = $('
')[0], number = $('
')[0], prevLink = $('Prev')[0], nextLink = $('Next')[0], playPauseLink = $('