function onYouTubeIframeAPIReady(){slideshow_jquery_image_gallery_script.youTubeAPIReady=!0}slideshow_jquery_image_gallery_backend_script_scriptsloadedFlag=!1,slideshow_jquery_image_gallery_script=function(){var e=jQuery,i={};return i.slideshowInstances={},i.initialized=!1,i.youTubeAPIReady=!1,i.sessionIDCounter=0,i.init=function(){slideshow_jquery_image_gallery_backend_script_scriptsloadedFlag!==!0||i.initialized||(i.initialized=!0,e(document).trigger("slideshow_jquery_image_gallery_script_ready"),i.repairStylesheetURLs(),i.activateSlideshows(),i.enableLazyLoading(),e(document).trigger("slideshow_jquery_image_gallery_slideshows_ready"))},i.getSlideshowInstance=function(t){if(isNaN(parseInt(t,10))){if(t instanceof e&&t.length>0)for(var s in i.slideshowInstances)if(i.slideshowInstances.hasOwnProperty(s)){var n=i.slideshowInstances[s];if(n instanceof i.Slideshow&&n.$container.get(0)===t.get(0))return n}}else if(i.slideshowInstances[t]instanceof i.Slideshow)return i.slideshowInstances[t];return new i.Slideshow},i.activateSlideshows=function(){e.each(e(".slideshow_container"),function(t,s){i.activateSlideshow(e(s))})},i.activateSlideshow=function(e){e.hasClass("slideshow_container")&&"1"!=e.attr("data-slideshow-active")&&(e.attr("data-slideshow-active","1"),i.slideshowInstances[i.sessionIDCounter]=new i.Slideshow(e),i.sessionIDCounter++)},i.enableLazyLoading=function(){var t;"function"==typeof MutationObserver?(t=new MutationObserver(function(t){t.forEach(function(t){var s;if(t.addedNodes)for(s=0;s0?a.get(0).complete?this.viewData[t][s].loaded=1:(t===this.currentViewID&&(h=!1),this.viewData[t][s].loaded=0,this.onImageLoad(a,i.proxy(function(i){this.viewData[t][s].loaded=i?1:2,this.settings.waitUntilLoaded&&t===this.currentViewID&&this.isViewLoaded(t)&&this.start()},this))):this.viewData[t][s].loaded=-1}else this.viewData[t][s].loaded=-1;n.hasClass("slideshow_slide_video")&&slideshow_jquery_image_gallery_script.loadYouTubeAPI()},this))},this)),i(window).load(i.proxy(function(){this.recalculate(!0)},this)),parseFloat(this.settings.intervalSpeed)0&&this.$loadingIcon.remove(),this.$content.show(),this.recalculateViews(),this.settings.enableResponsiveness&&t(window).resize(t.proxy(function(){this.recalculate(!0)},this)),this.playState=this.PlayStates.PAUSED,this.$container.trigger("slideshowPlayStateChange",[this.playState]),this.settings.play&&this.play()},i.Slideshow.prototype.play=function(){this.interval||(this.playState=this.PlayStates.PLAYING,this.$container.trigger("slideshowPlayStateChange",[this.playState]),this.interval=setInterval(t.proxy(function i(e,s){void 0===s&&(s=this),void 0===e&&(e=s.getNextViewID()),s.isViewLoaded(e)?(s.animateTo(e,1),s.play()):(s.pause(this.PlayStates.TEMPORARILY_PAUSED),setTimeout(t.proxy(function(){i(e,s)},s),100))},this),1e3*this.settings.intervalSpeed))},i.Slideshow.prototype.pause=function(t){clearInterval(this.interval),this.interval=!1,t!==this.PlayStates.PAUSED&&t!==this.PlayStates.TEMPORARILY_PAUSED&&(t=this.PlayStates.PAUSED),this.playState=t,this.$container.trigger("slideshowPlayStateChange",[this.playState])},i.Slideshow.prototype.next=function(){this.playState===this.PlayStates.PLAYING&&(this.pause(this.PlayStates.TEMPORARILY_PAUSED),this.play()),this.animateTo(this.getNextViewID(),1)},i.Slideshow.prototype.previous=function(){this.playState===this.PlayStates.PLAYING&&(this.pause(this.PlayStates.TEMPORARILY_PAUSED),this.play()),this.animateTo(this.getPreviousViewID(),-1)},i.Slideshow.prototype.isVideoPlaying=function(){for(var t in this.videoPlayers)if(this.videoPlayers.hasOwnProperty(t)){var i=this.videoPlayers[t].state;if(1==i||3==i)return!0}return!1},i.Slideshow.prototype.pauseAllVideos=function(){for(var t in this.videoPlayers)if(this.videoPlayers.hasOwnProperty(t)){var i=this.videoPlayers[t].player;null!=i&&"function"==typeof i.pauseVideo&&-1!=this.videoPlayers[t].state&&(this.videoPlayers[t].state=2,i.pauseVideo())}},i.Slideshow.prototype.isViewLoaded=function(i){var e=!0;return isNaN(parseInt(i,10))?!1:(t.each(this.viewData[i],t.proxy(function(t,i){0==i.loaded&&(e=!1)},this)),e)},i.Slideshow.prototype.getNaturalImageSize=function(i,e,s){return i.length<=0||!(i instanceof t)||"string"!=typeof i.attr("src")?(e(-1,-1,s),void 0):(this.onImageLoad(i,t.proxy(function(t,i){e(i.width,i.height,s)},this)),void 0)},i.Slideshow.prototype.onImageLoad=function(i,e,s){var a=new Image;return i.length<=0||!(i instanceof t)||"string"!=typeof i.attr("src")?(e(!1,a,s),void 0):(a.onload=t.proxy(function(){e(!0,a,s)},this),a.src=i.attr("src"),void 0)},i.Slideshow.prototype.getNextViewID=function(){var t=this.currentViewID;if(this.settings.random){var i=t;if(t=this.getNextRandomViewID(),t!=i)return t}return isNaN(parseInt(t,10))?0:t>=this.$views.length-1?this.settings.loop?0:this.currentViewID:t+1},i.Slideshow.prototype.getPreviousViewID=function(){var t=this.currentViewID;if(isNaN(parseInt(t,10))&&(t=0),this.settings.random){var i=t;if(t=this.getPreviousRandomViewID(),t!=i)return t}return 0>=t?this.settings.loop?t=this.$views.length-1:this.currentViewID:t-=1},i.Slideshow.prototype.getNextRandomViewID=function(){if(isNaN(parseInt(this.currentViewID,10))||this.randomPreviousHistoryViewIDs.push(this.currentViewID),this.randomPreviousHistoryViewIDs.length>2*this.viewIDs.length&&this.randomPreviousHistoryViewIDs.shift(),this.randomNextHistoryViewIDs.length>0)return this.randomNextHistoryViewIDs.pop();if(void 0===this.randomAvailableViewIDs||this.randomAvailableViewIDs.length<=0){this.randomAvailableViewIDs=t.extend(!0,[],this.viewIDs);var i=t.inArray(this.currentViewID,this.randomAvailableViewIDs);i>=0&&this.randomAvailableViewIDs.splice(i,1)}return this.randomAvailableViewIDs.splice(Math.floor(Math.random()*this.randomAvailableViewIDs.length),1).pop()},i.Slideshow.prototype.getPreviousRandomViewID=function(){return isNaN(parseInt(this.currentViewID,10))||this.randomNextHistoryViewIDs.push(this.currentViewID),this.randomNextHistoryViewIDs.length>2*this.viewIDs.length&&this.randomNextHistoryViewIDs.shift(),this.randomPreviousHistoryViewIDs.length>0?this.randomPreviousHistoryViewIDs.pop():this.viewIDs[Math.floor(Math.random()*this.viewIDs.length)]},i.Slideshow.prototype.getSlideshowID=function(){var t=this.$container.data("slideshowId");return isNaN(parseInt(t,10))&&(t=this.$container.attr("data-slideshow-id")),t},i.Slideshow.prototype.bindSubmitListener=function(i){i.keypress(t.proxy(function(i){var e=i.keyCode||i.which;13===e&&(i.preventDefault(),t(i.currentTarget).click())},this))}}(); !function(){var e=jQuery,t=slideshow_jquery_image_gallery_script;t.Slideshow.prototype.animateTo=function(t,s){if(!(this.isVideoPlaying()||0>t||t>=this.$views.length||t==this.currentViewID)){if(this.currentlyAnimating===!0)return this.$container.one("slideshowAnimationEnd",e.proxy(function(){this.playState===this.PlayStates.PLAYING&&(this.pause(this.PlayStates.TEMPORARILY_PAUSED),this.play()),this.animateTo(t,s)},this)),void 0;this.currentlyAnimating=!0,(isNaN(parseInt(s,10))||0==s)&&(s=ts&&(i=o[i]);var d=e(this.$views[this.currentViewID]),a=e(this.$views[t]);switch(d.stop(!0,!0),a.stop(!0,!0),a.addClass("slideshow_nextView"),this.recalculateVisibleViews(),this.currentViewID=t,this.$container.trigger("slideshowAnimationStart",[t,i,s]),i){case"slide":a.css({top:0,left:this.$content.width()}),d.animate({left:-d.outerWidth(!0)},1e3*this.settings.slideSpeed),a.animate({left:0},1e3*this.settings.slideSpeed),setTimeout(e.proxy(function(){d.stop(!0,!0).css("top",this.$container.outerHeight(!0))},this),1e3*this.settings.slideSpeed);break;case"slideRight":a.css({top:0,left:-this.$content.width()}),d.animate({left:d.outerWidth(!0)},1e3*this.settings.slideSpeed),a.animate({left:0},1e3*this.settings.slideSpeed),setTimeout(e.proxy(function(){d.stop(!0,!0).css("top",this.$container.outerHeight(!0))},this),1e3*this.settings.slideSpeed);break;case"slideUp":a.css({top:this.$content.height(),left:0}),d.animate({top:-d.outerHeight(!0)},1e3*this.settings.slideSpeed),a.animate({top:0},1e3*this.settings.slideSpeed),setTimeout(e.proxy(function(){d.stop(!0,!0).css("top",this.$container.outerHeight(!0))},this),1e3*this.settings.slideSpeed);break;case"slideDown":a.css({top:-this.$content.height(),left:0}),d.animate({top:d.outerHeight(!0)},1e3*this.settings.slideSpeed),a.animate({top:0},1e3*this.settings.slideSpeed),setTimeout(e.proxy(function(){d.stop(!0,!0).css("top",this.$container.outerHeight(!0))},this),1e3*this.settings.slideSpeed);break;case"fade":a.css({top:0,left:0,display:"none"}),d.fadeOut(1e3*this.settings.slideSpeed/2),setTimeout(e.proxy(function(){a.fadeIn(1e3*this.settings.slideSpeed/2),d.stop(!0,!0).css({top:this.$container.outerHeight(!0),display:"block"})},this),1e3*this.settings.slideSpeed/2);break;case"directFade":a.css({top:0,left:0,"z-index":0,display:"none"}),d.css({"z-index":1}),a.stop(!0,!0).fadeIn(1e3*this.settings.slideSpeed),d.stop(!0,!0).fadeOut(1e3*this.settings.slideSpeed),setTimeout(e.proxy(function(){a.stop(!0,!0).css({"z-index":0}),d.stop(!0,!0).css({top:this.$container.outerHeight(!0),display:"block","z-index":0})},this),1e3*this.settings.slideSpeed);break;case"crossFade":a.css({top:0,left:0,"z-index":1,display:"none"}),d.css({"z-index":0}),a.stop(!0,!0).fadeIn(1e3*this.settings.slideSpeed),setTimeout(e.proxy(function(){d.css({top:this.$container.outerHeight(!0)}),a.css({"z-index":1})},this),1e3*this.settings.slideSpeed)}setTimeout(e.proxy(function(){d.removeClass("slideshow_currentView").find("a").attr("tabindex","-1"),a.removeClass("slideshow_nextView"),a.addClass("slideshow_currentView").find("a").attr("tabindex","0"),this.visibleViews=[t],this.currentlyAnimating=!1,this.$container.trigger("slideshowAnimationEnd")},this),1e3*this.settings.slideSpeed)}}}(); !function(){var t=jQuery,i=slideshow_jquery_image_gallery_script;i.Slideshow.prototype.recalculate=function(i){if(!this.$container.is(":visible"))return setTimeout(t.proxy(function(){this.recalculate(i)},this),500),void 0;for(var e=this.$parentElement,h=0;e.width()<=0&&(e=e.parent(),!(h>50));h++);if(this.currentWidth!=e.width()){this.currentWidth=e.width();var s=e.width()-(this.$container.outerWidth()-this.$container.width());if(parseInt(this.settings.maxWidth,10)>0&&parseInt(this.settings.maxWidth,10)=i||0>=h?(setTimeout(t.proxy(function(){this.recalculateView(e,!0)},this),500),void 0):(s=a.width()/a.height(),r=(i+p)/(h+m),r>=s?"natural"===this.settings.imageBehaviour?(v.css({margin:"0px",width:_,height:Math.round(_/r)}),v.attr({width:_,height:Math.round(_/r)})):"crop"===this.settings.imageBehaviour&&(v.css({"margin-top":"0px","margin-left":-Math.floor((x*r-_)/2),height:x,width:Math.floor(x*r)}),v.attr({width:Math.floor(x*r),height:x})):"natural"===this.settings.imageBehaviour?(v.css({"margin-left":"auto","margin-right":"auto",display:"block",width:Math.round(x*r),height:x}),v.attr({width:Math.round(x*r),height:x})):"crop"===this.settings.imageBehaviour&&(v.css({"margin-top":-Math.floor((_/r-x)/2),"margin-left":"0px",width:_,height:Math.floor(_/r)}),v.attr({width:_,height:Math.floor(_/r)})),void 0)},this))}else if(a.hasClass("slideshow_slide_video")){var M=a.find("iframe");if(M.length>0)M.attr({width:a.width(),height:a.height()});else var W=setInterval(t.proxy(function(){if(i.youTubeAPIReady){clearInterval(W);var e=a.find(".slideshow_slide_video_id");e.attr("id","slideshow_slide_video_"+Math.floor(1e6*Math.random())+"_"+e.text());var h=e.attr("data-show-related-videos"),s=new YT.Player(e.attr("id"),{width:a.width(),height:a.height(),videoId:e.text(),playerVars:{wmode:"opaque",rel:h},events:{onReady:function(){},onStateChange:t.proxy(function(t){this.videoPlayers[e.attr("id")].state=t.data},this)}}),r=t("#"+e.attr("id"));r.show(),r.attr("src",r.attr("src")+"&wmode=opaque"),this.videoPlayers[e.attr("id")]={player:s,state:-1}}},this),500)}c+=a.outerWidth(!0)},this)),s.css({width:a,height:o})}}}}(); !function(){var t=jQuery,i=slideshow_jquery_image_gallery_script;i.Slideshow.prototype.activateDescriptions=function(){this.settings.showDescription&&(t.each(this.$slides.find(".slideshow_description_box"),t.proxy(function(i,s){var e=t(s);e.show(),this.settings.hideDescription?e.css({position:"absolute",top:this.$container.outerHeight(!0)}):e.css({position:"absolute",bottom:0})},this)),this.settings.hideDescription&&(this.$container.bind("slideshowResize",t.proxy(function(){t.each(this.$container.find(".slideshow_description_box"),t.proxy(function(i,s){t(s).css("top",this.$container.outerHeight(!0))},this))},this)),this.$container.bind("slideshowAnimationStart",t.proxy(function(){void 0!=this.visibleViews[1]&&t.each(t(this.$views[this.visibleViews[1]]).find(".slideshow_description_box"),t.proxy(function(i,s){t(s).css("top",this.$container.outerHeight(!0))},this))},this)),this.$slides.mouseenter(t.proxy(function(i){var s=t(i.currentTarget).find(".slideshow_description_box");this.descriptionTimer=setTimeout(t.proxy(function(){this.descriptionTimer="",s.stop(!0,!1).animate({top:this.$container.outerHeight(!0)-s.outerHeight(!0)},parseInt(1e3*this.settings.descriptionSpeed,10))},this),200)},this)),this.$slides.mouseleave(t.proxy(function(i){this.descriptionTimer!==!1&&(clearInterval(this.descriptionTimer),this.descriptionTimer=!1),t(i.currentTarget).find(".slideshow_description_box").stop(!0,!1).animate({top:this.$container.outerHeight(!0)},parseInt(1e3*this.settings.descriptionSpeed,10))},this))))},i.Slideshow.prototype.activateNavigationButtons=function(){var i,s;this.settings.controllable&&(i=this.$nextButton.data("nextText"),s=this.$previousButton.data("previousText"),("string"!=typeof i||"string"!=typeof s||i.length<=0||s.length<=0)&&(i=this.$nextButton.attr("data-next-text"),s=this.$previousButton.attr("data-previous-text")),this.$nextButton.html(''+i+"").attr({tabindex:"0",title:i}),this.$previousButton.html(''+s+"").attr({tabindex:"0",title:s}),this.$nextButton.click(t.proxy(function(){this.currentlyAnimating||(this.pauseAllVideos(),this.playState===this.PlayStates.PLAYING&&(this.pause(this.PlayStates.TEMPORARILY_PAUSED),this.play()),this.animateTo(this.getNextViewID(),1))},this)),this.$previousButton.click(t.proxy(function(){this.currentlyAnimating||(this.pauseAllVideos(),this.playState===this.PlayStates.PLAYING&&(this.pause(this.PlayStates.TEMPORARILY_PAUSED),this.play()),this.animateTo(this.getPreviousViewID(),-1))},this)),this.bindSubmitListener(this.$nextButton),this.bindSubmitListener(this.$previousButton),this.settings.hideNavigationButtons?(this.$container.mouseenter(t.proxy(function(){this.$nextButton.stop(!0,!0).fadeIn(100)},this)),this.$container.mouseleave(t.proxy(function(){this.$nextButton.stop(!0,!0).fadeOut(500)},this)),this.$container.mouseenter(t.proxy(function(){this.$previousButton.stop(!0,!0).fadeIn(100)},this)),this.$container.mouseleave(t.proxy(function(){this.$previousButton.stop(!0,!0).fadeOut(500)},this))):(this.$nextButton.show(),this.$previousButton.show()))},i.Slideshow.prototype.activateControlPanel=function(){this.settings.controlPanel&&(this.$togglePlayButton.attr("tabindex","0"),this.$container.bind("slideshowPlayStateChange",t.proxy(function(t,i){var s,e;this.$togglePlayButton.attr("role","button"),s=this.$togglePlayButton.data("playText"),e=this.$togglePlayButton.data("pauseText"),("string"!=typeof s||"string"!=typeof e||s.length<=0||e.length<=0)&&(s=this.$nextButton.attr("data-play-text"),e=this.$previousButton.attr("data-pause-text")),i===this.PlayStates.PLAYING?this.$togglePlayButton.html(''+e+"").attr({"class":"slideshow_pause",title:e}):i===this.PlayStates.PAUSED&&this.$togglePlayButton.html(''+s+"").attr({"class":"slideshow_play",title:s})},this)),this.$togglePlayButton.click(t.proxy(function(i){var s=t(i.currentTarget);s.hasClass("slideshow_play")?this.play():this.pause(this.PlayStates.PAUSED)},this)),this.bindSubmitListener(this.$togglePlayButton),this.settings.hideControlPanel?(this.$container.mouseenter(t.proxy(function(){this.$controlPanel.stop(!0,!0).fadeIn(100)},this)),this.$container.mouseleave(t.proxy(function(){this.$controlPanel.stop(!0,!0).fadeOut(500)},this))):this.$controlPanel.show())},i.Slideshow.prototype.activatePagination=function(){if(this.settings.showPagination){this.$pagination.find(".slideshow_pagination_center").html("
    ");var i=this.$pagination.find("ul");i.html(""),this.$views.each(t.proxy(function(t){var s="",e=parseInt(t,10)+1,n=this.$pagination.data("goToText");("string"!=typeof n||n.length<=0)&&(n=this.$pagination.attr("data-go-to-text")),t==this.currentViewID&&(s="slideshow_currentView"),i.append('
  • '+n+" "+e+"
  • ")},this)),this.$pagination.find("li").attr("tabindex","0").click(t.proxy(function(i){var s,e=t(i.currentTarget);this.currentlyAnimating||(s=e.data("viewId"),isNaN(parseInt(s,10))&&(s=e.attr("data-view-id"),isNaN(parseInt(s,10)))||(this.pauseAllVideos(),this.playState===this.PlayStates.PLAYING&&(this.pause(this.PlayStates.TEMPORARILY_PAUSED),this.play()),this.animateTo(parseInt(s,10),0)))},this)),this.bindSubmitListener(this.$pagination.find("li")),this.$container.bind("slideshowAnimationStart",t.proxy(function(){var i=this.$pagination.find("li");i.each(t.proxy(function(i,s){t(s).removeClass("slideshow_currentView")},this)),t(i[this.currentViewID]).addClass("slideshow_currentView")},this)),this.settings.hidePagination?(this.$container.mouseenter(t.proxy(function(){this.$pagination.stop(!0,!0).fadeIn(100)},this)),this.$container.mouseleave(t.proxy(function(){this.$pagination.stop(!0,!0).fadeOut(500)},this))):this.$pagination.show()}},i.Slideshow.prototype.activatePauseOnHover=function(){this.settings.pauseOnHover&&(this.$container.mouseenter(t.proxy(function(){clearTimeout(this.pauseOnHoverTimer),this.playState!==this.PlayStates.PAUSED&&(this.pauseOnHoverTimer=setTimeout(t.proxy(function(){this.pause(this.PlayStates.TEMPORARILY_PAUSED)},this),500))},this)),this.$container.mouseleave(t.proxy(function(){clearTimeout(this.pauseOnHoverTimer),this.playState!==this.PlayStates.PAUSED&&this.interval===!1&&this.play()},this)))}}(); slideshow_jquery_image_gallery_backend_script_scriptsloadedFlag=!0;