(function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var r=e.prototype,i=this,s=i.EventEmitter;r.getListeners=function(e){var t,n,r=this._getEvents();if("object"==typeof e){t={};for(n in r)r.hasOwnProperty(n)&&e.test(n)&&(t[n]=r[n])}else t=r[e]||(r[e]=[]);return t},r.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},r.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},r.addListener=function(e,n){var r,i=this.getListenersAsObject(e),s="object"==typeof n;for(r in i)i.hasOwnProperty(r)&&-1===t(i[r],n)&&i[r].push(s?n:{listener:n,once:!1});return this},r.on=n("addListener"),r.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},r.once=n("addOnceListener"),r.defineEvent=function(e){return this.getListeners(e),this},r.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},r.removeListener=function(e,n){var r,i,s=this.getListenersAsObject(e);for(i in s)s.hasOwnProperty(i)&&(r=t(s[i],n),-1!==r&&s[i].splice(r,1));return this},r.off=n("removeListener"),r.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},r.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},r.manipulateListeners=function(e,t,n){var r,i,s=e?this.removeListener:this.addListener,o=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(r=n.length;r--;)s.call(this,t,n[r]);else for(r in t)t.hasOwnProperty(r)&&(i=t[r])&&("function"==typeof i?s.call(this,r,i):o.call(this,r,i));return this},r.removeEvent=function(e){var t,n=typeof e,r=this._getEvents();if("string"===n)delete r[e];else if("object"===n)for(t in r)r.hasOwnProperty(t)&&e.test(t)&&delete r[t];else delete this._events;return this},r.removeAllListeners=n("removeEvent"),r.emitEvent=function(e,t){var n,r,i,s,o=this.getListenersAsObject(e);for(i in o)if(o.hasOwnProperty(i))for(r=o[i].length;r--;)n=o[i][r],n.once===!0&&this.removeListener(e,n.listener),s=n.listener.apply(this,t||[]),s===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},r.trigger=n("emitEvent"),r.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},r.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},r._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},r._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return i.EventEmitter=s,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,r=function(){};n.addEventListener?r=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(r=function(e,n,r){e[n+r]=r.handleEvent?function(){var n=t(e);r.handleEvent.call(r,n)}:function(){var n=t(e);r.call(e,n)},e.attachEvent("on"+n,e[n+r])});var i=function(){};n.removeEventListener?i=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(i=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(r){e[t+n]=void 0}});var s={bind:r,unbind:i};"function"==typeof define&&define.amd?define("eventie/eventie",s):e.eventie=s}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,r){return t(e,n,r)}):"object"==typeof exports?module.exports=t(e,require("eventEmitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(this,function(e,t,n){function r(e,t){for(var n in t)e[n]=t[n];return e}function i(e){return"[object Array]"===h.call(e)}function s(e){var t=[];if(i(e))t=e;else if("number"==typeof e.length)for(var n=0,r=e.length;r>n;n++)t.push(e[n]);else t.push(e);return t}function o(e,t,n){if(!(this instanceof o))return new o(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=s(e),this.options=r({},this.options),"function"==typeof t?n=t:r(this.options,t),n&&this.on("always",n),this.getImages(),f&&(this.jqDeferred=new f.Deferred);var i=this;setTimeout(function(){i.check()})}function u(e){this.img=e}function a(e){this.src=e,p[e]=this}var f=e.jQuery,l=e.console,c=l!==void 0,h=Object.prototype.toString;o.prototype=new t,o.prototype.options={},o.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);for(var r=n.querySelectorAll("img"),i=0,s=r.length;s>i;i++){var o=r[i];this.addImage(o)}}},o.prototype.addImage=function(e){var t=new u(e);this.images.push(t)},o.prototype.check=function(){function e(e,i){return t.options.debug&&c&&l.log("confirm",e,i),t.progress(e),n++,n===r&&t.complete(),!0}var t=this,n=0,r=this.images.length;if(this.hasAnyBroken=!1,!r)return this.complete(),void 0;for(var i=0;r>i;i++){var s=this.images[i];s.on("confirm",e),s.check()}},o.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},f&&(f.fn.imagesLoaded=function(e,t){var n=new o(this,e,t);return n.jqDeferred.promise(f(this))}),u.prototype=new t,u.prototype.check=function(){var e=p[this.img.src]||new a(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},u.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var p={};return a.prototype=new t,a.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},a.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},a.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},a.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},a.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},a.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},o});(function(e){function a(t){e(this).touchSwipeLeft(t).touchSwipeRight(t)}function f(t){var n=e(this);if(!n.data("swipeLeft"))n.data("swipeLeft",t);if(!n.data("swipeRight"))c(n)}function l(t){var n=e(this);if(!n.data("swipeRight"))n.data("swipeRight",t);if(!n.data("swipeLeft"))c(n)}function c(e){e.unbindSwipe(true).bind(r,h)}function h(r){function m(e){l.unbind(n);if(a&&v){if(v-ai&&Math.abs(h-d)p){if(l.data("swipeLeft"))l.data("swipeLeft")("left")}else{if(l.data("swipeRight"))l.data("swipeRight")("right")}}}a=v=null}function g(e){if(a){f=e.originalEvent.touches?e.originalEvent.touches[0]:e;v=(new Date).getTime();p=f.pageX;d=f.pageY;if(Math.abs(c-p)>o)e.preventDefault()}}var a=(new Date).getTime(),f=r.originalEvent.touches?r.originalEvent.touches[0]:r,l=e(this).bind(n,g).one(t,m),c=f.pageX,h=f.pageY,p,d,v;if(l.data("stopPropagation"))r.stopImmediatePropagation()}var t,n,r,i=30,s=75,o=10,u=1e3;if("ontouchend"in document){t="touchend.cj_swp";n="touchmove.cj_swp";r="touchstart.cj_swp"}else{t="mouseup.cj_swp";n="mousemove.cj_swp";r="mousedown.cj_swp"}e.fn.touchSwipe=function(e,t){if(t)this.data("stopPropagation",true);if(e)return this.each(a,[e])};e.fn.touchSwipeLeft=function(e,t){if(t)this.data("stopPropagation",true);if(e)return this.each(f,[e])};e.fn.touchSwipeRight=function(e,t){if(t)this.data("stopPropagation",true);if(e)return this.each(l,[e])};e.fn.unbindSwipeLeft=function(){this.removeData("swipeLeft");if(!this.data("swipeRight"))this.unbindSwipe(true)};e.fn.unbindSwipeRight=function(){this.removeData("swipeRight");if(!this.data("swipeLeft"))this.unbindSwipe(true)};e.fn.unbindSwipe=function(e){if(!e)this.removeData("swipeLeft swipeRight stopPropagation");return this.unbind(r+" "+n+" "+t)}})(jQuery);(function(e,t,n){"use strict";var r=t.event,i=t.event.handle?"handle":"dispatch",s;r.special.smartresize={setup:function(){t(this).bind("resize",r.special.smartresize.handler)},teardown:function(){t(this).unbind("resize",r.special.smartresize.handler)},handler:function(e,t){var n=this,o=arguments;e.type="smartresize";if(s){clearTimeout(s)}s=setTimeout(function(){r[i].apply(n,o)},t==="execAsap"?0:100)}};t.fn.smartresize=function(e){return e?this.bind("smartresize",e):this.trigger("smartresize",["execAsap"])};t.AutoAlbumsMasonry=function(e,n){this.element=t(n);this._create(e);this._init()};t.AutoAlbumsMasonry.settings={isResizable:true,isAnimated:false,animationOptions:{queue:false,duration:500,complete:function(){var e=t(this);if(!e.hasClass("autoAlbums-brick")){if(t.fn.autoAlbums.defaults.lazyLoad){t.waypoints("refresh")}if(e.hasClass("grid-with-loading-boxes")){e.removeClass("grid-with-loading-boxes");e.addClass("completeAddingImages")}}}},gutterWidth:0,isRTL:false,isFitWidth:false,containerStyle:{position:"relative"}};t.AutoAlbumsMasonry.prototype={_resized:false,_filterFindBricks:function(e){var t=this.options.itemSelector;return!t?e:e.filter(t).add(e.find(t))},_getBricks:function(e){var t=this._filterFindBricks(e).css({position:"absolute"}).addClass("autoAlbums-brick");return t},_create:function(n){this.options=t.extend(true,{},t.AutoAlbumsMasonry.settings,n);this.styleQueue=[];var r=this.element[0].style;this.originalStyle={height:r.height||""};var i=this.options.containerStyle;for(var s in i){this.originalStyle[s]=r[s]||""}this.element.css(i);this.horizontalDirection=this.options.isRTL?"right":"left";var o=this.element.css("padding-"+this.horizontalDirection);var u=this.element.css("padding-top");this.offset={x:o?parseInt(o,10):0,y:u?parseInt(u,10):0};this.isFluid=this.options.columnWidth&&typeof this.options.columnWidth==="function";var a=this;setTimeout(function(){a.element.addClass("autoAlbums")},0);if(this.options.isResizable){t(e).bind("smartresize.autoAlbums",function(){a.resize()})}this.reloadItems()},_init:function(e){this._getColumns();this._reLayout(e)},option:function(e,n){if(t.isPlainObject(e)){this.options=t.extend(true,this.options,e)}},layout:function(e,t){for(var n=0,r=e.length;n=1;n--){if(t").insertAfter(o);var d=function(){p.addClass("autoAlbums-loader").removeClass("autoAlbums-loadMore").html("")};var v=function(){p.removeClass("autoAlbums-loader")};var m=false;var g=function(){var e=0;for(var t in f){var n=f[t];e++}if(e>0){m=false;return true}else{return false}};var y=function(e){if(e){p.addClass("autoAlbums-loadMore").html("LOAD MORE")}else{p.removeClass("autoAlbums-loadMore").html("")}};var b=l;var w=b;var E=decodeURI(location.hash.substr(1));if(E!=""&&s.hashTag&&E!="*"){b+="/"+E;l+="/"+E}var S=function(e){if(e.substr(1,1)=="-"){return e.substr(2)}else{return e}};var x=function(e,t){var n="";if(t=="yes"){n="thumbnails/"}var r=e.split(/\.(?=[^.]*$)/)[0];var i="";if(r.indexOf("$$")!=-1){var s=r.split("$$");r=s[0];var o=s[1].split(":").join("/");o=o.split("|").join("/");i='data-url="'+o+'"'}r=S(r);var u='
"+''+'
'+"

"+r+"

"+"
"+'"+"
";return u};var T=function(e,t,n){var r="";if(n.thumb=="yes"){r="thumbnails/"}var i=S(e);var o=''+n.numFolders;var u=''+n.numImages;if(!s.showNumFolder){o=""}if(!s.showNumImages){u=""}if(s.autoHideNumFolder&&n.numFolders==0){o=""}if(s.autoHideNumImages&&n.numImages==0){u=""}var a="";if(n.numImages==0&&t==""){a='style="height:200px"'}var f='
"+''+'
'+'
'+'
'+i+"
"+'
View gallery
'+'
'+o+u+"
"+"
"+"
"+"
";return f};var N=function(e){e.each(function(){var e=t(this).removeClass("noTransform");if(e.hasClass("autoAlbums-brick")){if(e.is(":hidden")){if(o.hasClass("noSupportTransform")){e.show()}else{e.show();if(e.data("moving")==false){e.animate(s.hiddenStyle,0);e.animate(s.visibleStyle,r.animOpts,function(){e.addClass("noTransform")})}else{e.animate(s.visibleStyle,0);e.addClass("noTransform")}}}else{e.animate(s.visibleStyle,r.animOpts,function(){e.addClass("noTransform")})}}})};var C=function(e){e=t(e).addClass("loading-box");e.css("margin-bottom",s.verticalSpaceBetweenThumbnails);o.append(e.hide());o.imagesLoaded(function(){e.hide().css({top:200,left:200});o.addClass("grid-with-loading-boxes");o.autoAlbums("reload");N(e);v();y(g());m=false})};var k=function(e){d();var t=new Array;if(s.foldersAtTop){for(var n in f){if(typeof f[n]=="string"){}else{t.push({image:n,thumb:f[n],folder:"yes"})}}for(var n in f){if(typeof f[n]=="string"){t.push({image:n,thumb:f[n],folder:"no"})}else{}}}else{for(var n in f){var r="yes";if(typeof f[n]=="string"){r="no"}t.push({image:n,thumb:f[n],folder:r})}}var i="";var o=0;while(o=t.length)break;var u=t[o];var a=u["image"].split(/\.(?=[^.]*$)/)[0];if(a!="folderCover"){if(u["folder"]=="yes"){var l=u["thumb"].image;i+=T(u["image"],l,u["thumb"])}else{i+=x(u["image"],u["thumb"])}}delete f[u["image"]];o++}C(i)};var L=function(){if(p.hasClass("autoAlbums-loadMore")){k(s.imagesToLoad)}};p.on("click",function(){L()});if(s.lazyLoad){o.waypoint(function(e){var n=t(this);if(n.hasClass("completeAddingImages")){n.removeClass("completeAddingImages");if(p.hasClass("autoAlbums-loadMore")){L()}}},{context:e,continuous:true,enabled:true,horizontal:false,offset:"bottom-in-view",triggerOnce:false})}var A=t('
    '+"
");if(s.showNavBar){A.insertBefore(o)}var O=function(){var e=b.split("/");var t="";var n="";var r="";var i="";for(var o=0;o'+u+""}else{t+='
  • '+u+'/
  • '}}if(s.hashTag&&i.substr(1)!=""){location.hash=i.substr(1)}else if(s.hashTag&&i.substr(1)==""){location.hash="*"}A.html(t)};O();var M=function(){o.find(".aamrgbox").remove().end().css("height",0);p.removeClass("autoAlbums-loadMore").html("");O();d();t.getJSON(c+"reader.php?directory="+encodeURIComponent(b)+"&albumsOrder="+s.albumsOrder+"&imagesOrder="+s.imagesOrder+"&folderCoverRandom="+s.folderCoverRandom,function(e){f=e;k(s.imagesToLoadStart)})};A.on("click","a",function(){b=t(this).parent("li").data("directory");M()});o.on("click","div.autoAlbumsFolder",function(){var e=t(this).data("folder");b+="/"+e;M()});d();t.getJSON(c+"reader.php?directory="+encodeURIComponent(l)+"&albumsOrder="+s.albumsOrder+"&imagesOrder="+s.imagesOrder+"&folderCoverRandom="+s.folderCoverRandom,function(e){f=e;k(s.imagesToLoadStart)});o.on("mouseenter.hoverdir, mouseleave.hoverdir","div.aamrgbox",function(e){if(!s.caption)return;var r=t(this),i=e.type,o=r.find("div.autoAlbums-image-caption"),u=_(r,{x:e.pageX,y:e.pageY}),a=D(u,r);var f=o.children("div.aligment");if(f[0]==n){var l=o.html();o.html("
    "+l+"
    ")}if(i==="mouseenter"){if(s.captionType=="classic"){o.css({left:0,top:0});o.fadeIn(300);return}o.css({left:a.from,top:a.to});o.stop().show().fadeTo(0,1,function(){t(this).stop().animate({top:0,left:0},200,"linear")})}else{if(s.captionType=="classic"){o.css({left:0,top:0});o.fadeOut(300);return}if(s.captionType=="grid-fade"){o.fadeOut(700)}else{o.stop().animate({left:a.from,top:a.to},200,"linear",function(){o.hide()})}}});var _=function(e,t){var n=e.width(),r=e.height(),i=(t.x-e.offset().left-n/2)*(n>r?r/n:1),s=(t.y-e.offset().top-r/2)*(r>n?n/r:1),o=Math.round((Math.atan2(s,i)*(180/Math.PI)+180)/90+3)%4;return o};var D=function(e,t){var n,r;switch(e){case 0:if(!s.reverse){n=0,r=-t.height()}else{n=0,r=-t.height()}break;case 1:if(!s.reverse){n=t.width(),r=0}else{n=-t.width(),r=0}break;case 2:if(!s.reverse){n=0,r=t.height()}else{n=0,r=-t.height()}break;case 3:if(!s.reverse){n=-t.width(),r=0}else{n=t.width(),r=0}break}return{from:n,to:r}};var P=t("body");var H={interval:"none"};var B=0;var j=t('
    ').appendTo(P);var F=t('
    ').appendTo(j);var I=t('
    ').appendTo(F);var q=t('').appendTo(I);var R=t('
    ');if(s.lightboxPlayBtn){R.appendTo(F)}var U=t('').appendTo(R);var z=t('
    ').appendTo(F).html("Here will go the text for the lightbox");var W=t('
    ').appendTo(F);var X=t('').appendTo(W);var V=t('
    ').appendTo(F);var J=t('').appendTo(V);var K=t("
    ");if(s.fb!=n||s.twitter!=n||s.googlePlus!=n||s.pintrest!=n){K=t('
    ').appendTo(F)}var Q=t('
    ').appendTo(j);var G=I.width();var Y=3;if(s.lightboxPlayBtn)Y=4;var Z=function(){var e=j.outerWidth(false);if(e<650){z.hide();W.css("width",e/Y);V.css("width",e/Y);R.css("width",e/Y);I.css("width",e-e/Y*(Y-1))}else{z.show();W.css("width",G);V.css("width",G);R.css("width",G);I.css("width",G)}var t=j.find("img");var n=j.outerHeight(false)-F.outerHeight(false);t.css("max-height",n)};jQuery(e).resize(function(){Z()});var et=new Image;var tt=function(){et.onload=null;et=null;j.find(".lightbox-alignment").remove();j.find(".lightbox-alignment2").remove();j.find("img").remove()};var nt=function(){j.find(".lb-loader").remove()};var rt=function(){j.append('
    ')};j.attr("unselectable","on").css("user-select","none").on("selectstart",false);var it=function(){Q.stop(true,true).width(0)};var st=function(){clearInterval(H.interval)};var ot=function(){if(s.lightBoxShowTimer==false)return;Q.css({position:"absolute",bottom:0}).animate({width:"100%"},s.lightBoxPlayInterval,"linear",function(){it()})};var ut=false;var at=false;var ft=function(){H.interval=setTimeout(function(){mt()},s.lightBoxPlayInterval);ot()};var lt=function(){if(ut&&at==false){it();st();ft()}};var ct=t("");var ht=function(e,r){tt();nt();rt();var i=0;var o=0;if(r!=true){i=.9;o=s.lightBoxSpeedFx}if(s.lightBoxZoomAnim==false){i=1}var u=e;var a=u.data("lightbox");if(a==n){a=u.attr("src")}var f=u.siblings("div.lightbox-text").html();if(s.lightBoxText==false){f=""}var l=f.split("")[0];var c="
    ";if(s.fb!=n){c+="
    "}if(s.twitter!=n){c+="
    "}if(s.googlePlus!=n){c+="
    "}if(s.pintrest!=n){c+="
    "}c+="
    ";K.html("
    "+c+"
    ");var p="
    "+f+"
    ";z.html(p);et=new Image;var d=t(et);var v=et;et.onload=function(){if(v!=et)return;nt();var e=t('').appendTo(j);var n=t('').appendTo(e);n.append(d.css("margin-top",-F.outerHeight(false)).hide().scale(i));d.fadeIn(o).animate({scale:"1"},{duration:s.lightBoxSpeedFx,complete:function(){lt()}});Z()};et.src=a;ct.stop(true);ct=t(et)};var pt=function(t){var n=e.open(t,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400");n.moveTo(screen.width/2-300,screen.height/2-200)};F.on("click","div.aa-fb",function(){var e=t(this);var n=encodeURIComponent(e.data("url"));n="https://www.facebook.com/sharer/sharer.php?u="+n;pt(n)});F.on("click","div.aa-tw",function(){var e=t(this);var n=encodeURIComponent(e.data("url"));n="https://twitter.com/intent/tweet?url=&text="+encodeURIComponent(e.data("name"))+" "+n;pt(n)});F.on("click","div.aa-gp",function(){var e=t(this);var n=encodeURIComponent(e.data("url"));n="https://plus.google.com/share?url="+n;pt(n)});F.on("click","div.aa-pi",function(){var e=t(this);var n=encodeURIComponent(e.data("url"));n="http://pinterest.com/pin/create/button/?url="+n+"&media="+n;pt(n)});var dt=false;o.on("click","div.aamrgbox",function(){dt=true;var r=t(this);if(r.hasClass("autoAlbumsFolder")){return}var i=r.data("url");if(i!=n){e.location.href="http://"+i;return}if(s.lightBox==false){return}at=false;B=o.find(".aamrgbox").index(this);var u=r.children("img");F.animate({"margin-top":0},s.lightBoxSpeedFx);j.fadeIn(s.lightBoxSpeedFx);ht(u,true)});j.on("click","div",function(e){e.stopPropagation()});j.on("click","img",function(e){e.stopPropagation()});j.on("click",".lightbox-alignment",function(){vt()});j.on("click",".lightbox-alignment2",function(){vt()});j.on("click",function(){vt()});I.on("click",function(){vt()});var vt=function(){if(s.lightBoxStopPlayOnClose){R.removeClass("selected");ut=false}dt=false;at=true;it();st();j.find(".lb-loader").remove();var e=0;if(s.lightBoxZoomAnim==false){e=1}var t=j.find("img").stop().show();F.animate({"margin-top":-F.outerHeight(false)},s.lightBoxSpeedFx);if(t[0]!=n){t.animate({scale:e},s.lightBoxSpeedFx,function(){j.fadeOut(100)})}else{j.fadeOut(100)}};var mt=function(){at=false;var e=o.find(".aamrgbox");B+=1;if(B>=e.length){B=0}if(!e.eq(B).is(":visible")||e.eq(B).hasClass("autoAlbumsFolder")){var t=B;for(var n=0;n=e.length){t=0}var r=e.eq(t);if(r.is(":visible")&&r.hasClass("autoAlbumsFolder")==false){B=t;break}}}var i=e.eq(B).children("img");ht(i)};var gt=function(){at=false;var e=o.find(".aamrgbox");B-=1;if(B<0){B=e.length-1}if(!e.eq(B).is(":visible")||e.eq(B).hasClass("autoAlbumsFolder")){var t=B;for(var n=0;n