From 2f5668f7a5931c15875634c9adbda0585e8234a6 Mon Sep 17 00:00:00 2001 From: Kris_B Date: Thu, 30 Jun 2016 23:54:08 +0200 Subject: [PATCH] v5.10.3 --- bower.json | 2 +- changelog.md | 5 +++++ dist/jquery.nanogallery.min.js | 4 ++-- jquery.nanogallery.js | 6 ++++-- nanogallery.jquery.json | 2 +- package.json | 2 +- 6 files changed, 14 insertions(+), 7 deletions(-) diff --git a/bower.json b/bower.json index 0234447..227a360 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "nanogallery", - "version": "5.10.2", + "version": "5.10.3", "homepage": "http://nanogallery.brisbois.fr", "authors": [ "Christophe Brisbois" diff --git a/changelog.md b/changelog.md index c834992..587671f 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,11 @@ nanoGALLERY - jQuery plugin ChangeLog ------ +v5.10.3 +------ +- nanoPhotosProvider : underscores are replaced with spaces in title an description +- nanoPhotosProvider : remove leading @@NNNN in title + v5.10.2 ------ - bugfix issue #119 iPhone issue - version detection error diff --git a/dist/jquery.nanogallery.min.js b/dist/jquery.nanogallery.min.js index 0533eb1..fcbe2e8 100644 --- a/dist/jquery.nanogallery.min.js +++ b/dist/jquery.nanogallery.min.js @@ -1,5 +1,5 @@ /**! - * @preserve nanoGALLERY v5.10.2 + * @preserve nanoGALLERY v5.10.3 * Plugin for jQuery by Christophe Brisbois * Demo: http://nanogallery.brisbois.fr * Sources: https://github.com/Kris-B/nanoGALLERY @@ -24,7 +24,7 @@ */ /*! shifty - v1.5.0 - 2015-05-31 - http://jeremyckahn.github.io/shifty */ (function(){var a=this,b=function(){"use strict";function b(){}function c(a,b){var c;for(c in a)Object.hasOwnProperty.call(a,c)&&b(c)}function d(a,b){return c(b,function(c){a[c]=b[c]}),a}function e(a,b){c(b,function(c){void 0===a[c]&&(a[c]=b[c])})}function f(a,b,c,d,e,f,h){var i,j,k,m=f>a?0:(a-f)/e;for(i in b)b.hasOwnProperty(i)&&(j=h[i],k="function"==typeof j?j:l[j],b[i]=g(c[i],d[i],k,m));return b}function g(a,b,c,d){return a+(b-a)*c(d)}function h(a,b){var d=k.prototype.filter,e=a._filterArgs;c(d,function(c){void 0!==d[c][b]&&d[c][b].apply(a,e)})}function i(a,b,c,d,e,g,i,j,k,l,m){s=b+c+d,t=Math.min(m||r(),s),u=t>=s,v=d-(s-t),a.isPlaying()&&!u?(a._scheduleId=l(a._timeoutHandler,p),h(a,"beforeTween"),b+c>t?f(1,e,g,i,1,1,j):f(t,e,g,i,d,b+c,j),h(a,"afterTween"),k(e,a._attachment,v)):a.isPlaying()&&u&&(k(i,a._attachment,v),a.stop(!0))}function j(a,b){var d={},e=typeof b;return"string"===e||"function"===e?c(a,function(a){d[a]=b}):c(a,function(a){d[a]||(d[a]=b[a]||n)}),d}function k(a,b){this._currentState=a||{},this._configured=!1,this._scheduleFunction=m,void 0!==b&&this.setConfig(b)}var l,m,n="linear",o=500,p=1e3/60,q=Date.now?Date.now:function(){return+new Date},r="undefined"!=typeof SHIFTY_DEBUG_NOW?SHIFTY_DEBUG_NOW:q;m="undefined"!=typeof window?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.mozCancelRequestAnimationFrame&&window.mozRequestAnimationFrame||setTimeout:setTimeout;var s,t,u,v;return k.prototype.tween=function(a){return this._isTweening?this:(void 0===a&&this._configured||this.setConfig(a),this._timestamp=r(),this._start(this.get(),this._attachment),this.resume())},k.prototype.setConfig=function(a){a=a||{},this._configured=!0,this._attachment=a.attachment,this._pausedAtTime=null,this._scheduleId=null,this._delay=a.delay||0,this._start=a.start||b,this._step=a.step||b,this._finish=a.finish||b,this._duration=a.duration||o,this._currentState=d({},a.from)||this.get(),this._originalState=this.get(),this._targetState=d({},a.to)||this.get();var c=this;this._timeoutHandler=function(){i(c,c._timestamp,c._delay,c._duration,c._currentState,c._originalState,c._targetState,c._easing,c._step,c._scheduleFunction)};var f=this._currentState,g=this._targetState;return e(g,f),this._easing=j(f,a.easing||n),this._filterArgs=[f,this._originalState,g,this._easing],h(this,"tweenCreated"),this},k.prototype.get=function(){return d({},this._currentState)},k.prototype.set=function(a){this._currentState=a},k.prototype.pause=function(){return this._pausedAtTime=r(),this._isPaused=!0,this},k.prototype.resume=function(){return this._isPaused&&(this._timestamp+=r()-this._pausedAtTime),this._isPaused=!1,this._isTweening=!0,this._timeoutHandler(),this},k.prototype.seek=function(a){a=Math.max(a,0);var b=r();return 0===this._timestamp+a?this:(this._timestamp=b-a,this.isPlaying()||(this._isTweening=!0,this._isPaused=!1,i(this,this._timestamp,this._delay,this._duration,this._currentState,this._originalState,this._targetState,this._easing,this._step,this._scheduleFunction,b),this.pause()),this)},k.prototype.stop=function(c){return this._isTweening=!1,this._isPaused=!1,this._timeoutHandler=b,(a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.oCancelAnimationFrame||a.msCancelAnimationFrame||a.mozCancelRequestAnimationFrame||a.clearTimeout)(this._scheduleId),c&&(h(this,"beforeTween"),f(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),h(this,"afterTween"),h(this,"afterTweenEnd"),this._finish.call(this,this._currentState,this._attachment)),this},k.prototype.isPlaying=function(){return this._isTweening&&!this._isPaused},k.prototype.setScheduleFunction=function(a){this._scheduleFunction=a},k.prototype.dispose=function(){var a;for(a in this)this.hasOwnProperty(a)&&delete this[a]},k.prototype.filter={},k.prototype.formula={linear:function(a){return a}},l=k.prototype.formula,d(k,{now:r,each:c,tweenProps:f,tweenProp:g,applyFilter:h,shallowCopy:d,defaults:e,composeEasingObject:j}),"function"==typeof SHIFTY_DEBUG_NOW&&(a.timeoutHandler=i),"object"==typeof exports?module.exports=k:"function"==typeof define&&define.amd?define("ngTweenable",function(){return k}):void 0===a.NGTweenable&&(a.NGTweenable=k),k}();!function(){b.shallowCopy(b.prototype.formula,{easeInQuad:function(a){return Math.pow(a,2)},easeOutQuad:function(a){return-(Math.pow(a-1,2)-1)},easeInOutQuad:function(a){return 1>(a/=.5)?.5*Math.pow(a,2):-.5*((a-=2)*a-2)},easeInCubic:function(a){return Math.pow(a,3)},easeOutCubic:function(a){return Math.pow(a-1,3)+1},easeInOutCubic:function(a){return 1>(a/=.5)?.5*Math.pow(a,3):.5*(Math.pow(a-2,3)+2)},easeInQuart:function(a){return Math.pow(a,4)},easeOutQuart:function(a){return-(Math.pow(a-1,4)-1)},easeInOutQuart:function(a){return 1>(a/=.5)?.5*Math.pow(a,4):-.5*((a-=2)*Math.pow(a,3)-2)},easeInQuint:function(a){return Math.pow(a,5)},easeOutQuint:function(a){return Math.pow(a-1,5)+1},easeInOutQuint:function(a){return 1>(a/=.5)?.5*Math.pow(a,5):.5*(Math.pow(a-2,5)+2)},easeInSine:function(a){return-Math.cos(a*(Math.PI/2))+1},easeOutSine:function(a){return Math.sin(a*(Math.PI/2))},easeInOutSine:function(a){return-.5*(Math.cos(Math.PI*a)-1)},easeInExpo:function(a){return 0===a?0:Math.pow(2,10*(a-1))},easeOutExpo:function(a){return 1===a?1:-Math.pow(2,-10*a)+1},easeInOutExpo:function(a){return 0===a?0:1===a?1:1>(a/=.5)?.5*Math.pow(2,10*(a-1)):.5*(-Math.pow(2,-10*--a)+2)},easeInCirc:function(a){return-(Math.sqrt(1-a*a)-1)},easeOutCirc:function(a){return Math.sqrt(1-Math.pow(a-1,2))},easeInOutCirc:function(a){return 1>(a/=.5)?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)},easeOutBounce:function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},easeInBack:function(a){var b=1.70158;return a*a*((b+1)*a-b)},easeOutBack:function(a){var b=1.70158;return(a-=1)*a*((b+1)*a+b)+1},easeInOutBack:function(a){var b=1.70158;return 1>(a/=.5)?.5*a*a*(((b*=1.525)+1)*a-b):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},elastic:function(a){return-1*Math.pow(4,-8*a)*Math.sin(2*(6*a-1)*Math.PI/2)+1},swingFromTo:function(a){var b=1.70158;return 1>(a/=.5)?.5*a*a*(((b*=1.525)+1)*a-b):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},swingFrom:function(a){var b=1.70158;return a*a*((b+1)*a-b)},swingTo:function(a){var b=1.70158;return(a-=1)*a*((b+1)*a+b)+1},bounce:function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},bouncePast:function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?2-(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?2-(7.5625*(a-=2.25/2.75)*a+.9375):2-(7.5625*(a-=2.625/2.75)*a+.984375)},easeFromTo:function(a){return 1>(a/=.5)?.5*Math.pow(a,4):-.5*((a-=2)*Math.pow(a,3)-2)},easeFrom:function(a){return Math.pow(a,4)},easeTo:function(a){return Math.pow(a,.25)}})}(),function(){function a(a,b,c,d,e,f){function g(a){return((n*a+o)*a+p)*a}function h(a){return((q*a+r)*a+s)*a}function i(a){return(3*n*a+2*o)*a+p}function j(a){return 1/(200*a)}function k(a,b){return h(m(a,b))}function l(a){return a>=0?a:0-a}function m(a,b){var c,d,e,f,h,j;for(e=a,j=0;8>j;j++){if(f=g(e)-a,b>l(f))return e;if(h=i(e),1e-6>l(h))break;e-=f/h}if(c=0,d=1,e=a,c>e)return c;if(e>d)return d;for(;d>c;){if(f=g(e),b>l(f-a))return e;a>f?c=e:d=e,e=.5*(d-c)+c}return e}var n=0,o=0,p=0,q=0,r=0,s=0;return p=3*b,o=3*(d-b)-p,n=1-p-o,s=3*c,r=3*(e-c)-s,q=1-s-r,k(a,j(f))}function c(b,c,d,e){return function(f){return a(f,b,c,d,e,1)}}b.setBezierFunction=function(a,d,e,f,g){var h=c(d,e,f,g);return h.displayName=a,h.x1=d,h.y1=e,h.x2=f,h.y2=g,b.prototype.formula[a]=h},b.unsetBezierFunction=function(a){delete b.prototype.formula[a]}}(),function(){function a(a,c,d,e,f,g){return b.tweenProps(e,c,a,d,1,g,f)}var c=new b;c._filterArgs=[],b.interpolate=function(d,e,f,g,h){var i=b.shallowCopy({},d),j=h||0,k=b.composeEasingObject(d,g||"linear");c.set({});var l=c._filterArgs;l.length=0,l[0]=i,l[1]=d,l[2]=e,l[3]=k,b.applyFilter(c,"tweenCreated"),b.applyFilter(c,"beforeTween");var m=a(d,i,e,f,k,j);return b.applyFilter(c,"afterTween"),m}}(),function(a){function b(a,b){var c,d=[],e=a.length;for(c=0;e>c;c++)d.push("_"+b+"_"+c);return d}function c(a){var b=a.match(v);return b?(1===b.length||a[0].match(u))&&b.unshift(""):b=["",""],b.join(A)}function d(b){a.each(b,function(a){var c=b[a];"string"==typeof c&&c.match(z)&&(b[a]=e(c))})}function e(a){return i(z,a,f)}function f(a){var b=g(a);return"rgb("+b[0]+","+b[1]+","+b[2]+")"}function g(a){return a=a.replace(/#/,""),3===a.length&&(a=a.split(""),a=a[0]+a[0]+a[1]+a[1]+a[2]+a[2]),B[0]=h(a.substr(0,2)),B[1]=h(a.substr(2,2)),B[2]=h(a.substr(4,2)),B}function h(a){return parseInt(a,16)}function i(a,b,c){var d=b.match(a),e=b.replace(a,A);if(d)for(var f,g=d.length,h=0;g>h;h++)f=d.shift(),e=e.replace(A,c(f));return e}function j(a){return i(x,a,k)}function k(a){for(var b=a.match(w),c=b.length,d=a.match(y)[0],e=0;c>e;e++)d+=parseInt(b[e],10)+",";return d=d.slice(0,-1)+")"}function l(d){var e={};return a.each(d,function(a){var f=d[a];if("string"==typeof f){var g=r(f);e[a]={formatString:c(f),chunkNames:b(g,a)}}}),e}function m(b,c){a.each(c,function(a){for(var d=b[a],e=r(d),f=e.length,g=0;f>g;g++)b[c[a].chunkNames[g]]=+e[g];delete b[a]})}function n(b,c){a.each(c,function(a){var d=b[a],e=o(b,c[a].chunkNames),f=p(e,c[a].chunkNames);d=q(c[a].formatString,f),b[a]=j(d)})}function o(a,b){for(var c,d={},e=b.length,f=0;e>f;f++)c=b[f],d[c]=a[c],delete a[c];return d}function p(a,b){C.length=0;for(var c=b.length,d=0;c>d;d++)C.push(a[b[d]]);return C}function q(a,b){for(var c=a,d=b.length,e=0;d>e;e++)c=c.replace(A,+b[e].toFixed(4));return c}function r(a){return a.match(w)}function s(b,c){a.each(c,function(a){var d,e=c[a],f=e.chunkNames,g=f.length,h=b[a];if("string"==typeof h){var i=h.split(" "),j=i[i.length-1];for(d=0;g>d;d++)b[f[d]]=i[d]||j}else for(d=0;g>d;d++)b[f[d]]=h;delete b[a]})}function t(b,c){a.each(c,function(a){var d=c[a],e=d.chunkNames,f=e.length,g=b[e[0]],h=typeof g;if("string"===h){for(var i="",j=0;f>j;j++)i+=" "+b[e[j]],delete b[e[j]];b[a]=i.substr(1)}else b[a]=g})}var u=/(\d|\-|\.)/,v=/([^\-0-9\.]+)/g,w=/[0-9.\-]+/g,x=RegExp("rgb\\("+w.source+/,\s*/.source+w.source+/,\s*/.source+w.source+"\\)","g"),y=/^.*\(/,z=/#([0-9]|[a-f]){3,6}/gi,A="VAL",B=[],C=[];a.prototype.filter.token={tweenCreated:function(a,b,c){d(a),d(b),d(c),this._tokenData=l(a)},beforeTween:function(a,b,c,d){s(d,this._tokenData),m(a,this._tokenData),m(b,this._tokenData),m(c,this._tokenData)},afterTween:function(a,b,c,d){n(a,this._tokenData),n(b,this._tokenData),n(c,this._tokenData),t(d,this._tokenData)}}}(b)}).call(null),function(a){"function"==typeof define&&define.amd?define("jqueryNanoGallery",["jquery","ngTweenable"],a):a(jQuery,window.NGTweenable)}(function(a,b){function c(){function c(){pc.scrollTimeOut&&clearTimeout(pc.scrollTimeOut),pc.scrollTimeOut=setTimeout(function(){return pc.containerViewerDisplayed?void 0:("loadData"==pc.O.lazyBuild&&mc(pc.$E.conTnParent,pc.O.lazyBuildTreshold)&&(pc.O.lazyBuild="none",h()),-1!=pc.delayedAlbumIdx&&mc(pc.$E.conTnParent,pc.O.lazyBuildTreshold)&&T(pc.delayedAlbumIdx,pc.delayedSetLocationHash),void kb())},100)}function d(a){pc.isShiftPressed=a.shiftKey,pc.isAltPressed=a.altKey,pc.isCtrlPressed=a.ctrlKey,pc.isMetaPressed=a.metaKey}function e(){return{animationEngine:pc.aengine,t:"test"}}function f(){var a="Your browser version is not supported anymore. The image gallery cannot be displayed.

Please update to a more recent one. Download:
";a+='    Chrome
',a+='    Firefox
',a+='    Internet Explorer
',a+='    Safari',ic(a,!1)}function g(a){for(var b=document.createElement("div"),c=0;c1&&(a*=window.devicePixelRatio);for(var b=0;b0&&(pc.O.itemsBaseURL+="/"),pc.O.kind){case"":if(P(pc.i18nTranslations.breadcrumbHome,"","","","","album","","0","-1"),void 0!==pc.O.items&&null!==pc.O.items)A(),v(!1)||S(0,!1);else{var c=jQuery(pc.$E.base).children("a");c.length>0?(C(c),v(!1)||S(0,!1)):ic("error: no image to process.")}break;case"flickr":for(pc.O.flickrSkipOriginal||(pc.flickr.photoAvailableSizes.push(1e4),pc.flickr.photoAvailableSizesStr.push("o")),i=0;i0?pc.O.photoset:"0","-1"),G(0,!0,-1,!1);break;case"json":P(pc.i18nTranslations.breadcrumbHome,"","","","","album","",pc.O.album.length>0?encodeURIComponent(pc.O.album):"0","-1"),D(0,!0,-1,!1);break;case"picasa":default:if(pc.O.album.length>0){var e=pc.O.album.indexOf("&authkey=");if(e>=0){var f=pc.O.album.substring(0,e),g=pc.O.album.substring(e);-1==g.indexOf("Gv1sRg")&&(g="&authkey=Gv1sRg"+g.substring(9));var h=P(pc.i18nTranslations.breadcrumbHome,"","","","","album","",f,"-1");h.customData.authkey=g}else P(pc.i18nTranslations.breadcrumbHome,"","","","","album","",pc.O.album,"-1")}else P(pc.i18nTranslations.breadcrumbHome,"","","","","album","","0","-1");M(0,!0,-1,!1)}jQuery(document).keyup(function(a){if(d(a),pc.containerViewerDisplayed)switch(a.keyCode){case 27:cc(!0);break;case 32:case 13:Rb();break;case 38:case 39:case 33:Wb();break;case 40:case 37:case 34:Yb();break;case 35:case 36:}else if(!pc.containerViewerDisplayed&&pc.curAlbumIdx>0&&pc.O.galleryEnableKeyboard)switch(a.keyCode){case 27:S(0,"false");break;case 38:case 39:case 33:U();break;case 40:case 37:case 34:V();break;case 32:case 13:case 35:case 36:}}),jQuery(window).click(d),jQuery(window).mousemove(d),pc.O.locationHash&&jQuery(window).bind("hashchange",function(){v(!0)}),pc.O.galleryFullpageButton&&(pc.$E.conNavBFullpage=pc.O.RTL?jQuery('
').prependTo(pc.$E.conNavB):jQuery('
').appendTo(pc.$E.conNavB),pc.$E.conNavBFullpage.on("click",function(){if(pc.$E.conNavBFullpage.hasClass("setFullPageButton")){if(pc.containerViewerDisplayed)return;for(pc.O.maxWidth>0&&jQuery(pc.$E.base).css({maxWidth:""}),pc.$E.conNavBFullpage.removeClass("setFullPageButton").addClass("removeFullPageButton"),nc("",pc.$E.base),b=0;b0&&jQuery(pc.$E.base).css({maxWidth:pc.O.maxWidth}),pc.$E.base.removeClass("fullpage"),b=0;b0)return void(window.location=pc.I[a].destinationURL);pc.openNoDelay=!1,"album"==pc.I[a].kind?bb(a,!1,-1,!0):Lb(a,!1)}}function c(){if(o=0,m=null,n=null,l(pc.$E.conTn[0],0),pc.containerViewerDisplayed)pc.$currentTouchedThumbnail=null,pc.openNoDelay=!1;else if(null!=pc.$currentTouchedThumbnail){if(Math.abs(r.t-kc().t)>10)return Kb(pc.$currentTouchedThumbnail),pc.$currentTouchedThumbnail=null,void(pc.openNoDelay=!1);var a=pc.$currentTouchedThumbnail,c=a.data("index");if(void 0==c)return;("l1"==pc.curNavLevel&&void 0!==pc.O.touchAnimationL1?pc.O.touchAnimationL1:pc.O.touchAnimation)&&!pc.openNoDelay?pc.O.touchAutoOpenDelay>0?(zb(),Ib(a),window.clearInterval(pc.touchAutoOpenDelayTimerID),pc.touchAutoOpenDelayTimerID=window.setInterval(function(){window.clearInterval(pc.touchAutoOpenDelayTimerID),Math.abs(r.t-kc().t)>10?(pc.openNoDelay=!1,pc.$currentTouchedThumbnail=null,Kb(a)):b(c)},pc.O.touchAutoOpenDelay)):pc.I[c].hovered?b(c):(zb(),Ib(a)):b(c)}else pc.openNoDelay=!1}function e(){if(null==n||null==m)return void c();{var a=m.x-n.x;m.y-n.y}o-=a,pc.pgMaxLinesPerPage>0&&"auto"!=pc.tn.settings.getH()&&"auto"!=pc.tn.settings.getW()&&pc.O.paginationSwipe&&Math.abs(a)>40&&Math.abs(r.t-kc().t)<=10?(pc.$currentTouchedThumbnail=null,o=0,m=null,n=null,zb(),-40>a?ob():nb()):c()}function f(a){var b={};return a.targetTouches?(b.x=a.targetTouches[0].clientX,b.y=a.targetTouches[0].clientY):(b.x=a.clientX,b.y=a.clientY),b}function g(){if(k){if(pc.pgMaxLinesPerPage>0&&"auto"!=pc.tn.settings.getH()&&"auto"!=pc.tn.settings.getW()){var a=m.x-n.x;l(j,o-a)}k=!1}}function h(a){if(!pc.containerViewerDisplayed){var b=a.target||a.srcElement;jQuery(b).hasClass("nanoGalleryThumbnailContainer")&&Ib(jQuery(b))}}function i(a){var b=a.target||a.srcElement;jQuery(b).hasClass("nanoGalleryThumbnailContainer")&&Kb(jQuery(b))}var j=a,k=!1,m=null,n=null,o=0,p=!1,q=null,r=0;if(this.handleGestureStartNoDelay=function(a){var b=jQuery(a.target).get(0).tagName.toUpperCase();if(pc.containerViewerDisplayed||"A"==b||"INPUT"==b||jQuery(a.target).hasClass("customEventHandler")){if(jQuery(a.target).hasClass("ngChekbox")){var c=jQuery(a.target).parent().data("index");void 0!=c&&wb(pc.I[c],void 0,!1)}return a.stopPropagation(),!1}d(a),(new Date).getTime()-pc.timeLastTouchStart<400&&pc.O.itemsSelectable!==!0||(pc.openNoDelay=!0,this.handleGestureStart(a))}.bind(this),this.handleGestureStart=function(a){var b=jQuery(a.target).get(0).tagName.toUpperCase();if(pc.containerViewerDisplayed||"A"==b||"INPUT"==b||jQuery(a.target).hasClass("customEventHandler"))return a.stopPropagation(),!1;if(!((new Date).getTime()-pc.timeImgChanged<400&&pc.O.itemsSelectable!==!0||(new Date).getTime()-pc.timeLastTouchStart<400&&pc.O.itemsSelectable!==!0)){pc.timeLastTouchStart=(new Date).getTime();for(var c=a.target||a.srcElement,d=!1;c!=pc.$E.conTn[0];)jQuery(c).hasClass("nanoGalleryThumbnailContainer")&&(null==pc.$currentTouchedThumbnail||pc.$currentTouchedThumbnail.is(jQuery(c))||zb(),pc.$currentTouchedThumbnail=jQuery(c),d=!0),c=c.parentNode;if(d){if(pc.O.itemsSelectable===!0){if(pc.isShiftPressed||pc.isCtrlPressed||pc.isMetaPressed||"input"===a.target.nodeName.toLowerCase())return wb(pc.I[pc.$currentTouchedThumbnail.data("index")]),!1;if(pc.selectMode===!0)return wb(pc.I[pc.$currentTouchedThumbnail.data("index")]),!1;if(pc.I[pc.$currentTouchedThumbnail.data("index")].kind===pc.selectMode)return wb(pc.I[pc.$currentTouchedThumbnail.data("index")]),!1;var e=pc.$currentTouchedThumbnail.data("index");pc.touchSelectTO=setTimeout(function(){wb(pc.I[e])},500)}r=kc(),m=f(a),initialOffsetTop=kc().t,window.navigator.msPointerEnabled?(document.addEventListener("MSPointerMove",this.handleGestureMove,!0),document.addEventListener("MSPointerUp",this.handleGestureEnd,!0)):(document.addEventListener("touchmove",this.handleGestureMove,!0),document.addEventListener("touchend",this.handleGestureEnd,!0),document.addEventListener("touchcancel",this.handleGestureEnd,!0),document.addEventListener("mousemove",this.handleGestureMove,!0),document.addEventListener("mouseup",this.handleGestureEnd,!0)),pc.$E.base.addClass("unselectable").find("*").attr("draggable","false").attr("unselectable","on"),pc.gallerySwipeInitDone=!0}}}.bind(this),this.handleGestureMove=function(a){n=f(a),k||pc.O.paginationSwipe&&pc.pgMaxLinesPerPage>0&&"auto"!=pc.tn.settings.getH()&&"auto"!=pc.tn.settings.getW()&&(Math.abs(m.x-n.x)>15||p)&&(a.preventDefault(),p=!0,k=!0,window.requestAnimationFrame(g))}.bind(this),this.handleGestureEnd=function(a){if(a.cancelable&&a.preventDefault(),a.stopPropagation(),k=!1,p=!1,window.navigator.msPointerEnabled?(document.removeEventListener("MSPointerMove",this.handleGestureMove,!0),document.removeEventListener("MSPointerUp",this.handleGestureEnd,!0)):(document.removeEventListener("touchmove",this.handleGestureMove,!0),document.removeEventListener("touchend",this.handleGestureEnd,!0),document.removeEventListener("touchcancel",this.handleGestureEnd,!0),document.removeEventListener("mousemove",this.handleGestureMove,!0),document.removeEventListener("mouseup",this.handleGestureEnd,!0)),pc.O.itemsSelectable===!0){if((new Date).getTime()-pc.timeLastTouchStart>500)return!1;clearTimeout(pc.touchSelectTO)}pc.$E.base.addClass("unselectable").find("*").attr("draggable","true").attr("unselectable","off"),e(),m=null,n=null,o=0,p=!1,q=null}.bind(this),window.navigator.msPointerEnabled)j.addEventListener("MSPointerDown",this.handleGestureStartNoDelay,!0);else if(j.addEventListener("touchstart",this.handleGestureStart,!0),!pc.isIOS){var s=this;j.addEventListener("mousedown",function(a){2!=a.button&&s.handleGestureStartNoDelay(a)},!0)}j.addEventListener("mouseenter",h,!0),j.addEventListener("mouseleave",i,!0)}function o(){"fancybox"==pc.O.viewer&&"undefined"==typeof jQuery.fancybox&&(pc.O.viewer="internal",jc("Fancybox could not be found. Fallback to internal viewer. Please check the files included in the HTML page.")),("CBRISBOIS@GMAIL.COM"==pc.O.userID.toUpperCase()||"111186676244625461692"==pc.O.userID)&&(""==pc.O.blackList||"SCRAPBOOK|PROFIL"==pc.O.blackList.toUpperCase())&&(pc.O.blackList="profil|scrapbook|forhomepage"),""!=pc.O.blackList&&(pc.blackList=pc.O.blackList.toUpperCase().split("|")),""!=pc.O.whiteList&&(pc.whiteList=pc.O.whiteList.toUpperCase().split("|")),""!=pc.O.albumList&&(pc.albumList=pc.O.albumList.toUpperCase().split("|")),("picasa"==pc.O.kind||"flickr"==pc.O.kind||"json"==pc.O.kind)&&(pc.O.displayBreadcrumb=!0),void 0!==pc.O.photoset?pc.O.photoset.length>0&&(pc.O.displayBreadcrumb=!1):pc.O.photoset="",void 0!==pc.O.album?pc.O.album.length>0&&(pc.O.displayBreadcrumb=!1):pc.O.album="",pc.O.maxWidth>0&&(jQuery(pc.$E.base).css({maxWidth:pc.O.maxWidth}),jQuery(pc.$E.base).css({"margin-left":"auto"}),jQuery(pc.$E.base).css({"margin-right":"auto"})),"number"==rc(pc.O.slideshowDelay)&&pc.O.slideshowDelay>=2e3?pc.slideshowDelay=pc.O.slideshowDelay:jc('Parameter "slideshowDelay" must be an integer >= 2000 ms.'),"number"==rc(pc.O.thumbnailDisplayInterval)&&pc.O.thumbnailDisplayInterval>=0?pc.tn.displayInterval=pc.O.thumbnailDisplayInterval:jc('Parameter "thumbnailDisplayInterval" must be an integer.'),"number"==rc(pc.O.thumbnailLazyLoadTreshold)&&pc.O.thumbnailLazyLoadTreshold>=0?pc.tn.lazyLoadTreshold=pc.O.thumbnailLazyLoadTreshold:jc('Parameter "thumbnailLazyLoadTreshold" must be an integer.'),"number"==rc(pc.O.paginationMaxLinesPerPage)&&pc.O.paginationMaxLinesPerPage>=0?pc.pgMaxLinesPerPage=pc.O.paginationMaxLinesPerPage:jc('Parameter "paginationMaxLinesPerPage" must be an integer.'),void 0!==pc.O.thumbnailSizeSM&&(pc.O.breakpointSizeSM=pc.O.thumbnailSizeSM),void 0!==pc.O.thumbnailSizeME&&(pc.O.breakpointSizeME=pc.O.thumbnailSizeME),void 0!==pc.O.thumbnailSizeLA&&(pc.O.breakpointSizeLA=pc.O.thumbnailSizeLA),void 0!==pc.O.thumbnailSizeXL&&(pc.O.breakpointSizeXL=pc.O.thumbnailSizeXL);var a=pc.O.albumSorting.toUpperCase();0==a.indexOf("RANDOM")&&a.length>6&&(n=parseInt(a.substring(6)),n>0&&(pc.maxAlbums=n),pc.O.albumSorting="random");var b=pc.O.photoSorting.toUpperCase();0==b.indexOf("RANDOM")&&b.length>6&&(n=parseInt(b.substring(6)),n>0&&(pc.maxPhotos=n),pc.O.photoSorting="random");var c=parseInt(pc.O.albumMax);c>0&&(pc.maxAlbums=n);var d=pc.O.thumbnailL1HoverEffect;if(void 0!==d)switch(rc(d)){case"string":for(var e=d.split(","),f=0;f0&&a0&&a0&&a0&&a0&&a0&&a0&&a0&&a0){d=b.substring(0,f),e=b.substring(f+1);for(var j=0;i>j;j++)if("image"==pc.I[j].kind&&pc.I[j].GetID()==e){h=j;break}}else d=b;for(var j=0;i>j;j++)if("album"==pc.I[j].kind&&pc.I[j].GetID()==d){g=j;break}return null!==e?(c&&(pc.albumIdxToOpenOnViewerClose=g),""==pc.O.kind?Lb(h):-1==h?(pc.O.viewerFullscreen&&ngscreenfull.request(),bb(g,!1,e,a)):Lb(h),!0):(bb(g,!1,-1,a),!0)}function x(){pc.I=[],pc.curNavLevel="lN";var a="";pc.O.thumbnailLabel.get("displayDescription")&&(a="d");var b=P("dummydummydummy",pc.emptyGif,pc.emptyGif,a,"","image","","1","0"),c=tb(b,0,!1).e$;pc.tn.borderWidth=c.outerWidth(!0)-c.width(),pc.tn.borderHeight=c.outerHeight(!0)-c.height(),pc.tn.imgcBorderWidth=c.find(".imgContainer").outerWidth(!0)-c.find(".imgContainer").width(),pc.tn.imgcBorderHeight=c.find(".imgContainer").outerHeight(!0)-c.find(".imgContainer").height(),pc.tn.labelBorderHeight=c.find(".labelImage").outerHeight(!0)-c.find(".labelImage").height(),pc.tn.labelBorderWidth=c.find(".labelImage").outerWidth(!0)-c.find(".labelImage").width(),"onBottom"==pc.O.thumbnailLabel.get("position")&&(pc.tn.labelHeight.lN=c.find(".labelImage").outerHeight(!0),pc.tn.labelHeight.l1=pc.tn.labelHeight.lN); -for(var d=["xs","sm","me","la","xl"],e=0;e0?a[b+"_"+pc.i18nLang]:a[b]}function z(a){if("%filename"==pc.O.thumbnailLabel.get("title"))return a.split("/").pop().replace("_"," ");if("%filenameNoExt"==pc.O.thumbnailLabel.get("title")){var b=a.split("/").pop();return b.split(".").shift().replace("_"," ")}return a}function A(){var a=!1;"undefined"!=typeof pc.O.dataSorting&&("random"==pc.O.dataSorting?pc.O.items=oc(pc.O.items):"reversed"==pc.O.dataSorting&&(pc.O.items=pc.O.items.reverse())),jQuery.each(pc.O.items,function(b,c){var d="";d=y(c,"title"),void 0===d&&(d="");var e=pc.O.itemsBaseURL;e+=void 0!==c["src"+r().toUpperCase()]?c["src"+r().toUpperCase()]:c.src;var f="";f=void 0!==c.srct&&c.srct.length>0?pc.O.itemsBaseURL+c.srct:e;var g="";g=void 0!==c.srct2x&&c.srct2x.length>0?pc.O.itemsBaseURL+c.srct2x:""!=f?f:e,""!=pc.O.thumbnailLabel.get("title")&&(d=z(e));var h="";h=y(c,"description"),void 0===h&&(h="");var i="";void 0!==c.destURL&&c.destURL.length>0&&(i=c.destURL);var j=y(c,"tags");void 0===j&&(j="");var k=0;void 0!==c.albumID&&(k=c.albumID,a=!0);var l=null;void 0!==c.ID&&(l=c.ID);var m="image";void 0!==c.kind&&c.kind.length>0&&(m=c.kind);var n=P(d,f,e,h,i,m,j,l,k),o=0;void 0!==c.imgtWidth&&c.imgtWidth>0&&(o=c.imgtWidth);var p=0;void 0!==c.imgtHeight&&c.imgtHeight>0&&(p=c.imgtHeight),n.thumbs={url:{l1:{xs:f,sm:f,me:f,la:f,xl:f},lN:{xs:f,sm:f,me:f,la:f,xl:f}},width:{l1:{xs:o,sm:o,me:o,la:o,xl:o},lN:{xs:o,sm:o,me:o,la:o,xl:o}},height:{l1:{xs:p,sm:p,me:p,la:p,xl:p},lN:{xs:p,sm:p,me:p,la:p,xl:p}}},null!==c.customData&&(n.customData=B(c.customData)),"function"==typeof pc.O.fnProcessData&&pc.O.fnProcessData(n,"api",null)}),a&&(pc.O.displayBreadcrumb=!0);for(var b=pc.I.length,c=0,d=0,e=0;b>e;e++){c=0,d=0;for(var f=0;b>f;f++)e!=f&&pc.I[e].GetID()==pc.I[f].albumID&&(c++,"image"==pc.I[f].kind&&(pc.I[f].imageNumber=d++));pc.I[e].contentLength=c}}function B(a){if(null===a||"object"!=typeof a)return a;var b=a.constructor();for(var c in a)b[c]=B(a[c]);return b}function C(a){var b=!1;"undefined"!=typeof pc.O.dataSorting&&("random"==pc.O.dataSorting?a=oc(a):"reversed"==pc.O.dataSorting&&(jQuery.fn.reverse=[].reverse,a=a.reverse())),jQuery.each(a,function(a,c){var d="";void 0!==jQuery(c).attr("data-ngthumb")&&jQuery(c).attr("data-ngthumb").length>0&&(d=pc.O.itemsBaseURL+jQuery(c).attr("data-ngthumb")),void 0!==jQuery(c).attr("data-ngThumb")&&jQuery(c).attr("data-ngThumb").length>0&&(d=pc.O.itemsBaseURL+jQuery(c).attr("data-ngThumb"));var e="";void 0!==jQuery(c).attr("data-ngthumb2x")&&jQuery(c).attr("data-ngthumb2x").length>0&&(e=pc.O.itemsBaseURL+jQuery(c).attr("data-ngthumb2x")),void 0!==jQuery(c).attr("data-ngThumb2x")&&jQuery(c).attr("data-ngThumb2x").length>0&&(e=pc.O.itemsBaseURL+jQuery(c).attr("data-ngThumb2x"));var f="",g=r().toUpperCase();void 0!==jQuery(c).attr("data-ngsrc"+g)&&jQuery(c).attr("data-ngsrc"+g).length>0&&(f=pc.O.itemsBaseURL+jQuery(c).attr("data-ngsrc"+g)),void 0!==jQuery(c).attr("data-ngSrc"+g)&&jQuery(c).attr("data-ngSrc"+g).length>0&&(f=pc.O.itemsBaseURL+jQuery(c).attr("data-ngSrc"+g)),""==f&&(f=pc.O.itemsBaseURL+jQuery(c).attr("href"));var h="";void 0!==jQuery(c).attr("data-ngdesc")&&jQuery(c).attr("data-ngdesc").length>0&&(h=jQuery(c).attr("data-ngdesc")),void 0!==jQuery(c).attr("data-ngDesc")&&jQuery(c).attr("data-ngDesc").length>0&&(h=jQuery(c).attr("data-ngDesc"));var i="";void 0!==jQuery(c).attr("data-ngdest")&&jQuery(c).attr("data-ngdest").length>0&&(i=jQuery(c).attr("data-ngdest")),void 0!==jQuery(c).attr("data-ngDest")&&jQuery(c).attr("data-ngDest").length>0&&(i=jQuery(c).attr("data-ngDest"));var j=0;void 0!==jQuery(c).attr("data-ngalbumid")&&(j=jQuery(c).attr("data-ngalbumid"),b=!0),void 0!==jQuery(c).attr("data-ngAlbumID")&&(j=jQuery(c).attr("data-ngAlbumID"),b=!0);var k=null;void 0!==jQuery(c).attr("data-ngid")&&(k=jQuery(c).attr("data-ngid")),void 0!==jQuery(c).attr("data-ngID")&&(k=jQuery(c).attr("data-ngID"));var l="image";void 0!==jQuery(c).attr("data-ngkind")&&jQuery(c).attr("data-ngkind").length>0&&(l=jQuery(c).attr("data-ngkind")),void 0!==jQuery(c).attr("data-ngKind")&&jQuery(c).attr("data-ngKind").length>0&&(l=jQuery(c).attr("data-ngKind"));var m=jQuery(c).text();""!=pc.O.thumbnailLabel.get("title")&&void 0!=pc.O.thumbnailLabel.get("title")&&(m=z(f));var n=P(m,d,f,h,i,l,"",k,j),o=0;void 0!==jQuery(c).attr("data-ngthumbImgWidth")&&jQuery(c).attr("data-ngthumbImgWidth").length>0&&(o=jQuery(c).attr("data-ngthumbImgWidth"));var p=0;void 0!==jQuery(c).attr("data-ngthumbImgHeight")&&jQuery(c).attr("data-ngthumbImgHeight").length>0&&(p=jQuery(c).attr("data-ngthumbImgHeight")),n.thumbs={url:{l1:{xs:d,sm:d,me:d,la:d,xl:d},lN:{xs:d,sm:d,me:d,la:d,xl:d}},width:{l1:{xs:o,sm:o,me:o,la:o,xl:o},lN:{xs:o,sm:o,me:o,la:o,xl:o}},height:{l1:{xs:p,sm:p,me:p,la:p,xl:p},lN:{xs:p,sm:p,me:p,la:p,xl:p}}},void 0!==jQuery(c).data("customdata")&&(n.customData=B(jQuery(c).data("customdata"))),"function"==typeof pc.O.fnProcessData&&pc.O.fnProcessData(n,"markup",null)}),jQuery.each(a,function(a,b){jQuery(b).remove()}),b&&(pc.O.displayBreadcrumb=!0);for(var c=pc.I.length,d=0,e=0,f=0;c>f;f++){d=0,e=0;for(var g=0;c>g;g++)f!=g&&pc.I[f].GetID()==pc.I[g].albumID&&(d++,"image"==pc.I[g].kind&&(pc.I[g].imageNumber=e++));pc.I[f].contentLength=d}}function D(a,b,c,d){if($(a),pc.I[a].contentIsLoaded)return void S(a,d);var e=pc.O.jsonProvider+"?albumID="+encodeURIComponent(pc.I[a].GetID());_(),jQuery.ajaxSetup({cache:!1}),jQuery.support.cors=!0;var f=setTimeout(function(){ab(),ic("Could not retrieve Custom data...")},6e4);jQuery.getJSON(e,function(e){if(clearTimeout(f),ab(),F(a,e),b||""!=pc.O.openOnStart)v(!1)||S(a,d);else if(-1!=c){for(var g=-1,h=pc.I.length,i=0;h>i;i++)if("image"==pc.I[i].kind&&pc.I[i].GetID()==c){g=i;break}Lb(g,!0)}else S(a,d)}).fail(function(a,b,c){clearTimeout(f),ab();var d=b+", "+c;ic("Could not retrieve JSON items list (jQuery): "+d)})}function E(a){return decodeURIComponent(a)}function F(a,b){var c=!1,d=0;jQuery.each(b,function(a,b){var e="";e=y(b,"title"),void 0===e&&(e="");var f=pc.O.jsonProvider.substring(0,pc.O.jsonProvider.indexOf("nanoPhotosProvider.php")),g=f+E(b.src),h=f+E(b.srct);""!=pc.O.thumbnailLabel.get("title")&&(e=z(b.src));var i="";i=y(b,"description"),void 0===i&&(i="");var j="",k="image";void 0!==b.kind&&b.kind.length>0&&(k=b.kind);var l=null;void 0!==b.ID&&(l=b.ID);var m=!0;if("album"==k&&(R(e,l)||(m=!1)),m){var n=0;void 0!==b.albumID&&(n=b.albumID,c=!0);var o=P(e,h,g,i,j,k,"",l,n),p=b.imgtWidth,q=b.imgtHeight;if(o.thumbs={url:{l1:{xs:h,sm:h,me:h,la:h,xl:h},lN:{xs:h,sm:h,me:h,la:h,xl:h}},width:{l1:{xs:p,sm:p,me:p,la:p,xl:p},lN:{xs:p,sm:p,me:p,la:p,xl:p}},height:{l1:{xs:q,sm:q,me:q,la:q,xl:q},lN:{xs:q,sm:q,me:q,la:q,xl:q}}},"function"==typeof pc.O.fnProcessData&&pc.O.fnProcessData(o,"api",null),"image"==k&&(o.imageNumber=d,d++,d>=pc.maxAlbums))return!1}}),pc.I[a].contentIsLoaded=!0,pc.I[a].contentLength=d}function G(a,b,c,d){if($(a),pc.I[a].contentIsLoaded)return void S(a,d);var e="",f="album";0==pc.I[a].GetID()?e=pc.flickr.url()+"?&method=flickr.photosets.getList&api_key="+pc.flickr.ApiKey+"&user_id="+pc.O.userID+"&per_page=500&primary_photo_extras=url_o,url_sq,url_t,url_q,url_s,url_m,url_l,url_z,url_b,url_h,url_k&format=json&jsoncallback=?":(e="none"==pc.I[a].GetID()?pc.flickr.url()+"?&method=flickr.people.getPublicPhotos&api_key="+pc.flickr.ApiKey+"&user_id="+pc.O.userID+"&extras=description,views,url_o,url_sq,url_t,url_q,url_s,url_m,url_z,url_b,url_h,url_k&per_page=500&format=json&jsoncallback=?":pc.flickr.url()+"?&method=flickr.photosets.getPhotos&api_key="+pc.flickr.ApiKey+"&photoset_id="+pc.I[a].GetID()+"&extras=description,views,url_o,url_sq,url_t,url_q,url_s,url_m,url_l,url_z,url_b,url_h,url_k&format=json&jsoncallback=?",f="image"),_(),jQuery.ajaxSetup({cache:!1}),jQuery.support.cors=!0;var g=setTimeout(function(){ab(),ic("Could not retrieve Flickr data...")},6e4);jQuery.getJSON(e,function(e){if(clearTimeout(g),ab(),"album"==f?H(a,e):K(a,e),b||""!=pc.O.openOnStart)v(!1)||S(a,d);else if(-1!=c){for(var h=-1,i=pc.I.length,j=0;i>j;j++)if("image"==pc.I[j].kind&&pc.I[j].GetID()==c){h=j;break}Lb(h,!0)}else S(a,d)}).fail(function(a,b,c){clearTimeout(g),ab();var d=b+", "+c;ic("Could not retrieve Flickr photoset list (jQuery): "+d)})}function H(a,b){var c=!0;if(void 0!==b.stat&&"fail"===b.stat&&(ic("Could not retrieve Flickr photoset list: "+b.message+" (code: "+b.code+")."),c=!1),c){var d=0,e=b.photosets.photoset;switch(pc.O.albumSorting){case"random":e=oc(e);break;case"reversed":e=e.reverse();break;case"titleAsc":e.sort(function(a,b){var c=a.title._content.toUpperCase(),d=b.title._content.toUpperCase();return d>c?-1:c>d?1:0});break;case"titleDesc":e.sort(function(a,b){var c=a.title._content.toUpperCase(),d=b.title._content.toUpperCase();return c>d?-1:d>c?1:0})}jQuery.each(e,function(b,c){if(itemTitle=c.title._content,R(itemTitle,c.id)){itemID=c.id,itemDescription="",void 0!=c.description._content&&(itemDescription=c.description._content);var e={};for(var f in c.primary_photo_extras)e[f]=c.primary_photo_extras[f];tags="",void 0!==c.primary_photo_extras&&void 0!==c.primary_photo_extras.tags&&(tags=c.primary_photo_extras.tags);var g=P(itemTitle,"","",itemDescription,"","album",tags,itemID,pc.I[a].GetID());g.contentLength=c.photos,g.thumbSizes=e;var h={url:{l1:{xs:"",sm:"",me:"",la:"",xl:""},lN:{xs:"",sm:"",me:"",la:"",xl:""}},width:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}},height:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}}};if(h=I(h,c.primary_photo_extras,"l1"),h=I(h,c.primary_photo_extras,"lN"),g.thumbs=h,d++,d>=pc.maxAlbums)return!1}}),pc.I[a].contentIsLoaded=!0,pc.I[a].contentLength=d}}function I(a,b,c){for(var d=["xs","sm","me","la","xl"],e=0;epc.tn.settings.height[c][d[e]]&&(f="width_",g=Math.ceil(pc.tn.settings.width[c][d[e]]*pc.tn.scale));var h=J(f,g,b);a.url[c][d[e]]=h.url,a.width[c][d[e]]=h.width,a.height[c][d[e]]=h.height}return a}function J(a,b,c){for(var d={url:"",width:0,height:0},e=0,f=0;f=b))break}var h=pc.flickr.photoAvailableSizesStr[e];return d.url=c["url_"+h],d.width=parseInt(c["width_"+h]),d.height=parseInt(c["height_"+h]),d}function K(a,b){var c="";switch(c="none"==pc.I[a].GetID()?b.photos.photo:b.photoset.photo,pc.O.photoSorting){case"random":c=oc(c);break;case"reversed":c=c.reverse();break;case"titleAsc":c.sort(function(a,b){var c="",d="";return""!=pc.O.thumbnailLabel.get("title")?(c=z(a.url_sq),d=z(b.url_sq)):(c=a.title.toUpperCase(),d=b.title.toUpperCase()),d>c?-1:c>d?1:0});break;case"titleDesc":c.sort(function(a,b){var c="",d="";return""!=pc.O.thumbnailLabel.get("title")?(c=z(a.url_sq),d=z(b.url_sq)):(c=a.title.toUpperCase(),d=b.title.toUpperCase()),c>d?-1:d>c?1:0})}var d=pc.I[a].GetID(),e=0;jQuery.each(c,function(a,b){for(var c=b.title,f=b.id,g=b.description._content,h=b.url_sq,a=pc.flickr.photoSize;a>=0;a--)if(void 0!=b["url_"+pc.flickr.photoAvailableSizesStr[a]]){h=b["url_"+pc.flickr.photoAvailableSizesStr[a]];break}var i={};for(var j in b)(0==j.indexOf("height_")||0==j.indexOf("width_")||0==j.indexOf("url_"))&&(i[j]=b[j]);""!=pc.O.thumbnailLabel.get("title")&&(c=z(h));var k=P(c,"",h,g,"","image","",f,d);k.imageNumber=e,void 0!==b.url_o?(k.width=b.width_o,k.height=b.height_o):(k.width=b.width_z,k.height=b.height_z);var l={url:{l1:{xs:"",sm:"",me:"",la:"",xl:""},lN:{xs:"",sm:"",me:"",la:"",xl:""}},width:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}},height:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}}};return l=I(l,b,"l1"),l=I(l,b,"lN"),k.thumbs=l,e++,e>=pc.maxPhotos?!1:void 0}),pc.I[a].contentIsLoaded=!0,pc.I[a].contentLength=e}function L(a,b,c,d,e){var f=Math.ceil(c*pc.tn.scale)+e;return"auto"==b?f=Math.ceil(c*pc.tn.scale)+e:"auto"==c?f=Math.ceil(b*pc.tn.scale)+d:b>c&&(f=Math.ceil(b*pc.tn.scale)+d),a.length>0&&(a+=","),a+=f}function M(a,b,c,d){if($(a),pc.I[a].contentIsLoaded)return void S(a,d);var e="",f="album",g="";if(g=L(g,pc.tn.settings.width.l1.xs,pc.tn.settings.height.l1.xs,pc.tn.settings.width.l1.xsc,pc.tn.settings.height.l1.xsc),g=L(g,pc.tn.settings.width.l1.sm,pc.tn.settings.height.l1.sm,pc.tn.settings.width.l1.smc,pc.tn.settings.height.l1.smc),g=L(g,pc.tn.settings.width.l1.me,pc.tn.settings.height.l1.me,pc.tn.settings.width.l1.mec,pc.tn.settings.height.l1.mec),g=L(g,pc.tn.settings.width.l1.la,pc.tn.settings.height.l1.la,pc.tn.settings.width.l1.lac,pc.tn.settings.height.l1.lac),g=L(g,pc.tn.settings.width.l1.xl,pc.tn.settings.height.l1.xl,pc.tn.settings.width.l1.xlc,pc.tn.settings.height.l1.xlc),g=L(g,pc.tn.settings.width.lN.xs,pc.tn.settings.height.lN.xs,pc.tn.settings.width.lN.xsc,pc.tn.settings.height.lN.xsc),g=L(g,pc.tn.settings.width.lN.sm,pc.tn.settings.height.lN.sm,pc.tn.settings.width.lN.smc,pc.tn.settings.height.lN.smc),g=L(g,pc.tn.settings.width.lN.me,pc.tn.settings.height.lN.me,pc.tn.settings.width.lN.mec,pc.tn.settings.height.lN.mec),g=L(g,pc.tn.settings.width.lN.la,pc.tn.settings.height.lN.la,pc.tn.settings.width.lN.lac,pc.tn.settings.height.lN.lac),g=L(g,pc.tn.settings.width.lN.xl,pc.tn.settings.height.lN.xl,pc.tn.settings.width.lN.xlc,pc.tn.settings.height.lN.xlc),0==pc.I[a].GetID())e=pc.picasa.url()+"user/"+pc.O.userID+"?alt=json&kind=album&thumbsize="+g+"&rnd="+(new Date).getTime();else{var h="";"undefined"!=typeof pc.I[a].customData.authkey&&(h=pc.I[a].customData.authkey),e=pc.picasa.url()+"user/"+pc.O.userID+"/albumid/"+pc.I[a].GetID()+"?alt=json&kind=photo"+h+"&thumbsize="+g+"&imgmax=d",f="image"}_(),jQuery.ajaxSetup({cache:!1}),jQuery.support.cors=!0;var i=setTimeout(function(){ab(),ic("Could not retrieve Picasa/Google+ data...")},6e4),j=function(e){if(clearTimeout(i),ab(),N(a,e,f),b||""!=pc.O.openOnStart)v(!1)||S(a,d);else if(-1!=c){for(var g=-1,h=pc.I.length,j=0;h>j;j++)if("image"==pc.I[j].kind&&pc.I[j].GetID()==c){g=j;break}Lb(g,!0)}else S(a,d)},k=null,l=function(a,b){jQuery.getJSON(a+"&start-index="+b,"callback=?",function(b){null===k?k=b:k.feed.entry=k.feed.entry.concat(b.feed.entry),b.feed.openSearch$startIndex.$t+b.feed.openSearch$itemsPerPage.$t>=b.feed.openSearch$totalResults.$t?j(k):l(a,b.feed.openSearch$startIndex.$t+b.feed.openSearch$itemsPerPage.$t)}).fail(function(b,c,d){clearTimeout(i),ab();var e="";for(var f in b)e+=f+"="+b[f]+"
";var g=c+", "+d+" "+e+"

URL:"+a;ic("Could not retrieve Picasa/Google+ data. Error: "+g)})};l(e,1)}function N(a,b,c){var d=0,e=pc.I[a].GetID(),f=b.feed.entry,g=pc.O.albumSorting;switch("image"==c&&(g=pc.O.photoSorting),g){case"random":f=oc(f);break;case"reversed":f=f.reverse();break;case"titleAsc":f.sort(function(a,b){var d="",e="";return"image"==c?""!=pc.O.thumbnailLabel.get("title")?(d=z(unescape(unescape(unescape(unescape(a.media$group.media$content[0].url))))),e=z(unescape(unescape(unescape(unescape(b.media$group.media$content[0].url)))))):(d=a.media$group.media$description.$t.toUpperCase(),e=b.media$group.media$description.$t.toUpperCase()):(d=a.media$group.media$title.$t.toUpperCase(),e=b.media$group.media$title.$t.toUpperCase()),e>d?-1:d>e?1:0});break;case"titleDesc":f.sort(function(a,b){var d="",e="";return"image"==c?""!=pc.O.thumbnailLabel.get("title")?(d=z(unescape(unescape(unescape(unescape(a.media$group.media$content[0].url))))),e=z(unescape(unescape(unescape(unescape(b.media$group.media$content[0].url)))))):(d=a.media$group.media$description.$t.toUpperCase(),e=b.media$group.media$description.$t.toUpperCase()):(d=a.media$group.media$title.$t.toUpperCase(),e=b.media$group.media$title.$t.toUpperCase()),d>e?-1:e>d?1:0})}jQuery.each(f,function(a,b){var f=b.media$group.media$title.$t,g=b.media$group.media$thumbnail[0].url,h=b.gphoto$id.$t,i="",j=b.media$group.media$description.$t;"image"==c&&(i=f,f=j,j="");var k=b.media$group.media$content[0].url;"image"==c&&""!=pc.O.thumbnailLabel.get("title")&&(f=z(unescape(unescape(unescape(unescape(k))))));var l=!0;"album"==c&&(R(f,h)||(l=!1));var m="";if(l){var n="",o="";if("album"==c)o=h;else{o=k;var p=k.substring(0,k.lastIndexOf("/"));p=p.substring(0,p.lastIndexOf("/"))+"/",o=window.screen.width>window.screen.height?p+"w"+window.screen.width+"/"+i:p+"h"+window.screen.height+"/"+i}var q=P(f,g,o,j,"",c,m,h,e);q.picasaThumbBaseURL=n,q.imageNumber=d,"album"==c&&(q.author=b.author[0].name.$t,q.contentLength=b.gphoto$numphotos.$t);var r={url:{l1:{xs:"",sm:"",me:"",la:"",xl:""},lN:{xs:"",sm:"",me:"",la:"",xl:""}},width:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}},height:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}}};if(r=O("l1",0,r,b,c),r=O("lN",5,r,b,c),q.thumbs=r,"function"==typeof pc.O.fnProcessData&&pc.O.fnProcessData(q,"picasa",b),d++,d>=("album"==c?pc.maxAlbums:pc.maxPhotos))return!1}}),pc.I[a].contentIsLoaded=!0,pc.I[a].contentLength=d}function O(a,b,c,d,e){for(var f=["xs","sm","me","la","xl"],g=0;gc;c++)if(pc.I[c].GetID()==a)return pc.I[c];return null}function R(a,b){var c=a.toUpperCase();if(b=b.toUpperCase(),null===pc.albumList){var d=!1;if(null!==pc.whiteList){for(var e=0;ed;d++)if(pc.I[d].albumID==pc.I[a].GetID()){Lb(d);break}}else if(pc.containerViewerDisplayed&&cc(!1),a!=pc.lastOpenAlbumID){if(pc.O.locationHash&&b){var e="nanogallery/"+pc.baseEltID+"/"+pc.I[a].GetID();pc.lastLocationHash="#"+e;try{top.location.hash=e}catch(f){pc.O.locationHash=!1}}pc.lastOpenAlbumID=pc.I[a].GetID(),$(a);var g=0;pc.I[a].paginationLastPage>0&&pc.I[a].paginationLastWidth==pc.$E.conTnParent.width()&&(g=pc.I[a].paginationLastPage),qb(a,g)}}function U(){var a=W(pc.curAlbumIdx),b=a>0;bb(a,!1,-1,b)}function V(){var a=X(pc.curAlbumIdx),b=a>0;bb(a,!1,-1,b)}function W(a){for(var b=pc.I.length,c=-1,d=a+1;b>d;d++)if(pc.I[d].albumID==pc.I[a].albumID&&"album"==pc.I[d].kind){c=d;break}if(-1==c)for(var d=0;a>=d;d++)if(pc.I[d].albumID==pc.I[a].albumID&&"album"==pc.I[d].kind){c=d;break}return c}function X(a){for(var b=(pc.I.length,-1),c=a-1;c>=0;c--)if(pc.I[c].albumID==pc.I[a].albumID&&"album"==pc.I[c].kind){b=c;break}if(-1==b)for(var c=pc.I.length-1;c>=a;c--)if(pc.I[c].albumID==pc.I[a].albumID&&"album"==pc.I[c].kind){b=c;break}return b}function Y(a){var b="folder";0==a&&(b="folderHome");var c=jQuery('
'+pc.I[a].title+"
").appendTo(pc.$E.conBC);jQuery(c).data("albumIdx",a),c.click(function(){var a=jQuery(this).data("albumIdx");jQuery(this).nextAll().remove(),bb(a,!1,-1,!0)})}function Z(a){var b=jQuery('
').appendTo(pc.$E.conBC);jQuery(b).data("albumIdx",a),b.click(function(){var a=jQuery(this).data("albumIdx");jQuery(this).nextAll().remove(),jQuery(this).remove(),bb(a,!1,-1,!0)})}function $(a){var c=!1;if(1==pc.O.displayBreadcrumb&&!pc.O.thumbnailAlbumDisplayImage){if(0==pc.$E.conBC.children().length&&pc.$E.conNavBCon.css({opacity:0,"max-height":"0px"}),c=!0,pc.$E.conBC.children().remove(),Y(0),0!=a){var d=pc.I.length,e=[];e.push(a);for(var f=a;0!=pc.I[f].albumID&&-1!=pc.I[f].albumID;)for(i=1;i=0;i--)Y(e[i]),i>0&&Z(e[i-1])}var g=pc.$E.conBC.children(),h=g.length;if(0==h)pc.curNavLevel="l1",pc.O.breadcrumbAutoHideTopLevel&&(pc.$E.conNavBCon.css({opacity:0,"max-height":"0px"}),c=!1);else if(pc.curNavLevel=1==h?"l1":"lN",1==h&&pc.O.breadcrumbAutoHideTopLevel){var j=new b;j.tween({from:{opacity:pc.$E.conNavBCon.css("opacity"),"max-height":pc.$E.conNavBCon.css("max-height")},to:{opacity:"0","max-height":"0px"},attachment:{$e:pc.$E.conNavBCon},duration:200,step:function(a,b){b.$e.css(a)},finish:function(a,b){b.$e.css({opacity:"0","max-height":"0px"})}})}else if(pc.O.breadcrumbAutoHideTopLevel){var j=new b;j.tween({from:{opacity:pc.$E.conNavBCon.css("opacity"),"max-height":pc.$E.conNavBCon.css("max-height")},to:{opacity:"1","max-height":"50px"},attachment:{$e:pc.$E.conNavBCon},duration:200,step:function(a,b){b.$e.css(a)},finish:function(a,b){b.$e.css({opacity:"1","max-height":"50px"})}})}else pc.$E.conNavBCon.css({opacity:1,"max-height":"50px"});pc.pgMaxNbThumbnailsPerRow=fb()}pc.O.useTags&&(c=!0,null==pc.containerTags&&(pc.containerTags=jQuery('
').appendTo(pc.$E.conNavB))),pc.O.galleryFullpageButton&&(c=!0),!pc.containerNavigationbarContDisplayed&&c&&(pc.containerNavigationbarContDisplayed=!0,pc.$E.conNavBCon.show())}function _(){pc.$E.conLoadingB.addClass("nanoGalleryLBar").removeClass("nanoGalleryLBarOff")}function ab(){pc.$E.conLoadingB.removeClass("nanoGalleryLBar").addClass("nanoGalleryLBarOff")}function bb(a,b,c,d){if(pc.O.itemsSelectable&&pc.O.keepSelection===!1){pc.selectedItems=[];for(var e=pc.I.length,f=0;e>f;f++)pc.I[f].selected=!1}switch(pc.O.kind){case"":S(a,d);break;case"flickr":G(a,b,c,d);break;case"json":D(a,b,c,d);break;case"picasa":default:M(a,b,c,d)}}function cb(){"auto"==pc.tn.settings.getH()?db():"auto"==pc.tn.settings.getW()?eb():gb(),kb(),jb(0)}function db(){var a=pc.$E.conTnParent.width(),b=0,c=0,d=0,e=[],f=fb(),g=0,h=pc.O.thumbnailGutterHeight,j=pc.tn.outerWidth.get(),k=pc.$E.conTn.find(".nanoGalleryThumbnailContainer");"justified"==pc.O.thumbnailAlignment?(f=Math.min(f,k.length),g=1==f?0:(a-f*j)/(f-1)):g=pc.O.thumbnailGutterWidth;var l=0;k.each(function(){var a=jQuery(this),i=a.data("index");if(void 0!==i){var j=0;if(0!=c)return!1;j=b*(pc.tn.outerWidth.get()+g),e[b]=pc.I[i].thumbFullHeight+h,b++,l++,b>=f&&(b=0,c++),d++}});var m=e.length*(j+g)-g;c=0,b=0,k.each(function(){var a=jQuery(this),j=a.data("index");if(void 0!==j){"onBottom"==pc.O.thumbnailLabel.get("position")&&yb(a,pc.I[j]);var k=0,l=0;if(0==c)k=b*(pc.tn.outerWidth.get()+g),e[b]=pc.I[j].thumbFullHeight+h,b++,b>=f&&(b=0,c++);else{var n=0,o=e[0];for(i=1;i0&&pc.I[c].thumbImg().height>0))return!1;var d=pc.I[c],j=Math.floor(d.thumbImg().width/d.thumbImg().height*pc.tn.settings.getH())+pc.tn.borderWidth+pc.tn.imgcBorderWidth;if(pc.O.thumbnailFeatured&&0==i&&(j=2*j,k=j),h&&(h=!1,f++,b=0,q=!1,r=!1,1==f&&k>0&&(b=k,k=0)),d.thumbImg().height>d.thumbImg().width?q=!0:r=!0,a>b+j+m){b+=j+m,g[f]=pc.tn.settings.getH();var l=Math.max(q?o:0,r?p:0);pc.O.thumbnailAdjustLastRowHeight&&l>0&&(g[f]=Math.min(g[f],l)),e[f]=c}else{b+=j;var n=Math.floor(pc.tn.settings.getH()*a/b);g[f]=n,q&&(o=Math.max(o,n)),r&&(p=Math.max(p,n)),e[f]=c,h=!0}i++}}),f=0,d=0,c=0,i=0,s.each(function(){var b=jQuery(this),h=b.data("index");if(void 0!==h&&void 0!=pc.I[h]){if(!(pc.I[h].thumbImg().width>0&&pc.I[h].thumbImg().height>0))return!1;var k=pc.I[h],o=Math.floor(k.thumbImg().width/k.thumbImg().height*g[f]);0==i&&pc.O.thumbnailFeatured&&(o=2*o,j=1==g.length?2*parseInt(g[0]):parseInt(g[0])+parseInt(g[1])+pc.tn.borderHeight+pc.tn.imgcBorderHeight),h==e[f]&&(e.length!=f+1?o=a-c-pc.tn.borderWidth-pc.tn.imgcBorderWidth:c+o+pc.tn.borderWidth+pc.tn.imgcBorderWidth+m>a&&(o=a-c-pc.tn.borderWidth-pc.tn.imgcBorderWidth));var p=0;0==i&&pc.O.thumbnailFeatured||(p=g[f]),p=parseInt(p),o=parseInt(o),b.width(o+pc.tn.imgcBorderWidth).height(p+pc.tn.imgcBorderHeight+pc.tn.labelHeight.get()),k.$getElt(".imgContainer").height(p).width(o),b.find("img").css({"max-height":p+2,"max-width":o+2}),b.find(".subcontainer").width(o+pc.tn.imgcBorderWidth).height(p+pc.tn.imgcBorderHeight+pc.tn.labelHeight.get());var q=c;pc.O.RTL&&(q=a-c-(o+pc.tn.borderWidth+pc.tn.imgcBorderWidth)),b.css({top:d,left:q}),k.thumbFullWidth=o+pc.tn.borderWidth+pc.tn.imgcBorderWidth,k.thumbFullHeight=p+pc.tn.borderHeight+pc.tn.imgcBorderHeight+pc.tn.labelHeight.get(),Cb(b),hb(b,k,i),c+=o+pc.tn.borderWidth+pc.tn.imgcBorderWidth+m,h==e[f]&&(d+=g[f]+pc.tn.labelHeight.get()+n+pc.tn.imgcBorderHeight+pc.tn.borderHeight,f++,c=0,1==f&&l>0&&(c=l,l=0)),i++ +for(var d=["xs","sm","me","la","xl"],e=0;e0?a[b+"_"+pc.i18nLang]:a[b]}function z(a){if("%filename"==pc.O.thumbnailLabel.get("title"))return a.split("/").pop().replace("_"," ");if("%filenameNoExt"==pc.O.thumbnailLabel.get("title")){var b=a.split("/").pop();return b.split(".").shift().replace("_"," ")}return a}function A(){var a=!1;"undefined"!=typeof pc.O.dataSorting&&("random"==pc.O.dataSorting?pc.O.items=oc(pc.O.items):"reversed"==pc.O.dataSorting&&(pc.O.items=pc.O.items.reverse())),jQuery.each(pc.O.items,function(b,c){var d="";d=y(c,"title"),void 0===d&&(d="");var e=pc.O.itemsBaseURL;e+=void 0!==c["src"+r().toUpperCase()]?c["src"+r().toUpperCase()]:c.src;var f="";f=void 0!==c.srct&&c.srct.length>0?pc.O.itemsBaseURL+c.srct:e;var g="";g=void 0!==c.srct2x&&c.srct2x.length>0?pc.O.itemsBaseURL+c.srct2x:""!=f?f:e,""!=pc.O.thumbnailLabel.get("title")&&(d=z(e));var h="";h=y(c,"description"),void 0===h&&(h="");var i="";void 0!==c.destURL&&c.destURL.length>0&&(i=c.destURL);var j=y(c,"tags");void 0===j&&(j="");var k=0;void 0!==c.albumID&&(k=c.albumID,a=!0);var l=null;void 0!==c.ID&&(l=c.ID);var m="image";void 0!==c.kind&&c.kind.length>0&&(m=c.kind);var n=P(d,f,e,h,i,m,j,l,k),o=0;void 0!==c.imgtWidth&&c.imgtWidth>0&&(o=c.imgtWidth);var p=0;void 0!==c.imgtHeight&&c.imgtHeight>0&&(p=c.imgtHeight),n.thumbs={url:{l1:{xs:f,sm:f,me:f,la:f,xl:f},lN:{xs:f,sm:f,me:f,la:f,xl:f}},width:{l1:{xs:o,sm:o,me:o,la:o,xl:o},lN:{xs:o,sm:o,me:o,la:o,xl:o}},height:{l1:{xs:p,sm:p,me:p,la:p,xl:p},lN:{xs:p,sm:p,me:p,la:p,xl:p}}},null!==c.customData&&(n.customData=B(c.customData)),"function"==typeof pc.O.fnProcessData&&pc.O.fnProcessData(n,"api",null)}),a&&(pc.O.displayBreadcrumb=!0);for(var b=pc.I.length,c=0,d=0,e=0;b>e;e++){c=0,d=0;for(var f=0;b>f;f++)e!=f&&pc.I[e].GetID()==pc.I[f].albumID&&(c++,"image"==pc.I[f].kind&&(pc.I[f].imageNumber=d++));pc.I[e].contentLength=c}}function B(a){if(null===a||"object"!=typeof a)return a;var b=a.constructor();for(var c in a)b[c]=B(a[c]);return b}function C(a){var b=!1;"undefined"!=typeof pc.O.dataSorting&&("random"==pc.O.dataSorting?a=oc(a):"reversed"==pc.O.dataSorting&&(jQuery.fn.reverse=[].reverse,a=a.reverse())),jQuery.each(a,function(a,c){var d="";void 0!==jQuery(c).attr("data-ngthumb")&&jQuery(c).attr("data-ngthumb").length>0&&(d=pc.O.itemsBaseURL+jQuery(c).attr("data-ngthumb")),void 0!==jQuery(c).attr("data-ngThumb")&&jQuery(c).attr("data-ngThumb").length>0&&(d=pc.O.itemsBaseURL+jQuery(c).attr("data-ngThumb"));var e="";void 0!==jQuery(c).attr("data-ngthumb2x")&&jQuery(c).attr("data-ngthumb2x").length>0&&(e=pc.O.itemsBaseURL+jQuery(c).attr("data-ngthumb2x")),void 0!==jQuery(c).attr("data-ngThumb2x")&&jQuery(c).attr("data-ngThumb2x").length>0&&(e=pc.O.itemsBaseURL+jQuery(c).attr("data-ngThumb2x"));var f="",g=r().toUpperCase();void 0!==jQuery(c).attr("data-ngsrc"+g)&&jQuery(c).attr("data-ngsrc"+g).length>0&&(f=pc.O.itemsBaseURL+jQuery(c).attr("data-ngsrc"+g)),void 0!==jQuery(c).attr("data-ngSrc"+g)&&jQuery(c).attr("data-ngSrc"+g).length>0&&(f=pc.O.itemsBaseURL+jQuery(c).attr("data-ngSrc"+g)),""==f&&(f=pc.O.itemsBaseURL+jQuery(c).attr("href"));var h="";void 0!==jQuery(c).attr("data-ngdesc")&&jQuery(c).attr("data-ngdesc").length>0&&(h=jQuery(c).attr("data-ngdesc")),void 0!==jQuery(c).attr("data-ngDesc")&&jQuery(c).attr("data-ngDesc").length>0&&(h=jQuery(c).attr("data-ngDesc"));var i="";void 0!==jQuery(c).attr("data-ngdest")&&jQuery(c).attr("data-ngdest").length>0&&(i=jQuery(c).attr("data-ngdest")),void 0!==jQuery(c).attr("data-ngDest")&&jQuery(c).attr("data-ngDest").length>0&&(i=jQuery(c).attr("data-ngDest"));var j=0;void 0!==jQuery(c).attr("data-ngalbumid")&&(j=jQuery(c).attr("data-ngalbumid"),b=!0),void 0!==jQuery(c).attr("data-ngAlbumID")&&(j=jQuery(c).attr("data-ngAlbumID"),b=!0);var k=null;void 0!==jQuery(c).attr("data-ngid")&&(k=jQuery(c).attr("data-ngid")),void 0!==jQuery(c).attr("data-ngID")&&(k=jQuery(c).attr("data-ngID"));var l="image";void 0!==jQuery(c).attr("data-ngkind")&&jQuery(c).attr("data-ngkind").length>0&&(l=jQuery(c).attr("data-ngkind")),void 0!==jQuery(c).attr("data-ngKind")&&jQuery(c).attr("data-ngKind").length>0&&(l=jQuery(c).attr("data-ngKind"));var m=jQuery(c).text();""!=pc.O.thumbnailLabel.get("title")&&void 0!=pc.O.thumbnailLabel.get("title")&&(m=z(f));var n=P(m,d,f,h,i,l,"",k,j),o=0;void 0!==jQuery(c).attr("data-ngthumbImgWidth")&&jQuery(c).attr("data-ngthumbImgWidth").length>0&&(o=jQuery(c).attr("data-ngthumbImgWidth"));var p=0;void 0!==jQuery(c).attr("data-ngthumbImgHeight")&&jQuery(c).attr("data-ngthumbImgHeight").length>0&&(p=jQuery(c).attr("data-ngthumbImgHeight")),n.thumbs={url:{l1:{xs:d,sm:d,me:d,la:d,xl:d},lN:{xs:d,sm:d,me:d,la:d,xl:d}},width:{l1:{xs:o,sm:o,me:o,la:o,xl:o},lN:{xs:o,sm:o,me:o,la:o,xl:o}},height:{l1:{xs:p,sm:p,me:p,la:p,xl:p},lN:{xs:p,sm:p,me:p,la:p,xl:p}}},void 0!==jQuery(c).data("customdata")&&(n.customData=B(jQuery(c).data("customdata"))),"function"==typeof pc.O.fnProcessData&&pc.O.fnProcessData(n,"markup",null)}),jQuery.each(a,function(a,b){jQuery(b).remove()}),b&&(pc.O.displayBreadcrumb=!0);for(var c=pc.I.length,d=0,e=0,f=0;c>f;f++){d=0,e=0;for(var g=0;c>g;g++)f!=g&&pc.I[f].GetID()==pc.I[g].albumID&&(d++,"image"==pc.I[g].kind&&(pc.I[g].imageNumber=e++));pc.I[f].contentLength=d}}function D(a,b,c,d){if($(a),pc.I[a].contentIsLoaded)return void S(a,d);var e=pc.O.jsonProvider+"?albumID="+encodeURIComponent(pc.I[a].GetID());_(),jQuery.ajaxSetup({cache:!1}),jQuery.support.cors=!0;var f=setTimeout(function(){ab(),ic("Could not retrieve Custom data...")},6e4);jQuery.getJSON(e,function(e){if(clearTimeout(f),ab(),F(a,e),b||""!=pc.O.openOnStart)v(!1)||S(a,d);else if(-1!=c){for(var g=-1,h=pc.I.length,i=0;h>i;i++)if("image"==pc.I[i].kind&&pc.I[i].GetID()==c){g=i;break}Lb(g,!0)}else S(a,d)}).fail(function(a,b,c){clearTimeout(f),ab();var d=b+", "+c;ic("Could not retrieve JSON items list (jQuery): "+d)})}function E(a){return decodeURIComponent(a)}function F(a,b){var c=!1,d=0;jQuery.each(b,function(a,b){var e="";e=y(b,"title"),void 0===e&&(e="");var f=pc.O.jsonProvider.substring(0,pc.O.jsonProvider.indexOf("nanoPhotosProvider.php")),g=f+E(b.src),h=f+E(b.srct);""!=pc.O.thumbnailLabel.get("title")&&(e=z(b.src)),e=e.replaceAll("_"," "),0==e.search(/@@\d\d\d\d/)&&(e=e.substring(6),e=e.replace(/^\s*|\s*$/,""));var i="";i=y(b,"description"),void 0===i&&(i=""),i=i.replaceAll("_"," ");var j="",k="image";void 0!==b.kind&&b.kind.length>0&&(k=b.kind);var l=null;void 0!==b.ID&&(l=b.ID);var m=!0;if("album"==k&&(R(e,l)||(m=!1)),m){var n=0;void 0!==b.albumID&&(n=b.albumID,c=!0);var o=P(e,h,g,i,j,k,"",l,n),p=b.imgtWidth,q=b.imgtHeight;if(o.thumbs={url:{l1:{xs:h,sm:h,me:h,la:h,xl:h},lN:{xs:h,sm:h,me:h,la:h,xl:h}},width:{l1:{xs:p,sm:p,me:p,la:p,xl:p},lN:{xs:p,sm:p,me:p,la:p,xl:p}},height:{l1:{xs:q,sm:q,me:q,la:q,xl:q},lN:{xs:q,sm:q,me:q,la:q,xl:q}}},"function"==typeof pc.O.fnProcessData&&pc.O.fnProcessData(o,"api",null),"image"==k&&(o.imageNumber=d,d++,d>=pc.maxAlbums))return!1}}),pc.I[a].contentIsLoaded=!0,pc.I[a].contentLength=d}function G(a,b,c,d){if($(a),pc.I[a].contentIsLoaded)return void S(a,d);var e="",f="album";0==pc.I[a].GetID()?e=pc.flickr.url()+"?&method=flickr.photosets.getList&api_key="+pc.flickr.ApiKey+"&user_id="+pc.O.userID+"&per_page=500&primary_photo_extras=url_o,url_sq,url_t,url_q,url_s,url_m,url_l,url_z,url_b,url_h,url_k&format=json&jsoncallback=?":(e="none"==pc.I[a].GetID()?pc.flickr.url()+"?&method=flickr.people.getPublicPhotos&api_key="+pc.flickr.ApiKey+"&user_id="+pc.O.userID+"&extras=description,views,url_o,url_sq,url_t,url_q,url_s,url_m,url_z,url_b,url_h,url_k&per_page=500&format=json&jsoncallback=?":pc.flickr.url()+"?&method=flickr.photosets.getPhotos&api_key="+pc.flickr.ApiKey+"&photoset_id="+pc.I[a].GetID()+"&extras=description,views,url_o,url_sq,url_t,url_q,url_s,url_m,url_l,url_z,url_b,url_h,url_k&format=json&jsoncallback=?",f="image"),_(),jQuery.ajaxSetup({cache:!1}),jQuery.support.cors=!0;var g=setTimeout(function(){ab(),ic("Could not retrieve Flickr data...")},6e4);jQuery.getJSON(e,function(e){if(clearTimeout(g),ab(),"album"==f?H(a,e):K(a,e),b||""!=pc.O.openOnStart)v(!1)||S(a,d);else if(-1!=c){for(var h=-1,i=pc.I.length,j=0;i>j;j++)if("image"==pc.I[j].kind&&pc.I[j].GetID()==c){h=j;break}Lb(h,!0)}else S(a,d)}).fail(function(a,b,c){clearTimeout(g),ab();var d=b+", "+c;ic("Could not retrieve Flickr photoset list (jQuery): "+d)})}function H(a,b){var c=!0;if(void 0!==b.stat&&"fail"===b.stat&&(ic("Could not retrieve Flickr photoset list: "+b.message+" (code: "+b.code+")."),c=!1),c){var d=0,e=b.photosets.photoset;switch(pc.O.albumSorting){case"random":e=oc(e);break;case"reversed":e=e.reverse();break;case"titleAsc":e.sort(function(a,b){var c=a.title._content.toUpperCase(),d=b.title._content.toUpperCase();return d>c?-1:c>d?1:0});break;case"titleDesc":e.sort(function(a,b){var c=a.title._content.toUpperCase(),d=b.title._content.toUpperCase();return c>d?-1:d>c?1:0})}jQuery.each(e,function(b,c){if(itemTitle=c.title._content,R(itemTitle,c.id)){itemID=c.id,itemDescription="",void 0!=c.description._content&&(itemDescription=c.description._content);var e={};for(var f in c.primary_photo_extras)e[f]=c.primary_photo_extras[f];tags="",void 0!==c.primary_photo_extras&&void 0!==c.primary_photo_extras.tags&&(tags=c.primary_photo_extras.tags);var g=P(itemTitle,"","",itemDescription,"","album",tags,itemID,pc.I[a].GetID());g.contentLength=c.photos,g.thumbSizes=e;var h={url:{l1:{xs:"",sm:"",me:"",la:"",xl:""},lN:{xs:"",sm:"",me:"",la:"",xl:""}},width:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}},height:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}}};if(h=I(h,c.primary_photo_extras,"l1"),h=I(h,c.primary_photo_extras,"lN"),g.thumbs=h,d++,d>=pc.maxAlbums)return!1}}),pc.I[a].contentIsLoaded=!0,pc.I[a].contentLength=d}}function I(a,b,c){for(var d=["xs","sm","me","la","xl"],e=0;epc.tn.settings.height[c][d[e]]&&(f="width_",g=Math.ceil(pc.tn.settings.width[c][d[e]]*pc.tn.scale));var h=J(f,g,b);a.url[c][d[e]]=h.url,a.width[c][d[e]]=h.width,a.height[c][d[e]]=h.height}return a}function J(a,b,c){for(var d={url:"",width:0,height:0},e=0,f=0;f=b))break}var h=pc.flickr.photoAvailableSizesStr[e];return d.url=c["url_"+h],d.width=parseInt(c["width_"+h]),d.height=parseInt(c["height_"+h]),d}function K(a,b){var c="";switch(c="none"==pc.I[a].GetID()?b.photos.photo:b.photoset.photo,pc.O.photoSorting){case"random":c=oc(c);break;case"reversed":c=c.reverse();break;case"titleAsc":c.sort(function(a,b){var c="",d="";return""!=pc.O.thumbnailLabel.get("title")?(c=z(a.url_sq),d=z(b.url_sq)):(c=a.title.toUpperCase(),d=b.title.toUpperCase()),d>c?-1:c>d?1:0});break;case"titleDesc":c.sort(function(a,b){var c="",d="";return""!=pc.O.thumbnailLabel.get("title")?(c=z(a.url_sq),d=z(b.url_sq)):(c=a.title.toUpperCase(),d=b.title.toUpperCase()),c>d?-1:d>c?1:0})}var d=pc.I[a].GetID(),e=0;jQuery.each(c,function(a,b){for(var c=b.title,f=b.id,g=b.description._content,h=b.url_sq,a=pc.flickr.photoSize;a>=0;a--)if(void 0!=b["url_"+pc.flickr.photoAvailableSizesStr[a]]){h=b["url_"+pc.flickr.photoAvailableSizesStr[a]];break}var i={};for(var j in b)(0==j.indexOf("height_")||0==j.indexOf("width_")||0==j.indexOf("url_"))&&(i[j]=b[j]);""!=pc.O.thumbnailLabel.get("title")&&(c=z(h));var k=P(c,"",h,g,"","image","",f,d);k.imageNumber=e,void 0!==b.url_o?(k.width=b.width_o,k.height=b.height_o):(k.width=b.width_z,k.height=b.height_z);var l={url:{l1:{xs:"",sm:"",me:"",la:"",xl:""},lN:{xs:"",sm:"",me:"",la:"",xl:""}},width:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}},height:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}}};return l=I(l,b,"l1"),l=I(l,b,"lN"),k.thumbs=l,e++,e>=pc.maxPhotos?!1:void 0}),pc.I[a].contentIsLoaded=!0,pc.I[a].contentLength=e}function L(a,b,c,d,e){var f=Math.ceil(c*pc.tn.scale)+e;return"auto"==b?f=Math.ceil(c*pc.tn.scale)+e:"auto"==c?f=Math.ceil(b*pc.tn.scale)+d:b>c&&(f=Math.ceil(b*pc.tn.scale)+d),a.length>0&&(a+=","),a+=f}function M(a,b,c,d){if($(a),pc.I[a].contentIsLoaded)return void S(a,d);var e="",f="album",g="";if(g=L(g,pc.tn.settings.width.l1.xs,pc.tn.settings.height.l1.xs,pc.tn.settings.width.l1.xsc,pc.tn.settings.height.l1.xsc),g=L(g,pc.tn.settings.width.l1.sm,pc.tn.settings.height.l1.sm,pc.tn.settings.width.l1.smc,pc.tn.settings.height.l1.smc),g=L(g,pc.tn.settings.width.l1.me,pc.tn.settings.height.l1.me,pc.tn.settings.width.l1.mec,pc.tn.settings.height.l1.mec),g=L(g,pc.tn.settings.width.l1.la,pc.tn.settings.height.l1.la,pc.tn.settings.width.l1.lac,pc.tn.settings.height.l1.lac),g=L(g,pc.tn.settings.width.l1.xl,pc.tn.settings.height.l1.xl,pc.tn.settings.width.l1.xlc,pc.tn.settings.height.l1.xlc),g=L(g,pc.tn.settings.width.lN.xs,pc.tn.settings.height.lN.xs,pc.tn.settings.width.lN.xsc,pc.tn.settings.height.lN.xsc),g=L(g,pc.tn.settings.width.lN.sm,pc.tn.settings.height.lN.sm,pc.tn.settings.width.lN.smc,pc.tn.settings.height.lN.smc),g=L(g,pc.tn.settings.width.lN.me,pc.tn.settings.height.lN.me,pc.tn.settings.width.lN.mec,pc.tn.settings.height.lN.mec),g=L(g,pc.tn.settings.width.lN.la,pc.tn.settings.height.lN.la,pc.tn.settings.width.lN.lac,pc.tn.settings.height.lN.lac),g=L(g,pc.tn.settings.width.lN.xl,pc.tn.settings.height.lN.xl,pc.tn.settings.width.lN.xlc,pc.tn.settings.height.lN.xlc),0==pc.I[a].GetID())e=pc.picasa.url()+"user/"+pc.O.userID+"?alt=json&kind=album&thumbsize="+g+"&rnd="+(new Date).getTime();else{var h="";"undefined"!=typeof pc.I[a].customData.authkey&&(h=pc.I[a].customData.authkey),e=pc.picasa.url()+"user/"+pc.O.userID+"/albumid/"+pc.I[a].GetID()+"?alt=json&kind=photo"+h+"&thumbsize="+g+"&imgmax=d",f="image"}_(),jQuery.ajaxSetup({cache:!1}),jQuery.support.cors=!0;var i=setTimeout(function(){ab(),ic("Could not retrieve Picasa/Google+ data...")},6e4),j=function(e){if(clearTimeout(i),ab(),N(a,e,f),b||""!=pc.O.openOnStart)v(!1)||S(a,d);else if(-1!=c){for(var g=-1,h=pc.I.length,j=0;h>j;j++)if("image"==pc.I[j].kind&&pc.I[j].GetID()==c){g=j;break}Lb(g,!0)}else S(a,d)},k=null,l=function(a,b){jQuery.getJSON(a+"&start-index="+b,"callback=?",function(b){null===k?k=b:k.feed.entry=k.feed.entry.concat(b.feed.entry),b.feed.openSearch$startIndex.$t+b.feed.openSearch$itemsPerPage.$t>=b.feed.openSearch$totalResults.$t?j(k):l(a,b.feed.openSearch$startIndex.$t+b.feed.openSearch$itemsPerPage.$t)}).fail(function(b,c,d){clearTimeout(i),ab();var e="";for(var f in b)e+=f+"="+b[f]+"
";var g=c+", "+d+" "+e+"

URL:"+a;ic("Could not retrieve Picasa/Google+ data. Error: "+g)})};l(e,1)}function N(a,b,c){var d=0,e=pc.I[a].GetID(),f=b.feed.entry,g=pc.O.albumSorting;switch("image"==c&&(g=pc.O.photoSorting),g){case"random":f=oc(f);break;case"reversed":f=f.reverse();break;case"titleAsc":f.sort(function(a,b){var d="",e="";return"image"==c?""!=pc.O.thumbnailLabel.get("title")?(d=z(unescape(unescape(unescape(unescape(a.media$group.media$content[0].url))))),e=z(unescape(unescape(unescape(unescape(b.media$group.media$content[0].url)))))):(d=a.media$group.media$description.$t.toUpperCase(),e=b.media$group.media$description.$t.toUpperCase()):(d=a.media$group.media$title.$t.toUpperCase(),e=b.media$group.media$title.$t.toUpperCase()),e>d?-1:d>e?1:0});break;case"titleDesc":f.sort(function(a,b){var d="",e="";return"image"==c?""!=pc.O.thumbnailLabel.get("title")?(d=z(unescape(unescape(unescape(unescape(a.media$group.media$content[0].url))))),e=z(unescape(unescape(unescape(unescape(b.media$group.media$content[0].url)))))):(d=a.media$group.media$description.$t.toUpperCase(),e=b.media$group.media$description.$t.toUpperCase()):(d=a.media$group.media$title.$t.toUpperCase(),e=b.media$group.media$title.$t.toUpperCase()),d>e?-1:e>d?1:0})}jQuery.each(f,function(a,b){var f=b.media$group.media$title.$t,g=b.media$group.media$thumbnail[0].url,h=b.gphoto$id.$t,i="",j=b.media$group.media$description.$t;"image"==c&&(i=f,f=j,j="");var k=b.media$group.media$content[0].url;"image"==c&&""!=pc.O.thumbnailLabel.get("title")&&(f=z(unescape(unescape(unescape(unescape(k))))));var l=!0;"album"==c&&(R(f,h)||(l=!1));var m="";if(l){var n="",o="";if("album"==c)o=h;else{o=k;var p=k.substring(0,k.lastIndexOf("/"));p=p.substring(0,p.lastIndexOf("/"))+"/",o=window.screen.width>window.screen.height?p+"w"+window.screen.width+"/"+i:p+"h"+window.screen.height+"/"+i}var q=P(f,g,o,j,"",c,m,h,e);q.picasaThumbBaseURL=n,q.imageNumber=d,"album"==c&&(q.author=b.author[0].name.$t,q.contentLength=b.gphoto$numphotos.$t);var r={url:{l1:{xs:"",sm:"",me:"",la:"",xl:""},lN:{xs:"",sm:"",me:"",la:"",xl:""}},width:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}},height:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}}};if(r=O("l1",0,r,b,c),r=O("lN",5,r,b,c),q.thumbs=r,"function"==typeof pc.O.fnProcessData&&pc.O.fnProcessData(q,"picasa",b),d++,d>=("album"==c?pc.maxAlbums:pc.maxPhotos))return!1}}),pc.I[a].contentIsLoaded=!0,pc.I[a].contentLength=d}function O(a,b,c,d,e){for(var f=["xs","sm","me","la","xl"],g=0;gc;c++)if(pc.I[c].GetID()==a)return pc.I[c];return null}function R(a,b){var c=a.toUpperCase();if(b=b.toUpperCase(),null===pc.albumList){var d=!1;if(null!==pc.whiteList){for(var e=0;ed;d++)if(pc.I[d].albumID==pc.I[a].GetID()){Lb(d);break}}else if(pc.containerViewerDisplayed&&cc(!1),a!=pc.lastOpenAlbumID){if(pc.O.locationHash&&b){var e="nanogallery/"+pc.baseEltID+"/"+pc.I[a].GetID();pc.lastLocationHash="#"+e;try{top.location.hash=e}catch(f){pc.O.locationHash=!1}}pc.lastOpenAlbumID=pc.I[a].GetID(),$(a);var g=0;pc.I[a].paginationLastPage>0&&pc.I[a].paginationLastWidth==pc.$E.conTnParent.width()&&(g=pc.I[a].paginationLastPage),qb(a,g)}}function U(){var a=W(pc.curAlbumIdx),b=a>0;bb(a,!1,-1,b)}function V(){var a=X(pc.curAlbumIdx),b=a>0;bb(a,!1,-1,b)}function W(a){for(var b=pc.I.length,c=-1,d=a+1;b>d;d++)if(pc.I[d].albumID==pc.I[a].albumID&&"album"==pc.I[d].kind){c=d;break}if(-1==c)for(var d=0;a>=d;d++)if(pc.I[d].albumID==pc.I[a].albumID&&"album"==pc.I[d].kind){c=d;break}return c}function X(a){for(var b=(pc.I.length,-1),c=a-1;c>=0;c--)if(pc.I[c].albumID==pc.I[a].albumID&&"album"==pc.I[c].kind){b=c;break}if(-1==b)for(var c=pc.I.length-1;c>=a;c--)if(pc.I[c].albumID==pc.I[a].albumID&&"album"==pc.I[c].kind){b=c;break}return b}function Y(a){var b="folder";0==a&&(b="folderHome");var c=jQuery('
'+pc.I[a].title+"
").appendTo(pc.$E.conBC);jQuery(c).data("albumIdx",a),c.click(function(){var a=jQuery(this).data("albumIdx");jQuery(this).nextAll().remove(),bb(a,!1,-1,!0)})}function Z(a){var b=jQuery('
').appendTo(pc.$E.conBC);jQuery(b).data("albumIdx",a),b.click(function(){var a=jQuery(this).data("albumIdx");jQuery(this).nextAll().remove(),jQuery(this).remove(),bb(a,!1,-1,!0)})}function $(a){var c=!1;if(1==pc.O.displayBreadcrumb&&!pc.O.thumbnailAlbumDisplayImage){if(0==pc.$E.conBC.children().length&&pc.$E.conNavBCon.css({opacity:0,"max-height":"0px"}),c=!0,pc.$E.conBC.children().remove(),Y(0),0!=a){var d=pc.I.length,e=[];e.push(a);for(var f=a;0!=pc.I[f].albumID&&-1!=pc.I[f].albumID;)for(i=1;i=0;i--)Y(e[i]),i>0&&Z(e[i-1])}var g=pc.$E.conBC.children(),h=g.length;if(0==h)pc.curNavLevel="l1",pc.O.breadcrumbAutoHideTopLevel&&(pc.$E.conNavBCon.css({opacity:0,"max-height":"0px"}),c=!1);else if(pc.curNavLevel=1==h?"l1":"lN",1==h&&pc.O.breadcrumbAutoHideTopLevel){var j=new b;j.tween({from:{opacity:pc.$E.conNavBCon.css("opacity"),"max-height":pc.$E.conNavBCon.css("max-height")},to:{opacity:"0","max-height":"0px"},attachment:{$e:pc.$E.conNavBCon},duration:200,step:function(a,b){b.$e.css(a)},finish:function(a,b){b.$e.css({opacity:"0","max-height":"0px"})}})}else if(pc.O.breadcrumbAutoHideTopLevel){var j=new b;j.tween({from:{opacity:pc.$E.conNavBCon.css("opacity"),"max-height":pc.$E.conNavBCon.css("max-height")},to:{opacity:"1","max-height":"50px"},attachment:{$e:pc.$E.conNavBCon},duration:200,step:function(a,b){b.$e.css(a)},finish:function(a,b){b.$e.css({opacity:"1","max-height":"50px"})}})}else pc.$E.conNavBCon.css({opacity:1,"max-height":"50px"});pc.pgMaxNbThumbnailsPerRow=fb()}pc.O.useTags&&(c=!0,null==pc.containerTags&&(pc.containerTags=jQuery('
').appendTo(pc.$E.conNavB))),pc.O.galleryFullpageButton&&(c=!0),!pc.containerNavigationbarContDisplayed&&c&&(pc.containerNavigationbarContDisplayed=!0,pc.$E.conNavBCon.show())}function _(){pc.$E.conLoadingB.addClass("nanoGalleryLBar").removeClass("nanoGalleryLBarOff")}function ab(){pc.$E.conLoadingB.removeClass("nanoGalleryLBar").addClass("nanoGalleryLBarOff")}function bb(a,b,c,d){if(pc.O.itemsSelectable&&pc.O.keepSelection===!1){pc.selectedItems=[];for(var e=pc.I.length,f=0;e>f;f++)pc.I[f].selected=!1}switch(pc.O.kind){case"":S(a,d);break;case"flickr":G(a,b,c,d);break;case"json":D(a,b,c,d);break;case"picasa":default:M(a,b,c,d)}}function cb(){"auto"==pc.tn.settings.getH()?db():"auto"==pc.tn.settings.getW()?eb():gb(),kb(),jb(0)}function db(){var a=pc.$E.conTnParent.width(),b=0,c=0,d=0,e=[],f=fb(),g=0,h=pc.O.thumbnailGutterHeight,j=pc.tn.outerWidth.get(),k=pc.$E.conTn.find(".nanoGalleryThumbnailContainer");"justified"==pc.O.thumbnailAlignment?(f=Math.min(f,k.length),g=1==f?0:(a-f*j)/(f-1)):g=pc.O.thumbnailGutterWidth;var l=0;k.each(function(){var a=jQuery(this),i=a.data("index");if(void 0!==i){var j=0;if(0!=c)return!1;j=b*(pc.tn.outerWidth.get()+g),e[b]=pc.I[i].thumbFullHeight+h,b++,l++,b>=f&&(b=0,c++),d++}});var m=e.length*(j+g)-g;c=0,b=0,k.each(function(){var a=jQuery(this),j=a.data("index");if(void 0!==j){"onBottom"==pc.O.thumbnailLabel.get("position")&&yb(a,pc.I[j]);var k=0,l=0;if(0==c)k=b*(pc.tn.outerWidth.get()+g),e[b]=pc.I[j].thumbFullHeight+h,b++,b>=f&&(b=0,c++);else{var n=0,o=e[0];for(i=1;i0&&pc.I[c].thumbImg().height>0))return!1;var d=pc.I[c],j=Math.floor(d.thumbImg().width/d.thumbImg().height*pc.tn.settings.getH())+pc.tn.borderWidth+pc.tn.imgcBorderWidth;if(pc.O.thumbnailFeatured&&0==i&&(j=2*j,k=j),h&&(h=!1,f++,b=0,q=!1,r=!1,1==f&&k>0&&(b=k,k=0)),d.thumbImg().height>d.thumbImg().width?q=!0:r=!0,a>b+j+m){b+=j+m,g[f]=pc.tn.settings.getH();var l=Math.max(q?o:0,r?p:0);pc.O.thumbnailAdjustLastRowHeight&&l>0&&(g[f]=Math.min(g[f],l)),e[f]=c}else{b+=j;var n=Math.floor(pc.tn.settings.getH()*a/b);g[f]=n,q&&(o=Math.max(o,n)),r&&(p=Math.max(p,n)),e[f]=c,h=!0}i++}}),f=0,d=0,c=0,i=0,s.each(function(){var b=jQuery(this),h=b.data("index");if(void 0!==h&&void 0!=pc.I[h]){if(!(pc.I[h].thumbImg().width>0&&pc.I[h].thumbImg().height>0))return!1;var k=pc.I[h],o=Math.floor(k.thumbImg().width/k.thumbImg().height*g[f]);0==i&&pc.O.thumbnailFeatured&&(o=2*o,j=1==g.length?2*parseInt(g[0]):parseInt(g[0])+parseInt(g[1])+pc.tn.borderHeight+pc.tn.imgcBorderHeight),h==e[f]&&(e.length!=f+1?o=a-c-pc.tn.borderWidth-pc.tn.imgcBorderWidth:c+o+pc.tn.borderWidth+pc.tn.imgcBorderWidth+m>a&&(o=a-c-pc.tn.borderWidth-pc.tn.imgcBorderWidth));var p=0;0==i&&pc.O.thumbnailFeatured||(p=g[f]),p=parseInt(p),o=parseInt(o),b.width(o+pc.tn.imgcBorderWidth).height(p+pc.tn.imgcBorderHeight+pc.tn.labelHeight.get()),k.$getElt(".imgContainer").height(p).width(o),b.find("img").css({"max-height":p+2,"max-width":o+2}),b.find(".subcontainer").width(o+pc.tn.imgcBorderWidth).height(p+pc.tn.imgcBorderHeight+pc.tn.labelHeight.get());var q=c;pc.O.RTL&&(q=a-c-(o+pc.tn.borderWidth+pc.tn.imgcBorderWidth)),b.css({top:d,left:q}),k.thumbFullWidth=o+pc.tn.borderWidth+pc.tn.imgcBorderWidth,k.thumbFullHeight=p+pc.tn.borderHeight+pc.tn.imgcBorderHeight+pc.tn.labelHeight.get(),Cb(b),hb(b,k,i),c+=o+pc.tn.borderWidth+pc.tn.imgcBorderWidth+m,h==e[f]&&(d+=g[f]+pc.tn.labelHeight.get()+n+pc.tn.imgcBorderHeight+pc.tn.borderHeight,f++,c=0,1==f&&l>0&&(c=l,l=0)),i++ }}),f>0&&(d-=n),j=j+pc.tn.outerHeight.get()+pc.tn.labelHeight.get(),pc.$E.conTn.width(a).height(d>j?d:j)}function fb(){var a=pc.tn.settings.getW()+pc.tn.borderWidth+pc.tn.imgcBorderWidth,b=pc.$E.conTnParent.width(),c=0;return c=Math.floor("justified"==pc.O.thumbnailAlignment?b/a:(b+pc.O.thumbnailGutterWidth)/(a+pc.O.thumbnailGutterWidth)),pc.O.maxItemsPerLine>0&&c>pc.O.maxItemsPerLine&&(c=pc.O.maxItemsPerLine),1>c&&(c=1),c}function gb(){var a=0,b=0,c=0,d=pc.O.thumbnailGutterHeight,e=pc.$E.conTnParent.width(),f=fb(),g=0,h=0,i=0,j=[],k=0;pc.L.nbMaxTnPerRow=fb();var l=new Date;if(pc.pgMaxLinesPerPage>0&&pc.tn.outerWidth.get()>0&&f!=pc.pgMaxNbThumbnailsPerRow){pc.pgMaxNbThumbnailsPerRow=f;var m=pc.$E.conPagin.data("galleryIdx");return void qb(m,0)}var n=pc.$E.conTn.find(".nanoGalleryThumbnailContainer"),o=n.length;"justified"==pc.O.thumbnailAlignment?(f=Math.min(f,o),c=1==f?0:(e-f*pc.tn.outerWidth.get())/(f-1)):c=pc.O.thumbnailGutterWidth,pc.O.RTL&&(n.each(function(){var e=jQuery(this),g=e.data("index");if(void 0!==g){if(0!=b)return!1;a=k*(pc.tn.outerWidth.get()+c),j[k]=a,i=a,k++,k>=f&&(k=0,b+=pc.tn.outerHeight.get()+d)}}),e=i+pc.tn.outerWidth.get(),b=0,k=0);var p=[],q=0;n.each(function(){var l=jQuery(this),m=l.data("index");if(void 0!==m){q=m,0==b?(a=k*(pc.tn.outerWidth.get()+c),j[k]=a,i=a):(a=j[k],h=b);var n=a;pc.O.RTL&&(n=parseInt(e)-a-pc.tn.outerWidth.get()),p.push({$e:l,t:b,l:n,item:pc.I[m]}),k++,k>=f&&(k=0,b+=pc.tn.outerHeight.get()+d),g++}});for(var r=p.length,h=0,s=0;r>s;s++)p[s].$e.css({top:p[s].t,left:p[s].l}),hb(p[s].$e,p[s].item,s),h=p[s].t;p=[],pc.$E.conTn.width(i+pc.tn.outerWidth.get()).height(h+pc.tn.outerHeight.get()),pc.O.debugMode&&console.log("ResizeGalleryGrid: "+(new Date-l))}function hb(a,b,c){a.hasClass("nanogalleryHideElement")&&(a.removeClass("nanogalleryHideElement"),pc.O.thumbnailDisplayTransition?"function"==typeof pc.O.fnThumbnailDisplayEffect?pc.O.fnThumbnailDisplayEffect(a,b,0):setTimeout(function(){window.requestAnimationFrame(function(){ib(a)})},c*pc.tn.displayInterval):a.css({opacity:1}))}function ib(a){var c=new b;c.tween({from:{o:0},to:{o:1},duration:200,step:function(b){a.css({opacity:b.o})},finish:function(b){a.css({opacity:b.o})}})}function jb(){if(pc.O.galleryToolbarWidthAligned&&void 0!==pc.$E.conNavBCon){var a=pc.$E.conTn.outerWidth(!0);pc.$E.conNavBCon.width(pc.$E.conNavBCon.width()0){var f=jQuery('
'+(pc.O.paginationDots?"":pc.i18nTranslations.paginationPrevious)+"
").appendTo(pc.$E.conPagin);e+=jQuery(f).outerWidth(!0),f.click(function(){ob()})}var g=0;pc.pgMaxLinesPerPage>0&&"auto"!=pc.tn.settings.getH()&&"auto"!=pc.tn.settings.getW()&&(d=Math.ceil(pc.I[b].contentLength/(pc.pgMaxLinesPerPage*pc.pgMaxNbThumbnailsPerRow)));var h=d;if(!pc.O.paginationDots){var i=pc.O.paginationVisiblePages;i>=d?g=0:(mb(i)?(g=c-(i-1)/2,h=c+(i-1)/2):(g=c-i/2,h=c+Math.max(i/2-1,1)),h>=d&&(g=d-i),0>g&&(g=0))}if(1==d)return void pc.$E.conPagin.hide();for(var j=g;d>j;j++){var k="";j==c&&(k=" currentPage");var l=jQuery('
'+(pc.O.paginationDots?"":j+1)+"
").appendTo(pc.$E.conPagin);if(l.data("pageNumber",j),e+=l.outerWidth(!0),l.click(function(){var b=pc.$E.conPagin.data("galleryIdx"),c=jQuery(this).data("pageNumber");mc(pc.$E.base,0)||a("html, body").animate({scrollTop:pc.$E.base.offset().top},200),qb(b,c)}),j-g>=i-1)break}if(!pc.O.paginationDots&&d>c+1){var m=jQuery('
'+(pc.O.paginationDots?"":pc.i18nTranslations.paginationNext)+"
").appendTo(pc.$E.conPagin);e+=m.outerWidth(!0),m.click(function(){nb()})}pc.$E.conPagin.width(e)}}function mb(a){return a%2==1}function nb(){var b=pc.$E.conPagin.data("galleryIdx"),c=0;pc.pgMaxLinesPerPage>0&&(c=pc.I[b].contentLength/(pc.pgMaxLinesPerPage*pc.pgMaxNbThumbnailsPerRow)),n2=Math.ceil(c);var d=pc.$E.conPagin.data("currentPageNumber");d0&&(c=pc.I[b].contentLength/(pc.pgMaxLinesPerPage*pc.pgMaxNbThumbnailsPerRow)),n2=Math.ceil(c);var d=pc.$E.conPagin.data("currentPageNumber");d>0?d--:d=n2-1,mc(pc.$E.base,0)||a("html, body").animate({scrollTop:pc.$E.base.offset().top},250),qb(b,d)}function pb(a){var b=pc.I.length,c=0,d=a||pc.GetCurrentViewedItemIdx();if(-1!==d){for(var e=0;b>e;e++)pc.I[e].albumID==pc.I[d].albumID&&"image"==pc.I[e].kind&&c++;return c}return 0}function qb(a,c){pc.curAlbumIdx=-1,void 0==pc.$E.conPagin&&pc.$E.conPagin.children().remove();var d=pc.$E.conTn.parent(),e=new b;e.tween({to:{opacity:0},from:{opacity:1},attachment:{$e:d},duration:150,step:function(a,b){b.$e.css(a)},finish:function(b,d){d.$e.css({opacity:0}),pc.containerThumbnailsDisplayed=!1,pc.$E.conTn.hide(0).off().show(0).html("");for(var e=pc.I.length,f=0;e>f;f++)pc.I[f].$Elts=[],pc.I[f].$elt=null,pc.I[f].hoverInitDone=!1,pc.I[f].hovered=!1;pc.$E.conTnParent.css({left:0,opacity:1}),l(pc.$E.conTn[0],0),rb(a,c,sb)}})}function rb(a,b,c){if(pc.O.debugMode&&console.timeline&&console.timeline("nanoGALLERY"),pc.startDateTime=new Date,-1!=a&&void 0!=pc.I[a]){pc.I[a].paginationLastPage=b,pc.I[a].paginationLastWidth=pc.$E.conTnParent.width();var d=pc.I.length,e=!1;pc.galleryItemsCount=0;var f=0,g=0,h=0;pc.pgMaxLinesPerPage>0&&"auto"!=pc.tn.settings.getH()&&"auto"!=pc.tn.settings.getW()&&(g=b*pc.pgMaxLinesPerPage*pc.pgMaxNbThumbnailsPerRow,h=g+pc.pgMaxLinesPerPage*pc.pgMaxNbThumbnailsPerRow),ab();var i=!1,j=!1,k=0;!function(){pc.toRender=[];for(var h=0;h=d)return void c(a,b);var l=pc.I[k];if(l.albumID==pc.I[a].GetID()){if(f++,pc.pgMaxLinesPerPage>0&&"auto"!=pc.tn.settings.getH()&&"auto"!=pc.tn.settings.getW()&&pc.galleryItemsCount+1>pc.pgMaxLinesPerPage*pc.pgMaxNbThumbnailsPerRow)return void c(a,b);if(f>g){pc.galleryItemsCount++;var m=tb(l,k,e),n=m.e$;pc.O.thumbnailLazyLoad&&!m.cIS&&(i||(lc(n,pc.tn.lazyLoadTreshold)?(l.$getElt("img").attr("src",""),l.$getElt("img").attr("src",l.thumbImg().src),j=!0):j&&(i=!0)))}}k++}var o=pc.toRender.length;if(o>0)for(var h=0;o>h;h++);d>k?setTimeout(arguments.callee,2):c(a,b)}()}}function sb(a,b){cb(),lb(a,b),pc.containerThumbnailsDisplayed=!0,pc.curAlbumIdx=a,"function"==typeof pc.O.fnInitGallery&&pc.O.fnInitGallery(a,b),pc.O.debugMode&&console.timeline&&(console.log("End-render: "+(new Date-pc.startDateTime)),console.timelineEnd("nanoGALLERY")),pc.SetSelectMode()}function tb(a,b,c){var d=[],f=0;a.$Elts=[];var g="",h=" nanogalleryHideElement";pc.O.thumbnailLazyLoad&&"auto"==pc.tn.settings.getW()&&(g="top:0px;left:0px;"),d[f++]='
';var i=!1,j=pc.emptyGif;("auto"==pc.tn.settings.getH()&&0==pc.I[b].thumbImg().height||"auto"==pc.tn.settings.getW()&&0==pc.I[b].thumbImg().width)&&(i=!0),(!pc.O.thumbnailLazyLoad||i)&&(j=a.thumbImg().src);var k=ub(a),l=vb(a);if(d[f++]="auto"==pc.tn.settings.getH()?'
'+k+'
':"auto"==pc.tn.settings.getW()?'
'+k+'
':'
'+k+'
',"album"==a.kind){if(1==pc.O.thumbnailLabel.get("display")){if(a.contentLength>0)switch(pc.O.thumbnailLabel.get("itemsCount")){case"title":k+=" "+pc.i18nTranslations.thumbnailLabelItemsCountPart1+''+a.contentLength+""+pc.i18nTranslations.thumbnailLabelItemsCountPart2;break;case"description":l+=" "+pc.i18nTranslations.thumbnailLabelItemsCountPart1+''+a.contentLength+""+pc.i18nTranslations.thumbnailLabelItemsCountPart2}d[f++]='
'+k+'
'+l+"
"}}else 1==pc.O.thumbnailLabel.get("display")&&(c&&0==l.length&&"onBottom"==pc.O.thumbnailLabel.get("position")&&(l=" "),d[f++]='
'+k+'
'+l+"
");if(d[f++]="
",pc.O.itemsSelectable){if(a.selected=!1,pc.O.keepSelection===!0)for(it in pc.selectedItems)pc.selectedItems[it].GetID()===a.GetID()&&(a.selected=!0);pc.O.showCheckboxes&&(checked="",a.selected&&(checked="checked"),d[f++]='')}d[f++]="
";var m=jQuery(d.join("")).appendTo(pc.$E.conTnHid);"undefined"!=typeof a.selected&&a.selected===!0&&m.find(".subcontainer").addClass("selected"),a.$elt=m,m.data("index",b),a.$getElt("img").data("index",b),"function"==typeof pc.O.fnThumbnailInit&&pc.O.fnThumbnailInit(m,a,e());var n=m.detach();if(n.appendTo(pc.$E.conTn),i){var o=ngimagesLoaded(m);o.on("always",function(a){var b=pc.I[jQuery(a.images[0].img).data("index")];if(void 0!=b&&a.images[0].img.src!=pc.emptyGif){var c=!1;b.thumbImg().height!=a.images[0].img.naturalHeight&&(b.thumbSetImgHeight(a.images[0].img.naturalHeight),b.thumbSetImgWidth(a.images[0].img.naturalWidth),c=!0),b.thumbImg().width!=a.images[0].img.naturalWidth&&(b.thumbSetImgHeight(a.images[0].img.naturalHeight),b.thumbSetImgWidth(a.images[0].img.naturalWidth),c=!0),c&&(Ab(b.$elt),yb(b.$elt,b),Cb(b.$elt),cb())}})}else Ab(m),yb(m,a),Cb(m);return{e$:m,cIS:i}}function ub(a){var b=a.title;return 1==pc.O.thumbnailLabel.get("display")&&((void 0===b||0==b.length)&&(b=" "),""!=pc.i18nTranslations.thumbnailImageTitle&&(b=pc.i18nTranslations.thumbnailImageTitle),pc.O.thumbnailLabel.get("titleMaxLength")>3&&b.length>pc.O.thumbnailLabel.get("titleMaxLength")&&(b=b.substring(0,pc.O.thumbnailLabel.get("titleMaxLength"))+"...")),b}function vb(a){var b="";return 1==pc.O.thumbnailLabel.get("displayDescription")&&(b="album"==a.kind?""!=pc.i18nTranslations.thumbnailImageDescription?pc.i18nTranslations.thumbnailAlbumDescription:a.description:""!=pc.i18nTranslations.thumbnailImageDescription?pc.i18nTranslations.thumbnailImageDescription:a.description,pc.O.thumbnailLabel.get("descriptionMaxLength")>3&&b.length>pc.O.thumbnailLabel.get("descriptionMaxLength")&&(b=b.substring(0,pc.O.thumbnailLabel.get("descriptionMaxLength"))+"...")),b}function wb(a,b,c){var d=a.$elt,e=d.find("input[type=checkbox]");"image"!==pc.selectMode&&"album"!==pc.selectMode||a.kind===pc.selectMode?(a.selected="undefined"==typeof b?!a.selected:b,c!==!1&&e.prop("checked",a.selected),a.selected?a.$getElt(".subcontainer").addClass("selected"):a.$getElt(".subcontainer").removeClass("selected")):(a.selected=!1,e.prop("checked",!1),a.$getElt(".subcontainer").removeClass("selected")),xb(),"function"==typeof pc.O.fnThumbnailSelection&&pc.O.fnThumbnailSelection(d,a)}function xb(){var a;pc.O.keepSelection===!0&&(a=pc.selectedItems.slice(0)),pc.selectedItems=[];for(var b=pc.I.length,c=0;b>c;c++)pc.I[c].selected===!0&&pc.selectedItems.push(pc.I[c]);if(pc.O.keepSelection===!0){for(c in a){alreadyExists=!1;for(var d=0;b>d;d++)pc.I[d].GetID()===a[c].GetID()&&(alreadyExists=!0);alreadyExists===!1&&pc.selectedItems.push(a[c])}a=[]}pc.selectedItems.length>0||1==pc.selectModeForce?(pc.I.forEach(function(a){null===a.$elt||a.$elt.hasClass("selectable")||(1==pc.selectModeForce&&a.kind===pc.selectMode||1==pc.selectMode)&&a.$elt.addClass("selectable")}),pc.selectMode!==!0&&"image"!==pc.selectMode&&"album"!==pc.selectMode&&(pc.selectMode=!0)):(pc.I.forEach(function(a){null!==a.$elt&&a.$elt.removeClass("selectable")}),pc.selectMode=!1),"function"==typeof pc.O.fnChangeSelectMode&&pc.O.fnChangeSelectMode(pc.selectMode)}function yb(a,b){if("auto"==pc.tn.settings.getH()){if(b.thumbImg().height>0){var c=b.thumbImg().height/b.thumbImg().width;b.$getElt(".imgContainer").height(pc.tn.settings.getW()*c),"onBottom"==pc.O.thumbnailLabel.get("position")?(b.thumbLabelHeight=b.$getElt(".labelImage").outerHeight(!0),b.thumbFullHeight=pc.tn.settings.getW()*c+b.thumbLabelHeight+pc.tn.borderHeight+pc.tn.imgcBorderHeight,a.width(pc.tn.outerWidth.get()-pc.tn.borderWidth).height(b.thumbFullHeight-pc.tn.borderHeight),b.$getElt(".labelImage").css({position:"absolute",top:"",bottom:"0px"})):(b.thumbFullHeight=pc.tn.settings.getW()*c+b.thumbLabelHeight+pc.tn.borderHeight+pc.tn.imgcBorderHeight,a.width(pc.tn.outerWidth.get()-pc.tn.borderWidth).height(b.thumbFullHeight-pc.tn.borderHeight))}b.thumbFullWidth=pc.tn.outerWidth.get(),b.$getElt(".subcontainer").width(pc.tn.outerWidth.get()-pc.tn.borderWidth).height(b.thumbFullHeight-pc.tn.borderHeight)}else if("auto"==pc.tn.settings.getW()){return;var c}else b.thumbFullHeight=pc.tn.outerHeight.get(),b.thumbFullWidth=pc.tn.outerWidth.get(),a.width(b.thumbFullWidth-pc.tn.borderWidth).height("onBottom"==pc.O.thumbnailLabel.get("position")?b.thumbFullHeight-pc.tn.borderHeight:b.thumbFullHeight-pc.tn.borderHeight),b.$getElt(".subcontainer").width(b.thumbFullWidth-pc.tn.borderWidth).height(b.thumbFullHeight-pc.tn.borderHeight)}function zb(){for(var a=pc.I.length,b=0;a>b;b++)pc.I[b].hovered&&Kb(pc.I[b].$elt)}function Ab(a){var b=a.data("index");if(void 0!=b){var c=pc.I[b];for("function"==typeof pc.O.fnThumbnailHoverInit&&pc.O.fnThumbnailHoverInit(a,c,e()),Eb(c),j=0;jp;p++)for(var l=0;b>l;l++){var q="rect("+o*p+"px, "+n*(l+1)+"px, "+o*(p+1)+"px, "+n*l+"px)";g.clone().appendTo(d).css({top:0,scale:1,clip:q,left:0,position:"absolute"}).data("ngScale",1)}g.remove();break;case"imageFlipHorizontal":switch(pc.O.thumbnailLabel.get("position")){case"overImageOnTop":c.$getElt(".labelImage").css({top:-pc.tn.imgcBorderHeight/2,bottom:pc.tn.imgcBorderWidth/2,left:0,right:0});break;case"overImageOnMiddle":c.$getElt(".labelImage").css({top:-pc.tn.imgcBorderHeight/2,bottom:pc.tn.imgcBorderWidth/2,left:0,right:0});break;case"overImageOnBottom":default:c.$getElt(".labelImage").css({bottom:pc.tn.imgcBorderWidth/2,left:0,right:0})}pc.$E.base.hasClass("fullpage")||pc.$E.base.css({overflow:"visible"}),pc.$E.conTn.css({overflow:"visible"}),a.css({overflow:"visible"}),nc("",a),nc(c.$getElt(".labelImage"),c.$getElt(".imgContainer"));var i=c.$getElt(".subcontainer");i.css({overflow:"visible"}),i[0].style[pc.CSStransformStyle]="preserve-3d";var b=Math.round(1.2*c.thumbFullHeight)+"px";i[0].style[pc.CSSperspective]=b,i=c.$getElt(".imgContainer"),i[0].style[pc.CSSbackfaceVisibilityName]="hidden",Db(c,"imgContainer0",i),Gb(c,"imgContainer0"),a.find(".image")[0].style[pc.CSSbackfaceVisibilityName]="hidden",i=c.$getElt(".labelImage"),i[0].style[pc.CSSbackfaceVisibilityName]="hidden",Db(c,"labelImage0",i).rotateX=180,Gb(c,"labelImage0");break;case"imageFlipVertical":switch(pc.O.thumbnailLabel.get("position")){case"overImageOnTop":c.$getElt(".labelImage").css({top:-pc.tn.imgcBorderHeight/2,bottom:pc.tn.imgcBorderWidth/2,left:0,right:0});break;case"overImageOnMiddle":c.$getElt(".labelImage").css({top:-pc.tn.imgcBorderHeight/2,bottom:pc.tn.imgcBorderWidth/2,left:0,right:0});break;case"overImageOnBottom":default:c.$getElt(".labelImage").css({bottom:pc.tn.imgcBorderWidth/2,left:0,right:0})}pc.$E.base.hasClass("fullpage")||pc.$E.base.css({overflow:"visible"}),pc.$E.conTn.css({overflow:"visible"}),a.css({overflow:"visible"}),nc("",a),nc(c.$getElt(".labelImage"),c.$getElt(".imgContainer"));var i=c.$getElt(".subcontainer");i.css({overflow:"visible"}),i[0].style[pc.CSStransformStyle]="preserve-3d";var b=Math.round(1.2*c.thumbFullWidth)+"px";i[0].style[pc.CSSperspective]=b,i=c.$getElt(".imgContainer"),i[0].style[pc.CSSbackfaceVisibilityName]="hidden",Db(c,"imgContainer0",i),Gb(c,"imgContainer0"),a.find(".image")[0].style[pc.CSSbackfaceVisibilityName]="hidden",i=c.$getElt(".labelImage"),i[0].style[pc.CSSbackfaceVisibilityName]="hidden",Db(c,"labelImage0",i).rotateY=180,Gb(c,"labelImage0");break;case"imageScale150":a.css({overflow:"hidden"}),Db(c,"img0",c.$getElt("img")),Gb(c,"img0");break;case"imageScaleIn80":a.css({overflow:"hidden"}),Db(c,"img0",c.$getElt("img")).scale=120,Gb(c,"img0");break;case"imageSlide2Up":case"imageSlide2Down":case"imageSlide2Left":case"imageSlide2Right":case"imageSlide2UpRight":case"imageSlide2UpLeft":case"imageSlide2DownRight":case"imageSlide2DownLeft":a.css({overflow:"hidden"}),c.customData.hoverEffectRDir=pc.tn.getHE()[j].name,Bb(a,c);break;case"imageSlide2Random":a.css({overflow:"hidden"});var r=["imageSlide2Up","imageSlide2Down","imageSlide2Left","imageSlide2Left","imageSlide2UpRight","imageSlide2UpLeft","imageSlide2DownRight","imageSlide2DownLeft"];c.customData.hoverEffectRDir=r[Math.floor(Math.random()*r.length)],Bb(a,c)}c.hoverInitDone=!0}}function Bb(a,b){var c=b.thumbFullWidth,d=b.thumbFullHeight,e=Db(b,"img0",b.$getElt("img"));switch(e.scale=140,b.customData.hoverEffectRDir){case"imageSlide2Up":e.translateY=b.thumbFullHeight<1.4*b.thumbImg().height?(1.4*b.thumbImg().height-b.thumbFullHeight)/2:0,e.translateX=b.thumbFullWidth<1.4*b.thumbImg().width?-(1.4*b.thumbImg().width-b.thumbFullWidth)/2:0;break;case"imageSlide2Down":var f=b.thumbFullHeight<1.4*b.thumbImg().height?Math.min((1.4*b.thumbImg().height-b.thumbFullHeight)/2*.1,.1*d):0;e.translateY=-f;var g=b.thumbFullWidth<1.4*b.thumbImg().width?Math.min((1.4*b.thumbImg().width-b.thumbFullWidth)/2*.1,.1*c):0;e.translateX=g;break;case"imageSlide2Left":e.translateY=.1*-d,e.translateX=.1*c;break;case"imageSlide2Right":e.translateY=.1*-d,e.translateX=.1*-c;break;case"imageSlide2UpRight":e.translateY=.05*d,e.translateX=.05*-c;break;case"imageSlide2UpLeft":e.translateY=.05*d,e.translateX=.05*c;break;case"imageSlide2DownRight":e.translateY=.05*-d,e.translateX=.05*-c;break;case"imageSlide2DownLeft":e.translateY=.05*-d,e.translateX=.05*c}Gb(b,"img0")}function Cb(a){var b=a.data("index");if(void 0!=b){var c=pc.I[b];if(!c.hoverInitDone)return void Ab(a);for("function"==typeof pc.O.fnThumbnailHoverResize&&pc.O.fnThumbnailHoverResize(a,c,e()),j=0;jk;k++)for(var l=0;b>l;l++)var h="rect("+f*k+"px, "+d*(l+1)+"px, "+f*(k+1)+"px, "+d*l+"px)";break;case"imageFlipHorizontal":var m=c.$getElt(".subcontainer"),b=Math.round(1.2*c.thumbFullHeight)+"px";m[0].style[pc.CSSperspective]=b;break;case"imageFlipVertical":var m=c.$getElt(".subcontainer"),b=Math.round(1.2*c.thumbFullWidth)+"px";m[0].style[pc.CSSperspective]=b;break;case"imageSlide2Up":case"imageSlide2Down":case"imageSlide2Left":case"imageSlide2Right":case"imageSlide2UpRight":case"imageSlide2UpLeft":case"imageSlide2DownRight":case"imageSlide2DownLeft":case"imageSlide2Random":Bb(a,c); break;case"slideUp":c.eltTransform.labelImage0.translateY=c.thumbFullHeight,Gb(c,"labelImage0");break;case"slideDown":c.eltTransform.labelImage0.translateY=-c.thumbFullHeight,Gb(c,"labelImage0");break;case"slideRight":c.eltTransform.labelImage0.translateX=-c.thumbFullWidth,Gb(c,"labelImage0");break;case"slideLeft":c.eltTransform.labelImage0.translateX=c.thumbFullWidth,Gb(c,"labelImage0");break;case"labelSlideUpTop":case"labelSlideUp":c.eltTransform.labelImage0.translateY=c.thumbFullHeight,Gb(c,"labelImage0");break;case"labelSlideDown":a.css({overflow:"hidden"}),c.eltTransform.labelImage0.translateY=-c.thumbFullHeight,Gb(c,"labelImage0");break;case"descriptionSlideUp":}}}function Db(a,b,c){return void 0==a.eltTransform[b]&&(a.eltTransform[b]=Fb(),a.eltTransform[b].$elt=c),a.eltTransform[b]}function Eb(a){for(var b in a.eltTransform)delete a.eltTransform[b]}function Fb(){var a={translateX:0,translateY:0,rotateX:0,rotateY:0,rotateZ:0,scale:100};return a}function Gb(a,b){var c=a.eltTransform[b],d="translateX("+c.translateX+"px) translateY("+c.translateY+"px) scale("+c.scale/100+")";d+=pc.IE<=9||pc.isGingerbread?" rotate("+c.rotateZ+"deg)":" rotateX("+c.rotateX+"deg) rotateY("+c.rotateY+"deg) rotateZ("+c.rotateZ+"deg)",void 0!=c.$elt[0]&&(c.$elt[0].style[pc.CSStransformName]=d)}function Hb(a,c,d,e,f){var g=["translateX","translateY","scale","rotateX","rotateY","rotateZ"];if("animate"==pc.aengine)for(var h=0;h0?a.delay(pc.tn.getHE()[c].delay)[pc.aengine](d,pc.tn.getHE()[c].duration,pc.tn.getHE()[c].easing):a[pc.aengine](d,pc.tn.getHE()[c].duration,pc.tn.getHE()[c].easing)}function Ib(a){var b=a.data("index");if(void 0!=b){"velocity"==pc.aengine?a.find("*").velocity("stop",!0):a.find("*").stop(!0,!1);var c=pc.I[b];c.hovered=!0;var d="animate"==pc.aengine?1:100;"function"==typeof pc.O.fnThumbnailHover&&pc.O.fnThumbnailHover(a,c,e());try{for(j=0;jl&&(l=0),Hb(c.$getElt(".labelImage"),j,{translateY:0,height:i+k},c,"labelImage0"),Hb(c.$getElt(".labelDescription"),j,{opacity:"1"},c);break;case"labelOpacity50":Hb(c.$getElt(".labelImage"),j,{opacity:"0.5"},c);break;case"imageOpacity50":Hb(c.$getElt(".imgContainer"),j,{opacity:"0.5"},c);break;case"borderLighter":if("velocity"==pc.aengine){var m=tc(pc.custGlobals.oldBorderColor,.5),n=m.substring(m.indexOf("(")+1,m.lastIndexOf(")")).split(/,\s*/);Hb(a,j,{borderColorRed:n[0],borderColorGreen:n[1],borderColorBlue:n[2],colorAlpha:n[3]},c)}else{var h=a.css("borderTopColor");a.data("ngcache_borderColor",h),Hb(a,j,{borderColor:tc(h,.5)},c)}break;case"borderDarker":if("velocity"==pc.aengine){var m=uc(pc.custGlobals.oldBorderColor,.5),n=m.substring(m.indexOf("(")+1,m.lastIndexOf(")")).split(/,\s*/);Hb(a,j,{borderColorRed:n[0],borderColorGreen:n[1],borderColorBlue:n[2],colorAlpha:n[3]},c)}else{var h=a.css("borderTopColor");a.data("ngcache_borderColor",h),Hb(a,j,{borderColor:uc(h,.5)},c)}break;case"imageScale150":Hb(c.$getElt("img"),j,{scale:150/d},c,"img0");break;case"imageScaleIn80":Hb(c.$getElt("img"),j,{scale:100/d},c,"img0");break;case"imageSlide2Up":case"imageSlide2Down":case"imageSlide2Left":case"imageSlide2Right":case"imageSlide2UpRight":case"imageSlide2UpLeft":case"imageSlide2DownRight":case"imageSlide2DownLeft":case"imageSlide2Random":switch(c.customData.hoverEffectRDir){case"imageSlide2Up":var o=c.thumbFullHeight<1.4*c.imgHeight?(1.4*c.imgHeight-c.thumbFullHeight)/2:0;Hb(c.$getElt("img"),j,{translateY:-o},c,"img0");break;case"imageSlide2Down":var o=c.thumbFullHeight<1.4*c.imgHeight?(1.4*c.imgHeight-c.thumbFullHeight)/2:0;Hb(c.$getElt("img"),j,{translateY:o},c,"img0");break;case"imageSlide2Left":Hb(c.$getElt("img"),j,{translateX:.1*-c.thumbFullWidth},c,"img0");break;case"imageSlide2Right":Hb(c.$getElt("img"),j,{translateX:.1*c.thumbFullWidth},c,"img0");break;case"imageSlide2UpRight":Hb(c.$getElt("img"),j,{translateY:.05*-c.thumbFullHeight,translateX:.05*c.thumbFullWidth},c,"img0");break;case"imageSlide2UpLeft":Hb(c.$getElt("img"),j,{translateY:.05*-c.thumbFullHeight,translateX:.05*-c.thumbFullWidth},c,"img0");break;case"imageSlide2DownRight":Hb(c.$getElt("img"),j,{translateY:.05*c.thumbFullHeight,translateX:.05*c.thumbFullWidth},c,"img0");break;case"imageSlide2DownLeft":Hb(c.$getElt("img"),j,{translateY:.05*c.thumbFullHeight,translateX:.05*-c.thumbFullWidth},c,"img0")}break;case"imageScale150Outside":nc("",a),Hb(c.$getElt("img"),j,{scale:150/d},c,"img0");break;case"scale120":nc("",a),Hb(a,j,{scale:120/d},c,"base");break;case"imageExplode":nc("",a);var p=c.$getElt(".imgContainer");b=Math.sqrt(p.length);for(var q=[],r=0;r<=Math.PI;r+=Math.PI/(b-1))q.push(Math.sin(r));for(var s=p.outerWidth(!0)/b,t=p.outerHeight(!0)/b,r=0,g=0;b>g;g++)for(var h=0;b>h;h++)Hb(p.eq(r++),j,{top:(-t*b/3+t*g-t)*q[h],left:(-s*b/3+s*h-s)*q[g],scale:1.5,opacity:0},c);break;case"imageFlipHorizontal":nc("",a),Hb(c.$getElt(".imgContainer"),j,{rotateX:180},c,"imgContainer0"),Hb(c.$getElt(".labelImage"),j,{rotateX:360},c,"labelImage0");break;case"imageFlipVertical":nc("",a),Hb(c.$getElt(".imgContainer"),j,{rotateY:180},c,"imgContainer0"),Hb(c.$getElt(".labelImage"),j,{rotateY:360},c,"labelImage0");break;case"TEST":}}catch(u){ic("error on hover "+u.message)}}}function Jb(a,c,d,e,f){var g=["translateX","translateY","scale","rotateX","rotateY","rotateZ"];if("animate"==pc.aengine)for(var h=0;h0?a.delay(pc.tn.getHE()[c].delay)[pc.aengine](d,pc.tn.getHE()[c].durationBack,pc.tn.getHE()[c].easingBack):a[pc.aengine](d,pc.tn.getHE()[c].durationBack,pc.tn.getHE()[c].easingBack)}function Kb(a){if(!pc.containerViewerDisplayed){var b=a.data("index");if(void 0!=b){"velocity"==pc.aengine?a.find("*").velocity("stop",!0):a.find("*").filter(":animated").stop(!0,!1);var c=pc.I[b];c.hovered=!1;var d="animate"==pc.aengine?1:100;"function"==typeof pc.O.fnThumbnailHoverOut&&pc.O.fnThumbnailHoverOut(a,c,e());try{for(j=0;jg;g++)for(var h=0;b>h;h++)Jb(n.eq(o++),j,{top:"0",left:"0",scale:"1",opacity:"1"});break;case"imageFlipHorizontal":Jb(c.$getElt(".imgContainer"),j,{rotateX:0},c,"imgContainer0"),Jb(c.$getElt(".labelImage"),j,{rotateX:180},c,"labelImage0");break;case"imageFlipVertical":Jb(c.$getElt(".imgContainer"),j,{rotateY:0},c,"imgContainer0"),Jb(c.$getElt(".labelImage"),j,{rotateY:180},c,"labelImage0");break;case"TEST":}}catch(p){ic("error on hoverOut "+p.message)}}}}function Lb(a){return pc.O.thumbnailOpenImage?"function"==typeof pc.O.fnThumbnailOpen?void ec(a):void("fancybox"==pc.O.viewer?fc(a):pc.containerViewerDisplayed?Zb(a,""):Mb(a)):void 0}function Mb(a){jQuery("body").css({overflow:"hidden"}),pc.containerViewerDisplayed=!0,pc.$E.conVwCon=jQuery('
').appendTo("body"),pc.$E.conVwCon.addClass("nanogallery_theme_"+pc.O.theme),hc(pc.$E.conVwCon),pc.$E.conVw=jQuery('
').appendTo(pc.$E.conVwCon),pc.$E.conVw.css({visibility:"visible",position:"fixed"}),pc.$E.conVw.css({msTouchAction:"none",touchAction:"none"});{var b="";pc.I.length}b+=' ',b+=' ',b+=' ',pc.$E.vwContent=jQuery('
'+b+'
').appendTo(pc.$E.conVw),pc.$E.vwImgP=pc.$E.conVw.find(".image").eq(0),pc.$E.vwImgC=pc.$E.conVw.find(".image").eq(1),pc.$E.vwImgN=pc.$E.conVw.find(".image").eq(2),pc.$E.conVwCon.find("*").attr("draggable","false").attr("unselectable","on");var c=jQuery('
').appendTo(pc.$E.conVw);c.on("touchstart click",function(a){return a.preventDefault(),a.stopPropagation(),(new Date).getTime()-pc.timeImgChanged<400?void 0:(cc(!0),!1)});for(var d='
',f=pc.O.viewerToolbar.standard.split(","),g=0,h=f.length;h>g;g++)d+=Nb(f[g]);for(var i=pc.O.viewerToolbar.minimized.split(","),g=0,j=i.length;j>g;g++)-1==pc.O.viewerToolbar.standard.indexOf(i[g])&&(d+=Nb(i[g]));d+="
",pc.$E.conVwTb=jQuery(d).appendTo(pc.$E.conVw),"min"==pc.toolbarMode||pc.O.viewerToolbar.autoMinimize>0&&pc.O.viewerToolbar.autoMinimize>=kc().w?Ub():Tb(),pc.O.viewerFullscreen&&(pc.viewerIsFullscreen=!0,pc.$E.conVwTb.find(".fullscreenButton").removeClass("setFullscreenButton").addClass("removeFullscreenButton"),ngscreenfull.request()),pc.O.viewerDisplayLogo&&(pc.$E.vwLogo=jQuery('').appendTo(pc.$E.conVw)),nc("",pc.$E.conVw),nc(pc.$E.conVw,c),dc(),pc.timeImgChanged=(new Date).getTime(),pc.$E.conVwTb.find(".closeButton").on("touchstart click",function(a){a.preventDefault(),a.stopPropagation(),(new Date).getTime()-pc.timeImgChanged<400||cc(!0)}),pc.$E.conVwTb.find(".playPauseButton").on("touchstart click",function(a){a.stopPropagation(),Rb()}),pc.$E.conVwTb.find(".minimizeButton").on("touchstart click",function(a){a.stopPropagation(),Sb()}),pc.$E.conVwTb.find(".fullscreenButton").on("touchstart click",function(a){a.stopPropagation(),Qb()}),pc.$E.conVwTb.find(".infoButton").on("touchstart click",function(a){a.stopPropagation(),"function"==typeof pc.O.fnViewerInfo&&pc.O.fnViewerInfo(pc.I[pc.viewerCurrentItemIdx],e())}),pc.$E.conVwTb.find(".ngCustomBtn").on("touchstart click",function(a){if(a.stopPropagation(),"function"==typeof pc.O.fnImgToolbarCustClick){for(var b=a.target||a.srcElement;null==b||null==b.getAttribute("class")||-1==b.getAttribute("class").indexOf("ngCustomBtn");)b=b.parentNode;var c=b.getAttribute("class");if(c.indexOf("ngCustomBtn")>=0)for(var d=c.split(" "),f=0,g=d.length;g>f;f++)0==d[f].indexOf("custom")&&pc.O.fnImgToolbarCustClick(d[f],jQuery(b),pc.I[pc.viewerCurrentItemIdx],e())}}),pc.$E.conVwTb.find(".linkOriginalButton").on("touchstart click",function(a){if(a.stopPropagation(),"picasa"==pc.O.kind){var b="https://plus.google.com/photos/"+pc.O.userID+"/albums/"+pc.I[pc.viewerCurrentItemIdx].albumID+"/"+pc.I[pc.viewerCurrentItemIdx].GetID();window.open(b,"_blank")}if("flickr"==pc.O.kind){var b="https://www.flickr.com/photos/"+pc.O.userID+"/"+pc.I[pc.viewerCurrentItemIdx].GetID();window.open(b,"_blank")}}),pc.$E.conVwTb.find(".nextButton").on("touchstart click",function(a){a.stopPropagation(),Wb()}),pc.$E.conVwTb.find(".previousButton").on("touchstart click",function(a){a.stopPropagation(),Yb()}),pc.$E.vwContent.find(".contentAreaNext").on("touchstart click",function(a){a.stopPropagation(),Wb()}),pc.$E.vwContent.find(".contentAreaPrevious").on("touchstart click",function(a){a.stopPropagation(),Yb()}),pc.$E.vwContent.on("click",function(a){return(new Date).getTime()-pc.timeImgChanged<400?void 0:(a.preventDefault(),a.stopPropagation(),cc(!0),!1)}),pc.$E.conVw.find(".image").attr("draggable","false").attr("unselectable","on").css({"-moz-user-select":"none","-khtml-user-select":"none","-webkit-user-select":"none","-o-user-select":"none","user-select":"none"}),Zb(a,""),null==pc.viewerSwipe&&(pc.viewerSwipe=new Ob(pc.$E.conVwCon[0])),pc.O.slideshowAutoStart&&(pc.playSlideshow=!0,pc.$E.conVwTb.find(".playPauseButton").removeClass("playButton").addClass("pauseButton"),Xb(),pc.playSlideshowTimerID=window.setInterval(function(){Xb()},pc.slideshowDelay))}function Nb(a){var b="",c=a.replace(/^\s+|\s+$/g,"");switch(c){case"minimizeButton":b='
';break;case"previousButton":b='
';break;case"pageCounter":b='
';break;case"nextButton":b='
';break;case"playPauseButton":b='
';break;case"fullscreenButton":pc.supportFullscreenAPI&&(b='
');break;case"infoButton":"function"==typeof pc.O.fnViewerInfo&&(b='
');break;case"linkOriginalButton":("flickr"==pc.O.kind||"picasa"==pc.O.kind)&&(b='
');break;case"closeButton":b='
';break;case"label":b='
';break;default:0==c.indexOf("custom")&&(b='
'+("function"==typeof pc.O.fnImgToolbarCustInit?pc.O.fnImgToolbarCustInit(c):"")+"
")}return b}function Ob(a){function b(a){pc.containerViewerDisplayed&&(pc.timeLastTouchStart=(new Date).getTime(),a.preventDefault(),a.touches&&a.touches.length>1||(j=f(a),window.navigator.msPointerEnabled?(document.addEventListener("MSPointerMove",c,!0),document.addEventListener("MSPointerUp",d,!0)):(document.addEventListener("touchmove",c,!0),document.addEventListener("touchend",d,!0),document.addEventListener("touchcancel",d,!0),document.addEventListener("mousemove",c,!0),document.addEventListener("mouseup",d,!0))))}function c(a){a.preventDefault(),k=f(a),i||(i=!0,window.requestAnimationFrame(g))}function d(a){a.cancelable&&a.preventDefault(),a.touches&&a.touches.length>0||(i=!1,window.navigator.msPointerEnabled?(document.removeEventListener("MSPointerMove",c,!0),document.removeEventListener("MSPointerUp",d,!0)):(document.removeEventListener("touchmove",c,!0),document.removeEventListener("touchend",d,!0),document.removeEventListener("touchcancel",d,!0),document.removeEventListener("mousemove",c,!0),document.removeEventListener("mouseup",d,!0)),e())}function e(){if(null==k)return l=0,void(j=null);var a=j.x-k.x;l-=a,-50>a&&Yb(),a>50&&Wb(),l=0,j=null,k=null,Math.abs(a)<50&&Pb(l)}function f(a){var b={};return a.targetTouches?(b.x=a.targetTouches[0].clientX,b.y=a.targetTouches[0].clientY):(b.x=a.clientX,b.y=a.clientY),b}function g(){if(i){var a=j.x-k.x;Pb(l-a),i=!1}}var h=a,i=!1,j=null,k=null,l=0;this.removeEventListeners=function(){window.navigator.msPointerEnabled?(h.removeEventListener("MSPointerDown",b,!0),document.removeEventListener("MSPointerMove",c,!0),document.removeEventListener("MSPointerUp",d,!0)):(h.removeEventListener("touchstart",b,!0),document.removeEventListener("touchmove",c,!0),document.removeEventListener("touchend",d,!0),document.removeEventListener("touchcancel",d,!0),document.removeEventListener("mousemove",c,!0),document.removeEventListener("mouseup",d,!0))},window.navigator.msPointerEnabled?h.addEventListener("MSPointerDown",b,!0):h.addEventListener("touchstart",b,!0)}function Pb(a){if(pc.imageSwipePosX=a,null==pc.CSStransformName)pc.$E.vwImgC.css({left:a});else if(pc.$E.vwImgC[0].style[pc.CSStransformName]="translateX("+a+"px)","slide"==pc.O.imageTransition)if(a>0){var b=(pc.$E.vwImgP,kc().w);pc.$E.vwImgP.css({visibility:"visible",left:0,opacity:1}),pc.$E.vwImgP[0].style[pc.CSStransformName]="translateX("+(-b+a)+"px) ",pc.$E.vwImgN[0].style[pc.CSStransformName]="translateX("+-b+"px) "}else{var b=(pc.$E.vwImgN,-kc().w);pc.$E.vwImgN.css({visibility:"visible",left:0,opacity:1}),pc.$E.vwImgN[0].style[pc.CSStransformName]="translateX("+(-b+a)+"px) ",pc.$E.vwImgP[0].style[pc.CSStransformName]="translateX("+-b+"px) "}}function Qb(){ngscreenfull.enabled&&(ngscreenfull.toggle(),pc.viewerIsFullscreen?(pc.viewerIsFullscreen=!1,pc.$E.conVwTb.find(".fullscreenButton").removeClass("removeFullscreenButton").addClass("setFullscreenButton")):(pc.viewerIsFullscreen=!0,pc.$E.conVwTb.find(".fullscreenButton").removeClass("setFullscreenButton").addClass("removeFullscreenButton")))}function Rb(){pc.playSlideshow?(window.clearInterval(pc.playSlideshowTimerID),pc.playSlideshow=!1,pc.$E.conVwTb.find(".playPauseButton").removeClass("pauseButton").addClass("playButton")):(pc.playSlideshow=!0,pc.$E.conVwTb.find(".playPauseButton").removeClass("playButton").addClass("pauseButton"),Xb(),pc.playSlideshowTimerID=window.setInterval(function(){Xb()},pc.slideshowDelay))}function Sb(){"std"==pc.toolbarMode?Ub():Tb()}function Tb(){pc.toolbarMode="std",pc.$E.conVwTb.find(".minimizeButton").removeClass("viewToolbarButton").addClass("hideToolbarButton"),Vb("std"),dc()}function Ub(){pc.toolbarMode="min",pc.$E.conVwTb.find(".minimizeButton").removeClass("hideToolbarButton").addClass("viewToolbarButton"),Vb("min"),dc()}function Vb(a){for(var b=pc.O.viewerToolbar,b="std"==a?pc.O.viewerToolbar.standard:pc.O.viewerToolbar.minimized,c=["minimizeButton","previousButton","pageCounter","nextButton","playPauseButton","fullscreenButton","infoButton","linkOriginalButton","closeButton","label"],d=0,e=c.length;e>d;d++)pc.$E.conVwTb.find("."+c[d]).css("label"==c[d]?""==pc.$E.conVwTb.find(".title").text()&&""==pc.$E.conVwTb.find(".description").text()?{display:"none"}:{display:b.indexOf(c[d])>=0?"table-cell":"none"}:{display:b.indexOf(c[d])>=0?"table-cell":"none"});pc.$E.conVwTb.find(".ngCustomBtn").css({display:"none"});for(var f=b.split(","),d=0,e=f.length;e>d;d++){var g=f[d].replace(/^\s+|\s+$/g,"");0==g.indexOf("custom")&&pc.$E.conVwTb.find("."+g).css({display:"table-cell"}) }}function Wb(){pc.playSlideshow&&(window.clearInterval(pc.playSlideshowTimerID),pc.playSlideshowTimerID=window.setInterval(function(){Xb()},pc.slideshowDelay)),Xb()}function Xb(){if(!(pc.viewerImageIsChanged||(new Date).getTime()-pc.timeImgChanged<300)){var a=(pc.I.length,_b(pc.viewerCurrentItemIdx));Zb(a,"nextImage")}}function Yb(){if(!(pc.viewerImageIsChanged||(new Date).getTime()-pc.timeImgChanged<300)){pc.playSlideshow&&Rb();var a=ac(pc.viewerCurrentItemIdx);Zb(a,"previousImage")}}function Zb(a,c){pc.timeImgChanged=(new Date).getTime(),pc.viewerImageIsChanged=!0;if(pc.O.locationHash){var d="nanogallery/"+pc.baseEltID+"/"+pc.I[a].albumID+"/"+pc.I[a].GetID();if("#"+d!=location.hash){pc.lastLocationHash="#"+d;try{top.location.hash=d}catch(e){pc.O.locationHash=!1}}else try{pc.lastLocationHash=top.location.hash}catch(e){pc.O.locationHash=!1}}if(pc.O.debugMode&&console.timeline&&console.timeline("nanoGALLERYviewer"),pc.viewerResizeTimerID=window.setTimeout(dc,100),pc.viewerCurrentItemIdx=a,""==c){pc.$E.vwImgC.css({opacity:0,left:0,visibility:"visible"}).attr("src",pc.emptyGif).attr("src",pc.I[a].responsiveURL());var f=new b;f.tween({from:{o:0},to:{o:1},attachment:{idx:a,dT:c},duration:400,step:function(a){pc.$E.vwImgC.css({opacity:a.o})},finish:function(a,b){pc.$E.vwImgC.css({opacity:1}),$b(b.idx,b.dT)}})}else switch(pc.O.imageTransition){case"fade":var g="nextImage"==c?pc.$E.vwImgN:pc.$E.vwImgP;g.css({opacity:0,left:0,visibility:"visible"});var f=new b;f.tween({from:{o:0},to:{o:1},attachment:{idx:a,dT:c,$e:g},duration:300,step:function(a,b){pc.$E.vwImgC.css({opacity:1-a.o}),b.$e.css({opacity:a.o})},finish:function(a,b){pc.$E.vwImgC.css({opacity:0}),b.$e.css({opacity:1}),$b(b.idx,b.dT)}});break;case"slideBETA":var g="nextImage"==c?pc.$E.vwImgN:pc.$E.vwImgP;if(g.css({opacity:1,left:0,visibility:"visible"}),null==pc.CSStransformName)jQuery.when(pc.$E.vwImgC.animate({left:("nextImage"==c?-kc().w:kc().w)+"px",opacity:0},500),g.animate({opacity:1},300)).done(function(){$b(a,c)});else{var h="nextImage"==c?-kc().w:kc().w;g[0].style[pc.CSStransformName]="translateX("+-h+"px) ";var i={v:pc.imageSwipePosX},j={v:"nextImage"==c?-kc().w:kc().w};jQuery(i).animate(j,{duration:500,step:function(a){pc.$E.vwImgC[0].style[pc.CSStransformName]="translateX("+a+"px)",pc.$E.vwImgC.css({opacity:1-Math.abs(a/h)}),g[0].style[pc.CSStransformName]="translateX("+(-h+a)+"px) "},complete:function(){pc.$E.vwImgC[0].style[pc.CSStransformName]="",pc.$E.vwImgC.css({opacity:0}),$b(a,c)}})}break;case"slideOLD":var g="nextImage"==c?pc.$E.vwImgN:pc.$E.vwImgP;if(null==pc.CSStransformName)g.css({opacity:0,left:0,visibility:"visible"}),jQuery.when(pc.$E.vwImgC.animate({left:("nextImage"==c?-kc().w:kc().w)+"px"},500),g.animate({opacity:1},300)).done(function(){$b(a,c)});else{g.css({opacity:1,left:0,visibility:"visible"});var h="nextImage"==c?-kc().w:kc().w;g[0].style[pc.CSStransformName]="translateX("+-h+"px) ";var i={v:pc.imageSwipePosX},j={v:"nextImage"==c?-kc().w:kc().w};jQuery(i).animate(j,{duration:400,easing:"linear",step:function(a){window.requestAnimationFrame(function(){pc.$E.vwImgC[0].style[pc.CSStransformName]="translateX("+a+"px)",g[0].style[pc.CSStransformName]="translateX("+(-h+a)+"px) "})},complete:function(){window.requestAnimationFrame(function(){pc.$E.vwImgC[0].style[pc.CSStransformName]="",$b(a,c)})}})}break;case"slide":var g="nextImage"==c?pc.$E.vwImgN:pc.$E.vwImgP;if(null==pc.CSStransformName)g.css({opacity:0,left:0,visibility:"visible"}),jQuery.when(pc.$E.vwImgC.animate({left:2*("nextImage"==c?-kc().w:kc().w)+"px"},500),g.animate({opacity:1},300)).done(function(){$b(a,c)});else{var h="nextImage"==c?-kc().w:kc().w;g.css({opacity:1,left:0,visibility:"visible"}),g[0].style[pc.CSStransformName]="translateX("+-h+"px) ";var f=new b;f.tween({from:{t:pc.imageSwipePosX},to:{t:"nextImage"==c?-kc().w:kc().w},attachment:{idx:a,dT:c,$e:g,dir:h},duration:300,step:function(a,b){pc.$E.vwImgC[0].style[pc.CSStransformName]="translateX("+a.t+"px)",b.$e[0].style[pc.CSStransformName]="translateX("+(-b.dir+a.t)+"px) "},finish:function(a,b){pc.$E.vwImgC[0].style[pc.CSStransformName]="",b.$e[0].style[pc.CSStransformName]="",$b(b.idx,b.dT)}})}break;case"slideAppear":default:var h=kc().w+"px",g=pc.$E.vwImgP;"nextImage"==c&&(h="-"+h,g=pc.$E.vwImgN),g.css({opacity:0,left:0,visibility:"visible"}),jQuery.when(pc.$E.vwImgC.animate({left:h,opacity:0},500),g.animate({opacity:1},300)).done(function(){Pb(0),$b(a,c)})}}function $b(a,b){if(bc(a),pc.O.debugMode&&console.timeline&&console.timelineEnd("nanoGALLERYviewer"),"function"!=typeof pc.O.fnImgDisplayed||pc.O.fnImgDisplayed(pc.I[a].$elt,pc.I[a])){pc.imageSwipePosX=0,pc.$E.vwImgC.off("click"),pc.$E.vwImgC.removeClass("imgCurrent");var c=pc.$E.vwImgC;switch(b){case"nextImage":pc.$E.vwImgC=pc.$E.vwImgN,pc.$E.vwImgN=c;break;case"previousImage":pc.$E.vwImgC=pc.$E.vwImgP,pc.$E.vwImgP=c}pc.$E.vwImgC.addClass("imgCurrent"),pc.$E.vwImgN.css({opacity:0,left:0,visibility:"hidden"}).attr("src",pc.emptyGif).attr("src",pc.I[_b(a)].responsiveURL()),pc.$E.vwImgP.css({opacity:0,left:0,visibility:"hidden"}).attr("src",pc.emptyGif).attr("src",pc.I[ac(a)].responsiveURL()),pc.$E.vwImgC.on("click",function(a){a.stopPropagation(),a.pageXd;d++)if(pc.I[d].albumID==pc.I[a].albumID&&"image"==pc.I[d].kind){c=d;break}if(-1==c)for(var d=0;a>=d;d++)if(pc.I[d].albumID==pc.I[a].albumID&&"image"==pc.I[d].kind){c=d;break}return c}function ac(a){for(var b=-1,c=a-1;c>=0;c--)if(pc.I[c].albumID==pc.I[a].albumID&&"image"==pc.I[c].kind){b=c;break}if(-1==b)for(var c=pc.I.length-1;c>=a;c--)if(pc.I[c].albumID==pc.I[a].albumID&&"image"==pc.I[c].kind){b=c;break}return b}function bc(a){if(pc.O.viewerToolbar.display){pc.$E.conVwTb.css({visibility:"visible"});var b=!1;void 0!==pc.I[a].title&&""!=pc.I[a].title?(pc.$E.conVwTb.find(".title").html(pc.I[a].title),b=!0):pc.$E.conVwTb.find(".title").html(""),void 0!==pc.I[a].description&&""!=pc.I[a].description?(pc.$E.conVwTb.find(".description").html(pc.I[a].description),b=!0):pc.$E.conVwTb.find(".description").html("");var c=pc.$E.conVwTb.find(".ngCustomBtn");c.length>0&&"function"==typeof pc.O.fnImgToolbarCustDisplay&&pc.O.fnImgToolbarCustDisplay(c,pc.I[a],e()),b&&("std"==pc.toolbarMode?pc.O.viewerToolbar.standard:pc.O.viewerToolbar.minimized).indexOf("label")>=0?pc.$E.conVwTb.find(".label").show():pc.$E.conVwTb.find(".label").hide();var d=pb();d>0&&pc.$E.conVwTb.find(".pageCounter").html(pc.I[a].imageNumber+1+"/"+d)}}function cc(a){if(pc.viewerImageIsChanged&&pc.$E.vwContent.find("*").stop(!0,!0),pc.viewerImageIsChanged=!1,pc.containerViewerDisplayed){if(window.clearTimeout(pc.viewerResizeTimerID),pc.playSlideshow&&(window.clearInterval(pc.playSlideshowTimerID),pc.playSlideshow=!1),pc.viewerSwipe.removeEventListeners(),pc.viewerSwipe=null,pc.O.galleryFullpageButton&&pc.$E.base.hasClass("fullpage")||k(),pc.viewerIsFullscreen&&(pc.viewerIsFullscreen=!1,ngscreenfull.exit()),pc.$E.conVwCon.hide(0).off().show(0).html("").remove(),pc.containerViewerDisplayed=!1,-1!=pc.albumIdxToOpenOnViewerClose)S(pc.albumIdxToOpenOnViewerClose,!0);else{if(pc.O.locationHash&&a){var b=pc.I[pc.viewerCurrentItemIdx].albumID,c="nanogallery/"+pc.baseEltID+"/"+b;pc.lastLocationHash="#"+c;try{top.location.hash=c}catch(d){pc.O.locationHash=!1}}zb()}pc.timeImgChanged=(new Date).getTime()}}function dc(){pc.containerViewerDisplayed&&((new Date).getTime()-pc.viewerResizeTimerLastRun<100||window.requestAnimationFrame(function(){var a=pc.$E.conVw.width(),b=pc.$E.conVw.height(),c=pc.$E.vwImgC,d=c.height(),e=c.width(),f=c.outerHeight(!0),g=c.outerHeight(!1),h=pc.$E.conVwTb.find(".toolbar"),i=h.outerHeight(!0);pc.$E.conVwTb.css(40>=d||!pc.O.viewerToolbar.display?{visibility:"hidden"}:{visibility:"visible"});var j=Math.abs(pc.$E.vwContent.outerHeight(!0)-pc.$E.vwContent.height()),k=Math.abs(pc.$E.vwContent.outerWidth(!0)-pc.$E.vwContent.width()),l=g-c.innerHeight(),m=Math.abs(c.outerWidth(!1)-c.innerWidth()),n=Math.abs(c.innerHeight()-d),o=Math.abs(c.innerWidth()-e),p=l+n,q=m+o,r=0;"innerImage"!=pc.O.viewerToolbar.style&&(r=i);var s=b-r-j,t=a-k;switch(pc.O.viewerToolbar.position){case"top":pc.$E.vwContent.css({height:s,width:t,top:r});var u=0;"innerImage"==pc.O.viewerToolbar.style&&(u=Math.abs(f-d)/2+5),"stuckImage"==pc.O.viewerToolbar.style&&(u=Math.abs(f-d)/2-p),pc.$E.conVwTb.css({top:u});break;case"bottom":default:pc.$E.vwContent.css({height:s,width:t});var u=0;"innerImage"==pc.O.viewerToolbar.style&&(u=Math.abs(f-d)/2+5),"stuckImage"==pc.O.viewerToolbar.style&&(u=Math.abs(f-d)/2-p),pc.$E.conVwTb.css({bottom:u})}"innerImage"==pc.O.viewerToolbar.style&&h.css({"max-width":e}),"fullWidth"==pc.O.viewerToolbar.style&&h.css({width:t}),pc.$E.conVwTb.css({height:i}),pc.$E.vwContent.children("img").css({"max-width":t-q,"max-height":s-p}),pc.$E.vwContent.children("img").css({"object-fit":"contain"}),pc.viewerResizeTimerID=window.setTimeout(dc,100),pc.viewerResizeTimerLastRun=(new Date).getTime()}))}function ec(a){var b=a,c=[],d=0;c.push(pc.I[b]);for(var e=pc.I.length,f=b+1;e>f;f++)"image"==pc.I[f].kind&&pc.I[f].albumID==pc.I[a].albumID&&""==pc.I[f].destinationURL&&(d++,c.push(pc.I[f]));for(var f=0;b>f;f++)"image"==pc.I[f].kind&&pc.I[f].albumID==pc.I[a].albumID&&""==pc.I[f].destinationURL&&(d++,c.push(pc.I[f]));pc.O.fnThumbnailOpen(c)}function fc(a){var b=a,c=[],d=0;c[d]=new Object,c[d].href=pc.I[b].responsiveURL(),c[d].title=pc.I[b].title;for(var e=pc.I.length,f=b+1;e>f;f++)"image"==pc.I[f].kind&&pc.I[f].albumID==pc.I[a].albumID&&""==pc.I[f].destinationURL&&(d++,c[d]=new Object,c[d].href=pc.I[f].responsiveURL(),c[d].title=pc.I[f].title);for(var f=0;b>f;f++)"image"==pc.I[f].kind&&pc.I[f].albumID==pc.I[a].albumID&&""==pc.I[f].destinationURL&&(d++,c[d]=new Object,c[d].href=pc.I[f].responsiveURL(),c[d].title=pc.I[f].title);null!=pc.O.fancyBoxOptions?jQuery.fancybox(c,pc.O.fancyBoxOptions):jQuery.fancybox(c,{autoPlay:!1,nextEffect:"fade",prevEffect:"fade",scrolling:"no",helpers:{buttons:{position:"bottom"}}})}function gc(a){var b=null;switch(rc(pc.O.colorScheme)){case"object":b=pc.colorScheme_default,jQuery.extend(!0,b,pc.O.colorScheme),pc.colorSchemeLabel="nanogallery_colorscheme_custom_"+pc.baseEltID;break;case"string":switch(pc.O.colorScheme){case"none":return;case"light":b=pc.colorScheme_light,pc.colorSchemeLabel="nanogallery_colorscheme_light";break;case"lightBackground":b=pc.colorScheme_lightBackground,pc.colorSchemeLabel="nanogallery_colorscheme_lightBackground";break;case"darkRed":b=pc.colorScheme_darkRed,pc.colorSchemeLabel="nanogallery_colorscheme_darkred";break;case"darkGreen":b=pc.colorScheme_darkGreen,pc.colorSchemeLabel="nanogallery_colorscheme_darkgreen";break;case"darkBlue":b=pc.colorScheme_darkBlue,pc.colorSchemeLabel="nanogallery_colorscheme_darkblue";break;case"darkOrange":b=pc.colorScheme_darkOrange,pc.colorSchemeLabel="nanogallery_colorscheme_darkorange";break;case"default":case"dark":default:b=pc.colorScheme_default,pc.colorSchemeLabel="nanogallery_colorscheme_default"}break;default:return void ic("Error in colorScheme parameter.")}var c="."+pc.colorSchemeLabel+" ",d=c+".nanoGalleryNavigationbar { background:"+b.navigationbar.background+" !important; }\n";void 0!==b.navigationbar.border&&(d+=c+".nanoGalleryNavigationbar { border:"+b.navigationbar.border+" !important; }\n"),void 0!==b.navigationbar.borderTop&&(d+=c+".nanoGalleryNavigationbar { border-top:"+b.navigationbar.borderTop+" !important; }\n"),void 0!==b.navigationbar.borderBottom&&(d+=c+".nanoGalleryNavigationbar { border-bottom:"+b.navigationbar.borderBottom+" !important; }\n"),void 0!==b.navigationbar.borderRight&&(d+=c+".nanoGalleryNavigationbar { border-right:"+b.navigationbar.borderRight+" !important; }\n"),void 0!==b.navigationbar.borderLeft&&(d+=c+".nanoGalleryNavigationbar { border-left:"+b.navigationbar.borderLeft+" !important; }\n"),d+=c+".nanoGalleryNavigationbar .oneFolder { color:"+b.navigationbar.color+" !important; }\n",d+=c+".nanoGalleryNavigationbar .separator { color:"+b.navigationbar.color+" !important; }\n",d+=c+".nanoGalleryNavigationbar .separatorRTL { color:"+b.navigationbar.color+" !important; }\n",d+=c+".nanoGalleryNavigationbar .nanoGalleryTags { color:"+b.navigationbar.color+" !important; }\n",d+=c+".nanoGalleryNavigationbar .setFullPageButton { color:"+b.navigationbar.color+" !important; }\n",d+=c+".nanoGalleryNavigationbar .removeFullPageButton { color:"+b.navigationbar.color+" !important; }\n",d+=c+".nanoGalleryNavigationbar .oneFolder:hover { color:"+b.navigationbar.colorHover+" !important; }\n",d+=c+".nanoGalleryNavigationbar .separatorRTL:hover { color:"+b.navigationbar.colorHover+" !important; }\n",d+=c+".nanoGalleryNavigationbar .nanoGalleryTags:hover { color:"+b.navigationbar.colorHover+" !important; }\n",d+=c+".nanoGalleryNavigationbar .setFullPageButton:hover { color:"+b.navigationbar.colorHover+" !important; }\n",d+=c+".nanoGalleryNavigationbar .removeFullPageButton:hover { color:"+b.navigationbar.colorHover+" !important; }\n",d+=c+".nanoGalleryContainer > .nanoGalleryThumbnailContainer { background:"+b.thumbnail.background+" !important; border:"+b.thumbnail.border+" !important; }\n",d+=c+".nanoGalleryContainer > .nanoGalleryThumbnailContainer .imgContainer { background:"+b.thumbnail.background+" !important; }\n",d+=c+".nanoGalleryContainer > .nanoGalleryThumbnailContainer .labelImage{ background:"+b.thumbnail.labelBackground+" ; }\n",d+=c+".nanoGalleryContainer > .nanoGalleryThumbnailContainer .labelImageTitle { color:"+b.thumbnail.titleColor+" !important; Text-Shadow:"+b.thumbnail.titleShadow+" !important; }\n",d+=c+".nanoGalleryContainer > .nanoGalleryThumbnailContainer .labelImageTitle:before { color:"+b.thumbnail.titleColor+" !important; Text-Shadow:"+b.thumbnail.titleShadow+" !important; }\n",d+=c+".nanoGalleryContainer > .nanoGalleryThumbnailContainer .labelFolderTitle { color:"+b.thumbnail.titleColor+" !important; Text-Shadow:"+b.thumbnail.titleShadow+" !important; }\n";var e=b.thumbnail.labelBackground;"transparent"==e&&(e=""),d+=c+".nanoGalleryContainer > .nanoGalleryThumbnailContainer .labelFolderTitle > span { background-color:"+b.thumbnail.titleColor+" !important; color:"+e+" !important; }\n",d+=c+".nanoGalleryContainer > .nanoGalleryThumbnailContainer .labelFolderTitle:before { color:"+b.thumbnail.titleColor+" !important; Text-Shadow:"+b.thumbnail.titleShadow+" !important; }\n",d+=c+".nanoGalleryContainer > .nanoGalleryThumbnailContainer .labelDescription { color:"+b.thumbnail.descriptionColor+" !important; Text-Shadow:"+b.thumbnail.descriptionShadow+" !important; }\n",d+=c+".nanoGalleryContainer > .nanoGalleryThumbnailContainer .labelDescription > span { background-color:"+b.thumbnail.titleColor+" !important; color:"+e+" !important; }\n",pc.O.paginationDots&&(d+=c+".nanoGalleryPaginationDot > .paginationItem { border:"+b.thumbnail.paginationDotBorder+" !important; background:"+b.thumbnail.paginationDotBack+" !important;}\n",d+=c+".nanoGalleryPaginationDot > .currentPage { background:"+b.thumbnail.paginationDotSelBack+" !important;}\n");var f="nanogallery_galleryfullpage_bgcolor_"+pc.baseEltID;d+="."+f+".fullpage { background:"+pc.O.galleryFullpageBgColor+" !important; }\n",jQuery("head").append(""),jQuery(a).addClass(pc.colorSchemeLabel),jQuery(a).addClass(f)}function hc(a){var b=null;switch(rc(pc.O.colorSchemeViewer)){case"object":b=pc.colorSchemeViewer_default,jQuery.extend(!0,b,pc.O.colorSchemeViewer),pc.colorSchemeLabel="nanogallery_colorschemeviewer_custom";break;case"string":switch(pc.O.colorSchemeViewer){case"none":return;case"light":b=pc.colorSchemeViewer_light,pc.colorSchemeLabel="nanogallery_colorschemeviewer_light";break;case"darkRed":b=pc.colorSchemeViewer_darkRed,pc.colorSchemeLabel="nanogallery_colorschemeviewer_darkred";break;case"darkGreen":b=pc.colorSchemeViewer_darkGreen,pc.colorSchemeLabel="nanogallery_colorschemeviewer_darkgreen";break;case"darkBlue":b=pc.colorSchemeViewer_darkBlue,pc.colorSchemeLabel="nanogallery_colorschemeviewer_darkblue";break;case"darkOrange":b=pc.colorSchemeViewer_darkOrange,pc.colorSchemeLabel="nanogallery_colorschemeviewer_darkorange";break;case"dark":b=pc.colorSchemeViewer_dark,pc.colorSchemeLabel="nanogallery_colorschemeviewer_dark";break;case"default":default:b=pc.colorSchemeViewer_default,pc.colorSchemeLabel="nanogallery_colorschemeviewer_default"}break;default:return void ic("Error in colorSchemeViewer parameter.")}var c="."+pc.colorSchemeLabel+" ",d=c+".nanoGalleryViewer { background:"+b.background+" !important; }\n";d+=c+".nanoGalleryViewer .content img { border:"+b.imageBorder+" !important; box-shadow:"+b.imageBoxShadow+" !important; }\n",d+=c+".nanoGalleryViewer .toolbar { background:"+b.barBackground+" !important; border:"+b.barBorder+" !important; color:"+b.barColor+" !important; }\n",d+=c+".nanoGalleryViewer .toolbar .previousButton:after { color:"+b.barColor+" !important; }\n",d+=c+".nanoGalleryViewer .toolbar .nextButton:after { color:"+b.barColor+" !important; }\n",d+=c+".nanoGalleryViewer .toolbar .closeButton:after { color:"+b.barColor+" !important; }\n",d+=c+".nanoGalleryViewer .toolbar .label .title { color:"+b.barColor+" !important; }\n",d+=c+".nanoGalleryViewer .toolbar .label .description { color:"+b.barDescriptionColor+" !important; }\n",jQuery("head").append(""),jQuery(a).addClass(pc.colorSchemeLabel)}function ic(a,b){jc(a),null!=pc.$E.conConsole&&(pc.$E.conConsole.css({visibility:"visible",height:"auto"}),pc.$E.conConsole.append(0==b?"

"+a+"

":"

nanoGALLERY: "+a+" ["+pc.baseEltID+"]

"))}function jc(a){window.console&&console.log("nanoGALLERY: "+a+" ["+pc.baseEltID+"]")}function kc(){var a=jQuery(window);return vpW=a.width(),pc.O.demoViewportWidth>0&&(pc.O.demoViewportWidth=c.t-b&&d.top+e<=c.t+c.h+b&&d.left>=c.l-b&&d.left+f<=c.l+c.w+b?!0:!1}function mc(a,b){{var c=kc(),d=a.offset(),e=a.outerHeight(!0);a.outerWidth(!0)}return 0==c.t&&d.top<=c.t+c.h?!0:d.top>=c.t&&d.top+e<=c.t+c.h-b?!0:!1}function nc(a,b){var c=0;""==a&&(a="*"),jQuery(a).each(function(){var a=parseInt(jQuery(this).css("z-index"));c=a>c?a:c}),c++,jQuery(b).css("z-index",c)}function oc(a){for(var b,c,d=a.length;d;b=Math.floor(Math.random()*d),c=a[--d],a[d]=a[b],a[b]=c);return a}this.ReloadAlbum=function(){if(""===pc.O.kind)throw"Not supported for this kind.";for(var a=pc.I.length,b=-1,c=0;a>c;c++)if(pc.lastOpenAlbumID==pc.I[c].GetID()){b=c;break}if(-1==b)throw"Current album not found.";pc.O.keepSelection===!1&&(pc.selectedItems=[]);for(var d=0;a>d;d++)pc.O.keepSelection===!1&&(pc.I[d].selected=!1),pc.I[d].albumID==b&&(pc.I[d].albumID=-1);switch(pc.I[b].contentIsLoaded=!1,pc.lastOpenAlbumID=-1,pc.O.kind){case"json":return D(b,!1,-1,!1,!0);case"flickr":return G(b,!1,-1,!1,!0);case"picasa":default:return M(b,!1,-1,!1,!0)}},this.moveToNextAlbum=function(){U()},this.moveToPreviousAlbum=function(){V()},this.closeViewer=function(){return cc(!0),!1},this.minimizeToolbar=function(){return Ub(),!1},this.maximizeToolbar=function(){return Tb(),!1},this.RefreshSize=function(){cb()},this.displayItem=function(a){return w(!1,a,!0)},this.paginationPreviousPage=function(){ob()},this.paginationNextPage=function(){nb()},this.paginationGotoPage=function(b){var c=pc.$E.conPagin.data("galleryIdx");mc(pc.$E.base,0)||a("html, body").animate({scrollTop:pc.$E.base.offset().top},200),b>1&&b--,qb(c,b)},this.paginationCountPages=function(){var a=pc.$E.conPagin.data("galleryIdx"),b=0;return pc.pgMaxLinesPerPage>0&&(b=pc.I[a].contentLength/(pc.pgMaxLinesPerPage*pc.pgMaxNbThumbnailsPerRow)),n2=Math.ceil(b),n2},this.galleryCountImages=function(){return pb()},this.GetItem=function(a){if(isNaN(a))throw"index must be a number";return pc.I[a]},this.GetItems=function(){return pc.I},this.GetItemsIndex=function(a){for(var b=[],c=a.length,d=0;c>d;d++){if(index=isNaN(a[d])?pc.I.indexOf(a[d]):a[d],isNaN(index))throw"This item does not exists";b.push(index)}return b},this.SetSelectedItems=function(a){for(var b=a.length,c=0;b>c;c++)null!==a[c].$elt&&wb(a[c],!0)},this.SetUnselectedItems=function(a){for(var b=a.length,c=0;b>c;c++)null!==a[c].$elt&&wb(a[c],!1)},this.GetSelectedItems=function(){return pc.selectedItems},this.GetCurrentViewedItem=function(){return pc.containerViewerDisplayed?pc.I[pc.viewerCurrentItemIdx]:null},this.GetCurrentViewedItemIdx=function(){return pc.containerViewerDisplayed?pc.viewerCurrentItemIdx:-1},this.Get=function(a){return pc.O[a]},this.Set=function(a,b){pc.O[a]=b},this.SetSelectMode=function(b){"undefined"==typeof b&&pc.selectModeForce===!0&&(b=pc.selectMode),(b===!0||b===!1||"image"===b||"album"===b)&&(pc.selectModeForce=b!==!1,pc.selectMode=b,"album"===b||"image"==b?pc.$E.base.find(".nanoGalleryThumbnailContainer").each(function(){a(this).hasClass("album")&&"image"===b||!a(this).hasClass("album")&&"album"===b?a(this).addClass("unselectable"):a(this).removeClass("unselectable")}):pc.$E.base.find(".nanoGalleryThumbnailContainer").removeClass("unselectable"),(pc.O.keepSelection===!1||b===!1)&&this.SetUnselectedItems(pc.I),"function"==typeof pc.O.fnChangeSelectMode&&pc.O.fnChangeSelectMode(pc.selectMode))},this.GetSelectMode=function(){return pc.selectMode};var pc=this;pc.I=[],pc.O=null,pc.$E={base:null,conTnParent:null,conLoadingB:null,conConsole:null,conTn:null,conTnHid:null,conPagin:null,conBC:null,conNavB:null,conNavBCon:null,conNavBFullpage:null,conVwCon:null,conVw:null,conVwTb:null,vwImgP:null,vwImgN:null,vwImgC:null,vwContent:null,vwLogo:null},pc.i18nTranslations={paginationPrevious:"Previous",paginationNext:"Next",breadcrumbHome:"List of Albums",thumbnailImageTitle:"",thumbnailAlbumTitle:"",thumbnailImageDescription:"",thumbnailAlbumDescription:""},pc.$currentTouchedThumbnail=null,pc.baseEltID=null,pc.containerTags=null,pc.containerNavigationbarContDisplayed=!1,pc.containerViewerDisplayed=!1,pc.containerThumbnailsDisplayed=!1,pc.tn={displayInterval:30,lazyLoadTreshold:100,scale:1,borderWidth:0,borderHeight:0,imgcBorderHeight:0,imgcBorderWidth:0,labelHeight:{l1:0,lN:0,get:function(){return pc.tn.labelHeight[pc.curNavLevel]}},outerWidth:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0},get:function(){return pc.tn.outerWidth[pc.curNavLevel][pc.curWidth]}},outerHeight:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0},get:function(){return pc.tn.outerHeight[pc.curNavLevel][pc.curWidth]}},settings:{width:{l1:{xs:0,sm:0,me:0,la:0,xl:0,xsc:"u",smc:"u",mec:"u",lac:"u",xlc:"u"},lN:{xs:0,sm:0,me:0,la:0,xl:0,xsc:"u",smc:"u",mec:"u",lac:"u",xlc:"u"}},height:{l1:{xs:0,sm:0,me:0,la:0,xl:0,xsc:"u",smc:"u",mec:"u",lac:"u",xlc:"u"},lN:{xs:0,sm:0,me:0,la:0,xl:0,xsc:"u",smc:"u",mec:"u",lac:"u",xlc:"u"}},getH:function(){return pc.tn.settings.height[pc.curNavLevel][pc.curWidth]},getW:function(){return pc.tn.settings.width[pc.curNavLevel][pc.curWidth]}},getHE:function(){return"l1"==pc.curNavLevel&&0!==pc.tnL1HE.length?pc.tnL1HE:pc.tnHE},styleFTitle:"",styleITitle:"",styleDesc:"",styleLabelImage:"",styleL1FTitle:"",styleL1ITitle:"",styleL1Desc:"",styleL1LabelImage:""},pc.tnHE=[],pc.tnL1HE=[],pc.L={nbMaxTnPerRow:0},pc.blackList=null,pc.whiteList=null,pc.albumList=null,pc.galleryItemsCount=0,pc.toolbarMode="std",pc.playSlideshow=!1,pc.playSlideshowTimerID=0,pc.slideshowDelay=3e3,pc.touchAutoOpenDelayTimerID=0,pc.supportFullscreenAPI=!1,pc.viewerIsFullscreen=!1,pc.bodyOverflowInitial=null,pc.i18nLang="",pc.timeImgChanged=0,pc.timeLastTouchStart=0,pc.pgMaxNbThumbnailsPerRow=1,pc.pgMaxLinesPerPage=0,pc.lastOpenAlbumID=-1,pc.lastLocationHash="",pc.touchSelectTO=null,pc.viewerImageIsChanged=!1,pc.viewerResizeTimerID=-1,pc.viewerResizeTimerLastRun=-1,pc.viewerCurrentItemIdx=-1,pc.imageSwipePosX=0,pc.albumIdxToOpenOnViewerClose=-1,pc.custGlobals={},pc.delayedAlbumIdx=-1,pc.curAlbumIdx=-1,pc.delayedSetLocationHash=!1,pc.viewerSwipe=null,pc.isShiftPressed=!1,pc.isAltPressed=!1,pc.isCtrlPressed=!1,pc.isMetaPressed=!1,pc.selectedItems=[],pc.aengine="animate",pc.scrollTimeOut=0,pc.maxAlbums=1e6,pc.maxPhotos=1e6,pc.curNavLevel="l1",pc.curWidth="me",pc.gallerySwipeInitDone=!1,pc.emptyGif="data:image/gif;base64,R0lGODlhEAAQAIAAAP///////yH5BAEKAAEALAAAAAAQABAAAAIOjI+py+0Po5y02ouzPgUAOw==",pc.CSStransformName=g(["transform","msTransform","MozTransform","WebkitTransform","OTransform"]),pc.CSStransformStyle=g(["transformStyle","msTransformStyle","MozTransformStyle","WebkitTransformStyle","OTransformStyle"]),pc.CSSperspective=g(["perspective","msPerspective","MozPerspective","WebkitPerspective","OPerspective"]),pc.CSSbackfaceVisibilityName=g(["backfaceVisibility","msBackfaceVisibility","MozBackfaceVisibility","WebkitBackfaceVisibility","OBackfaceVisibility"]),pc.CSStransitionName=g(["transition","msTransition","MozTransition","WebkitTransition","OTransition"]),pc.CSSanimationName=g(["animation","msAnimation","MozAnimation","WebkitAnimation","OAnimation"]),pc.IE=function(){if(document.documentMode)return document.documentMode;for(var a=7;a>4;a--){var b=document.createElement("div");if(b.innerHTML="",b.getElementsByTagName("span").length)return b=null,a}return void 0}(),pc.isIOS=/(iPad|iPhone|iPod)/g.test(navigator.userAgent),pc.isGingerbread=/Android 2\.3\.[3-7]/i.test(navigator.userAgent),pc.openNoDelay=!1,pc.startDateTime=new Date,pc.toRender=[],pc.picasa={url:function(){return pc.O.picasaUseUrlCrossDomain?"https://photos.googleapis.com/data/feed/api/":"https://picasaweb.google.com/data/feed/api/"},thumbSize:64,thumbAvailableSizes:new Array(32,48,64,72,94,104,110,128,144,150,160,200,220,288,320,400,512,576,640,720,800,912,1024,1152,1280,1440,1600),thumbAvailableSizesCropped:" 32 48 64 72 104 144 150 160 "},pc.flickr={url:function(){return"https://api.flickr.com/services/rest/"},thumbSize:"sq",thumbSizeX2:"sq",thumbAvailableSizes:new Array(75,100,150,240,500,640),thumbAvailableSizesStr:new Array("sq","t","q","s","m","z"),photoSize:"sq",photoAvailableSizes:new Array(75,100,150,240,500,640,1024,1024,1600,2048),photoAvailableSizesStr:new Array("sq","t","q","s","m","z","b","l","h","k"),ApiKey:"2f0e634b471fdb47446abcb9c5afebdc"},pc.colorScheme_default={navigationbar:{background:"none",borderTop:"1px solid #555",borderBottom:"1px solid #555",borderRight:"",borderLeft:"",color:"#ccc",colorHover:"#fff"},thumbnail:{background:"#000",border:"1px solid #000",labelBackground:"rgba(34, 34, 34, 0.75)",titleColor:"#eee",titleShadow:"",descriptionColor:"#ccc",descriptionShadow:"",paginationDotBorder:"2px solid #fff",paginationDotBack:"#444",paginationDotSelBack:"#fff"}},pc.colorScheme_darkRed={navigationbar:{background:"#a60000",border:"1px dotted #ff0000",color:"#ccc",colorHover:"#fff"},thumbnail:{background:"#a60000",border:"1px solid #ff0000",labelBackground:"rgba(134, 0, 0, 0.75)",titleColor:"#eee",titleShadow:"",descriptionColor:"#ccc",descriptionShadow:"",paginationDotBorder:"2px solid #d00",paginationDotBack:"#400",paginationDotSelBack:"#d00"}},pc.colorScheme_darkGreen={navigationbar:{background:"#008500",border:"1px dotted #00cc00",color:"#ccc",colorHover:"#fff"},thumbnail:{background:"#008500",border:"1px solid #00cc00",labelBackground:"rgba(0, 105, 0, 0.75)",titleColor:"#eee",titleShadow:"",descriptionColor:"#ccc",descriptionShadow:"",paginationDotBorder:"2px solid #0c0",paginationDotBack:"#008500",paginationDotSelBack:"#0c0"}},pc.colorScheme_darkBlue={navigationbar:{background:"#071871",border:"1px dotted #162ea2",color:"#ccc",colorHover:"#fff"},thumbnail:{background:"#071871",border:"1px solid #162ea2",labelBackground:"rgba(7, 8, 81, 0.75)",titleColor:"#eee",titleShadow:"",descriptionColor:"#ccc",descriptionShadow:"",paginationDotBorder:"2px solid #162ea2",paginationDotBack:"#071871",paginationDotSelBack:"#162ea2"}},pc.colorScheme_darkOrange={navigationbar:{background:"#a67600",border:"1px dotted #ffb600",color:"#ccc",colorHover:"#fff"},thumbnail:{background:"#a67600",border:"1px solid #ffb600",labelBackground:"rgba(134, 86, 0, 0.75)",titleColor:"#eee",titleShadow:"",descriptionColor:"#ccc",descriptionShadow:"",paginationDotBorder:"2px solid #ffb600",paginationDotBack:"#a67600",paginationDotSelBack:"#ffb600"}},pc.colorScheme_light={navigationbar:{background:"none",borderTop:"1px solid #ddd",borderBottom:"1px solid #ddd",borderRight:"",borderLeft:"",color:"#777",colorHover:"#eee"},thumbnail:{background:"#fff",border:"1px solid #fff",labelBackground:"rgba(60, 60, 60, 0.75)",titleColor:"#fff",titleShadow:"none",descriptionColor:"#eee",descriptionShadow:"none",paginationDotBorder:"2px solid #555",paginationDotBack:"#888",paginationDotSelBack:"#555"}},pc.colorScheme_lightBackground={navigationbar:{background:"none",border:"",color:"#000",colorHover:"#444"},thumbnail:{background:"#000",border:"1px solid #000",labelBackground:"rgba(34, 34, 34, 0.85)",titleColor:"#fff",titleShadow:"",descriptionColor:"#eee",descriptionShadow:"",paginationDotBorder:"2px solid #555",paginationDotBack:"#888",paginationDotSelBack:"#555"}},pc.colorSchemeViewer_default={background:"#000",imageBorder:"4px solid #000",imageBoxShadow:"#888 0px 0px 0px",barBackground:"rgba(4, 4, 4, 0.7)",barBorder:"0px solid #111",barColor:"#eee",barDescriptionColor:"#aaa"},pc.colorSchemeViewer_dark={background:"rgba(1, 1, 1, 0.75)",imageBorder:"4px solid #f8f8f8",imageBoxShadow:"#888 0px 0px 20px",barBackground:"rgba(4, 4, 4, 0.7)",barBorder:"0px solid #111",barColor:"#eee",barDescriptionColor:"#aaa"},pc.colorSchemeViewer_darkRed={background:"rgba(1, 1, 1, 0.75)",imageBorder:"4px solid #ffa3a3",imageBoxShadow:"#ff0000 0px 0px 20px",barBackground:"#a60000",barBorder:"2px solid #111",barColor:"#eee",barDescriptionColor:"#aaa"},pc.colorSchemeViewer_darkGreen={background:"rgba(1, 1, 1, 0.75)",imageBorder:"4px solid #97e697",imageBoxShadow:"#00cc00 0px 0px 20px",barBackground:"#008500",barBorder:"2px solid #111",barColor:"#eee",barDescriptionColor:"#aaa"},pc.colorSchemeViewer_darkBlue={background:"rgba(1, 1, 1, 0.75)",imageBorder:"4px solid #a0b0d7",imageBoxShadow:"#162ea2 0px 0px 20px",barBackground:"#071871",barBorder:"2px solid #111",barColor:"#eee",barDescriptionColor:"#aaa"},pc.colorSchemeViewer_darkOrange={background:"rgba(1, 1, 1, 0.75)",imageBorder:"4px solid #ffd7b7",imageBoxShadow:"#ffb600 0px 0px 20px",barBackground:"#a67600",barBorder:"2px solid #111",barColor:"#eee",barDescriptionColor:"#aaa"},pc.colorSchemeViewer_light={background:"rgba(187, 187, 187, 0.75)",imageBorder:"none",imageBoxShadow:"#888 0px 0px 0px",barBackground:"rgba(4, 4, 4, 0.7)",barBorder:"0px solid #111",barColor:"#eee",barDescriptionColor:"#aaa"};var qc=function(){function a(a,c){var d=0;d=void 0===c||null===c?b++:c,this.GetID=function(){return d},this.title=a,this.description="",this.src="",this.width=0,this.height=0,this.destinationURL="",this.kind="",this.author="",this.thumbFullWidth=0,this.thumbFullHeight=0,this.thumbLabelWidth=0,this.thumbLabelHeight=0,this.thumbSizes={},this.thumbs={url:{l1:{xs:"",sm:"",me:"",la:"",xl:""},lN:{xs:"",sm:"",me:"",la:"",xl:""}},width:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}},height:{l1:{xs:0,sm:0,me:0,la:0,xl:0},lN:{xs:0,sm:0,me:0,la:0,xl:0}}},this.picasaThumbs=null,this.hovered=!1,this.hoverInitDone=!1,this.contentIsLoaded=!1,this.contentLength=0,this.imageNumber=0,this.eltTransform={},this.albumID=0,this.paginationLastPage=0,this.paginationLastWidth=0,this.customData={},this.selected=!1,this.$elt=null,this.$Elts=[]}var b=1;return a.get_nextId=function(){return b},a.prototype={$getElt:function(a,b){return void 0!==this.$Elts[a]&&1==!b?this.$Elts[a]:(this.$Elts[a]=this.$elt.find(a),this.$Elts[a])},thumbSetImgHeight:function(a){for(var b=["xs","sm","me","la","xl"],c=0;c", "description": "image gallery simplified - jQuery plugin",