/*
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License - {@link http://opensource.org/licenses/mit-license.php}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 MIT License {@link http://creativecommons.org/licenses/MIT/}
 @example Visit {@link http://balupton.com/projects/jquery-lightbox} for more information.
*/
(function(b){if("object"!==typeof window.console||"undefined"===typeof window.console.emulated){if("object"!==typeof window.console||!("function"===typeof window.console.log||"object"===typeof window.console.log))window.console={},window.console.log=window.console.debug=window.console.warn=window.console.trace=function(){},window.console.error=function(){for(var a="An error has occured. More information will be available in the console log.",b=0;b<arguments.length&&"string"===typeof arguments[b];++b)a+=
"\n"+arguments[b];if("undefined"!==typeof Error)throw Error(a);throw a;};else if("undefined"===typeof window.console.debug&&(window.console.debug=function(){for(var a=["console.debug:"],b=0;b<arguments.length;b++)a.push(arguments[b]);window.console.log.apply(window.console,a)}),"undefined"===typeof window.console.warn&&(window.console.warn=function(){for(var a=["console.warn:"],b=0;b<arguments.length;b++)a.push(arguments[b]);window.console.log.apply(window.console,a)}),"undefined"===typeof window.console.error&&
(window.console.error=function(){for(var a=["console.error"],b=0;b<arguments.length;b++)a.push(arguments[b]);window.console.log.apply(window.console,a)}),"undefined"===typeof window.console.trace)window.console.trace=function(){window.console.error.apply(window.console,["console.trace does not exist"])};window.console.emulated=!0}String.prototype.queryStringToJSON=String.prototype.queryStringToJSON||function(){var a=""+this,a=a.substring(a.indexOf("?")+1),a=a.replace(/\+/g,"%20");if("{"===a.substring(0,
1)&&"}"===a.substring(a.length-1))return eval(decodeURIComponent(a));for(var a=a.split(/\&(amp\;)?/),c={},d=0,e=a.length;d<e;++d){var f=a[d]||null;if(null!==f&&(f=f.split("="),null!==f)){var g=f[0]||null;if(null!==g&&"undefined"!==typeof f[1]){f=f[1];g=decodeURIComponent(g);f=decodeURIComponent(f);try{f=eval(f)}catch(h){}var k=g.split(".");if(1===k.length)c[g]=f;else{var i="",j="";b.each(k,function(a,b){i+='["'+b.replace(/"/g,'\\"')+'"]';jsonCLOSUREGLOBAL=c;j="if ( typeof jsonCLOSUREGLOBAL"+i+' === "undefined" ) jsonCLOSUREGLOBAL'+
i+" = {}";eval(j);c=jsonCLOSUREGLOBAL;delete jsonCLOSUREGLOBAL});jsonCLOSUREGLOBAL=c;valueCLOSUREGLOBAL=f;j="jsonCLOSUREGLOBAL"+i+" = valueCLOSUREGLOBAL";eval(j);c=jsonCLOSUREGLOBAL;delete jsonCLOSUREGLOBAL;delete valueCLOSUREGLOBAL}}}}return c};Array.prototype.remove=function(a,b){var d=this.slice((b||a)+1||this.length);this.length=0>a?this.length+a:a;return this.push.apply(this,d)};Array.prototype.get=function(a,b){"first"===a?a=0:"last"===a?a=this.length-1:"prev"===a?a=this.index-1:"next"===a?
a=this.index+1:!a&&0!==a&&(a=this.index);b&&this.setIndex(a);return this.exists(a)?this[a]:void 0};Array.prototype.each=function(a){for(var b=0;b<this.length&&!1!==a(b,this[b],this);++b);return this};Array.prototype.validIndex=function(a){return 0<=a&&a<this.length};Array.prototype.setIndex=function(a){this.index=this.validIndex(a)?a:null;return this};Array.prototype.current=function(a){return this.get(a,!0)};Array.prototype.isEmpty=function(){return 0===this.length};Array.prototype.isSingle=function(){return 1===
this.length};Array.prototype.isNotEmpty=function(){return 0!==this.length};Array.prototype.isNotEmpty=function(){return 1<this.length};Array.prototype.isLast=function(a){a="undefined"===typeof a?this.index:a;return!this.isEmpty()&&a===this.length-1};Array.prototype.isFirst=function(a){a="undefined"===typeof a?this.index:a;return!this.isEmpty()&&0===a};Array.prototype.clear=function(){this.length=0};Array.prototype.next=function(a){return this.get(this.index+1,a)};Array.prototype.prev=function(a){return this.get(this.index-
1,a)};Array.prototype.reset=function(){this.index=null;return this};Array.prototype.set=function(a,b){if(a<this.length&&0<=a)this[a]=b;else throw Error("Array.prototype.set: [index] above this.length");return this};Array.prototype.loop=function(){return!this.index&&0!==this.index?this.current(0):this.next()};Array.prototype.add=function(){this.push.apply(this,arguments);return this};Array.prototype.insert=function(a,b){"number"!==typeof a&&(a=this.length);var a=a<=this.length?a:this.length,d=this.slice(a);
this.length=a;this.push(b);this.push.apply(this,d);return this};Array.prototype.exists=Array.prototype.exists||function(a){return"undefined"!==typeof this[a]};Array.prototype.has=Array.prototype.has||function(a){for(var b=!1,d=0,e=this.length;d<e;++d)if(a==this[d]){b=!0;break}return b};b.fn.once=b.fn.once||function(a,c,d){var e=b(this);d?(e.unbind(a,d),e.bind(a,c,d)):(d=c,e.unbind(a,d),e.bind(a,d));return e};b.fn.binder=b.fn.binder||function(a,c,d){var e=b(this);d?e.bind(a,c,d):e.bind(a,c);return e};
b.fn.lastclick=b.fn.lastclick||function(a,c){return b(this).binder("lastclick",a,c)};b.event.special.lastclick=b.event.special.lastclick||{setup:function(){b(this).bind("click",b.event.special.lastclick.handler)},teardown:function(){b(this).unbind("click",b.event.special.lastclick.handler)},handler:function(a){var c=function(){var a=b(this),c=a.data("lastclick-timeout")||!1;c&&clearTimeout(c);a.data("lastclick-timeout",!1)};(function(a){var e=this;c.call(e);var f=b(e);f.data("lastclick-clicks",(f.data("lastclick-clicks")||
0)+1);var g=setTimeout(function(){var h=f.data("lastclick-clicks");c.apply(e,[a]);f.data("lastclick-clicks",0);a.type="lastclick";b.event.handle.apply(e,[a,h])},300);f.data("lastclick-timeout",g)}).apply(this,[a])}};b.fn.preventDefault=b.fn.preventDefault||function(){return b(this).click(function(a){a.preventDefault();return!1})};b.LightboxClass=function(){this.construct()};b.fn.lightbox=function(a){b.Lightbox=b.Lightbox||new b.LightboxClass;if(b.Lightbox.ie6&&!b.Lightbox.ie6_support)return this;
var a=b.extend({start:!1,events:!0},a),c=b(this);a.events&&(c.preventDefault().once("lastclick",function(a){var e=b(this),e=c.index(e);if(!b.Lightbox.init(e,c)||!b.Lightbox.start())return!1;a.preventDefault();return!1}),c.addClass("lightbox-enabled"));if(a.start){b(this);if(!b.Lightbox.init(0,c))return this;b.Lightbox.start()}return this};b.extend(b.LightboxClass.prototype,{images:[],constructed:!1,compressed:null,src:null,baseurl:null,files:{compressed:{scripts:{lightbox:"scripts/jquery.lightbox.min.js",
colorBlend:"scripts/jquery.color.min.js"},styles:{lightbox:"styles/jquery.lightbox.min.css"}},uncompressed:{scripts:{lightbox:"scripts/jquery.lightbox.js",colorBlend:"scripts/jquery.color.js"},styles:{lightbox:"styles/jquery.lightbox.css"}},images:{prev:"images/prev.gif",next:"images/next.gif",blank:"images/blank.gif",loading:"images/loading.gif"}},text:{image:"Image",of:"of",close:"Close X",closeInfo:"You can also click anywhere outside the image to close.",download:"Download.",help:{close:"Click to close",
interact:"Hover to interact"},about:{text:"jQuery Lightbox Plugin (balupton edition)",title:"Licenced under the GNU Affero General Public License.",link:"http://balupton.com/projects/jquery-lightbox"}},keys:{close:"c",prev:"p",next:"n"},handlers:{show:null},opacity:0.9,padding:null,speed:400,rel:"lightbox",auto_relify:!0,auto_scroll:"follow",auto_resize:!0,ie6:null,ie6_support:!0,colorBlend:null,download_link:!0,show_helper_text:!0,show_linkback:!0,show_info:"auto",show_extended_info:"auto",options:"show_helper_text auto_scroll auto_resize download_link show_info show_extended_info ie6_support colorBlend baseurl files text show_linkback keys opacity padding speed rel auto_relify".split(" "),
construct:function(a){var c="undefined"===typeof this.constructed||!1===this.constructed;this.constructed=!0;var d=c,a=a||{},e=function(a,b){if("object"===typeof a)for(var c in a)a[c]=e(a[c],b);else if("array"===typeof b){c=0;for(var d=a.length;c<d;++c)a[c]=e(a[c],b)}else a=b+a;return a};if(c&&"undefined"===typeof a.files){this.compressed=null;var f=b("script[src*="+this.files.compressed.scripts.lightbox+"]:first");0!==f.length?(b.extend(!0,this.files,this.files.compressed),this.compressed=!0):(f=
b("script[src*="+this.files.uncompressed.scripts.lightbox+"]:first"),0!==f.length&&(b.extend(!0,this.files,this.files.uncompressed),this.compressed=!1));null===this.compressed?(window.console.error("Lightbox was not able to find it's javascript script tag necessary for auto-inclusion."),d=!1):(this.src=f.attr("src"),this.baseurl=this.src.substring(0,this.src.indexOf(this.files.scripts.lightbox)),this.files=e(this.files,this.baseurl),a=b.extend(a,this.src.queryStringToJSON()));this.images.image={src:"",
title:"Untitled",description:"",name:"",color:null,width:null,height:null,id:null,image:!0};this.images.prepare=function(a){var c=b.extend({},this.image);if(a.tagName){a=b(a);if(a.attr("src")||a.attr("href")){c.src=a.attr("src")||a.attr("href");c.title=a.attr("title")||a.attr("alt")||c.title;c.name=a.attr("name")||"";c.color=a.css("backgroundColor");a=c.title.indexOf(": ");if(a>0){c.description=c.title.substring(a+2)||c.description;c.title=c.title.substring(0,a)||c.title}}else c=null}else c=a.src?
b.extend(this.image,a):null;if(c)c.id=c.id||c.src+c.title+c.description;return c};this.images.create=function(a){var b=this;if(a.each)a.each(function(a,c){b.create(c)});else{var c=b.prepare(a);c?b.push(c):window.console.error("We dont know what we have:",a,c);return b}}}else"object"===typeof a.files?a.files=e(a.files,this.baseurl):d=!1;for(var g in this.options)f=this.options[g],"object"===typeof a[f]&&"object"===typeof this[f]?this[f]=b.extend(!0,this[f],a[f]):"undefined"!==typeof a[f]&&(this[f]=
a[f]);delete g;this.ie6=c&&0<=navigator.userAgent.indexOf("MSIE 6")?!0:!1;(d||"undefined"!==typeof a.download_link||"undefined"!==typeof a.colorBlend||"object"===typeof a.files||"object"===typeof a.text||"undefined"!==typeof a.show_linkback||"undefined"!==typeof a.scroll_with)&&b(function(){b.Lightbox.domReady()});return!0},domReady:function(){var a=document.getElementsByTagName(b.browser.safari?"head":"body")[0],c=this.files.styles,d=this.files.scripts;!0===this.colorBlend&&"undefined"===typeof b.colorBlend?
this.colorBlend=!0:(this.colorBlend="undefined"!==typeof b.colorBlend,delete d.colorBlend);for(stylesheet in c){var e=document.createElement("link");e.type="text/css";e.rel="stylesheet";e.media="screen";e.href=c[stylesheet];e.id="lightbox-stylesheet-"+stylesheet.replace(/[^a-zA-Z0-9]/g,"");b("#"+e.id).remove();a.appendChild(e)}delete d.lightbox;for(script in d)e=document.createElement("script"),e.type="text/javascript",e.src=d[script],e.id="lightbox-script-"+script.replace(/[^a-zA-Z0-9]/g,""),b("#"+
e.id).remove(),a.appendChild(e);delete d;delete c;delete a;b("#lightbox,#lightbox-overlay").remove();b("body").append('<div id="lightbox-overlay"><div id="lightbox-overlay-text">'+(this.show_linkback?'<p><span id="lightbox-overlay-text-about"><a href="#" title="'+this.text.about.title+'">'+this.text.about.text+"</a></span></p><p>&nbsp;</p>":"")+(this.show_helper_text?'<p><span id="lightbox-overlay-text-close">'+this.text.help.close+'</span><br/>&nbsp;<span id="lightbox-overlay-text-interact">'+this.text.help.interact+
"</span></p>":"")+'</div></div><div id="lightbox"><div id="lightbox-imageBox"><div id="lightbox-imageContainer"><img id="lightbox-image" /><div id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="'+this.files.images.loading+'" /></a></div></div></div><div id="lightbox-infoBox"><div id="lightbox-infoContainer"><div id="lightbox-infoHeader"><span id="lightbox-caption">'+
(this.download_link?'<a href="#" title="'+this.text.download+'" id="lightbox-caption-title"></a>':'<span id="lightbox-caption-title"></span>')+'<span id="lightbox-caption-seperator"></span><span id="lightbox-caption-description"></span></span></div><div id="lightbox-infoFooter"><span id="lightbox-currentNumber"></span><span id="lightbox-close"><a href="#" id="lightbox-close-button" title="'+this.text.closeInfo+'">'+this.text.close+'</a></span></div><div id="lightbox-infoContainer-clear"></div></div></div></div>');
this.resizeBoxes();this.repositionBoxes();b("#lightbox,#lightbox-overlay,#lightbox-overlay-text-interact").hide();this.ie6&&this.ie6_support&&b("#lightbox-overlay").css({position:"absolute",top:"0px",left:"0px"});b.each(this.files.images,function(){var a=new Image;a.onload=function(){a=a.onload=null};a.src=this});b(window).unbind("resize").resize(function(){b.Lightbox.resizeBoxes("resized")});"follow"===this.scroll&&b(window).scroll(function(){b.Lightbox.repositionBoxes()});b("#lightbox-nav-btnPrev").unbind().preventDefault().hover(function(){b(this).css({background:"url("+
b.Lightbox.files.images.prev+") left 45% no-repeat"})},function(){b(this).css({background:"transparent url("+b.Lightbox.files.images.blank+") no-repeat"})}).lastclick(function(){b.Lightbox.showImage("prev");return false});b("#lightbox-nav-btnNext").unbind().preventDefault().hover(function(){b(this).css({background:"url("+b.Lightbox.files.images.next+") right 45% no-repeat"})},function(){b(this).css({background:"transparent url("+b.Lightbox.files.images.blank+") no-repeat"})}).lastclick(function(){b.Lightbox.showImage("next");
return false});this.show_linkback&&b("#lightbox-overlay-text-about a").preventDefault().lastclick(function(){window.open(b.Lightbox.text.about.link);return false});b("#lightbox-overlay-text-close").unbind().hover(function(){b("#lightbox-overlay-text-interact").fadeIn()},function(){b("#lightbox-overlay-text-interact").fadeOut()});this.download_link&&b("#lightbox-caption-title").preventDefault().lastclick(function(){window.open(b(this).attr("href"));return false});b("#lightbox-overlay, #lightbox, #lightbox-loading-link, #lightbox-btnClose").unbind().preventDefault().lastclick(function(){b.Lightbox.finish();
return false});this.auto_relify&&this.relify();return!0},relify:function(){var a={},c=0,d=this.rel;b.each(b("[rel*="+d+"]"),function(e,f){var g=b(f).attr("rel");g===d&&(g=c);"undefined"===typeof a[g]&&(a[g]=[],c++);a[g].push(f)});b.each(a,function(a,c){b(c).lightbox()});return!0},init:function(a,b){"undefined"===typeof b&&(b=a,a=0);this.images.clear();this.images.create(b);return this.images.isEmpty()?(window.console.warn("WARNING","Lightbox started, but no images: ",a,b),!1):!this.images.current(a)?
(window.console.warn("WARNING","Could not find current image: ",a,this.images),!1):!0},start:function(){this.visible=!0;"disable"===this.scroll&&b(document.body).css("overflow","hidden");b("embed, object, select").css("visibility","hidden");this.resizeBoxes("general");this.repositionBoxes({speed:0});b("#lightbox-infoFooter").hide();b("#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-infoBox").hide();b("#lightbox-overlay").css("opacity",this.opacity).fadeIn(400,function(){b("#lightbox").fadeIn(300);
if(!b.Lightbox.showImage())return b.Lightbox.finish(),!1});return!0},finish:function(){b("#lightbox").hide();b("#lightbox-overlay").fadeOut(function(){b("#lightbox-overlay").hide()});b("embed, object, select").css({visibility:"visible"});this.images.reset();"disable"===this.scroll&&b(document.body).css("overflow","visible");this.visible=!1},resizeBoxes:function(a){if("transition"!==a){var c=b(this.ie6?document.body:document);b("#lightbox-overlay").css({width:c.width(),height:c.height()});delete c}switch(a){case "general":return!0;
case "resized":if(!1===this.auto_resize)return this.repositionBoxes({nHeight:e,speed:this.speed}),!0}var d=this.images.current();if(!d||!d.width||!this.visible)return!1;var c=d.width,d=d.height,e=b(window).width(),f=b(window).height();if(!1!==this.auto_resize)for(var e=Math.floor(0.8*e),f=Math.floor(0.8*f),g;c>e||d>f;)if(c>e&&(g=e/c,c=e,d=Math.floor(d*g)),d>f)g=f/d,d=f,c=Math.floor(c*g);var h=b("#lightbox-imageBox").width();g=b("#lightbox-imageBox").height();var f=c+2*this.padding,e=d+2*this.padding,
h=h-f;g-=e;b("#lightbox-nav-btnPrev,#lightbox-nav-btnNext").css("height",e);b("#lightbox-infoBox").css("width",f);"transition"===a?0===h&&0===g?(this.pause(this.speed/3),this.showImage(null,3)):(b("#lightbox-image").width(c).height(d),b("#lightbox-imageBox").animate({width:f,height:e},this.speed,function(){b.Lightbox.showImage(null,3)})):(b("#lightbox-image").animate({width:c,height:d},this.speed),b("#lightbox-imageBox").animate({width:f,height:e},this.speed));this.repositionBoxes({nHeight:e,speed:this.speed});
return!0},repositioning:!1,reposition_failsafe:!1,repositionBoxes:function(a){if(this.repositioning)return this.reposition_failsafe=!0,null;this.repositioning=!0;a=b.extend({},a);a.callback=a.callback||null;a.speed=a.speed||"slow";var c=this.getPageScroll(),d=a.nHeight||parseInt(b("#lightbox").height(),10),d=c.yScroll+(b(window).height()-d)/2.5,c={left:c.xScroll,top:d};a.speed?b("#lightbox").animate(c,"slow",function(){b.Lightbox.reposition_failsafe?(b.Lightbox.repositioning=b.Lightbox.reposition_failsafe=
!1,b.Lightbox.repositionBoxes(a)):(b.Lightbox.repositioning=!1,a.callback&&a.callback())}):(b("#lightbox").css(c),this.reposition_failsafe?(this.repositioning=this.reposition_failsafe=!1,this.repositionBoxes(a)):this.repositioning=!1);return!0},visible:!1,showImage:function(a,c){c=c||1;if(a=this.images.current(a)||this.images.get("first",!0)){switch(c){case 1:this.KeyboardNav_Disable();b("#lightbox-loading").show();b("#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-infoBox").hide();
b("#lightbox-imageBox").unbind();if(a.width&&a.height)this.showImage(null,2);else{var d=new Image;d.onload=function(){a.width=d.width;a.height=d.height;b.Lightbox.showImage(null,2);d=d.onload=null};d.src=a.src}break;case 2:b("#lightbox-image").attr("src",a.src);if("undefined"===typeof this.padding||null===this.padding||isNaN(this.padding))this.padding=parseInt(b("#lightbox-imageContainer").css("padding-left"),10)||parseInt(b("#lightbox-imageContainer").css("padding"),10)||0;this.colorBlend&&(b("#lightbox-overlay").animate({backgroundColor:a.color},
2*this.speed),b("#lightbox-imageBox").css("borderColor",a.color));this.resizeBoxes("transition");break;case 3:b("#lightbox-loading").hide();b("#lightbox-image").fadeIn(1.5*this.speed,function(){b.Lightbox.showImage(null,4)});this.preloadNeighbours();null!==this.handlers.show&&this.handlers.show(a);break;case 4:var e=b("#lightbox-caption-title").html(a.title||"Untitled");this.download_link&&e.attr("href",this.download_link?a.src:"");delete e;b("#lightbox-caption-seperator").html(a.description?": ":
"");b("#lightbox-caption-description").html(a.description||"&nbsp;");1<this.images.length?b("#lightbox-currentNumber").html(this.text.image+"&nbsp;"+(this.images.index+1)+"&nbsp;"+this.text.of+"&nbsp;"+this.images.length):b("#lightbox-currentNumber").html("&nbsp;");b("#lightbox-imageBox").unbind("mouseover").mouseover(function(){b("#lightbox-infoBox:not(:visible)").stop().slideDown("fast")});b("#lightbox-infoBox").unbind("mouseover").mouseover(function(){b("#lightbox-infoFooter:not(:visible)").stop().slideDown("fast")});
!0===this.show_extended_info?(b("#lightbox-imageBox").trigger("mouseover"),b("#lightbox-infoBox").trigger("mouseover")):!0===this.show_info&&b("#lightbox-imageBox").trigger("mouseover");b("#lightbox-nav-btnPrev, #lightbox-nav-btnNext").css({background:"transparent url("+this.files.images.blank+") no-repeat"});this.images.isFirst()||b("#lightbox-nav-btnPrev").show();this.images.isLast()||b("#lightbox-nav-btnNext").show();b("#lightbox-nav").show();this.KeyboardNav_Enable();break;default:return window.console.error("Don't know what to do: ",
a,c),this.showImage(a,1)}return!0}},preloadNeighbours:function(){if(this.images.isSingle()||this.images.isEmpty())return!0;var a=this.images.current(),b=this.images.index;if(!a)return a;var d=this.images.prev();d&&(a=new Image,a.src=d.src);this.images.setIndex(b);if(d=this.images.next())a=new Image,a.src=d.src;this.images.setIndex(b)},KeyboardNav_Enable:function(){b(document).keydown(function(a){b.Lightbox.KeyboardNav_Action(a)})},KeyboardNav_Disable:function(){b(document).unbind("keydown")},KeyboardNav_Action:function(a){var a=
a||window.event,c=a.keyCode,a=a.DOM_VK_ESCAPE||27,d=String.fromCharCode(c).toLowerCase();return d===this.keys.close||c===a?b.Lightbox.finish():d===this.keys.prev||37===c?b.Lightbox.showImage("prev"):d===this.keys.next||39===c?b.Lightbox.showImage("next"):!0},getPageScroll:function(){var a,b;self.pageYOffset?(b=self.pageYOffset,a=self.pageXOffset):document.documentElement&&document.documentElement.scrollTop?(b=document.documentElement.scrollTop,a=document.documentElement.scrollLeft):document.body&&
(b=document.body.scrollTop,a=document.body.scrollLeft);return{xScroll:a,yScroll:b}},pause:function(a){var b=new Date,d=null;do d=new Date;while(d-b<a)}});"undefined"===typeof b.Lightbox&&(b.Lightbox=new b.LightboxClass)})(jQuery);
