YUI.add("fl-event-move",function(t){var e={_isEndEvent:!1,on:function(t,e,i){this.type.indexOf("end")>-1&&(this._isEndEvent=!0),e._direction=this.type.replace("gesturemove","").replace("end",""),window.navigator.msPointerEnabled?(e._startHandle=t.on("MSPointerDown",this._onStart,this,t,e,i),e._moveHandle=t.on("MSPointerMove",this._onMove,this,t,e,i),e._endHandle=t.on("MSPointerUp",this._onEnd,this,t,e,i)):(e._startHandle=t.on("gesturemovestart",this._onStart,null,this,t,e,i),e._moveHandle=t.on("gesturemove",this._onMove,null,this,t,e,i),e._endHandle=t.on("gesturemoveend",this._onEnd,{standAlone:!0},this,t,e,i))},detach:function(t,e,i){e._startHandle.detach(),e._startHandle=null,e._moveHandle.detach(),e._moveHandle=null,e._endHandle.detach(),e._endHandle=null},_onStart:function(t,e,i,s){i._doMove=null,i._startX=t.pageX,i._startY=t.pageY},_onMove:function(t,e,i,s){this._checkDirection(t,i)?i._doMove=!0:i._doMove=!1,i._doMove&&!this._isEndEvent&&s.fire(t)},_onEnd:function(t,e,i,s){i._doMove&&this._isEndEvent&&(t.startPageX=i._startX,t.startPageY=i._startY,s.fire(t)),i._doMove=null},_checkDirection:function(t,e){var i=Math.abs(e._startX-t.pageX),s=Math.abs(e._startY-t.pageY);return s>i&&e._startY>t.pageY&&"vertical"==e._direction||(s>i&&e._startYt.pageX&&"horizontal"==e._direction||s'),this._textToggleLink.addClass("fl-slideshow-caption-toggle"),this._textToggleLink.set("innerHTML",e.get("captionMoreLinkText")),i.appendChild(this._textToggleLink)},bindUI:function(){this.get("root").on("imageLoadComplete",t.bind(this._setText,this)),this._textToggleLink.on("click",t.bind(this._toggleText,this))},_setText:function(){var t=this.get("root"),e=t.imageInfo.caption,i=t.get("captionTextLength"),s=this.get("contentBox");return t.imageInfo.caption&&""!==t.imageInfo.caption?(i>-1?!this._textToggled&&it.imageIndex?i="prev":t.lastImageIndex=s.albumInfo.images.length?0:i,s.pause(),s._hideLoadingImage(),s._showLoadingImageWithDelay(),t.FL.SlideshowImageLoader.removeGroup(this._nextImage.get("loadGroup")),this._nextImage.once("loadComplete",s._hideLoadingImage,s),this._nextImage.load(s.albumInfo.images[i])},_gesturesEndComplete:function(){var t=this.get("root"),e=0;this._nextImage._imageInfo&&(e=this._nextImage._imageInfo.index,this._swapImageRefs(),this._imageInfo=t.albumInfo.images[e],t.loadImage(e))},_swapImageRefs:function(){var t=this._activeImage;this._activeImage=this._nextImage,this._nextImage=t,this._nextImage._imageInfo&&(this._nextImage.unload(),this._nextImage.get("boundingBox").setStyle("left","-9999px")),this._gestures&&(this._gestures.set("activeItem",this._activeImage.get("boundingBox")),this._gestures.set("nextItem",this._nextImage.get("boundingBox")))}},{CSS_PREFIX:"fl-slideshow-frame",ATTRS:{imageConfig:{value:null},touchSupport:{value:!1}}}),t.namespace("FL").SlideshowFullscreen=t.Base.create("fl-slideshow-fullscreen",t.Plugin.Base,[],{active:!1,_closeMessage:null,_closeMessageTimer:null,_initialStyles:{position:"static",top:"0px",left:"0px"},initializer:function(){var e=this.get("host"),i=e.get("boundingBox"),s=this;i.addClass("fl-fullscreen-enabled"),t.FL.SlideshowFullscreen.OS_SUPPORT?(document.addEventListener("fullscreenchange",function(){s._osChange()},!1),document.addEventListener("mozfullscreenchange",function(){s._osChange()},!1),document.addEventListener("webkitfullscreenchange",function(){s._osChange()},!1)):this._renderCloseMessage()},toggle:function(){this.active?this.exit():this.enter()},enter:function(){t.FL.SlideshowFullscreen.OS_SUPPORT?this._osEnter():this._browserEnter()},exit:function(){t.FL.SlideshowFullscreen.OS_SUPPORT?this._osExit():this._browserExit()},_osEnter:function(){var t=this.get("host").get("boundingBox")._node;t.webkitRequestFullScreen?t.webkitRequestFullScreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.requestFullScreen&&t.requestFullScreen()},_osExit:function(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},_osChange:function(){var t=this.get("host");t.frame&&t.frame._transitioning&&t.frame._transitionComplete(),this.active?this._exit():this._enter()},_browserEnter:function(){var e=this.get("host").get("boundingBox");this._initialStyles={position:e.getStyle("position"),top:e.getStyle("top"),left:e.getStyle("left"),zIndex:e.getStyle("zIndex")},e.setStyles({position:"fixed",top:"0px",left:"0px",zIndex:1e4}),t.Node.one("body").on("fl-fullscreen|keydown",t.bind(this._onKey,this)),this._showCloseMessage(),this._enter()},_browserExit:function(){var e=this.get("host").get("boundingBox");e.setStyles({position:this._initialStyles.position,top:this._initialStyles.top,left:this._initialStyles.left,zIndex:this._initialStyles.zIndex}),t.Node.one("body").detach("fl-fullscreen|keydown"),this._hideCloseMessage(),this._exit()},_enter:function(){var t=this.get("host"),e=t.get("boundingBox");e.addClass("fl-fullscreen-active"),this.active=!0,t.resize()},_exit:function(){var t=this.get("host"),e=t.get("boundingBox");e.removeClass("fl-fullscreen-active"),this.active=!1,t.resize()},_onKey:function(t){if(27==t.keyCode)return this.exit(),!1},_renderCloseMessage:function(){this._closeMessage=t.Node.create('
'),this._closeMessage.set("innerHTML",'Press the "esc" button to exit fullscreen mode.'),this._closeMessage.setStyle("display","none"),this.get("host").get("boundingBox").insert(this._closeMessage)},_showCloseMessage:function(){this._closeMessageTimer&&(this._closeMessageTimer.cancel(),this._closeMessageTimer=null),this._closeMessage.show(!0),this._closeMessageTimer=t.later(4e3,this,this._hideCloseMessage)},_hideCloseMessage:function(){this._closeMessageTimer&&(this._closeMessageTimer.cancel(),this._closeMessageTimer=null),this._closeMessage.hide(!0)}},{NS:"fullscreen",OS_SUPPORT:function(){var t=document.documentElement;return t.webkitRequestFullScreen||t.mozRequestFullScreen||t.requestFullScreen}()}),t.namespace("FL").SlideshowGestures=t.Base.create("fl-slideshow-gestures",t.Base,[],{_startX:null,_startY:null,_touchMoving:!1,_moving:!1,_movingDirection:null,_transitioning:!1,initializer:function(){this.enable()},enable:function(){var e=this.get("id"),i=this.get("direction"),s=this.get("activeItem"),n=this.get("nextItem");s.on(e+"|gesturemovestart",t.bind(this._onStart,this)),n.on(e+"|gesturemovestart",t.bind(this._onStart,this)),n.on(e+"|transitionend",t.bind(this._onEndComplete,this)),n.on(e+"|oTransitionEnd",t.bind(this._onEndComplete,this)),n.on(e+"|webkitTransitionEnd",t.bind(this._onEndComplete,this)),"horizontal"==i?(s.on(e+"|gesturemovehorizontal",t.bind(this._onMoveHorizontal,this)),s.on(e+"|gesturemovehorizontalend",t.bind(this._onEndHorizontal,this)),n.on(e+"|gesturemovehorizontal",t.bind(this._onMoveHorizontal,this)),n.on(e+"|gesturemovehorizontalend",t.bind(this._onEndHorizontal,this))):(s.on(e+"|gesturemovevertical",t.bind(this._onMoveVertical,this)),s.on(e+"|gesturemoveverticalend",t.bind(this._onEndVertical,this)),n.on(e+"|gesturemovevertical",t.bind(this._onMoveVertical,this)),n.on(e+"|gesturemoveverticalend",t.bind(this._onEndVertical,this)))},disable:function(){var t=this.get("id"),e=this.get("activeItem"),i=this.get("nextItem");e.detach(t+"|*"),i.detach(t+"|*")},_onStart:function(t){var e=this.get("direction");this._transitioning&&this._onEndComplete(),"horizontal"==e?this._startX=t.pageX:this._startY=t.pageY,this.fire("start")},_onMoveHorizontal:function(t){var e=this._startX-t.pageX,i=this.get("activeItem"),s=this.get("nextItem"),n=parseInt(i.getComputedStyle("width"),10),a=e<0?Math.abs(e):-e,o=e<0?"prev":"next";t.preventDefault(),this._moving&&this._movingDirection==o||(i.setStyle("left",0),s.setStyles({opacity:1,left:e<0?-n:n}),this._moving=!0,this._movingDirection=o,this.fire("moveStart",{direction:o})),i.setStyle("-webkit-transform","translate("+a+"px, 0px) translateZ(0px)"),i.setStyle("-ms-transform","translate("+a+"px, 0px) translateZ(0px)"),s.setStyle("-webkit-transform","translate("+a+"px, 0px) translateZ(0px)"),s.setStyle("-ms-transform","translate("+a+"px, 0px) translateZ(0px)"),this.fire("move")},_onMoveVertical:function(t){var e=this._startY-t.pageY,i=this.get("activeItem"),s=this.get("nextItem"),n=parseInt(i.getComputedStyle("height"),10),a=e<0?Math.abs(e):-e,o=e<0?"prev":"next";t.preventDefault(),this._moving&&this._movingDirection==o||(i.setStyle("top",0),s.setStyles({opacity:1,left:"auto",top:e<0?-n:n}),this._moving=!0,this._movingDirection=o,this.fire("moveStart",{direction:o})),i.setStyle("-webkit-transform","translate(0px, "+a+"px) translateZ(0px)"),i.setStyle("-ms-transform","translate(0px, "+a+"px) translateZ(0px)"),s.setStyle("-webkit-transform","translate(0px, "+a+"px) translateZ(0px)"),s.setStyle("-ms-transform","translate(0px, "+a+"px) translateZ(0px)"),this.fire("move")},_onEndHorizontal:function(t){if(this._moving){var e=this._startX-t.pageX,i=this.get("activeItem"),s=this.get("nextItem"),n=parseInt(s.getComputedStyle("width"),10),a=e<0?n:-n;i.transition({transform:"translate("+a+"px, 0px)"}),s.transition({transform:"translate("+a+"px, 0px)"}),this._transitioning=!0,this.fire("end")}},_onEndVertical:function(t){if(this._moving){var e=this._startY-t.pageY,i=this.get("activeItem"),s=this.get("nextItem"),n=parseInt(s.getComputedStyle("height"),10),a=e<0?n:-n;i.transition({transform:"translate(0px, "+a+"px)"}),s.transition({transform:"translate(0px, "+a+"px)"}),this._transitioning=!0,this.fire("end")}},_onEndComplete:function(){var t=this.get("direction"),e=this.get("activeItem"),i=this.get("nextItem");e.setStyles({opacity:0,"-webkit-transform":"","-webkit-transition":"","-ms-transform":"","-ms-transition":""}),i.setStyles({"-webkit-transform":"","-webkit-transition":"","-ms-transform":"","-ms-transition":""}),"horizontal"==t?(e.setStyle("left","-9999px"),i.setStyle("left","0px")):(e.setStyle("top","-9999px"),i.setStyle("top","0px")),this.set("activeItem",i),this.set("nextItem",e),this._moving=!1,this._movingDirection=null,this._transitioning=!1,this.fire("endComplete")}},{ATTRS:{direction:{value:"horizontal"},activeItem:{value:null},nextItem:{value:null}}}),t.namespace("FL").SlideshowImageLoader={_loading:!1,_currentImage:null,_currentImageData:null,_queue:[],add:function(t,e,i,s){var n={group:t,src:e,callback:i};s?this._queue.unshift(n):this._queue.push(n),this._loading||this._load()},removeGroup:function(t){for(var e=this._queue.length-1;e>-1;e--)this._queue[e].group==t&&this._queue.splice(e,1);this._currentImageData&&this._currentImageData.group==t&&(this._currentImage.detachAll(),this._currentImage=null,this._currentImageData=null,this._queue.length>0?this._load():this._loading=!1)},_load:function(){this._loading=!0,this._currentImageData=this._queue.shift(),this._currentImage=t.Node.create(""),this._currentImage.on("error",t.bind(this._loadComplete,this)),this._currentImage.on("load",t.bind(this._loadComplete,this)),this._currentImage.set("src",this._currentImageData.src)},_loadComplete:function(){this._currentImageData.callback&&this._currentImageData.callback(this._currentImage),this._queue.length>0?this._load():(this._loading=!1,this._currentImage=null,this._currentImageData=null)}},t.namespace("FL").SlideshowImage=t.Base.create("fl-slideshow-image",t.Widget,[t.WidgetChild],{_imageInfo:null,_image:null,_loading:!1,_loadingURL:null,_videoButton:null,_videoBox:null,_video:null,CONTENT_TEMPLATE:null,syncUI:function(){var t=this.get("boundingBox");this.get("crop")&&(t.setStyle("overflow","hidden"),t.addClass("fl-slideshow-image-cropped"))},load:function(t){this._imageInfo=t,this._loading=!0,this._load()},preload:function(e,i,s){var n=this._isVideo(),a=this.get("loadVideos"),o=this.get("showVideoButton");this.unload(),this.set("width",i),this.set("height",s),this._imageInfo=e,(!n||!a||n&&a&&o)&&t.FL.SlideshowImageLoader.add(this.get("loadGroup"),this._getImageURL(),t.bind(this._imagePreloaded,this),this.get("loadPriority"))},_imagePreloaded:function(t){this._image=t},unload:function(){this._image&&(this._image.remove(),this._image.detachAll(),this._image.set("src",""),this._image=null),this._video&&(this._video.remove(),this._video=null),this._videoButton&&(this._videoButton.remove(),this._videoButton=null),this._videoBox&&this._removeVideoBox(),this._imageInfo=null,this._loading=!1,this._loadingURL=null},resize:function(t,e){var i=2*parseInt(this.get("boundingBox").getComputedStyle("borderTopWidth"),10),s=this.get("boundingBox");this.set("width",t-i),this.set("height",e-i),s.setStyle("width",t-i+"px"),s.setStyle("height",e-i+"px"),this._videoButton&&this._positionVideoButton(),this._videoBox&&this._loadVideo(),this._loading||(this._imageInfo&&this._load(),this._image&&this._positionImage())},_load:function(){var t=this.get("loadVideos"),e=this.get("showVideoButton");!this._isVideo()||!t||e||"ontouchstart"in window?this._loadImage():this._loadVideo()},_loadImage:function(){var e=this._getImageURL(),i=this.get("loadVideos");e!=this._loadingURL&&(this._loadingURL=e,t.FL.SlideshowImageLoader.add(this.get("loadGroup"),this._loadingURL,t.bind(this._loadImageComplete,this),this.get("loadPriority")),this._loading&&(this._isVideo()&&i&&this._insertVideoButton(),this.fire("loadStart")))},_loadImageComplete:function(t){var e=this.get("boundingBox"),i=this.get("showVideoButton"),s=this.get("root").get("bgslideshow");this._image=t,this._image.setStyle("visibility","hidden"),this._image.addClass("fl-slideshow-image-img"),s?(this._image.set("aria-hidden","true"),this._image.set("alt","")):this._image.set("alt",this._imageInfo.alt),this._image.detachAll(),this._video&&!i&&(this._video.remove(),this._video=null),e.all("img").remove(),e.append(this._image),this._setupImage(),this._resizeImage(),this._positionImage(),this._image.setStyle("visibility","visible"),this._loadingURL=null,this._loading&&(this._loading=!1,this.fire("loadComplete"))},_setupImage:function(){var t=this.get("boundingBox");"undefined"!=typeof this._image._node.style.msInterpolationMode&&(this._image._node.style.msInterpolationMode="bicubic"),this.get("protect")&&(t.delegate("contextmenu",this._protectImage,"img"),t.delegate("mousedown",this._protectImage,"img"))},_protectImage:function(t){return t.preventDefault(),!1},_resizeImage:function(){var t=2*parseInt(this._image.getComputedStyle("borderTopWidth"),10),e=this._image.get("width"),i=this._image.get("height"),s=parseInt(this.get("boundingBox").getComputedStyle("width"),10),n=parseInt(this.get("boundingBox").getComputedStyle("height"),10),a=0,o=0,l=0,h=0,r=this.get("cropHorizontalsOnly"),g=i>e,u=!1;this._imageInfo&&this.get("checkFilenamesForNoCrop")&&(u=this._imageInfo.filename.indexOf("nocrop")>-1),!this.get("crop")||r&&g||u?(l=e/s,h=i/n,h>l?(a=Math.round(e*(1/h)),o=Math.round(i*(1/h))):(a=Math.round(e*(1/l)),o=Math.round(i*(1/l)))):(a=s,o=Math.round(i*s/e),oe||o>i)||(a=e,o=i),a-=t,o-=t,this._image.setStyle("width",a+"px"),this._image.setStyle("height",o+"px"),!this.get("crop")&&this.get("constrainWidth")&&this.set("width",a+"px"),!this.get("crop")&&this.get("constrainHeight")&&this.set("height",o+"px")},_positionImage:function(){var t=this.get("position").split(" "),e=""===t[0]?"center":t[0],i=""===t[1]?"center":t[1],s=0,n=0,a=parseInt(this.get("boundingBox").getComputedStyle("width"),10),o=parseInt(this.get("boundingBox").getComputedStyle("height"),10),l=2*parseInt(this._image.getComputedStyle("borderTopWidth"),10),h=parseInt(this._image.getComputedStyle("width"),10)+l,r=parseInt(this._image.getComputedStyle("height"),10)+l;isNaN(h)&&isNaN(r)||("left"==e&&(s=0),"center"==e&&(s=(a-h)/2),"right"==e&&(s=a-h),"top"==i&&(n=0),"center"==i&&(n=(o-r)/2),"bottom"==i&&(n=o-r),this._image.setStyles({left:s,top:n}))},_getImageURL:function(){var t=0,e=0,i=0,s=this.get("width"),n=this.get("height"),a=this.get("useThumbSizes"),o=this._imageInfo,l=[o.tinyURL||o.thumbURL||o.largeURL,o.thumbURL||o.largeURL,o.smallURL||o.largeURL,o.mediumURL||o.largeURL||o.smallURL,o.largeURL||o.mediumURL||o.smallURL,o.xlargeURL||o.largeURL||o.mediumURL||o.smallURL,o.x2largeURL||o.largeURL||o.mediumURL||o.smallURL,o.x3largeURL||o.x2largeURL||o.largeURL||o.mediumURL||o.smallURL];return t=a&&s<=100?0:a&&s<=150?1:s<=400?2:s>=400&&s<=600?3:s>=600&&s<=800?4:s>=800&&s<=1024?5:s>=1024&&s<=1280?6:7,e=a&&n<=100?0:a&&n<=150?1:n<=300?2:n>=300&&n<=450?3:n>=450&&n<=600?4:n>=600&&n<=768?5:n>=768&&n<=960?6:7,i=Math.max(t,e),l[i]},_isVideo:function(){return!!this._imageInfo&&("mp4"==this._imageInfo.format&&"smugmug"==this._imageInfo.sourceType||""!==this._imageInfo.iframe)},_loadVideo:function(){var t=this.get("boundingBox"),e=this.get("showVideoButton"),i=!!e;this._video&&(this._video.remove(),this._video=null),"mp4"==this._imageInfo.format&&"smugmug"==this._imageInfo.sourceType?this._video=this._getSmugMugVideoEmbed(this._imageInfo,i):""!==this._imageInfo.iframe&&(this._video=this._getIframeVideoEmbed(this._imageInfo,i)),this._videoBox?this._videoBox.one(".fl-slideshow-video-wrap").insert(this._video):(t.all("img").remove(),t.append(this._video)),this._loading&&(this._loading=!1,this.fire("loadComplete"))},_insertVideoButton:function(){var e=this.get("boundingBox"),i="ontouchstart"in window?"touchstart":"click";this._videoButton=t.Node.create(''),this._videoButton.on(i,t.bind(this._showVideoBox,this)),e.insert(this._videoButton),this._positionVideoButton()},_positionVideoButton:function(){var t=this.get("width"),e=this.get("height"),i=parseInt(this._videoButton.getStyle("width"),10),s=parseInt(this._videoButton.getStyle("height"),10);this._videoButton.setStyles({left:(t-i)/2,top:(e-s)/2})},_showVideoBox:function(){var e=this.get("root"),i=t.Node.create('
'),s=t.Node.create(''),n="ontouchstart"in window?"touchstart":"click";this._videoBox=t.Node.create('
'),this._videoBox.setStyle("padding",e.get("boundingBox").getStyle("padding")),this._videoBox.insert(i),this._videoBox.insert(s),this._videoBox.on(n,t.bind(this._removeVideoBox,this)),s.on(n,t.bind(this._removeVideoBox,this)),"undefined"!=typeof YUI.Env.mods["sm-fonticon"]&&s.addClass("sm-fonticon sm-fonticon-XCrossEncircled sm-button-skin-default sm-button-nochrome"),t.one("body").insert(this._videoBox),this._loadVideo(),t.one("body").on("fl-slideshow-image|keydown",this._onKey,this)},_getSmugMugVideoEmbed:function(e,i){var s=document.createElement("video"),n=0,a="",o="",l="";return null!==t.UA.mobile&&s.canPlayType&&s.canPlayType("video/mp4")?(n=this.get("width"),a="https://www.smugmug.com/photos/"+e.id+"_"+e.key+"-"+n+".mp4",l+='"):(o="imageId="+e.id,o+="&imageKey="+e.key,o+="&albumId="+e.albumId,o+="&albumKey="+e.albumKey,o+="&apiURL=https://api.smugmug.com/&hostLevel=live&isPro=true",o+=i?"&autoPlay=true":"&autoPlay=false",l+='',l+='',l+='',l+='',l+='',l+='',l+=""),t.Node.create(l)},_getIframeVideoEmbed:function(e,i){var s='',t.Node.create(s)},_removeVideoBox:function(e){"undefined"!=typeof e&&e.target&&e.target.get("className").indexOf("fl-slideshow-video")<0||(null!==this._videoBox&&(this._videoBox.remove(),this._videoBox=null,this._video=null),t.one("body").detach("fl-slideshow-image|keydown",this._onKey))},_onKey:function(t){if(27==t.keyCode)return this._removeVideoBox(),!1}},{CSS_PREFIX:"fl-slideshow-image",ATTRS:{loadGroup:{value:"none"},loadPriority:{value:!1},crop:{value:!1},checkFilenamesForNoCrop:{value:!0},cropHorizontalsOnly:{value:!1},position:{value:"center center"},protect:{value:!0},upsize:{value:!0},useThumbSizes:{value:!1},constrainWidth:{value:!1},constrainHeight:{value:!1},loadVideos:{value:!0},showVideoButton:{value:!0}}}),t.namespace("FL").SlideshowMouseNav=t.Base.create("fl-slideshow-mouse-nav",t.Plugin.Base,[],{initializer:function(){var t=this.get("trigger");t.on("click",this._triggerClick,this),t.on("mousemove",this._showArrow,this),t.on("mouseleave",this._hideArrow,this)},_triggerClick:function(t){var e=this.get("host"),i=this.get("trigger"),s=parseInt(i.getStyle("width"),10),n=i.get("region"),a=t.pageX-n.left+5;a>=s/2?e.nextImage():e.prevImage()},_showArrow:function(t){var e=this.get("host"),i=this.get("trigger"),s=parseInt(i.getStyle("width"),10),n=i.get("region"),a=t.pageX-n.left+5;null!==e.albumInfo&&e.albumInfo.images.length>1&&(a>=s/2?(i.removeClass("fl-slideshow-mouse-nav-prev"),i.addClass("fl-slideshow-mouse-nav-next")):(i.removeClass("fl-slideshow-mouse-nav-next"),i.addClass("fl-slideshow-mouse-nav-prev")))},_hideArrow:function(){var t=this.get("trigger");t.removeClass("fl-slideshow-mouse-nav-next"),t.removeClass("fl-slideshow-mouse-nav-prev")}},{NS:"mouseNav",ATTRS:{trigger:{value:null}}}),t.namespace("FL").SlideshowKenBurns=t.Base.create("fl-slideshow-ken-burns",t.Base,[],{run:function(){var e=null,i=null;t.FL.Utils.cssSupport("transform")&&(e=this.get("image").one("img"),i=this._getTransform(),e.setStyles({"-webkit-transform-origin":i.origin,"-moz-transform-origin":i.origin,"-ms-transform-origin":i.origin,"transform-origin":i.origin,transform:i.start}),e.transition({easing:"ease-out",duration:this.get("duration"),transform:i.end}))},_getTransform:function(){var e=this.get("zoom"),i=this.get("image"),s=0,n=null,a=null;return s=Math.floor(Math.random()*t.FL.SlideshowKenBurns.ZOOM_DIRECTIONS.length),n=t.FL.SlideshowKenBurns.ZOOM_DIRECTIONS[s],s=Math.floor(Math.random()*t.FL.SlideshowKenBurns.TRANSFORMS.length),a=t.FL.SlideshowKenBurns.TRANSFORMS[s],i.hasClass("fl-slideshow-image-cropped")||"in"!=n?"out"==n?(a.start="scale("+e+") "+a.translate,a.end="scale(1) translate(0, 0)"):(a.start="scale(1) translate(0, 0)",a.end="scale("+e+") "+a.translate):(s=Math.floor(2*Math.random()),a.start=0===s?"scale(1) translate(100px, 0)":"scale(1) translate(-100px, 0)",a.end="scale("+e+") translate(0, 0)",a.origin="center center"),a}},{ATTRS:{image:{value:null},zoom:{value:1.2},duration:{value:2}},ZOOM_DIRECTIONS:["in","out"],TRANSFORMS:[{origin:"left top",translate:"translate(-30px, -15px)"},{origin:"left center",translate:"translate(-30px, 0)"},{origin:"left bottom",translate:"translate(-30px, 15px)"},{origin:"right top",translate:"translate(30px, -15px)"},{origin:"right center",translate:"translate(30px, 0)"},{origin:"right bottom",translate:"translate(30px, 15px)"}]}),t.namespace("FL").SlideshowNav=t.Base.create("fl-slideshow-nav",t.Widget,[t.WidgetChild],{_buttons:null,_buttonsContainer:null,_buttonsLeftContainer:null,_buttonsRightContainer:null,_fontIcons:{buy:"Cart",caption:"InfoEncircled",close:"XCrossEncircled",fullscreen:"ScreenExpand",next:"ArrowRight",nextPage:"ArrowRight",pause:"PlayerPause",play:"PlayerPlay",prev:"ArrowLeft",prevPage:"ArrowLeft",social:"Heart",thumbs:"ViewThumbGrid"},CONTENT_TEMPLATE:null,renderUI:function(){this._renderContainers(),this._renderButtons(),this._renderFontIcons()},bindUI:function(){var t=this.get("root"),e=this.get("id");this._buttons.prev&&this._buttons.prev.on("click",t.prevImage,t),this._buttons.next&&this._buttons.next.on("click",t.nextImage,t),this._buttons.play&&(this._buttons.play.on("click",this._playClicked,this),t.on(e+"|played",this._showPauseButton,this),t.on(e+"|paused",this._showPlayButton,this),t._playing?this._showPauseButton():this._showPlayButton()),this._buttons.buy&&(t.on(e+"|albumLoadComplete",this._updateBuy,this),null!==t.albumInfo&&this._updateBuy()),this._buttons.count&&t.on(e+"|imageLoadComplete",this._updateCount,this),this._buttons.thumbs&&this._buttons.thumbs.on("click",t._toggleThumbs,t),this._buttons.caption&&(t.on(e+"|imageLoadComplete",this._updateCaption,this),this._updateCaption()),this._buttons.social&&this._buttons.social.on("click",t._toggleSocial,t),this._buttons.fullscreen&&t.fullscreen&&this._buttons.fullscreen.on("click",t.fullscreen.toggle,t.fullscreen),this._buttons.close&&this._buttons.close.on("click",t.hide,t)},destructor:function(){var t=this.get("root"),e=this.get("id");t.detach(e+"|*")},_renderContainers:function(){var e=this.get("contentBox"),i=this.get("buttonsLeft"),s=this.get("buttonsRight");this._buttonsContainer=t.Node.create("
"),this._buttonsContainer.addClass("fl-slideshow-nav-buttons"),e.appendChild(this._buttonsContainer),i.length>0&&(this._buttonsLeftContainer=t.Node.create("
"),this._buttonsLeftContainer.addClass("fl-slideshow-nav-buttons-left"),e.appendChild(this._buttonsLeftContainer)),s.length>0&&(this._buttonsRightContainer=t.Node.create("
"),this._buttonsRightContainer.addClass("fl-slideshow-nav-buttons-right"),e.appendChild(this._buttonsRightContainer))},_renderButtons:function(){var e="",i=0,s=0,n=[{names:this.get("buttons"),container:this._buttonsContainer},{names:this.get("buttonsLeft"),container:this._buttonsLeftContainer},{names:this.get("buttonsRight"),container:this._buttonsRightContainer}];for(this._buttons={};i-1?(this._buttons[e]=t.Node.create(""),this._updateCount()):this._buttons[e]=t.Node.create(''),e.indexOf("buy")>-1&&this._buttons[e].setStyle("display","none"),this._buttons[e].set("name",e),this._buttons[e].set("aria-label",e),this._buttons[e].addClass("fl-slideshow-nav-"+e),n[i].container.appendChild(this._buttons[e])},_renderFontIcons:function(){var t=null;if(this.get("useFontIcons")&&"undefined"!=typeof YUI.Env.mods["sm-fonticon"])for(t in this._buttons)"undefined"!=typeof this._buttons[t]&&"undefined"!=typeof this._fontIcons[t]?(this._buttons[t].addClass("sm-fonticon-"+this._fontIcons[t]),this._buttons[t].addClass("sm-fonticon sm-button-skin-default sm-button-nochrome")):t.indexOf("count")>-1&&this._buttons[t].addClass("fonticons-enabled")},_updateCount:function(){var e="",i=t.FL.SlideshowNav.COUNT_TEXT,s=1,n=1;this.get("root").albumInfo&&(s=this.get("root").imageInfo.index+1,n=this.get("root").albumInfo.images.length),e=i.replace("{current}",s).replace("{total}",n),this._buttons.count.set("innerHTML",e)},_updateCaption:function(){var t=this.get("root"),e=t.imageInfo;e&&""===e.caption?(t.caption.slideshowOverlay.enable(),t.caption.slideshowOverlay.hide(),this._buttons.caption.detach("click"),this._buttons.caption.addClass("fl-slideshow-nav-caption-disabled")):(this._buttons.caption.on("click",t._toggleCaption,t),this._buttons.caption.removeClass("fl-slideshow-nav-caption-disabled"))},_updateBuy:function(){var e=null,i=this.get("root"),s=i.get("source")[i.albumIndex],n=i.albumIndex,a=i.get("source")[n];s&&"smugmug"==s.type&&("undefined"!=typeof i.albumInfo.printable?this._updateBuyComplete():(e=new t.FL.SmugMugAPI,e.addParam("method","smugmug.albums.getInfo"),e.addParam("AlbumID",a.id),e.addParam("AlbumKey",a.key),e.on("complete",this._updateBuyComplete,this),e.request()))},_updateBuyComplete:function(t){var e=this.get("root"),i="undefined"==typeof t?e.albumInfo.printable:t.Album.Printable,s=e.albumInfo.link;i?(e.albumInfo.printable=!0,this._buttons.buy.set("href","https://secure.smugmug.com/cart/batchadd/?url="+encodeURIComponent(s)),this._buttons.buy.setStyle("display","inline-block")):(e.albumInfo.printable=!1,this._buttons.buy.setStyle("display","none")),this.fire("resize")},_playClicked:function(){var t=this.get("root");t._playing?t.pause():t.play()},_showPlayButton:function(){this._buttons.play.removeClass("fl-slideshow-nav-pause"),this._buttons.play.addClass("fl-slideshow-nav-play"),this.get("useFontIcons")&&"undefined"!=typeof YUI.Env.mods["sm-fonticon"]&&(this._buttons.play.removeClass("sm-fonticon-PlayerPause"),this._buttons.play.addClass("sm-fonticon-PlayerPlay"))},_showPauseButton:function(){this._buttons.play.removeClass("fl-slideshow-nav-play"),this._buttons.play.addClass("fl-slideshow-nav-pause"),this.get("useFontIcons")&&"undefined"!=typeof YUI.Env.mods["sm-fonticon"]&&(this._buttons.play.removeClass("sm-fonticon-PlayerPlay"),this._buttons.play.addClass("sm-fonticon-PlayerPause"))}},{CSS_PREFIX:"fl-slideshow-nav",COUNT_TEXT:"{current} of {total}",ATTRS:{buttons:{value:[],writeOnce:!0},buttonsLeft:{value:[],writeOnce:!0},buttonsRight:{value:[],writeOnce:!0},useFontIcons:{value:!0,writeOnce:!0}}}),t.namespace("FL").SlideshowOverlay=t.Base.create("fl-slideshow-overlay",t.Plugin.Base,[],{_focus:!1,_visible:!0,_disabled:!1,_showProps:{duration:.5,easing:"ease-out",opacity:1},_hideProps:{duration:.5,easing:"ease-out",opacity:0},_hideTimer:null,initializer:function(){var t=this.get("host").get("boundingBox");this.afterHostEvent("render",this._initFocus),this.afterHostEvent("render",this._initVisibility),this.get("closeButton")&&this._initCloseButton(),t.addClass("fl-slideshow-overlay")},destructor:function(){this._hideTimerCancel()},_initFocus:function(){var e=this.get("host").get("boundingBox");e.on("mouseenter",t.bind(this._setFocusOnMouseenter,this)),e.on("mouseleave",t.bind(this._setFocusOnMouseleave,this))},_initVisibility:function(){var t=this.get("host").get("boundingBox"),e=this.get("hideStyle");this.get("visible")||("display"==e?t.setStyle("display","none"):"left"==e&&t.setStyle("left","-99999px"),t.setStyle("opacity","0"),this._visible=!1)},_initCloseButton:function(){var e=this.get("host").get("boundingBox"),i=null;i=t.Node.create(''),i.on("click",t.bind(this._closeButtonClick,this)),"undefined"!=typeof YUI.Env.mods["sm-fonticon"]&&i.addClass("sm-fonticon sm-fonticon-XCrossEncircled sm-button-skin-default sm-button-nochrome"),e.insert(i)},_closeButtonClick:function(){var e=this.get("host").get("boundingBox");e.transition(this._hideProps,t.bind(this._hideComplete,this))},_setFocusOnMouseenter:function(){this._focus=!0},_setFocusOnMouseleave:function(){this._focus=!1},disable:function(){this._disabled=!0},enable:function(){this._disabled=!1},show:function(){var e=this.get("host").get("boundingBox"),i=this.get("hideStyle");this._disabled||("display"==i?e.setStyle("display","block"):"left"==i&&e.setStyle("left","auto"),e.transition(this._showProps,t.bind(this._showComplete,this)),this.fire("showStart"))},_showComplete:function(){this._visible=!0,this.hideWithTimer(),this.fire("showComplete")},hide:function(){if(!this._focus&&!this._disabled){var e=this.get("host").get("boundingBox");e.transition(this._hideProps,t.bind(this._hideComplete,this)),this.fire("hideStart")}},hideWithTimer:function(){this._hideTimerCancel(),this._hideTimer=t.later(this.get("hideDelay"),this,this.hide)},_hideTimerCancel:function(){this._hideTimer&&(this._hideTimer.cancel(),this._hideTimer=null)},_hideComplete:function(){var t=this.get("host").get("boundingBox"),e=this.get("hideStyle");"display"==e?t.setStyle("display","none"):"left"==e&&t.setStyle("left","-99999px"),this._visible=!1,this.fire("hideComplete")}},{NS:"slideshowOverlay",ATTRS:{closeButton:{value:!1,writeOnce:!0},hideDelay:{value:3e3,writeOnce:!0},hideStyle:{value:"display",writeOnce:!0},visible:{value:!0,writeOnce:!0}}}),t.namespace("FL").SlideshowSocial=t.Base.create("fl-slideshow-social",t.Widget,[t.WidgetChild],{_buttons:null,renderUI:function(){this._buttons={},this.get("root").get("googlePlusButtonEnabled")&&this._renderGooglePlusButton()},bindUI:function(){var e=this.get("root");e.get("likeButtonEnabled")&&e.on("imageLoadComplete",t.bind(this._updateLikeButton,this)),e.get("tweetButtonEnabled")&&e.on("imageLoadComplete",t.bind(this._updateTweetButton,this)),e.get("googlePlusButtonEnabled")&&e.on("imageLoadComplete",t.bind(this._updateGooglePlusButton,this)),e.get("pinterestButtonEnabled")&&e.on("imageLoadComplete",t.bind(this._updatePinterestButton,this))},_updateLikeButton:function(){var e=null,i=this.get("contentBox"),s=this.get("root"),n=s.albumIndex,a=s.get("source")[n],o=s.imageInfo;this._buttons.like&&(this._buttons.like.remove(),this._buttons.like=null),"smugmug"==a.type?(e="https://www.facebook.com/plugins/like.php?",e+="href=https://www.smugmug.com/services/graph/gallery/",e+=a.id+"_"+a.key+"/"+o.id+"_"+o.key):(e="https://www.facebook.com/plugins/like.php?",e+="href="+encodeURIComponent(o.largeURL)),e+="&send=false",e+="&layout=button_count",e+="&width=90",e+="&show_faces=false",e+="&action=like",e+="&colorscheme=light",e+="&height=21",this._buttons.like=t.Node.create(''),this._buttons.like.setStyles({overflow:"hidden",width:"90px",height:"21px"}),i.appendChild(this._buttons.like)},_updateTweetButton:function(){var e=null,i=this.get("root").imageInfo,s=this.get("contentBox");this._buttons.tweet&&(this._buttons.tweet.remove(),this._buttons.tweet=null),e="https://platform.twitter.com/widgets/tweet_button.html?",e+="url="+encodeURIComponent(i.largeURL),e+="&count=none",this._buttons.tweet=t.Node.create(''),this._buttons.tweet.setStyles({overflow:"hidden",width:"90px",height:"21px"}),s.appendChild(this._buttons.tweet)},_renderGooglePlusButton:function(){var t,e;t=document.createElement("script"),t.type="text/javascript",t.src="https://apis.google.com/js/plusone.js",e=document.getElementsByTagName("head")[0],e.parentNode.appendChild(t)},_updateGooglePlusButton:function(){"undefined"==typeof gapi?setTimeout(t.bind(this._updateGooglePlusButtonCallback,this),500):this._updateGooglePlusButtonCallback()},_updateGooglePlusButtonCallback:function(){var e=this.get("root").imageInfo,i=this.get("contentBox");this._buttons.plus&&(this._buttons.plus.remove(),this._buttons.plus=null),"undefined"!=typeof gapi&&(this._buttons.plus=t.Node.create("
"),i.appendChild(this._buttons.plus),gapi.plusone.render(this._buttons.plus._node,{href:encodeURIComponent(e.largeURL),annotation:"bubble",size:"medium"}))},_updatePinterestButton:function(){var e="https://pinterest.com/pin/create/button/",i=this.get("root").imageInfo,s=this.get("contentBox");this._buttons.pin&&(this._buttons.pin.remove(),this._buttons.pin=null),e+="?url="+encodeURIComponent(window.location.href),e+="&media="+encodeURIComponent(i.mediumURL),e+="&description="+encodeURIComponent(i.caption),this._buttons.pin=t.Node.create(""),this._buttons.pin.setAttribute("data-pin-config","none"),this._buttons.pin.setAttribute("data-pin-do","buttonPin"),this._buttons.pin.setAttribute("href",e),this._buttons.pin.setAttribute("target","_blank"),this._buttons.pin.set("innerHTML",''),s.appendChild(this._buttons.pin)}},{CSS_PREFIX:"fl-slideshow-social",ATTRS:{}}),t.namespace("FL").SlideshowThumbs=t.Base.create("fl-slideshow-thumbs",t.Widget,[t.WidgetParent,t.WidgetChild],{_clipBox:null,_pagesBox:null,_activePageBox:null,_activePageIndex:0,_nextPageBox:null,_activeImages:null,_nextImages:null,_prevImages:null,_leftNav:null,_rightNav:null,_topNav:null,_bottomNav:null,_bbHeight:0,_bbWidth:0,_cbWidth:0,_clipBoxMarginLeft:0,_clipBoxTop:0,_colsPerPage:0,_rowsPerPage:0,_imagesPerPage:0,_numPages:0,_pageHeight:0,_pageWidth:0,_horizontalSpacing:0,_verticalSpacing:0,_leftNavWidth:0,_rightNavWidth:0,_transition:null,_transitioning:!1,_transitionDirection:"next",_gestures:null,initializer:function(){this._activeImages=[],this._nextImages=[],this._prevImages=[]},renderUI:function(){this._renderBoxes(),this._renderNavs()},bindUI:function(){var e=this.get("root"),i=this.get("id"),s=this.get("transition");e.on(i+"|albumLoadComplete",this._albumLoadComplete,this),"ontouchstart"in window&&this.get("touchSupport")&&(this._gestures=new t.FL.SlideshowGestures({direction:"slideVertical"==s?"vertical":"horizontal",activeItem:this._activePageBox,nextItem:this._nextPageBox}),this._gestures.on("moveStart",this._gesturesMoveStart,this),this._gestures.on("endComplete",this._gesturesEndComplete,this))},syncUI:function(){this._syncBoxes(),this._syncNavs()},destructor:function(){var e=this.get("root"),i=this.get("id");e.detach(i+"|*"),t.FL.SlideshowImageLoader.removeGroup("thumbs")},unload:function(){var e=this.get("root"),i=this.get("id"),s=0;for(e.detach(i+"|imageLoadComplete"),t.FL.SlideshowImageLoader.removeGroup("thumbs");sa.index&&this.prevPage())},_renderBoxes:function(){this._clipBox=t.Node.create("
"),this._clipBox.addClass("fl-slideshow-thumbs-clip"),this.get("contentBox").insert(this._clipBox),this._pagesBox=t.Node.create("
"),this._pagesBox.addClass("fl-slideshow-thumbs-pages"),this._clipBox.insert(this._pagesBox),this._activePageBox=t.Node.create("
"),this._activePageBox.addClass("fl-slideshow-thumbs-page"),this._pagesBox.insert(this._activePageBox),this._nextPageBox=t.Node.create("
"),this._nextPageBox.addClass("fl-slideshow-thumbs-page"),this._pagesBox.insert(this._nextPageBox)},_syncBoxes:function(){this._activePageBox.setStyle("left","0"),this._nextPageBox.setStyle("left","-9999px")},_resizeBoxes:function(){this.set("width",this._bbWidth),this.set("height",this._bbHeight),this.get("contentBox").setStyle("width",this._cbWidth+"px"),this._clipBox.setStyle("width",this._pageWidth+"px"),this._clipBox.setStyle("height",this._pageHeight+"px"),this._clipBox.setStyle("padding",this._verticalSpacing+"px 0 0 "+this._horizontalSpacing+"px "),this._clipBox.setStyle("margin","0 0 0 "+this._clipBoxMarginLeft+"px"),this._clipBox.setStyle("top",this._clipBoxTop),this._pagesBox.setStyle("width",this._pageWidth+"px"),this._pagesBox.setStyle("height",this._pageHeight+"px"),this._activePageBox.setStyle("width",this._pageWidth+"px"),this._activePageBox.setStyle("height",this._pageHeight+"px"),this._nextPageBox.setStyle("width",this._pageWidth+"px"),this._nextPageBox.setStyle("height",this._pageHeight+"px")},_renderActivePage:function(){var t=0,e=this.get("root"),i=this._imagesPerPage*this._activePageIndex,s=i+this._imagesPerPage,n=e.albumInfo.images;for(this._clearActiveImage();t=this._numPages?0:this._activePageIndex+1;this._preloadPage(t,this._nextImages)},_preloadPrevPage:function(){var t=this._activePageIndex-1<0?this._numPages-1:this._activePageIndex-1;this._preloadPage(t,this._prevImages)},_preloadPage:function(t,e){var i=0,s=this.get("root"),n=s.albumInfo.images,a=t*this._imagesPerPage,o=a+this._imagesPerPage,l=this.get("imageConfig"),h=l.width,r=l.height;if(this._numPages>1){for(;i1&&(t.FL.SlideshowImageLoader.removeGroup("thumbs"),this._transitionDirection=e,this._transitioning=!0,this._nextPageBox.setStyle("left","0px"),this._renderNextPage(),this._transition=new t.FL.SlideshowTransition({itemIn:this._nextPageBox,itemOut:this._activePageBox,type:this._getTransition(),duration:this.get("transitionDuration"),easing:this.get("transitionEasing")}),this._transition.once("complete",this._transitionComplete,this),this._transition.run(),this._gestures&&this._gestures.disable())},_transitionComplete:function(){this._swapPageRefs(),this._transitioning=!1,this._transitionDirection="",this._transition=null,this._gestures&&this._gestures.enable(),this.fire("transitionComplete")},_gesturesMoveStart:function(e){t.FL.SlideshowImageLoader.removeGroup("thumbs"),this._transitionDirection=e.direction,this._renderNextPage()},_gesturesEndComplete:function(){this._swapPageRefs(),this._transitionDirection="",this.fire("transitionComplete")},_swapPageRefs:function(){var t=this._activePageBox,e=this._activeImages;this._activePageBox=this._nextPageBox,this._nextPageBox=t,this._nextPageBox.setStyle("left","-9999px"),"next"==this._transitionDirection?(this._activeImages=this._nextImages,this._nextImages=e):(this._activeImages=this._prevImages,this._prevImages=e),"next"==this._transitionDirection&&this._activePageIndex+1-1?this._activePageIndex--:"prev"==this._transitionDirection&&(this._activePageIndex=this._numPages-1),this._gestures&&(this._gestures.set("activeItem",this._activePageBox),this._gestures.set("nextItem",this._nextPageBox)),this._preloadNextPage(),this._preloadPrevPage()},_renderNavs:function(){var e=this.get("topNavButtons"),i=this.get("rightNavButtons"),s=this.get("bottomNavButtons"),n=this.get("leftNavButtons");this.get("topNavEnabled")&&e.length>0&&(this._topNav=new t.FL.SlideshowNav({buttons:e}),this._topNav.get("boundingBox").addClass("fl-slideshow-thumbs-top-nav"),this.add(this._topNav),this._topNav.render(this.get("contentBox")),this._clipBox.insert(this._topNav.get("boundingBox"),"before"),this._bindNavEvents(this._topNav)),this.get("rightNavEnabled")&&i.length>0&&(this._rightNav=new t.FL.SlideshowNav({buttons:i}),this._rightNav.get("boundingBox").addClass("fl-slideshow-thumbs-right-nav"),this.add(this._rightNav),this._rightNav.render(this.get("contentBox")),this._bindNavEvents(this._rightNav)),this.get("bottomNavEnabled")&&s.length>0&&(this._bottomNav=new t.FL.SlideshowNav({buttons:s}),this._bottomNav.get("boundingBox").addClass("fl-slideshow-thumbs-bottom-nav"),this.add(this._bottomNav),this._bottomNav.render(this.get("contentBox")),this._bindNavEvents(this._bottomNav)),this.get("leftNavEnabled")&&n.length>0&&(this._leftNav=new t.FL.SlideshowNav({buttons:n}),this._leftNav.get("boundingBox").addClass("fl-slideshow-thumbs-left-nav"),this.add(this._leftNav),this._leftNav.render(this.get("contentBox")),this._bindNavEvents(this._leftNav))},_syncNavs:function(){var t,e,i;this._rightNav&&(t=this._rightNav.get("boundingBox"),t.setStyle("position","absolute"),t.setStyle("top","0px"),t.setStyle("right","0px")),this._bottomNav&&(e=this._bottomNav.get("boundingBox"),e.setStyle("position","absolute"),e.setStyle("bottom","0px"),e.setStyle("width","100%")),this._leftNav&&(i=this._leftNav.get("boundingBox"),i.setStyle("position","absolute"),i.setStyle("top","0px"),i.setStyle("left","0px"))},_resizeNavs:function(){var t,e,i;this._rightNav&&(t=this._rightNav.get("boundingBox"),i=this._bbHeight/2-parseInt(t.getComputedStyle("height"),10)/2,t.setStyle("marginTop",i+"px")),this._leftNav&&(e=this._leftNav.get("boundingBox"),i=this._bbHeight/2-parseInt(e.getComputedStyle("height"),10)/2,e.setStyle("marginTop",i+"px"))},_bindNavEvents:function(t){t._buttons.prevPage&&t._buttons.prevPage.on("click",this.prevPage,this),t._buttons.nextPage&&t._buttons.nextPage.on("click",this.nextPage,this),t.on("resize",this.resize,this)},_togglePageButtons:function(){var t=this.get("boundingBox").all(".fl-slideshow-nav-prevPage, .fl-slideshow-nav-nextPage"),e=t.getStyle("display")[0];1==this._numPages&&"inline-block"==e?(t.setStyle("display","none"),this._setSizeInfo()):this._numPages>1&&"none"==e&&(t.setStyle("display","inline-block"),this._setSizeInfo())},_setSizeInfo:function(){var t=this.get("root"),e=this.get("boundingBox"),i=e.getStyle("position"),s=parseInt(e.getStyle("marginLeft"),10),n=parseInt(e.getStyle("marginRight"),10),a=parseInt(e.getStyle("marginTop"),10),o=parseInt(e.getStyle("marginBottom"),10),l=parseInt(e.getStyle("paddingLeft"),10),h=parseInt(e.getStyle("paddingRight"),10),r=parseInt(e.getStyle("paddingTop"),10),g=parseInt(e.getStyle("paddingBottom"),10),u=e.get("parentNode"),d=parseInt(u.getComputedStyle("width"),10),m=parseInt(u.getComputedStyle("height"),10),c=d-l-h-s-n,_=m-r-g-a-o,p=c,v=c,f=_,b=this.get("columns"),y=this.get("rows"),x=this.get("imageConfig"),I=this.get("horizontalSpacing"),S=this.get("verticalSpacing"),w=this.get("spaceEvenly"),B=this.get("centerSinglePage"),T=0,C=0,L=0,N=0,P=b,O=y,R=0,E=1,k=0,F=0,U=0,z=0;e.setStyle("position","relative"),isNaN(b)||(c=v=b*(x.width+I)+I),isNaN(y)||(_=f=y*(x.height+S)+S),this._leftNav&&(T=parseInt(this._leftNav.get("boundingBox").getComputedStyle("width"),10),isNaN(b)?v-=T:c+=T),this._rightNav&&(C=parseInt(this._rightNav.get("boundingBox").getComputedStyle("width"),10),isNaN(b)?v-=C:c+=C),this._topNav&&(L=parseInt(this._topNav.get("boundingBox").getComputedStyle("height"),10),isNaN(y)?f-=L:_+=L),this._bottomNav&&(N=parseInt(this._bottomNav.get("boundingBox").getComputedStyle("height"),10),isNaN(y)?f-=N:_+=N),isNaN(b)&&(P=Math.floor(v/(x.width+I)),P=P<1?1:P),isNaN(y)&&(O=Math.floor(f/(x.height+S)),O=O<1?1:O),R=P*O,t.albumInfo&&(E=Math.ceil(t.albumInfo.images.length/R)),isNaN(b)&&w&&(I=Math.floor((v-x.width*P)/(P+1))),isNaN(y)&&w&&(S=Math.floor((f-x.height*O)/(O+1))),t.albumInfo&&B&&1==E&&1==O?(p=t.albumInfo.images.length*x.width,p+=I*(t.albumInfo.images.length+1),this._leftNav&&(p+=T),this._rightNav&&(p+=C)):p=c,t.albumInfo&&B&&1==E&&1==O?(v=t.albumInfo.images.length*x.width,v+=I*t.albumInfo.images.length):v=P*(x.width+I),f=O*(x.height+S),E<2?k=T:(U=c,this._rightNav&&(U-=C),this._leftNav?(U-=T,k=T+(U-v-I)/2):k=(U-v-I)/2),E>1&&!w&&(z=_,this._topNav&&(z-=L),this._bottomNav&&(z-=N),F=(z-(S+f))/2),this._bbHeight=_,this._bbWidth=c,this._cbWidth=p,this._clipBoxMarginLeft=k,this._clipBoxTop=F,this._colsPerPage=P,this._rowsPerPage=O,this._imagesPerPage=R,this._numPages=E,this._pageHeight=f,this._pageWidth=v,this._leftNavWidth=T,this._rightNavWidth=C,this._horizontalSpacing=I,this._verticalSpacing=S,this._activePageIndex=Math.floor(t.imageIndex/this._imagesPerPage),e.setStyle("position",i)}},{CSS_PREFIX:"fl-slideshow-thumbs",ATTRS:{columns:{value:"auto"},rows:{value:"auto"},horizontalSpacing:{value:15},verticalSpacing:{value:15},spaceEvenly:{value:!0},centerSinglePage:{value:!0},pauseOnClick:{value:!1},transition:{value:"slideHorizontal"},transitionDuration:{value:.8},transitionEasing:{value:"ease-out"},imageConfig:{value:{crop:!0,width:50,height:50}},topNavEnabled:{value:!1},topNavButtons:{value:["prevPage","nextPage"]},rightNavEnabled:{value:!0},rightNavButtons:{value:["nextPage"]},bottomNavEnabled:{value:!1},bottomNavButtons:{value:["prevPage","nextPage"]},leftNavEnabled:{value:!0},leftNavButtons:{value:["prevPage"]},touchSupport:{value:!1}}}),t.namespace("FL").SlideshowTransition=t.Base.create("fl-slideshow-transition",t.Base,[],{_transitionFunction:"_transitionFade",_type:"fade",initializer:function(){var e=this.get("type"),i=[],s=t.FL.SlideshowTransition.TYPES,n=t.FL.SlideshowTransition.SLIDESHOW_IMAGE_TYPES,a=t.Array.indexOf(n,e)>-1,o=this._isSlideshowImage(),l=this.get("itemIn"),h=this.get("itemOut");e.indexOf(",")>-1&&(i=e.split(","),i.sort(function(){return.5-Math.random()}),e=i[0]),!o&&a?e="fade":o&&(l&&null===l.one("img")||h&&null===h.one("img")?e="none":a&&(t.UA.gecko&&t.UA.gecko<5||t.UA.opera>0||t.UA.ie>0&&t.UA.ie<9)&&(e="fade")),t.FL.SlideshowTransition.TYPES[e]&&(this._transitionFunction=s[e],this._type=e),this._setupItems()},run:function(){this.fire("start"),this[this._transitionFunction].call(this)},_setupItems:function(){var e=this.get("itemIn"),i=this.get("itemOut");e&&(e.setStyle("zIndex",2),e.setStyle("opacity",1),t.FL.Utils.cssSupport("transform")?e.setStyle("transform","translate(0, 0)"):(e.setStyle("top","0"),e.setStyle("left","0"))),i&&i.setStyle("zIndex",1)},_isSlideshowImage:function(){var t=this.get("itemIn"),e=this.get("itemOut");return!(!t||!t.hasClass("fl-slideshow-image"))||!(!e||!e.hasClass("fl-slideshow-image"))},_transitionStart:function(e,i){var s=this.get("itemIn"),n=this.get("itemOut"),a=t.bind(this._transitionComplete,this),o=s?null:a,l=this.get("duration"),h=this.get("easing");s&&(e.duration=e.duration||l,e.easing=e.easing||h,s.transition(e)),n&&(i.duration=i.duration||l,i.easing=i.easing||h,n.transition(i)),a?t.later(1e3*e.duration+100,null,a):o&&t.later(1e3*i.duration+100,null,o)},_transitionComplete:function(){this._set("itemIn",null),this._set("itemOut",null),this.fire("complete")},_transitionNone:function(){var t=this.get("itemIn"),e=this.get("itemOut");t&&t.setStyle("opacity",1),e&&e.setStyle("opacity",0),this._transitionComplete()},_transitionFade:function(){var t=this.get("itemIn");t&&t.setStyle("opacity",0),this._transitionStart({opacity:1},{opacity:0})},_transitionSlideLeft:function(){t.FL.Utils.cssSupport("transform")?this._cssTransitionSlide({inStart:"translate(100%, 0)",inEnd:"translate(0, 0)",outStart:"translate(0, 0)",outEnd:"translate(-100%, 0)"}):this._jsTransitionSlide("left")},_transitionSlideRight:function(){t.FL.Utils.cssSupport("transform")?this._cssTransitionSlide({inStart:"translate(-100%, 0)",inEnd:"translate(0, 0)",outStart:"translate(0, 0)",outEnd:"translate(100%, 0)"}):this._jsTransitionSlide("right")},_transitionSlideUp:function(){t.FL.Utils.cssSupport("transform")?this._cssTransitionSlide({inStart:"translate(0, 100%)",inEnd:"translate(0, 0)",outStart:"translate(0, 0)",outEnd:"translate(0, -100%)"}):this._jsTransitionSlide("up")},_transitionSlideDown:function(){t.FL.Utils.cssSupport("transform")?this._cssTransitionSlide({inStart:"translate(0, -100%)",inEnd:"translate(0, 0)",outStart:"translate(0, 0)",outEnd:"translate(0, 100%)"}):this._jsTransitionSlide("down")},_jsTransitionSlide:function(t){var e=this.get("itemIn"),i=this.get("itemOut"),s=0;i&&"left"==t&&(s=-parseInt(i.getStyle("width"),10)),i&&"right"==t&&(s=parseInt(i.getStyle("width"),10)),i&&"up"==t&&(s=-parseInt(i.getStyle("height"),10)),i&&"down"==t&&(s=parseInt(i.getStyle("height"),10)),e&&e.setStyle("opacity",1),e&&"left"==t&&e.setStyle("left",e.getStyle("width")),e&&"right"==t&&e.setStyle("left","-"+e.getStyle("width")),e&&"up"==t&&e.setStyle("top",e.getStyle("height")),e&&"down"==t&&e.setStyle("top","-"+e.getStyle("height")),"left"==t||"right"==t?this._transitionStart({left:0},{left:s}):this._transitionStart({top:0},{top:s})},_cssTransitionSlide:function(e){var i=this.get("itemIn"),s=this.get("itemOut"),n=t.UA.chrome<36?"transform":"-webkit-transform",a={},o={};a[n]=e.inEnd,o[n]=e.outEnd,i&&(i.setStyle("transition",""),i.setStyle("opacity",1),i.setStyle(n,e.inStart)),s&&(s.setStyle("transition",""),s.setStyle(n,e.outStart)),this._transitionStart(a,o)},_transitionBars:function(){this.get("itemIn").one(".fl-slideshow-image-img").setStyle("opacity",0);var e=this.get("bars"),i=this._renderSlices(1,e),s=this.get("duration"),n=0,a=100,o=!1,l=0,h=null,r={duration:s,opacity:1};for("barsRandom"==this._type&&(i=this._randomizeSlices(i));l-1&&d'),f=t.Node.create(''),v.setStyles({left:p*m+"px",top:_*c+"px",width:m==i-1?o-p*m+"px":p+"px",height:c==e-1?a-_*c+"px":_+"px",opacity:0}),f.setStyles({height:r+"px",width:g+"px",top:d-(_+c*_-_)+"px",left:u-(p+m*p-p)+"px"}),v.append(f),n.append(v),"undefined"!=typeof s&&s?b[c].push(v):b.push(v);return b},_transitionSlicesFadeLast:function(t){var e=this.get("itemOut");e&&!e.hasClass("fl-slideshow-image-cropped")&&e.transition({duration:t/1e3+this.get("duration"),opacity:0})},_transitionSlice:function(e,i,s){var n=s?t.bind(this._transitionSlicesComplete,this):null;e.transition(i,n)},_transitionSlicesComplete:function(){var t=this.get("itemIn");t.all(".fl-slideshow-transition-slice").remove(),t.one(".fl-slideshow-image-img").setStyle("opacity",1),this._transitionComplete()},_randomizeSlices:function(t){var e,i,s=t.length;if(0!==s){for(;--s;)e=Math.floor(Math.random()*(s+1)),i=t[s],t[s]=t[e],t[e]=i;return t}},_transitionKenBurns:function(){var e=this.get("kenBurnsDuration"),i=this.get("duration"),s=this.get("itemIn"),n=this.get("kenBurnsZoom");this._transitionFade(),new t.FL.SlideshowKenBurns({duration:e+i+4,image:s,zoom:n}).run()}},{ATTRS:{itemIn:{value:null},itemOut:{value:null},duration:{value:.5},easing:{value:"ease-out"},type:{value:"fade"},bars:{value:15},boxCols:{value:8},boxRows:{value:4},kenBurnsDuration:{value:4},kenBurnsZoom:{value:1.2}},TYPES:{fade:"_transitionFade",none:"_transitionNone",slideLeft:"_transitionSlideLeft",slideRight:"_transitionSlideRight",slideUp:"_transitionSlideUp",slideDown:"_transitionSlideDown",blinds:"_transitionBars",bars:"_transitionBars",barsRandom:"_transitionBars",boxes:"_transitionBoxes",boxesRandom:"_transitionBoxes",boxesGrow:"_transitionBoxes",kenBurns:"_transitionKenBurns"},SLIDESHOW_IMAGE_TYPES:["blinds","bars","barsRandom","boxes","boxesRandom","boxesGrow","kenBurns"]}),t.namespace("FL").Slideshow=t.Base.create("fl-slideshow",t.FL.SlideshowBase,[],{frame:null,nav:null, imageNavLeft:null,imageNavRight:null,thumbs:null,verticalThumbs:null,caption:null,social:null,_nextImagePreloader:null,_initialNavSettings:null,initializer:function(){var e={loadGroup:"main-preload",crop:this.get("crop"),position:this.get("position"),protect:this.get("protect"),upsize:this.get("upsize")};this._nextImagePreloader=new t.FL.SlideshowImage(e),this._isMobile()&&(this._removeNavButton("prevPage"),this._removeNavButton("nextPage"),this._removeNavButton("fullscreen")),this._hasNavButton("fullscreen")&&(t.FL.SlideshowFullscreen.OS_SUPPORT?this.plug(t.FL.SlideshowFullscreen):this._removeNavButton("fullscreen"))},renderUI:function(){t.FL.Slideshow.superclass.renderUI.apply(this,arguments),this._renderFrame(),this._renderVerticalThumbs(),this._renderNavAndThumbs(),this._renderImageNav(),this._renderMouseNav(),this._renderCaption(),this._renderSocial()},bindUI:function(){var e=this.get("boundingBox"),i=this.frame.get("boundingBox"),s=this.get("navOverlay"),n=this.get("navType"),a=this._getNav(),o=this.get("clickAction");t.FL.Slideshow.superclass.bindUI.apply(this,arguments),t.Do.after(this._resizeChildWidgets,this,"resize"),this.on("albumLoadStart",this._albumLoadStart,this),this.on("albumLoadComplete",this._albumLoadComplete,this),this.on("imageLoadComplete",this._loadFrame,this),this.get("loadingImageAlwaysEnabled")&&(this.frame.on("transitionInit",t.bind(this._showLoadingImageWithDelay,this)),this.frame.on("transitionStart",t.bind(this._hideLoadingImage,this))),this.get("overlayHideOnMousemove")&&(a&&s&&(this.frame.once("transitionComplete",a.slideshowOverlay.hideWithTimer,a.slideshowOverlay),e.on("mousemove",t.bind(this._toggleNav,this))),"buttons"!=n&&"thumbs"!=n&&"custom"!=n||(e.on("mouseenter",t.bind(this._checkOverlaysOnMouseenter,this)),e.on("mouseleave",t.bind(this._hideAllOverlays,this)))),e.delegate("click",t.bind(this._overlayCloseClick,this),".fl-slideshow-overlay-close"),"gallery"!=o&&"url"!=o||i.delegate("click",t.bind(this._frameClick,this),".fl-slideshow-image-img")},syncUI:function(){var e=this.get("boundingBox");t.FL.Slideshow.superclass.syncUI.apply(this,arguments),e._node.onselectstart=function(){return!1},e._node.unselectable="on",e._node.style.MozUserSelect="none","none"!=this.get("clickAction")&&this.frame.get("boundingBox").addClass("fl-click-action-enabled")},_isMobile:function(){return/Mobile|Android|Silk\/|Kindle|BlackBerry|Opera Mini|Opera Mobi|webOS/i.test(navigator.userAgent)},unload:function(){this.pause(),this.frame.unload(),null!==this.thumbs&&this.thumbs.unload()},_albumLoadStart:function(){this._showLoadingImage()},_albumLoadComplete:function(){this.frame.once("transitionStart",t.bind(this._hideLoadingImage,this))},_resizeChildWidgets:function(){var t=this.get("boundingBox"),e=this.get("contentBox"),i=this.get("imageNavEnabled");this._renderNavAndThumbs(),this.get("verticalThumbsOverlay")?(this._resizeFrame(e.get("offsetWidth"),t.get("offsetHeight")),this._resizeVerticalThumbs()):(this._resizeVerticalThumbs(),this._resizeFrame(e.get("offsetWidth"),t.get("offsetHeight"))),i&&this._positionImageNav(),this._positionLoadingImage()},_renderVerticalThumbs:function(){var e,i=this.get("responsiveThreshold"),s=this.get("boundingBox"),n=s.get("offsetWidth");this.get("verticalThumbsEnabled")&&n>i&&(this.verticalThumbs=new t.FL.SlideshowThumbs(this._getVerticalThumbsConfig()),this.add(this.verticalThumbs),this.verticalThumbs.render(s),e=this.verticalThumbs.get("boundingBox"),e.addClass("fl-slideshow-vertical-thumbs"),e.setStyle(this.get("verticalThumbsPosition"),0),s.append(e),this.get("verticalThumbsOverlay")?(this.verticalThumbs.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),hideStyle:"left"}),this.frame.get("boundingBox").append(e),this.verticalThumbs.resize()):(this.verticalThumbs.resize(),this._adjustContentForVerticalThumbs()),this._bindVerticalThumbs())},_getVerticalThumbsConfig:function(){var t=this.getAttrs(),e={columns:t.verticalThumbsColumns,rows:"auto",centerSinglePage:!1,horizontalSpacing:t.verticalThumbsHorizontalSpacing,verticalSpacing:t.verticalThumbsVerticalSpacing,spaceEvenly:t.verticalThumbsSpaceEvenly,rightNavEnabled:!1,leftNavEnabled:!1,topNavEnabled:t.verticalThumbsTopNavEnabled,topNavButtons:t.verticalThumbsTopNavButtons,bottomNavEnabled:t.verticalThumbsBottomNavEnabled,bottomNavButtons:t.verticalThumbsBottomNavButtons,pauseOnClick:t.verticalThumbsPauseOnClick,transition:t.verticalThumbsTransition,transitionDirection:t.verticalThumbsTransitionDirection,transitionEasing:t.verticalThumbsTransitionEasing,touchSupport:!0,imageConfig:{crop:t.verticalThumbsImageCrop,width:t.verticalThumbsImageWidth,height:t.verticalThumbsImageHeight}};return e},_bindVerticalThumbs:function(){var e=this.get("boundingBox"),i=this.get("overlayHideOnMousemove"),s=this.get("verticalThumbsOverlay"),n=this.verticalThumbs;n&&i&&s&&(this.frame.once("transitionComplete",n.slideshowOverlay.hideWithTimer,n.slideshowOverlay),e.on("mousemove",t.bind(this._toggleVerticalThumbs,this)),e.on("mouseenter",t.bind(this._toggleVerticalThumbs,this)))},_resizeVerticalThumbs:function(){var t,e,i,s,n,a,o,l,h=this.get("verticalThumbsEnabled");h&&(t=this.get("verticalThumbsOverlay"),e=this.get("responsiveThreshold"),i=this.get("boundingBox"),s=i.get("offsetWidth"),n=this.get("navOverlay"),a=this.get("navType"),o=this._getNav(),this.verticalThumbs&&s>e?(this.verticalThumbs.get("boundingBox").setStyle("display","block"),this.verticalThumbs.resize(),t?o&&n&&(l=o.get("boundingBox"),"thumbs"==a?(this._adjustOverlayForVerticalThumbs(l,!0),this.thumbs.resize()):this._adjustOverlayForVerticalThumbs(l)):this._adjustContentForVerticalThumbs()):!this.verticalThumbs&&s>e?this._renderVerticalThumbs():this.verticalThumbs&&s<=e&&(this.verticalThumbs.get("boundingBox").setStyle("display","none"),t||this.get("contentBox").setStyles({left:"auto",position:"relative",right:"auto",width:"auto"})))},_toggleVerticalThumbs:function(){this.verticalThumbs&&(this.verticalThumbs.slideshowOverlay._visible?this.verticalThumbs.slideshowOverlay.hideWithTimer():this.verticalThumbs.slideshowOverlay.show())},_adjustContentForVerticalThumbs:function(){var t=this.get("boundingBox"),e=this.verticalThumbs.get("boundingBox"),i=this.get("verticalThumbsPosition"),s=this.get("contentBox"),n="left"==i?"right":"left",a=t.get("offsetWidth")-e.get("offsetWidth");s.setStyle("position","absolute"),s.setStyle(n,0),s.setStyle("width",a)},_adjustOverlayForVerticalThumbs:function(t,e){var i=this.get("verticalThumbsEnabled"),s=this.get("verticalThumbsOverlay"),n=null,a=null,o="undefined"==typeof e?"":"margin-",l=0;this.verticalThumbs&&i&&s&&(n=this.verticalThumbs.get("boundingBox"),l=n.get("offsetWidth"),a=this.get("verticalThumbsPosition"),"left"==a?t.setStyle(o+"left",l+"px"):t.setStyle(o+"right",l+"px"))},_renderFrame:function(){this.frame=new t.FL.SlideshowFrame({imageConfig:{loadGroup:"main",loadPriority:!0,crop:this.get("crop"),cropHorizontalsOnly:this.get("cropHorizontalsOnly"),position:this.get("position"),protect:this.get("protect"),upsize:this.get("upsize"),showVideoButton:this.get("navOverlay")},touchSupport:this.get("touchSupport")}),this.add(this.frame),this.frame.render(this.get("contentBox")),this.frame.get("boundingBox").addClass("fl-slideshow-main-image"),this._setPlayingTimerEvent(this.frame,"transitionComplete"),this._loadingImageContainer=this.frame.get("contentBox")},_resizeFrame:function(t,e){var i=this.get("navOverlay"),s=this._getNav();s&&!i&&(e-=parseInt(s.get("boundingBox").getComputedStyle("height"),10)),this.frame.resize(t,e)},_loadFrame:function(e){var i=this.imageInfo.index,s=this.albumInfo.images,n=i+1>=s.length?0:i+1,a=this.frame.get("width"),o=this.frame.get("height");this.frame.load(e.imageInfo),t.FL.SlideshowImageLoader.removeGroup("main-preload"),this._nextImagePreloader.preload(s[n],a,o)},_frameClick:function(){var t=this.get("clickAction"),e=this.get("clickActionUrl");"url"==t?window.location.href=e:"gallery"==t&&(window.location.href=this.imageInfo.link)},_initMiniNav:function(){var t=[];this._hasNavButton("prev")&&t.push("prev"),(this._hasNavButton("thumbs")||"thumbs"==this.get("navType"))&&t.push("thumbs"),this._hasNavButton("caption")&&t.push("caption"),this._hasNavButton("social")&&t.push("social"),this._hasNavButton("buy")&&t.push("buy"),this._hasNavButton("play")&&t.push("play"),!this._hasNavButton("fullscreen")||"ontouchstart"in window||t.push("fullscreen"),this._hasNavButton("next")&&t.push("next"),this._initialNavSettings={buttons:this.get("navButtons"),buttonsLeft:this.get("navButtonsLeft"),buttonsRight:this.get("navButtonsRight"),type:this.get("navType")},this._set("navButtons",t),this._set("navButtonsLeft",[]),this._set("navButtonsRight",[]),this._set("navType","buttons")},_renderNavAndThumbs:function(){var t,e,i=this.get("navType"),s=!1;"buttons"!=i&&"thumbs"!=i||(t=this.get("boundingBox").get("offsetWidth"),e=this.get("responsiveThreshold"),t<=e&&null===this._initialNavSettings?(this._initMiniNav(),s=!0):t>e&&null!==this._initialNavSettings&&(this._set("navButtons",this._initialNavSettings.buttons),this._set("navButtonsLeft",this._initialNavSettings.buttonsLeft),this._set("navButtonsRight",this._initialNavSettings.buttonsRight),this._set("navType",this._initialNavSettings.type),this._initialNavSettings=null,s=!0),(s||null===this.nav)&&this._renderNav(),s||null===this.thumbs?this._renderThumbs():this._thumbsEnabled()&&this._resizeThumbs(),s&&null!==this.caption&&this._syncCaption(),s&&null!==this.social&&this._syncSocial())},_renderNav:function(){var e=this.frame.get("boundingBox"),i=null,s=this.get("navOverlay"),n=this.get("navPosition");this._destroyNav(),"buttons"==this.get("navType")&&(this.nav=new t.FL.SlideshowNav({buttons:this.get("navButtons"),buttonsLeft:this.get("navButtonsLeft"),buttonsRight:this.get("navButtonsRight")}),this.add(this.nav),this.nav.render(this.get("contentBox")),i=this.nav.get("boundingBox"),s&&(this.nav.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay")}),i.setStyle("position","absolute"),i.setStyle(n,"0px")),"top"==n?e.insert(i,"before"):e.insert(i,"after"),i.addClass("fl-slideshow-main-nav"))},_destroyNav:function(){if(null!==this.nav){this.nav.slideshowOverlay&&this.nav.slideshowOverlay.destroy(),this.nav.get("boundingBox").remove(),this.remove(this.nav);try{this.nav.destroy(!0)}catch(t){}this.nav=null}},_getNav:function(){var t=this.get("navType");return"buttons"==t?this.nav:"thumbs"==t?this.thumbs:null},_toggleNav:function(){var t=this._getNav();t.slideshowOverlay&&(t.slideshowOverlay._visible?t.slideshowOverlay.hideWithTimer():t.slideshowOverlay.show())},_renderImageNav:function(){var e;this.get("imageNavEnabled")&&(this._isMobile()?this._set("imageNavEnabled",!1):(e=this.get("boundingBox"),this.imageNavLeft=new t.FL.SlideshowNav({buttons:["prev"],useFontIcons:!1}),this.imageNavRight=new t.FL.SlideshowNav({buttons:["next"],useFontIcons:!1}),this.add(this.imageNavLeft),this.add(this.imageNavRight),this.imageNavLeft.render(this.frame.get("boundingBox")),this.imageNavRight.render(this.frame.get("boundingBox")),this.imageNavLeft.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay")}),this.imageNavRight.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay")}),this.get("overlayHideOnMousemove")&&(this.frame.once("transitionComplete",this.imageNavLeft.slideshowOverlay.hideWithTimer,this.imageNavLeft.slideshowOverlay),this.frame.once("transitionComplete",this.imageNavRight.slideshowOverlay.hideWithTimer,this.imageNavRight.slideshowOverlay),e.on("mousemove",t.bind(this._toggleImageNav,this)),e.on("mouseenter",t.bind(this._toggleImageNav,this))),this.imageNavLeft.get("boundingBox").addClass("fl-slideshow-image-nav-left"),this.imageNavRight.get("boundingBox").addClass("fl-slideshow-image-nav-right")))},_positionImageNav:function(){var t=this.imageNavLeft.get("boundingBox"),e=this.imageNavRight.get("boundingBox"),i=t.get("offsetHeight"),s=this.frame.get("boundingBox").get("offsetHeight"),n=s/2-i/2,a={top:n+"px",display:"block"};t.setStyles(a),e.setStyles(a),this._adjustOverlayForVerticalThumbs(t),this._adjustOverlayForVerticalThumbs(e)},_toggleImageNav:function(){this.imageNavLeft.slideshowOverlay._visible?this.imageNavLeft.slideshowOverlay.hideWithTimer():this.imageNavLeft.slideshowOverlay.show(),this.imageNavRight.slideshowOverlay._visible?this.imageNavRight.slideshowOverlay.hideWithTimer():this.imageNavRight.slideshowOverlay.show()},_renderMouseNav:function(){!this.get("mouseNavEnabled")||"ontouchstart"in window||window.navigator.msPointerEnabled||this.plug(t.FL.SlideshowMouseNav,{trigger:this.frame.get("boundingBox")})},_thumbsEnabled:function(){var t=this.get("navType");return"thumbs"==t||!("buttons"!=t&&"custom"!=t||!this._hasNavButton("thumbs"))},_renderThumbs:function(){var e,i,s,n;if(this._destroyThumbs(),this._thumbsEnabled()){e=this.frame.get("boundingBox"),i=this.get("navOverlay"),s=this.get("navPosition"),n=this.get("navType"),this.thumbs=new t.FL.SlideshowThumbs(this._getThumbsConfig());try{this.add(this.thumbs)}catch(a){}"buttons"==n||"custom"==n?this.thumbs.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),hideStyle:"left",visible:!1}):"thumbs"==n&&i&&this.thumbs.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),hideStyle:"left"}),this.thumbs.render(this.get("contentBox")),"top"==s?e.insert(this.thumbs.get("boundingBox"),"before"):e.insert(this.thumbs.get("boundingBox"),"after"),this.get("thumbsHideOnClick")&&"thumbs"!=n&&this.thumbs.on("imageClick",t.bind(this._hideThumbsOnImageClick,this)),this._syncThumbs()}},_destroyThumbs:function(){if(null!==this.thumbs){this.thumbs.slideshowOverlay&&this.thumbs.slideshowOverlay.destroy(),this.thumbs.get("boundingBox").remove(),this.remove(this.thumbs);try{this.thumbs.destroy(!0)}catch(t){}this.thumbs=null}},_syncThumbs:function(){var t=this.thumbs.get("boundingBox"),e=this.get("navOverlay"),i=this.get("navPosition"),s=this.get("navType"),n="padding"+i.charAt(0).toUpperCase()+i.slice(1),a=0;"buttons"==s&&(a=parseInt(this.nav.get("boundingBox").getComputedStyle("height"),10),t.setStyle("position","absolute"),e?(t.setStyle(n,a+"px"),t.setStyle(i,"0px")):t.setStyle(i,a+"px")),("custom"==s||"thumbs"==s&&e)&&(t.setStyle("position","absolute"),t.setStyle(i,"0px")),this.thumbs.resize()},_getThumbsConfig:function(){var t=this.getAttrs(),e=this.get("navType"),i={crop:t.thumbsImageCrop,width:t.thumbsImageWidth,height:t.thumbsImageHeight},s={columns:"auto",rows:1,horizontalSpacing:t.thumbsHorizontalSpacing,verticalSpacing:t.thumbsVerticalSpacing,spaceEvenly:t.thumbsSpaceEvenly,centerSinglePage:t.thumbsCenterSinglePage,pauseOnClick:t.thumbsPauseOnClick,transition:t.thumbsTransition,transitionDirection:t.thumbsTransitionDirection,transitionEasing:t.thumbsTransitionEasing,leftNavButtons:t.navButtonsLeft,rightNavButtons:t.navButtonsRight,imageConfig:i,touchSupport:!0};return"buttons"!=e&&"custom"!=e||("ontouchstart"in window?(s.leftNavEnabled=!1,s.rightNavEnabled=!1):(s.centerSinglePage=!1,s.leftNavButtons=["prevPage"],s.rightNavButtons=["nextPage"])),s},_resizeThumbs:function(){this.thumbs&&this.thumbs.resize()},_toggleThumbs:function(){this._toggleOverlay(this.thumbs.slideshowOverlay)},_hideThumbsOnImageClick:function(){this.thumbs.slideshowOverlay&&(this.thumbs.slideshowOverlay._focus=!1,this.thumbs.slideshowOverlay.enable(),this.thumbs.slideshowOverlay.hide(),this.nav&&this.nav.slideshowOverlay&&this.nav.slideshowOverlay.enable())},_renderCaption:function(){this._hasNavButton("caption")&&(this.caption=new t.FL.SlideshowCaption({lessLinkText:this.get("captionLessLinkText"),moreLinkText:this.get("captionMoreLinkText"),textLength:this.get("captionTextLength"),stripTags:this.get("captionStripTags")}),this.add(this.caption),this.caption.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),visible:!1,closeButton:!0}),this._syncCaption())},_syncCaption:function(){var t=this.caption.get("boundingBox"),e=this.get("navOverlay"),i=this.get("navPosition"),s=this._getNav(),n="padding"+i.charAt(0).toUpperCase()+i.slice(1),a=0;t.setStyle("position","absolute"),s&&(a=parseInt(s.get("boundingBox").getComputedStyle("height"),10)),s&&e?(t.setStyle(n,a+"px"),t.setStyle(i,"0px")):t.setStyle(i,a+"px")},_toggleCaption:function(){this._toggleOverlay(this.caption.slideshowOverlay)},_renderSocial:function(){this._hasNavButton("social")&&(this.social=new t.FL.SlideshowSocial,this.add(this.social),this.social.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),visible:!1,closeButton:!0}),this._syncSocial())},_syncSocial:function(){var t=this.social.get("boundingBox"),e=this.get("navOverlay"),i=this.get("navPosition"),s=this._getNav(),n="padding"+i.charAt(0).toUpperCase()+i.slice(1),a=0;t.setStyle("position","absolute"),s&&(a=parseInt(s.get("boundingBox").getComputedStyle("height"),10)),s&&e?(t.setStyle(n,a+"px"),t.setStyle(i,"0px")):t.setStyle(i,a+"px")},_toggleSocial:function(){this._toggleOverlay(this.social.slideshowOverlay)},_toggleOverlay:function(t){var e=this.get("navType"),i=this._getNav();t._visible?(i&&i.slideshowOverlay&&i.slideshowOverlay.enable(),t.enable(),t.hide()):(i&&i.slideshowOverlay&&i.slideshowOverlay.disable(),t.show(),t.disable()),this.thumbs&&"thumbs"!=e&&this.thumbs.slideshowOverlay!==t&&(this.thumbs.slideshowOverlay.enable(),this.thumbs.slideshowOverlay.hide()),this.caption&&this.caption.slideshowOverlay!==t&&(this.caption.slideshowOverlay.enable(),this.caption.slideshowOverlay.hide()),this.social&&this.social.slideshowOverlay!==t&&(this.social.slideshowOverlay.enable(),this.social.slideshowOverlay.hide())},_overlayCloseClick:function(){this.nav&&this.nav.slideshowOverlay&&this.nav.slideshowOverlay.enable(),this.thumbs&&this.thumbs.slideshowOverlay&&this.thumbs.slideshowOverlay.enable(),this.caption&&this.caption.slideshowOverlay.enable(),this.social&&this.social.slideshowOverlay.enable(),this.imageNavLeft&&(this.imageNavLeft.slideshowOverlay.enable(),this.imageNavRight.slideshowOverlay.enable())},_hideAllOverlays:function(){this.nav&&this.nav.slideshowOverlay&&this.nav.slideshowOverlay._visible&&(this.nav.slideshowOverlay.enable(),this.nav.slideshowOverlay.hideWithTimer()),this.thumbs&&this.thumbs.slideshowOverlay&&this.thumbs.slideshowOverlay._visible&&(this.thumbs.slideshowOverlay.enable(),this.thumbs.slideshowOverlay.hideWithTimer()),this.caption&&this.caption.slideshowOverlay._visible&&(this.caption.slideshowOverlay.enable(),this.caption.slideshowOverlay.hideWithTimer()),this.social&&this.social.slideshowOverlay._visible&&(this.social.slideshowOverlay.enable(),this.social.slideshowOverlay.hideWithTimer()),this.imageNavLeft&&(this.imageNavLeft.slideshowOverlay.enable(),this.imageNavLeft.slideshowOverlay.hideWithTimer(),this.imageNavRight.slideshowOverlay.enable(),this.imageNavRight.slideshowOverlay.hideWithTimer())},_checkOverlaysOnMouseenter:function(){var t=this.get("navType"),e=this.get("navOverlay"),i=this._getNav(),s=!1;this.thumbs&&"thumbs"!=t&&this.thumbs.slideshowOverlay._visible?(s=!0,this.thumbs.slideshowOverlay.disable()):this.caption&&this.caption.slideshowOverlay._visible?(s=!0,this.caption.slideshowOverlay.disable()):this.social&&this.social.slideshowOverlay._visible&&(s=!0,this.social.slideshowOverlay.disable()),i&&s&&e&&i.slideshowOverlay.disable()},_hasNavButton:function(e){var i=this.get("navType");return("buttons"==i||"thumbs"==i||"custom"==i)&&(t.Array.indexOf(this.get("navButtons"),e)>-1||(t.Array.indexOf(this.get("navButtonsLeft"),e)>-1||t.Array.indexOf(this.get("navButtonsRight"),e)>-1))},_removeNavButton:function(e){var i=this.get("navButtons"),s=this.get("navButtonsLeft"),n=this.get("navButtonsRight"),a=this.get("verticalThumbsTopNavButtons"),o=this.get("verticalThumbsBottomNavButtons");t.Array.indexOf(i,e)>-1&&i.splice(t.Array.indexOf(i,e),1),t.Array.indexOf(s,e)>-1&&s.splice(t.Array.indexOf(s,e),1),t.Array.indexOf(n,e)>-1&&n.splice(t.Array.indexOf(n,e),1),t.Array.indexOf(a,e)>-1&&a.splice(t.Array.indexOf(a,e),1),t.Array.indexOf(o,e)>-1&&o.splice(t.Array.indexOf(o,e),1),this._set("navButtons",i),this._set("navButtonsLeft",s),this._set("navButtonsRight",n),this._set("verticalThumbsTopNavButtons",a),this._set("verticalThumbsBottomNavButtons",o)}},{CSS_PREFIX:"fl-slideshow",ATTRS:{clickAction:{value:"none"},clickActionUrl:{value:""},crop:{value:!1},cropHorizontalsOnly:{value:!1},loadingImageAlwaysEnabled:{value:!0},position:{value:"center center"},protect:{value:!0},upsize:{value:!0},transition:{value:"fade"},transitionDuration:{value:1},transitionEasing:{value:"ease-out"},kenBurnsZoom:{value:1.2},navType:{value:"none"},navPosition:{value:"bottom"},navOverlay:{value:!1},navButtons:{value:[]},navButtonsLeft:{value:[]},navButtonsRight:{value:[]},overlayHideOnMousemove:{value:!0},overlayHideDelay:{value:3e3},imageNavEnabled:{value:!1},mouseNavEnabled:{value:!1},thumbsHideOnClick:{value:!0},thumbsHorizontalSpacing:{value:15},thumbsVerticalSpacing:{value:15},thumbsSpaceEvenly:{value:!0},thumbsCenterSinglePage:{value:!0},thumbsPauseOnClick:{value:!1},thumbsTransition:{value:"slideHorizontal"},thumbsTransitionDuration:{value:.8},thumbsTransitionEasing:{value:"ease-out"},thumbsImageCrop:{value:!0},thumbsImageWidth:{value:50},thumbsImageHeight:{value:50},captionLessLinkText:{value:"Read Less"},captionMoreLinkText:{value:"Read More"},captionTextLength:{value:200},captionStripTags:{value:!1},verticalThumbsEnabled:{value:!1},verticalThumbsPosition:{value:"left"},verticalThumbsOverlay:{value:!1},verticalThumbsColumns:{value:1},verticalThumbsTopNavEnabled:{value:!1},verticalThumbsTopNavButtons:{value:["prevPage","nextPage"]},verticalThumbsBottomNavEnabled:{value:!0},verticalThumbsBottomNavButtons:{value:["prevPage","nextPage"]},verticalThumbsHorizontalSpacing:{value:15},verticalThumbsVerticalSpacing:{value:15},verticalThumbsSpaceEvenly:{value:!1},verticalThumbsPauseOnClick:{value:!1},verticalThumbsImageCrop:{value:!0},verticalThumbsImageWidth:{value:75},verticalThumbsImageHeight:{value:75},verticalThumbsTransition:{value:"slideVertical"},verticalThumbsTransitionDuration:{value:.8},verticalThumbsTransitionEasing:{value:"ease-out"},googlePlusButtonEnabled:{value:!0},likeButtonEnabled:{value:!0},pinterestButtonEnabled:{value:!0},tweetButtonEnabled:{value:!0},touchSupport:{value:!0}}})},"2.0.0",{requires:["anim","event-mouseenter","plugin","transition","fl-event-move","fl-slideshow-css","fl-slideshow-base","fl-utils","sm-fonticon"]}),YUI.add("fl-slideshow-album-loader",function(t){t.namespace("FL").SlideshowAlbumLoader=t.Base.create("fl-slideshow-album-loader",t.Base,[],{_source:null,load:function(e){this._source=e,this.fire("start"),this[t.FL.SlideshowAlbumLoader.TYPES[e.type]].call(this)},_loadComplete:function(t){t=this._randomize(t),this.fire("complete",t)},_randomize:function(t){var e;if(this.get("randomize"))for(t.albumInfo.images.sort(function(){return.5-Math.random()}),e=0;e"+s.images[r].caption+""),u=g.one("iframe"),u&&(s.images[r].iframe=u.getAttribute("src"),s.images[r].caption=s.images[r].caption.replace(/.*<\/iframe>/gi,"")));this._loadComplete({albumInfo:s})},_loadUrls:function(){var t={},e=0;for(t.index=this._source.index,t.title=this._source.title?this._source.title:"",t.images=[];e=this.albumInfo.images.length?0:t,this.lastImageIndex=this.imageIndex,this.imageIndex=t,this.imageInfo=this.albumInfo.images[t],this.fire("imageLoadComplete",{imageInfo:this.imageInfo})},prevImage:function(){this.get("pauseOnNextOrPrev")&&this.pause(),this.loadImage(this.imageIndex-1),this.fire("prevImage")},nextImage:function(){this.get("pauseOnNextOrPrev")&&this.pause(),this.loadImage(this.imageIndex+1),this.fire("nextImage")},_onKey:function(t){switch(t.keyCode){case 37:this.prevImage();break;case 39:this.nextImage()}},resize:function(){var e=this.get("stretchy"),i=this.get("stretchyType"),s=parseInt(t.one("body").get("winWidth"),10),n=this.get("responsiveThreshold");s>n&&e&&"window"==i?this._stretchyWindowResize():s<=n||e&&"ratio"==i?this._stretchyRatioResize():this._standardResize(),this.fire("resize")},_standardResize:function(){var e=this.get("stretchy"),i=this.get("stretchyType"),s=this.get("boundingBox"),n=s.get("parentNode"),a=parseInt(n.getComputedStyle("height"),10),o=parseInt(n.getComputedStyle("width"),10),l=this.get("height"),h=this.get("width");if(s.hasClass("fl-fullscreen-active"))return void this._stretchyWindowResize();if(e&&"contain"==i)s.setStyle("height",a+"px"),s.setStyle("width",o+"px");else{if(!t.Lang.isNumber(l))return void this._stretchyRatioResize();s.setStyle("height",l+"px"),h?s.setStyle("width",h+"px"):s.setStyle("width",o+"px")}},_stretchyWindowResize:function(){var e=this.get("boundingBox"),i=this.get("stretchyVerticalSpace"),s=parseInt(e.getStyle("paddingTop"),10),n=parseInt(e.getStyle("paddingBottom"),10),a=parseInt(t.one("body").get("winHeight"),10),o="";e.hasClass("fl-fullscreen-active")&&(i=0,o=parseInt(t.one("body").get("winWidth"),10)+"px"),a=a-s-n-i+"px",e.setStyle("height",a),e.setStyle("width",o)},_stretchyRatioResize:function(){var e=this.get("boundingBox"),i=e.get("parentNode"),s=0,n=this.get("stretchyRatio"),a=parseInt(e.getStyle("paddingTop"),10),o=parseInt(e.getStyle("paddingBottom"),10),l=parseInt(i.getComputedStyle("width"),10),h=parseInt(t.one("body").get("winHeight"),10),r=parseInt(t.one("body").get("winWidth"),10),g=l*n,u="";e.hasClass("fl-fullscreen-active")&&(g=h,u=r),g=g-a-o-s+"px",e.setStyle("height",g),e.setStyle("width",u)},_delayResize:function(){this._resizeTimer&&this._resizeTimer.cancel(),this._resizeTimer=t.later(300,this,this.resize)},play:function(){this._playingTimer=t.later(this.get("speed"),this,this._playingTimerComplete),this.fire("played"),this._playing=!0},pause:function(){this._playingTimerCancel(),this.fire("paused"),this._playing=!1},_setPlayingTimerEvent:function(t,e){this._playingTimerEvent={obj:t,e:e}},_playingTimerStart:function(e){this._playingTimerCancel(),e||null===this._playingTimerEvent?this._playingTimer=t.later(this.get("speed"),this,this._playingTimerComplete):this._playingTimerEvent.obj.once("fl-slideshow-base|"+this._playingTimerEvent.e,t.bind(this._playingTimerStart,this))},_playingTimerComplete:function(){this.loadImage(this.imageIndex+1),this.fire("playingTimerComplete")},_playingTimerCancel:function(){this._playingTimer&&this._playingTimer.cancel(),this._playingTimerEvent&&this._playingTimerEvent.obj.detach("fl-slideshow-base|"+this._playingTimerEvent.e)},_renderLoadingImage:function(){var e={lines:11,length:6,width:2,radius:7,color:"",speed:1,trail:60,shadow:!1},i=t.merge(e,this.get("loadingImageSettings"));this.get("loadingImageEnabled")&&(""===i.color&&(i.color=this._colorToHex(t.one("body").getStyle("color"))),this._loadingImage=new t.FL.Spinner(i),this._loadingImageWrap=t.Node.create('
'),this._loadingImageWrap.setStyles({position:"absolute","z-index":"1000"}))},_showLoadingImage:function(){this._loadingImage&&!this._loadingImageVisible&&(this._loadingImageVisible=!0,this._loadingImage.spin(),this._loadingImageWrap.insert(this._loadingImage.el), null!==this._loadingImageContainer?this._loadingImageContainer.insert(this._loadingImageWrap):this.get("contentBox").insert(this._loadingImageWrap),this._positionLoadingImage())},_showLoadingImageWithDelay:function(){this._loadingImage&&(this._loadingImageTimer=t.later(1e3,this,this._showLoadingImage))},_hideLoadingImage:function(){this._loadingImageTimer&&(this._loadingImageTimer.cancel(),this._loadingImageTimer=null),this._loadingImage&&this._loadingImageVisible&&(this._loadingImageVisible=!1,this._loadingImage.stop(),this._loadingImageWrap.remove())},_positionLoadingImage:function(){if(this._loadingImage&&this._loadingImageVisible){var e=this._loadingImageWrap,i=parseInt(e.getComputedStyle("height"),10),s=parseInt(e.getComputedStyle("width"),10),n=e.get("parentNode"),a=parseInt(n.getComputedStyle("height"),10),o=parseInt(n.getComputedStyle("width"),10),l=(o-s)/2,h=(a-i)/2;e.setStyles({left:l+"px",top:h+"px"}),t.one(this._loadingImage.el).setStyles({left:"50%",top:"50%"})}},_colorToHex:function(t){var e,i,s,n,a;return"#"===t.substr(0,1)?t:(e=/(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(t),null===e?"#000":(i=parseInt(e[2],10),s=parseInt(e[3],10),n=parseInt(e[4],10),a=n|s<<8|i<<16,a=a.toString(16),"0"===a&&(a="000"),e[1]+"#"+a))}},{CSS_PREFIX:"fl-slideshow-base",ATTRS:{color:{value:"dark",writeOnce:!0},source:{value:[],setter:function(t){t.constructor==Object&&(t=[t]);for(var e=0;e0)return!1;if("transform"==e&&t.UA.ie>0&&t.UA.ie<10)return!1;if("transform"==e&&navigator.userAgent.match(/Trident/))return!1;if("undefined"==typeof s)return!1;if("string"==typeof s[e])return!0;for(e=e.charAt(0).toUpperCase()+e.substr(1);a