Template:Team:Waterloo/JS/jgallery

From 2014.igem.org

(Difference between revisions)
Line 53: Line 53:
  * Date: 2014-08-19
  * Date: 2014-08-19
  */
  */
 +
/*
(function(g){var m={mode:"full-screen",width:"100%",height:"600px",autostart:false,autostartAtImage:1,autostartAtAlbum:1,canClose:true,canResize:true,draggableZoom:true,canChangeMode:false,backgroundColor:"#000",textColor:"#fff",browserHistory:true,thumbnails:true,thumbnailsFullScreen:true,thumbType:"image",thumbnailsPosition:"bottom",reloadThumbnails:true,thumbWidth:75,thumbHeight:75,thumbWidthOnFullScreen:100,thumbHeightOnFullScreen:100,canMinimalizeThumbnails:true,hideThumbnailsOnInit:false,transition:"moveToRight_moveFromLeft",transitionBackward:"moveToLeft_moveFromRight",transitionWaveDirection:"forward",transitionCols:1,transitionRows:5,showTimingFunction:"linear",hideTimingFunction:"linear",transitionDuration:"0.7s",zoomSize:"fit",title:true,titleExpanded:false,slideshow:true,slideshowAutostart:false,slideshowCanRandom:true,slideshowRandom:false,slideshowInterval:"8s",preloadAll:false,appendTo:"body",disabledOnIE8AndOlder:true,initGallery:function(){},showPhoto:function(){},beforeLoadPhoto:function(){},afterLoadPhoto:function(){},showGallery:function(){},closeGallery:function(){}};var j={autostart:true,canClose:false,canChangeMode:true,browserHistory:false};var f={};var A={width:"940px",height:"360px",canResize:false,draggableZoom:false,browserHistory:false,thumbnailsFullScreen:false,thumbType:"square",thumbWidth:20,thumbHeight:20,canMinimalizeThumbnails:false,transition:"rotateCubeRightOut_rotateCubeRightIn",transitionBackward:"rotateCubeRightOut_rotateCubeRightIn",transitionCols:6,transitionRows:1,slideshow:true,slideshowAutostart:true,zoomSize:"fill"};var a={autostart:true,canClose:false,zoomSize:"fill",canChangeMode:false};var w={moveToLeft_moveFromRight:["pt-page-moveToLeft","pt-page-moveFromRight"],moveToRight_moveFromLeft:["pt-page-moveToRight","pt-page-moveFromLeft"],moveToTop_moveFromBottom:["pt-page-moveToTop","pt-page-moveFromBottom"],moveToBottom_moveFromTop:["pt-page-moveToBottom","pt-page-moveFromTop"],fade_moveFromRight:["pt-page-fade","pt-page-moveFromRight pt-page-ontop"],fade_moveFromLeft:["pt-page-fade","pt-page-moveFromLeft pt-page-ontop"],fade_moveFromBottom:["pt-page-fade","pt-page-moveFromBottom pt-page-ontop"],fade_moveFromTop:["pt-page-fade","pt-page-moveFromTop pt-page-ontop"],moveToLeftFade_moveFromRightFade:["pt-page-moveToLeftFade","pt-page-moveFromRightFade"],moveToRightFade_moveFromLeftFade:["pt-page-moveToRightFade","pt-page-moveFromLeftFade"],moveToTopFade_moveFromBottomFade:["pt-page-moveToTopFade","pt-page-moveFromBottomFade"],moveToBottomFade_moveFromTopFade:["pt-page-moveToBottomFade","pt-page-moveFromTopFade"],moveToLeftEasing_moveFromRight:["pt-page-moveToLeftEasing pt-page-ontop","pt-page-moveFromRight"],moveToRightEasing_moveFromLeft:["pt-page-moveToRightEasing pt-page-ontop","pt-page-moveFromLeft"],moveToTopEasing_moveFromBottom:["pt-page-moveToTopEasing pt-page-ontop","pt-page-moveFromBottom"],moveToBottomEasing_moveFromTop:["pt-page-moveToBottomEasing pt-page-ontop","pt-page-moveFromTop"],scaleDown_moveFromRight:["pt-page-scaleDown","pt-page-moveFromRight pt-page-ontop"],scaleDown_moveFromLeft:["pt-page-scaleDown","pt-page-moveFromLeft pt-page-ontop"],scaleDown_moveFromBottom:["pt-page-scaleDown","pt-page-moveFromBottom pt-page-ontop"],scaleDown_moveFromTop:["pt-page-scaleDown","pt-page-moveFromTop pt-page-ontop"],scaleDown_scaleUpDown:["pt-page-scaleDown","pt-page-scaleUpDown pt-page-delay300"],scaleDownUp_scaleUp:["pt-page-scaleDownUp","pt-page-scaleUp pt-page-delay300"],moveToLeft_scaleUp:["pt-page-moveToLeft pt-page-ontop","pt-page-scaleUp"],moveToRight_scaleUp:["pt-page-moveToRight pt-page-ontop","pt-page-scaleUp"],moveToTop_scaleUp:["pt-page-moveToTop pt-page-ontop","pt-page-scaleUp"],moveToBottom_scaleUp:["pt-page-moveToBottom pt-page-ontop","pt-page-scaleUp"],scaleDownCenter_scaleUpCenter:["pt-page-scaleDownCenter","pt-page-scaleUpCenter pt-page-delay400"],rotateRightSideFirst_moveFromRight:["pt-page-rotateRightSideFirst","pt-page-moveFromRight pt-page-delay200 pt-page-ontop"],rotateLeftSideFirst_moveFromLeft:["pt-page-rotateLeftSideFirst","pt-page-moveFromLeft pt-page-delay200 pt-page-ontop"],rotateTopSideFirst_moveFromTop:["pt-page-rotateTopSideFirst","pt-page-moveFromTop pt-page-delay200 pt-page-ontop"],rotateBottomSideFirst_moveFromBottom:["pt-page-rotateBottomSideFirst","pt-page-moveFromBottom pt-page-delay200 pt-page-ontop"],flipOutRight_flipInLeft:["pt-page-flipOutRight","pt-page-flipInLeft pt-page-delay500"],flipOutLeft_flipInRight:["pt-page-flipOutLeft","pt-page-flipInRight pt-page-delay500"],flipOutTop_flipInBottom:["pt-page-flipOutTop","pt-page-flipInBottom pt-page-delay500"],flipOutBottom_flipInTop:["pt-page-flipOutBottom","pt-page-flipInTop pt-page-delay500"],rotateFall_scaleUp:["pt-page-rotateFall pt-page-ontop","pt-page-scaleUp"],rotateOutNewspaper_rotateInNewspaper:["pt-page-rotateOutNewspaper","pt-page-rotateInNewspaper pt-page-delay500"],rotatePushLeft_moveFromRight:["pt-page-rotatePushLeft","pt-page-moveFromRight"],rotatePushRight_moveFromLeft:["pt-page-rotatePushRight","pt-page-moveFromLeft"],rotatePushTop_moveFromBottom:["pt-page-rotatePushTop","pt-page-moveFromBottom"],rotatePushBottom_moveFromTop:["pt-page-rotatePushBottom","pt-page-moveFromTop"],rotatePushLeft_rotatePullRight:["pt-page-rotatePushLeft","pt-page-rotatePullRight pt-page-delay180"],rotatePushRight_rotatePullLeft:["pt-page-rotatePushRight","pt-page-rotatePullLeft pt-page-delay180"],rotatePushTop_rotatePullBottom:["pt-page-rotatePushTop","pt-page-rotatePullBottom pt-page-delay180"],rotatePushBottom_page:["pt-page-rotatePushBottom","pt-page-rotatePullTop pt-page-delay180"],rotateFoldLeft_moveFromRightFade:["pt-page-rotateFoldLeft","pt-page-moveFromRightFade"],rotateFoldRight_moveFromLeftFade:["pt-page-rotateFoldRight","pt-page-moveFromLeftFade"],rotateFoldTop_moveFromBottomFade:["pt-page-rotateFoldTop","pt-page-moveFromBottomFade"],rotateFoldBottom_moveFromTopFade:["pt-page-rotateFoldBottom","pt-page-moveFromTopFade"],moveToRightFade_rotateUnfoldLeft:["pt-page-moveToRightFade","pt-page-rotateUnfoldLeft"],moveToLeftFade_rotateUnfoldRight:["pt-page-moveToLeftFade","pt-page-rotateUnfoldRight"],moveToBottomFade_rotateUnfoldTop:["pt-page-moveToBottomFade","pt-page-rotateUnfoldTop"],moveToTopFade_rotateUnfoldBottom:["pt-page-moveToTopFade","pt-page-rotateUnfoldBottom"],rotateRoomLeftOut_rotateRoomLeftIn:["pt-page-rotateRoomLeftOut pt-page-ontop","pt-page-rotateRoomLeftIn"],rotateRoomRightOut_rotateRoomRightIn:["pt-page-rotateRoomRightOut pt-page-ontop","pt-page-rotateRoomRightIn"],rotateRoomTopOut_rotateRoomTopIn:["pt-page-rotateRoomTopOut pt-page-ontop","pt-page-rotateRoomTopIn"],rotateRoomBottomOut_rotateRoomBottomIn:["pt-page-rotateRoomBottomOut pt-page-ontop","pt-page-rotateRoomBottomIn"],rotateCubeLeftOut_rotateCubeLeftIn:["pt-page-rotateCubeLeftOut pt-page-ontop","pt-page-rotateCubeLeftIn"],rotateCubeRightOut_rotateCubeRightIn:["pt-page-rotateCubeRightOut pt-page-ontop","pt-page-rotateCubeRightIn"],rotateCubeTopOut_rotateCubeTopIn:["pt-page-rotateCubeTopOut pt-page-ontop","pt-page-rotateCubeTopIn"],rotateCubeBottomOut_rotateCubeBottomIn:["pt-page-rotateCubeBottomOut pt-page-ontop","pt-page-rotateCubeBottomIn"],rotateCarouselLeftOut_rotateCarouselLeftIn:["pt-page-rotateCarouselLeftOut pt-page-ontop","pt-page-rotateCarouselLeftIn"],rotateCarouselRightOut_rotateCarouselRightIn:["pt-page-rotateCarouselRightOut pt-page-ontop","pt-page-rotateCarouselRightIn"],rotateCarouselTopOut_rotateCarouselTopIn:["pt-page-rotateCarouselTopOut pt-page-ontop","pt-page-rotateCarouselTopIn"],rotateCarouselBottomOut_rotateCarouselBottomIn:["pt-page-rotateCarouselBottomOut pt-page-ontop","pt-page-rotateCarouselBottomIn"],rotateSidesOut_rotateSidesInDelay:["pt-page-rotateSidesOut","pt-page-rotateSidesIn pt-page-delay200"],rotateSlideOut_rotateSlideIn:["pt-page-rotateSlideOut","pt-page-rotateSlideIn"]};var b=[];var y=[""];var x=[];g.each(w,function(B,C){x.push(C)});var n;var r;var s;g(function(){n=g("head");r=g("title");s=g("body")});var q=g(window);var c=0;var i=function(C,B){this.intJgalleryId=B;this.$element=C};i.prototype={clear:function(){this.$element.stop(false,true).css({width:0});return this},start:function(D,E){var C=parseInt(b[this.intJgalleryId].slideshowInterval)*1000;var B=this.$element;B.animate({width:D},C-C*(B.width()/B.parent().width()),"linear",E);return this},pause:function(){this.$element.stop();return this}};var o=function(C,B){this.$element=C;this.jGallery=B;this.$title=this.$element.find(".title")};o.prototype={bindEvents:function(C){var B=this;this.getElement().on({click:function(D){B.menuToggle();D.stopPropagation()}});this.getItemsOfMenu().on({click:function(){var D=g(this);if(D.is(".active")){return}C.thumbnails.setActiveAlbum(C.thumbnails.$albums.filter('[data-jgallery-album-title="'+D.attr("data-jgallery-album-title")+'"]'))}});g("html").on("click",function(){B.menuHide()})},setTitle:function(B){this.$title.html(B)},getTitle:function(){return this.$title.html()},getListOfAlbums:function(){return this.getElement().find(".menu")},getElement:function(){return this.$element},getItemsOfMenu:function(){return this.getListOfAlbums().find(".item")},appendToMenu:function(B){this.getListOfAlbums().append(B)},menuToggle:function(){this.getElement().toggleClass("active")},menuHide:function(){this.getElement().removeClass("active")},clearMenu:function(){this.getListOfAlbums().html("")},refreshMenuHeight:function(){this.getListOfAlbums().css("max-height",this.jGallery.zoom.$container.outerHeight()-8)}};var e=function(C,B){this.options=g.extend({},{thumbsHidden:true},B);this.jGallery=C;this.$element=C.$this;this.booIsAlbums=C.booIsAlbums;this.$tmp;this.intI=1;this.intJ=1;this.intNo;this.$thumbnailsContainerInner=this.jGallery.$jgallery.find(".jgallery-thumbnails .jgallery-container-inner");this.start()};e.prototype={start:function(){var C=this;var B=this.jGallery.isSlider()?".album:has(img)":".album:has(a:has(img))";g("body").append('<div id="jGalleryTmp" style="position: absolute; top: 0; left: 0; width: 0; height: 0; z-index: -1; overflow: hidden;">'+this.$element.html()+"</div>");this.$tmp=g("#jGalleryTmp");this.$thumbnailsContainerInner.html("");if(this.booIsAlbums){this.$tmp.find(B).each(function(){C.insertAlbum(g(this))})}else{this.insertImages(this.$tmp,this.$thumbnailsContainerInner)}this.$tmp.remove();this.refreshThumbsSize()},insertAlbum:function(C){var B=C.is("[data-jgallery-album-title]")?C.attr("data-jgallery-album-title"):"Album "+this.intJ;var D=this.$thumbnailsContainerInner.append('<div class="album" data-jgallery-album-title="'+B+'"></div>').children(":last-child");if(this.intJ===1){D.addClass("active")}this.insertImages(C,D);this.intJ++},insertImages:function(D,E){var C=this;var B=this.jGallery.isSlider()?"img":"a:has(img)";this.intNo=1;D.find(B).each(function(){C.insertImage(g(this),E)})},insertImage:function(B,C){if(B.is("a")){C.append('<a href="'+B.attr("href")+'">'+this.generateImgTag(B.find("img").eq(0)).outerHtml()+"</a>");if(this.options.thumbsHidden){C.children(":last-child").addClass("hidden")}}else{if(B.is("img")){C.append(g('<a href="'+B.attr("src")+'">'+this.generateImgTag(B).outerHtml()+"</a>"))}}C.children(":last-child").attr("data-jgallery-photo-id",this.intI++).attr("data-jgallery-number",this.intNo++)},generateImgTag:function(B){var C=g('<img src="'+B.attr("src")+'" />');if(B.is("[alt]")){C.attr("alt",B.attr("alt"))}if(B.is("[data-jgallery-bg-color]")){C.attr("data-jgallery-bg-color",B.attr("data-jgallery-bg-color"))}if(B.is("[data-jgallery-text-color]")){C.attr("data-jgallery-text-color",B.attr("data-jgallery-text-color"))}return C},refreshThumbsSize:function(){this.$thumbnailsContainerInner.find("img").each(function(){var B=g(this);var C=new Image();C.src=B.attr("src");C.width>C.height?B.css({"max-height":"100%","max-width":"none"}):B.css({"max-width":"100%","max-height":"none"})})}};var l=function(B){this.$element=B.$element.find(".jgallery-thumbnails");this.$a=this.getElement().find("a");this.$img=this.getElement().find("img");this.$container=this.getElement().find(".jgallery-container");this.$albums=this.getElement().find(".album").length?this.getElement().find(".album"):this.getElement().find(".jgallery-container-inner").addClass("active");this.$btnNext=this.getElement().children(".next");this.$btnPrev=this.getElement().children(".prev");this.intJgalleryId=B.$element.attr("data-jgallery-id");this.isJgalleryInitialized=B.$element.is("[data-jgallery-id]");this.zoom=B.zoom;this.$iconToggleThumbsVisibility=this.zoom.$container.find(".minimalize-thumbnails");this.jGallery=B};l.prototype={getElement:function(){return this.$element},init:function(){this.getElement().removeClass("square number images jgallery-thumbnails-left jgallery-thumbnails-right jgallery-thumbnails-top jgallery-thumbnails-bottom jgallery-thumbnails-horizontal jgallery-thumbnails-vertical");this.getElement().addClass("jgallery-thumbnails-"+b[this.intJgalleryId].thumbnailsPosition);if(this.isVertical()){this.getElement().addClass("jgallery-thumbnails-vertical")}if(this.isHorizontal()){this.getElement().addClass("jgallery-thumbnails-horizontal")}if(b[this.intJgalleryId].thumbType==="image"){this._initImages()}if(b[this.intJgalleryId].thumbType==="square"){this._initSquare()}if(b[this.intJgalleryId].thumbType==="number"){this._initNumber()}},show:function(){var B=this;if(!this.getElement().is(".hidden")){return}this.getElement().removeClass("hidden");if(!this.getElement().is(".loaded")){this.getElement().jLoader({start:function(){},success:function(){B._showNextThumb();B.$a.parent(".album:not(.active)").children(".hidden").removeClass("hidden");B.getElement().addClass("loaded")}})}else{this._showNextThumb();this.$a.parent(".album:not(.active)").children(".hidden").removeClass("hidden")}this.$iconToggleThumbsVisibility.removeClass("inactive")},showThumbsForActiveAlbum:function(){this.$a.addClass("hidden");this._showNextThumb()},hide:function(B){B=g.extend({hideEachThumb:true},B);this.getElement().addClass("hidden");if(B.hideEachThumb){this.$a.addClass("hidden")}this.$iconToggleThumbsVisibility.addClass("inactive")},toggle:function(){this.getElement().is(".hidden")?this.show():this.hide({hideEachThumb:false})},setActiveThumb:function(C){var B=C.find("img");var D=this.$albums.filter(".active");var C=D.find('img[src="'+B.attr("src")+'"]').parent("a").eq(0);this.getElement().find("a").removeClass("active");C.addClass("active");if(D.find("a.active").length===0){D.find("a:first-child").eq(0).addClass("active")}this.center(C)},isHorizontal:function(){return b[this.intJgalleryId].thumbnailsPosition==="top"||b[this.intJgalleryId].thumbnailsPosition==="bottom"},isVertical:function(){return b[this.intJgalleryId].thumbnailsPosition==="left"||b[this.intJgalleryId].thumbnailsPosition==="right"},isFullScreen:function(){return this.getElement().is(".full-screen")},refreshNavigation:function(){if(this.isVertical()||this.isFullScreen()){this._refreshVerticalNavigation()}else{if(this.isHorizontal()){this._refreshHorizontalNavigation()}}},center:function(B){if(this.isHorizontal()){this._horizontalCenter(B)}if(this.isVertical()){this._verticalCenter(B)}},reload:function(){this.$a=this.getElement().find("a");this.$img=this.getElement().find("img");this.$albums=this.getElement().find(".album").length?this.getElement().find(".album"):this.getElement().find(".jgallery-container-inner").addClass("active")},bindEvents:function(){var B=this;this.$btnNext.on("click",function(){B._scrollToNext()});this.$btnPrev.on("click",function(){B._scrollToPrev()});this.zoom.$container.find(".full-screen").on({click:function(){B.zoom.slideshowPause();B.changeViewToFullScreen()}});this.getElement().find(".jgallery-close").on({click:function(){B.changeViewToBar();B.zoom.refreshSize()}})},changeViewToBar:function(){this.getElement().removeClass("full-screen");if(this.isHorizontal()){this.getElement().addClass("jgallery-thumbnails-horizontal").removeClass("jgallery-thumbnails-vertical")}this.refreshNavigation()},changeViewToFullScreen:function(){this.getElement().addClass("full-screen");if(this.isHorizontal()){this.getElement().addClass("jgallery-thumbnails-vertical").removeClass("jgallery-thumbnails-horizontal")}this._refreshVerticalNavigation()},setActiveAlbum:function(B){if(!this.jGallery.booIsAlbums||B.is(".active")){return}this.$albums.not(B.get(0)).removeClass("active");B.addClass("active");this.jGallery.iconChangeAlbum.getListOfAlbums().find(".item").removeClass("active").filter('[data-jgallery-album-title="'+B.attr("data-jgallery-album-title")+'"]').addClass("active");this.jGallery.iconChangeAlbum.setTitle(B.attr("data-jgallery-album-title"));this.refreshNavigation();if(failand(!this.getElement().is(".full-screen"),this.jGallery.$element.is(":visible"))){this.zoom.showPhoto(B.find("a").eq(0))}this.showThumbsForActiveAlbum()},_initSquare:function(){this.getElement().addClass("square")},_initNumber:function(){this.getElement().addClass("number");this._initSquare()},_initImages:function(){var B=n.find('style.jgallery-thumbnails[data-jgallery-id="'+this.intJgalleryId+'"]');var C='                    .jgallery[data-jgallery-id="'+this.intJgalleryId+'"] .jgallery-thumbnails a {\n                        width: '+b[this.intJgalleryId].thumbWidth+"px;\n                        height: "+b[this.intJgalleryId].thumbHeight+"px;\n                        font-size: "+b[this.intJgalleryId].thumbHeight+'px;\n                    }\n                    .jgallery[data-jgallery-id="'+this.intJgalleryId+'"] .jgallery-thumbnails.full-screen a {\n                        width: '+b[this.intJgalleryId].thumbWidthOnFullScreen+"px;\n                        height: "+b[this.intJgalleryId].thumbHeightOnFullScreen+"px;\n                        font-size: "+b[this.intJgalleryId].thumbHeightOnFullScreen+'px;\n                    }\n                    .jgallery[data-jgallery-id="'+this.intJgalleryId+'"] .jgallery-thumbnails-horizontal {\n                        height: '+parseInt(b[this.intJgalleryId].thumbHeight+2)+'px;\n                    }\n                    .jgallery[data-jgallery-id="'+this.intJgalleryId+'"] .jgallery-thumbnails-vertical {\n                        width: '+parseInt(b[this.intJgalleryId].thumbWidth+2)+"px;\n                    }\n            ";this.getElement().addClass("images");B.length?B.html(C):n.append('                <style type="text/css" class="jgallery-thumbnails" data-jgallery-id="'+this.intJgalleryId+'">                    '+C+"                </style>            ");if(this.isHorizontal()){this.jGallery.zoom.$container.find(".minimalize-thumbnails").addClass("fa-ellipsis-h").removeClass("fa-ellipsis-v")}else{this.jGallery.zoom.$container.find(".minimalize-thumbnails").addClass("fa-ellipsis-v").removeClass("fa-ellipsis-h")}if(this.isJgalleryInitialized){return}this.hide()},_showNextThumb:function(){var B=this;var C=this.$a.parent(".active").children(".hidden").eq(0);setTimeout(function(){C.removeClass("hidden");if(C.length){B._showNextThumb()}},70)},_horizontalCenter:function(C){var B=this;if(C.length!==1){return}this.$container.stop(false,true).animate({scrollLeft:C.position().left-this.$container.scrollLeft()*-1-C.outerWidth()/-2-this.$container.outerWidth()/2},function(){B.refreshNavigation()})},_verticalCenter:function(C){var B=this;if(C.length!==1){return}this.$container.stop(false,true).animate({scrollTop:C.position().top-this.$container.scrollTop()*-1-C.outerHeight()/-2-this.$container.outerHeight()/2},function(){B.refreshNavigation()})},_refreshHorizontalNavigation:function(){var C=this.getElement().find("div.active");var B=b[this.intJgalleryId].thumbType==="image"?this.$a.outerWidth(true)*C.find("img").length:this.$a.outerWidth(true)*C.find("a").length;this.$container.scrollLeft()>0?this.$btnPrev.addClass("visible"):this.$btnPrev.removeClass("visible");B>this.$container.width()+this.$container.scrollLeft()?this.$btnNext.addClass("visible"):this.$btnNext.removeClass("visible")},_refreshVerticalNavigation:function(){this.$container.scrollTop()>0?this.$btnPrev.addClass("visible"):this.$btnPrev.removeClass("visible");this.$container.find(".jgallery-container-inner").height()>this.$container.height()+this.$container.scrollTop()?this.$btnNext.addClass("visible"):this.$btnNext.removeClass("visible")},_scrollToPrev:function(){var B=this;if(this.isVertical()||this.isFullScreen()){this.$container.stop(false,true).animate({scrollTop:"-="+q.height()*0.7},function(){B.refreshNavigation()})}else{if(this.isHorizontal()){this.$container.stop(false,true).animate({scrollLeft:"-="+q.width()*0.7},function(){B.refreshNavigation()})}}},_scrollToNext:function(){var B=this;if(this.isVertical()||this.isFullScreen()){this.$container.stop(false,true).animate({scrollTop:"+="+q.height()*0.7},function(){B.refreshNavigation()})}else{if(this.isHorizontal()){this.$container.stop(false,true).animate({scrollLeft:"+="+q.width()*0.7},function(){B.refreshNavigation()})}}}};var h=function(B){this.$container=B.$element.children(".zoom-container");this.$element=this.$container.children(".zoom");this.$title=this.$container.find(".nav-bottom > .title");this.$btnPrev=this.$container.children(".prev");this.$btnNext=this.$container.children(".next");this.$left=this.$container.find(".left");this.$right=this.$container.find(".right");this.thumbnails=B.thumbnails;this.$jGallery=B.$element;this.jGallery=B;this.$resize=this.$container.find(".resize");this.$dragNav=this.$container.find(".drag-nav");this.$dragNavCrop=g();this.$dragNavCropImg=g();this.$changeMode=this.$container.find(".fa.change-mode");this.$random=this.$container.find(".random");this.$slideshow=this.$container.find(".slideshow");this.intJGalleryId=this.$jGallery.attr("data-jgallery-id");this.booSlideshowPlayed=false;this.booLoadingInProgress=false;this.booLoadedAll=false;this.$title.on("click",function(){g(this).toggleClass("expanded")});this.update()};h.prototype={update:function(){var B=w[b[this.jGallery.intId].transition];this.$container.attr("data-size",b[this.jGallery.intId].zoomSize);this.$element.find(".pt-page").removeClass(b[this.jGallery.intId].hideEffect).removeClass(b[this.jGallery.intId].showEffect);if(typeof B!=="undefined"){b[this.jGallery.intId].hideEffect=B[0];b[this.jGallery.intId].showEffect=B[1]}this.initAdvancedAnimation()},initAdvancedAnimation:function(){if(typeof this.advancedAnimation==="undefined"){this.advancedAnimation=new d(this.$element)}this.advancedAnimation.setDuration(b[this.jGallery.intId].transitionDuration);this.advancedAnimation.setDirection(b[this.jGallery.intId].transitionWaveDirection);this.advancedAnimation.setQuantityParts(b[this.jGallery.intId].transitionCols,b[this.jGallery.intId].transitionRows);this.advancedAnimation.setHideEffect(b[this.jGallery.intId].hideEffect);this.advancedAnimation.setShowEffect(b[this.jGallery.intId].showEffect)},setThumbnails:function(B){this.thumbnails=B},enableDrag:function(){if(!b[this.jGallery.intId].draggableZoom){return}var E=this;var G;var B;var D=function(K){var I=K.pageX;var H=K.pageY;var J=E.$element.find("img.active");G=J.css("margin-left");B=J.css("margin-top");E.$element.on({mousemove:function(L){F(L.pageX-I,L.pageY-H)},mouseleave:function(){C()}});if(b[E.jGallery.intId].zoomSize==="fill"){E.$dragNav.removeClass("hide").addClass("show")}F(0,0)};var C=function(){E.$element.off("mousemove");if(b[E.jGallery.intId].zoomSize==="fill"){E.$dragNav.removeClass("show").addClass("hide")}};var F=function(I,O){var N=parseFloat(parseFloat(G)+I);var M=parseFloat(parseFloat(B)+O);var K=E.$element.find("img.active");var L=K.eq(0);var J=K.eq(-1);var H=J.parent();if(failand(L.position().left+N<0,J.position().left+J.width()+N>H.outerWidth())){K.css({"margin-left":N});E.$dragNavCrop.css({left:-(L.position().left+N)/K.width()*100+"%"})}if(failand(L.position().top+M<0,J.position().top+J.height()+M>H.outerHeight())){K.css({"margin-top":M});E.$dragNavCrop.css({top:-(L.position().top+M)/K.height()*100+"%"})}E.$dragNavCropImg.css({"margin-left":-E.$dragNavCrop.position().left,"margin-top":-E.$dragNavCrop.position().top})};if(b[E.jGallery.intId].zoomSize==="original"){E.$dragNav.removeClass("hide").addClass("show")}this.refreshDragNavCropSize();this.$element.css("cursor","move").on({mousedown:function(H){H.preventDefault();D(H);E.slideshowPause()},mouseup:function(){C()}});this.$left.add(this.$right).hide()},disableDrag:function(){if(!b[this.jGallery.intId].draggableZoom){return}this.$dragNav.removeClass("show").addClass("hide");this.$element.css("cursor","default");this.$element.off();this.$left.add(this.$right).show()},refreshContainerSize:function(){var C=this.jGallery.isSlider()?0:this.$container.find(".nav-bottom").outerHeight();var B=failand(!this.jGallery.isSlider(),!this.thumbnails.getElement().is(".hidden"));var D=B?b[this.intJGalleryId].thumbnailsPosition:"";this.$container.css({width:failand(B,this.thumbnails.isVertical())?this.$jGallery.width()-this.thumbnails.getElement().outerWidth(true):"auto",height:failand(B,this.thumbnails.isHorizontal())?this.$jGallery.height()-this.thumbnails.getElement().outerHeight(true)-C:this.$jGallery.height()-C,"margin-top":D==="top"?this.thumbnails.getElement().outerHeight(true):0,"margin-left":D==="left"?this.thumbnails.getElement().outerWidth(true):0,"margin-right":D==="right"?this.thumbnails.getElement().outerWidth(true):0});if(b[this.jGallery.intId].draggableZoom){this.refreshDragNavCropSize()}},refreshSize:function(){if(this.thumbnails.isFullScreen()){return}this.refreshContainerSize();if(b[this.intJGalleryId].zoomSize==="original"){this.original()}else{if(b[this.intJGalleryId].zoomSize==="fill"){this.fill()}else{this.fit()}}this.$element.addClass("visible")},refreshDragNavCropSize:function(){var C=this.$element.find("img.active");var B;var D;this.$dragNavCrop.css({width:this.$element.width()/C.width()*100+"%",height:this.$element.height()/C.height()*100+"%"});B=(this.$dragNav.width()-this.$dragNavCrop.width())/2;D=(this.$dragNav.height()-this.$dragNavCrop.height())/2;this.$dragNavCrop.css({left:B,top:D});if(this.$dragNavCropImg.length){this.$dragNavCropImg.css({"margin-left":-B,"margin-top":-D})}},changeSize:function(){if(b[this.jGallery.intId].zoomSize==="fit"){b[this.jGallery.intId].zoomSize="fill";this.fill()}else{if(b[this.jGallery.intId].zoomSize==="fill"){var B=this.$element.find("img.active").eq(0);if(this.$element.outerWidth().toString()===B.attr("data-width")){b[this.jGallery.intId].zoomSize="fit";this.fit()}else{b[this.jGallery.intId].zoomSize="original";this.original()}}else{if(b[this.jGallery.intId].zoomSize==="original"){b[this.jGallery.intId].zoomSize="fit";this.fit()}}}this.$container.attr("data-size",b[this.jGallery.intId].zoomSize)},original:function(){var B=this.$element.find("img.active");this.advancedAnimation.setPositionParts();this.setImgSizeForOriginal(B);this.setImgSizeForOriginal(this.$element.find(".pt-page.init img"));if(failand(B.attr("data-width")<=this.$element.outerWidth(),B.attr("data-height")<=this.$element.outerHeight())){this.$resize.addClass("fa-search-plus").removeClass("fa-search-minus");this.disableDrag()}else{this.$resize.addClass("fa-search-minus").removeClass("fa-search-plus");this.enableDrag()}},fit:function(){var B=this.$element.find("img.active").add(this.$element.find(".pt-page.init img"));this.advancedAnimation.setPositionParts();this.setImgSizeForFit(B.filter(".active"));this.setImgSizeForFit(B.filter(":not( .active )"));this.$resize.addClass("fa-search-plus").removeClass("fa-search-minus");this.disableDrag()},fill:function(){var B=this.$element.find("img.active");this.setImgSizeForFill(B);this.setImgSizeForFill(this.$element.find(".pt-page.init img"));this.advancedAnimation.setPositionParts();if(failand(B.attr("data-width")>B.width(),B.attr("data-height")>B.height())){this.$resize.addClass("fa-search-plus").removeClass("fa-search-minus")}else{this.$resize.addClass("fa-search-minus").removeClass("fa-search-plus")}this.enableDrag()},setImgSizeForOriginal:function(B){B.css({width:B.attr("data-width"),height:B.attr("data-height"),"min-width":0,"min-height":0,"max-width":"none","max-height":"none"});B.css({"margin-top":-B.height()/2,"margin-left":-B.width()/2})},setImgSizeForFit:function(C){var D=this.jGallery.isSlider()?0:this.$container.find(".nav-bottom").outerHeight();var B=failand(!this.jGallery.isSlider(),!this.thumbnails.getElement().is(".hidden"));C.css({width:"auto",height:"auto","min-width":0,"min-height":0,"max-width":failand(B,this.thumbnails.isVertical())?this.$jGallery.width()-this.thumbnails.getElement().outerWidth(true):this.$jGallery.width(),"max-height":failand(B,this.thumbnails.isHorizontal())?this.$jGallery.height()-this.thumbnails.getElement().outerHeight(true)-D:this.$jGallery.height()-D});if(C.width()/C.height()/this.jGallery.getCanvasRatioWidthToHeight()<1){C.css({width:"auto",height:failand(B,this.thumbnails.isHorizontal())?this.$jGallery.height()-this.thumbnails.getElement().outerHeight(true)-D:this.$jGallery.height()-D})}else{C.css({width:failand(B,this.thumbnails.isVertical())?this.$jGallery.width()-this.thumbnails.getElement().outerWidth(true):this.$jGallery.width(),height:"auto"})}C.css({"margin-top":-C.height()/2,"margin-left":-C.width()/2})},setImgSizeForFill:function(C){var D=this.jGallery.isSlider()?0:this.$container.find(".nav-bottom").outerHeight();var B=failand(!this.jGallery.isSlider(),!this.thumbnails.getElement().is(".hidden"));C.css({width:"auto",height:"auto","max-width":"none","max-height":"none","min-width":0,"min-height":0});if(C.width()/C.height()/this.jGallery.getCanvasRatioWidthToHeight()>1){C.css({width:"auto",height:failand(B,this.thumbnails.isHorizontal())?this.$jGallery.height()-this.thumbnails.getElement().outerHeight(true)-D:this.$jGallery.height()-D})}else{C.css({width:failand(B,this.thumbnails.isVertical())?this.$jGallery.width()-this.thumbnails.getElement().outerWidth(true):this.$jGallery.width(),height:"auto"})}C.css({"min-width":failand(B,this.thumbnails.isVertical())?this.$jGallery.width()-this.thumbnails.getElement().outerWidth(true):this.$jGallery.width(),"min-height":failand(B,this.thumbnails.isHorizontal())?this.$jGallery.height()-this.thumbnails.getElement().outerHeight(true)-D:this.$jGallery.height()-D});C.css({"margin-top":-C.height()/2,"margin-left":-C.width()/2})},isLoaded:function(B){return this.$element.find("img").filter('[src="'+B.attr("href")+'"]').length>0},refreshNav:function(){var B=this.thumbnails.getElement().find("div.active a.active");B.prev("a").length===1?this.$btnPrev.add(this.$container.children(".left")).removeClass("hidden"):this.$btnPrev.add(this.$container.children(".left")).addClass("hidden");B.next("a").length===1?this.$btnNext.add(this.$container.children(".right")).removeClass("hidden"):this.$btnNext.add(this.$container.children(".right")).addClass("hidden")},slideshowStop:function(){this.slideshowPause();this.jGallery.progress.clear()},slideshowPause:function(){this.jGallery.progress.pause();this.$slideshow.removeClass("fa-pause").addClass("fa-play");this.booSlideshowPlayed=false;if(b[this.jGallery.intId].slideshowCanRandom){this.$random.hide()}},slideshowPlay:function(){if(this.booLoadingInProgress||this.booSlideshowPlayed){return}this.booSlideshowPlayed=true;this.$slideshow.removeClass("fa-play").addClass("fa-pause");this.slideshowSetTimeout();if(b[this.jGallery.intId].slideshowCanRandom){this.$random.show()}},slideshowPlayPause:function(){this.$slideshow.is(".fa-play")?this.slideshowPlay():this.slideshowPause()},slideshowSetTimeout:function(){var B=this;this.jGallery.progress.start(this.$container.width(),function(){B.jGallery.progress.clear();b[B.jGallery.intId].slideshowRandom?B.showRandomPhoto():B.showNextPhotoLoop()})},slideshowRandomToggle:function(){if(b[this.jGallery.intId].slideshowRandom){this.$random.removeClass("active");b[this.jGallery.intId].slideshowRandom=false}else{this.$random.addClass("active");b[this.jGallery.intId].slideshowRandom=true}},showNextPhotoLoop:function(){var B=this.thumbnails.$a.filter(".active").next("a");if(B.length===0){B=this.thumbnails.$albums.filter(".active").find("a").eq(0)}this.showPhoto(B)},showRandomPhoto:function(){var B=this.thumbnails.$albums.filter(".active").find("a:not(.active)");this.showPhoto(B.eq(Math.floor(Math.random()*B.length)))},showPrevPhoto:function(){var B=this.thumbnails.$a.filter(".active").prev("a");if(B.length===1){this.showPhoto(B)}},showNextPhoto:function(){var B=this.thumbnails.$a.filter(".active").next("a");if(B.length===1){this.showPhoto(B)}},showPhotoInit:function(){this.jGallery.init()},showPhoto:function(F,D){var C=this;var G=F.children("img");var B;var I;var H;var E;if(!this.jGallery.initialized()){this.showPhotoInit()}if(this.booLoadingInProgress){return}this.booLoadingInProgress=true;E=b[this.jGallery.intId][F.nextAll(".active").length>0?"transitionBackward":"transition"];if(E==="random"){this.setRandomTransition()}else{H=w[E];this.advancedAnimation.setHideEffect(H[0]);this.advancedAnimation.setShowEffect(H[1])}this.$element.find(".pt-page.init").remove();b[this.jGallery.intId].showPhoto();if(this.jGallery.$element.is(":not(:visible)")){this.jGallery.show()}this.thumbnails.changeViewToBar();if(this.jGallery.booIsAlbums){if(this.jGallery.iconChangeAlbum.getTitle()===""){I=F.parents(".album").eq(0).attr("data-jgallery-album-title");this.jGallery.iconChangeAlbum.setTitle(I);this.jGallery.iconChangeAlbum.$element.find('[data-jgallery-album-title="'+I+'"]').addClass("active");F.parents(".album").addClass("active").siblings(".album").removeClass("active")}}this.thumbnails.setActiveAlbum(this.thumbnails.$albums.filter('[data-jgallery-album-title="'+F.parents("[data-jgallery-album-title]").attr("data-jgallery-album-title")+'"]'));this.thumbnails.setActiveThumb(F);if(this.$element.find("img.active").attr("src")===F.attr("href")){this.booLoadingInProgress=false;return}this.refreshNav();if(b[this.jGallery.intId].title){this.$title.addClass("after fade")}B=C.isLoaded(F);if(!B){if(failand(b[C.jGallery.intId].preloadAll,!C.booLoadedAll)){this.appendAllPhotos()}else{this.appendPhoto(F)}}this.$element.find("img.active").addClass("prev-img");C.$container.find("img.active").removeClass("active");C.$container.find('[src="'+F.attr("href")+'"]').addClass("active");if(failand(b[C.jGallery.intId].title,G.is("[alt]"))){C.$title.removeClass("after").addClass("before")}if(!B||(failand(b[C.jGallery.intId].preloadAll,!C.booLoadedAll))){C.booLoadedAll=true;C.$container.overlay({show:true,showLoader:true});b[C.jGallery.intId].beforeLoadPhoto();C.loadPhoto(C.$element,F,D)}else{C.showPhotoSuccess(G,D)}},appendPhoto:function(B){this.$element.find(".pt-part").append('                <div class="jgallery-container pt-page">                    <div class="pt-item"><img src="'+B.attr("href")+'" /></div>                </div>')},appendAllPhotos:function(){var B=this;if(!b[this.jGallery.intId].preloadAll){return}this.thumbnails.$a.each(function(){var C=g(this);if(!B.isLoaded(C)){B.$element.find(".pt-part").append('<div class="jgallery-container pt-page"><div class="pt-item"><img src="'+C.attr("href")+'" /></div></div>')}});this.appendInitPhoto(this.thumbnails.$a.eq(-1))},appendInitPhoto:function(B){if(B.length!==1){return}this.$element.find(".pt-part").append('                <div class="jgallery-container pt-page pt-page-current pt-page-ontop init" style="visibility: hidden;">                    <div class="pt-item"><img src="'+B.attr("href")+'" class="active loaded" /></div>                </div>')},loadPhoto:function(C,H,D){var B=this;var I=H.children("img");var F=0;var G=C.find(".pt-part").eq(0);var E=b[this.jGallery.intId].preloadAll?G:G.find("img.active");E.jLoader({interval:500,skip:".loaded",start:function(){if(b[B.jGallery.intId].preloadAll){B.$container.find(".overlay .imageLoaderPositionAbsolute:not(:has(.progress-value))").addClass("preloadAll").append('<span class="progress-value"></span>');B.$container.find(".progress-value").html("0")}else{B.$container.find(".overlay .imageLoaderPositionAbsolute:not(:has(.fa-spin))").append('<span class="fa fa-spin fa-spinner"></span>')}},success:function(){C.find("img").addClass("loaded");B.$container.overlay({hide:true,hideLoader:true});B.showPhotoSuccess(I,D)},progress:function(J){if(!b[B.jGallery.intId].preloadAll){return}F=J.percent;B.$container.find(".overlay .imageLoaderPositionAbsolute").find(".progress-value").html(F)}})},showPhotoSuccess:function(E,C){var D;var B=this.$element.find("img.active");C=g.extend({},{historyPushState:true},C);if(B.is(":not([data-width])")){D=new Image();D.src=B.attr("src");B.attr("data-width",D.width);B.attr("data-height",D.height)}if(failand(b[this.jGallery.intId].title,E.attr("alt"))){this.$title.html(E.attr("alt")).removeClass("before").removeClass("after");this.jGallery.$element.addClass("has-title")}else{this.jGallery.$element.removeClass("has-title")}this.jGallery.setColours({strBg:E.is("[data-jgallery-bg-color]")?E.attr("data-jgallery-bg-color"):b[this.jGallery.intId].backgroundColor,strText:E.is("[data-jgallery-bg-color]")?E.attr("data-jgallery-text-color"):b[this.jGallery.intId].textColor});this.$element.find(".pt-page.init").css({visibility:"visible"});this.$element.find("img.prev-img").removeClass("prev-img");this.advancedAnimation.show(B.eq(0).parent().parent(),{animation:this.$element.find(".pt-part").eq(0).find(".pt-page-current:not(.pt-page-prev)").length===1});this.refreshSize();this.thumbnails.refreshNavigation();if(this.booSlideshowPlayed){this.slideshowSetTimeout()}b[this.jGallery.intId].afterLoadPhoto();this.booLoadingInProgress=false;if(failand(b[this.jGallery.intId].autostart,b[this.jGallery.intId].slideshowAutostart,b[this.jGallery.intId].slideshow)){b[this.jGallery.intId].slideshowAutostart=false;this.slideshowPlay()}if(b[this.jGallery.intId].draggableZoom){this.$dragNav.html('<img src="'+B.attr("src")+'" class="bg">                    <div class="crop"><img src="'+B.attr("src")+'"></div>');this.$dragNavCrop=this.$dragNav.find(".crop");this.$dragNavCropImg=this.$dragNavCrop.find("img");this.refreshDragNavCropSize()}if(failand(C.historyPushState,b[this.jGallery.intId].browserHistory)){u({path:B.attr("src")})}},showPhotoByPath:function(C){var B=this.thumbnails.$albums.filter(".active").find('a[href="'+C+'"]');if(B.length===0){B=this.thumbnails.$a.filter('a[href="'+C+'"]').eq(0)}if(B.length===0){return}this.showPhoto(B,{historyPushState:false})},setTransition:function(B){b[this.jGallery.intId].hideEffect=w[B][0];b[this.jGallery.intId].showEffect=w[B][1];this.advancedAnimation.setHideEffect(b[this.jGallery.intId].hideEffect);this.advancedAnimation.setShowEffect(b[this.jGallery.intId].showEffect)},setRandomTransition:function(){var B;this.$element.find(".pt-page").removeClass(b[this.jGallery.intId].hideEffect).removeClass(b[this.jGallery.intId].showEffect);B=Math.floor((Math.random()*x.length));b[this.jGallery.intId].hideEffect=x[B][0];b[this.jGallery.intId].showEffect=x[B][1];this.advancedAnimation.setHideEffect(b[this.jGallery.intId].hideEffect);this.advancedAnimation.setShowEffect(b[this.jGallery.intId].showEffect)},unmarkActive:function(){this.$element.find("img.active").removeClass("active")},changeMode:function(){var B=b[this.jGallery.intId].mode;if(B==="slider"){return}if(B==="standard"){this.goToFullScreenMode()}else{if(B==="full-screen"){this.goToStandardMode()}}if(this.jGallery.iconChangeAlbum instanceof o){this.jGallery.iconChangeAlbum.refreshMenuHeight()}},goToFullScreenMode:function(){s.css({overflow:"hidden"});this.jGallery.$this.show();this.jGallery.$element.removeClass("jgallery-standard").addClass("jgallery-full-screen").css({width:"auto",height:"auto"});this.$changeMode.removeClass("fa-expand").addClass("fa-compress");b[this.jGallery.intId].mode="full-screen";this.jGallery.refreshDimensions()},goToStandardMode:function(){s.css({overflow:"visible"});this.jGallery.$this.hide();this.jGallery.$element.removeClass("jgallery-full-screen").addClass("jgallery-standard").css({width:b[this.jGallery.intId].width,height:b[this.jGallery.intId].height});this.$changeMode.removeClass("fa-compress").addClass("fa-expand");b[this.jGallery.intId].mode="standard";this.jGallery.refreshDimensions()}};var p=function(C){var B=this;this.booIsAlbums=C.find(".album:has(a:has(img))").length>1;this.intId=c;this.$this=C;if(failand(b[this.intId].disabledOnIE8AndOlder,v())){return}this.init();if(b[this.intId].browserHistory){this.browserHistory()}if(b[this.intId].autostart){this.autostart()}g("html").on({keydown:function(D){if(B.$element.is(":visible")){if(D.which===27){D.preventDefault();if(B.thumbnails.getElement().is(".full-screen")){B.thumbnails.changeViewToBar();B.zoom.refreshSize();return}B.hide()}if(D.which===37){D.preventDefault();B.zoom.showPrevPhoto()}if(D.which===39){D.preventDefault();B.zoom.showNextPhoto()}}}})};p.prototype={initialized:function(){return this.$this.is("[data-jgallery-id]")},update:function(B){b[this.intId]=this.initialized()?g.extend(b[this.intId],B):g.extend({},m,B);if(failand(b[this.intId].disabledOnIE8AndOlder,z())){return}this.booIsAlbums=this.$this.find(".album:has(a:has(img))").length>1;if(b[this.intId].reloadThumbnails){this.reloadThumbnails()}this.zoom.update();this.thumbnails.init();this.setUserOptions()},reloadThumbnails:function(){new e(this,{thumbsHidden:false});this.thumbnails.reload();this.generateAlbumsDropdown()},setVariables:function(){this.$element=g(".jgallery").filter('[data-jgallery-id="'+this.intId+'"]');this.progress=new i(this.$element.find(".zoom-container").children(".progress"),this.intId);this.zoom=new h(this);this.thumbnails=new l(this);this.zoom.setThumbnails(this.thumbnails)},show:function(){this.$this.hide();q.on("resize",{jGallery:this},this.windowOnResize);if(b[this.intId].mode==="full-screen"){s.css({overflow:"hidden"})}this.$element.not(":visible").removeClass("hidden").stop(false,true).fadeIn(500);this.zoom.refreshContainerSize();this.zoom.$title.removeClass("hidden");b[this.intId].showGallery();if(this.iconChangeAlbum instanceof o){this.iconChangeAlbum.refreshMenuHeight()}},hide:function(C){var B=this;if(!b[this.intId].canClose){return}C=g.extend({},{historyPushState:true},C);this.$element.filter(":visible").stop(false,true).addClass("hidden").fadeOut(500,function(){if(b[B.intId].mode==="full-screen"){s.css({overflow:"visible"})}});this.zoom.booLoadingInProgress=false;clearTimeout(this.zoom.showPhotoTimeout);this.zoom.$title.addClass("hidden");this.zoom.$btnPrev.addClass("hidden");this.zoom.$btnNext.addClass("hidden");this.zoom.slideshowPause();this.zoom.advancedAnimation.hideActive();this.zoom.unmarkActive();q.off("resize",this.windowOnResize);this.$this.show();if(failand(C.historyPushState,b[this.intId].browserHistory)){u()}b[this.intId].closeGallery()},autostart:function(){var B;var C;if(this.$element.is(":visible")){return}if(this.booIsAlbums){B=this.thumbnails.getElement().find(".album").eq(b[this.intId].autostartAtAlbum-1);if(B.length===0){B=this.thumbnails.getElement().find(".album").eq(0)}}else{B=this.thumbnails.getElement()}C=B.find("a").eq(b[this.intId].autostartAtImage-1);if(C.length===0){C=B.find("a").eq(0)}C.trigger("click")},browserHistory:function(){var B=this;var D=window.onpopstate;function C(){var E;if(!document.location.hash){return}E=document.location.hash.replace("#","");switch(E){case"":B.hide({historyPushState:false});break;default:B.zoom.showPhotoByPath(E)}}window.onpopstate=function(){if(typeof D==="function"){D()}C()};C()},generateAlbumsDropdown:function(){var B=this;this.$element.find(".change-album").remove();if(!this.booIsAlbums){return}this.zoom.$container.find(".nav-bottom > .icons").append('                <span class="fa fa-list-ul change-album jgallery-btn jgallery-btn-small">                    <span class="menu jgallery-btn"></span>                    <span class="title"></span>                </span>            ');this.iconChangeAlbum=new o(B.zoom.$container.find(".change-album"),this);this.iconChangeAlbum.clearMenu();this.thumbnails.$albums.each(function(){var C=g(this).attr("data-jgallery-album-title");B.iconChangeAlbum.appendToMenu('<span class="item" data-jgallery-album-title="'+C+'">'+C+"</span>")});this.thumbnails.getElement().append(this.iconChangeAlbum.getElement().outerHtml());this.iconChangeAlbum=new o(this.iconChangeAlbum.getElement().add(this.thumbnails.getElement().children(":last-child")),this);this.iconChangeAlbum.bindEvents(this)},init:function(){var B=this;n.append('<style type="text/css" class="colours" data-jgallery-id="'+this.intId+'"></style>');b[this.intId].initGallery();this.$this.attr("data-jgallery-id",this.intId);this.generateHtml();new e(this);this.setVariables();this.thumbnails.init();this.thumbnails.getElement().append('<span class="fa fa-times jgallery-btn jgallery-close jgallery-btn-small"></span>');this.generateAlbumsDropdown();B.setUserOptions();if(b[B.intId].zoomSize==="fit"||b[B.intId].zoomSize==="original"){B.zoom.$resize.addClass("fa-search-plus")}if(b[B.intId].zoomSize==="fill"){B.zoom.$resize.addClass("fa-search-minus")}if(!k()){B.$element.addClass("text-shadow")}B.thumbnails.refreshNavigation();B.zoom.refreshNav();B.zoom.refreshSize();this.$this.on("click","a:has(img)",function(C){var D=g(this);C.preventDefault();B.zoom.showPhoto(D)});B.thumbnails.$element.on("click","a",function(C){var D=g(this);C.preventDefault();if(D.is(":not(.active)")){B.zoom.slideshowStop();B.zoom.showPhoto(D)}else{if(B.thumbnails.isFullScreen()){B.thumbnails.changeViewToBar();B.zoom.refreshSize()}}});B.zoom.$btnPrev.add(B.zoom.$container.find(".left")).on({click:function(){B.zoom.slideshowStop();B.zoom.showPrevPhoto()}});B.zoom.$btnNext.add(B.zoom.$container.find(".right")).on({click:function(){B.zoom.slideshowStop();B.zoom.showNextPhoto()}});B.zoom.$container.find(".jgallery-close").on({click:function(){B.hide()}});B.zoom.$random.on({click:function(){B.zoom.slideshowRandomToggle()}});B.zoom.$resize.on({click:function(){B.zoom.changeSize();B.zoom.slideshowPause()}});B.zoom.$changeMode.on({click:function(){B.zoom.changeMode()}});B.zoom.$slideshow.on({click:function(){B.zoom.slideshowPlayPause()}});B.zoom.$container.find(".minimalize-thumbnails").on({click:function(){B.thumbnails.toggle();B.zoom.refreshSize()}});B.thumbnails.bindEvents()},isSlider:function(){return b[this.intId].mode==="slider"},windowOnResize:function(B){B.data.jGallery.refreshDimensions()},refreshDimensions:function(){this.zoom.refreshSize();if(this.iconChangeAlbum instanceof o){this.iconChangeAlbum.refreshMenuHeight()}this.thumbnails.refreshNavigation()},getCanvasRatioWidthToHeight:function(){var C;var B;if(this.thumbnails.isHorizontal()){C=this.$element.width();B=this.$element.height()-this.thumbnails.getElement().outerHeight(true)}else{if(this.thumbnails.isVertical()){C=this.$element.width()-this.thumbnails.getElement().outerWidth(true);B=this.$element.height()}else{C=this.$element.width();B=this.$element.height()}}return C/B},setUserOptions:function(){b[this.intId].canResize?this.zoom.$resize.show():this.zoom.$resize.hide();b[this.intId].canChangeMode?this.zoom.$changeMode.show():this.zoom.$changeMode.hide();b[this.intId].mode==="standard"?this.zoom.$changeMode.removeClass("fa-compress").addClass("fa-expand"):this.zoom.$changeMode.removeClass("fa-expand").addClass("fa-compress");b[this.intId].canClose?this.zoom.$container.find(".jgallery-close").show():this.zoom.$container.find(".jgallery-close").hide();if(!b[this.intId].thumbnails){this.thumbnails.getElement().addClass("inactive");b[this.intId].thumbnailsPosition=""}else{this.thumbnails.getElement().removeClass("inactive");if(b[this.intId].thumbnailsPosition===""){b[this.intId].thumbnailsPosition=m.thumbnailsPosition}}b[this.intId].slideshow?this.zoom.$slideshow.show():this.zoom.$slideshow.hide();failand(b[this.intId].slideshow,b[this.intId].slideshowCanRandom,b[this.intId].slideshowAutostart)?this.zoom.$random.show():this.zoom.$random.hide();failand(b[this.intId].slideshow,b[this.intId].slideshowCanRandom,b[this.intId].slideshowRandom)?this.zoom.$random.addClass("active"):this.zoom.$random.removeClass("active");failand(b[this.intId].thumbnailsFullScreen,b[this.intId].thumbnails)?this.zoom.$container.find(".full-screen").show():this.zoom.$container.find(".full-screen").hide();failand(b[this.intId].thumbnailsFullScreen,b[this.intId].thumbnails)?this.zoom.$container.find(".change-album").show():this.zoom.$container.find(".change-album").hide();failand(b[this.intId].canMinimalizeThumbnails,b[this.intId].thumbnails)?this.zoom.$container.find(".minimalize-thumbnails").show():this.zoom.$container.find(".minimalize-thumbnails").hide();failand(b[this.intId].hideThumbnailsOnInit,b[this.intId].thumbnails)?this.thumbnails.hide():this.thumbnails.show();b[this.intId].titleExpanded?this.zoom.$title.addClass("expanded"):this.zoom.$title.removeClass("expanded");this.setColours({strBg:b[this.intId].backgroundColor,strText:b[this.intId].textColor})},setColours:function(B){n.find('style[data-jgallery-id="'+this.intId+'"].colours').html(this.getCssForColours(B))},generateHtml:function(){var E=b[this.intId].mode;var D=E==="full-screen"?"auto":b[this.intId].width;var B=E==="full-screen"?"auto":b[this.intId].height;var C='                <div class="jgallery jgallery-'+E+'" style="width: '+D+"; height: "+B+'; display: none;" data-jgallery-id="'+this.intId+'">                    <div class="jgallery-thumbnails hidden">                        <div class="jgallery-container"><div class="jgallery-container-inner"></div></div>                        <span class="prev jgallery-btn hidden"><span class="fa fa-chevron-left ico"></span></span>                        <span class="next jgallery-btn hidden"><span class="fa fa-chevron-right ico"></span></span>                    </div>                    <div class="zoom-container">                        <div class="zoom before pt-perspective"></div>                        <div class="drag-nav hide"></div>                        <div class="left"></div>                        <div class="right"></div>                        <span class="fa fa-chevron-left prev jgallery-btn jgallery-btn-large"></span>                        <span class="fa fa-chevron-right next jgallery-btn jgallery-btn-large"></span>                        <span class="progress"></span>                        <div class="nav">                            <span class="fa resize jgallery-btn jgallery-btn-small"></span>                            <span class="fa change-mode jgallery-btn jgallery-btn-small"></span>                            <span class="fa fa-times jgallery-close jgallery-btn jgallery-btn-small"></span>                        </div>                        <div class="nav-bottom">                            <div class="icons">                                <span class="fa fa-play slideshow jgallery-btn jgallery-btn-small"></span>                                <span class="fa fa-random random jgallery-btn jgallery-btn-small inactive" style="display: none;"></span>                                <span class="fa fa-th full-screen jgallery-btn jgallery-btn-small"></span>                                <span class="fa fa-ellipsis-h minimalize-thumbnails jgallery-btn jgallery-btn-small inactive"></span>                            </div>                            <div class="title before"></div>                        </div>                    </div>                </div>';if(E==="full-screen"){this.$jgallery=g(b[this.intId].appendTo).append(C).children(":last-child")}else{if(b[this.intId].autostart){this.$this.hide()}this.$jgallery=this.$this.after(C).next()}},getCssForColours:function(D){D=g.extend({strBg:"rgb( 0, 0, 0 )",strText:"rgb( 255, 255, 255 )"},D);var E=tinycolor(D.strBg).toRgb();var B=E.r+E.g+E.b>375?tinycolor.darken(D.strBg).toRgb():tinycolor.lighten(D.strBg).toRgb();var C=tinycolor(D.strText).toRgb();return'                .jgallery[data-jgallery-id="'+this.intId+'"] {                  background: rgb('+E.r+","+E.g+", "+E.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-btn {                  color: rgb('+C.r+","+C.g+", "+C.b+");                  text-shadow: 0 0 1px rgb("+E.r+","+E.g+", "+E.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-btn.active {                  color: rgb('+C.r+","+C.g+", "+C.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-btn:hover {                  text-shadow: none;                  text-shadow: 0 0 .15em rgba('+C.r+","+C.g+", "+C.b+",.75), 0 0 .45em rgba("+C.r+","+C.g+", "+C.b+',.5);                }                .jgallery[data-jgallery-id="'+this.intId+'"] .change-album .menu {                  background: rgb('+B.r+","+B.g+", "+B.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom .change-album > .title {                  background: rgb('+B.r+","+B.g+", "+B.b+");                  box-shadow: 4px 0 4px rgb("+B.r+","+B.g+", "+B.b+')                }                .jgallery[data-jgallery-id="'+this.intId+'"] .full-screen .change-album .menu {                  background: rgb('+E.r+","+E.g+", "+E.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .change-album .menu .item {                  border-color: rgb('+E.r+","+E.g+", "+E.b+");                  color: rgb("+C.r+","+C.g+", "+C.b+");                  background: rgb("+B.r+","+B.g+", "+B.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .full-screen .change-album .menu .item {                  border-color: rgb('+B.r+","+B.g+", "+B.b+");                  background: rgb("+E.r+","+E.g+", "+E.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .change-album .menu .item.active,                .jgallery[data-jgallery-id="'+this.intId+'"] .change-album .menu .item:hover {                  background: rgb('+C.r+","+C.g+", "+C.b+");                  color: rgb("+E.r+","+E.g+", "+E.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container:not([data-size="fill"]) .jgallery-container {                  background: rgb('+E.r+","+E.g+", "+E.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom {                  background: rgb('+B.r+","+B.g+", "+B.b+");                  -webkit-box-shadow: 0 -3px rgba("+B.r+","+B.g+", "+B.b+", .5);                  box-shadow: 0 -3px rgba("+B.r+","+B.g+", "+B.b+', .5);                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom .icons,                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom .icons .fa {                  background: rgb('+B.r+","+B.g+", "+B.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom > .title {                  color: rgb('+C.r+","+C.g+", "+C.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom > .title.expanded {                  background: rgba('+E.r+","+E.g+", "+E.b+',.7);                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .drag-nav {                  background: rgb('+B.r+","+B.g+", "+B.b+");                  -webkit-box-shadow: 0 0 0 3px rgba("+B.r+","+B.g+", "+B.b+", .5);                  box-shadow: 0 0 0 3px rgba("+B.r+","+B.g+", "+B.b+', .5);                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .drag-nav .crop {                  -webkit-box-shadow: 0 0 0 3px rgba('+C.r+","+C.g+", "+C.b+", .5);                  box-shadow: 0 0 0 3px rgba("+C.r+","+C.g+", "+C.b+', .5);                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails {                  background: rgb('+B.r+","+B.g+", "+B.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails .ico {                  color: rgb('+C.r+","+C.g+", "+C.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails .jgallery-container {                  -webkit-box-shadow: 0 0 0 3px rgba('+B.r+","+B.g+", "+B.b+", .5);                  box-shadow: 0 0 0 3px rgba("+B.r+","+B.g+", "+B.b+', .5);                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails.full-screen .prev:before {                  background-image: -webkit-gradient(linear,left 0%,left 100%,from(rgba( '+B.r+","+B.g+", "+B.b+", 1 )),to(rgba( "+B.r+","+B.g+", "+B.b+", 0)));                  background-image: -webkit-linear-gradient(top,rgba( "+B.r+","+B.g+", "+B.b+", 1 ),0%,rgba( "+B.r+","+B.g+", "+B.b+", 0),100%);                  background-image: -moz-linear-gradient(top,rgba( "+B.r+","+B.g+", "+B.b+", 1 ) 0%,rgba( "+B.r+","+B.g+", "+B.b+", 0) 100%);                  background-image: linear-gradient(to bottom,rgba( "+B.r+","+B.g+", "+B.b+", 1 ) 0%,rgba( "+B.r+","+B.g+", "+B.b+', 0) 100%);                  background-repeat: repeat-x;                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails.full-screen .next:before {                  background-image: -webkit-gradient(linear,left 0%,left 100%,from(rgba( '+B.r+","+B.g+", "+B.b+", 0)),to(rgba( "+B.r+","+B.g+", "+B.b+", 1)));                  background-image: -webkit-linear-gradient(top,rgba( "+B.r+","+B.g+", "+B.b+", 0),0%,rgba( "+B.r+","+B.g+", "+B.b+", 1),100%);                  background-image: -moz-linear-gradient(top,rgba( "+B.r+","+B.g+", "+B.b+", 0) 0%,rgba( "+B.r+","+B.g+", "+B.b+", 1) 100%);                  background-image: linear-gradient(to bottom,rgba( "+B.r+","+B.g+", "+B.b+", 0) 0%,rgba( "+B.r+","+B.g+", "+B.b+', 1) 100%);                  background-repeat: repeat-x;                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails.images a:after {                  background: rgb('+B.r+","+B.g+", "+B.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails.full-screen .prev,                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails.full-screen .next {                  background: rgb('+B.r+","+B.g+", "+B.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails.square a {                  background: rgb('+C.r+","+C.g+", "+C.b+");                  color: rgb("+E.r+","+E.g+", "+E.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .overlayContainer .overlay {                  background: rgba('+E.r+","+E.g+", "+E.b+",.8);                  color: rgb("+C.r+","+C.g+", "+C.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .overlayContainer .imageLoaderPositionAbsolute:after {                  border-color: rgba('+C.r+","+C.g+", "+C.b+', .5 );                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-horizontal .prev {                  background: rgb('+B.r+","+B.g+", "+B.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-horizontal .prev:before {                  background-image: -webkit-gradient(linear,0% top,100% top,from(rgba( '+B.r+","+B.g+", "+B.b+", 1 )),to(rgba( "+B.r+","+B.g+", "+B.b+", 0 )));                  background-image: -webkit-linear-gradient(left,color-stop(rgba( "+B.r+","+B.g+", "+B.b+", 1 ) 0%),color-stop(rgba( "+B.r+","+B.g+", "+B.b+", 0 ) 100%));                  background-image: -moz-linear-gradient(left,rgba( "+B.r+","+B.g+", "+B.b+", 1 ) 0%,rgba( "+B.r+","+B.g+", "+B.b+", 0 ) 100%);                  background-image: linear-gradient(to right,rgba( "+B.r+","+B.g+", "+B.b+", 1 ) 0%,rgba( "+B.r+","+B.g+", "+B.b+', 0 ) 100%);                  background-repeat: repeat-x;                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-horizontal .next {                  background: rgb('+B.r+","+B.g+", "+B.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-horizontal .next:before {                  background-image: -webkit-gradient(linear,0% top,100% top,from(rgba( '+B.r+","+B.g+", "+B.b+", 0 )),to(rgba( "+B.r+","+B.g+", "+B.b+", 1 )));                  background-image: -webkit-linear-gradient(left,color-stop(rgba( "+B.r+","+B.g+", "+B.b+", 0 ) 0%),color-stop(rgba( "+B.r+","+B.g+", "+B.b+", 1 ) 100%));                  background-image: -moz-linear-gradient(left,rgba( "+B.r+","+B.g+", "+B.b+", 0 ) 0%,rgba( "+B.r+","+B.g+", "+B.b+", 1 ) 100%);                  background-image: linear-gradient(to right,rgba( "+B.r+","+B.g+", "+B.b+", 0 ) 0%,rgba( "+B.r+","+B.g+", "+B.b+', 1 ) 100%);                  background-repeat: repeat-x;                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-vertical .prev {                  background: rgb('+B.r+","+B.g+", "+B.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-vertical .prev:before {                  background-image: -webkit-gradient(linear,left 0%,left 100%,from(rgba( '+B.r+","+B.g+", "+B.b+", 1 )),to(rgba( "+B.r+","+B.g+", "+B.b+", 0 )));                  background-image: -webkit-linear-gradient(top,rgba( "+B.r+","+B.g+", "+B.b+", 1 ),0%,rgba( "+B.r+","+B.g+", "+B.b+", 0 ),100%);                  background-image: -moz-linear-gradient(top,rgba( "+B.r+","+B.g+", "+B.b+", 1 ) 0%,rgba( "+B.r+","+B.g+", "+B.b+", 0 ) 100%);                  background-image: linear-gradient(to bottom,rgba( "+B.r+","+B.g+", "+B.b+", 1 ) 0%,rgba( "+B.r+","+B.g+", "+B.b+', 0 ) 100%);                  background-repeat: repeat-x;                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-vertical .next {                  background: rgb('+B.r+","+B.g+", "+B.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-vertical .next:before {                  background-image: -webkit-gradient(linear,left 0%,left 100%,from(rgba( '+B.r+","+B.g+", "+B.b+", 0 )),to(rgba( "+B.r+","+B.g+", "+B.b+", 1 )));                  background-image: -webkit-linear-gradient(top,rgba( "+B.r+","+B.g+", "+B.b+", 0 ),0%,rgba( "+B.r+","+B.g+", "+B.b+", 1 ),100%);                  background-image: -moz-linear-gradient(top,rgba( "+B.r+","+B.g+", "+B.b+", 0 ) 0%,rgba( "+B.r+","+B.g+", "+B.b+", 1 ) 100%);                  background-image: linear-gradient(to bottom,rgba( "+B.r+","+B.g+", "+B.b+", 0 ) 0%,rgba( "+B.r+","+B.g+", "+B.b+', 1 ) 100%);                  background-repeat: repeat-x;                }                .jgallery.has-title.jgallery-slider[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom,                .jgallery.has-title.jgallery-slider[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom > .title.expanded {                  background: rgba('+E.r+","+E.g+", "+E.b+",.7);                  color: rgb("+C.r+","+C.g+", "+C.b+');                }                .jgallery.jgallery-slider[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom .jgallery-btn {                  background: rgba('+E.r+","+E.g+", "+E.b+",.8);                  color: rgb("+C.r+","+C.g+", "+C.b+");                }            "}};g.fn.jGallery=function(B){return this.each(function(){var C=g(this);g(function(){var D=failand(typeof B!=="undefined",typeof B.mode!=="undefined");var E=m;if(failand(C.is("[data-jgallery-id]"),D)){delete B.mode;D=false}if(C.is("[data-jgallery-id]")){E=b[C.attr("data-jgallery-id")]}if(failand(D,B.mode==="standard")){E=g.extend({},E,j,B,f)}else{if(failand(D,B.mode==="slider")){E=g.extend({},E,A,B,a)}else{E=g.extend({},E,B)}}if(!C.is("[data-jgallery-id]")){b[++c]=E;y[c]=new p(C)}else{y[C.attr("data-jgallery-id")].update(E);b[C.attr("data-jgallery-id")]=E}})})};g.jGalleryOptions=function(){return b};g.jGalleryTransitions=function(){return w};var t=0;var d=function(B){if(B.is("[data-advanced-animation-id]")){return}this.cols=1;this.rows=1;this.direction="forward";this.animation=true;this.$element=B;this.$element.filter(":not( [data-advanced-animation-id] )").attr("data-advanced-animation-id",++t);this.$element.find(".pt-item").wrap('<div class="pt-page" />');this.$element.wrapInner('<div class="pt-part" />');this.generateHtml();this._showParts(this.$element.find(".pt-part"),1)};d.prototype={next:function(){var B=this.$element.find(".pt-part").eq(this.direction==="backward"?-1:0).find(".pt-page-current:not(.pt-page-prev)").next();if(B.length){this.show(B)}else{this.show(this.$element.find(".pt-part").eq(this.direction==="backward"?-1:0).find(".pt-page").eq(0))}},show:function(C,B){var D=C.prevAll().length+1;if(C.is(".pt-page-current:not(.pt-page-prev)")){return}B=g.extend({},{animation:true},B);this.animation=B.animation;this._waveJumpToEnd();if(this.animation){this._runWave(D)}else{this._showParts(this.$element.find(".pt-part"),D)}this.intPrevPtPageNumber=D},setQuantityParts:function(C,B){this.cols=C;this.rows=B;this.generateHtml()},setDuration:function(D){var C=this.$element.attr("data-advanced-animation-id");var B=n.find('style[data-advanced-animation-id="'+C+'"]');this.duration=D;if(v()){return}if(B.length===0){B=n.append('<style type="text/css" data-advanced-animation-id="'+C+'" />').children(":last-child")}B.html('                [data-advanced-animation-id="'+C+'"] .pt-page {                    -webkit-animation-duration: '+D+";                    -moz-animation-duration: "+D+";                    animation-duration: "+D+";                }            ")},setHideEffect:function(B){this.prevHideEffect=this.hideEffect;this.hideEffect=B;if(/moveTo|rotateRoom|rotateCarousel|rotateSlideOut/.test(B)){this.$element.find(".pt-part").addClass("hide-overflow")}else{this.$element.find(".pt-part").removeClass("hide-overflow")}},setShowEffect:function(B){this.prevShowEffect=this.showEffect;this.showEffect=B},setDirection:function(B){this.direction=B},_runWave:function(B){this.$element.find(".pt-part").addClass("in-queue");this._showNextPart(B)},_waveJumpToEnd:function(){clearTimeout(this.showPartsTimeout);if(typeof this.intPrevPtPageNumber!=="undefined"){this._showParts(this.$element.find(".pt-part.in-queue").removeClass("in-queue"),this.intPrevPtPageNumber)}},_showNextPart:function(C){var B=this;var D=this.$element.find(".pt-part.in-queue").eq(this.direction==="backward"?-1:0);if(D.length===0){return}this._showParts(D.removeClass("in-queue"),C);if(D.length===0){return}clearTimeout(this.showPartsTimeout);this.showPartsTimeout=setTimeout(function(){B._showNextPart(C)},parseFloat(this.duration)*1000*0.25/Math.max(1,this.$element.find(".pt-part").length-1))},_showParts:function(C,B){C.find(".pt-page-current.pt-page-prev").removeClass("pt-page-prev").removeClass("pt-page-current");C.find(".pt-page-current").addClass("pt-page-prev");C.find(".pt-page:nth-child("+B+")").addClass("pt-page-current");C.find(".pt-page").removeClass(this.hideEffect).removeClass(this.showEffect);if(typeof this.prevHideEffect!=="undefined"){C.find(".pt-page").removeClass(this.prevHideEffect)}if(typeof this.prevShowEffect!=="undefined"){C.find(".pt-page").removeClass(this.prevShowEffect)}if(this.animation){C.find(".pt-page-prev").addClass(this.hideEffect);C.find(".pt-page-current:not(.pt-page-prev)").addClass(this.showEffect)}},hideActive:function(){this.$element.find(".pt-page-current").addClass("pt-page-prev").addClass(this.hideEffect)},generateHtml:function(){var D;var C;var B;this.$element.html(this.$element.find(".pt-part").eq(0).html());B=this.$element.html();this.$element.children(".pt-part").remove();for(C=0;C<this.rows;C++){for(D=0;D<this.cols;D++){this.$element.append('<div class="pt-part pt-perspective" data-col-no="'+D+'" data-row-no="'+C+'" style="position: absolute;"></div>').children(":last-child").html(B).find(".pt-item")}}this.setPositionParts();this.$element.children(":not(.pt-part)").remove()},setPositionParts:function(){var C=this;var E=this.$element.outerWidth();var D=this.$element.outerHeight();var F=E/this.cols;var B=D/this.rows;this.$element.find(".pt-part").each(function(){var I=g(this);var H=I.attr("data-col-no");var G=I.attr("data-row-no");I.css({left:C.$element.outerWidth()*(100/C.cols*H)/100+"px",top:C.$element.outerHeight()*(100/C.rows*G)/100+"px",width:C.$element.outerWidth()*(100/C.cols)/100+1+"px",height:C.$element.outerHeight()*(100/C.rows)/100+1+"px"}).find(".pt-item").css({width:E,height:D,left:-F*H,top:-B*G})})}};g.fn.overlay=function(B){var C={show:false,hide:false,showLoader:false,hideLoader:false,fadeIn:true,fadeOut:true,fadeInLoader:true,fadeOutLoader:true,afterInit:function(){}};B=g.extend({},C,B);this.each(function(){var K=g(this),L,J,I=K.is(".overlayContainer:has(.overlay)"),H=function(){var P=Math.max(K.offset().top,g("body, html").scrollTop()),O=Math.min(K.offset().top+K.outerHeight(),g("body, html").scrollTop()+g(window).height()),N=P+(O-P)/2-K.offset().top;J.css({top:N+"px"})},F=function(){K.children(".overlay").css({width:K.outerWidth(),height:K.is("body")?g("html").outerHeight():K.outerHeight()})},G=function(){B.fadeIn?L.fadeIn(500):L.show()},E=function(){B.fadeOut?L.fadeOut(500):L.hide()},M=function(){B.fadeInLoader?J.not(":visible").fadeIn(500):J.not(":visible").show()},D=function(){B.fadeOutLoader?J.filter(":visible").fadeOut(500):J.filter(":visible").hide()};g(window).scroll(function(){H()});g(window).resize(function(){H();F()});if(K.is("table")){if(K.parent().is(".overlayContainer")){K=K.parent()}}if(!I){if(K.is("table")){K.wrap("<div></div>");K=K.parent()}K.addClass("overlayContainer");K.append('<div class="overlay" style="display: none;"><div class="imageLoaderPositionAbsolute" style="display: none;"></div></div>');B.afterInit()}L=K.children(".overlay");J=K.find(".imageLoaderPositionAbsolute");L.stop(false,true);J.stop(false,true);if(B.show){G()}else{if(B.hide){E()}}if(B.showLoader){M()}else{if(B.hideLoader){D()}}H();F()})};g.fn.jLoader=function(B){B=g.extend({interval:1000,skip:":not(*)",start:function(){g("body").overlay({fadeIn:false,fadeOut:false,show:true,showLoader:true});g("body").show()},success:function(){g("body").overlay({hide:true})},progress:function(){}},B);this.each(function(){var H=g(this);var F=g();var D=g();var G;var E=0;function C(){var J=true;var L=0;var I=0;var K;D.each(function(){L++;if(g(this)[0].complete){I++}else{J=false}if(L===E){K=parseInt(I*100/E);B.progress({percent:K});if(J){clearTimeout(G);F.remove();B.success()}else{G=setTimeout(C,B.interval)}}})}H.append('<div class="jLoaderTmp" style="position: absolute; width: 0; height: 0; line-height: 0; font-size: 0; visibility: hidden; overflow: hidden; z-index: -1;"></div>');F=H.children(".jLoaderTmp:last-child");g(H).add(H.find("*")).not(B.skip).each(function(){var I;if(g(this).css("background-image")!=="none"){I=g(this).css("background-image");if(/url/.exec(I)){I=I.replace('"',"").replace("'","").replace(" ","").replace("url(","").replace(")","");F.append('<img src="'+I+'">')}}});D=H.find("img:not( "+B.skip+")");if(H.is("img")){if(!H.is(B.skip)){D=D.add(H)}}E=parseInt(D.length);B.start();C()})};g.fn.outerHtml=function(){return(!this.length)?this:(this[0].outerHTML||(function(B){var D=document.createElement("div");D.appendChild(B.cloneNode(true));var C=D.innerHTML;D=null;return C})(this[0]))};function u(B){B=g.extend({},{stateObj:{},title:r.html(),path:""},B);console.log(document.location.href.split("#")[0]+"#"+B.path);window.history.pushState(B.stateObj,B.title,document.location.href.split("#")[0]+"#"+B.path)}function k(){var D=false;if(navigator.appName==="Microsoft Internet Explorer"){var B=navigator.userAgent;var C=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(C.exec(B)!==null){D=true}}return D}function z(){var D=false;if(navigator.appName==="Microsoft Internet Explorer"){var B=navigator.userAgent;var C=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(C.exec(B)!==null){D=parseFloat(RegExp.$1);D=D<8}}return D}function v(){var D=false;if(navigator.appName==="Microsoft Internet Explorer"){var B=navigator.userAgent;var C=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(C.exec(B)!==null){D=parseFloat(RegExp.$1);D=D<9}}return D}})(jQuery);
(function(g){var m={mode:"full-screen",width:"100%",height:"600px",autostart:false,autostartAtImage:1,autostartAtAlbum:1,canClose:true,canResize:true,draggableZoom:true,canChangeMode:false,backgroundColor:"#000",textColor:"#fff",browserHistory:true,thumbnails:true,thumbnailsFullScreen:true,thumbType:"image",thumbnailsPosition:"bottom",reloadThumbnails:true,thumbWidth:75,thumbHeight:75,thumbWidthOnFullScreen:100,thumbHeightOnFullScreen:100,canMinimalizeThumbnails:true,hideThumbnailsOnInit:false,transition:"moveToRight_moveFromLeft",transitionBackward:"moveToLeft_moveFromRight",transitionWaveDirection:"forward",transitionCols:1,transitionRows:5,showTimingFunction:"linear",hideTimingFunction:"linear",transitionDuration:"0.7s",zoomSize:"fit",title:true,titleExpanded:false,slideshow:true,slideshowAutostart:false,slideshowCanRandom:true,slideshowRandom:false,slideshowInterval:"8s",preloadAll:false,appendTo:"body",disabledOnIE8AndOlder:true,initGallery:function(){},showPhoto:function(){},beforeLoadPhoto:function(){},afterLoadPhoto:function(){},showGallery:function(){},closeGallery:function(){}};var j={autostart:true,canClose:false,canChangeMode:true,browserHistory:false};var f={};var A={width:"940px",height:"360px",canResize:false,draggableZoom:false,browserHistory:false,thumbnailsFullScreen:false,thumbType:"square",thumbWidth:20,thumbHeight:20,canMinimalizeThumbnails:false,transition:"rotateCubeRightOut_rotateCubeRightIn",transitionBackward:"rotateCubeRightOut_rotateCubeRightIn",transitionCols:6,transitionRows:1,slideshow:true,slideshowAutostart:true,zoomSize:"fill"};var a={autostart:true,canClose:false,zoomSize:"fill",canChangeMode:false};var w={moveToLeft_moveFromRight:["pt-page-moveToLeft","pt-page-moveFromRight"],moveToRight_moveFromLeft:["pt-page-moveToRight","pt-page-moveFromLeft"],moveToTop_moveFromBottom:["pt-page-moveToTop","pt-page-moveFromBottom"],moveToBottom_moveFromTop:["pt-page-moveToBottom","pt-page-moveFromTop"],fade_moveFromRight:["pt-page-fade","pt-page-moveFromRight pt-page-ontop"],fade_moveFromLeft:["pt-page-fade","pt-page-moveFromLeft pt-page-ontop"],fade_moveFromBottom:["pt-page-fade","pt-page-moveFromBottom pt-page-ontop"],fade_moveFromTop:["pt-page-fade","pt-page-moveFromTop pt-page-ontop"],moveToLeftFade_moveFromRightFade:["pt-page-moveToLeftFade","pt-page-moveFromRightFade"],moveToRightFade_moveFromLeftFade:["pt-page-moveToRightFade","pt-page-moveFromLeftFade"],moveToTopFade_moveFromBottomFade:["pt-page-moveToTopFade","pt-page-moveFromBottomFade"],moveToBottomFade_moveFromTopFade:["pt-page-moveToBottomFade","pt-page-moveFromTopFade"],moveToLeftEasing_moveFromRight:["pt-page-moveToLeftEasing pt-page-ontop","pt-page-moveFromRight"],moveToRightEasing_moveFromLeft:["pt-page-moveToRightEasing pt-page-ontop","pt-page-moveFromLeft"],moveToTopEasing_moveFromBottom:["pt-page-moveToTopEasing pt-page-ontop","pt-page-moveFromBottom"],moveToBottomEasing_moveFromTop:["pt-page-moveToBottomEasing pt-page-ontop","pt-page-moveFromTop"],scaleDown_moveFromRight:["pt-page-scaleDown","pt-page-moveFromRight pt-page-ontop"],scaleDown_moveFromLeft:["pt-page-scaleDown","pt-page-moveFromLeft pt-page-ontop"],scaleDown_moveFromBottom:["pt-page-scaleDown","pt-page-moveFromBottom pt-page-ontop"],scaleDown_moveFromTop:["pt-page-scaleDown","pt-page-moveFromTop pt-page-ontop"],scaleDown_scaleUpDown:["pt-page-scaleDown","pt-page-scaleUpDown pt-page-delay300"],scaleDownUp_scaleUp:["pt-page-scaleDownUp","pt-page-scaleUp pt-page-delay300"],moveToLeft_scaleUp:["pt-page-moveToLeft pt-page-ontop","pt-page-scaleUp"],moveToRight_scaleUp:["pt-page-moveToRight pt-page-ontop","pt-page-scaleUp"],moveToTop_scaleUp:["pt-page-moveToTop pt-page-ontop","pt-page-scaleUp"],moveToBottom_scaleUp:["pt-page-moveToBottom pt-page-ontop","pt-page-scaleUp"],scaleDownCenter_scaleUpCenter:["pt-page-scaleDownCenter","pt-page-scaleUpCenter pt-page-delay400"],rotateRightSideFirst_moveFromRight:["pt-page-rotateRightSideFirst","pt-page-moveFromRight pt-page-delay200 pt-page-ontop"],rotateLeftSideFirst_moveFromLeft:["pt-page-rotateLeftSideFirst","pt-page-moveFromLeft pt-page-delay200 pt-page-ontop"],rotateTopSideFirst_moveFromTop:["pt-page-rotateTopSideFirst","pt-page-moveFromTop pt-page-delay200 pt-page-ontop"],rotateBottomSideFirst_moveFromBottom:["pt-page-rotateBottomSideFirst","pt-page-moveFromBottom pt-page-delay200 pt-page-ontop"],flipOutRight_flipInLeft:["pt-page-flipOutRight","pt-page-flipInLeft pt-page-delay500"],flipOutLeft_flipInRight:["pt-page-flipOutLeft","pt-page-flipInRight pt-page-delay500"],flipOutTop_flipInBottom:["pt-page-flipOutTop","pt-page-flipInBottom pt-page-delay500"],flipOutBottom_flipInTop:["pt-page-flipOutBottom","pt-page-flipInTop pt-page-delay500"],rotateFall_scaleUp:["pt-page-rotateFall pt-page-ontop","pt-page-scaleUp"],rotateOutNewspaper_rotateInNewspaper:["pt-page-rotateOutNewspaper","pt-page-rotateInNewspaper pt-page-delay500"],rotatePushLeft_moveFromRight:["pt-page-rotatePushLeft","pt-page-moveFromRight"],rotatePushRight_moveFromLeft:["pt-page-rotatePushRight","pt-page-moveFromLeft"],rotatePushTop_moveFromBottom:["pt-page-rotatePushTop","pt-page-moveFromBottom"],rotatePushBottom_moveFromTop:["pt-page-rotatePushBottom","pt-page-moveFromTop"],rotatePushLeft_rotatePullRight:["pt-page-rotatePushLeft","pt-page-rotatePullRight pt-page-delay180"],rotatePushRight_rotatePullLeft:["pt-page-rotatePushRight","pt-page-rotatePullLeft pt-page-delay180"],rotatePushTop_rotatePullBottom:["pt-page-rotatePushTop","pt-page-rotatePullBottom pt-page-delay180"],rotatePushBottom_page:["pt-page-rotatePushBottom","pt-page-rotatePullTop pt-page-delay180"],rotateFoldLeft_moveFromRightFade:["pt-page-rotateFoldLeft","pt-page-moveFromRightFade"],rotateFoldRight_moveFromLeftFade:["pt-page-rotateFoldRight","pt-page-moveFromLeftFade"],rotateFoldTop_moveFromBottomFade:["pt-page-rotateFoldTop","pt-page-moveFromBottomFade"],rotateFoldBottom_moveFromTopFade:["pt-page-rotateFoldBottom","pt-page-moveFromTopFade"],moveToRightFade_rotateUnfoldLeft:["pt-page-moveToRightFade","pt-page-rotateUnfoldLeft"],moveToLeftFade_rotateUnfoldRight:["pt-page-moveToLeftFade","pt-page-rotateUnfoldRight"],moveToBottomFade_rotateUnfoldTop:["pt-page-moveToBottomFade","pt-page-rotateUnfoldTop"],moveToTopFade_rotateUnfoldBottom:["pt-page-moveToTopFade","pt-page-rotateUnfoldBottom"],rotateRoomLeftOut_rotateRoomLeftIn:["pt-page-rotateRoomLeftOut pt-page-ontop","pt-page-rotateRoomLeftIn"],rotateRoomRightOut_rotateRoomRightIn:["pt-page-rotateRoomRightOut pt-page-ontop","pt-page-rotateRoomRightIn"],rotateRoomTopOut_rotateRoomTopIn:["pt-page-rotateRoomTopOut pt-page-ontop","pt-page-rotateRoomTopIn"],rotateRoomBottomOut_rotateRoomBottomIn:["pt-page-rotateRoomBottomOut pt-page-ontop","pt-page-rotateRoomBottomIn"],rotateCubeLeftOut_rotateCubeLeftIn:["pt-page-rotateCubeLeftOut pt-page-ontop","pt-page-rotateCubeLeftIn"],rotateCubeRightOut_rotateCubeRightIn:["pt-page-rotateCubeRightOut pt-page-ontop","pt-page-rotateCubeRightIn"],rotateCubeTopOut_rotateCubeTopIn:["pt-page-rotateCubeTopOut pt-page-ontop","pt-page-rotateCubeTopIn"],rotateCubeBottomOut_rotateCubeBottomIn:["pt-page-rotateCubeBottomOut pt-page-ontop","pt-page-rotateCubeBottomIn"],rotateCarouselLeftOut_rotateCarouselLeftIn:["pt-page-rotateCarouselLeftOut pt-page-ontop","pt-page-rotateCarouselLeftIn"],rotateCarouselRightOut_rotateCarouselRightIn:["pt-page-rotateCarouselRightOut pt-page-ontop","pt-page-rotateCarouselRightIn"],rotateCarouselTopOut_rotateCarouselTopIn:["pt-page-rotateCarouselTopOut pt-page-ontop","pt-page-rotateCarouselTopIn"],rotateCarouselBottomOut_rotateCarouselBottomIn:["pt-page-rotateCarouselBottomOut pt-page-ontop","pt-page-rotateCarouselBottomIn"],rotateSidesOut_rotateSidesInDelay:["pt-page-rotateSidesOut","pt-page-rotateSidesIn pt-page-delay200"],rotateSlideOut_rotateSlideIn:["pt-page-rotateSlideOut","pt-page-rotateSlideIn"]};var b=[];var y=[""];var x=[];g.each(w,function(B,C){x.push(C)});var n;var r;var s;g(function(){n=g("head");r=g("title");s=g("body")});var q=g(window);var c=0;var i=function(C,B){this.intJgalleryId=B;this.$element=C};i.prototype={clear:function(){this.$element.stop(false,true).css({width:0});return this},start:function(D,E){var C=parseInt(b[this.intJgalleryId].slideshowInterval)*1000;var B=this.$element;B.animate({width:D},C-C*(B.width()/B.parent().width()),"linear",E);return this},pause:function(){this.$element.stop();return this}};var o=function(C,B){this.$element=C;this.jGallery=B;this.$title=this.$element.find(".title")};o.prototype={bindEvents:function(C){var B=this;this.getElement().on({click:function(D){B.menuToggle();D.stopPropagation()}});this.getItemsOfMenu().on({click:function(){var D=g(this);if(D.is(".active")){return}C.thumbnails.setActiveAlbum(C.thumbnails.$albums.filter('[data-jgallery-album-title="'+D.attr("data-jgallery-album-title")+'"]'))}});g("html").on("click",function(){B.menuHide()})},setTitle:function(B){this.$title.html(B)},getTitle:function(){return this.$title.html()},getListOfAlbums:function(){return this.getElement().find(".menu")},getElement:function(){return this.$element},getItemsOfMenu:function(){return this.getListOfAlbums().find(".item")},appendToMenu:function(B){this.getListOfAlbums().append(B)},menuToggle:function(){this.getElement().toggleClass("active")},menuHide:function(){this.getElement().removeClass("active")},clearMenu:function(){this.getListOfAlbums().html("")},refreshMenuHeight:function(){this.getListOfAlbums().css("max-height",this.jGallery.zoom.$container.outerHeight()-8)}};var e=function(C,B){this.options=g.extend({},{thumbsHidden:true},B);this.jGallery=C;this.$element=C.$this;this.booIsAlbums=C.booIsAlbums;this.$tmp;this.intI=1;this.intJ=1;this.intNo;this.$thumbnailsContainerInner=this.jGallery.$jgallery.find(".jgallery-thumbnails .jgallery-container-inner");this.start()};e.prototype={start:function(){var C=this;var B=this.jGallery.isSlider()?".album:has(img)":".album:has(a:has(img))";g("body").append('<div id="jGalleryTmp" style="position: absolute; top: 0; left: 0; width: 0; height: 0; z-index: -1; overflow: hidden;">'+this.$element.html()+"</div>");this.$tmp=g("#jGalleryTmp");this.$thumbnailsContainerInner.html("");if(this.booIsAlbums){this.$tmp.find(B).each(function(){C.insertAlbum(g(this))})}else{this.insertImages(this.$tmp,this.$thumbnailsContainerInner)}this.$tmp.remove();this.refreshThumbsSize()},insertAlbum:function(C){var B=C.is("[data-jgallery-album-title]")?C.attr("data-jgallery-album-title"):"Album "+this.intJ;var D=this.$thumbnailsContainerInner.append('<div class="album" data-jgallery-album-title="'+B+'"></div>').children(":last-child");if(this.intJ===1){D.addClass("active")}this.insertImages(C,D);this.intJ++},insertImages:function(D,E){var C=this;var B=this.jGallery.isSlider()?"img":"a:has(img)";this.intNo=1;D.find(B).each(function(){C.insertImage(g(this),E)})},insertImage:function(B,C){if(B.is("a")){C.append('<a href="'+B.attr("href")+'">'+this.generateImgTag(B.find("img").eq(0)).outerHtml()+"</a>");if(this.options.thumbsHidden){C.children(":last-child").addClass("hidden")}}else{if(B.is("img")){C.append(g('<a href="'+B.attr("src")+'">'+this.generateImgTag(B).outerHtml()+"</a>"))}}C.children(":last-child").attr("data-jgallery-photo-id",this.intI++).attr("data-jgallery-number",this.intNo++)},generateImgTag:function(B){var C=g('<img src="'+B.attr("src")+'" />');if(B.is("[alt]")){C.attr("alt",B.attr("alt"))}if(B.is("[data-jgallery-bg-color]")){C.attr("data-jgallery-bg-color",B.attr("data-jgallery-bg-color"))}if(B.is("[data-jgallery-text-color]")){C.attr("data-jgallery-text-color",B.attr("data-jgallery-text-color"))}return C},refreshThumbsSize:function(){this.$thumbnailsContainerInner.find("img").each(function(){var B=g(this);var C=new Image();C.src=B.attr("src");C.width>C.height?B.css({"max-height":"100%","max-width":"none"}):B.css({"max-width":"100%","max-height":"none"})})}};var l=function(B){this.$element=B.$element.find(".jgallery-thumbnails");this.$a=this.getElement().find("a");this.$img=this.getElement().find("img");this.$container=this.getElement().find(".jgallery-container");this.$albums=this.getElement().find(".album").length?this.getElement().find(".album"):this.getElement().find(".jgallery-container-inner").addClass("active");this.$btnNext=this.getElement().children(".next");this.$btnPrev=this.getElement().children(".prev");this.intJgalleryId=B.$element.attr("data-jgallery-id");this.isJgalleryInitialized=B.$element.is("[data-jgallery-id]");this.zoom=B.zoom;this.$iconToggleThumbsVisibility=this.zoom.$container.find(".minimalize-thumbnails");this.jGallery=B};l.prototype={getElement:function(){return this.$element},init:function(){this.getElement().removeClass("square number images jgallery-thumbnails-left jgallery-thumbnails-right jgallery-thumbnails-top jgallery-thumbnails-bottom jgallery-thumbnails-horizontal jgallery-thumbnails-vertical");this.getElement().addClass("jgallery-thumbnails-"+b[this.intJgalleryId].thumbnailsPosition);if(this.isVertical()){this.getElement().addClass("jgallery-thumbnails-vertical")}if(this.isHorizontal()){this.getElement().addClass("jgallery-thumbnails-horizontal")}if(b[this.intJgalleryId].thumbType==="image"){this._initImages()}if(b[this.intJgalleryId].thumbType==="square"){this._initSquare()}if(b[this.intJgalleryId].thumbType==="number"){this._initNumber()}},show:function(){var B=this;if(!this.getElement().is(".hidden")){return}this.getElement().removeClass("hidden");if(!this.getElement().is(".loaded")){this.getElement().jLoader({start:function(){},success:function(){B._showNextThumb();B.$a.parent(".album:not(.active)").children(".hidden").removeClass("hidden");B.getElement().addClass("loaded")}})}else{this._showNextThumb();this.$a.parent(".album:not(.active)").children(".hidden").removeClass("hidden")}this.$iconToggleThumbsVisibility.removeClass("inactive")},showThumbsForActiveAlbum:function(){this.$a.addClass("hidden");this._showNextThumb()},hide:function(B){B=g.extend({hideEachThumb:true},B);this.getElement().addClass("hidden");if(B.hideEachThumb){this.$a.addClass("hidden")}this.$iconToggleThumbsVisibility.addClass("inactive")},toggle:function(){this.getElement().is(".hidden")?this.show():this.hide({hideEachThumb:false})},setActiveThumb:function(C){var B=C.find("img");var D=this.$albums.filter(".active");var C=D.find('img[src="'+B.attr("src")+'"]').parent("a").eq(0);this.getElement().find("a").removeClass("active");C.addClass("active");if(D.find("a.active").length===0){D.find("a:first-child").eq(0).addClass("active")}this.center(C)},isHorizontal:function(){return b[this.intJgalleryId].thumbnailsPosition==="top"||b[this.intJgalleryId].thumbnailsPosition==="bottom"},isVertical:function(){return b[this.intJgalleryId].thumbnailsPosition==="left"||b[this.intJgalleryId].thumbnailsPosition==="right"},isFullScreen:function(){return this.getElement().is(".full-screen")},refreshNavigation:function(){if(this.isVertical()||this.isFullScreen()){this._refreshVerticalNavigation()}else{if(this.isHorizontal()){this._refreshHorizontalNavigation()}}},center:function(B){if(this.isHorizontal()){this._horizontalCenter(B)}if(this.isVertical()){this._verticalCenter(B)}},reload:function(){this.$a=this.getElement().find("a");this.$img=this.getElement().find("img");this.$albums=this.getElement().find(".album").length?this.getElement().find(".album"):this.getElement().find(".jgallery-container-inner").addClass("active")},bindEvents:function(){var B=this;this.$btnNext.on("click",function(){B._scrollToNext()});this.$btnPrev.on("click",function(){B._scrollToPrev()});this.zoom.$container.find(".full-screen").on({click:function(){B.zoom.slideshowPause();B.changeViewToFullScreen()}});this.getElement().find(".jgallery-close").on({click:function(){B.changeViewToBar();B.zoom.refreshSize()}})},changeViewToBar:function(){this.getElement().removeClass("full-screen");if(this.isHorizontal()){this.getElement().addClass("jgallery-thumbnails-horizontal").removeClass("jgallery-thumbnails-vertical")}this.refreshNavigation()},changeViewToFullScreen:function(){this.getElement().addClass("full-screen");if(this.isHorizontal()){this.getElement().addClass("jgallery-thumbnails-vertical").removeClass("jgallery-thumbnails-horizontal")}this._refreshVerticalNavigation()},setActiveAlbum:function(B){if(!this.jGallery.booIsAlbums||B.is(".active")){return}this.$albums.not(B.get(0)).removeClass("active");B.addClass("active");this.jGallery.iconChangeAlbum.getListOfAlbums().find(".item").removeClass("active").filter('[data-jgallery-album-title="'+B.attr("data-jgallery-album-title")+'"]').addClass("active");this.jGallery.iconChangeAlbum.setTitle(B.attr("data-jgallery-album-title"));this.refreshNavigation();if(failand(!this.getElement().is(".full-screen"),this.jGallery.$element.is(":visible"))){this.zoom.showPhoto(B.find("a").eq(0))}this.showThumbsForActiveAlbum()},_initSquare:function(){this.getElement().addClass("square")},_initNumber:function(){this.getElement().addClass("number");this._initSquare()},_initImages:function(){var B=n.find('style.jgallery-thumbnails[data-jgallery-id="'+this.intJgalleryId+'"]');var C='                    .jgallery[data-jgallery-id="'+this.intJgalleryId+'"] .jgallery-thumbnails a {\n                        width: '+b[this.intJgalleryId].thumbWidth+"px;\n                        height: "+b[this.intJgalleryId].thumbHeight+"px;\n                        font-size: "+b[this.intJgalleryId].thumbHeight+'px;\n                    }\n                    .jgallery[data-jgallery-id="'+this.intJgalleryId+'"] .jgallery-thumbnails.full-screen a {\n                        width: '+b[this.intJgalleryId].thumbWidthOnFullScreen+"px;\n                        height: "+b[this.intJgalleryId].thumbHeightOnFullScreen+"px;\n                        font-size: "+b[this.intJgalleryId].thumbHeightOnFullScreen+'px;\n                    }\n                    .jgallery[data-jgallery-id="'+this.intJgalleryId+'"] .jgallery-thumbnails-horizontal {\n                        height: '+parseInt(b[this.intJgalleryId].thumbHeight+2)+'px;\n                    }\n                    .jgallery[data-jgallery-id="'+this.intJgalleryId+'"] .jgallery-thumbnails-vertical {\n                        width: '+parseInt(b[this.intJgalleryId].thumbWidth+2)+"px;\n                    }\n            ";this.getElement().addClass("images");B.length?B.html(C):n.append('                <style type="text/css" class="jgallery-thumbnails" data-jgallery-id="'+this.intJgalleryId+'">                    '+C+"                </style>            ");if(this.isHorizontal()){this.jGallery.zoom.$container.find(".minimalize-thumbnails").addClass("fa-ellipsis-h").removeClass("fa-ellipsis-v")}else{this.jGallery.zoom.$container.find(".minimalize-thumbnails").addClass("fa-ellipsis-v").removeClass("fa-ellipsis-h")}if(this.isJgalleryInitialized){return}this.hide()},_showNextThumb:function(){var B=this;var C=this.$a.parent(".active").children(".hidden").eq(0);setTimeout(function(){C.removeClass("hidden");if(C.length){B._showNextThumb()}},70)},_horizontalCenter:function(C){var B=this;if(C.length!==1){return}this.$container.stop(false,true).animate({scrollLeft:C.position().left-this.$container.scrollLeft()*-1-C.outerWidth()/-2-this.$container.outerWidth()/2},function(){B.refreshNavigation()})},_verticalCenter:function(C){var B=this;if(C.length!==1){return}this.$container.stop(false,true).animate({scrollTop:C.position().top-this.$container.scrollTop()*-1-C.outerHeight()/-2-this.$container.outerHeight()/2},function(){B.refreshNavigation()})},_refreshHorizontalNavigation:function(){var C=this.getElement().find("div.active");var B=b[this.intJgalleryId].thumbType==="image"?this.$a.outerWidth(true)*C.find("img").length:this.$a.outerWidth(true)*C.find("a").length;this.$container.scrollLeft()>0?this.$btnPrev.addClass("visible"):this.$btnPrev.removeClass("visible");B>this.$container.width()+this.$container.scrollLeft()?this.$btnNext.addClass("visible"):this.$btnNext.removeClass("visible")},_refreshVerticalNavigation:function(){this.$container.scrollTop()>0?this.$btnPrev.addClass("visible"):this.$btnPrev.removeClass("visible");this.$container.find(".jgallery-container-inner").height()>this.$container.height()+this.$container.scrollTop()?this.$btnNext.addClass("visible"):this.$btnNext.removeClass("visible")},_scrollToPrev:function(){var B=this;if(this.isVertical()||this.isFullScreen()){this.$container.stop(false,true).animate({scrollTop:"-="+q.height()*0.7},function(){B.refreshNavigation()})}else{if(this.isHorizontal()){this.$container.stop(false,true).animate({scrollLeft:"-="+q.width()*0.7},function(){B.refreshNavigation()})}}},_scrollToNext:function(){var B=this;if(this.isVertical()||this.isFullScreen()){this.$container.stop(false,true).animate({scrollTop:"+="+q.height()*0.7},function(){B.refreshNavigation()})}else{if(this.isHorizontal()){this.$container.stop(false,true).animate({scrollLeft:"+="+q.width()*0.7},function(){B.refreshNavigation()})}}}};var h=function(B){this.$container=B.$element.children(".zoom-container");this.$element=this.$container.children(".zoom");this.$title=this.$container.find(".nav-bottom > .title");this.$btnPrev=this.$container.children(".prev");this.$btnNext=this.$container.children(".next");this.$left=this.$container.find(".left");this.$right=this.$container.find(".right");this.thumbnails=B.thumbnails;this.$jGallery=B.$element;this.jGallery=B;this.$resize=this.$container.find(".resize");this.$dragNav=this.$container.find(".drag-nav");this.$dragNavCrop=g();this.$dragNavCropImg=g();this.$changeMode=this.$container.find(".fa.change-mode");this.$random=this.$container.find(".random");this.$slideshow=this.$container.find(".slideshow");this.intJGalleryId=this.$jGallery.attr("data-jgallery-id");this.booSlideshowPlayed=false;this.booLoadingInProgress=false;this.booLoadedAll=false;this.$title.on("click",function(){g(this).toggleClass("expanded")});this.update()};h.prototype={update:function(){var B=w[b[this.jGallery.intId].transition];this.$container.attr("data-size",b[this.jGallery.intId].zoomSize);this.$element.find(".pt-page").removeClass(b[this.jGallery.intId].hideEffect).removeClass(b[this.jGallery.intId].showEffect);if(typeof B!=="undefined"){b[this.jGallery.intId].hideEffect=B[0];b[this.jGallery.intId].showEffect=B[1]}this.initAdvancedAnimation()},initAdvancedAnimation:function(){if(typeof this.advancedAnimation==="undefined"){this.advancedAnimation=new d(this.$element)}this.advancedAnimation.setDuration(b[this.jGallery.intId].transitionDuration);this.advancedAnimation.setDirection(b[this.jGallery.intId].transitionWaveDirection);this.advancedAnimation.setQuantityParts(b[this.jGallery.intId].transitionCols,b[this.jGallery.intId].transitionRows);this.advancedAnimation.setHideEffect(b[this.jGallery.intId].hideEffect);this.advancedAnimation.setShowEffect(b[this.jGallery.intId].showEffect)},setThumbnails:function(B){this.thumbnails=B},enableDrag:function(){if(!b[this.jGallery.intId].draggableZoom){return}var E=this;var G;var B;var D=function(K){var I=K.pageX;var H=K.pageY;var J=E.$element.find("img.active");G=J.css("margin-left");B=J.css("margin-top");E.$element.on({mousemove:function(L){F(L.pageX-I,L.pageY-H)},mouseleave:function(){C()}});if(b[E.jGallery.intId].zoomSize==="fill"){E.$dragNav.removeClass("hide").addClass("show")}F(0,0)};var C=function(){E.$element.off("mousemove");if(b[E.jGallery.intId].zoomSize==="fill"){E.$dragNav.removeClass("show").addClass("hide")}};var F=function(I,O){var N=parseFloat(parseFloat(G)+I);var M=parseFloat(parseFloat(B)+O);var K=E.$element.find("img.active");var L=K.eq(0);var J=K.eq(-1);var H=J.parent();if(failand(L.position().left+N<0,J.position().left+J.width()+N>H.outerWidth())){K.css({"margin-left":N});E.$dragNavCrop.css({left:-(L.position().left+N)/K.width()*100+"%"})}if(failand(L.position().top+M<0,J.position().top+J.height()+M>H.outerHeight())){K.css({"margin-top":M});E.$dragNavCrop.css({top:-(L.position().top+M)/K.height()*100+"%"})}E.$dragNavCropImg.css({"margin-left":-E.$dragNavCrop.position().left,"margin-top":-E.$dragNavCrop.position().top})};if(b[E.jGallery.intId].zoomSize==="original"){E.$dragNav.removeClass("hide").addClass("show")}this.refreshDragNavCropSize();this.$element.css("cursor","move").on({mousedown:function(H){H.preventDefault();D(H);E.slideshowPause()},mouseup:function(){C()}});this.$left.add(this.$right).hide()},disableDrag:function(){if(!b[this.jGallery.intId].draggableZoom){return}this.$dragNav.removeClass("show").addClass("hide");this.$element.css("cursor","default");this.$element.off();this.$left.add(this.$right).show()},refreshContainerSize:function(){var C=this.jGallery.isSlider()?0:this.$container.find(".nav-bottom").outerHeight();var B=failand(!this.jGallery.isSlider(),!this.thumbnails.getElement().is(".hidden"));var D=B?b[this.intJGalleryId].thumbnailsPosition:"";this.$container.css({width:failand(B,this.thumbnails.isVertical())?this.$jGallery.width()-this.thumbnails.getElement().outerWidth(true):"auto",height:failand(B,this.thumbnails.isHorizontal())?this.$jGallery.height()-this.thumbnails.getElement().outerHeight(true)-C:this.$jGallery.height()-C,"margin-top":D==="top"?this.thumbnails.getElement().outerHeight(true):0,"margin-left":D==="left"?this.thumbnails.getElement().outerWidth(true):0,"margin-right":D==="right"?this.thumbnails.getElement().outerWidth(true):0});if(b[this.jGallery.intId].draggableZoom){this.refreshDragNavCropSize()}},refreshSize:function(){if(this.thumbnails.isFullScreen()){return}this.refreshContainerSize();if(b[this.intJGalleryId].zoomSize==="original"){this.original()}else{if(b[this.intJGalleryId].zoomSize==="fill"){this.fill()}else{this.fit()}}this.$element.addClass("visible")},refreshDragNavCropSize:function(){var C=this.$element.find("img.active");var B;var D;this.$dragNavCrop.css({width:this.$element.width()/C.width()*100+"%",height:this.$element.height()/C.height()*100+"%"});B=(this.$dragNav.width()-this.$dragNavCrop.width())/2;D=(this.$dragNav.height()-this.$dragNavCrop.height())/2;this.$dragNavCrop.css({left:B,top:D});if(this.$dragNavCropImg.length){this.$dragNavCropImg.css({"margin-left":-B,"margin-top":-D})}},changeSize:function(){if(b[this.jGallery.intId].zoomSize==="fit"){b[this.jGallery.intId].zoomSize="fill";this.fill()}else{if(b[this.jGallery.intId].zoomSize==="fill"){var B=this.$element.find("img.active").eq(0);if(this.$element.outerWidth().toString()===B.attr("data-width")){b[this.jGallery.intId].zoomSize="fit";this.fit()}else{b[this.jGallery.intId].zoomSize="original";this.original()}}else{if(b[this.jGallery.intId].zoomSize==="original"){b[this.jGallery.intId].zoomSize="fit";this.fit()}}}this.$container.attr("data-size",b[this.jGallery.intId].zoomSize)},original:function(){var B=this.$element.find("img.active");this.advancedAnimation.setPositionParts();this.setImgSizeForOriginal(B);this.setImgSizeForOriginal(this.$element.find(".pt-page.init img"));if(failand(B.attr("data-width")<=this.$element.outerWidth(),B.attr("data-height")<=this.$element.outerHeight())){this.$resize.addClass("fa-search-plus").removeClass("fa-search-minus");this.disableDrag()}else{this.$resize.addClass("fa-search-minus").removeClass("fa-search-plus");this.enableDrag()}},fit:function(){var B=this.$element.find("img.active").add(this.$element.find(".pt-page.init img"));this.advancedAnimation.setPositionParts();this.setImgSizeForFit(B.filter(".active"));this.setImgSizeForFit(B.filter(":not( .active )"));this.$resize.addClass("fa-search-plus").removeClass("fa-search-minus");this.disableDrag()},fill:function(){var B=this.$element.find("img.active");this.setImgSizeForFill(B);this.setImgSizeForFill(this.$element.find(".pt-page.init img"));this.advancedAnimation.setPositionParts();if(failand(B.attr("data-width")>B.width(),B.attr("data-height")>B.height())){this.$resize.addClass("fa-search-plus").removeClass("fa-search-minus")}else{this.$resize.addClass("fa-search-minus").removeClass("fa-search-plus")}this.enableDrag()},setImgSizeForOriginal:function(B){B.css({width:B.attr("data-width"),height:B.attr("data-height"),"min-width":0,"min-height":0,"max-width":"none","max-height":"none"});B.css({"margin-top":-B.height()/2,"margin-left":-B.width()/2})},setImgSizeForFit:function(C){var D=this.jGallery.isSlider()?0:this.$container.find(".nav-bottom").outerHeight();var B=failand(!this.jGallery.isSlider(),!this.thumbnails.getElement().is(".hidden"));C.css({width:"auto",height:"auto","min-width":0,"min-height":0,"max-width":failand(B,this.thumbnails.isVertical())?this.$jGallery.width()-this.thumbnails.getElement().outerWidth(true):this.$jGallery.width(),"max-height":failand(B,this.thumbnails.isHorizontal())?this.$jGallery.height()-this.thumbnails.getElement().outerHeight(true)-D:this.$jGallery.height()-D});if(C.width()/C.height()/this.jGallery.getCanvasRatioWidthToHeight()<1){C.css({width:"auto",height:failand(B,this.thumbnails.isHorizontal())?this.$jGallery.height()-this.thumbnails.getElement().outerHeight(true)-D:this.$jGallery.height()-D})}else{C.css({width:failand(B,this.thumbnails.isVertical())?this.$jGallery.width()-this.thumbnails.getElement().outerWidth(true):this.$jGallery.width(),height:"auto"})}C.css({"margin-top":-C.height()/2,"margin-left":-C.width()/2})},setImgSizeForFill:function(C){var D=this.jGallery.isSlider()?0:this.$container.find(".nav-bottom").outerHeight();var B=failand(!this.jGallery.isSlider(),!this.thumbnails.getElement().is(".hidden"));C.css({width:"auto",height:"auto","max-width":"none","max-height":"none","min-width":0,"min-height":0});if(C.width()/C.height()/this.jGallery.getCanvasRatioWidthToHeight()>1){C.css({width:"auto",height:failand(B,this.thumbnails.isHorizontal())?this.$jGallery.height()-this.thumbnails.getElement().outerHeight(true)-D:this.$jGallery.height()-D})}else{C.css({width:failand(B,this.thumbnails.isVertical())?this.$jGallery.width()-this.thumbnails.getElement().outerWidth(true):this.$jGallery.width(),height:"auto"})}C.css({"min-width":failand(B,this.thumbnails.isVertical())?this.$jGallery.width()-this.thumbnails.getElement().outerWidth(true):this.$jGallery.width(),"min-height":failand(B,this.thumbnails.isHorizontal())?this.$jGallery.height()-this.thumbnails.getElement().outerHeight(true)-D:this.$jGallery.height()-D});C.css({"margin-top":-C.height()/2,"margin-left":-C.width()/2})},isLoaded:function(B){return this.$element.find("img").filter('[src="'+B.attr("href")+'"]').length>0},refreshNav:function(){var B=this.thumbnails.getElement().find("div.active a.active");B.prev("a").length===1?this.$btnPrev.add(this.$container.children(".left")).removeClass("hidden"):this.$btnPrev.add(this.$container.children(".left")).addClass("hidden");B.next("a").length===1?this.$btnNext.add(this.$container.children(".right")).removeClass("hidden"):this.$btnNext.add(this.$container.children(".right")).addClass("hidden")},slideshowStop:function(){this.slideshowPause();this.jGallery.progress.clear()},slideshowPause:function(){this.jGallery.progress.pause();this.$slideshow.removeClass("fa-pause").addClass("fa-play");this.booSlideshowPlayed=false;if(b[this.jGallery.intId].slideshowCanRandom){this.$random.hide()}},slideshowPlay:function(){if(this.booLoadingInProgress||this.booSlideshowPlayed){return}this.booSlideshowPlayed=true;this.$slideshow.removeClass("fa-play").addClass("fa-pause");this.slideshowSetTimeout();if(b[this.jGallery.intId].slideshowCanRandom){this.$random.show()}},slideshowPlayPause:function(){this.$slideshow.is(".fa-play")?this.slideshowPlay():this.slideshowPause()},slideshowSetTimeout:function(){var B=this;this.jGallery.progress.start(this.$container.width(),function(){B.jGallery.progress.clear();b[B.jGallery.intId].slideshowRandom?B.showRandomPhoto():B.showNextPhotoLoop()})},slideshowRandomToggle:function(){if(b[this.jGallery.intId].slideshowRandom){this.$random.removeClass("active");b[this.jGallery.intId].slideshowRandom=false}else{this.$random.addClass("active");b[this.jGallery.intId].slideshowRandom=true}},showNextPhotoLoop:function(){var B=this.thumbnails.$a.filter(".active").next("a");if(B.length===0){B=this.thumbnails.$albums.filter(".active").find("a").eq(0)}this.showPhoto(B)},showRandomPhoto:function(){var B=this.thumbnails.$albums.filter(".active").find("a:not(.active)");this.showPhoto(B.eq(Math.floor(Math.random()*B.length)))},showPrevPhoto:function(){var B=this.thumbnails.$a.filter(".active").prev("a");if(B.length===1){this.showPhoto(B)}},showNextPhoto:function(){var B=this.thumbnails.$a.filter(".active").next("a");if(B.length===1){this.showPhoto(B)}},showPhotoInit:function(){this.jGallery.init()},showPhoto:function(F,D){var C=this;var G=F.children("img");var B;var I;var H;var E;if(!this.jGallery.initialized()){this.showPhotoInit()}if(this.booLoadingInProgress){return}this.booLoadingInProgress=true;E=b[this.jGallery.intId][F.nextAll(".active").length>0?"transitionBackward":"transition"];if(E==="random"){this.setRandomTransition()}else{H=w[E];this.advancedAnimation.setHideEffect(H[0]);this.advancedAnimation.setShowEffect(H[1])}this.$element.find(".pt-page.init").remove();b[this.jGallery.intId].showPhoto();if(this.jGallery.$element.is(":not(:visible)")){this.jGallery.show()}this.thumbnails.changeViewToBar();if(this.jGallery.booIsAlbums){if(this.jGallery.iconChangeAlbum.getTitle()===""){I=F.parents(".album").eq(0).attr("data-jgallery-album-title");this.jGallery.iconChangeAlbum.setTitle(I);this.jGallery.iconChangeAlbum.$element.find('[data-jgallery-album-title="'+I+'"]').addClass("active");F.parents(".album").addClass("active").siblings(".album").removeClass("active")}}this.thumbnails.setActiveAlbum(this.thumbnails.$albums.filter('[data-jgallery-album-title="'+F.parents("[data-jgallery-album-title]").attr("data-jgallery-album-title")+'"]'));this.thumbnails.setActiveThumb(F);if(this.$element.find("img.active").attr("src")===F.attr("href")){this.booLoadingInProgress=false;return}this.refreshNav();if(b[this.jGallery.intId].title){this.$title.addClass("after fade")}B=C.isLoaded(F);if(!B){if(failand(b[C.jGallery.intId].preloadAll,!C.booLoadedAll)){this.appendAllPhotos()}else{this.appendPhoto(F)}}this.$element.find("img.active").addClass("prev-img");C.$container.find("img.active").removeClass("active");C.$container.find('[src="'+F.attr("href")+'"]').addClass("active");if(failand(b[C.jGallery.intId].title,G.is("[alt]"))){C.$title.removeClass("after").addClass("before")}if(!B||(failand(b[C.jGallery.intId].preloadAll,!C.booLoadedAll))){C.booLoadedAll=true;C.$container.overlay({show:true,showLoader:true});b[C.jGallery.intId].beforeLoadPhoto();C.loadPhoto(C.$element,F,D)}else{C.showPhotoSuccess(G,D)}},appendPhoto:function(B){this.$element.find(".pt-part").append('                <div class="jgallery-container pt-page">                    <div class="pt-item"><img src="'+B.attr("href")+'" /></div>                </div>')},appendAllPhotos:function(){var B=this;if(!b[this.jGallery.intId].preloadAll){return}this.thumbnails.$a.each(function(){var C=g(this);if(!B.isLoaded(C)){B.$element.find(".pt-part").append('<div class="jgallery-container pt-page"><div class="pt-item"><img src="'+C.attr("href")+'" /></div></div>')}});this.appendInitPhoto(this.thumbnails.$a.eq(-1))},appendInitPhoto:function(B){if(B.length!==1){return}this.$element.find(".pt-part").append('                <div class="jgallery-container pt-page pt-page-current pt-page-ontop init" style="visibility: hidden;">                    <div class="pt-item"><img src="'+B.attr("href")+'" class="active loaded" /></div>                </div>')},loadPhoto:function(C,H,D){var B=this;var I=H.children("img");var F=0;var G=C.find(".pt-part").eq(0);var E=b[this.jGallery.intId].preloadAll?G:G.find("img.active");E.jLoader({interval:500,skip:".loaded",start:function(){if(b[B.jGallery.intId].preloadAll){B.$container.find(".overlay .imageLoaderPositionAbsolute:not(:has(.progress-value))").addClass("preloadAll").append('<span class="progress-value"></span>');B.$container.find(".progress-value").html("0")}else{B.$container.find(".overlay .imageLoaderPositionAbsolute:not(:has(.fa-spin))").append('<span class="fa fa-spin fa-spinner"></span>')}},success:function(){C.find("img").addClass("loaded");B.$container.overlay({hide:true,hideLoader:true});B.showPhotoSuccess(I,D)},progress:function(J){if(!b[B.jGallery.intId].preloadAll){return}F=J.percent;B.$container.find(".overlay .imageLoaderPositionAbsolute").find(".progress-value").html(F)}})},showPhotoSuccess:function(E,C){var D;var B=this.$element.find("img.active");C=g.extend({},{historyPushState:true},C);if(B.is(":not([data-width])")){D=new Image();D.src=B.attr("src");B.attr("data-width",D.width);B.attr("data-height",D.height)}if(failand(b[this.jGallery.intId].title,E.attr("alt"))){this.$title.html(E.attr("alt")).removeClass("before").removeClass("after");this.jGallery.$element.addClass("has-title")}else{this.jGallery.$element.removeClass("has-title")}this.jGallery.setColours({strBg:E.is("[data-jgallery-bg-color]")?E.attr("data-jgallery-bg-color"):b[this.jGallery.intId].backgroundColor,strText:E.is("[data-jgallery-bg-color]")?E.attr("data-jgallery-text-color"):b[this.jGallery.intId].textColor});this.$element.find(".pt-page.init").css({visibility:"visible"});this.$element.find("img.prev-img").removeClass("prev-img");this.advancedAnimation.show(B.eq(0).parent().parent(),{animation:this.$element.find(".pt-part").eq(0).find(".pt-page-current:not(.pt-page-prev)").length===1});this.refreshSize();this.thumbnails.refreshNavigation();if(this.booSlideshowPlayed){this.slideshowSetTimeout()}b[this.jGallery.intId].afterLoadPhoto();this.booLoadingInProgress=false;if(failand(b[this.jGallery.intId].autostart,b[this.jGallery.intId].slideshowAutostart,b[this.jGallery.intId].slideshow)){b[this.jGallery.intId].slideshowAutostart=false;this.slideshowPlay()}if(b[this.jGallery.intId].draggableZoom){this.$dragNav.html('<img src="'+B.attr("src")+'" class="bg">                    <div class="crop"><img src="'+B.attr("src")+'"></div>');this.$dragNavCrop=this.$dragNav.find(".crop");this.$dragNavCropImg=this.$dragNavCrop.find("img");this.refreshDragNavCropSize()}if(failand(C.historyPushState,b[this.jGallery.intId].browserHistory)){u({path:B.attr("src")})}},showPhotoByPath:function(C){var B=this.thumbnails.$albums.filter(".active").find('a[href="'+C+'"]');if(B.length===0){B=this.thumbnails.$a.filter('a[href="'+C+'"]').eq(0)}if(B.length===0){return}this.showPhoto(B,{historyPushState:false})},setTransition:function(B){b[this.jGallery.intId].hideEffect=w[B][0];b[this.jGallery.intId].showEffect=w[B][1];this.advancedAnimation.setHideEffect(b[this.jGallery.intId].hideEffect);this.advancedAnimation.setShowEffect(b[this.jGallery.intId].showEffect)},setRandomTransition:function(){var B;this.$element.find(".pt-page").removeClass(b[this.jGallery.intId].hideEffect).removeClass(b[this.jGallery.intId].showEffect);B=Math.floor((Math.random()*x.length));b[this.jGallery.intId].hideEffect=x[B][0];b[this.jGallery.intId].showEffect=x[B][1];this.advancedAnimation.setHideEffect(b[this.jGallery.intId].hideEffect);this.advancedAnimation.setShowEffect(b[this.jGallery.intId].showEffect)},unmarkActive:function(){this.$element.find("img.active").removeClass("active")},changeMode:function(){var B=b[this.jGallery.intId].mode;if(B==="slider"){return}if(B==="standard"){this.goToFullScreenMode()}else{if(B==="full-screen"){this.goToStandardMode()}}if(this.jGallery.iconChangeAlbum instanceof o){this.jGallery.iconChangeAlbum.refreshMenuHeight()}},goToFullScreenMode:function(){s.css({overflow:"hidden"});this.jGallery.$this.show();this.jGallery.$element.removeClass("jgallery-standard").addClass("jgallery-full-screen").css({width:"auto",height:"auto"});this.$changeMode.removeClass("fa-expand").addClass("fa-compress");b[this.jGallery.intId].mode="full-screen";this.jGallery.refreshDimensions()},goToStandardMode:function(){s.css({overflow:"visible"});this.jGallery.$this.hide();this.jGallery.$element.removeClass("jgallery-full-screen").addClass("jgallery-standard").css({width:b[this.jGallery.intId].width,height:b[this.jGallery.intId].height});this.$changeMode.removeClass("fa-compress").addClass("fa-expand");b[this.jGallery.intId].mode="standard";this.jGallery.refreshDimensions()}};var p=function(C){var B=this;this.booIsAlbums=C.find(".album:has(a:has(img))").length>1;this.intId=c;this.$this=C;if(failand(b[this.intId].disabledOnIE8AndOlder,v())){return}this.init();if(b[this.intId].browserHistory){this.browserHistory()}if(b[this.intId].autostart){this.autostart()}g("html").on({keydown:function(D){if(B.$element.is(":visible")){if(D.which===27){D.preventDefault();if(B.thumbnails.getElement().is(".full-screen")){B.thumbnails.changeViewToBar();B.zoom.refreshSize();return}B.hide()}if(D.which===37){D.preventDefault();B.zoom.showPrevPhoto()}if(D.which===39){D.preventDefault();B.zoom.showNextPhoto()}}}})};p.prototype={initialized:function(){return this.$this.is("[data-jgallery-id]")},update:function(B){b[this.intId]=this.initialized()?g.extend(b[this.intId],B):g.extend({},m,B);if(failand(b[this.intId].disabledOnIE8AndOlder,z())){return}this.booIsAlbums=this.$this.find(".album:has(a:has(img))").length>1;if(b[this.intId].reloadThumbnails){this.reloadThumbnails()}this.zoom.update();this.thumbnails.init();this.setUserOptions()},reloadThumbnails:function(){new e(this,{thumbsHidden:false});this.thumbnails.reload();this.generateAlbumsDropdown()},setVariables:function(){this.$element=g(".jgallery").filter('[data-jgallery-id="'+this.intId+'"]');this.progress=new i(this.$element.find(".zoom-container").children(".progress"),this.intId);this.zoom=new h(this);this.thumbnails=new l(this);this.zoom.setThumbnails(this.thumbnails)},show:function(){this.$this.hide();q.on("resize",{jGallery:this},this.windowOnResize);if(b[this.intId].mode==="full-screen"){s.css({overflow:"hidden"})}this.$element.not(":visible").removeClass("hidden").stop(false,true).fadeIn(500);this.zoom.refreshContainerSize();this.zoom.$title.removeClass("hidden");b[this.intId].showGallery();if(this.iconChangeAlbum instanceof o){this.iconChangeAlbum.refreshMenuHeight()}},hide:function(C){var B=this;if(!b[this.intId].canClose){return}C=g.extend({},{historyPushState:true},C);this.$element.filter(":visible").stop(false,true).addClass("hidden").fadeOut(500,function(){if(b[B.intId].mode==="full-screen"){s.css({overflow:"visible"})}});this.zoom.booLoadingInProgress=false;clearTimeout(this.zoom.showPhotoTimeout);this.zoom.$title.addClass("hidden");this.zoom.$btnPrev.addClass("hidden");this.zoom.$btnNext.addClass("hidden");this.zoom.slideshowPause();this.zoom.advancedAnimation.hideActive();this.zoom.unmarkActive();q.off("resize",this.windowOnResize);this.$this.show();if(failand(C.historyPushState,b[this.intId].browserHistory)){u()}b[this.intId].closeGallery()},autostart:function(){var B;var C;if(this.$element.is(":visible")){return}if(this.booIsAlbums){B=this.thumbnails.getElement().find(".album").eq(b[this.intId].autostartAtAlbum-1);if(B.length===0){B=this.thumbnails.getElement().find(".album").eq(0)}}else{B=this.thumbnails.getElement()}C=B.find("a").eq(b[this.intId].autostartAtImage-1);if(C.length===0){C=B.find("a").eq(0)}C.trigger("click")},browserHistory:function(){var B=this;var D=window.onpopstate;function C(){var E;if(!document.location.hash){return}E=document.location.hash.replace("#","");switch(E){case"":B.hide({historyPushState:false});break;default:B.zoom.showPhotoByPath(E)}}window.onpopstate=function(){if(typeof D==="function"){D()}C()};C()},generateAlbumsDropdown:function(){var B=this;this.$element.find(".change-album").remove();if(!this.booIsAlbums){return}this.zoom.$container.find(".nav-bottom > .icons").append('                <span class="fa fa-list-ul change-album jgallery-btn jgallery-btn-small">                    <span class="menu jgallery-btn"></span>                    <span class="title"></span>                </span>            ');this.iconChangeAlbum=new o(B.zoom.$container.find(".change-album"),this);this.iconChangeAlbum.clearMenu();this.thumbnails.$albums.each(function(){var C=g(this).attr("data-jgallery-album-title");B.iconChangeAlbum.appendToMenu('<span class="item" data-jgallery-album-title="'+C+'">'+C+"</span>")});this.thumbnails.getElement().append(this.iconChangeAlbum.getElement().outerHtml());this.iconChangeAlbum=new o(this.iconChangeAlbum.getElement().add(this.thumbnails.getElement().children(":last-child")),this);this.iconChangeAlbum.bindEvents(this)},init:function(){var B=this;n.append('<style type="text/css" class="colours" data-jgallery-id="'+this.intId+'"></style>');b[this.intId].initGallery();this.$this.attr("data-jgallery-id",this.intId);this.generateHtml();new e(this);this.setVariables();this.thumbnails.init();this.thumbnails.getElement().append('<span class="fa fa-times jgallery-btn jgallery-close jgallery-btn-small"></span>');this.generateAlbumsDropdown();B.setUserOptions();if(b[B.intId].zoomSize==="fit"||b[B.intId].zoomSize==="original"){B.zoom.$resize.addClass("fa-search-plus")}if(b[B.intId].zoomSize==="fill"){B.zoom.$resize.addClass("fa-search-minus")}if(!k()){B.$element.addClass("text-shadow")}B.thumbnails.refreshNavigation();B.zoom.refreshNav();B.zoom.refreshSize();this.$this.on("click","a:has(img)",function(C){var D=g(this);C.preventDefault();B.zoom.showPhoto(D)});B.thumbnails.$element.on("click","a",function(C){var D=g(this);C.preventDefault();if(D.is(":not(.active)")){B.zoom.slideshowStop();B.zoom.showPhoto(D)}else{if(B.thumbnails.isFullScreen()){B.thumbnails.changeViewToBar();B.zoom.refreshSize()}}});B.zoom.$btnPrev.add(B.zoom.$container.find(".left")).on({click:function(){B.zoom.slideshowStop();B.zoom.showPrevPhoto()}});B.zoom.$btnNext.add(B.zoom.$container.find(".right")).on({click:function(){B.zoom.slideshowStop();B.zoom.showNextPhoto()}});B.zoom.$container.find(".jgallery-close").on({click:function(){B.hide()}});B.zoom.$random.on({click:function(){B.zoom.slideshowRandomToggle()}});B.zoom.$resize.on({click:function(){B.zoom.changeSize();B.zoom.slideshowPause()}});B.zoom.$changeMode.on({click:function(){B.zoom.changeMode()}});B.zoom.$slideshow.on({click:function(){B.zoom.slideshowPlayPause()}});B.zoom.$container.find(".minimalize-thumbnails").on({click:function(){B.thumbnails.toggle();B.zoom.refreshSize()}});B.thumbnails.bindEvents()},isSlider:function(){return b[this.intId].mode==="slider"},windowOnResize:function(B){B.data.jGallery.refreshDimensions()},refreshDimensions:function(){this.zoom.refreshSize();if(this.iconChangeAlbum instanceof o){this.iconChangeAlbum.refreshMenuHeight()}this.thumbnails.refreshNavigation()},getCanvasRatioWidthToHeight:function(){var C;var B;if(this.thumbnails.isHorizontal()){C=this.$element.width();B=this.$element.height()-this.thumbnails.getElement().outerHeight(true)}else{if(this.thumbnails.isVertical()){C=this.$element.width()-this.thumbnails.getElement().outerWidth(true);B=this.$element.height()}else{C=this.$element.width();B=this.$element.height()}}return C/B},setUserOptions:function(){b[this.intId].canResize?this.zoom.$resize.show():this.zoom.$resize.hide();b[this.intId].canChangeMode?this.zoom.$changeMode.show():this.zoom.$changeMode.hide();b[this.intId].mode==="standard"?this.zoom.$changeMode.removeClass("fa-compress").addClass("fa-expand"):this.zoom.$changeMode.removeClass("fa-expand").addClass("fa-compress");b[this.intId].canClose?this.zoom.$container.find(".jgallery-close").show():this.zoom.$container.find(".jgallery-close").hide();if(!b[this.intId].thumbnails){this.thumbnails.getElement().addClass("inactive");b[this.intId].thumbnailsPosition=""}else{this.thumbnails.getElement().removeClass("inactive");if(b[this.intId].thumbnailsPosition===""){b[this.intId].thumbnailsPosition=m.thumbnailsPosition}}b[this.intId].slideshow?this.zoom.$slideshow.show():this.zoom.$slideshow.hide();failand(b[this.intId].slideshow,b[this.intId].slideshowCanRandom,b[this.intId].slideshowAutostart)?this.zoom.$random.show():this.zoom.$random.hide();failand(b[this.intId].slideshow,b[this.intId].slideshowCanRandom,b[this.intId].slideshowRandom)?this.zoom.$random.addClass("active"):this.zoom.$random.removeClass("active");failand(b[this.intId].thumbnailsFullScreen,b[this.intId].thumbnails)?this.zoom.$container.find(".full-screen").show():this.zoom.$container.find(".full-screen").hide();failand(b[this.intId].thumbnailsFullScreen,b[this.intId].thumbnails)?this.zoom.$container.find(".change-album").show():this.zoom.$container.find(".change-album").hide();failand(b[this.intId].canMinimalizeThumbnails,b[this.intId].thumbnails)?this.zoom.$container.find(".minimalize-thumbnails").show():this.zoom.$container.find(".minimalize-thumbnails").hide();failand(b[this.intId].hideThumbnailsOnInit,b[this.intId].thumbnails)?this.thumbnails.hide():this.thumbnails.show();b[this.intId].titleExpanded?this.zoom.$title.addClass("expanded"):this.zoom.$title.removeClass("expanded");this.setColours({strBg:b[this.intId].backgroundColor,strText:b[this.intId].textColor})},setColours:function(B){n.find('style[data-jgallery-id="'+this.intId+'"].colours').html(this.getCssForColours(B))},generateHtml:function(){var E=b[this.intId].mode;var D=E==="full-screen"?"auto":b[this.intId].width;var B=E==="full-screen"?"auto":b[this.intId].height;var C='                <div class="jgallery jgallery-'+E+'" style="width: '+D+"; height: "+B+'; display: none;" data-jgallery-id="'+this.intId+'">                    <div class="jgallery-thumbnails hidden">                        <div class="jgallery-container"><div class="jgallery-container-inner"></div></div>                        <span class="prev jgallery-btn hidden"><span class="fa fa-chevron-left ico"></span></span>                        <span class="next jgallery-btn hidden"><span class="fa fa-chevron-right ico"></span></span>                    </div>                    <div class="zoom-container">                        <div class="zoom before pt-perspective"></div>                        <div class="drag-nav hide"></div>                        <div class="left"></div>                        <div class="right"></div>                        <span class="fa fa-chevron-left prev jgallery-btn jgallery-btn-large"></span>                        <span class="fa fa-chevron-right next jgallery-btn jgallery-btn-large"></span>                        <span class="progress"></span>                        <div class="nav">                            <span class="fa resize jgallery-btn jgallery-btn-small"></span>                            <span class="fa change-mode jgallery-btn jgallery-btn-small"></span>                            <span class="fa fa-times jgallery-close jgallery-btn jgallery-btn-small"></span>                        </div>                        <div class="nav-bottom">                            <div class="icons">                                <span class="fa fa-play slideshow jgallery-btn jgallery-btn-small"></span>                                <span class="fa fa-random random jgallery-btn jgallery-btn-small inactive" style="display: none;"></span>                                <span class="fa fa-th full-screen jgallery-btn jgallery-btn-small"></span>                                <span class="fa fa-ellipsis-h minimalize-thumbnails jgallery-btn jgallery-btn-small inactive"></span>                            </div>                            <div class="title before"></div>                        </div>                    </div>                </div>';if(E==="full-screen"){this.$jgallery=g(b[this.intId].appendTo).append(C).children(":last-child")}else{if(b[this.intId].autostart){this.$this.hide()}this.$jgallery=this.$this.after(C).next()}},getCssForColours:function(D){D=g.extend({strBg:"rgb( 0, 0, 0 )",strText:"rgb( 255, 255, 255 )"},D);var E=tinycolor(D.strBg).toRgb();var B=E.r+E.g+E.b>375?tinycolor.darken(D.strBg).toRgb():tinycolor.lighten(D.strBg).toRgb();var C=tinycolor(D.strText).toRgb();return'                .jgallery[data-jgallery-id="'+this.intId+'"] {                  background: rgb('+E.r+","+E.g+", "+E.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-btn {                  color: rgb('+C.r+","+C.g+", "+C.b+");                  text-shadow: 0 0 1px rgb("+E.r+","+E.g+", "+E.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-btn.active {                  color: rgb('+C.r+","+C.g+", "+C.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-btn:hover {                  text-shadow: none;                  text-shadow: 0 0 .15em rgba('+C.r+","+C.g+", "+C.b+",.75), 0 0 .45em rgba("+C.r+","+C.g+", "+C.b+',.5);                }                .jgallery[data-jgallery-id="'+this.intId+'"] .change-album .menu {                  background: rgb('+B.r+","+B.g+", "+B.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom .change-album > .title {                  background: rgb('+B.r+","+B.g+", "+B.b+");                  box-shadow: 4px 0 4px rgb("+B.r+","+B.g+", "+B.b+')                }                .jgallery[data-jgallery-id="'+this.intId+'"] .full-screen .change-album .menu {                  background: rgb('+E.r+","+E.g+", "+E.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .change-album .menu .item {                  border-color: rgb('+E.r+","+E.g+", "+E.b+");                  color: rgb("+C.r+","+C.g+", "+C.b+");                  background: rgb("+B.r+","+B.g+", "+B.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .full-screen .change-album .menu .item {                  border-color: rgb('+B.r+","+B.g+", "+B.b+");                  background: rgb("+E.r+","+E.g+", "+E.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .change-album .menu .item.active,                .jgallery[data-jgallery-id="'+this.intId+'"] .change-album .menu .item:hover {                  background: rgb('+C.r+","+C.g+", "+C.b+");                  color: rgb("+E.r+","+E.g+", "+E.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container:not([data-size="fill"]) .jgallery-container {                  background: rgb('+E.r+","+E.g+", "+E.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom {                  background: rgb('+B.r+","+B.g+", "+B.b+");                  -webkit-box-shadow: 0 -3px rgba("+B.r+","+B.g+", "+B.b+", .5);                  box-shadow: 0 -3px rgba("+B.r+","+B.g+", "+B.b+', .5);                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom .icons,                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom .icons .fa {                  background: rgb('+B.r+","+B.g+", "+B.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom > .title {                  color: rgb('+C.r+","+C.g+", "+C.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom > .title.expanded {                  background: rgba('+E.r+","+E.g+", "+E.b+',.7);                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .drag-nav {                  background: rgb('+B.r+","+B.g+", "+B.b+");                  -webkit-box-shadow: 0 0 0 3px rgba("+B.r+","+B.g+", "+B.b+", .5);                  box-shadow: 0 0 0 3px rgba("+B.r+","+B.g+", "+B.b+', .5);                }                .jgallery[data-jgallery-id="'+this.intId+'"] .zoom-container .drag-nav .crop {                  -webkit-box-shadow: 0 0 0 3px rgba('+C.r+","+C.g+", "+C.b+", .5);                  box-shadow: 0 0 0 3px rgba("+C.r+","+C.g+", "+C.b+', .5);                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails {                  background: rgb('+B.r+","+B.g+", "+B.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails .ico {                  color: rgb('+C.r+","+C.g+", "+C.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails .jgallery-container {                  -webkit-box-shadow: 0 0 0 3px rgba('+B.r+","+B.g+", "+B.b+", .5);                  box-shadow: 0 0 0 3px rgba("+B.r+","+B.g+", "+B.b+', .5);                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails.full-screen .prev:before {                  background-image: -webkit-gradient(linear,left 0%,left 100%,from(rgba( '+B.r+","+B.g+", "+B.b+", 1 )),to(rgba( "+B.r+","+B.g+", "+B.b+", 0)));                  background-image: -webkit-linear-gradient(top,rgba( "+B.r+","+B.g+", "+B.b+", 1 ),0%,rgba( "+B.r+","+B.g+", "+B.b+", 0),100%);                  background-image: -moz-linear-gradient(top,rgba( "+B.r+","+B.g+", "+B.b+", 1 ) 0%,rgba( "+B.r+","+B.g+", "+B.b+", 0) 100%);                  background-image: linear-gradient(to bottom,rgba( "+B.r+","+B.g+", "+B.b+", 1 ) 0%,rgba( "+B.r+","+B.g+", "+B.b+', 0) 100%);                  background-repeat: repeat-x;                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails.full-screen .next:before {                  background-image: -webkit-gradient(linear,left 0%,left 100%,from(rgba( '+B.r+","+B.g+", "+B.b+", 0)),to(rgba( "+B.r+","+B.g+", "+B.b+", 1)));                  background-image: -webkit-linear-gradient(top,rgba( "+B.r+","+B.g+", "+B.b+", 0),0%,rgba( "+B.r+","+B.g+", "+B.b+", 1),100%);                  background-image: -moz-linear-gradient(top,rgba( "+B.r+","+B.g+", "+B.b+", 0) 0%,rgba( "+B.r+","+B.g+", "+B.b+", 1) 100%);                  background-image: linear-gradient(to bottom,rgba( "+B.r+","+B.g+", "+B.b+", 0) 0%,rgba( "+B.r+","+B.g+", "+B.b+', 1) 100%);                  background-repeat: repeat-x;                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails.images a:after {                  background: rgb('+B.r+","+B.g+", "+B.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails.full-screen .prev,                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails.full-screen .next {                  background: rgb('+B.r+","+B.g+", "+B.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails.square a {                  background: rgb('+C.r+","+C.g+", "+C.b+");                  color: rgb("+E.r+","+E.g+", "+E.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .overlayContainer .overlay {                  background: rgba('+E.r+","+E.g+", "+E.b+",.8);                  color: rgb("+C.r+","+C.g+", "+C.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .overlayContainer .imageLoaderPositionAbsolute:after {                  border-color: rgba('+C.r+","+C.g+", "+C.b+', .5 );                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-horizontal .prev {                  background: rgb('+B.r+","+B.g+", "+B.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-horizontal .prev:before {                  background-image: -webkit-gradient(linear,0% top,100% top,from(rgba( '+B.r+","+B.g+", "+B.b+", 1 )),to(rgba( "+B.r+","+B.g+", "+B.b+", 0 )));                  background-image: -webkit-linear-gradient(left,color-stop(rgba( "+B.r+","+B.g+", "+B.b+", 1 ) 0%),color-stop(rgba( "+B.r+","+B.g+", "+B.b+", 0 ) 100%));                  background-image: -moz-linear-gradient(left,rgba( "+B.r+","+B.g+", "+B.b+", 1 ) 0%,rgba( "+B.r+","+B.g+", "+B.b+", 0 ) 100%);                  background-image: linear-gradient(to right,rgba( "+B.r+","+B.g+", "+B.b+", 1 ) 0%,rgba( "+B.r+","+B.g+", "+B.b+', 0 ) 100%);                  background-repeat: repeat-x;                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-horizontal .next {                  background: rgb('+B.r+","+B.g+", "+B.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-horizontal .next:before {                  background-image: -webkit-gradient(linear,0% top,100% top,from(rgba( '+B.r+","+B.g+", "+B.b+", 0 )),to(rgba( "+B.r+","+B.g+", "+B.b+", 1 )));                  background-image: -webkit-linear-gradient(left,color-stop(rgba( "+B.r+","+B.g+", "+B.b+", 0 ) 0%),color-stop(rgba( "+B.r+","+B.g+", "+B.b+", 1 ) 100%));                  background-image: -moz-linear-gradient(left,rgba( "+B.r+","+B.g+", "+B.b+", 0 ) 0%,rgba( "+B.r+","+B.g+", "+B.b+", 1 ) 100%);                  background-image: linear-gradient(to right,rgba( "+B.r+","+B.g+", "+B.b+", 0 ) 0%,rgba( "+B.r+","+B.g+", "+B.b+', 1 ) 100%);                  background-repeat: repeat-x;                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-vertical .prev {                  background: rgb('+B.r+","+B.g+", "+B.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-vertical .prev:before {                  background-image: -webkit-gradient(linear,left 0%,left 100%,from(rgba( '+B.r+","+B.g+", "+B.b+", 1 )),to(rgba( "+B.r+","+B.g+", "+B.b+", 0 )));                  background-image: -webkit-linear-gradient(top,rgba( "+B.r+","+B.g+", "+B.b+", 1 ),0%,rgba( "+B.r+","+B.g+", "+B.b+", 0 ),100%);                  background-image: -moz-linear-gradient(top,rgba( "+B.r+","+B.g+", "+B.b+", 1 ) 0%,rgba( "+B.r+","+B.g+", "+B.b+", 0 ) 100%);                  background-image: linear-gradient(to bottom,rgba( "+B.r+","+B.g+", "+B.b+", 1 ) 0%,rgba( "+B.r+","+B.g+", "+B.b+', 0 ) 100%);                  background-repeat: repeat-x;                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-vertical .next {                  background: rgb('+B.r+","+B.g+", "+B.b+');                }                .jgallery[data-jgallery-id="'+this.intId+'"] .jgallery-thumbnails-vertical .next:before {                  background-image: -webkit-gradient(linear,left 0%,left 100%,from(rgba( '+B.r+","+B.g+", "+B.b+", 0 )),to(rgba( "+B.r+","+B.g+", "+B.b+", 1 )));                  background-image: -webkit-linear-gradient(top,rgba( "+B.r+","+B.g+", "+B.b+", 0 ),0%,rgba( "+B.r+","+B.g+", "+B.b+", 1 ),100%);                  background-image: -moz-linear-gradient(top,rgba( "+B.r+","+B.g+", "+B.b+", 0 ) 0%,rgba( "+B.r+","+B.g+", "+B.b+", 1 ) 100%);                  background-image: linear-gradient(to bottom,rgba( "+B.r+","+B.g+", "+B.b+", 0 ) 0%,rgba( "+B.r+","+B.g+", "+B.b+', 1 ) 100%);                  background-repeat: repeat-x;                }                .jgallery.has-title.jgallery-slider[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom,                .jgallery.has-title.jgallery-slider[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom > .title.expanded {                  background: rgba('+E.r+","+E.g+", "+E.b+",.7);                  color: rgb("+C.r+","+C.g+", "+C.b+');                }                .jgallery.jgallery-slider[data-jgallery-id="'+this.intId+'"] .zoom-container .nav-bottom .jgallery-btn {                  background: rgba('+E.r+","+E.g+", "+E.b+",.8);                  color: rgb("+C.r+","+C.g+", "+C.b+");                }            "}};g.fn.jGallery=function(B){return this.each(function(){var C=g(this);g(function(){var D=failand(typeof B!=="undefined",typeof B.mode!=="undefined");var E=m;if(failand(C.is("[data-jgallery-id]"),D)){delete B.mode;D=false}if(C.is("[data-jgallery-id]")){E=b[C.attr("data-jgallery-id")]}if(failand(D,B.mode==="standard")){E=g.extend({},E,j,B,f)}else{if(failand(D,B.mode==="slider")){E=g.extend({},E,A,B,a)}else{E=g.extend({},E,B)}}if(!C.is("[data-jgallery-id]")){b[++c]=E;y[c]=new p(C)}else{y[C.attr("data-jgallery-id")].update(E);b[C.attr("data-jgallery-id")]=E}})})};g.jGalleryOptions=function(){return b};g.jGalleryTransitions=function(){return w};var t=0;var d=function(B){if(B.is("[data-advanced-animation-id]")){return}this.cols=1;this.rows=1;this.direction="forward";this.animation=true;this.$element=B;this.$element.filter(":not( [data-advanced-animation-id] )").attr("data-advanced-animation-id",++t);this.$element.find(".pt-item").wrap('<div class="pt-page" />');this.$element.wrapInner('<div class="pt-part" />');this.generateHtml();this._showParts(this.$element.find(".pt-part"),1)};d.prototype={next:function(){var B=this.$element.find(".pt-part").eq(this.direction==="backward"?-1:0).find(".pt-page-current:not(.pt-page-prev)").next();if(B.length){this.show(B)}else{this.show(this.$element.find(".pt-part").eq(this.direction==="backward"?-1:0).find(".pt-page").eq(0))}},show:function(C,B){var D=C.prevAll().length+1;if(C.is(".pt-page-current:not(.pt-page-prev)")){return}B=g.extend({},{animation:true},B);this.animation=B.animation;this._waveJumpToEnd();if(this.animation){this._runWave(D)}else{this._showParts(this.$element.find(".pt-part"),D)}this.intPrevPtPageNumber=D},setQuantityParts:function(C,B){this.cols=C;this.rows=B;this.generateHtml()},setDuration:function(D){var C=this.$element.attr("data-advanced-animation-id");var B=n.find('style[data-advanced-animation-id="'+C+'"]');this.duration=D;if(v()){return}if(B.length===0){B=n.append('<style type="text/css" data-advanced-animation-id="'+C+'" />').children(":last-child")}B.html('                [data-advanced-animation-id="'+C+'"] .pt-page {                    -webkit-animation-duration: '+D+";                    -moz-animation-duration: "+D+";                    animation-duration: "+D+";                }            ")},setHideEffect:function(B){this.prevHideEffect=this.hideEffect;this.hideEffect=B;if(/moveTo|rotateRoom|rotateCarousel|rotateSlideOut/.test(B)){this.$element.find(".pt-part").addClass("hide-overflow")}else{this.$element.find(".pt-part").removeClass("hide-overflow")}},setShowEffect:function(B){this.prevShowEffect=this.showEffect;this.showEffect=B},setDirection:function(B){this.direction=B},_runWave:function(B){this.$element.find(".pt-part").addClass("in-queue");this._showNextPart(B)},_waveJumpToEnd:function(){clearTimeout(this.showPartsTimeout);if(typeof this.intPrevPtPageNumber!=="undefined"){this._showParts(this.$element.find(".pt-part.in-queue").removeClass("in-queue"),this.intPrevPtPageNumber)}},_showNextPart:function(C){var B=this;var D=this.$element.find(".pt-part.in-queue").eq(this.direction==="backward"?-1:0);if(D.length===0){return}this._showParts(D.removeClass("in-queue"),C);if(D.length===0){return}clearTimeout(this.showPartsTimeout);this.showPartsTimeout=setTimeout(function(){B._showNextPart(C)},parseFloat(this.duration)*1000*0.25/Math.max(1,this.$element.find(".pt-part").length-1))},_showParts:function(C,B){C.find(".pt-page-current.pt-page-prev").removeClass("pt-page-prev").removeClass("pt-page-current");C.find(".pt-page-current").addClass("pt-page-prev");C.find(".pt-page:nth-child("+B+")").addClass("pt-page-current");C.find(".pt-page").removeClass(this.hideEffect).removeClass(this.showEffect);if(typeof this.prevHideEffect!=="undefined"){C.find(".pt-page").removeClass(this.prevHideEffect)}if(typeof this.prevShowEffect!=="undefined"){C.find(".pt-page").removeClass(this.prevShowEffect)}if(this.animation){C.find(".pt-page-prev").addClass(this.hideEffect);C.find(".pt-page-current:not(.pt-page-prev)").addClass(this.showEffect)}},hideActive:function(){this.$element.find(".pt-page-current").addClass("pt-page-prev").addClass(this.hideEffect)},generateHtml:function(){var D;var C;var B;this.$element.html(this.$element.find(".pt-part").eq(0).html());B=this.$element.html();this.$element.children(".pt-part").remove();for(C=0;C<this.rows;C++){for(D=0;D<this.cols;D++){this.$element.append('<div class="pt-part pt-perspective" data-col-no="'+D+'" data-row-no="'+C+'" style="position: absolute;"></div>').children(":last-child").html(B).find(".pt-item")}}this.setPositionParts();this.$element.children(":not(.pt-part)").remove()},setPositionParts:function(){var C=this;var E=this.$element.outerWidth();var D=this.$element.outerHeight();var F=E/this.cols;var B=D/this.rows;this.$element.find(".pt-part").each(function(){var I=g(this);var H=I.attr("data-col-no");var G=I.attr("data-row-no");I.css({left:C.$element.outerWidth()*(100/C.cols*H)/100+"px",top:C.$element.outerHeight()*(100/C.rows*G)/100+"px",width:C.$element.outerWidth()*(100/C.cols)/100+1+"px",height:C.$element.outerHeight()*(100/C.rows)/100+1+"px"}).find(".pt-item").css({width:E,height:D,left:-F*H,top:-B*G})})}};g.fn.overlay=function(B){var C={show:false,hide:false,showLoader:false,hideLoader:false,fadeIn:true,fadeOut:true,fadeInLoader:true,fadeOutLoader:true,afterInit:function(){}};B=g.extend({},C,B);this.each(function(){var K=g(this),L,J,I=K.is(".overlayContainer:has(.overlay)"),H=function(){var P=Math.max(K.offset().top,g("body, html").scrollTop()),O=Math.min(K.offset().top+K.outerHeight(),g("body, html").scrollTop()+g(window).height()),N=P+(O-P)/2-K.offset().top;J.css({top:N+"px"})},F=function(){K.children(".overlay").css({width:K.outerWidth(),height:K.is("body")?g("html").outerHeight():K.outerHeight()})},G=function(){B.fadeIn?L.fadeIn(500):L.show()},E=function(){B.fadeOut?L.fadeOut(500):L.hide()},M=function(){B.fadeInLoader?J.not(":visible").fadeIn(500):J.not(":visible").show()},D=function(){B.fadeOutLoader?J.filter(":visible").fadeOut(500):J.filter(":visible").hide()};g(window).scroll(function(){H()});g(window).resize(function(){H();F()});if(K.is("table")){if(K.parent().is(".overlayContainer")){K=K.parent()}}if(!I){if(K.is("table")){K.wrap("<div></div>");K=K.parent()}K.addClass("overlayContainer");K.append('<div class="overlay" style="display: none;"><div class="imageLoaderPositionAbsolute" style="display: none;"></div></div>');B.afterInit()}L=K.children(".overlay");J=K.find(".imageLoaderPositionAbsolute");L.stop(false,true);J.stop(false,true);if(B.show){G()}else{if(B.hide){E()}}if(B.showLoader){M()}else{if(B.hideLoader){D()}}H();F()})};g.fn.jLoader=function(B){B=g.extend({interval:1000,skip:":not(*)",start:function(){g("body").overlay({fadeIn:false,fadeOut:false,show:true,showLoader:true});g("body").show()},success:function(){g("body").overlay({hide:true})},progress:function(){}},B);this.each(function(){var H=g(this);var F=g();var D=g();var G;var E=0;function C(){var J=true;var L=0;var I=0;var K;D.each(function(){L++;if(g(this)[0].complete){I++}else{J=false}if(L===E){K=parseInt(I*100/E);B.progress({percent:K});if(J){clearTimeout(G);F.remove();B.success()}else{G=setTimeout(C,B.interval)}}})}H.append('<div class="jLoaderTmp" style="position: absolute; width: 0; height: 0; line-height: 0; font-size: 0; visibility: hidden; overflow: hidden; z-index: -1;"></div>');F=H.children(".jLoaderTmp:last-child");g(H).add(H.find("*")).not(B.skip).each(function(){var I;if(g(this).css("background-image")!=="none"){I=g(this).css("background-image");if(/url/.exec(I)){I=I.replace('"',"").replace("'","").replace(" ","").replace("url(","").replace(")","");F.append('<img src="'+I+'">')}}});D=H.find("img:not( "+B.skip+")");if(H.is("img")){if(!H.is(B.skip)){D=D.add(H)}}E=parseInt(D.length);B.start();C()})};g.fn.outerHtml=function(){return(!this.length)?this:(this[0].outerHTML||(function(B){var D=document.createElement("div");D.appendChild(B.cloneNode(true));var C=D.innerHTML;D=null;return C})(this[0]))};function u(B){B=g.extend({},{stateObj:{},title:r.html(),path:""},B);console.log(document.location.href.split("#")[0]+"#"+B.path);window.history.pushState(B.stateObj,B.title,document.location.href.split("#")[0]+"#"+B.path)}function k(){var D=false;if(navigator.appName==="Microsoft Internet Explorer"){var B=navigator.userAgent;var C=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(C.exec(B)!==null){D=true}}return D}function z(){var D=false;if(navigator.appName==="Microsoft Internet Explorer"){var B=navigator.userAgent;var C=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(C.exec(B)!==null){D=parseFloat(RegExp.$1);D=D<8}}return D}function v(){var D=false;if(navigator.appName==="Microsoft Internet Explorer"){var B=navigator.userAgent;var C=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(C.exec(B)!==null){D=parseFloat(RegExp.$1);D=D<9}}return D}})(jQuery);
 +
*/
 +
