diff --git a/dist/jquery.nanogallery2.core.min.js b/dist/jquery.nanogallery2.core.min.js
index 10335987..6418a196 100644
--- a/dist/jquery.nanogallery2.core.min.js
+++ b/dist/jquery.nanogallery2.core.min.js
@@ -20,12 +20,12 @@
*/
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports&&"function"==typeof require?e(require("jquery")):e(jQuery)}((function(e){"use strict";function t(e){var t=document.getElementById("ngyColorHelperToRGB");return null===t&&((t=document.createElement("div")).id="ngyColorHelperToRGB",t.style.cssText="display: none; color:"+e+";",document.body.appendChild(t)),getComputedStyle(t).color}function n(e,t,n){var i="";if("RGBA("==t.toUpperCase().substring(0,5)&&(i="a",t="rgb("+t.substring(5)),"number"!=typeof e||e<-1||e>1||"string"!=typeof t||"r"!=t[0]&&"#"!=t[0]||"string"!=typeof n&&void 0!==n)return null;function a(e){var t=e.length,n=new Object;if(t>9){if((e=e.split(",")).length<3||e.length>4)return null;n[0]=o(e[0].slice(4)),n[1]=o(e[1]),n[2]=o(e[2]),n[3]=e[3]?parseFloat(e[3]):-1}else{if(8==t||6==t||t<4)return null;t<6&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+(t>4?e[4]+""+e[4]:"")),e=o(e.slice(1),16),n[0]=e>>16&255,n[1]=e>>8&255,n[2]=255&e,n[3]=9==t||5==t?r((e>>24&255)/255*1e4)/1e4:-1}return n}var o=parseInt,r=Math.round,l=t.length>9,s=(l="string"==typeof n?n.length>9||"c"==n&&!l:l,e<0),u=(e=s?-1*e:e,n=n&&"c"!=n?n:s?"#000000":"#FFFFFF",a(t)),c=a(n);return u&&c?l?"rgb"+i+"("+r((c[0]-u[0])*e+u[0])+","+r((c[1]-u[1])*e+u[1])+","+r((c[2]-u[2])*e+u[2])+(u[3]<0&&c[3]<0?")":","+(u[3]>-1&&c[3]>-1?r(1e4*((c[3]-u[3])*e+u[3]))/1e4:c[3]<0?u[3]:c[3])+")"):"#"+(4294967296+16777216*(u[3]>-1&&c[3]>-1?r(255*((c[3]-u[3])*e+u[3])):c[3]>-1?r(255*c[3]):u[3]>-1?r(255*u[3]):255)+65536*r((c[0]-u[0])*e+u[0])+256*r((c[1]-u[1])*e+u[1])+r((c[2]-u[2])*e+u[2])).toString(16).slice(u[3]>-1||c[3]>-1?1:3):null}function i(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)t[n]=i(e[n]);return t}function a(){var e=jQuery(window);return{l:e.scrollLeft(),t:e.scrollTop(),w:e.width(),h:e.height()}}function o(e,t){var n=0;""==e&&(e="*"),jQuery(e).each((function(){var e=parseInt(jQuery(this).css("z-index"));n=e>n?e:n})),n++,jQuery(t).css("z-index",n)}var r=function(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()};function l(){this.LightboxReOpen=function(){m()},this.ReloadAlbum=function(){if(""===u.O.kind)throw"Not supported for this content source:"+u.O.kind;var e=u.GOM.albumIdx;if(-1==e)throw"Current album not found.";for(var t=u.I[e].GetID(),n=u.I.length,i=0;i1&&e--,u.GOM.pagination.currentPage=e,u.GOM.ScrollToTop(),L(),C(!0),!1},this.PaginationCountPages=function(){return 0==u.GOM.items.length?0:Math.ceil((u.GOM.items[u.GOM.items.length-1].row+1)/u.galleryMaxRows.Get())};var s=function(e,t,n){var i;return function(){var a=this,o=arguments;function r(){n||e.apply(a,o),i=null}i?clearTimeout(i):n&&e.apply(a,o),i=setTimeout(r,t||100)}};window.ng_draf=function(e){return requestAnimationFrame((function(){window.requestAnimationFrame(e)}))},window.requestTimeout=function(e,t){if(!(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame&&window.mozCancelRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame))return window.setTimeout(e,t);var n=(new Date).getTime(),i=new Object;return i.value=requestAnimFrame((function a(){(new Date).getTime()-n>=t?e.call():i.value=requestAnimFrame(a)})),i},window.requestAnimFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e,t){window.setTimeout(e,1e3/60)},window.clearRequestTimeout=function(e){window.cancelAnimationFrame?window.cancelAnimationFrame(e.value):window.webkitCancelAnimationFrame?window.webkitCancelAnimationFrame(e.value):window.webkitCancelRequestAnimationFrame?window.webkitCancelRequestAnimationFrame(e.value):window.mozCancelRequestAnimationFrame?window.mozCancelRequestAnimationFrame(e.value):window.oCancelRequestAnimationFrame?window.oCancelRequestAnimationFrame(e.value):window.msCancelRequestAnimationFrame?window.msCancelRequestAnimationFrame(e.value):clearTimeout(e)};var u=this;function c(e){this.$e=null,this.ngy2ItemIdx=e,this.mediaNumber=u.VOM.items.length+1,this.posX=0,this.posY=0}u.I=[],u.Id=[],u.O=null,u.baseEltID=null,u.$E={base:null,conTnParent:null,conLoadingB:null,conConsole:null,conNavigationBar:null,conTnBottom:null,scrollableParent:null},u.shoppingCart=[],u.layout={internal:!0,engine:"",support:{rows:!1},prerequisite:{imageSize:!1},SetEngine:function(){if(u.layout.internal){if("auto"==u.tn.settings.width[u.GOM.curNavLevel][u.GOM.curWidth]||""==u.tn.settings.width[u.GOM.curNavLevel][u.GOM.curWidth])return u.layout.engine="JUSTIFIED",u.layout.support.rows=!0,void(u.layout.prerequisite.imageSize=!0);if("auto"==u.tn.settings.height[u.GOM.curNavLevel][u.GOM.curWidth]||""==u.tn.settings.height[u.GOM.curNavLevel][u.GOM.curWidth])return u.layout.engine="CASCADING",u.layout.support.rows=!1,void(u.layout.prerequisite.imageSize=!0);if(null!=u.tn.settings.getMosaic())return u.layout.engine="MOSAIC",u.layout.support.rows=!0,void(u.layout.prerequisite.imageSize=!1);u.layout.engine="GRID",u.layout.support.rows=!0,u.layout.prerequisite.imageSize=!1}}},u.galleryResizeEventEnabled=!1,u.galleryMaxRows={l1:0,lN:0,Get:function(){return u.galleryMaxRows[u.GOM.curNavLevel]}},u.galleryMaxItems={l1:0,lN:0,Get:function(){return u.galleryMaxItems[u.GOM.curNavLevel]}},u.galleryFilterTags={l1:0,lN:0,Get:function(){return u.galleryFilterTags[u.GOM.curNavLevel]}},u.galleryFilterTagsMode={l1:0,lN:0,Get:function(){return u.galleryFilterTagsMode[u.GOM.curNavLevel]}},u.galleryDisplayMode={l1:"FULLCONTENT",lN:"FULLCONTENT",Get:function(){return u.galleryDisplayMode[u.GOM.curNavLevel]}},u.galleryLastRowFull={l1:!1,lN:!1,Get:function(){return u.galleryLastRowFull[u.GOM.curNavLevel]}},u.gallerySorting={l1:"",lN:"",Get:function(){return u.gallerySorting[u.GOM.curNavLevel]}},u.galleryDisplayTransition={l1:"none",lN:"none",Get:function(){return u.galleryDisplayTransition[u.GOM.curNavLevel]}},u.galleryDisplayTransitionDuration={l1:500,lN:500,Get:function(){return u.galleryDisplayTransitionDuration[u.GOM.curNavLevel]}},u.$currentTouchedThumbnail=null,u.tn={opt:{l1:{crop:!0,stacks:0,stacksTranslateX:0,stacksTranslateY:0,stacksTranslateZ:0,stacksRotateX:0,stacksRotateY:0,stacksRotateZ:0,stacksScale:0,borderHorizontal:0,borderVertical:0,baseGridHeight:0,displayTransition:"FADEIN",displayTransitionStartVal:0,displayTransitionEasing:"easeOutQuart",displayTransitionDuration:240,displayInterval:15},lN:{crop:!0,stacks:0,stacksTranslateX:0,stacksTranslateY:0,stacksTranslateZ:0,stacksRotateX:0,stacksRotateY:0,stacksRotateZ:0,stacksScale:0,borderHorizontal:0,borderVertical:0,baseGridHeight:0,displayTransition:"FADEIN",displayTransitionStartVal:0,displayTransitionEasing:"easeOutQuart",displayTransitionDuration:240,displayInterval:15},Get:function(e){return u.tn.opt[u.GOM.curNavLevel][e]}},scale:1,labelHeight:{l1:0,lN:0,get:function(){return u.tn.labelHeight[u.GOM.curNavLevel]}},defaultSize:{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}},getWidth:function(){return u.tn.defaultSize.width[u.GOM.curNavLevel][u.GOM.curWidth]},getOuterWidth:function(){u.tn.borderWidth=u.tn.opt.Get("borderHorizontal"),u.tn.borderHeight=u.tn.opt.Get("borderVertical");var e=u.tn.defaultSize.width[u.GOM.curNavLevel][u.GOM.curWidth]+2*u.tn.opt.Get("borderHorizontal");return"right"!=u.O.thumbnailLabel.get("position")&&"left"!=u.O.thumbnailLabel.get("position")||(e+=u.tn.defaultSize.width[u.GOM.curNavLevel][u.GOM.curWidth]),e},getHeight:function(){return u.tn.defaultSize.height[u.GOM.curNavLevel][u.GOM.curWidth]},getOuterHeight:function(){return u.tn.defaultSize.height[u.GOM.curNavLevel][u.GOM.curWidth]+2*u.tn.opt.Get("borderVertical")}},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(e,t){var n=null==e?u.GOM.curNavLevel:e,i=null==t?u.GOM.curWidth:t;return"MOSAIC"==u.layout.engine?this.height[n][i]*this.mosaic[n+"Factor"].h[i]:this.height[n][i]},getW:function(e,t){var n=null==e?u.GOM.curNavLevel:e,i=null==t?u.GOM.curWidth:t;return"MOSAIC"==u.layout.engine?this.width[n][i]*this.mosaic[n+"Factor"].w[i]:this.width[n][i]},mosaic:{l1:{xs:null,sm:null,me:null,la:null,xl:null},lN:{xs:null,sm:null,me:null,la:null,xl:null},l1Factor:{h:{xs:1,sm:1,me:1,la:1,xl:1},w:{xs:1,sm:1,me:1,la:1,xl:1}},lNFactor:{h:{xs:1,sm:1,me:1,la:1,xl:1},w:{xs:1,sm:1,me:1,la:1,xl:1}}},getMosaic:function(){return this.mosaic[u.GOM.curNavLevel][u.GOM.curWidth]},mosaicCalcFactor:function(e,t){for(var n=1,i=1,a=0;at?(r&&(clearTimeout(r),r=null),l=u,o=e.apply(i,a),r||(i=a=null)):r||!1===n.trailing||(r=setTimeout(s,c)),o}}(x,15,{leading:!1}),u.blockList=null,u.allowList=null,u.albumList=[],u.locationHashLastUsed="",u.custGlobals={},u.touchAutoOpenDelayTimerID=0,u.i18nLang="",u.timeLastTouchStart=0,u.custGlobals={},u.markupOrApiProcessed=!1,u.GOM={albumIdx:-1,clipArea:{top:0,height:0},displayArea:{width:0,height:0},displayAreaLast:{width:0,height:0},displayedMoreSteps:0,items:[],$imgPreloader:[],thumbnails2Display:[],itemsDisplayed:0,firstDisplay:!0,firstDisplayTime:0,navigationBar:{displayed:!1,$newContent:""},cache:{viewport:null,containerOffset:null,areaWidth:100},nbSelected:0,pagination:{currentPage:0},panThreshold:60,panYOnly:!1,lastFullRow:-1,lastDisplayedIdx:-1,displayInterval:{from:0,len:0},hammertime:null,curNavLevel:"l1",curWidth:"me",albumSearch:"",albumSearchTags:"",lastZIndex:0,lastRandomValue:0,slider:{hostIdx:-1,hostItem:null,currentIdx:0,nextIdx:0,timerID:0,tween:null},NGY2Item:function(e){if(null==u.GOM.items[e]||null==u.GOM.items[e])return null;var t=u.GOM.items[e].thumbnailIdx;return u.I[t]},GTn:function(e,t,n){this.thumbnailIdx=e,this.width=0,this.height=0,this.top=0,this.left=0,this.row=0,this.imageWidth=t,this.imageHeight=n,this.resizedContentWidth=0,this.resizedContentHeight=0,this.displayed=!1,this.neverDisplayed=!0,this.inDisplayArea=!1},ScrollToTop:function(){var e,t,n,i;if(!u.GOM.firstDisplay&&(null!==u.$E.scrollableParent||(e=u.$E.base,t=20,n=a(),(i=e.offset()).top>=n.t&&i.top<=n.t+n.h-t)||u.$E.base.get(0).scrollIntoView(),null!==u.$E.scrollableParent)){var o=u.$E.scrollableParent.scrollTop(),r=Math.abs(u.$E.scrollableParent.offset().top-u.$E.base.offset().top-o);o>r&&window.ng_draf((function(){u.$E.scrollableParent.scrollTop(r)}))}}},u.VOM={viewerDisplayed:!1,viewerIsFullscreen:!1,infoDisplayed:!1,toolbarsDisplayed:!0,toolsHide:null,zoom:{posX:0,posY:0,userFactor:1,isZooming:!1},padding:{H:0,V:0},window:{lastWidth:0,lastHeight:0},$viewer:null,$toolbar:null,$toolbarTL:null,$toolbarTR:null,toolbarMode:"std",playSlideshow:!1,playSlideshowTimerID:0,slideshowDelay:3e3,albumID:-1,viewerMediaIsChanged:!1,items:[],panMode:"off",$baseCont:null,$content:null,content:{previous:{vIdx:-1,$media:null,NGY2Item:function(){return u.I[u.VOM.items[u.VOM.content.previous.vIdx].ngy2ItemIdx]}},current:{vIdx:-1,$media:null,NGY2Item:function(){return u.I[u.VOM.items[u.VOM.content.current.vIdx].ngy2ItemIdx]}},next:{vIdx:-1,$media:null,NGY2Item:function(){return u.I[u.VOM.items[u.VOM.content.next.vIdx].ngy2ItemIdx]}}},IdxNext:function(){var e=0;return u.VOM.content.current.vIdx=t){var n=this.oneTmbWidth*u.VOM.content.current.vIdx;n+this.posX=this.vwidth&&(this.posX=this.vwidth-(n+this.oneTmbWidth))}this.PanGallery(0)}},PanGallery:function(e){this.gwidththis.vwidth-this.oneTmbWidth&&(this.posX=this.vwidth-this.oneTmbWidth),this.posX+this.gwidthu.VOM.ImageLoader.maxChecks?(u.VOM.ImageLoader.list[i]=null,e.callback(0,0,e.ngitem,e.checks)):(t++,e.checks++));0==t&&(u.VOM.ImageLoader.list=[],clearInterval(u.VOM.ImageLoader.intervalHandle),delete u.VOM.ImageLoader.intervalHandle)}}},u.popup={isDisplayed:!1,$elt:null,close:function(){null!=this.$elt&&(new NGTweenable).tween({from:{opacity:1},to:{opacity:0},attachment:{t:this},easing:"easeInOutSine",duration:100,step:function(e,t){null!=t.t.$elt&&t.t.$elt.css("opacity",e.opacity)},finish:function(e,t){null!=t.t.$elt&&(t.t.$elt.remove(),t.t.$elt=null),t.t.isDisplayed=!1}})}},u.galleryTheme_dark={navigationBar:{background:"none",borderTop:"",borderBottom:"",borderRight:"",borderLeft:""},navigationBreadcrumb:{background:"#111",color:"#fff",colorHover:"#ccc",borderRadius:"4px"},navigationFilter:{color:"#ddd",background:"#111",colorSelected:"#fff",backgroundSelected:"#111",borderRadius:"4px"},navigationPagination:{background:"#111",color:"#fff",colorHover:"#ccc",borderRadius:"4px"},thumbnail:{background:"#444",backgroundImage:"linear-gradient(315deg, #111 0%, #445 90%)",borderColor:"#000",borderRadius:"0px",labelOpacity:1,labelBackground:"rgba(34, 34, 34, 0)",titleColor:"#fff",titleBgColor:"transparent",titleShadow:"",descriptionColor:"#ccc",descriptionBgColor:"transparent",descriptionShadow:"",stackBackground:"#aaa"},thumbnailIcon:{padding:"5px",color:"#fff",shadow:""},pagination:{background:"#181818",backgroundSelected:"#666",color:"#fff",borderRadius:"2px",shapeBorder:"3px solid #666",shapeColor:"#444",shapeSelectedColor:"#aaa"}},u.galleryTheme_light={navigationBar:{background:"none",borderTop:"",borderBottom:"",borderRight:"",borderLeft:""},navigationBreadcrumb:{background:"#eee",color:"#000",colorHover:"#333",borderRadius:"4px"},navigationFilter:{background:"#eee",color:"#222",colorSelected:"#000",backgroundSelected:"#eee",borderRadius:"4px"},navigationPagination:{background:"#eee",color:"#000",colorHover:"#333",borderRadius:"4px"},thumbnail:{background:"#444",backgroundImage:"linear-gradient(315deg, #111 0%, #445 90%)",borderColor:"#000",labelOpacity:1,labelBackground:"rgba(34, 34, 34, 0)",titleColor:"#fff",titleBgColor:"transparent",titleShadow:"",descriptionColor:"#ccc",descriptionBgColor:"transparent",descriptionShadow:"",stackBackground:"#888"},thumbnailIcon:{padding:"5px",color:"#fff"},pagination:{background:"#eee",backgroundSelected:"#aaa",color:"#000",borderRadius:"2px",shapeBorder:"3px solid #666",shapeColor:"#444",shapeSelectedColor:"#aaa"}},u.viewerTheme_dark={background:"#000",barBackground:"rgba(4, 4, 4, 0.2)",barBorder:"0px solid #111",barColor:"#fff",barDescriptionColor:"#ccc"},u.viewerTheme_light={background:"#f8f8f8",barBackground:"rgba(4, 4, 4, 0.7)",barBorder:"0px solid #111",barColor:"#fff",barDescriptionColor:"#ccc"};var h=NGY2Tools.NanoAlert,d=NGY2Tools.NanoConsoleLog;function m(){u.VOM.items=[],u.VOM.albumID="0",u.GOM.curNavLevel="l1";for(var e=0,t=u.$E.base[0].src,n=void 0,i=0;i0?De(n):d(u,"No content for Lightbox standalone.")}function p(e){var t={albumID:"0",imageID:"0"},n=e.split("/");return n.length>0&&(t.albumID=n[0],n.length>1&&(t.imageID=n[1])),t}function g(e,t){u.VOM.viewerDisplayed&&tt(null);var n=NGY2Item.GetIdx(u,t);u.GOM.curNavLevel="lN",0==n&&(u.GOM.curNavLevel="l1"),u.layout.SetEngine(),u.galleryResizeEventEnabled=!1,-1==n&&(NGY2Item.New(u,"","",t,"0","album"),n=u.I.length-1),u.I[n].contentIsLoaded?(de(),u.GOM.pagination.currentPage=0,rt(t,""),w(n)):q(t,g,e,t)}function f(){switch(u.galleryDisplayMode.Get()){case"PAGINATION":u.layout.support.rows&&u.galleryMaxRows.Get()>0&&function(){if(u.$E.conTnBottom.css("opacity",0),u.$E.conTnBottom.children().remove(),0==u.GOM.items.length)return;var e=Math.ceil((u.GOM.items[u.GOM.items.length-1].row+1)/u.galleryMaxRows.Get());if(1==e)return;u.GOM.pagination.currentPage>e-1&&(u.GOM.pagination.currentPage=e-1);if(M(),0==u.GOM.displayInterval.len)return;if("NUMBERS"==u.O.galleryPaginationMode&&u.GOM.pagination.currentPage>0){jQuery('").appendTo(u.$E.conTnBottom).click((function(e){G()}))}var t=0,n=e;if("NUMBERS"!=u.O.galleryPaginationMode)t=0;else{var i=u.O.paginationVisiblePages;if(i>=e)t=0;else{var a=0;a=i%2==1?(i+1)/2:i/2,u.GOM.pagination.currentPagee&&(n=e-1)):(t=u.GOM.pagination.currentPage-a,(n=t+i)>e&&(n=e-1)),n-t'+l+"").appendTo(u.$E.conTnBottom);s.data("pageNumber",o),s.click((function(e){u.GOM.pagination.currentPage=jQuery(this).data("pageNumber"),at("pageChanged"),u.GOM.ScrollToTop(),L(),C(!0)}))}if("NUMBERS"==u.O.galleryPaginationMode&&u.GOM.pagination.currentPage+1
"):t.$E.conConsole.append("nanogallery2: "+n+" ["+t.baseEltID+"]
"))},e.NanoConsoleLog=function(e,t){window.console&&console.log("nanogallery2: "+t+" ["+e.baseEltID+"]")},e.PreloaderDisplay=function(e){if(!0===e){if(this.$E.conLoadingB.removeClass("nanoGalleryLBarOff").addClass("nanoGalleryLBar"),null!=this.GOM.albumIdxLoading&&-1!=this.GOM.albumIdxLoading){this.I[this.GOM.albumIdxLoading].$Elts[".nGY2TnImg"].addClass("nGY2GThumbnailLoaderDisplayed")}}else if(this.$E.conLoadingB.removeClass("nanoGalleryLBar").addClass("nanoGalleryLBarOff"),null!=this.GOM.albumIdxLoading&&-1!=this.GOM.albumIdxLoading){this.I[this.GOM.albumIdxLoading].$Elts[".nGY2TnImg"].removeClass("nGY2GThumbnailLoaderDisplayed")}},e.AreaShuffle=function(e){for(var t,n,i=e.length;i;t=Math.floor(Math.random()*i),n=e[--i],e[i]=e[t],e[t]=n);return e},e.GetImageTitleFromURL=function(e){return"%filename"==this.O.thumbnailLabel.get("title")?e.split("/").pop().replace("_"," "):"%filenameNoExt"==this.O.thumbnailLabel.get("title")?e.split("/").pop().split(".").shift().replace("_"," "):""},e.AlbumPostProcess=function(t){var n=this.gallerySorting[this.GOM.curNavLevel],i=this.galleryMaxItems[this.GOM.curNavLevel];if(""!=n||i>0){var a=this.I.filter((function(e){return e.albumID==t&&"albumUp"!=e.kind}));switch(n){case"RANDOM":a=e.AreaShuffle(a);break;case"REVERSED":a=a.reverse();break;case"TITLEASC":a.sort((function(e,t){return e.title.toUpperCase()t.title.toUpperCase()?1:0}));break;case"TITLEDESC":a.sort((function(e,t){return e.title.toUpperCase()>t.title.toUpperCase()?-1:e.title.toUpperCase()0&&a.length>i&&a.splice(i-1,a.length-i),this.I.removeIf((function(e){return e.albumID==t&&"albumUp"!=e.kind})),this.I.push.apply(this.I,a)}},e}(),window.NGY2Item=function(){var e=1;function t(t){var n=0;n=null==t?e++:t,this.GetID=function(){return n},this.kind="",this.mediaKind="img",this.mediaMarkup="",this.G=null,this.title="",this.description="",this.albumID=0,this.src="",this.width=0,this.height=0,this.destinationURL="",this.downloadURL="",this.author="",this.left=0,this.top=0,this.width=0,this.height=0,this.resizedContentWidth=0,this.resizedContentHeight=0,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.thumbnailImgRevealed=!1,this.imageDominantColors=null,this.imageDominantColor=null,this.featured=!1,this.flickrThumbSizes={},this.picasaThumbs=null,this.hovered=!1,this.hoverInitDone=!1,this.contentIsLoaded=!1,this.contentLength=0,this.numberItems=0,this.mediaNumber=0,this.mediaCounter=0,this.eltTransform=[],this.eltFilter=[],this.eltEffect=[],this.paginationLastPage=0,this.paginationLastWidth=0,this.customData={},this.selected=!1,this.imageWidth=0,this.imageHeight=0,this.$elt=null,this.$Elts=[],this.tags=[],this.albumTagList=[],this.albumTagListSel=[],this.exif={exposure:"",flash:"",focallength:"",fstop:"",iso:"",model:"",time:"",location:""},this.deleted=!1,this.rotationAngle=0}t.Get=function(e,t){for(var n=e.I.length,i=0;ie.title===n);void 0!==t&&(n=t.replace)}if(-1!=r&&0!=r&&"image gallery by nanogallery2 [build]"!=n&&e.O.thumbnailLevelUp&&0==u.getContentLength(!1)&&""==e.O.album){let n=new t("0");e.I.push(n),u.contentLength+=1,n.title="UP",n.albumID=r,n.kind="albumUp",n.G=e,jQuery.extend(!0,n.thumbs.width,e.tn.defaultSize.width),jQuery.extend(!0,n.thumbs.height,e.tn.defaultSize.height)}var c=t.Get(e,o);null===c&&(c=new t(o),e.I.push(c),-1!=r&&"image gallery by nanogallery2 [build]"!=n&&(u.contentLength+=1)),c.G=e,c.albumID=r,c.kind=l,"image"==l&&(u.mediaCounter+=1,c.mediaNumber=u.mediaCounter);var h=e.O.thumbnailFeaturedKeyword;if(""!=h){h=h.toUpperCase();var d=n.toUpperCase().indexOf(h);d>-1&&(c.featured=!0,n=n.substring(0,d)+n.substring(d+h.length,n.length)),(d=i.toUpperCase().indexOf(h))>-1&&(c.featured=!0,i=i.substring(0,d)+i.substring(d+h.length,i.length))}if("string"==typeof e.galleryFilterTags.Get())switch(e.galleryFilterTags.Get().toUpperCase()){case"TITLE":{let e,t=/(?:^|\W)#(\w+)(?!\w)/g,i=[];for(;e=t.exec(n);)i.push(e[1].replace(/^\s*|\s*$/,""));c.setTags(i),n=n.split("#").join("");break}case"DESCRIPTION":{let e,t=/(?:^|\W)#(\w+)(?!\w)/g,n=[];for(;e=t.exec(i);)n.push(e[1].replace(/^\s*|\s*$/,""));c.setTags(n),i=i.split("#").join("");break}}else""!=s&&null!=s&&c.setTags(s.split(" "));return c.title=a(e,n),c.description=a(e,i),c},t.prototype.delete=function(){this.deleted=!0,this.G.I[t.GetIdx(this.G,this.albumID)].contentLength--,this.G.I[t.GetIdx(this.G,this.albumID)].numberItems--;for(var e=this.G.GOM.items.length,n=this.GetID(),i=-1,a=-1,o=0;o":">",'"':""","'":"'","/":"/","`":"`","=":"="};function a(e,t){return 1==e.O.allowHTMLinData?t:String(t).replace(/[&<>"'`=\/]/g,(function(e){return i[e]}))}function o(e,t){if("0"===(e=String(e))||1==t)return e;var n=Number(e.replace(/[a-zA-Z]/g,"")),i=e.match(/([^\-0-9\.]+)/g),a="";return null!=i&&i.length>0&&(a=i.join()),isNaN(n)||0==n?e:(n*=t)+a}return t.get_nextId=function(){return e},t.prototype.$getElt=function(e,t){return null==this.$elt?null:(void 0!==this.$Elts[e]&&1==!t||(this.$Elts[e]=".nGY2GThumbnail"==e?this.$elt:this.$elt.find(e)),this.$Elts[e])},t.prototype.removeElt=function(e){if(null!=this.$elt&&null!=this.$Elts[e]){this.$Elts[e].remove();var t=this.$Elts.indexOf(e);this.$Elts.splice(t,1)}},t.prototype.album=function(){return this.G.I[t.GetIdx(this.G,this.albumID)]},t.prototype.mediaTransition=function(){return this.G.O.viewerTransitionMediaKind.indexOf(this.mediaKind)>-1},t.prototype.imageSet=function(e,t,n){this.src=e,this.width=t,this.height=n},t.prototype.thumbSet=function(e,t,n,i,a){var o=["xs","sm","me","la","xl"];if(void 0===i||""==i||null==i)for(var r=0;r0){this.tags=e;for(var t=this.album().albumTagList,n=0;n0){if(this.G.O.thumbnailLevelUp&&"albumUp"==this.kind)return!0;var e=!1,t=this.album().albumTagListSel;if(0==t.length)return!0;for(var n=0;n=0)return!0;return!1},t.prototype.setMediaURL=function(e,t){this.src=e,this.mediaKind=t,"img"==t&&(this.mediaMarkup='')},t.prototype.isToDisplay=function(e){return this.albumID==e&&this.checkTagFilter()&&this.isSearchFound()&&this.isSearchTagFound()&&0==this.deleted},t.prototype.getContentLength=function(e){if(0==e||0==this.albumTagList.length||0==this.G.galleryFilterTags.Get())return this.contentLength;for(var t=this.G.I.length,n=0,i=this.GetID(),a=0;a=0;h--){var d="translateX("+o(t.translateX,i)+") translateY("+o(t.translateY,a)+") translateZ("+o(t.translateZ,r)+") scale("+o(t.scale,c)+") translate("+o(t.translate,1)+")";this.G.IE<=9||this.G.isGingerbread?d+=" rotate("+o(t.rotateZ,u)+")":d+=" rotateX("+o(t.rotateX,l)+") rotateY("+o(t.rotateY,s)+") rotateZ("+o(t.rotateZ,u)+") rotate("+o(t.rotate,1)+")",t.$elt[h].style[this.G.CSStransformName]=d,n>0&&(i-=this.G.tn.opt.Get("stacksTranslateX"),a-=this.G.tn.opt.Get("stacksTranslateY"),r-=this.G.tn.opt.Get("stacksTranslateZ"),l-=this.G.tn.opt.Get("stacksRotateX"),s-=this.G.tn.opt.Get("stacksRotateY"),u-=this.G.tn.opt.Get("stacksRotateZ"),c-=this.G.tn.opt.Get("stacksScale"))}else if(null!=t.$elt)for(h=0;h',thumbnailImage:'',breadcrumbAlbum:'',breadcrumbHome:'',breadcrumbSeparator:'',breadcrumbSeparatorRtl:'',navigationFilterSelected:'',navigationFilterUnselected:'',navigationFilterSelectedAll:'',navigationPaginationPrevious:'',navigationPaginationNext:'',thumbnailSelected:'',thumbnailUnselected:'',thumbnailFeatured:'',thumbnailCounter:'',thumbnailShare:'',thumbnailDownload:'',thumbnailInfo:'',thumbnailShoppingcart:'',thumbnailDisplay:'',thumbnailCustomTool1:"T1",thumbnailCustomTool2:"T2",thumbnailCustomTool3:"T3",thumbnailCustomTool4:"T4",thumbnailCustomTool5:"T5",thumbnailCustomTool6:"T6",thumbnailCustomTool7:"T7",thumbnailCustomTool8:"T8",thumbnailCustomTool9:"T9",thumbnailCustomTool10:"T10",thumbnailAlbumUp:'',paginationNext:'',paginationPrevious:'',galleryMoreButton:' ',buttonClose:'',viewerPrevious:'',viewerNext:'',viewerImgPrevious:'',viewerImgNext:'',viewerDownload:'',viewerToolbarMin:'',viewerToolbarStd:'',viewerPlay:'',viewerPause:'',viewerFullscreenOn:'',viewerFullscreenOff:'',viewerZoomIn:'',viewerZoomOut:'',viewerLinkOriginal:'',viewerInfo:'',viewerShare:'',viewerRotateLeft:'',viewerRotateRight:'',viewerShoppingcart:'',user:'',location:'',picture:'',config:'',shareFacebook:'',shareTwitter:'',shareTumblr:'',sharePinterest:'',shareVK:'',shareMail:'',viewerCustomTool1:"T1",viewerCustomTool2:"T2",viewerCustomTool3:"T3",viewerCustomTool4:"T4",viewerCustomTool5:"T5",viewerCustomTool6:"T6",viewerCustomTool7:"T7",viewerCustomTool8:"T8",viewerCustomTool9:"T9",viewerCustomTool10:"T10"}},jQuery.fn.nanogallery2=function(t,n,i){if(void 0===jQuery(this).data("nanogallery2data")){if("destroy"==t)return;return this.each((function(){new jQuery.nanogallery2(this,t)}))}var a=e(this).data("nanogallery2data").nG2;if(void 0===t||!0!==t.lightboxStandalone){switch(t){case"displayItem":a.DisplayItem(n);break;case"search":return a.Search(n);case"search2":return a.Search2(n,i);case"search2Execute":return a.Search2Execute();case"refresh":a.Refresh();break;case"resize":a.Resize();break;case"instance":return a;case"data":return a.data={items:a.I,gallery:a.GOM,lightbox:a.VOM,shoppingcart:a.shoppingCart},a.data;case"reload":return a.ReloadAlbum(),e(this);case"itemsSelectedGet":return a.ItemsSelectedGet();case"itemsSetSelectedValue":a.ItemsSetSelectedValue(n,i);break;case"option":if(void 0===i)return a.Get(n);a.Set(n,i),"demoViewportWidth"==n&&e(window).trigger("resize");break;case"destroy":a.Destroy(),e(this).removeData("nanogallery2data");break;case"shoppingCartGet":return a.shoppingCart;case"shoppingCartUpdate":if(void 0===i||void 0===n)return!1;for(var o=n,r=i,l=0;l0)){var i=!1;if(null!==this.allowList){for(a=0;a"+n+""):t.$E.conConsole.append("nanogallery2: "+n+" ["+t.baseEltID+"]
"))},e.NanoConsoleLog=function(e,t){window.console&&console.log("nanogallery2: "+t+" ["+e.baseEltID+"]")},e.PreloaderDisplay=function(e){if(!0===e){if(this.$E.conLoadingB.removeClass("nanoGalleryLBarOff").addClass("nanoGalleryLBar"),null!=this.GOM.albumIdxLoading&&-1!=this.GOM.albumIdxLoading){this.I[this.GOM.albumIdxLoading].$Elts[".nGY2TnImg"].addClass("nGY2GThumbnailLoaderDisplayed")}}else if(this.$E.conLoadingB.removeClass("nanoGalleryLBar").addClass("nanoGalleryLBarOff"),null!=this.GOM.albumIdxLoading&&-1!=this.GOM.albumIdxLoading){this.I[this.GOM.albumIdxLoading].$Elts[".nGY2TnImg"].removeClass("nGY2GThumbnailLoaderDisplayed")}},e.AreaShuffle=function(e){for(var t,n,i=e.length;i;t=Math.floor(Math.random()*i),n=e[--i],e[i]=e[t],e[t]=n);return e},e.GetImageTitleFromURL=function(e){return"%filename"==this.O.thumbnailLabel.get("title")?e.split("/").pop().replace("_"," "):"%filenameNoExt"==this.O.thumbnailLabel.get("title")?e.split("/").pop().split(".").shift().replace("_"," "):""},e.AlbumPostProcess=function(t){var n=this.gallerySorting[this.GOM.curNavLevel],i=this.galleryMaxItems[this.GOM.curNavLevel];if(""!=n||i>0){var a=this.I.filter((function(e){return e.albumID==t&&"albumUp"!=e.kind}));switch(n){case"RANDOM":a=e.AreaShuffle(a);break;case"REVERSED":a=a.reverse();break;case"TITLEASC":a.sort((function(e,t){return e.title.toUpperCase()t.title.toUpperCase()?1:0}));break;case"TITLEDESC":a.sort((function(e,t){return e.title.toUpperCase()>t.title.toUpperCase()?-1:e.title.toUpperCase()0&&a.length>i&&a.splice(i-1,a.length-i),this.I.ngy2removeIf((function(e){return e.albumID==t&&"albumUp"!=e.kind})),this.I.push.apply(this.I,a)}},e}(),window.NGY2Item=function(){var e=1;function t(t){var n=0;n=null==t?e++:t,this.GetID=function(){return n},this.kind="",this.mediaKind="img",this.mediaMarkup="",this.G=null,this.title="",this.description="",this.albumID=0,this.src="",this.width=0,this.height=0,this.destinationURL="",this.downloadURL="",this.author="",this.left=0,this.top=0,this.width=0,this.height=0,this.resizedContentWidth=0,this.resizedContentHeight=0,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.thumbnailImgRevealed=!1,this.imageDominantColors=null,this.imageDominantColor=null,this.featured=!1,this.flickrThumbSizes={},this.picasaThumbs=null,this.hovered=!1,this.hoverInitDone=!1,this.contentIsLoaded=!1,this.contentLength=0,this.numberItems=0,this.mediaNumber=0,this.mediaCounter=0,this.eltTransform=[],this.eltFilter=[],this.eltEffect=[],this.paginationLastPage=0,this.paginationLastWidth=0,this.customData={},this.selected=!1,this.imageWidth=0,this.imageHeight=0,this.$elt=null,this.$Elts=[],this.tags=[],this.albumTagList=[],this.albumTagListSel=[],this.exif={exposure:"",flash:"",focallength:"",fstop:"",iso:"",model:"",time:"",location:""},this.deleted=!1,this.rotationAngle=0}t.Get=function(e,t){for(var n=e.I.length,i=0;ie.title===n);void 0!==t&&(n=t.replace)}if(-1!=r&&0!=r&&"image gallery by nanogallery2 [build]"!=n&&e.O.thumbnailLevelUp&&0==u.getContentLength(!1)&&""==e.O.album){let n=new t("0");e.I.push(n),u.contentLength+=1,n.title="UP",n.albumID=r,n.kind="albumUp",n.G=e,jQuery.extend(!0,n.thumbs.width,e.tn.defaultSize.width),jQuery.extend(!0,n.thumbs.height,e.tn.defaultSize.height)}var c=t.Get(e,o);null===c&&(c=new t(o),e.I.push(c),-1!=r&&"image gallery by nanogallery2 [build]"!=n&&(u.contentLength+=1)),c.G=e,c.albumID=r,c.kind=l,"image"==l&&(u.mediaCounter+=1,c.mediaNumber=u.mediaCounter);var h=e.O.thumbnailFeaturedKeyword;if(""!=h){h=h.toUpperCase();var d=n.toUpperCase().indexOf(h);d>-1&&(c.featured=!0,n=n.substring(0,d)+n.substring(d+h.length,n.length)),(d=i.toUpperCase().indexOf(h))>-1&&(c.featured=!0,i=i.substring(0,d)+i.substring(d+h.length,i.length))}if("string"==typeof e.galleryFilterTags.Get())switch(e.galleryFilterTags.Get().toUpperCase()){case"TITLE":{let e,t=/(?:^|\W)#(\w+)(?!\w)/g,i=[];for(;e=t.exec(n);)i.push(e[1].replace(/^\s*|\s*$/,""));c.setTags(i),n=n.split("#").join("");break}case"DESCRIPTION":{let e,t=/(?:^|\W)#(\w+)(?!\w)/g,n=[];for(;e=t.exec(i);)n.push(e[1].replace(/^\s*|\s*$/,""));c.setTags(n),i=i.split("#").join("");break}}else""!=s&&null!=s&&c.setTags(s.split(" "));return c.title=a(e,n),c.description=a(e,i),c},t.prototype.delete=function(){this.deleted=!0,this.G.I[t.GetIdx(this.G,this.albumID)].contentLength--,this.G.I[t.GetIdx(this.G,this.albumID)].numberItems--;for(var e=this.G.GOM.items.length,n=this.GetID(),i=-1,a=-1,o=0;o":">",'"':""","'":"'","/":"/","`":"`","=":"="};function a(e,t){return 1==e.O.allowHTMLinData?t:String(t).replace(/[&<>"'`=\/]/g,(function(e){return i[e]}))}function o(e,t){if("0"===(e=String(e))||1==t)return e;var n=Number(e.replace(/[a-zA-Z]/g,"")),i=e.match(/([^\-0-9\.]+)/g),a="";return null!=i&&i.length>0&&(a=i.join()),isNaN(n)||0==n?e:(n*=t)+a}return t.get_nextId=function(){return e},t.prototype.$getElt=function(e,t){return null==this.$elt?null:(void 0!==this.$Elts[e]&&1==!t||(this.$Elts[e]=".nGY2GThumbnail"==e?this.$elt:this.$elt.find(e)),this.$Elts[e])},t.prototype.removeElt=function(e){if(null!=this.$elt&&null!=this.$Elts[e]){this.$Elts[e].remove();var t=this.$Elts.indexOf(e);this.$Elts.splice(t,1)}},t.prototype.album=function(){return this.G.I[t.GetIdx(this.G,this.albumID)]},t.prototype.mediaTransition=function(){return this.G.O.viewerTransitionMediaKind.indexOf(this.mediaKind)>-1},t.prototype.imageSet=function(e,t,n){this.src=e,this.width=t,this.height=n},t.prototype.thumbSet=function(e,t,n,i,a){var o=["xs","sm","me","la","xl"];if(void 0===i||""==i||null==i)for(var r=0;r0){this.tags=e;for(var t=this.album().albumTagList,n=0;n0){if(this.G.O.thumbnailLevelUp&&"albumUp"==this.kind)return!0;var e=!1,t=this.album().albumTagListSel;if(0==t.length)return!0;for(var n=0;n=0)return!0;return!1},t.prototype.setMediaURL=function(e,t){this.src=e,this.mediaKind=t,"img"==t&&(this.mediaMarkup='')},t.prototype.isToDisplay=function(e){return this.albumID==e&&this.checkTagFilter()&&this.isSearchFound()&&this.isSearchTagFound()&&0==this.deleted},t.prototype.getContentLength=function(e){if(0==e||0==this.albumTagList.length||0==this.G.galleryFilterTags.Get())return this.contentLength;for(var t=this.G.I.length,n=0,i=this.GetID(),a=0;a=0;h--){var d="translateX("+o(t.translateX,i)+") translateY("+o(t.translateY,a)+") translateZ("+o(t.translateZ,r)+") scale("+o(t.scale,c)+") translate("+o(t.translate,1)+")";this.G.IE<=9||this.G.isGingerbread?d+=" rotate("+o(t.rotateZ,u)+")":d+=" rotateX("+o(t.rotateX,l)+") rotateY("+o(t.rotateY,s)+") rotateZ("+o(t.rotateZ,u)+") rotate("+o(t.rotate,1)+")",t.$elt[h].style[this.G.CSStransformName]=d,n>0&&(i-=this.G.tn.opt.Get("stacksTranslateX"),a-=this.G.tn.opt.Get("stacksTranslateY"),r-=this.G.tn.opt.Get("stacksTranslateZ"),l-=this.G.tn.opt.Get("stacksRotateX"),s-=this.G.tn.opt.Get("stacksRotateY"),u-=this.G.tn.opt.Get("stacksRotateZ"),c-=this.G.tn.opt.Get("stacksScale"))}else if(null!=t.$elt)for(h=0;h',thumbnailImage:'',breadcrumbAlbum:'',breadcrumbHome:'',breadcrumbSeparator:'',breadcrumbSeparatorRtl:'',navigationFilterSelected:'',navigationFilterUnselected:'',navigationFilterSelectedAll:'',navigationPaginationPrevious:'',navigationPaginationNext:'',thumbnailSelected:'',thumbnailUnselected:'',thumbnailFeatured:'',thumbnailCounter:'',thumbnailShare:'',thumbnailDownload:'',thumbnailInfo:'',thumbnailShoppingcart:'',thumbnailDisplay:'',thumbnailCustomTool1:"T1",thumbnailCustomTool2:"T2",thumbnailCustomTool3:"T3",thumbnailCustomTool4:"T4",thumbnailCustomTool5:"T5",thumbnailCustomTool6:"T6",thumbnailCustomTool7:"T7",thumbnailCustomTool8:"T8",thumbnailCustomTool9:"T9",thumbnailCustomTool10:"T10",thumbnailAlbumUp:'',paginationNext:'',paginationPrevious:'',galleryMoreButton:' ',buttonClose:'',viewerPrevious:'',viewerNext:'',viewerImgPrevious:'',viewerImgNext:'',viewerDownload:'',viewerToolbarMin:'',viewerToolbarStd:'',viewerPlay:'',viewerPause:'',viewerFullscreenOn:'',viewerFullscreenOff:'',viewerZoomIn:'',viewerZoomOut:'',viewerLinkOriginal:'',viewerInfo:'',viewerShare:'',viewerRotateLeft:'',viewerRotateRight:'',viewerShoppingcart:'',user:'',location:'',picture:'',config:'',shareFacebook:'',shareTwitter:'',shareTumblr:'',sharePinterest:'',shareVK:'',shareMail:'',viewerCustomTool1:"T1",viewerCustomTool2:"T2",viewerCustomTool3:"T3",viewerCustomTool4:"T4",viewerCustomTool5:"T5",viewerCustomTool6:"T6",viewerCustomTool7:"T7",viewerCustomTool8:"T8",viewerCustomTool9:"T9",viewerCustomTool10:"T10"}},jQuery.fn.nanogallery2=function(t,n,i){if(void 0===jQuery(this).data("nanogallery2data")){if("destroy"==t)return;return this.each((function(){new jQuery.nanogallery2(this,t)}))}var a=e(this).data("nanogallery2data").nG2;if(void 0===t||!0!==t.lightboxStandalone){switch(t){case"displayItem":a.DisplayItem(n);break;case"search":return a.Search(n);case"search2":return a.Search2(n,i);case"search2Execute":return a.Search2Execute();case"refresh":a.Refresh();break;case"resize":a.Resize();break;case"instance":return a;case"data":return a.data={items:a.I,gallery:a.GOM,lightbox:a.VOM,shoppingcart:a.shoppingCart},a.data;case"reload":return a.ReloadAlbum(),e(this);case"itemsSelectedGet":return a.ItemsSelectedGet();case"itemsSetSelectedValue":a.ItemsSetSelectedValue(n,i);break;case"option":if(void 0===i)return a.Get(n);a.Set(n,i),"demoViewportWidth"==n&&e(window).trigger("resize");break;case"destroy":a.Destroy(),e(this).removeData("nanogallery2data");break;case"shoppingCartGet":return a.shoppingCart;case"shoppingCartUpdate":if(void 0===i||void 0===n)return!1;for(var o=n,r=i,l=0;l removes items from array base on a function's result
- Array.prototype.removeIf = function(callback) {
+ // array.ngy2removeIf -> removes items from array base on a function's result
+ Array.prototype.ngy2removeIf = function(callback) {
var i = this.length;
while (i--) {
if (callback(this[i], i)) {
diff --git a/dist/jquery.nanogallery2.min.js b/dist/jquery.nanogallery2.min.js
index 20c0a727..7c03a478 100644
--- a/dist/jquery.nanogallery2.min.js
+++ b/dist/jquery.nanogallery2.min.js
@@ -20,12 +20,12 @@
*/
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports&&"function"==typeof require?e(require("jquery")):e(jQuery)}((function(e){"use strict";function t(e){var t=document.getElementById("ngyColorHelperToRGB");return null===t&&((t=document.createElement("div")).id="ngyColorHelperToRGB",t.style.cssText="display: none; color:"+e+";",document.body.appendChild(t)),getComputedStyle(t).color}function n(e,t,n){var i="";if("RGBA("==t.toUpperCase().substring(0,5)&&(i="a",t="rgb("+t.substring(5)),"number"!=typeof e||e<-1||e>1||"string"!=typeof t||"r"!=t[0]&&"#"!=t[0]||"string"!=typeof n&&void 0!==n)return null;function a(e){var t=e.length,n=new Object;if(t>9){if((e=e.split(",")).length<3||e.length>4)return null;n[0]=o(e[0].slice(4)),n[1]=o(e[1]),n[2]=o(e[2]),n[3]=e[3]?parseFloat(e[3]):-1}else{if(8==t||6==t||t<4)return null;t<6&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+(t>4?e[4]+""+e[4]:"")),e=o(e.slice(1),16),n[0]=e>>16&255,n[1]=e>>8&255,n[2]=255&e,n[3]=9==t||5==t?r((e>>24&255)/255*1e4)/1e4:-1}return n}var o=parseInt,r=Math.round,l=t.length>9,s=(l="string"==typeof n?n.length>9||"c"==n&&!l:l,e<0),u=(e=s?-1*e:e,n=n&&"c"!=n?n:s?"#000000":"#FFFFFF",a(t)),c=a(n);return u&&c?l?"rgb"+i+"("+r((c[0]-u[0])*e+u[0])+","+r((c[1]-u[1])*e+u[1])+","+r((c[2]-u[2])*e+u[2])+(u[3]<0&&c[3]<0?")":","+(u[3]>-1&&c[3]>-1?r(1e4*((c[3]-u[3])*e+u[3]))/1e4:c[3]<0?u[3]:c[3])+")"):"#"+(4294967296+16777216*(u[3]>-1&&c[3]>-1?r(255*((c[3]-u[3])*e+u[3])):c[3]>-1?r(255*c[3]):u[3]>-1?r(255*u[3]):255)+65536*r((c[0]-u[0])*e+u[0])+256*r((c[1]-u[1])*e+u[1])+r((c[2]-u[2])*e+u[2])).toString(16).slice(u[3]>-1||c[3]>-1?1:3):null}function i(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)t[n]=i(e[n]);return t}function a(){var e=jQuery(window);return{l:e.scrollLeft(),t:e.scrollTop(),w:e.width(),h:e.height()}}function o(e,t){var n=0;""==e&&(e="*"),jQuery(e).each((function(){var e=parseInt(jQuery(this).css("z-index"));n=e>n?e:n})),n++,jQuery(t).css("z-index",n)}var r=function(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()};function l(){this.LightboxReOpen=function(){m()},this.ReloadAlbum=function(){if(""===u.O.kind)throw"Not supported for this content source:"+u.O.kind;var e=u.GOM.albumIdx;if(-1==e)throw"Current album not found.";for(var t=u.I[e].GetID(),n=u.I.length,i=0;i1&&e--,u.GOM.pagination.currentPage=e,u.GOM.ScrollToTop(),L(),E(!0),!1},this.PaginationCountPages=function(){return 0==u.GOM.items.length?0:Math.ceil((u.GOM.items[u.GOM.items.length-1].row+1)/u.galleryMaxRows.Get())};var s=function(e,t,n){var i;return function(){var a=this,o=arguments;function r(){n||e.apply(a,o),i=null}i?clearTimeout(i):n&&e.apply(a,o),i=setTimeout(r,t||100)}};window.ng_draf=function(e){return requestAnimationFrame((function(){window.requestAnimationFrame(e)}))},window.requestTimeout=function(e,t){if(!(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame&&window.mozCancelRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame))return window.setTimeout(e,t);var n=(new Date).getTime(),i=new Object;return i.value=requestAnimFrame((function a(){(new Date).getTime()-n>=t?e.call():i.value=requestAnimFrame(a)})),i},window.requestAnimFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e,t){window.setTimeout(e,1e3/60)},window.clearRequestTimeout=function(e){window.cancelAnimationFrame?window.cancelAnimationFrame(e.value):window.webkitCancelAnimationFrame?window.webkitCancelAnimationFrame(e.value):window.webkitCancelRequestAnimationFrame?window.webkitCancelRequestAnimationFrame(e.value):window.mozCancelRequestAnimationFrame?window.mozCancelRequestAnimationFrame(e.value):window.oCancelRequestAnimationFrame?window.oCancelRequestAnimationFrame(e.value):window.msCancelRequestAnimationFrame?window.msCancelRequestAnimationFrame(e.value):clearTimeout(e)};var u=this;function c(e){this.$e=null,this.ngy2ItemIdx=e,this.mediaNumber=u.VOM.items.length+1,this.posX=0,this.posY=0}u.I=[],u.Id=[],u.O=null,u.baseEltID=null,u.$E={base:null,conTnParent:null,conLoadingB:null,conConsole:null,conNavigationBar:null,conTnBottom:null,scrollableParent:null},u.shoppingCart=[],u.layout={internal:!0,engine:"",support:{rows:!1},prerequisite:{imageSize:!1},SetEngine:function(){if(u.layout.internal){if("auto"==u.tn.settings.width[u.GOM.curNavLevel][u.GOM.curWidth]||""==u.tn.settings.width[u.GOM.curNavLevel][u.GOM.curWidth])return u.layout.engine="JUSTIFIED",u.layout.support.rows=!0,void(u.layout.prerequisite.imageSize=!0);if("auto"==u.tn.settings.height[u.GOM.curNavLevel][u.GOM.curWidth]||""==u.tn.settings.height[u.GOM.curNavLevel][u.GOM.curWidth])return u.layout.engine="CASCADING",u.layout.support.rows=!1,void(u.layout.prerequisite.imageSize=!0);if(null!=u.tn.settings.getMosaic())return u.layout.engine="MOSAIC",u.layout.support.rows=!0,void(u.layout.prerequisite.imageSize=!1);u.layout.engine="GRID",u.layout.support.rows=!0,u.layout.prerequisite.imageSize=!1}}},u.galleryResizeEventEnabled=!1,u.galleryMaxRows={l1:0,lN:0,Get:function(){return u.galleryMaxRows[u.GOM.curNavLevel]}},u.galleryMaxItems={l1:0,lN:0,Get:function(){return u.galleryMaxItems[u.GOM.curNavLevel]}},u.galleryFilterTags={l1:0,lN:0,Get:function(){return u.galleryFilterTags[u.GOM.curNavLevel]}},u.galleryFilterTagsMode={l1:0,lN:0,Get:function(){return u.galleryFilterTagsMode[u.GOM.curNavLevel]}},u.galleryDisplayMode={l1:"FULLCONTENT",lN:"FULLCONTENT",Get:function(){return u.galleryDisplayMode[u.GOM.curNavLevel]}},u.galleryLastRowFull={l1:!1,lN:!1,Get:function(){return u.galleryLastRowFull[u.GOM.curNavLevel]}},u.gallerySorting={l1:"",lN:"",Get:function(){return u.gallerySorting[u.GOM.curNavLevel]}},u.galleryDisplayTransition={l1:"none",lN:"none",Get:function(){return u.galleryDisplayTransition[u.GOM.curNavLevel]}},u.galleryDisplayTransitionDuration={l1:500,lN:500,Get:function(){return u.galleryDisplayTransitionDuration[u.GOM.curNavLevel]}},u.$currentTouchedThumbnail=null,u.tn={opt:{l1:{crop:!0,stacks:0,stacksTranslateX:0,stacksTranslateY:0,stacksTranslateZ:0,stacksRotateX:0,stacksRotateY:0,stacksRotateZ:0,stacksScale:0,borderHorizontal:0,borderVertical:0,baseGridHeight:0,displayTransition:"FADEIN",displayTransitionStartVal:0,displayTransitionEasing:"easeOutQuart",displayTransitionDuration:240,displayInterval:15},lN:{crop:!0,stacks:0,stacksTranslateX:0,stacksTranslateY:0,stacksTranslateZ:0,stacksRotateX:0,stacksRotateY:0,stacksRotateZ:0,stacksScale:0,borderHorizontal:0,borderVertical:0,baseGridHeight:0,displayTransition:"FADEIN",displayTransitionStartVal:0,displayTransitionEasing:"easeOutQuart",displayTransitionDuration:240,displayInterval:15},Get:function(e){return u.tn.opt[u.GOM.curNavLevel][e]}},scale:1,labelHeight:{l1:0,lN:0,get:function(){return u.tn.labelHeight[u.GOM.curNavLevel]}},defaultSize:{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}},getWidth:function(){return u.tn.defaultSize.width[u.GOM.curNavLevel][u.GOM.curWidth]},getOuterWidth:function(){u.tn.borderWidth=u.tn.opt.Get("borderHorizontal"),u.tn.borderHeight=u.tn.opt.Get("borderVertical");var e=u.tn.defaultSize.width[u.GOM.curNavLevel][u.GOM.curWidth]+2*u.tn.opt.Get("borderHorizontal");return"right"!=u.O.thumbnailLabel.get("position")&&"left"!=u.O.thumbnailLabel.get("position")||(e+=u.tn.defaultSize.width[u.GOM.curNavLevel][u.GOM.curWidth]),e},getHeight:function(){return u.tn.defaultSize.height[u.GOM.curNavLevel][u.GOM.curWidth]},getOuterHeight:function(){return u.tn.defaultSize.height[u.GOM.curNavLevel][u.GOM.curWidth]+2*u.tn.opt.Get("borderVertical")}},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(e,t){var n=null==e?u.GOM.curNavLevel:e,i=null==t?u.GOM.curWidth:t;return"MOSAIC"==u.layout.engine?this.height[n][i]*this.mosaic[n+"Factor"].h[i]:this.height[n][i]},getW:function(e,t){var n=null==e?u.GOM.curNavLevel:e,i=null==t?u.GOM.curWidth:t;return"MOSAIC"==u.layout.engine?this.width[n][i]*this.mosaic[n+"Factor"].w[i]:this.width[n][i]},mosaic:{l1:{xs:null,sm:null,me:null,la:null,xl:null},lN:{xs:null,sm:null,me:null,la:null,xl:null},l1Factor:{h:{xs:1,sm:1,me:1,la:1,xl:1},w:{xs:1,sm:1,me:1,la:1,xl:1}},lNFactor:{h:{xs:1,sm:1,me:1,la:1,xl:1},w:{xs:1,sm:1,me:1,la:1,xl:1}}},getMosaic:function(){return this.mosaic[u.GOM.curNavLevel][u.GOM.curWidth]},mosaicCalcFactor:function(e,t){for(var n=1,i=1,a=0;at?(r&&(clearTimeout(r),r=null),l=u,o=e.apply(i,a),r||(i=a=null)):r||!1===n.trailing||(r=setTimeout(s,c)),o}}(x,15,{leading:!1}),u.blockList=null,u.allowList=null,u.albumList=[],u.locationHashLastUsed="",u.custGlobals={},u.touchAutoOpenDelayTimerID=0,u.i18nLang="",u.timeLastTouchStart=0,u.custGlobals={},u.markupOrApiProcessed=!1,u.GOM={albumIdx:-1,clipArea:{top:0,height:0},displayArea:{width:0,height:0},displayAreaLast:{width:0,height:0},displayedMoreSteps:0,items:[],$imgPreloader:[],thumbnails2Display:[],itemsDisplayed:0,firstDisplay:!0,firstDisplayTime:0,navigationBar:{displayed:!1,$newContent:""},cache:{viewport:null,containerOffset:null,areaWidth:100},nbSelected:0,pagination:{currentPage:0},panThreshold:60,panYOnly:!1,lastFullRow:-1,lastDisplayedIdx:-1,displayInterval:{from:0,len:0},hammertime:null,curNavLevel:"l1",curWidth:"me",albumSearch:"",albumSearchTags:"",lastZIndex:0,lastRandomValue:0,slider:{hostIdx:-1,hostItem:null,currentIdx:0,nextIdx:0,timerID:0,tween:null},NGY2Item:function(e){if(null==u.GOM.items[e]||null==u.GOM.items[e])return null;var t=u.GOM.items[e].thumbnailIdx;return u.I[t]},GTn:function(e,t,n){this.thumbnailIdx=e,this.width=0,this.height=0,this.top=0,this.left=0,this.row=0,this.imageWidth=t,this.imageHeight=n,this.resizedContentWidth=0,this.resizedContentHeight=0,this.displayed=!1,this.neverDisplayed=!0,this.inDisplayArea=!1},ScrollToTop:function(){var e,t,n,i;if(!u.GOM.firstDisplay&&(null!==u.$E.scrollableParent||(e=u.$E.base,t=20,n=a(),(i=e.offset()).top>=n.t&&i.top<=n.t+n.h-t)||u.$E.base.get(0).scrollIntoView(),null!==u.$E.scrollableParent)){var o=u.$E.scrollableParent.scrollTop(),r=Math.abs(u.$E.scrollableParent.offset().top-u.$E.base.offset().top-o);o>r&&window.ng_draf((function(){u.$E.scrollableParent.scrollTop(r)}))}}},u.VOM={viewerDisplayed:!1,viewerIsFullscreen:!1,infoDisplayed:!1,toolbarsDisplayed:!0,toolsHide:null,zoom:{posX:0,posY:0,userFactor:1,isZooming:!1},padding:{H:0,V:0},window:{lastWidth:0,lastHeight:0},$viewer:null,$toolbar:null,$toolbarTL:null,$toolbarTR:null,toolbarMode:"std",playSlideshow:!1,playSlideshowTimerID:0,slideshowDelay:3e3,albumID:-1,viewerMediaIsChanged:!1,items:[],panMode:"off",$baseCont:null,$content:null,content:{previous:{vIdx:-1,$media:null,NGY2Item:function(){return u.I[u.VOM.items[u.VOM.content.previous.vIdx].ngy2ItemIdx]}},current:{vIdx:-1,$media:null,NGY2Item:function(){return u.I[u.VOM.items[u.VOM.content.current.vIdx].ngy2ItemIdx]}},next:{vIdx:-1,$media:null,NGY2Item:function(){return u.I[u.VOM.items[u.VOM.content.next.vIdx].ngy2ItemIdx]}}},IdxNext:function(){var e=0;return u.VOM.content.current.vIdx=t){var n=this.oneTmbWidth*u.VOM.content.current.vIdx;n+this.posX=this.vwidth&&(this.posX=this.vwidth-(n+this.oneTmbWidth))}this.PanGallery(0)}},PanGallery:function(e){this.gwidththis.vwidth-this.oneTmbWidth&&(this.posX=this.vwidth-this.oneTmbWidth),this.posX+this.gwidthu.VOM.ImageLoader.maxChecks?(u.VOM.ImageLoader.list[i]=null,e.callback(0,0,e.ngitem,e.checks)):(t++,e.checks++));0==t&&(u.VOM.ImageLoader.list=[],clearInterval(u.VOM.ImageLoader.intervalHandle),delete u.VOM.ImageLoader.intervalHandle)}}},u.popup={isDisplayed:!1,$elt:null,close:function(){null!=this.$elt&&(new NGTweenable).tween({from:{opacity:1},to:{opacity:0},attachment:{t:this},easing:"easeInOutSine",duration:100,step:function(e,t){null!=t.t.$elt&&t.t.$elt.css("opacity",e.opacity)},finish:function(e,t){null!=t.t.$elt&&(t.t.$elt.remove(),t.t.$elt=null),t.t.isDisplayed=!1}})}},u.galleryTheme_dark={navigationBar:{background:"none",borderTop:"",borderBottom:"",borderRight:"",borderLeft:""},navigationBreadcrumb:{background:"#111",color:"#fff",colorHover:"#ccc",borderRadius:"4px"},navigationFilter:{color:"#ddd",background:"#111",colorSelected:"#fff",backgroundSelected:"#111",borderRadius:"4px"},navigationPagination:{background:"#111",color:"#fff",colorHover:"#ccc",borderRadius:"4px"},thumbnail:{background:"#444",backgroundImage:"linear-gradient(315deg, #111 0%, #445 90%)",borderColor:"#000",borderRadius:"0px",labelOpacity:1,labelBackground:"rgba(34, 34, 34, 0)",titleColor:"#fff",titleBgColor:"transparent",titleShadow:"",descriptionColor:"#ccc",descriptionBgColor:"transparent",descriptionShadow:"",stackBackground:"#aaa"},thumbnailIcon:{padding:"5px",color:"#fff",shadow:""},pagination:{background:"#181818",backgroundSelected:"#666",color:"#fff",borderRadius:"2px",shapeBorder:"3px solid #666",shapeColor:"#444",shapeSelectedColor:"#aaa"}},u.galleryTheme_light={navigationBar:{background:"none",borderTop:"",borderBottom:"",borderRight:"",borderLeft:""},navigationBreadcrumb:{background:"#eee",color:"#000",colorHover:"#333",borderRadius:"4px"},navigationFilter:{background:"#eee",color:"#222",colorSelected:"#000",backgroundSelected:"#eee",borderRadius:"4px"},navigationPagination:{background:"#eee",color:"#000",colorHover:"#333",borderRadius:"4px"},thumbnail:{background:"#444",backgroundImage:"linear-gradient(315deg, #111 0%, #445 90%)",borderColor:"#000",labelOpacity:1,labelBackground:"rgba(34, 34, 34, 0)",titleColor:"#fff",titleBgColor:"transparent",titleShadow:"",descriptionColor:"#ccc",descriptionBgColor:"transparent",descriptionShadow:"",stackBackground:"#888"},thumbnailIcon:{padding:"5px",color:"#fff"},pagination:{background:"#eee",backgroundSelected:"#aaa",color:"#000",borderRadius:"2px",shapeBorder:"3px solid #666",shapeColor:"#444",shapeSelectedColor:"#aaa"}},u.viewerTheme_dark={background:"#000",barBackground:"rgba(4, 4, 4, 0.2)",barBorder:"0px solid #111",barColor:"#fff",barDescriptionColor:"#ccc"},u.viewerTheme_light={background:"#f8f8f8",barBackground:"rgba(4, 4, 4, 0.7)",barBorder:"0px solid #111",barColor:"#fff",barDescriptionColor:"#ccc"};var h=NGY2Tools.NanoAlert,d=NGY2Tools.NanoConsoleLog;function m(){u.VOM.items=[],u.VOM.albumID="0",u.GOM.curNavLevel="l1";for(var e=0,t=u.$E.base[0].src,n=void 0,i=0;i0?De(n):d(u,"No content for Lightbox standalone.")}function p(e){var t={albumID:"0",imageID:"0"},n=e.split("/");return n.length>0&&(t.albumID=n[0],n.length>1&&(t.imageID=n[1])),t}function g(e,t){u.VOM.viewerDisplayed&&tt(null);var n=NGY2Item.GetIdx(u,t);u.GOM.curNavLevel="lN",0==n&&(u.GOM.curNavLevel="l1"),u.layout.SetEngine(),u.galleryResizeEventEnabled=!1,-1==n&&(NGY2Item.New(u,"","",t,"0","album"),n=u.I.length-1),u.I[n].contentIsLoaded?(de(),u.GOM.pagination.currentPage=0,rt(t,""),w(n)):q(t,g,e,t)}function f(){switch(u.galleryDisplayMode.Get()){case"PAGINATION":u.layout.support.rows&&u.galleryMaxRows.Get()>0&&function(){if(u.$E.conTnBottom.css("opacity",0),u.$E.conTnBottom.children().remove(),0==u.GOM.items.length)return;var e=Math.ceil((u.GOM.items[u.GOM.items.length-1].row+1)/u.galleryMaxRows.Get());if(1==e)return;u.GOM.pagination.currentPage>e-1&&(u.GOM.pagination.currentPage=e-1);if(M(),0==u.GOM.displayInterval.len)return;if("NUMBERS"==u.O.galleryPaginationMode&&u.GOM.pagination.currentPage>0){jQuery('").appendTo(u.$E.conTnBottom).click((function(e){G()}))}var t=0,n=e;if("NUMBERS"!=u.O.galleryPaginationMode)t=0;else{var i=u.O.paginationVisiblePages;if(i>=e)t=0;else{var a=0;a=i%2==1?(i+1)/2:i/2,u.GOM.pagination.currentPagee&&(n=e-1)):(t=u.GOM.pagination.currentPage-a,(n=t+i)>e&&(n=e-1)),n-t'+l+"").appendTo(u.$E.conTnBottom);s.data("pageNumber",o),s.click((function(e){u.GOM.pagination.currentPage=jQuery(this).data("pageNumber"),at("pageChanged"),u.GOM.ScrollToTop(),L(),E(!0)}))}if("NUMBERS"==u.O.galleryPaginationMode&&u.GOM.pagination.currentPage+1