(function(g) {
 +
    var m = {
 +
        mode: "full-screen",
 +
        width: "100%",
 +
        height: "600px",
 +
        autostart: false,
 +
        autostartAtImage: 1,
 +
        autostartAtAlbum: 1,
 +
        canClose: true,
 +
        canResize: true,
 +
        draggableZoom: true,
 +
        canChangeMode: false,
 +
        backgroundColor: "#000",
 +
        textColor: "#fff",
 +
        browserHistory: true,
 +
        thumbnails: true,
 +
        thumbnailsFullScreen: true,
 +
        thumbType: "image",
 +
        thumbnailsPosition: "bottom",
 +
        reloadThumbnails: true,
 +
        thumbWidth: 75,
 +
        thumbHeight: 75,
 +
        thumbWidthOnFullScreen: 100,
 +
        thumbHeightOnFullScreen: 100,
 +
        canMinimalizeThumbnails: true,
 +
        hideThumbnailsOnInit: false,
 +
        transition: "moveToRight_moveFromLeft",
 +
        transitionBackward: "moveToLeft_moveFromRight",
 +
        transitionWaveDirection: "forward",
 +
        transitionCols: 1,
 +
        transitionRows: 5,
 +
        showTimingFunction: "linear",
 +
        hideTimingFunction: "linear",
 +
        transitionDuration: "0.7s",
 +
        zoomSize: "fit",
 +
        title: true,
 +
        titleExpanded: false,
 +
        slideshow: true,
 +
        slideshowAutostart: false,
 +
        slideshowCanRandom: true,
 +
        slideshowRandom: false,
 +
        slideshowInterval: "8s",
 +
        preloadAll: false,
 +
        appendTo: "body",
 +
        disabledOnIE8AndOlder: true,
 +
        initGallery: function() {},
 +
        showPhoto: function() {},
 +
        beforeLoadPhoto: function() {},
 +
        afterLoadPhoto: function() {},
 +
        showGallery: function() {},
 +
        closeGallery: function() {}
 +
    };
 +
    var j = {
 +
        autostart: true,
 +
        canClose: false,
 +
        canChangeMode: true,
 +
        browserHistory: false
 +
    };
 +
    var f = {};
 +
    var A = {
 +
        width: "940px",
 +
        height: "360px",
 +
        canResize: false,
 +
        draggableZoom: false,
 +
        browserHistory: false,
 +
        thumbnailsFullScreen: false,
 +
        thumbType: "square",
 +
        thumbWidth: 20,
 +
        thumbHeight: 20,
 +
        canMinimalizeThumbnails: false,
 +
        transition: "rotateCubeRightOut_rotateCubeRightIn",
 +
        transitionBackward: "rotateCubeRightOut_rotateCubeRightIn",
 +
        transitionCols: 6,
 +
        transitionRows: 1,
 +
        slideshow: true,
 +
        slideshowAutostart: true,
 +
        zoomSize: "fill"
 +
    };
 +
    var a = {
 +
        autostart: true,
 +
        canClose: false,
 +
        zoomSize: "fill",
 +
        canChangeMode: false
 +
    };
 +
    var w = {
 +
        moveToLeft_moveFromRight: ["pt-page-moveToLeft", "pt-page-moveFromRight"],
 +
        moveToRight_moveFromLeft: ["pt-page-moveToRight", "pt-page-moveFromLeft"],
 +
        moveToTop_moveFromBottom: ["pt-page-moveToTop", "pt-page-moveFromBottom"],
 +
        moveToBottom_moveFromTop: ["pt-page-moveToBottom", "pt-page-moveFromTop"],
 +
        fade_moveFromRight: ["pt-page-fade", "pt-page-moveFromRight pt-page-ontop"],
 +
        fade_moveFromLeft: ["pt-page-fade", "pt-page-moveFromLeft pt-page-ontop"],
 +
        fade_moveFromBottom: ["pt-page-fade", "pt-page-moveFromBottom pt-page-ontop"],
 +
        fade_moveFromTop: ["pt-page-fade", "pt-page-moveFromTop pt-page-ontop"],
 +
        moveToLeftFade_moveFromRightFade: ["pt-page-moveToLeftFade", "pt-page-moveFromRightFade"],
 +
        moveToRightFade_moveFromLeftFade: ["pt-page-moveToRightFade", "pt-page-moveFromLeftFade"],
 +
        moveToTopFade_moveFromBottomFade: ["pt-page-moveToTopFade", "pt-page-moveFromBottomFade"],
 +
        moveToBottomFade_moveFromTopFade: ["pt-page-moveToBottomFade", "pt-page-moveFromTopFade"],
 +
        moveToLeftEasing_moveFromRight: ["pt-page-moveToLeftEasing pt-page-ontop", "pt-page-moveFromRight"],
 +
        moveToRightEasing_moveFromLeft: ["pt-page-moveToRightEasing pt-page-ontop", "pt-page-moveFromLeft"],
 +
        moveToTopEasing_moveFromBottom: ["pt-page-moveToTopEasing pt-page-ontop", "pt-page-moveFromBottom"],
 +
        moveToBottomEasing_moveFromTop: ["pt-page-moveToBottomEasing pt-page-ontop", "pt-page-moveFromTop"],
 +
        scaleDown_moveFromRight: ["pt-page-scaleDown", "pt-page-moveFromRight pt-page-ontop"],
 +
        scaleDown_moveFromLeft: ["pt-page-scaleDown", "pt-page-moveFromLeft pt-page-ontop"],
 +
        scaleDown_moveFromBottom: ["pt-page-scaleDown", "pt-page-moveFromBottom pt-page-ontop"],
 +
        scaleDown_moveFromTop: ["pt-page-scaleDown", "pt-page-moveFromTop pt-page-ontop"],
 +
        scaleDown_scaleUpDown: ["pt-page-scaleDown", "pt-page-scaleUpDown pt-page-delay300"],
 +
        scaleDownUp_scaleUp: ["pt-page-scaleDownUp", "pt-page-scaleUp pt-page-delay300"],
 +
        moveToLeft_scaleUp: ["pt-page-moveToLeft pt-page-ontop", "pt-page-scaleUp"],
 +
        moveToRight_scaleUp: ["pt-page-moveToRight pt-page-ontop", "pt-page-scaleUp"],
 +
        moveToTop_scaleUp: ["pt-page-moveToTop pt-page-ontop", "pt-page-scaleUp"],
 +
        moveToBottom_scaleUp: ["pt-page-moveToBottom pt-page-ontop", "pt-page-scaleUp"],
 +
        scaleDownCenter_scaleUpCenter: ["pt-page-scaleDownCenter", "pt-page-scaleUpCenter pt-page-delay400"],
 +
        rotateRightSideFirst_moveFromRight: ["pt-page-rotateRightSideFirst", "pt-page-moveFromRight pt-page-delay200 pt-page-ontop"],
 +
        rotateLeftSideFirst_moveFromLeft: ["pt-page-rotateLeftSideFirst", "pt-page-moveFromLeft pt-page-delay200 pt-page-ontop"],
 +
        rotateTopSideFirst_moveFromTop: ["pt-page-rotateTopSideFirst", "pt-page-moveFromTop pt-page-delay200 pt-page-ontop"],
 +
        rotateBottomSideFirst_moveFromBottom: ["pt-page-rotateBottomSideFirst", "pt-page-moveFromBottom pt-page-delay200 pt-page-ontop"],
 +
        flipOutRight_flipInLeft: ["pt-page-flipOutRight", "pt-page-flipInLeft pt-page-delay500"],
 +
        flipOutLeft_flipInRight: ["pt-page-flipOutLeft", "pt-page-flipInRight pt-page-delay500"],
 +
        flipOutTop_flipInBottom: ["pt-page-flipOutTop", "pt-page-flipInBottom pt-page-delay500"],
 +
        flipOutBottom_flipInTop: ["pt-page-flipOutBottom", "pt-page-flipInTop pt-page-delay500"],
 +
        rotateFall_scaleUp: ["pt-page-rotateFall pt-page-ontop", "pt-page-scaleUp"],
 +
        rotateOutNewspaper_rotateInNewspaper: ["pt-page-rotateOutNewspaper", "pt-page-rotateInNewspaper pt-page-delay500"],
 +
        rotatePushLeft_moveFromRight: ["pt-page-rotatePushLeft", "pt-page-moveFromRight"],
 +
        rotatePushRight_moveFromLeft: ["pt-page-rotatePushRight", "pt-page-moveFromLeft"],
 +
        rotatePushTop_moveFromBottom: ["pt-page-rotatePushTop", "pt-page-moveFromBottom"],
 +
        rotatePushBottom_moveFromTop: ["pt-page-rotatePushBottom", "pt-page-moveFromTop"],
 +
        rotatePushLeft_rotatePullRight: ["pt-page-rotatePushLeft", "pt-page-rotatePullRight pt-page-delay180"],
 +
        rotatePushRight_rotatePullLeft: ["pt-page-rotatePushRight", "pt-page-rotatePullLeft pt-page-delay180"],
 +
        rotatePushTop_rotatePullBottom: ["pt-page-rotatePushTop", "pt-page-rotatePullBottom pt-page-delay180"],
 +
        rotatePushBottom_page: ["pt-page-rotatePushBottom", "pt-page-rotatePullTop pt-page-delay180"],
 +
        rotateFoldLeft_moveFromRightFade: ["pt-page-rotateFoldLeft", "pt-page-moveFromRightFade"],
 +
        rotateFoldRight_moveFromLeftFade: ["pt-page-rotateFoldRight", "pt-page-moveFromLeftFade"],
 +
        rotateFoldTop_moveFromBottomFade: ["pt-page-rotateFoldTop", "pt-page-moveFromBottomFade"],
 +
        rotateFoldBottom_moveFromTopFade: ["pt-page-rotateFoldBottom", "pt-page-moveFromTopFade"],
 +
        moveToRightFade_rotateUnfoldLeft: ["pt-page-moveToRightFade", "pt-page-rotateUnfoldLeft"],
 +
        moveToLeftFade_rotateUnfoldRight: ["pt-page-moveToLeftFade", "pt-page-rotateUnfoldRight"],
 +
        moveToBottomFade_rotateUnfoldTop: ["pt-page-moveToBottomFade", "pt-page-rotateUnfoldTop"],
 +
        moveToTopFade_rotateUnfoldBottom: ["pt-page-moveToTopFade", "pt-page-rotateUnfoldBottom"],
 +
        rotateRoomLeftOut_rotateRoomLeftIn: ["pt-page-rotateRoomLeftOut pt-page-ontop", "pt-page-rotateRoomLeftIn"],
 +
        rotateRoomRightOut_rotateRoomRightIn: ["pt-page-rotateRoomRightOut pt-page-ontop", "pt-page-rotateRoomRightIn"],
 +
        rotateRoomTopOut_rotateRoomTopIn: ["pt-page-rotateRoomTopOut pt-page-ontop", "pt-page-rotateRoomTopIn"],
 +
        rotateRoomBottomOut_rotateRoomBottomIn: ["pt-page-rotateRoomBottomOut pt-page-ontop", "pt-page-rotateRoomBottomIn"],
 +
        rotateCubeLeftOut_rotateCubeLeftIn: ["pt-page-rotateCubeLeftOut pt-page-ontop", "pt-page-rotateCubeLeftIn"],
 +
        rotateCubeRightOut_rotateCubeRightIn: ["pt-page-rotateCubeRightOut pt-page-ontop", "pt-page-rotateCubeRightIn"],
 +
        rotateCubeTopOut_rotateCubeTopIn: ["pt-page-rotateCubeTopOut pt-page-ontop", "pt-page-rotateCubeTopIn"],
 +
        rotateCubeBottomOut_rotateCubeBottomIn: ["pt-page-rotateCubeBottomOut pt-page-ontop", "pt-page-rotateCubeBottomIn"],
 +
        rotateCarouselLeftOut_rotateCarouselLeftIn: ["pt-page-rotateCarouselLeftOut pt-page-ontop", "pt-page-rotateCarouselLeftIn"],
 +
        rotateCarouselRightOut_rotateCarouselRightIn: ["pt-page-rotateCarouselRightOut pt-page-ontop", "pt-page-rotateCarouselRightIn"],
 +
        rotateCarouselTopOut_rotateCarouselTopIn: ["pt-page-rotateCarouselTopOut pt-page-ontop", "pt-page-rotateCarouselTopIn"],
 +
        rotateCarouselBottomOut_rotateCarouselBottomIn: ["pt-page-rotateCarouselBottomOut pt-page-ontop", "pt-page-rotateCarouselBottomIn"],
 +
        rotateSidesOut_rotateSidesInDelay: ["pt-page-rotateSidesOut", "pt-page-rotateSidesIn pt-page-delay200"],
 +
        rotateSlideOut_rotateSlideIn: ["pt-page-rotateSlideOut", "pt-page-rotateSlideIn"]
 +
    };
 +
    var b = [];
 +
    var y = [""];
 +
    var x = [];
 +
    g.each(w, function(B, C) {
 +
        x.push(C)
 +
    });
 +
    var n;
 +
    var r;
 +
    var s;
 +
    g(function() {
 +
        n = g("head");
 +
        r = g("title");
 +
        s = g("body")
 +
    });
 +
    var q = g(window);
 +
    var c = 0;
 +
    var i = function(C, B) {
 +
        this.intJgalleryId = B;
 +
        this.$element = C
 +
    };
 +
    i.prototype = {
 +
        clear: function() {
 +
            this.$element.stop(false, true).css({
 +
                width: 0
 +
            });
 +
            return this
 +
        },
 +
        start: function(D, E) {
 +
            var C = parseInt(b[this.intJgalleryId].slideshowInterval) * 1000;
 +
            var B = this.$element;
 +
            B.animate({
 +
                width: D
 +
            }, C - C * (B.width() / B.parent().width()), "linear", E);
 +
            return this
 +
        },
 +
        pause: function() {
 +
            this.$element.stop();
 +
            return this
 +
        }
 +
    };
 +
    var o = function(C, B) {
 +
        this.$element = C;
 +
        this.jGallery = B;
 +
        this.$title = this.$element.find(".title")
 +
    };
 +
    o.prototype = {
 +
        bindEvents: function(C) {
 +
            var B = this;
 +
            this.getElement().on({
 +
                click: function(D) {
 +
                    B.menuToggle();
 +
                    D.stopPropagation()
 +
                }
 +
            });
 +
            this.getItemsOfMenu().on({
 +
                click: function() {
 +
                    var D = g(this);
 +
                    if (D.is(".active")) {
 +
                        return
 +
                    }
 +
                    C.thumbnails.setActiveAlbum(C.thumbnails.$albums.filter('[data-jgallery-album-title="' + D.attr("data-jgallery-album-title") + '"]'))
 +
                }
 +
            });
 +
            g("html").on("click", function() {
 +
                B.menuHide()
 +
            })
 +
        },
 +
        setTitle: function(B) {
 +
            this.$title.html(B)
 +
        },
 +
        getTitle: function() {
 +
            return this.$title.html()
 +
        },
 +
        getListOfAlbums: function() {
 +
            return this.getElement().find(".menu")
 +
        },
 +
        getElement: function() {
 +
            return this.$element
 +
        },
 +
        getItemsOfMenu: function() {
 +
            return this.getListOfAlbums().find(".item")
 +
        },
 +
        appendToMenu: function(B) {
 +
            this.getListOfAlbums().append(B)
 +
        },
 +
        menuToggle: function() {
 +
            this.getElement().toggleClass("active")
 +
        },
 +
        menuHide: function() {
 +
            this.getElement().removeClass("active")
 +
        },
 +
        clearMenu: function() {
 +
            this.getListOfAlbums().html("")
 +
        },
 +
        refreshMenuHeight: function() {
 +
            this.getListOfAlbums().css("max-height", this.jGallery.zoom.$container.outerHeight() - 8)
 +
        }
 +
    };
 +
    var e = function(C, B) {
 +
        this.options = g.extend({}, {
 +
            thumbsHidden: true
 +
        }, B);
 +
        this.jGallery = C;
 +
        this.$element = C.$this;
 +
        this.booIsAlbums = C.booIsAlbums;
 +
        this.$tmp;
 +
        this.intI = 1;
 +
        this.intJ = 1;
 +
        this.intNo;
 +
        this.$thumbnailsContainerInner = this.jGallery.$jgallery.find(".jgallery-thumbnails .jgallery-container-inner");
 +
        this.start()
 +
    };
 +
    e.prototype = {
 +
        start: function() {
 +
            var C = this;
 +
            var B = this.jGallery.isSlider() ? ".album:has(img)" : ".album:has(a:has(img))";
 +
            g("body").append('<div id="jGalleryTmp" style="position: absolute; top: 0; left: 0; width: 0; height: 0; z-index: -1; overflow: hidden;">' + this.$element.html() + "</div>");
 +
            this.$tmp = g("#jGalleryTmp");
 +
            this.$thumbnailsContainerInner.html("");
 +
            if (this.booIsAlbums) {
 +
                this.$tmp.find(B).each(function() {
 +
                    C.insertAlbum(g(this))
 +
                })
 +
            } else {
 +
                this.insertImages(this.$tmp, this.$thumbnailsContainerInner)
 +
            }
 +
            this.$tmp.remove();
 +
            this.refreshThumbsSize()
 +
        },
 +
        insertAlbum: function(C) {
 +
            var B = C.is("[data-jgallery-album-title]") ? C.attr("data-jgallery-album-title") : "Album " + this.intJ;
 +
            var D = this.$thumbnailsContainerInner.append('<div class="album" data-jgallery-album-title="' + B + '"></div>').children(":last-child");
 +
            if (this.intJ === 1) {
 +
                D.addClass("active")
 +
            }
 +
            this.insertImages(C, D);
 +
            this.intJ++
 +
        },
 +
        insertImages: function(D, E) {
 +
            var C = this;
 +
            var B = this.jGallery.isSlider() ? "img" : "a:has(img)";
 +
            this.intNo = 1;
 +
            D.find(B).each(function() {
 +
                C.insertImage(g(this), E)
 +
            })
 +
        },
 +
        insertImage: function(B, C) {
 +
            if (B.is("a")) {
 +
                C.append('<a href="' + B.attr("href") + '">' + this.generateImgTag(B.find("img").eq(0)).outerHtml() + "</a>");
 +
                if (this.options.thumbsHidden) {
 +
                    C.children(":last-child").addClass("hidden")
 +
                }
 +
            } else {
 +
                if (B.is("img")) {
 +
                    C.append(g('<a href="' + B.attr("src") + '">' + this.generateImgTag(B).outerHtml() + "</a>"))
 +
                }
 +
            }
 +
            C.children(":last-child").attr("data-jgallery-photo-id", this.intI++).attr("data-jgallery-number", this.intNo++)
 +
        },
 +
        generateImgTag: function(B) {
 +
            var C = g('<img src="' + B.attr("src") + '" />');
 +
            if (B.is("[alt]")) {
 +
                C.attr("alt", B.attr("alt"))
 +
            }
 +
            if (B.is("[data-jgallery-bg-color]")) {
 +
                C.attr("data-jgallery-bg-color", B.attr("data-jgallery-bg-color"))
 +
            }
 +
            if (B.is("[data-jgallery-text-color]")) {
 +
                C.attr("data-jgallery-text-color", B.attr("data-jgallery-text-color"))
 +
            }
 +
            return C
 +
        },
 +
        refreshThumbsSize: function() {
 +
            this.$thumbnailsContainerInner.find("img").each(function() {
 +
                var B = g(this);
 +
                var C = new Image();
 +
                C.src = B.attr("src");
 +
                C.width > C.height ? B.css({
 +
                    "max-height": "100%",
 +
                    "max-width": "none"
 +
                }) : B.css({
 +
                    "max-width": "100%",
 +
                    "max-height": "none"
 +
                })
 +
            })
 +
        }
 +
    };
 +
    var l = function(B) {
 +
        this.$element = B.$element.find(".jgallery-thumbnails");
 +
        this.$a = this.getElement().find("a");
 +
        this.$img = this.getElement().find("img");
 +
        this.$container = this.getElement().find(".jgallery-container");
 +
        this.$albums = this.getElement().find(".album").length ? this.getElement().find(".album") : this.getElement().find(".jgallery-container-inner").addClass("active");
 +
        this.$btnNext = this.getElement().children(".next");
 +
        this.$btnPrev = this.getElement().children(".prev");
 +
        this.intJgalleryId = B.$element.attr("data-jgallery-id");
 +
        this.isJgalleryInitialized = B.$element.is("[data-jgallery-id]");
 +
        this.zoom = B.zoom;
 +
        this.$iconToggleThumbsVisibility = this.zoom.$container.find(".minimalize-thumbnails");
 +
        this.jGallery = B
 +
    };
 +
    l.prototype = {
 +
        getElement: function() {
 +
            return this.$element
 +
        },
 +
        init: function() {
 +
            this.getElement().removeClass("square number images jgallery-thumbnails-left jgallery-thumbnails-right jgallery-thumbnails-top jgallery-thumbnails-bottom jgallery-thumbnails-horizontal jgallery-thumbnails-vertical");
 +
            this.getElement().addClass("jgallery-thumbnails-" + b[this.intJgalleryId].thumbnailsPosition);
 +
            if (this.isVertical()) {
 +
                this.getElement().addClass("jgallery-thumbnails-vertical")
 +
            }
 +
            if (this.isHorizontal()) {
 +
                this.getElement().addClass("jgallery-thumbnails-horizontal")
 +
            }
 +
            if (b[this.intJgalleryId].thumbType === "image") {
 +
                this._initImages()
 +
            }
 +
            if (b[this.intJgalleryId].thumbType === "square") {
 +
                this._initSquare()
 +
            }
 +
            if (b[this.intJgalleryId].thumbType === "number") {
 +
                this._initNumber()
 +
            }
 +
        },
 +
        show: function() {
 +
            var B = this;
 +
            if (!this.getElement().is(".hidden")) {
 +
                return
 +
            }
 +
            this.getElement().removeClass("hidden");
 +
            if (!this.getElement().is(".loaded")) {
 +
                this.getElement().jLoader({
 +
                    start: function() {},
 +
                    success: function() {
 +
                        B._showNextThumb();
 +
                        B.$a.parent(".album:not(.active)").children(".hidden").removeClass("hidden");
 +
                        B.getElement().addClass("loaded")
 +
                    }
 +
                })
 +
            } else {
 +
                this._showNextThumb();
 +
                this.$a.parent(".album:not(.active)").children(".hidden").removeClass("hidden")
 +
            }
 +
            this.$iconToggleThumbsVisibility.removeClass("inactive")
 +
        },
 +
        showThumbsForActiveAlbum: function() {
 +
            this.$a.addClass("hidden");
 +
            this._showNextThumb()
 +
        },
 +
        hide: function(B) {
 +
            B = g.extend({
 +
                hideEachThumb: true
 +
            }, B);
 +
            this.getElement().addClass("hidden");
 +
            if (B.hideEachThumb) {
 +
                this.$a.addClass("hidden")
 +
            }
 +
            this.$iconToggleThumbsVisibility.addClass("inactive")
 +
        },
 +
        toggle: function() {
 +
            this.getElement().is(".hidden") ? this.show() : this.hide({
 +
                hideEachThumb: false
 +
            })
 +
        },
 +
        setActiveThumb: function(C) {
 +
            var B = C.find("img");
 +
            var D = this.$albums.filter(".active");
 +
            var C = D.find('img[src="' + B.attr("src") + '"]').parent("a").eq(0);
 +
            this.getElement().find("a").removeClass("active");
 +
            C.addClass("active");
 +
            if (D.find("a.active").length === 0) {
 +
                D.find("a:first-child").eq(0).addClass("active")
 +
            }
 +
            this.center(C)
 +
        },
 +
        isHorizontal: function() {
 +
            return b[this.intJgalleryId].thumbnailsPosition === "top" || b[this.intJgalleryId].thumbnailsPosition === "bottom"
 +
        },
 +
        isVertical: function() {
 +
            return b[this.intJgalleryId].thumbnailsPosition === "left" || b[this.intJgalleryId].thumbnailsPosition === "right"
 +
        },
 +
        isFullScreen: function() {
 +
            return this.getElement().is(".full-screen")
 +
        },
 +
        refreshNavigation: function() {
 +
            if (this.isVertical() || this.isFullScreen()) {
 +
                this._refreshVerticalNavigation()
 +
            } else {
 +
                if (this.isHorizontal()) {
 +
                    this._refreshHorizontalNavigation()
 +
                }
 +
            }
 +
        },
 +
        center: function(B) {
 +
            if (this.isHorizontal()) {
 +
                this._horizontalCenter(B)
 +
            }
 +
            if (this.isVertical()) {
 +
                this._verticalCenter(B)
 +
            }
 +
        },
 +
        reload: function() {
 +
            this.$a = this.getElement().find("a");
 +
            this.$img = this.getElement().find("img");
 +
            this.$albums = this.getElement().find(".album").length ? this.getElement().find(".album") : this.getElement().find(".jgallery-container-inner").addClass("active")
 +
        },
 +
        bindEvents: function() {
 +
            var B = this;
 +
            this.$btnNext.on("click", function() {
 +
                B._scrollToNext()
 +
            });
 +
            this.$btnPrev.on("click", function() {
 +
                B._scrollToPrev()
 +
            });
 +
            this.zoom.$container.find(".full-screen").on({
 +
                click: function() {
 +
                    B.zoom.slideshowPause();
 +
                    B.changeViewToFullScreen()
 +
                }
 +
            });
 +
            this.getElement().find(".jgallery-close").on({
 +
                click: function() {
 +
                    B.changeViewToBar();
 +
                    B.zoom.refreshSize()
 +
                }
 +
            })
 +
        },
 +
        changeViewToBar: function() {
 +
            this.getElement().removeClass("full-screen");
 +
            if (this.isHorizontal()) {
 +
                this.getElement().addClass("jgallery-thumbnails-horizontal").removeClass("jgallery-thumbnails-vertical")
 +
            }
 +
            this.refreshNavigation()
 +
        },
 +
        changeViewToFullScreen: function() {
 +
            this.getElement().addClass("full-screen");
 +
            if (this.isHorizontal()) {
 +
                this.getElement().addClass("jgallery-thumbnails-vertical").removeClass("jgallery-thumbnails-horizontal")
 +
            }
 +
            this._refreshVerticalNavigation()
 +
        },
 +
        setActiveAlbum: function(B) {
 +
            if (!this.jGallery.booIsAlbums || B.is(".active")) {
 +
                return
 +
            }
 +
            this.$albums.not(B.get(0)).removeClass("active");
 +
            B.addClass("active");
 +
            this.jGallery.iconChangeAlbum.getListOfAlbums().find(".item").removeClass("active").filter('[data-jgallery-album-title="' + B.attr("data-jgallery-album-title") + '"]').addClass("active");
 +
            this.jGallery.iconChangeAlbum.setTitle(B.attr("data-jgallery-album-title"));
 +
            this.refreshNavigation();
 +
            if (failand(!this.getElement().is(".full-screen"), this.jGallery.$element.is(":visible"))) {
 +
                this.zoom.showPhoto(B.find("a").eq(0))
 +
            }
 +
            this.showThumbsForActiveAlbum()
 +
        },
 +
        _initSquare: function() {
 +
            this.getElement().addClass("square")
 +
        },
 +
        _initNumber: function() {
 +
            this.getElement().addClass("number");
 +
            this._initSquare()
 +
        },
 +
        _initImages: function() {
 +
            var B = n.find('style.jgallery-thumbnails[data-jgallery-id="' + this.intJgalleryId + '"]');
 +
            var C = '                    .jgallery[data-jgallery-id="' + this.intJgalleryId + '"] .jgallery-thumbnails a {\n                        width: ' + b[this.intJgalleryId].thumbWidth + "px;\n                        height: " + b[this.intJgalleryId].thumbHeight + "px;\n                        font-size: " + b[this.intJgalleryId].thumbHeight + 'px;\n                    }\n                    .jgallery[data-jgallery-id="' + this.intJgalleryId + '"] .jgallery-thumbnails.full-screen a {\n                        width: ' + b[this.intJgalleryId].thumbWidthOnFullScreen + "px;\n                        height: " + b[this.intJgalleryId].thumbHeightOnFullScreen + "px;\n                        font-size: " + b[this.intJgalleryId].thumbHeightOnFullScreen + 'px;\n                    }\n                    .jgallery[data-jgallery-id="' + this.intJgalleryId + '"] .jgallery-thumbnails-horizontal {\n                        height: ' + parseInt(b[this.intJgalleryId].thumbHeight + 2) + 'px;\n                    }\n                    .jgallery[data-jgallery-id="' + this.intJgalleryId + '"] .jgallery-thumbnails-vertical {\n                        width: ' + parseInt(b[this.intJgalleryId].thumbWidth + 2) + "px;\n                    }\n            ";
 +
            this.getElement().addClass("images");
 +
            B.length ? B.html(C) : n.append('                <style type="text/css" class="jgallery-thumbnails" data-jgallery-id="' + this.intJgalleryId + '">                    ' + C + "                </style>            ");
 +
            if (this.isHorizontal()) {
 +
                this.jGallery.zoom.$container.find(".minimalize-thumbnails").addClass("fa-ellipsis-h").removeClass("fa-ellipsis-v")
 +
            } else {
 +
                this.jGallery.zoom.$container.find(".minimalize-thumbnails").addClass("fa-ellipsis-v").removeClass("fa-ellipsis-h")
 +
            }
 +
            if (this.isJgalleryInitialized) {
 +
                return
 +
            }
 +
            this.hide()
 +
        },
 +
        _showNextThumb: function() {
 +
            var B = this;
 +
            var C = this.$a.parent(".active").children(".hidden").eq(0);
 +
            setTimeout(function() {
 +
                C.removeClass("hidden");
 +
                if (C.length) {
 +
                    B._showNextThumb()
 +
                }
 +
            }, 70)
 +
        },
 +
        _horizontalCenter: function(C) {
 +
            var B = this;
 +
            if (C.length !== 1) {
 +
                return
 +
            }
 +
            this.$container.stop(false, true).animate({
 +
                scrollLeft: C.position().left - this.$container.scrollLeft() * -1 - C.outerWidth() / -2 - this.$container.outerWidth() / 2
 +
            }, function() {
 +
                B.refreshNavigation()
 +
            })
 +
        },
 +
        _verticalCenter: function(C) {
 +
            var B = this;
 +
            if (C.length !== 1) {
 +
                return
 +
            }
 +
            this.$container.stop(false, true).animate({
 +
                scrollTop: C.position().top - this.$container.scrollTop() * -1 - C.outerHeight() / -2 - this.$container.outerHeight() / 2
 +
            }, function() {
 +
                B.refreshNavigation()
 +
            })
 +
        },
 +
        _refreshHorizontalNavigation: function() {
 +
            var C = this.getElement().find("div.active");
 +
            var B = b[this.intJgalleryId].thumbType === "image" ? this.$a.outerWidth(true) * C.find("img").length : this.$a.outerWidth(true) * C.find("a").length;
 +
            this.$container.scrollLeft() > 0 ? this.$btnPrev.addClass("visible") : this.$btnPrev.removeClass("visible");
 +
            B > this.$container.width() + this.$container.scrollLeft() ? this.$btnNext.addClass("visible") : this.$btnNext.removeClass("visible")
 +
        },
 +
        _refreshVerticalNavigation: function() {
 +
            this.$container.scrollTop() > 0 ? this.$btnPrev.addClass("visible") : this.$btnPrev.removeClass("visible");
 +
            this.$container.find(".jgallery-container-inner").height() > this.$container.height() + this.$container.scrollTop() ? this.$btnNext.addClass("visible") : this.$btnNext.removeClass("visible")
 +
        },
 +
        _scrollToPrev: function() {
 +
            var B = this;
 +
            if (this.isVertical() || this.isFullScreen()) {
 +
                this.$container.stop(false, true).animate({
 +
                    scrollTop: "-=" + q.height() * 0.7
 +
                }, function() {
 +
                    B.refreshNavigation()
 +
                })
 +
            } else {
 +
                if (this.isHorizontal()) {
 +
                    this.$container.stop(false, true).animate({
 +
                        scrollLeft: "-=" + q.width() * 0.7
 +
                    }, function() {
 +
                        B.refreshNavigation()
 +
                    })
 +
                }
 +
            }
 +
        },
 +
        _scrollToNext: function() {
 +
            var B = this;
 +
            if (this.isVertical() || this.isFullScreen()) {
 +
                this.$container.stop(false, true).animate({
 +
                    scrollTop: "+=" + q.height() * 0.7
 +
                }, function() {
 +
                    B.refreshNavigation()
 +
                })
 +
            } else {
 +
                if (this.isHorizontal()) {
 +
                    this.$container.stop(false, true).animate({
 +
                        scrollLeft: "+=" + q.width() * 0.7
 +
                    }, function() {
 +
                        B.refreshNavigation()
 +
                    })
 +
                }
 +
            }
 +
        }
 +
    };
 +
    var h = function(B) {
 +
        this.$container = B.$element.children(".zoom-container");
 +
        this.$element = this.$container.children(".zoom");
 +
        this.$title = this.$container.find(".nav-bottom > .title");
 +
        this.$btnPrev = this.$container.children(".prev");
 +
        this.$btnNext = this.$container.children(".next");
 +
        this.$left = this.$container.find(".left");
 +
        this.$right = this.$container.find(".right");
 +
        this.thumbnails = B.thumbnails;
 +
        this.$jGallery = B.$element;
 +
        this.jGallery = B;
 +
        this.$resize = this.$container.find(".resize");
 +
        this.$dragNav = this.$container.find(".drag-nav");
 +
        this.$dragNavCrop = g();
 +
        this.$dragNavCropImg = g();
 +
        this.$changeMode = this.$container.find(".fa.change-mode");
 +
        this.$random = this.$container.find(".random");
 +
        this.$slideshow = this.$container.find(".slideshow");
 +
        this.intJGalleryId = this.$jGallery.attr("data-jgallery-id");
 +
        this.booSlideshowPlayed = false;
 +
        this.booLoadingInProgress = false;
 +
        this.booLoadedAll = false;
 +
        this.$title.on("click", function() {
 +
            g(this).toggleClass("expanded")
 +
        });
 +
        this.update()
 +
    };
 +
    h.prototype = {
 +
        update: function() {
 +
            var B = w[b[this.jGallery.intId].transition];
 +
            this.$container.attr("data-size", b[this.jGallery.intId].zoomSize);
 +
            this.$element.find(".pt-page").removeClass(b[this.jGallery.intId].hideEffect).removeClass(b[this.jGallery.intId].showEffect);
 +
            if (typeof B !== "undefined") {
 +
                b[this.jGallery.intId].hideEffect = B[0];
 +
                b[this.jGallery.intId].showEffect = B[1]
 +
            }
 +
            this.initAdvancedAnimation()
 +
        },
 +
        initAdvancedAnimation: function() {
 +
            if (typeof this.advancedAnimation === "undefined") {
 +
                this.advancedAnimation = new d(this.$element)
 +
            }
 +
            this.advancedAnimation.setDuration(b[this.jGallery.intId].transitionDuration);
 +
            this.advancedAnimation.setDirection(b[this.jGallery.intId].transitionWaveDirection);
 +
            this.advancedAnimation.setQuantityParts(b[this.jGallery.intId].transitionCols, b[this.jGallery.intId].transitionRows);
 +
            this.advancedAnimation.setHideEffect(b[this.jGallery.intId].hideEffect);
 +
            this.advancedAnimation.setShowEffect(b[this.jGallery.intId].showEffect)
 +
        },
 +
        setThumbnails: function(B) {
 +
            this.thumbnails = B
 +
        },
 +
        enableDrag: function() {
 +
            if (!b[this.jGallery.intId].draggableZoom) {
 +
                return
 +
            }
 +
            var E = this;
 +
            var G;
 +
            var B;
 +
            var D = function(K) {
 +
                var I = K.pageX;
 +
                var H = K.pageY;
 +
                var J = E.$element.find("img.active");
 +
                G = J.css("margin-left");
 +
                B = J.css("margin-top");
 +
                E.$element.on({
 +
                    mousemove: function(L) {
 +
                        F(L.pageX - I, L.pageY - H)
 +
                    },
 +
                    mouseleave: function() {
 +
                        C()
 +
                    }
 +
                });
 +
                if (b[E.jGallery.intId].zoomSize === "fill") {
 +
                    E.$dragNav.removeClass("hide").addClass("show")
 +
                }
 +
                F(0, 0)
 +
            };
 +
            var C = function() {
 +
                E.$element.off("mousemove");
 +
                if (b[E.jGallery.intId].zoomSize === "fill") {
 +
                    E.$dragNav.removeClass("show").addClass("hide")
 +
                }
 +
            };
 +
            var F = function(I, O) {
 +
                var N = parseFloat(parseFloat(G) + I);
 +
                var M = parseFloat(parseFloat(B) + O);
 +
                var K = E.$element.find("img.active");
 +
                var L = K.eq(0);
 +
                var J = K.eq(-1);
 +
                var H = J.parent();
 +
                if (failand(L.position().left + N < 0, J.position().left + J.width() + N > H.outerWidth())) {
 +
                    K.css({
 +
                        "margin-left": N
 +
                    });
 +
                    E.$dragNavCrop.css({
 +
                        left: -(L.position().left + N) / K.width() * 100 + "%"
 +
                    })
 +
                }
 +
                if (failand(L.position().top + M < 0, J.position().top + J.height() + M > H.outerHeight())) {
 +
                    K.css({
 +
                        "margin-top": M
 +
                    });
 +
                    E.$dragNavCrop.css({
 +
                        top: -(L.position().top + M) / K.height() * 100 + "%"
 +
                    })
 +
                }
 +
                E.$dragNavCropImg.css({
 +
                    "margin-left": -E.$dragNavCrop.position().left,
 +
                    "margin-top": -E.$dragNavCrop.position().top
 +
                })
 +
            };
 +
            if (b[E.jGallery.intId].zoomSize === "original") {
 +
                E.$dragNav.removeClass("hide").addClass("show")
 +
            }
 +
            this.refreshDragNavCropSize();
 +
            this.$element.css("cursor", "move").on({
 +
                mousedown: function(H) {
 +
                    H.preventDefault();
 +
                    D(H);
 +
                    E.slideshowPause()
 +
                },
 +
                mouseup: function() {
 +
                    C()
 +
                }
 +
            });
 +
            this.$left.add(this.$right).hide()
 +
        },
 +
        disableDrag: function() {
 +
            if (!b[this.jGallery.intId].draggableZoom) {
 +
                return
 +
            }
 +
            this.$dragNav.removeClass("show").addClass("hide");
 +
            this.$element.css("cursor", "default");
 +
            this.$element.off();
 +
            this.$left.add(this.$right).show()
 +
        },
 +
        refreshContainerSize: function() {
 +
            var C = this.jGallery.isSlider() ? 0 : this.$container.find(".nav-bottom").outerHeight();
 +
            var B = failand(!this.jGallery.isSlider(), !this.thumbnails.getElement().is(".hidden"));
 +
            var D = B ? b[this.intJGalleryId].thumbnailsPosition : "";
 +
            this.$container.css({
 +
                width: failand(B, this.thumbnails.isVertical()) ? this.$jGallery.width() - this.thumbnails.getElement().outerWidth(true) : "auto",
 +
                height: failand(B, this.thumbnails.isHorizontal()) ? this.$jGallery.height() - this.thumbnails.getElement().outerHeight(true) - C : this.$jGallery.height() - C,
 +
                "margin-top": D === "top" ? this.thumbnails.getElement().outerHeight(true) : 0,
 +
                "margin-left": D === "left" ? this.thumbnails.getElement().outerWidth(true) : 0,
 +
                "margin-right": D === "right" ? this.thumbnails.getElement().outerWidth(true) : 0
 +
            });
 +
            if (b[this.jGallery.intId].draggableZoom) {
 +
                this.refreshDragNavCropSize()
 +
            }
 +
        },
 +
        refreshSize: function() {
 +
            if (this.thumbnails.isFullScreen()) {
 +
                return
 +
            }
 +
            this.refreshContainerSize();
 +
            if (b[this.intJGalleryId].zoomSize === "original") {
 +
                this.original()
 +
            } else {
 +
                if (b[this.intJGalleryId].zoomSize === "fill") {
 +
                    this.fill()
 +
                } else {
 +
                    this.fit()
 +
                }
 +
            }
 +
            this.$element.addClass("visible")
 +
        },
 +
        refreshDragNavCropSize: function() {
 +
            var C = this.$element.find("img.active");
 +
            var B;
 +
            var D;
 +
            this.$dragNavCrop.css({
 +
                width: this.$element.width() / C.width() * 100 + "%",
 +
                height: this.$element.height() / C.height() * 100 + "%"
 +
            });
 +
            B = (this.$dragNav.width() - this.$dragNavCrop.width()) / 2;
 +
            D = (this.$dragNav.height() - this.$dragNavCrop.height()) / 2;
 +
            this.$dragNavCrop.css({
 +
                left: B,
 +
                top: D
 +
            });
 +
            if (this.$dragNavCropImg.length) {
 +
                this.$dragNavCropImg.css({
 +
                    "margin-left": -B,
 +
                    "margin-top": -D
 +
                })
 +
            }
 +
        },
 +
        changeSize: function() {
 +
            if (b[this.jGallery.intId].zoomSize === "fit") {
 +
                b[this.jGallery.intId].zoomSize = "fill";
 +
                this.fill()
 +
            } else {
 +
                if (b[this.jGallery.intId].zoomSize === "fill") {
 +
                    var B = this.$element.find("img.active").eq(0);
 +
                    if (this.$element.outerWidth().toString() === B.attr("data-width")) {
 +
                        b[this.jGallery.intId].zoomSize = "fit";
 +
                        this.fit()
 +
                    } else {
 +
                        b[this.jGallery.intId].zoomSize = "original";
 +
                        this.original()
 +
                    }
 +
                } else {
 +
                    if (b[this.jGallery.intId].zoomSize === "original") {
 +
                        b[this.jGallery.intId].zoomSize = "fit";
 +
                        this.fit()
 +
                    }
 +
                }
 +
            }
 +
            this.$container.attr("data-size", b[this.jGallery.intId].zoomSize)
 +
        },
 +
        original: function() {
 +
            var B = this.$element.find("img.active");
 +
            this.advancedAnimation.setPositionParts();
 +
            this.setImgSizeForOriginal(B);
 +
            this.setImgSizeForOriginal(this.$element.find(".pt-page.init img"));
 +
            if (failand(B.attr("data-width") <= this.$element.outerWidth(), B.attr("data-height") <= this.$element.outerHeight())) {
 +
                this.$resize.addClass("fa-search-plus").removeClass("fa-search-minus");
 +
                this.disableDrag()
 +
            } else {
 +
                this.$resize.addClass("fa-search-minus").removeClass("fa-search-plus");
 +
                this.enableDrag()
 +
            }
 +
        },
 +
        fit: function() {
 +
            var B = this.$element.find("img.active").add(this.$element.find(".pt-page.init img"));
 +
            this.advancedAnimation.setPositionParts();
 +
            this.setImgSizeForFit(B.filter(".active"));
 +
            this.setImgSizeForFit(B.filter(":not( .active )"));
 +
            this.$resize.addClass("fa-search-plus").removeClass("fa-search-minus");
 +
            this.disableDrag()
 +
        },
 +
        fill: function() {
 +
            var B = this.$element.find("img.active");
 +
            this.setImgSizeForFill(B);
 +
            this.setImgSizeForFill(this.$element.find(".pt-page.init img"));
 +
            this.advancedAnimation.setPositionParts();
 +
            if (failand(B.attr("data-width") > B.width(), B.attr("data-height") > B.height())) {
 +
                this.$resize.addClass("fa-search-plus").removeClass("fa-search-minus")
 +
            } else {
 +
                this.$resize.addClass("fa-search-minus").removeClass("fa-search-plus")
 +
            }
 +
            this.enableDrag()
 +
        },
 +
        setImgSizeForOriginal: function(B) {
 +
            B.css({
 +
                width: B.attr("data-width"),
 +
                height: B.attr("data-height"),
 +
                "min-width": 0,
 +
                "min-height": 0,
 +
                "max-width": "none",
 +
                "max-height": "none"
 +
            });
 +
            B.css({
 +
                "margin-top": -B.height() / 2,
 +
                "margin-left": -B.width() / 2
 +
            })
 +
        },
 +
        setImgSizeForFit: function(C) {
 +
            var D = this.jGallery.isSlider() ? 0 : this.$container.find(".nav-bottom").outerHeight();
 +
            var B = failand(!this.jGallery.isSlider(), !this.thumbnails.getElement().is(".hidden"));
 +
            C.css({
 +
                width: "auto",
 +
                height: "auto",
 +
                "min-width": 0,
 +
                "min-height": 0,
 +
                "max-width": failand(B, this.thumbnails.isVertical()) ? this.$jGallery.width() - this.thumbnails.getElement().outerWidth(true) : this.$jGallery.width(),
 +
                "max-height": failand(B, this.thumbnails.isHorizontal()) ? this.$jGallery.height() - this.thumbnails.getElement().outerHeight(true) - D : this.$jGallery.height() - D
 +
            });
 +
            if (C.width() / C.height() / this.jGallery.getCanvasRatioWidthToHeight() < 1) {
 +
                C.css({
 +
                    width: "auto",
 +
                    height: failand(B, this.thumbnails.isHorizontal()) ? this.$jGallery.height() - this.thumbnails.getElement().outerHeight(true) - D : this.$jGallery.height() - D
 +
                })
 +
            } else {
 +
                C.css({
 +
                    width: failand(B, this.thumbnails.isVertical()) ? this.$jGallery.width() - this.thumbnails.getElement().outerWidth(true) : this.$jGallery.width(),
 +
                    height: "auto"
 +
                })
 +
            }
 +
            C.css({
 +
                "margin-top": -C.height() / 2,
 +
                "margin-left": -C.width() / 2
 +
            })
 +
        },
 +
        setImgSizeForFill: function(C) {
 +
            var D = this.jGallery.isSlider() ? 0 : this.$container.find(".nav-bottom").outerHeight();
 +
            var B = failand(!this.jGallery.isSlider(), !this.thumbnails.getElement().is(".hidden"));
 +
            C.css({
 +
                width: "auto",
 +
                height: "auto",
 +
                "max-width": "none",
 +
                "max-height": "none",
 +
                "min-width": 0,
 +
                "min-height": 0
 +
            });
 +
            if (C.width() / C.height() / this.jGallery.getCanvasRatioWidthToHeight() > 1) {
 +
                C.css({
 +
                    width: "auto",
 +
                    height: failand(B, this.thumbnails.isHorizontal()) ? this.$jGallery.height() - this.thumbnails.getElement().outerHeight(true) - D : this.$jGallery.height() - D
 +
                })
 +
            } else {
 +
                C.css({
 +
                    width: failand(B, this.thumbnails.isVertical()) ? this.$jGallery.width() - this.thumbnails.getElement().outerWidth(true) : this.$jGallery.width(),
 +
                    height: "auto"
 +
                })
 +
            }
 +
            C.css({
 +
                "min-width": failand(B, this.thumbnails.isVertical()) ? this.$jGallery.width() - this.thumbnails.getElement().outerWidth(true) : this.$jGallery.width(),
 +
                "min-height": failand(B, this.thumbnails.isHorizontal()) ? this.$jGallery.height() - this.thumbnails.getElement().outerHeight(true) - D : this.$jGallery.height() - D
 +
            });
 +
            C.css({
 +
                "margin-top": -C.height() / 2,
 +
                "margin-left": -C.width() / 2
 +
            })
 +
        },
 +
        isLoaded: function(B) {
 +
            return this.$element.find("img").filter('[src="' + B.attr("href") + '"]').length > 0
 +
        },
 +
        refreshNav: function() {
 +
            var B = this.thumbnails.getElement().find("div.active a.active");
 +
            B.prev("a").length === 1 ? this.$btnPrev.add(this.$container.children(".left")).removeClass("hidden") : this.$btnPrev.add(this.$container.children(".left")).addClass("hidden");
 +
            B.next("a").length === 1 ? this.$btnNext.add(this.$container.children(".right")).removeClass("hidden") : this.$btnNext.add(this.$container.children(".right")).addClass("hidden")
 +
        },
 +
        slideshowStop: function() {
 +
            this.slideshowPause();
 +
            this.jGallery.progress.clear()
 +
        },
 +
        slideshowPause: function() {
 +
            this.jGallery.progress.pause();
 +
            this.$slideshow.removeClass("fa-pause").addClass("fa-play");
 +
            this.booSlideshowPlayed = false;
 +
            if (b[this.jGallery.intId].slideshowCanRandom) {
 +
                this.$random.hide()
 +
            }
 +
        },
 +
        slideshowPlay: function() {
 +
            if (this.booLoadingInProgress || this.booSlideshowPlayed) {
 +
                return
 +
            }
 +
            this.booSlideshowPlayed = true;
 +
            this.$slideshow.removeClass("fa-play").addClass("fa-pause");
 +
            this.slideshowSetTimeout();
 +
            if (b[this.jGallery.intId].slideshowCanRandom) {
 +
                this.$random.show()
 +
            }
 +
        },
 +
        slideshowPlayPause: function() {
 +
            this.$slideshow.is(".fa-play") ? this.slideshowPlay() : this.slideshowPause()
 +
        },
 +
        slideshowSetTimeout: function() {
 +
            var B = this;
 +
            this.jGallery.progress.start(this.$container.width(), function() {
 +
                B.jGallery.progress.clear();
 +
                b[B.jGallery.intId].slideshowRandom ? B.showRandomPhoto() : B.showNextPhotoLoop()
 +
            })
 +
        },
 +
        slideshowRandomToggle: function() {
 +
            if (b[this.jGallery.intId].slideshowRandom) {
 +
                this.$random.removeClass("active");
 +
                b[this.jGallery.intId].slideshowRandom = false
 +
            } else {
 +
                this.$random.addClass("active");
 +
                b[this.jGallery.intId].slideshowRandom = true
 +
            }
 +
        },
 +
        showNextPhotoLoop: function() {
 +
            var B = this.thumbnails.$a.filter(".active").next("a");
 +
            if (B.length === 0) {
 +
                B = this.thumbnails.$albums.filter(".active").find("a").eq(0)
 +
            }
 +
            this.showPhoto(B)
 +
        },
 +
        showRandomPhoto: function() {
 +
            var B = this.thumbnails.$albums.filter(".active").find("a:not(.active)");
 +
            this.showPhoto(B.eq(Math.floor(Math.random() * B.length)))
 +
        },
 +
        showPrevPhoto: function() {
 +
            var B = this.thumbnails.$a.filter(".active").prev("a");
 +
            if (B.length === 1) {
 +
                this.showPhoto(B)
 +
            }
 +
        },
 +
        showNextPhoto: function() {
 +
            var B = this.thumbnails.$a.filter(".active").next("a");
 +
            if (B.length === 1) {
 +
                this.showPhoto(B)
 +
            }
 +
        },
 +
        showPhotoInit: function() {
 +
            this.jGallery.init()
 +
        },
 +
        showPhoto: function(F, D) {
 +
            var C = this;
 +
            var G = F.children("img");
 +
            var B;
 +
            var I;
 +
            var H;
 +
            var E;
 +
            if (!this.jGallery.initialized()) {
 +
                this.showPhotoInit()
 +
            }
 +
            if (this.booLoadingInProgress) {
 +
                return
 +
            }
 +
            this.booLoadingInProgress = true;
 +
            E = b[this.jGallery.intId][F.nextAll(".active").length > 0 ? "transitionBackward" : "transition"];
 +
            if (E === "random") {
 +
                this.setRandomTransition()
 +
            } else {
 +
                H = w[E];
 +
                this.advancedAnimation.setHideEffect(H[0]);
 +
                this.advancedAnimation.setShowEffect(H[1])
 +
            }
 +
            this.$element.find(".pt-page.init").remove();
 +
            b[this.jGallery.intId].showPhoto();
 +
            if (this.jGallery.$element.is(":not(:visible)")) {
 +
                this.jGallery.show()
 +
            }
 +
            this.thumbnails.changeViewToBar();
 +
            if (this.jGallery.booIsAlbums) {
 +
                if (this.jGallery.iconChangeAlbum.getTitle() === "") {
 +
                    I = F.parents(".album").eq(0).attr("data-jgallery-album-title");
 +
                    this.jGallery.iconChangeAlbum.setTitle(I);
 +
                    this.jGallery.iconChangeAlbum.$element.find('[data-jgallery-album-title="' + I + '"]').addClass("active");
 +
                    F.parents(".album").addClass("active").siblings(".album").removeClass("active")
 +
                }
 +
            }
 +
            this.thumbnails.setActiveAlbum(this.thumbnails.$albums.filter('[data-jgallery-album-title="' + F.parents("[data-jgallery-album-title]").attr("data-jgallery-album-title") + '"]'));
 +
            this.thumbnails.setActiveThumb(F);
 +
            if (this.$element.find("img.active").attr("src") === F.attr("href")) {
 +
                this.booLoadingInProgress = false;
 +
                return
 +
            }
 +
            this.refreshNav();
 +
            if (b[this.jGallery.intId].title) {
 +
                this.$title.addClass("after fade")
 +
            }
 +
            B = C.isLoaded(F);
 +
            if (!B) {
 +
                if (failand(b[C.jGallery.intId].preloadAll, !C.booLoadedAll)) {
 +
                    this.appendAllPhotos()
 +
                } else {
 +
                    this.appendPhoto(F)
 +
                }
 +
            }
 +
            this.$element.find("img.active").addClass("prev-img");
 +
            C.$container.find("img.active").removeClass("active");
 +
            C.$container.find('[src="' + F.attr("href") + '"]').addClass("active");
 +
            if (failand(b[C.jGallery.intId].title, G.is("[alt]"))) {
 +
                C.$title.removeClass("after").addClass("before")
 +
            }
 +
            if (!B || (failand(b[C.jGallery.intId].preloadAll, !C.booLoadedAll))) {
 +
                C.booLoadedAll = true;
 +
                C.$container.overlay({
 +
                    show: true,
 +
                    showLoader: true
 +
                });
 +
                b[C.jGallery.intId].beforeLoadPhoto();
 +
                C.loadPhoto(C.$element, F, D)
 +
            } else {
 +
                C.showPhotoSuccess(G, D)
 +
            }
 +
        },
 +
        appendPhoto: function(B) {
 +
            this.$element.find(".pt-part").append('                <div class="jgallery-container pt-page">                    <div class="pt-item"><img src="' + B.attr("href") + '" /></div>                </div>')
 +
        },
 +
        appendAllPhotos: function() {
 +
            var B = this;
 +
            if (!b[this.jGallery.intId].preloadAll) {
 +
                return
 +
            }
 +
            this.thumbnails.$a.each(function() {
 +
                var C = g(this);
 +
                if (!B.isLoaded(C)) {
 +
                    B.$element.find(".pt-part").append('<div class="jgallery-container pt-page"><div class="pt-item"><img src="' + C.attr("href") + '" /></div></div>')
 +
                }
 +
            });
 +
            this.appendInitPhoto(this.thumbnails.$a.eq(-1))
 +
        },
 +
        appendInitPhoto: function(B) {
 +
            if (B.length !== 1) {
 +
                return
 +
            }
 +
            this.$element.find(".pt-part").append('                <div class="jgallery-container pt-page pt-page-current pt-page-ontop init" style="visibility: hidden;">                    <div class="pt-item"><img src="' + B.attr("href") + '" class="active loaded" /></div>                </div>')
 +
        },
 +
        loadPhoto: function(C, H, D) {
 +
            var B = this;
 +
            var I = H.children("img");
 +
            var F = 0;
 +
            var G = C.find(".pt-part").eq(0);
 +
            var E = b[this.jGallery.intId].preloadAll ? G : G.find("img.active");
 +
            E.jLoader({
 +
                interval: 500,
 +
                skip: ".loaded",
 +
                start: function() {
 +
                    if (b[B.jGallery.intId].preloadAll) {
 +
                        B.$container.find(".overlay .imageLoaderPositionAbsolute:not(:has(.progress-value))").addClass("preloadAll").append('<span class="progress-value"></span>');
 +
                        B.$container.find(".progress-value").html("0")
 +
                    } else {
 +
                        B.$container.find(".overlay .imageLoaderPositionAbsolute:not(:has(.fa-spin))").append('<span class="fa fa-spin fa-spinner"></span>')
 +
                    }
 +
                },
 +
                success: function() {
 +
                    C.find("img").addClass("loaded");
 +
                    B.$container.overlay({
 +
                        hide: true,
 +
                        hideLoader: true
 +
                    });
 +
                    B.showPhotoSuccess(I, D)
 +
                },
 +
                progress: function(J) {
 +
                    if (!b[B.jGallery.intId].preloadAll) {
 +
                        return
 +
                    }
 +
                    F = J.percent;
 +
                    B.$container.find(".overlay .imageLoaderPositionAbsolute").find(".progress-value").html(F)
 +
                }
 +
            })
 +
        },
 +
        showPhotoSuccess: function(E, C) {
 +
            var D;
 +
            var B = this.$element.find("img.active");
 +
            C = g.extend({}, {
 +
                historyPushState: true
 +
            }, C);
 +
            if (B.is(":not([data-width])")) {
 +
                D = new Image();
 +
                D.src = B.attr("src");
 +
                B.attr("data-width", D.width);
 +
                B.attr("data-height", D.height)
 +
            }
 +
            if (failand(b[this.jGallery.intId].title, E.attr("alt"))) {
 +
                this.$title.html(E.attr("alt")).removeClass("before").removeClass("after");
 +
                this.jGallery.$element.addClass("has-title")
 +
            } else {
 +
                this.jGallery.$element.removeClass("has-title")
 +
            }
 +
            this.jGallery.setColours({
 +
                strBg: E.is("[data-jgallery-bg-color]") ? E.attr("data-jgallery-bg-color") : b[this.jGallery.intId].backgroundColor,
 +
                strText: E.is("[data-jgallery-bg-color]") ? E.attr("data-jgallery-text-color") : b[this.jGallery.intId].textColor
 +
            });
 +
            this.$element.find(".pt-page.init").css({
 +
                visibility: "visible"
 +
            });
 +
            this.$element.find("img.prev-img").removeClass("prev-img");
 +
            this.advancedAnimation.show(B.eq(0).parent().parent(), {
 +
                animation: this.$element.find(".pt-part").eq(0).find(".pt-page-current:not(.pt-page-prev)").length === 1
 +
            });
 +
            this.refreshSize();
 +
            this.thumbnails.refreshNavigation();
 +
            if (this.booSlideshowPlayed) {
 +
                this.slideshowSetTimeout()
 +
            }
 +
            b[this.jGallery.intId].afterLoadPhoto();
 +
            this.booLoadingInProgress = false;
 +
            if (failand(b[this.jGallery.intId].autostart, b[this.jGallery.intId].slideshowAutostart, b[this.jGallery.intId].slideshow)) {
 +
                b[this.jGallery.intId].slideshowAutostart = false;
 +
                this.slideshowPlay()
 +
            }
 +
            if (b[this.jGallery.intId].draggableZoom) {
 +
                this.$dragNav.html('<img src="' + B.attr("src") + '" class="bg">                    <div class="crop"><img src="' + B.attr("src") + '"></div>');
 +
                this.$dragNavCrop = this.$dragNav.find(".crop");
 +
                this.$dragNavCropImg = this.$dragNavCrop.find("img");
 +
                this.refreshDragNavCropSize()
 +
            }
 +
            if (failand(C.historyPushState, b[this.jGallery.intId].browserHistory)) {
 +
                u({
 +
                    path: B.attr("src")
 +
                })
 +
            }
 +
        },
 +
        showPhotoByPath: function(C) {
 +
            var B = this.thumbnails.$albums.filter(".active").find('a[href="' + C + '"]');
 +
            if (B.length === 0) {
 +
                B = this.thumbnails.$a.filter('a[href="' + C + '"]').eq(0)
 +
            }
 +
            if (B.length === 0) {
 +
                return
 +
            }
 +
            this.showPhoto(B, {
 +
                historyPushState: false
 +
            })
 +
        },
 +
        setTransition: function(B) {
 +
            b[this.jGallery.intId].hideEffect = w[B][0];
 +
            b[this.jGallery.intId].showEffect = w[B][1];
 +
            this.advancedAnimation.setHideEffect(b[this.jGallery.intId].hideEffect);
 +
            this.advancedAnimation.setShowEffect(b[this.jGallery.intId].showEffect)
 +
        },
 +
        setRandomTransition: function() {
 +
            var B;
 +
            this.$element.find(".pt-page").removeClass(b[this.jGallery.intId].hideEffect).removeClass(b[this.jGallery.intId].showEffect);
 +
            B = Math.floor((Math.random() * x.length));
 +
            b[this.jGallery.intId].hideEffect = x[B][0];
 +
            b[this.jGallery.intId].showEffect = x[B][1];
 +
            this.advancedAnimation.setHideEffect(b[this.jGallery.intId].hideEffect);
 +
            this.advancedAnimation.setShowEffect(b[this.jGallery.intId].showEffect)
 +
        },
 +
        unmarkActive: function() {
 +
            this.$element.find("img.active").removeClass("active")
 +
        },
 +
        changeMode: function() {
 +
            var B = b[this.jGallery.intId].mode;
 +
            if (B === "slider") {
 +
                return
 +
            }
 +
            if (B === "standard") {
 +
                this.goToFullScreenMode()
 +
            } else {
 +
                if (B === "full-screen") {
 +
                    this.goToStandardMode()
 +
                }
 +
            }
 +
            if (this.jGallery.iconChangeAlbum instanceof o) {
 +
                this.jGallery.iconChangeAlbum.refreshMenuHeight()
 +
            }
 +
        },
 +
        goToFullScreenMode: function() {
 +
            s.css({
 +
                overflow: "hidden"
 +
            });
 +
            this.jGallery.$this.show();
 +
            this.jGallery.$element.removeClass("jgallery-standard").addClass("jgallery-full-screen").css({
 +
                width: "auto",
 +
                height: "auto"
 +
            });
 +
            this.$changeMode.removeClass("fa-expand").addClass("fa-compress");
 +
            b[this.jGallery.intId].mode = "full-screen";
 +
            this.jGallery.refreshDimensions()
 +
        },
 +
        goToStandardMode: function() {
 +
            s.css({
 +
                overflow: "visible"
 +
            });
 +
            this.jGallery.$this.hide();
 +
            this.jGallery.$element.removeClass("jgallery-full-screen").addClass("jgallery-standard").css({
 +
                width: b[this.jGallery.intId].width,
 +
                height: b[this.jGallery.intId].height
 +
            });
 +
            this.$changeMode.removeClass("fa-compress").addClass("fa-expand");
 +
            b[this.jGallery.intId].mode = "standard";
 +
            this.jGallery.refreshDimensions()
 +
        }
 +
    };
 +
    var p = function(C) {
 +
        var B = this;
 +
        this.booIsAlbums = C.find(".album:has(a:has(img))").length > 1;
 +
        this.intId = c;
 +
        this.$this = C;
 +
        if (failand(b[this.intId].disabledOnIE8AndOlder, v())) {
 +
            return
 +
        }
 +
        this.init();
 +
        if (b[this.intId].browserHistory) {
 +
            this.browserHistory()
 +
        }
 +
        if (b[this.intId].autostart) {
 +
            this.autostart()
 +
        }
 +
        g("html").on({
 +
            keydown: function(D) {
 +
                if (B.$element.is(":visible")) {
 +
                    if (D.which === 27) {
 +
                        D.preventDefault();
 +
                        if (B.thumbnails.getElement().is(".full-screen")) {
 +
                            B.thumbnails.changeViewToBar();
 +
                            B.zoom.refreshSize();
 +
                            return
 +
                        }
 +
                        B.hide()
 +
                    }
 +
                    if (D.which === 37) {
 +
                        D.preventDefault();
 +
                        B.zoom.showPrevPhoto()
 +
                    }
 +
                    if (D.which === 39) {
 +
                        D.preventDefault();
 +
                        B.zoom.showNextPhoto()
 +
                    }
 +
                }
 +
            }
 +
        })
 +
    };
 +
    p.prototype = {
 +
        initialized: function() {
 +
            return this.$this.is("[data-jgallery-id]")
 +
        },
 +
        update: function(B) {
 +
            b[this.intId] = this.initialized() ? g.extend(b[this.intId], B) : g.extend({}, m, B);
 +
            if (failand(b[this.intId].disabledOnIE8AndOlder, z())) {
 +
                return
 +
            }
 +
            this.booIsAlbums = this.$this.find(".album:has(a:has(img))").length > 1;
 +
            if (b[this.intId].reloadThumbnails) {
 +
                this.reloadThumbnails()
 +
            }
 +
            this.zoom.update();
 +
            this.thumbnails.init();
 +
            this.setUserOptions()
 +
        },
 +
        reloadThumbnails: function() {
 +
            new e(this, {
 +
                thumbsHidden: false
 +
            });
 +
            this.thumbnails.reload();
 +
            this.generateAlbumsDropdown()
 +
        },
 +
        setVariables: function() {
 +
            this.$element = g(".jgallery").filter('[data-jgallery-id="' + this.intId + '"]');
 +
            this.progress = new i(this.$element.find(".zoom-container").children(".progress"), this.intId);
 +
            this.zoom = new h(this);
 +
            this.thumbnails = new l(this);
 +
            this.zoom.setThumbnails(this.thumbnails)
 +
        },
 +
        show: function() {
 +
            this.$this.hide();
 +
            q.on("resize", {
 +
                jGallery: this
 +
            }, this.windowOnResize);
 +
            if (b[this.intId].mode === "full-screen") {
 +
                s.css({
 +
                    overflow: "hidden"
 +
                })
 +
            }
 +
            this.$element.not(":visible").removeClass("hidden").stop(false, true).fadeIn(500);
 +
            this.zoom.refreshContainerSize();
 +
            this.zoom.$title.removeClass("hidden");
 +
            b[this.intId].showGallery();
 +
            if (this.iconChangeAlbum instanceof o) {
 +
                this.iconChangeAlbum.refreshMenuHeight()
 +
            }
 +
        },
 +
        hide: function(C) {
 +
            var B = this;
 +
            if (!b[this.intId].canClose) {
 +
                return
 +
            }
 +
            C = g.extend({}, {
 +
                historyPushState: true
 +
            }, C);
 +
            this.$element.filter(":visible").stop(false, true).addClass("hidden").fadeOut(500, function() {
 +
                if (b[B.intId].mode === "full-screen") {
 +
                    s.css({
 +
                        overflow: "visible"
 +
                    })
 +
                }
 +
            });
 +
            this.zoom.booLoadingInProgress = false;
 +
            clearTimeout(this.zoom.showPhotoTimeout);
 +
            this.zoom.$title.addClass("hidden");
 +
            this.zoom.$btnPrev.addClass("hidden");
 +
            this.zoom.$btnNext.addClass("hidden");
 +
            this.zoom.slideshowPause();
 +
            this.zoom.advancedAnimation.hideActive();
 +
            this.zoom.unmarkActive();
 +
            q.off("resize", this.windowOnResize);
 +
            this.$this.show();
 +
            if (failand(C.historyPushState, b[this.intId].browserHistory)) {
 +
                u()
 +
            }
 +
            b[this.intId].closeGallery()
 +
        },
 +
        autostart: function() {
 +
            var B;
 +
            var C;
 +
            if (this.$element.is(":visible")) {
 +
                return
 +
            }
 +
            if (this.booIsAlbums) {
 +
                B = this.thumbnails.getElement().find(".album").eq(b[this.intId].autostartAtAlbum - 1);
 +
                if (B.length === 0) {
 +
                    B = this.thumbnails.getElement().find(".album").eq(0)
 +
                }
 +
            } else {
 +
                B = this.thumbnails.getElement()
 +
            }
 +
            C = B.find("a").eq(b[this.intId].autostartAtImage - 1);
 +
            if (C.length === 0) {
 +
                C = B.find("a").eq(0)
 +
            }
 +
            C.trigger("click")
 +
        },
 +
        browserHistory: function() {
 +
            var B = this;
 +
            var D = window.onpopstate;
 +
 +
            function C() {
 +
                var E;
 +
                if (!document.location.hash) {
 +
                    return
 +
                }
 +
                E = document.location.hash.replace("#", "");
 +
                switch (E) {
 +
                    case "":
 +
                        B.hide({
 +
                            historyPushState: false
 +
                        });
 +
                        break;
 +
                    default:
 +
                        B.zoom.showPhotoByPath(E)
 +
                }
 +
            }
 +
            window.onpopstate = function() {
 +
                if (typeof D === "function") {
 +
                    D()
 +
                }
 +
                C()
 +
            };
 +
            C()
 +
        },
 +
        generateAlbumsDropdown: function() {
 +
            var B = this;
 +
            this.$element.find(".change-album").remove();
 +
            if (!this.booIsAlbums) {
 +
                return
 +
            }
 +
            this.zoom.$container.find(".nav-bottom > .icons").append('                <span class="fa fa-list-ul change-album jgallery-btn jgallery-btn-small">                    <span class="menu jgallery-btn"></span>                    <span class="title"></span>                </span>            ');
 +
            this.iconChangeAlbum = new o(B.zoom.$container.find(".change-album"), this);
 +
            this.iconChangeAlbum.clearMenu();
 +
            this.thumbnails.$albums.each(function() {
 +
                var C = g(this).attr("data-jgallery-album-title");
 +
                B.iconChangeAlbum.appendToMenu('<span class="item" data-jgallery-album-title="' + C + '">' + C + "</span>")
 +
            });
 +
            this.thumbnails.getElement().append(this.iconChangeAlbum.getElement().outerHtml());
 +
            this.iconChangeAlbum = new o(this.iconChangeAlbum.getElement().add(this.thumbnails.getElement().children(":last-child")), this);
 +
            this.iconChangeAlbum.bindEvents(this)
 +
        },
 +
        init: function() {
 +
            var B = this;
 +
            n.append('<style type="text/css" class="colours" data-jgallery-id="' + this.intId + '"></style>');
 +
            b[this.intId].initGallery();
 +
            this.$this.attr("data-jgallery-id", this.intId);
 +
            this.generateHtml();
 +
            new e(this);
 +
            this.setVariables();
 +
            this.thumbnails.init();
 +
            this.thumbnails.getElement().append('<span class="fa fa-times jgallery-btn jgallery-close jgallery-btn-small"></span>');
 +
            this.generateAlbumsDropdown();
 +
            B.setUserOptions();
 +
            if (b[B.intId].zoomSize === "fit" || b[B.intId].zoomSize === "original") {
 +
                B.zoom.$resize.addClass("fa-search-plus")
 +
            }
 +
            if (b[B.intId].zoomSize === "fill") {
 +
                B.zoom.$resize.addClass("fa-search-minus")
 +
            }
 +
            if (!k()) {
 +
                B.$element.addClass("text-shadow")
 +
            }
 +
            B.thumbnails.refreshNavigation();
 +
            B.zoom.refreshNav();
 +
            B.zoom.refreshSize();
 +
            this.$this.on("click", "a:has(img)", function(C) {
 +
                var D = g(this);
 +
                C.preventDefault();
 +
                B.zoom.showPhoto(D)
 +
            });
 +
            B.thumbnails.$element.on("click", "a", function(C) {
 +
                var D = g(this);
 +
                C.preventDefault();
 +
                if (D.is(":not(.active)")) {
 +
                    B.zoom.slideshowStop();
 +
                    B.zoom.showPhoto(D)
 +
                } else {
 +
                    if (B.thumbnails.isFullScreen()) {
 +
                        B.thumbnails.changeViewToBar();
 +
                        B.zoom.refreshSize()
 +
                    }
 +
                }
 +
            });
 +
            B.zoom.$btnPrev.add(B.zoom.$container.find(".left")).on({
 +
                click: function() {
 +
                    B.zoom.slideshowStop();
 +
                    B.zoom.showPrevPhoto()
 +
                }
 +
            });
 +
            B.zoom.$btnNext.add(B.zoom.$container.find(".right")).on({
 +
                click: function() {
 +
                    B.zoom.slideshowStop();
 +
                    B.zoom.showNextPhoto()
 +
                }
 +
            });
 +
            B.zoom.$container.find(".jgallery-close").on({
 +
                click: function() {
 +
                    B.hide()
 +
                }
 +
            });
 +
            B.zoom.$random.on({
 +
                click: function() {
 +
                    B.zoom.slideshowRandomToggle()
 +
                }
 +
            });
 +
            B.zoom.$resize.on({
 +
                click: function() {
 +
                    B.zoom.changeSize();
 +
                    B.zoom.slideshowPause()
 +
                }
 +
            });
 +
            B.zoom.$changeMode.on({
 +
                click: function() {
 +
                    B.zoom.changeMode()
 +
                }
 +
            });
 +
            B.zoom.$slideshow.on({
 +
                click: function() {
 +
                    B.zoom.slideshowPlayPause()
 +
                }
 +
            });
 +
            B.zoom.$container.find(".minimalize-thumbnails").on({
 +
                click: function() {
 +
                    B.thumbnails.toggle();
 +
                    B.zoom.refreshSize()
 +
                }
 +
            });
 +
            B.thumbnails.bindEvents()
 +
        },
 +
        isSlider: function() {
 +
            return b[this.intId].mode === "slider"
 +
        },
 +
        windowOnResize: function(B) {
 +
            B.data.jGallery.refreshDimensions()
 +
        },
 +
        refreshDimensions: function() {
 +
            this.zoom.refreshSize();
 +
            if (this.iconChangeAlbum instanceof o) {
 +
                this.iconChangeAlbum.refreshMenuHeight()
 +
            }
 +
            this.thumbnails.refreshNavigation()
 +
        },
 +
        getCanvasRatioWidthToHeight: function() {
 +
            var C;
 +
            var B;
 +
            if (this.thumbnails.isHorizontal()) {
 +
                C = this.$element.width();
 +
                B = this.$element.height() - this.thumbnails.getElement().outerHeight(true)
 +
            } else {
 +
                if (this.thumbnails.isVertical()) {
 +
                    C = this.$element.width() - this.thumbnails.getElement().outerWidth(true);
 +
                    B = this.$element.height()
 +
                } else {
 +
                    C = this.$element.width();
 +
                    B = this.$element.height()
 +
                }
 +
            }
 +
            return C / B
 +
        },
 +
        setUserOptions: function() {
 +
            b[this.intId].canResize ? this.zoom.$resize.show() : this.zoom.$resize.hide();
 +
            b[this.intId].canChangeMode ? this.zoom.$changeMode.show() : this.zoom.$changeMode.hide();
 +
            b[this.intId].mode === "standard" ? this.zoom.$changeMode.removeClass("fa-compress").addClass("fa-expand") : this.zoom.$changeMode.removeClass("fa-expand").addClass("fa-compress");
 +
            b[this.intId].canClose ? this.zoom.$container.find(".jgallery-close").show() : this.zoom.$container.find(".jgallery-close").hide();
 +
            if (!b[this.intId].thumbnails) {
 +
                this.thumbnails.getElement().addClass("inactive");
 +
                b[this.intId].thumbnailsPosition = ""
 +
            } else {
 +
                this.thumbnails.getElement().removeClass("inactive");
 +
                if (b[this.intId].thumbnailsPosition === "") {
 +
                    b[this.intId].thumbnailsPosition = m.thumbnailsPosition
 +
                }
 +
            }
 +
            b[this.intId].slideshow ? this.zoom.$slideshow.show() : this.zoom.$slideshow.hide();
 +
            failand(b[this.intId].slideshow, b[this.intId].slideshowCanRandom, b[this.intId].slideshowAutostart) ? this.zoom.$random.show() : this.zoom.$random.hide();
 +
            failand(b[this.intId].slideshow, b[this.intId].slideshowCanRandom, b[this.intId].slideshowRandom) ? this.zoom.$random.addClass("active") : this.zoom.$random.removeClass("active");
 +
            failand(b[this.intId].thumbnailsFullScreen, b[this.intId].thumbnails) ? this.zoom.$container.find(".full-screen").show() : this.zoom.$container.find(".full-screen").hide();
 +
            failand(b[this.intId].thumbnailsFullScreen, b[this.intId].thumbnails) ? this.zoom.$container.find(".change-album").show() : this.zoom.$container.find(".change-album").hide();
 +
            failand(b[this.intId].canMinimalizeThumbnails, b[this.intId].thumbnails) ? this.zoom.$container.find(".minimalize-thumbnails").show() : this.zoom.$container.find(".minimalize-thumbnails").hide();
 +
            failand(b[this.intId].hideThumbnailsOnInit, b[this.intId].thumbnails) ? this.thumbnails.hide() : this.thumbnails.show();
 +
            b[this.intId].titleExpanded ? this.zoom.$title.addClass("expanded") : this.zoom.$title.removeClass("expanded");
 +
            this.setColours({
 +
                strBg: b[this.intId].backgroundColor,
 +
                strText: b[this.intId].textColor
 +
            })
 +
        },
 +
        setColours: function(B) {
 +
            n.find('style[data-jgallery-id="' + this.intId + '"].colours').html(this.getCssForColours(B))
 +
        },
 +
        generateHtml: function() {
 +
            var E = b[this.intId].mode;
 +
            var D = E === "full-screen" ? "auto" : b[this.intId].width;
 +
            var B = E === "full-screen" ? "auto" : b[this.intId].height;
 +
            var C = '                <div class="jgallery jgallery-' + E + '" style="width: ' + D + "; height: " + B + '; display: none;" data-jgallery-id="' + this.intId + '">                    <div class="jgallery-thumbnails hidden">                        <div class="jgallery-container"><div class="jgallery-container-inner"></div></div>                        <span class="prev jgallery-btn hidden"><span class="fa fa-chevron-left ico"></span></span>                        <span class="next jgallery-btn hidden"><span class="fa fa-chevron-right ico"></span></span>                    </div>                    <div class="zoom-container">                        <div class="zoom before pt-perspective"></div>                        <div class="drag-nav hide"></div>                        <div class="left"></div>                        <div class="right"></div>                        <span class="fa fa-chevron-left prev jgallery-btn jgallery-btn-large"></span>                        <span class="fa fa-chevron-right next jgallery-btn jgallery-btn-large"></span>                        <span class="progress"></span>                        <div class="nav">                            <span class="fa resize jgallery-btn jgallery-btn-small"></span>                            <span class="fa change-mode jgallery-btn jgallery-btn-small"></span>                            <span class="fa fa-times jgallery-close jgallery-btn jgallery-btn-small"></span>                        </div>                        <div class="nav-bottom">                            <div class="icons">                                <span class="fa fa-play slideshow jgallery-btn jgallery-btn-small"></span>                                <span class="fa fa-random random jgallery-btn jgallery-btn-small inactive" style="display: none;"></span>                                <span class="fa fa-th full-screen jgallery-btn jgallery-btn-small"></span>                                <span class="fa fa-ellipsis-h minimalize-thumbnails jgallery-btn jgallery-btn-small inactive"></span>                            </div>                            <div class="title before"></div>                        </div>                    </div>                </div>';
 +
            if (E === "full-screen") {
 +
                this.$jgallery = g(b[this.intId].appendTo).append(C).children(":last-child")
 +
            } else {
 +
                if (b[this.intId].autostart) {
 +
                    this.$this.hide()
 +
                }
 +
                this.$jgallery = this.$this.after(C).next()
 +
            }
 +
        },
 +
        getCssForColours: function(D) {
 +
            D = g.extend({
 +
                strBg: "rgb( 0, 0, 0 )",
 +
                strText: "rgb( 255, 255, 255 )"
 +
            }, D);
 +
            var E = tinycolor(D.strBg).toRgb();
 +
            var B = E.r + E.g + E.b > 375 ? tinycolor.darken(D.strBg).toRgb() : tinycolor.lighten(D.strBg).toRgb();
 +
            var C = tinycolor(D.strText).toRgb();
 +
            return '                .jgallery[data-jgallery-id="' + this.intId + '"] {                  background: rgb(' + E.r + "," + E.g + ", " + E.b + ');                }                .jgallery[data-jgallery-id="' + this.intId + '"] .jgallery-btn {                  color: rgb(' + C.r + "," + C.g + ", " + C.b + ");                  text-shadow: 0 0 1px rgb(" + E.r + "," + E.g + ", " + E.b + ');                }                .jgallery[data-jgallery-id="' + this.intId + '"] .jgallery-btn.active {                  color: rgb(' + C.r + "," + C.g + ", " + C.b + ');                }                .jgallery[data-jgallery-id="' + this.intId + '"] .jgallery-btn:hover {                  text-shadow: none;                  text-shadow: 0 0 .15em rgba(' + C.r + "," + C.g + ", " + C.b + ",.75), 0 0 .45em rgba(" + C.r + "," + C.g + ", " + C.b + ',.5);                }                .jgallery[data-jgallery-id="' + this.intId + '"] .change-album .menu {                  background: rgb(' + B.r + "," + B.g + ", " + B.b + ');                }                .jgallery[data-jgallery-id="' + this.intId + '"] .zoom-container .nav-bottom .change-album > .title {                  background: rgb(' + B.r + "," + B.g + ", " + B.b + ");                  box-shadow: 4px 0 4px rgb(" + B.r + "," + B.g + ", " + B.b + ')                }                .jgallery[data-jgallery-id="' + this.intId + '"] .full-screen .change-album .menu {                  background: rgb(' + E.r + "," + E.g + ", " + E.b + ');                }                .jgallery[data-jgallery-id="' + this.intId + '"] .change-album .menu .item {                  border-color: rgb(' + E.r + "," + E.g + ", " + E.b + ");                  color: rgb(" + C.r + "," + C.g + ", " + C.b + ");                  background: rgb(" + B.r + "," + B.g + ", " + B.b + ');                }                .jgallery[data-jgallery-id="' + this.intId + '"] .full-screen .change-album .menu .item {                  border-color: rgb(' + B.r + "," + B.g + ", " + B.b + ");                  background: rgb(" + E.r + "," + E.g + ", " + E.b + ');                }                .jgallery[data-jgallery-id="' + this.intId + '"] .change-album .menu .item.active,                .jgallery[data-jgallery-id="' + this.intId + '"] .change-album .menu .item:hover {                  background: rgb(' + C.r + "," + C.g + ", " + C.b + ");                  color: rgb(" + E.r + "," + E.g + ", " + E.b + ');                }                .jgallery[data-jgallery-id="' + this.intId + '"] .zoom-container:not([data-size="fill"]) .jgallery-container {                  background: rgb(' + E.r + "," + E.g + ", " + E.b + ');                }                .jgallery[data-jgallery-id="' + this.intId + '"] .zoom-container .nav-bottom {                  background: rgb(' + B.r + "," + B.g + ", " + B.b + ");                  -webkit-box-shadow: 0 -3px rgba(" + B.r + "," + B.g + ", " + B.b + ", .5);                  box-shadow: 0 -3px rgba(" + B.r + "," + B.g + ", " + B.b + ', .5);                }                .jgallery[data-jgallery-id="' + this.intId + '"] .zoom-container .nav-bottom .icons,                .jgallery[data-jgallery-id="' + this.intId + '"] .zoom-container .nav-bottom .icons .fa {                  background: rgb(' + B.r + "," + B.g + ", " + B.b + ');                }                .jgallery[data-jgallery-id="' + this.intId + '"] .zoom-container .nav-bottom > .title {                  color: rgb(' + C.r + "," + C.g + ", " + C.b + ');                }                .jgallery[data-jgallery-id="' + this.intId + '"] .zoom-container .nav-bottom > .title.expanded {                  background: rgba(' + E.r + "," + E.g + ", " + E.b + ',.7);                }                .jgallery[data-jgallery-id="' + this.intId + '"] .zoom-container .drag-nav {                  background: rgb(' + B.r + "," + B.g + ", " + B.b + ");                  -webkit-box-shadow: 0 0 0 3px rgba(" + B.r + "," + B.g + ", " + B.b + ", .5);                  box-shadow: 0 0 0 3px rgba(" + B.r + "," + B.g + ", " + B.b + ', .5);                }                .jgallery[data-jgallery-id="' + this.intId + '"] .zoom-container .drag-nav .crop {                  -webkit-box-shadow: 0 0 0 3px rgba(' + C.r + "," + C.g + ", " + C.b + ", .5);                  box-shadow: 0 0 0 3px rgba(" + C.r + "," + C.g + ", " + C.b + ', .5);                }                .jgallery[data-jgallery-id="' + this.intId + '"] .jgallery-thumbnails {                  background: rgb(' + B.r + "," + B.g + ", " + B.b + ');                }                .jgallery[data-jgallery-id="' + this.intId + '"] .jgallery-thumbnails .ico {                  color: rgb(' + C.r + "," + C.g + ", " + C.b + ');                }                .jgallery[data-jgallery-id="' + this.intId + '"] .jgallery-thumbnails .jgallery-container {                  -webkit-box-shadow: 0 0 0 3px rgba(' + B.r + "," + B.g + ", " + B.b + ", .5);                  box-shadow: 0 0 0 3px rgba(" + B.r + "," + B.g + ", " + B.b + ', .5);                }                .jgallery[data-jgallery-id="' + this.intId + '"] .jgallery-thumbnails.full-screen .prev:before {                  background-image: -webkit-gradient(linear,left 0%,left 100%,from(rgba( ' + B.r + "," + B.g + ", " + B.b + ", 1 )),to(rgba( " + B.r + "," + B.g + ", " + B.b + ", 0)));                  background-image: -webkit-linear-gradient(top,rgba( " + B.r + "," + B.g + ", " + B.b + ", 1 ),0%,rgba( " + B.r + "," + B.g + ", " + B.b + ", 0),100%);                  background-image: -moz-linear-gradient(top,rgba( " + B.r + "," + B.g + ", " + B.b + ", 1 ) 0%,rgba( " + B.r + "," + B.g + ", " + B.b + ", 0) 100%);                  background-image: linear-gradient(to bottom,rgba( " + B.r + "," + B.g + ", " + B.b + ", 1 ) 0%,rgba( " + B.r + "," + B.g + ", " + B.b + ', 0) 100%);                  background-repeat: repeat-x;                }                .jgallery[data-jgallery-id="' + this.intId + '"] .jgallery-thumbnails.full-screen .next:before {                  background-image: -webkit-gradient(linear,left 0%,left 100%,from(rgba( ' + B.r + "," + B.g + ", " + B.b + ", 0)),to(rgba( " + B.r + "," + B.g + ", " + B.b + ", 1)));                  background-image: -webkit-linear-gradient(top,rgba( " + B.r + "," + B.g + ", " + B.b + ", 0),0%,rgba( " + B.r + "," + B.g + ", " + B.b + ", 1),100%);                  background-image: -moz-linear-gradient(top,rgba( " + B.r + "," + B.g + ", " + B.b + ", 0) 0%,rgba( " + B.r + "," + B.g + ", " + B.b + ", 1) 100%);                  background-image: linear-gradient(to bottom,rgba( " + B.r + "," + B.g + ", " + B.b + ", 0) 0%,rgba( " + B.r + "," + B.g + ", " + B.b + ', 1) 100%);                  background-repeat: repeat-x;                }                .jgallery[data-jgallery-id="' + this.intId + '"] .jgallery-thumbnails.images a:after {                  background: rgb(' + B.r + "," + B.g + ", " + B.b + ');                }                .jgallery[data-jgallery-id="' + this.intId + '"] .jgallery-thumbnails.full-screen .prev,                .jgallery[data-jgallery-id="' + this.intId + '"] .jgallery-thumbnails.full-screen .next {                  background: rgb(' + B.r + "," + B.g + ", " + B.b + ');                }                .jgallery[data-jgallery-id="' + this.intId + '"] .jgallery-thumbnails.square a {                  background: rgb(' + C.r + "," + C.g + ", " + C.b + ");                  color: rgb(" + E.r + "," + E.g + ", " + E.b + ');                }                .jgallery[data-jgallery-id="' + this.intId + '"] .overlayContainer .overlay {                  background: rgba(' + E.r + "," + E.g + ", " + E.b + ",.8);                  color: rgb(" + C.r + "," + C.g + ", " + C.b + ');                }                .jgallery[data-jgallery-id="' + this.intId + '"] .overlayContainer .imageLoaderPositionAbsolute:after {                  border-color: rgba(' + C.r + "," + C.g + ", " + C.b + ', .5 );                }                .jgallery[data-jgallery-id="' + this.intId + '"] .jgallery-thumbnails-horizontal .prev {                  background: rgb(' + B.r + "," + B.g + ", " + B.b + ');                }                .jgallery[data-jgallery-id="' + this.intId + '"] .jgallery-thumbnails-horizontal .prev:before {                  background-image: -webkit-gradient(linear,0% top,100% top,from(rgba( ' + B.r + "," + B.g + ", " + B.b + ", 1 )),to(rgba( " + B.r + "," + B.g + ", " + B.b + ", 0 )));                  background-image: -webkit-linear-gradient(left,color-stop(rgba( " + B.r + "," + B.g + ", " + B.b + ", 1 ) 0%),color-stop(rgba( " + B.r + "," + B.g + ", " + B.b + ", 0 ) 100%));                  background-image: -moz-linear-gradient(left,rgba( " + B.r + "," + B.g + ", " + B.b + ", 1 ) 0%,rgba( " + B.r + "," + B.g + ", " + B.b + ", 0 ) 100%);                  background-image: linear-gradient(to right,rgba( " + B.r + "," + B.g + ", " + B.b + ", 1 ) 0%,rgba( " + B.r + "," + B.g + ", " + B.b + ', 0 ) 100%);                  background-repeat: repeat-x;                }                .jgallery[data-jgallery-id="' + this.intId + '"] .jgallery-thumbnails-horizontal .next {                  background: rgb(' + B.r + "," + B.g + ", " + B.b + ');                }                .jgallery[data-jgallery-id="' + this.intId + '"] .jgallery-thumbnails-horizontal .next:before {                  background-image: -webkit-gradient(linear,0% top,100% top,from(rgba( ' + B.r + "," + B.g + ", " + B.b + ", 0 )),to(rgba( " + B.r + "," + B.g + ", " + B.b + ", 1 )));                  background-image: -webkit-linear-gradient(left,color-stop(rgba( " + B.r + "," + B.g + ", " + B.b + ", 0 ) 0%),color-stop(rgba( " + B.r + "," + B.g + ", " + B.b + ", 1 ) 100%));                  background-image: -moz-linear-gradient(left,rgba( " + B.r + "," + B.g + ", " + B.b + ", 0 ) 0%,rgba( " + B.r + "," + B.g + ", " + B.b + ", 1 ) 100%);                  background-image: linear-gradient(to right,rgba( " + B.r + "," + B.g + ", " + B.b + ", 0 ) 0%,rgba( " + B.r + "," + B.g + ", " + B.b + ', 1 ) 100%);                  background-repeat: repeat-x;                }                .jgallery[data-jgallery-id="' + this.intId + '"] .jgallery-thumbnails-vertical .prev {                  background: rgb(' + B.r + "," + B.g + ", " + B.b + ');                }                .jgallery[data-jgallery-id="' + this.intId + '"] .jgallery-thumbnails-vertical .prev:before {                  background-image: -webkit-gradient(linear,left 0%,left 100%,from(rgba( ' + B.r + "," + B.g + ", " + B.b + ", 1 )),to(rgba( " + B.r + "," + B.g + ", " + B.b + ", 0 )));                  background-image: -webkit-linear-gradient(top,rgba( " + B.r + "," + B.g + ", " + B.b + ", 1 ),0%,rgba( " + B.r + "," + B.g + ", " + B.b + ", 0 ),100%);                  background-image: -moz-linear-gradient(top,rgba( " + B.r + "," + B.g + ", " + B.b + ", 1 ) 0%,rgba( " + B.r + "," + B.g + ", " + B.b + ", 0 ) 100%);                  background-image: linear-gradient(to bottom,rgba( " + B.r + "," + B.g + ", " + B.b + ", 1 ) 0%,rgba( " + B.r + "," + B.g + ", " + B.b + ', 0 ) 100%);                  background-repeat: repeat-x;                }                .jgallery[data-jgallery-id="' + this.intId + '"] .jgallery-thumbnails-vertical .next {                  background: rgb(' + B.r + "," + B.g + ", " + B.b + ');                }                .jgallery[data-jgallery-id="' + this.intId + '"] .jgallery-thumbnails-vertical .next:before {                  background-image: -webkit-gradient(linear,left 0%,left 100%,from(rgba( ' + B.r + "," + B.g + ", " + B.b + ", 0 )),to(rgba( " + B.r + "," + B.g + ", " + B.b + ", 1 )));                  background-image: -webkit-linear-gradient(top,rgba( " + B.r + "," + B.g + ", " + B.b + ", 0 ),0%,rgba( " + B.r + "," + B.g + ", " + B.b + ", 1 ),100%);                  background-image: -moz-linear-gradient(top,rgba( " + B.r + "," + B.g + ", " + B.b + ", 0 ) 0%,rgba( " + B.r + "," + B.g + ", " + B.b + ", 1 ) 100%);                  background-image: linear-gradient(to bottom,rgba( " + B.r + "," + B.g + ", " + B.b + ", 0 ) 0%,rgba( " + B.r + "," + B.g + ", " + B.b + ', 1 ) 100%);                  background-repeat: repeat-x;                }                .jgallery.has-title.jgallery-slider[data-jgallery-id="' + this.intId + '"] .zoom-container .nav-bottom,                .jgallery.has-title.jgallery-slider[data-jgallery-id="' + this.intId + '"] .zoom-container .nav-bottom > .title.expanded {                  background: rgba(' + E.r + "," + E.g + ", " + E.b + ",.7);                  color: rgb(" + C.r + "," + C.g + ", " + C.b + ');                }                .jgallery.jgallery-slider[data-jgallery-id="' + this.intId + '"] .zoom-container .nav-bottom .jgallery-btn {                  background: rgba(' + E.r + "," + E.g + ", " + E.b + ",.8);                  color: rgb(" + C.r + "," + C.g + ", " + C.b + ");                }            "
 +
        }
 +
    };
 +
    g.fn.jGallery = function(B) {
 +
        return this.each(function() {
 +
            var C = g(this);
 +
            g(function() {
 +
                var D = failand(typeof B !== "undefined", typeof B.mode !== "undefined");
 +
                var E = m;
 +
                if (failand(C.is("[data-jgallery-id]"), D)) {
 +
                    delete B.mode;
 +
                    D = false
 +
                }
 +
                if (C.is("[data-jgallery-id]")) {
 +
                    E = b[C.attr("data-jgallery-id")]
 +
                }
 +
                if (failand(D, B.mode === "standard")) {
 +
                    E = g.extend({}, E, j, B, f)
 +
                } else {
 +
                    if (failand(D, B.mode === "slider")) {
 +
                        E = g.extend({}, E, A, B, a)
 +
                    } else {
 +
                        E = g.extend({}, E, B)
 +
                    }
 +
                }
 +
                if (!C.is("[data-jgallery-id]")) {
 +
                    b[++c] = E;
 +
                    y[c] = new p(C)
 +
                } else {
 +
                    y[C.attr("data-jgallery-id")].update(E);
 +
                    b[C.attr("data-jgallery-id")] = E
 +
                }
 +
            })
 +
        })
 +
    };
 +
    g.jGalleryOptions = function() {
 +
        return b
 +
    };
 +
    g.jGalleryTransitions = function() {
 +
        return w
 +
    };
 +
    var t = 0;
 +
    var d = function(B) {
 +
        if (B.is("[data-advanced-animation-id]")) {
 +
            return
 +
        }
 +
        this.cols = 1;
 +
        this.rows = 1;
 +
        this.direction = "forward";
 +
        this.animation = true;
 +
        this.$element = B;
 +
        this.$element.filter(":not( [data-advanced-animation-id] )").attr("data-advanced-animation-id", ++t);
 +
        this.$element.find(".pt-item").wrap('<div class="pt-page" />');
 +
        this.$element.wrapInner('<div class="pt-part" />');
 +
        this.generateHtml();
 +
        this._showParts(this.$element.find(".pt-part"), 1)
 +
    };
 +
    d.prototype = {
 +
        next: function() {
 +
            var B = this.$element.find(".pt-part").eq(this.direction === "backward" ? -1 : 0).find(".pt-page-current:not(.pt-page-prev)").next();
 +
            if (B.length) {
 +
                this.show(B)
 +
            } else {
 +
                this.show(this.$element.find(".pt-part").eq(this.direction === "backward" ? -1 : 0).find(".pt-page").eq(0))
 +
            }
 +
        },
 +
        show: function(C, B) {
 +
            var D = C.prevAll().length + 1;
 +
            if (C.is(".pt-page-current:not(.pt-page-prev)")) {
 +
                return
 +
            }
 +
            B = g.extend({}, {
 +
                animation: true
 +
            }, B);
 +
            this.animation = B.animation;
 +
            this._waveJumpToEnd();
 +
            if (this.animation) {
 +
                this._runWave(D)
 +
            } else {
 +
                this._showParts(this.$element.find(".pt-part"), D)
 +
            }
 +
            this.intPrevPtPageNumber = D
 +
        },
 +
        setQuantityParts: function(C, B) {
 +
            this.cols = C;
 +
            this.rows = B;
 +
            this.generateHtml()
 +
        },
 +
        setDuration: function(D) {
 +
            var C = this.$element.attr("data-advanced-animation-id");
 +
            var B = n.find('style[data-advanced-animation-id="' + C + '"]');
 +
            this.duration = D;
 +
            if (v()) {
 +
                return
 +
            }
 +
            if (B.length === 0) {
 +
                B = n.append('<style type="text/css" data-advanced-animation-id="' + C + '" />').children(":last-child")
 +
            }
 +
            B.html('                [data-advanced-animation-id="' + C + '"] .pt-page {                    -webkit-animation-duration: ' + D + ";                    -moz-animation-duration: " + D + ";                    animation-duration: " + D + ";                }            ")
 +
        },
 +
        setHideEffect: function(B) {
 +
            this.prevHideEffect = this.hideEffect;
 +
            this.hideEffect = B;
 +
            if (/moveTo|rotateRoom|rotateCarousel|rotateSlideOut/.test(B)) {
 +
                this.$element.find(".pt-part").addClass("hide-overflow")
 +
            } else {
 +
                this.$element.find(".pt-part").removeClass("hide-overflow")
 +
            }
 +
        },
 +
        setShowEffect: function(B) {
 +
            this.prevShowEffect = this.showEffect;
 +
            this.showEffect = B
 +
        },
 +
        setDirection: function(B) {
 +
            this.direction = B
 +
        },
 +
        _runWave: function(B) {
 +
            this.$element.find(".pt-part").addClass("in-queue");
 +
            this._showNextPart(B)
 +
        },
 +
        _waveJumpToEnd: function() {
 +
            clearTimeout(this.showPartsTimeout);
 +
            if (typeof this.intPrevPtPageNumber !== "undefined") {
 +
                this._showParts(this.$element.find(".pt-part.in-queue").removeClass("in-queue"), this.intPrevPtPageNumber)
 +
            }
 +
        },
 +
        _showNextPart: function(C) {
 +
            var B = this;
 +
            var D = this.$element.find(".pt-part.in-queue").eq(this.direction === "backward" ? -1 : 0);
 +
            if (D.length === 0) {
 +
                return
 +
            }
 +
            this._showParts(D.removeClass("in-queue"), C);
 +
            if (D.length === 0) {
 +
                return
 +
            }
 +
            clearTimeout(this.showPartsTimeout);
 +
            this.showPartsTimeout = setTimeout(function() {
 +
                B._showNextPart(C)
 +
            }, parseFloat(this.duration) * 1000 * 0.25 / Math.max(1, this.$element.find(".pt-part").length - 1))
 +
        },
 +
        _showParts: function(C, B) {
 +
            C.find(".pt-page-current.pt-page-prev").removeClass("pt-page-prev").removeClass("pt-page-current");
 +
            C.find(".pt-page-current").addClass("pt-page-prev");
 +
            C.find(".pt-page:nth-child(" + B + ")").addClass("pt-page-current");
 +
            C.find(".pt-page").removeClass(this.hideEffect).removeClass(this.showEffect);
 +
            if (typeof this.prevHideEffect !== "undefined") {
 +
                C.find(".pt-page").removeClass(this.prevHideEffect)
 +
            }
 +
            if (typeof this.prevShowEffect !== "undefined") {
 +
                C.find(".pt-page").removeClass(this.prevShowEffect)
 +
            }
 +
            if (this.animation) {
 +
                C.find(".pt-page-prev").addClass(this.hideEffect);
 +
                C.find(".pt-page-current:not(.pt-page-prev)").addClass(this.showEffect)
 +
            }
 +
        },
 +
        hideActive: function() {
 +
            this.$element.find(".pt-page-current").addClass("pt-page-prev").addClass(this.hideEffect)
 +
        },
 +
        generateHtml: function() {
 +
            var D;
 +
            var C;
 +
            var B;
 +
            this.$element.html(this.$element.find(".pt-part").eq(0).html());
 +
            B = this.$element.html();
 +
            this.$element.children(".pt-part").remove();
 +
            for (C = 0; C < this.rows; C++) {
 +
                for (D = 0; D < this.cols; D++) {
 +
                    this.$element.append('<div class="pt-part pt-perspective" data-col-no="' + D + '" data-row-no="' + C + '" style="position: absolute;"></div>').children(":last-child").html(B).find(".pt-item")
 +
                }
 +
            }
 +
            this.setPositionParts();
 +
            this.$element.children(":not(.pt-part)").remove()
 +
        },
 +
        setPositionParts: function() {
 +
            var C = this;
 +
            var E = this.$element.outerWidth();
 +
            var D = this.$element.outerHeight();
 +
            var F = E / this.cols;
 +
            var B = D / this.rows;
 +
            this.$element.find(".pt-part").each(function() {
 +
                var I = g(this);
 +
                var H = I.attr("data-col-no");
 +
                var G = I.attr("data-row-no");
 +
                I.css({
 +
                    left: C.$element.outerWidth() * (100 / C.cols * H) / 100 + "px",
 +
                    top: C.$element.outerHeight() * (100 / C.rows * G) / 100 + "px",
 +
                    width: C.$element.outerWidth() * (100 / C.cols) / 100 + 1 + "px",
 +
                    height: C.$element.outerHeight() * (100 / C.rows) / 100 + 1 + "px"
 +
                }).find(".pt-item").css({
 +
                    width: E,
 +
                    height: D,
 +
                    left: -F * H,
 +
                    top: -B * G
 +
                })
 +
            })
 +
        }
 +
    };
 +
    g.fn.overlay = function(B) {
 +
        var C = {
 +
            show: false,
 +
            hide: false,
 +
            showLoader: false,
 +
            hideLoader: false,
 +
            fadeIn: true,
 +
            fadeOut: true,
 +
            fadeInLoader: true,
 +
            fadeOutLoader: true,
 +
            afterInit: function() {}
 +
        };
 +
        B = g.extend({}, C, B);
 +
        this.each(function() {
 +
            var K = g(this),
 +
                L, J, I = K.is(".overlayContainer:has(.overlay)"),
 +
                H = function() {
 +
                    var P = Math.max(K.offset().top, g("body, html").scrollTop()),
 +
                        O = Math.min(K.offset().top + K.outerHeight(), g("body, html").scrollTop() + g(window).height()),
 +
                        N = P + (O - P) / 2 - K.offset().top;
 +
                    J.css({
 +
                        top: N + "px"
 +
                    })
 +
                },
 +
                F = function() {
 +
                    K.children(".overlay").css({
 +
                        width: K.outerWidth(),
 +
                        height: K.is("body") ? g("html").outerHeight() : K.outerHeight()
 +
                    })
 +
                },
 +
                G = function() {
 +
                    B.fadeIn ? L.fadeIn(500) : L.show()
 +
                },
 +
                E = function() {
 +
                    B.fadeOut ? L.fadeOut(500) : L.hide()
 +
                },
 +
                M = function() {
 +
                    B.fadeInLoader ? J.not(":visible").fadeIn(500) : J.not(":visible").show()
 +
                },
 +
                D = function() {
 +
                    B.fadeOutLoader ? J.filter(":visible").fadeOut(500) : J.filter(":visible").hide()
 +
                };
 +
            g(window).scroll(function() {
 +
                H()
 +
            });
 +
            g(window).resize(function() {
 +
                H();
 +
                F()
 +
            });
 +
            if (K.is("table")) {
 +
                if (K.parent().is(".overlayContainer")) {
 +
                    K = K.parent()
 +
                }
 +
            }
 +
            if (!I) {
 +
                if (K.is("table")) {
 +
                    K.wrap("<div></div>");
 +
                    K = K.parent()
 +
                }
 +
                K.addClass("overlayContainer");
 +
                K.append('<div class="overlay" style="display: none;"><div class="imageLoaderPositionAbsolute" style="display: none;"></div></div>');
 +
                B.afterInit()
 +
            }
 +
            L = K.children(".overlay");
 +
            J = K.find(".imageLoaderPositionAbsolute");
 +
            L.stop(false, true);
 +
            J.stop(false, true);
 +
            if (B.show) {
 +
                G()
 +
            } else {
 +
                if (B.hide) {
 +
                    E()
 +
                }
 +
            }
 +
            if (B.showLoader) {
 +
                M()
 +
            } else {
 +
                if (B.hideLoader) {
 +
                    D()
 +
                }
 +
            }
 +
            H();
 +
            F()
 +
        })
 +
    };
 +
    g.fn.jLoader = function(B) {
 +
        B = g.extend({
 +
            interval: 1000,
 +
            skip: ":not(*)",
 +
            start: function() {
 +
                g("body").overlay({
 +
                    fadeIn: false,
 +
                    fadeOut: false,
 +
                    show: true,
 +
                    showLoader: true
 +
                });
 +
                g("body").show()
 +
            },
 +
            success: function() {
 +
                g("body").overlay({
 +
                    hide: true
 +
                })
 +
            },
 +
            progress: function() {}
 +
        }, B);
 +
        this.each(function() {
 +
            var H = g(this);
 +
            var F = g();
 +
            var D = g();
 +
            var G;
 +
            var E = 0;
 +
 +
            function C() {
 +
                var J = true;
 +
                var L = 0;
 +
                var I = 0;
 +
                var K;
 +
                D.each(function() {
 +
                    L++;
 +
                    if (g(this)[0].complete) {
 +
                        I++
 +
                    } else {
 +
                        J = false
 +
                    }
 +
                    if (L === E) {
 +
                        K = parseInt(I * 100 / E);
 +
                        B.progress({
 +
                            percent: K
 +
                        });
 +
                        if (J) {
 +
                            clearTimeout(G);
 +
                            F.remove();
 +
                            B.success()
 +
                        } else {
 +
                            G = setTimeout(C, B.interval)
 +
                        }
 +
                    }
 +
                })
 +
            }
 +
            H.append('<div class="jLoaderTmp" style="position: absolute; width: 0; height: 0; line-height: 0; font-size: 0; visibility: hidden; overflow: hidden; z-index: -1;"></div>');
 +
            F = H.children(".jLoaderTmp:last-child");
 +
            g(H).add(H.find("*")).not(B.skip).each(function() {
 +
                var I;
 +
                if (g(this).css("background-image") !== "none") {
 +
                    I = g(this).css("background-image");
 +
                    if (/url/.exec(I)) {
 +
                        I = I.replace('"', "").replace("'", "").replace(" ", "").replace("url(", "").replace(")", "");
 +
                        F.append('<img src="' + I + '">')
 +
                    }
 +
                }
 +
            });
 +
            D = H.find("img:not( " + B.skip + ")");
 +
            if (H.is("img")) {
 +
                if (!H.is(B.skip)) {
 +
                    D = D.add(H)
 +
                }
 +
            }
 +
            E = parseInt(D.length);
 +
            B.start();
 +
            C()
 +
        })
 +
    };
 +
    g.fn.outerHtml = function() {
 +
        return (!this.length) ? this : (this[0].outerHTML || (function(B) {
 +
            var D = document.createElement("div");
 +
            D.appendChild(B.cloneNode(true));
 +
            var C = D.innerHTML;
 +
            D = null;
 +
            return C
 +
        })(this[0]))
 +
    };
 +
 +
    function u(B) {
 +
        B = g.extend({}, {
 +
            stateObj: {},
 +
            title: r.html(),
 +
            path: ""
 +
        }, B);
 +
        console.log(document.location.href.split("#")[0] + "#" + B.path);
 +
        window.history.pushState(B.stateObj, B.title, document.location.href.split("#")[0] + "#" + B.path)
 +
    }
 +
 +
    function k() {
 +
        var D = false;
 +
        if (navigator.appName === "Microsoft Internet Explorer") {
 +
            var B = navigator.userAgent;
 +
            var C = new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");
 +
            if (C.exec(B) !== null) {
 +
                D = true
 +
            }
 +
        }
 +
        return D
 +
    }
 +
 +
    function z() {
 +
        var D = false;
 +
        if (navigator.appName === "Microsoft Internet Explorer") {
 +
            var B = navigator.userAgent;
 +
            var C = new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");
 +
            if (C.exec(B) !== null) {
 +
                D = parseFloat(RegExp.$1);
 +
                D = D < 8
 +
            }
 +
        }
 +
        return D
 +
    }
 +
 +
    function v() {
 +
        var D = false;
 +
        if (navigator.appName === "Microsoft Internet Explorer") {
 +
            var B = navigator.userAgent;
 +
            var C = new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");
 +
            if (C.exec(B) !== null) {
 +
                D = parseFloat(RegExp.$1);
 +
                D = D < 9
 +
            }
 +
        }
 +
        return D
 +
    }
 +
})(jQuery);
</script>
</script>
</html>
</html>

Revision as of 09:02, 17 October 2014