(function($){$.leadnurturing=function(){var command=Array.prototype.shift.call(arguments);return $.ajax({type:"POST",url:"index.php?eID=pm_leadnurturing_"+command,data:{arguments:arguments},dataType:"json"});};})(jQuery);window.matchMedia||(window.matchMedia=function(){"use strict";var t,e,n,d=window.styleMedia||window.media;return d||(t=document.createElement("style"),e=document.getElementsByTagName("script")[0],n=null,t.type="text/css",t.id="matchmediajs-test",e?e.parentNode.insertBefore(t,e):document.head.appendChild(t),n="getComputedStyle"in window&&window.getComputedStyle(t,null)||t.currentStyle,d={matchMedium:function(e){e="@media "+e+"{ #matchmediajs-test { width: 1px; } }";return t.styleSheet?t.styleSheet.cssText=e:t.textContent=e,"1px"===n.width}}),function(e){return{matches:d.matchMedium(e||"all"),media:e||"all"}}}());!function(d){d(document).on("updated.dom",function(){var s,a=this;function o(e){var t=d("header").height()-d("#topMenu").height();d("html, body").animate({scrollTop:d(e).offset().top-t},500)}d("body").append('<div class="device-xs visible-xs visible-xs-block"></div><div class="device-sm visible-sm visible-sm-block"></div><div class="device-md visible-md visible-md-block"></div><div class="device-lg visible-lg visible-lg-block"></div>'),a.isBreakpoint=function(e){return d(".device-"+e).is(":visible")},d("#topNav").on("click",".navbar-toggle",function(e){e.stopPropagation(),d("body").toggleClass("slideOut")}),d(document).on("mousedown touchstart","body.slideOut main, body.slideOut footer, .navbar-close",function(e){d("body").removeClass("slideOut")}),d("#teaser-slide").length&&(s=0,d("#teaser-slide .carousel-inner > div").each(function(e,t){var t=d(t),i=(t.addClass("item"),d(document.createElement("li")));i.attr({"data-target":"#teaser-slide","data-slide-to":e}),0==e&&(t.addClass("active"),i.addClass("active")),d("#teaser-slide .carousel-indicators").append(i),s=e}),0==s&&(d("#teaser-slide .carousel-indicators").remove(),d("#teaser-slide .slider-prev").remove(),d("#teaser-slide .slider-next").remove()),d("#teaser-slide").carousel()),d(".owl-carousel.amazon-slider").each(function(){var e=d(this),t=e.find(".item").length,i=!0,s=!0,a=!0,o=!0,n=(itemCount=4,t<=(itemCount_mobile=2)&&(s=o=!1),t<=itemCount&&(i=a=!1),e.closest("section").find(":header")),t=(0==t&&n.css({display:"none"}),{0:{items:itemCount_mobile,nav:s,loop:o},991:{items:itemCount,nav:i,loop:a}});e.owlCarousel({margin:30,nav:!!i,loop:!!a,lazyLoad:!1,responsive:t,navClass:["slider-prev","slider-next"],navText:["",""],dots:!1})}),d(function(){var t=d(".slider-pages");t.find(".item:odd").addClass("odd"),t.find(".item:even").addClass("even"),t.owlCarousel({loop:!0,nav:!0,navClass:["slider-prev","slider-next"],navText:["",""],dots:!1,responsive:{0:{items:2},768:{items:3},992:{items:4}},onInitialized:function(){var e=t.find(".owl-item:first").width();t.find(".owl-item .item").css({height:2*e}),t.parents("section").addClass("section-highlight-mobile")},onResized:function(){var e=t.find(".owl-item:first").width();t.find(".owl-item .item").css({height:2*e})}}),d(".owl-carousel").data("owlCarousel")}),d(function(){d("main").on("click","video",function(e){var t,i=d(this);a.isBreakpoint("xs")?(($video=i[0]).play(),(t=i.closest(".media-object-video").find(".videoOverlay")).hide(),$video.controls=!0,$video.onpause=function(){t.show(),$video.controls=!1}):(i='<div class="modal fade" id="videoModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"><div class="modal-dialog"><div class=""><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="glyphicon glyphicon-remove-circle"></span></button><div class="modal-body"> <video class="media-object img-responsive" controls><source type="video/mp4" src="'+i.context.currentSrc+'" alt="" /></video></div> </div></div></div>',d("body").append(i),d("#videoModal").modal({}),d("#videoModal").on("hidden.bs.modal",function(e){d(this).data("bs.modal",null),d(this).remove()}))})}),d(function(){d("#breadcrumb .anchor a").on("click",function(e){e.preventDefault(),o(d(this).data("target"))})}),d(window).on("load",function(){var e,t,i=!1;location.hash&&"s"==location.hash.substr(-1)&&"#f"==location.hash.substr(0,1)&&(i=!0,setTimeout(function(){o(location.hash.substr(0,location.hash.length-1))},50)),location.hash&&!i&&(e=location.hash.substr(1,location.hash.length),t=void 0,d("div.frame").each(function(){d(this).attr("data-hbm-anchor")===e&&(t=d(this).attr("id"))}),t&&void 0!==t?setTimeout(function(){o("#"+t)},50):"cadstepfilesdownload"===e&&setTimeout(function(){o("#"+e)},50))}),d(".table-responsive, #table_catman").each(function(){var e,t,i,s=d(this),a=(s=0<s.find("table").length?s.find("table"):s).find("tr,th"),o=s.find("td");0<a.length&&(s.hasClass("table")||"table_catman"===s.attr("id"))&&(e=a.first(),1<a.length&&e.addClass("table-header"),e.children().each(function(e){var t="";d(this).contents().each(function(){"A"===this.nodeName?t+=this.outerHTML+" ":t+=d(this).text()+" "}),s.find("td:nth-of-type("+(e+1)+")").prepend("<div class='table-responsive-header'>"+t+"</div>")}),s.addClass("css_responsive_table"),a.each(function(){d(this).css("height",""),d(this).css("width","")}),o.each(function(){d(this).css("height",""),d(this).css("width","")}),s.css("width",""),s.css("height","")),(s.hasClass("table-general-fixed")||s.hasClass("CLASS_1"))&&s.parent("div.table-responsive").addClass("table-scroll"),s.hasClass("table-product-comparison")&&(t=60,i=100,s.parent("div.table-responsive").removeClass("table-responsive").addClass("table-scroll"),s.wrap('<div class="wrapper"></div>'),d(this).find("tr>td:nth-child(1)").each(function(){i=Math.max(d(this).outerWidth(),i)}),a.each(function(){t=d(this).find("th:first,td:first").outerHeight(),d(this).find("td:nth-child(2), th:nth-child(2)").css("padding-left",i+20+"px"),d(this).find("th:first,td:first").addClass("left-column-fixed").css("height",t+"px").css("width",i+10+"px")}))}),d(function(){d(".property-filter--form select").each(function(){var e=d(this);e.parent().addClass("catego-select2-holder"),e.select2({closeOnSelect:!1,dropdownAutoWidth:!0,width:"100%",templateResult:function(e){return d('<span class="disable_checkboxes"><input class="checked" type="checkbox" checked/> <input class="unchecked" type="checkbox"/>'+e.text+"</span>")}})}),d(document).on("click change",".disable_checkboxes input",function(){return!1})}),d(function(){var e="";d("#navigation > li").on("mouseenter",function(){$this=d(this),e=setTimeout(function(){$this.addClass("hovered")},0)}),d("#navigation > li").on("mouseleave",function(){d("#navigation li").removeClass("hovered"),clearTimeout(e)})}),d(function(){var e=document.location.hash;e&&/^(#nav-|#tab-)/.test(e)?d('.nav-tabs a[href="'+e+'"], [data-nav="'+e+'"]').tab("show"):e&&/^(#collapse-|#acc-)/.test(e)&&d(e+', [data-nav="'+e+'"]').collapse("show")})}),d(function(){d(document).trigger("updated.dom")})}(jQuery);!function(c,a,h){"use strict";function n(t,e){var n,o,i,s=[],a=0;t&&t.isDefaultPrevented()||(t.preventDefault(),e=e||{},n=(e=t&&t.data?u(t.data.options,e):e).$target||h(t.currentTarget).trigger("blur"),(i=h.fancybox.getInstance())&&i.$trigger&&i.$trigger.is(n)||(s=e.selector?h(e.selector):(o=n.attr("data-fancybox")||"")?(s=t.data?t.data.items:[]).length?s.filter('[data-fancybox="'+o+'"]'):h('[data-fancybox="'+o+'"]'):[n],a=h(s).index(n),(i=h.fancybox.open(s,e,a=a<0?0:a)).$trigger=n))}if(c.console=c.console||{info:function(t){}},h){if(h.fn.fancybox)return console.info("fancyBox already initialized");var t={closeExisting:!1,loop:!1,gutter:50,keyboard:!0,preventCaptionOverlap:!0,arrows:!0,infobar:!0,smallBtn:"auto",toolbar:"auto",buttons:["zoom","slideShow","thumbs","close"],idleTime:3,protect:!1,modal:!1,image:{preload:!1},ajax:{settings:{data:{fancybox:!0}}},iframe:{tpl:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" allowfullscreen="allowfullscreen" allow="autoplay; fullscreen" src=""></iframe>',preload:!0,css:{},attr:{scrolling:"auto"}},video:{tpl:'<video class="fancybox-video" controls controlsList="nodownload" poster="{{poster}}"><source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos, <a href="{{src}}">download</a> and watch with your favorite video player!</video>',format:"",autoStart:!0},defaultType:"image",animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'<div class="fancybox-container" role="dialog" tabindex="-1"><div class="fancybox-bg"></div><div class="fancybox-inner"><div class="fancybox-infobar"><span data-fancybox-index></span>&nbsp;/&nbsp;<span data-fancybox-count></span></div><div class="fancybox-toolbar">{{buttons}}</div><div class="fancybox-navigation">{{arrows}}</div><div class="fancybox-stage"></div><div class="fancybox-caption"><div class="fancybox-caption__body"></div></div></div></div>',spinnerTpl:'<div class="fancybox-loading"></div>',errorTpl:'<div class="fancybox-error"><p>{{ERROR}}</p></div>',btnTpl:{download:'<a download data-fancybox-download class="fancybox-button fancybox-button--download" title="{{DOWNLOAD}}" href="javascript:;"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.62 17.09V19H5.38v-1.91zm-2.97-6.96L17 11.45l-5 4.87-5-4.87 1.36-1.32 2.68 2.64V5h1.92v7.77z"/></svg></a>',zoom:'<button data-fancybox-zoom class="fancybox-button fancybox-button--zoom" title="{{ZOOM}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.7 17.3l-3-3a5.9 5.9 0 0 0-.6-7.6 5.9 5.9 0 0 0-8.4 0 5.9 5.9 0 0 0 0 8.4 5.9 5.9 0 0 0 7.7.7l3 3a1 1 0 0 0 1.3 0c.4-.5.4-1 0-1.5zM8.1 13.8a4 4 0 0 1 0-5.7 4 4 0 0 1 5.7 0 4 4 0 0 1 0 5.7 4 4 0 0 1-5.7 0z"/></svg></button>',close:'<button data-fancybox-close class="fancybox-button fancybox-button--close" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 10.6L6.6 5.2 5.2 6.6l5.4 5.4-5.4 5.4 1.4 1.4 5.4-5.4 5.4 5.4 1.4-1.4-5.4-5.4 5.4-5.4-1.4-1.4-5.4 5.4z"/></svg></button>',arrowLeft:'<button data-fancybox-prev class="fancybox-button fancybox-button--arrow_left" title="{{PREV}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.28 15.7l-1.34 1.37L5 12l4.94-5.07 1.34 1.38-2.68 2.72H19v1.94H8.6z"/></svg></div></button>',arrowRight:'<button data-fancybox-next class="fancybox-button fancybox-button--arrow_right" title="{{NEXT}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.4 12.97l-2.68 2.72 1.34 1.38L19 12l-4.94-5.07-1.34 1.38 2.68 2.72H5v1.94z"/></svg></div></button>',smallBtn:'<button type="button" data-fancybox-close class="fancybox-button fancybox-close-small" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" version="1" viewBox="0 0 24 24"><path d="M13 12l5-5-1-1-5 5-5-5-1 1 5 5-5 5 1 1 5-5 5 5 1-1z"/></svg></button>'},parentEl:"body",hideScrollbar:!0,autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:3e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"},wheel:"auto",onInit:h.noop,beforeLoad:h.noop,afterLoad:h.noop,beforeShow:h.noop,afterShow:h.noop,beforeClose:h.noop,afterClose:h.noop,onActivate:h.noop,onDeactivate:h.noop,clickContent:function(t,e){return"image"===t.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{preventCaptionOverlap:!1,idleTime:!1,clickContent:function(t,e){return"image"===t.type&&"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&&"zoom"},dblclickSlide:function(t,e){return"image"===t.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded. <br/> Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails",DOWNLOAD:"Download",SHARE:"Share",ZOOM:"Zoom"},de:{CLOSE:"Schlie&szlig;en",NEXT:"Weiter",PREV:"Zur&uuml;ck",ERROR:"Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es sp&auml;ter nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder",DOWNLOAD:"Herunterladen",SHARE:"Teilen",ZOOM:"Vergr&ouml;&szlig;ern"}}},i=h(c),s=h(a),r=0,d=c.requestAnimationFrame||c.webkitRequestAnimationFrame||c.mozRequestAnimationFrame||c.oRequestAnimationFrame||function(t){return c.setTimeout(t,1e3/60)},e=c.cancelAnimationFrame||c.webkitCancelAnimationFrame||c.mozCancelAnimationFrame||c.oCancelAnimationFrame||function(t){c.clearTimeout(t)},l=function(){var t,e=a.createElement("fakeelement"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in n)if(void 0!==e.style[t])return n[t];return"transitionend"}(),f=function(t){return t&&t.length&&t[0].offsetHeight},u=function(t,e){var n=h.extend(!0,{},t,e);return h.each(e,function(t,e){h.isArray(e)&&(n[t]=e)}),n},o=function(t,e,n){var o=this;o.opts=u({index:n},h.fancybox.defaults),h.isPlainObject(e)&&(o.opts=u(o.opts,e)),h.fancybox.isMobile&&(o.opts=u(o.opts,o.opts.mobile)),o.id=o.opts.id||++r,o.currIndex=parseInt(o.opts.index,10)||0,o.prevIndex=null,o.prevPos=null,o.currPos=0,o.firstRun=!0,o.group=[],o.slides={},o.addContent(t),o.group.length&&o.init()};h.extend(o.prototype,{init:function(){var e,n,o=this,i=o.group[o.currIndex].opts;i.closeExisting&&h.fancybox.close(!0),h("body").addClass("fancybox-active"),!h.fancybox.getInstance()&&!1!==i.hideScrollbar&&!h.fancybox.isMobile&&a.body.scrollHeight>c.innerHeight&&(h("head").append('<style id="fancybox-style-noscroll" type="text/css">.compensate-for-scrollbar{margin-right:'+(c.innerWidth-a.documentElement.clientWidth)+"px;}</style>"),h("body").addClass("compensate-for-scrollbar")),n="",h.each(i.buttons,function(t,e){n+=i.btnTpl[e]||""}),e=h(o.translate(o,i.baseTpl.replace("{{buttons}}",n).replace("{{arrows}}",i.btnTpl.arrowLeft+i.btnTpl.arrowRight))).attr("id","fancybox-container-"+o.id).addClass(i.baseClass).data("FancyBox",o).appendTo(i.parentEl),o.$refs={container:e},["bg","inner","infobar","toolbar","stage","caption","navigation"].forEach(function(t){o.$refs[t]=e.find(".fancybox-"+t)}),o.trigger("onInit"),o.activate(),o.jumpTo(o.currIndex)},translate:function(t,e){var n=t.opts.i18n[t.opts.lang]||t.opts.i18n.en;return e.replace(/\{\{(\w+)\}\}/g,function(t,e){return void 0===n[e]?t:n[e]})},addContent:function(t){var a=this,t=h.makeArray(t);h.each(t,function(t,e){var n,o,i={},s={};h.isPlainObject(e)?s=(i=e).opts||e:"object"===h.type(e)&&h(e).length?(s=(n=h(e)).data()||{},(s=h.extend(!0,{},s,s.options)).$orig=n,i.src=a.opts.src||s.src||n.attr("href"),i.type||i.src||(i.type="inline",i.src=e)):i={type:"html",src:e+""},i.opts=h.extend(!0,{},a.opts,s),h.isArray(s.buttons)&&(i.opts.buttons=s.buttons),h.fancybox.isMobile&&i.opts.mobile&&(i.opts=u(i.opts,i.opts.mobile)),n=i.type||i.opts.type,s=i.src||"",!n&&s&&((o=s.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(n="video",i.opts.video.format||(i.opts.video.format="video/"+("ogv"===o[1]?"ogg":o[1]))):s.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?n="image":s.match(/\.(pdf)((\?|#).*)?$/i)?i=h.extend(!0,i,{contentType:"pdf",opts:{iframe:{preload:!(n="iframe")}}}):"#"===s.charAt(0)&&(n="inline")),n?i.type=n:a.trigger("objectNeedsType",i),i.contentType||(i.contentType=-1<h.inArray(i.type,["html","inline","ajax"])?"html":i.type),i.index=a.group.length,"auto"==i.opts.smallBtn&&(i.opts.smallBtn=-1<h.inArray(i.type,["html","inline","ajax"])),"auto"===i.opts.toolbar&&(i.opts.toolbar=!i.opts.smallBtn),i.$thumb=i.opts.$thumb||null,i.opts.$trigger&&i.index===a.opts.index&&(i.$thumb=i.opts.$trigger.find("img:first"),i.$thumb.length&&(i.opts.$orig=i.opts.$trigger)),i.$thumb&&i.$thumb.length||!i.opts.$orig||(i.$thumb=i.opts.$orig.find("img:first")),i.$thumb&&!i.$thumb.length&&(i.$thumb=null),i.thumb=i.opts.thumb||(i.$thumb?i.$thumb[0].src:null),"function"===h.type(i.opts.caption)&&(i.opts.caption=i.opts.caption.apply(e,[a,i])),"function"===h.type(a.opts.caption)&&(i.opts.caption=a.opts.caption.apply(e,[a,i])),i.opts.caption instanceof h||(i.opts.caption=void 0===i.opts.caption?"":i.opts.caption+""),"ajax"===i.type&&1<(o=s.split(/\s+/,2)).length&&(i.src=o.shift(),i.opts.filter=o.shift()),i.opts.modal&&(i.opts=h.extend(!0,i.opts,{trapFocus:!0,infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),a.group.push(i)}),Object.keys(a.slides).length&&(a.updateControls(),(t=a.Thumbs)&&t.isActive&&(t.create(),t.focus()))},addEvents:function(){var o=this;o.removeEvents(),o.$refs.container.on("click.fb-close","[data-fancybox-close]",function(t){t.stopPropagation(),t.preventDefault(),o.close(t)}).on("touchstart.fb-prev click.fb-prev","[data-fancybox-prev]",function(t){t.stopPropagation(),t.preventDefault(),o.previous()}).on("touchstart.fb-next click.fb-next","[data-fancybox-next]",function(t){t.stopPropagation(),t.preventDefault(),o.next()}).on("click.fb","[data-fancybox-zoom]",function(t){o[o.isScaledDown()?"scaleToActual":"scaleToFit"]()}),i.on("orientationchange.fb resize.fb",function(t){t&&t.originalEvent&&"resize"===t.originalEvent.type?(o.requestId&&e(o.requestId),o.requestId=d(function(){o.update(t)})):(o.current&&"iframe"===o.current.type&&o.$refs.stage.hide(),setTimeout(function(){o.$refs.stage.show(),o.update(t)},h.fancybox.isMobile?600:250))}),s.on("keydown.fb",function(t){var e=(h.fancybox?h.fancybox.getInstance():null).current,n=t.keyCode||t.which;if(9!=n)return!e.opts.keyboard||t.ctrlKey||t.altKey||t.shiftKey||h(t.target).is("input,textarea,video,audio,select")?void 0:8===n||27===n?(t.preventDefault(),void o.close(t)):37===n||38===n?(t.preventDefault(),void o.previous()):39===n||40===n?(t.preventDefault(),void o.next()):void o.trigger("afterKeydown",t,n);e.opts.trapFocus&&o.focus(t)}),o.group[o.currIndex].opts.idleTime&&(o.idleSecondsCounter=0,s.on("mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",function(t){o.idleSecondsCounter=0,o.isIdle&&o.showControls(),o.isIdle=!1}),o.idleInterval=c.setInterval(function(){++o.idleSecondsCounter>=o.group[o.currIndex].opts.idleTime&&!o.isDragging&&(o.isIdle=!0,o.idleSecondsCounter=0,o.hideControls())},1e3))},removeEvents:function(){i.off("orientationchange.fb resize.fb"),s.off("keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),this.idleInterval&&(c.clearInterval(this.idleInterval),this.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,o){var e,n,i,s,a,r,c,l,d=this,u=d.group.length;if(!(d.isDragging||d.isClosing||d.isAnimating&&d.firstRun))return t=parseInt(t,10),!(!(n=(d.current||d).opts.loop)&&(t<0||u<=t))&&(e=d.firstRun=!Object.keys(d.slides).length,s=d.current,d.prevIndex=d.currIndex,d.prevPos=d.currPos,i=d.createSlide(t),1<u&&((n||i.index<u-1)&&d.createSlide(t+1),(n||0<i.index)&&d.createSlide(t-1)),d.current=i,d.currIndex=i.index,d.currPos=i.pos,d.trigger("beforeShow",e),d.updateControls(),i.forcedDuration=void 0,h.isNumeric(o)?i.forcedDuration=o:o=i.opts[e?"animationDuration":"transitionDuration"],o=parseInt(o,10),u=d.isMoved(i),i.$slide.addClass("fancybox-slide--current"),e?(i.opts.animationEffect&&o&&d.$refs.container.css("transition-duration",o+"ms"),d.$refs.container.addClass("fancybox-is-open").trigger("focus"),d.loadSlide(i)):(a=h.fancybox.getTranslate(s.$slide),r=h.fancybox.getTranslate(d.$refs.stage),h.each(d.slides,function(t,e){h.fancybox.stop(e.$slide,!0)}),s.pos!==i.pos&&(s.isComplete=!1),s.$slide.removeClass("fancybox-slide--complete fancybox-slide--current"),u?(l=a.left-(s.pos*a.width+s.pos*s.opts.gutter),h.each(d.slides,function(t,e){e.$slide.removeClass("fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ")});var n=e.pos*a.width+e.pos*e.opts.gutter;h.fancybox.setTranslate(e.$slide,{top:0,left:n-r.left+l}),e.pos!==i.pos&&e.$slide.addClass("fancybox-slide--"+(e.pos>i.pos?"next":"previous")),f(e.$slide),h.fancybox.animate(e.$slide,{top:0,left:(e.pos-i.pos)*a.width+(e.pos-i.pos)*e.opts.gutter},o,function(){e.$slide.css({transform:"",opacity:""}).removeClass("fancybox-slide--next fancybox-slide--previous"),e.pos===d.currPos&&d.complete()})})):o&&i.opts.transitionEffect&&(c="fancybox-animated fancybox-fx-"+i.opts.transitionEffect,s.$slide.addClass("fancybox-slide--"+(s.pos>i.pos?"next":"previous")),h.fancybox.animate(s.$slide,c,o,function(){s.$slide.removeClass(c).removeClass("fancybox-slide--next fancybox-slide--previous")},!1)),i.isLoaded?d.revealContent(i):d.loadSlide(i)),void d.preload("image"))},createSlide:function(t){var e,n=this,o=t%n.group.length;return o=o<0?n.group.length+o:o,!n.slides[t]&&n.group[o]&&(e=h('<div class="fancybox-slide"></div>').appendTo(n.$refs.stage),n.slides[t]=h.extend(!0,{},n.group[o],{pos:t,$slide:e,isLoaded:!1}),n.updateSlide(n.slides[t])),n.slides[t]},scaleToActual:function(t,e,n){var o,i,s,a,r=this,c=r.current,l=c.$content,d=h.fancybox.getTranslate(c.$slide).width,u=h.fancybox.getTranslate(c.$slide).height,f=c.width,p=c.height;r.isAnimating||r.isMoved()||!l||"image"!=c.type||!c.isLoaded||c.hasError||(r.isAnimating=!0,h.fancybox.stop(l),t=void 0===t?.5*d:t,e=void 0===e?.5*u:e,(o=h.fancybox.getTranslate(l)).top-=h.fancybox.getTranslate(c.$slide).top,o.left-=h.fancybox.getTranslate(c.$slide).left,c=f/o.width,a=p/o.height,i=.5*d-.5*f,s=.5*u-.5*p,d<f&&((i=0<(i=o.left*c-(t*c-t))?0:i)<d-f&&(i=d-f)),u<p&&((s=0<(s=o.top*a-(e*a-e))?0:s)<u-p&&(s=u-p)),r.updateCursor(f,p),h.fancybox.animate(l,{top:s,left:i,scaleX:c,scaleY:a},n||366,function(){r.isAnimating=!1}),r.SlideShow&&r.SlideShow.isActive&&r.SlideShow.stop())},scaleToFit:function(t){var e=this,n=e.current,o=n.$content;e.isAnimating||e.isMoved()||!o||"image"!=n.type||!n.isLoaded||n.hasError||(e.isAnimating=!0,h.fancybox.stop(o),n=e.getFitPos(n),e.updateCursor(n.width,n.height),h.fancybox.animate(o,{top:n.top,left:n.left,scaleX:n.width/o.width(),scaleY:n.height/o.height()},t||366,function(){e.isAnimating=!1}))},getFitPos:function(t){var e,n,o=t.$content,i=t.$slide,s=t.width||t.opts.width,a=t.height||t.opts.height,r={};return!!(t.isLoaded&&o&&o.length)&&(e=h.fancybox.getTranslate(this.$refs.stage).width,n=h.fancybox.getTranslate(this.$refs.stage).height,e-=parseFloat(i.css("paddingLeft"))+parseFloat(i.css("paddingRight"))+parseFloat(o.css("marginLeft"))+parseFloat(o.css("marginRight")),n-=parseFloat(i.css("paddingTop"))+parseFloat(i.css("paddingBottom"))+parseFloat(o.css("marginTop"))+parseFloat(o.css("marginBottom")),s&&a||(s=e,a=n),e-.5<(s*=o=Math.min(1,e/s,n/a))&&(s=e),n-.5<(a*=o)&&(a=n),"image"===t.type?(r.top=Math.floor(.5*(n-a))+parseFloat(i.css("paddingTop")),r.left=Math.floor(.5*(e-s))+parseFloat(i.css("paddingLeft"))):"video"===t.contentType&&(s/(o=t.opts.width&&t.opts.height?s/a:t.opts.ratio||16/9)<a?a=s/o:a*o<s&&(s=a*o)),r.width=s,r.height=a,r)},update:function(n){var o=this;h.each(o.slides,function(t,e){o.updateSlide(e,n)})},updateSlide:function(t,e){var n=this,o=t&&t.$content,i=t.width||t.opts.width,s=t.height||t.opts.height,a=t.$slide;n.adjustCaption(t),o&&(i||s||"video"===t.contentType)&&!t.hasError&&(h.fancybox.stop(o),h.fancybox.setTranslate(o,n.getFitPos(t)),t.pos===n.currPos&&(n.isAnimating=!1,n.updateCursor())),n.adjustLayout(t),a.length&&(a.trigger("refresh"),t.pos===n.currPos&&n.$refs.toolbar.add(n.$refs.navigation.find(".fancybox-button--arrow_right")).toggleClass("compensate-for-scrollbar",a.get(0).scrollHeight>a.get(0).clientHeight)),n.trigger("onUpdate",t,e)},centerSlide:function(t){var e=this,n=e.current,o=n.$slide;!e.isClosing&&n&&(o.siblings().css({transform:"",opacity:""}),o.parent().children().removeClass("fancybox-slide--previous fancybox-slide--next"),h.fancybox.animate(o,{top:0,left:0,opacity:1},void 0===t?0:t,function(){o.css({transform:"",opacity:""}),n.isComplete||e.complete()},!1))},isMoved:function(t){var e,n,t=t||this.current;return!!t&&(n=h.fancybox.getTranslate(this.$refs.stage),e=h.fancybox.getTranslate(t.$slide),!t.$slide.hasClass("fancybox-animated")&&(.5<Math.abs(e.top-n.top)||.5<Math.abs(e.left-n.left)))},updateCursor:function(t,e){var n=this,o=n.current,i=n.$refs.container;o&&!n.isClosing&&n.Guestures&&(i.removeClass("fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-zoomOut fancybox-can-swipe fancybox-can-pan"),e=!!(t=n.canPan(t,e))||n.isZoomable(),i.toggleClass("fancybox-is-zoomable",e),h("[data-fancybox-zoom]").prop("disabled",!e),t?i.addClass("fancybox-can-pan"):e&&("zoom"===o.opts.clickContent||h.isFunction(o.opts.clickContent)&&"zoom"==o.opts.clickContent(o))?i.addClass("fancybox-can-zoomIn"):o.opts.touch&&(o.opts.touch.vertical||1<n.group.length)&&"video"!==o.contentType&&i.addClass("fancybox-can-swipe"))},isZoomable:function(){var t,e=this.current;if(e&&!this.isClosing&&"image"===e.type&&!e.hasError){if(!e.isLoaded)return!0;if((t=this.getFitPos(e))&&(e.width>t.width||e.height>t.height))return!0}return!1},isScaledDown:function(t,e){var n=!1,o=this.current,i=o.$content;return void 0!==t&&void 0!==e?n=t<o.width&&e<o.height:i&&(n=(n=h.fancybox.getTranslate(i)).width<o.width&&n.height<o.height),n},canPan:function(t,e){var n=this.current,o=null,i=!1;return"image"===n.type&&(n.isComplete||t&&e)&&!n.hasError&&(i=this.getFitPos(n),void 0!==t&&void 0!==e?o={width:t,height:e}:n.isComplete&&(o=h.fancybox.getTranslate(n.$content)),o&&i&&(i=1.5<Math.abs(o.width-i.width)||1.5<Math.abs(o.height-i.height))),i},loadSlide:function(n){var t,e,o,i=this;if(!n.isLoading&&!n.isLoaded){if(!(n.isLoading=!0)===i.trigger("beforeLoad",n))return n.isLoading=!1;switch(t=n.type,(e=n.$slide).off("refresh").trigger("onReset").addClass(n.opts.slideClass),t){case"image":i.setImage(n);break;case"iframe":i.setIframe(n);break;case"html":i.setContent(n,n.src||n.content);break;case"video":i.setContent(n,n.opts.video.tpl.replace(/\{\{src\}\}/gi,n.src).replace("{{format}}",n.opts.videoFormat||n.opts.video.format||"").replace("{{poster}}",n.thumb||""));break;case"inline":h(n.src).length?i.setContent(n,h(n.src)):i.setError(n);break;case"ajax":i.showLoading(n),o=h.ajax(h.extend({},n.opts.ajax.settings,{url:n.src,success:function(t,e){"success"===e&&i.setContent(n,t)},error:function(t,e){t&&"abort"!==e&&i.setError(n)}})),e.one("onReset",function(){o.abort()});break;default:i.setError(n)}return!0}},setImage:function(e){var t,n=this;setTimeout(function(){var t=e.$image;n.isClosing||!e.isLoading||t&&t.length&&t[0].complete||e.hasError||n.showLoading(e)},50),n.checkSrcset(e),e.$content=h('<div class="fancybox-content"></div>').addClass("fancybox-is-hidden").appendTo(e.$slide.addClass("fancybox-slide--image")),!1!==e.opts.preload&&e.opts.width&&e.opts.height&&e.thumb&&(e.width=e.opts.width,e.height=e.opts.height,(t=a.createElement("img")).onerror=function(){h(this).remove(),e.$ghost=null},t.onload=function(){n.afterLoad(e)},e.$ghost=h(t).addClass("fancybox-image").appendTo(e.$content).attr("src",e.thumb)),n.setBigImage(e)},checkSrcset:function(t){var e,n,o,i,s=t.opts.srcset||t.opts.image.srcset;if(s){o=c.devicePixelRatio||1,i=c.innerWidth*o,(n=s.split(",").map(function(t){var o={};return t.trim().split(/\s+/).forEach(function(t,e){var n=parseInt(t.substring(0,t.length-1),10);if(0===e)return o.url=t;n&&(o.value=n,o.postfix=t[t.length-1])}),o})).sort(function(t,e){return t.value-e.value});for(var a=0;a<n.length;a++){var r=n[a];if("w"===r.postfix&&r.value>=i||"x"===r.postfix&&r.value>=o){e=r;break}}(e=!e&&n.length?n[n.length-1]:e)&&(t.src=e.url,t.width&&t.height&&"w"==e.postfix&&(t.height=t.width/t.height*e.value,t.width=e.value),t.opts.srcset=s)}},setBigImage:function(e){var n=this,t=a.createElement("img"),o=h(t);e.$image=o.one("error",function(){n.setError(e)}).one("load",function(){var t;e.$ghost||(n.resolveImageSlideSize(e,this.naturalWidth,this.naturalHeight),n.afterLoad(e)),n.isClosing||(e.opts.srcset&&((t=e.opts.sizes)&&"auto"!==t||(t=(1<e.width/e.height&&1<i.width()/i.height()?"100":Math.round(e.width/e.height*100))+"vw"),o.attr("sizes",t).attr("srcset",e.opts.srcset)),e.$ghost&&setTimeout(function(){e.$ghost&&!n.isClosing&&e.$ghost.hide()},Math.min(300,Math.max(1e3,e.height/1600))),n.hideLoading(e))}).addClass("fancybox-image").attr("src",e.src).appendTo(e.$content),(t.complete||"complete"==t.readyState)&&o.naturalWidth&&o.naturalHeight?o.trigger("load"):t.error&&o.trigger("error")},resolveImageSlideSize:function(t,e,n){var o=parseInt(t.opts.width,10),i=parseInt(t.opts.height,10);t.width=e,t.height=n,0<o&&(t.width=o,t.height=Math.floor(o*n/e)),0<i&&(t.width=Math.floor(i*e/n),t.height=i)},setIframe:function(i){var s,e=this,a=i.opts.iframe,r=i.$slide;i.$content=h('<div class="fancybox-content'+(a.preload?" fancybox-is-hidden":"")+'"></div>').css(a.css).appendTo(r),r.addClass("fancybox-slide--"+i.contentType),i.$iframe=s=h(a.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(a.attr).appendTo(i.$content),a.preload?(e.showLoading(i),s.on("load.fb error.fb",function(t){this.isReady=1,i.$slide.trigger("refresh"),e.afterLoad(i)}),r.on("refresh.fb",function(){var t,e=i.$content,n=a.css.width,o=a.css.height;if(1===s[0].isReady){try{t=s.contents().find("body")}catch(t){}t&&t.length&&t.children().length&&(r.css("overflow","visible"),e.css({width:"100%","max-width":"100%",height:"9999px"}),void 0===n&&(n=Math.ceil(Math.max(t[0].clientWidth,t.outerWidth(!0)))),e.css("width",n||"").css("max-width",""),void 0===o&&(o=Math.ceil(Math.max(t[0].clientHeight,t.outerHeight(!0)))),e.css("height",o||""),r.css("overflow","auto")),e.removeClass("fancybox-is-hidden")}})):e.afterLoad(i),s.attr("src",i.src),r.one("onReset",function(){try{h(this).find("iframe").hide().unbind().attr("src","//about:blank")}catch(t){}h(this).off("refresh.fb").empty(),i.isLoaded=!1,i.isRevealed=!1})},setContent:function(t,e){var n;this.isClosing||(this.hideLoading(t),t.$content&&h.fancybox.stop(t.$content),t.$slide.empty(),(n=e)&&n.hasOwnProperty&&n instanceof h&&e.parent().length?((e.hasClass("fancybox-content")||e.parent().hasClass("fancybox-content"))&&e.parents(".fancybox-slide").trigger("onReset"),t.$placeholder=h("<div>").hide().insertAfter(e),e.css("display","inline-block")):t.hasError||("string"===h.type(e)&&(e=h("<div>").append(h.trim(e)).contents()),t.opts.filter&&(e=h("<div>").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){h(this).find("video,audio").trigger("pause"),t.$placeholder&&(t.$placeholder.after(e.removeClass("fancybox-content").hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(h(this).empty(),t.isLoaded=!1,t.isRevealed=!1)}),h(e).appendTo(t.$slide),h(e).is("video,audio")&&(h(e).addClass("fancybox-video"),h(e).wrap("<div></div>"),t.contentType="video",t.opts.width=t.opts.width||h(e).attr("width"),t.opts.height=t.opts.height||h(e).attr("height")),t.$content=t.$slide.children().filter("div,form,main,video,audio,article,.fancybox-content").first(),t.$content.siblings().hide(),t.$content.length||(t.$content=t.$slide.wrapInner("<div></div>").children().first()),t.$content.addClass("fancybox-content"),t.$slide.addClass("fancybox-slide--"+t.contentType),this.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.trigger("onReset").removeClass("fancybox-slide--"+t.contentType).addClass("fancybox-slide--error"),t.contentType="html",this.setContent(t,this.translate(t,t.opts.errorTpl)),t.pos===this.currPos&&(this.isAnimating=!1)},showLoading:function(t){(t=t||this.current)&&!t.$spinner&&(t.$spinner=h(this.translate(this,this.opts.spinnerTpl)).appendTo(t.$slide).hide().fadeIn("fast"))},hideLoading:function(t){(t=t||this.current)&&t.$spinner&&(t.$spinner.stop().remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),!t.opts.smallBtn||t.$smallBtn&&t.$smallBtn.length||(t.$smallBtn=h(e.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.fb",function(t){return 2==t.button&&t.preventDefault(),!0}),"image"===t.type&&h('<div class="fancybox-spaceball"></div>').appendTo(t.$content)),e.adjustCaption(t),e.adjustLayout(t),t.pos===e.currPos&&e.updateCursor(),e.revealContent(t))},adjustCaption:function(t){var e=this,t=t||e.current,n=t.opts.caption,o=t.opts.preventCaptionOverlap,i=e.$refs.caption,s=!1;i.toggleClass("fancybox-caption--separate",o),o&&n&&n.length&&(t.pos!==e.currPos?((o=i.clone().appendTo(i.parent())).children().eq(0).empty().html(n),s=o.outerHeight(!0),o.empty().remove()):e.$caption&&(s=e.$caption.outerHeight(!0)),t.$slide.css("padding-bottom",s||""))},adjustLayout:function(t){var e,n,o,i,t=t||this.current;t.isLoaded&&!0!==t.opts.disableLayoutFix&&(t.$content.css("margin-bottom",""),t.$content.outerHeight()>t.$slide.height()+.5&&(o=t.$slide[0].style["padding-bottom"],i=t.$slide.css("padding-bottom"),0<parseFloat(i)&&(e=t.$slide[0].scrollHeight,t.$slide.css("padding-bottom",0),Math.abs(e-t.$slide[0].scrollHeight)<1&&(n=i),t.$slide.css("padding-bottom",o))),t.$content.css("margin-bottom",n))},revealContent:function(t){var e,n,o,i,s=this,a=t.$slide,r=!1,c=!1,l=s.isMoved(t),d=t.isRevealed;return t.isRevealed=!0,e=t.opts[s.firstRun?"animationEffect":"transitionEffect"],o=t.opts[s.firstRun?"animationDuration":"transitionDuration"],o=parseInt(void 0===t.forcedDuration?o:t.forcedDuration,10),"zoom"===(e=!l&&t.pos===s.currPos&&o?e:!1)&&(t.pos===s.currPos&&o&&"image"===t.type&&!t.hasError&&(c=s.getThumbPos(t))?r=s.getFitPos(t):e="fade"),"zoom"===e?(s.isAnimating=!0,r.scaleX=r.width/c.width,r.scaleY=r.height/c.height,(i="auto"==(i=t.opts.zoomOpacity)?.1<Math.abs(t.width/t.height-c.width/c.height):i)&&(c.opacity=.1,r.opacity=1),h.fancybox.setTranslate(t.$content.removeClass("fancybox-is-hidden"),c),f(t.$content),void h.fancybox.animate(t.$content,r,o,function(){s.isAnimating=!1,s.complete()})):(s.updateSlide(t),e?(h.fancybox.stop(a),n="fancybox-slide--"+(t.pos>=s.prevPos?"next":"previous")+" fancybox-animated fancybox-fx-"+e,a.addClass(n).removeClass("fancybox-slide--current"),t.$content.removeClass("fancybox-is-hidden"),f(a),"image"!==t.type&&t.$content.hide().show(0),void h.fancybox.animate(a,"fancybox-slide--current",o,function(){a.removeClass(n).css({transform:"",opacity:""}),t.pos===s.currPos&&s.complete()},!0)):(t.$content.removeClass("fancybox-is-hidden"),d||!l||"image"!==t.type||t.hasError||t.$content.hide().fadeIn("fast"),void(t.pos===s.currPos&&s.complete())))},getThumbPos:function(t){var e,n,o,i,t=t.$thumb;return!(!t||(!(o=t[0])||o.ownerDocument!==a||(h(".fancybox-container").css("pointer-events","none"),i={x:o.getBoundingClientRect().left+o.offsetWidth/2,y:o.getBoundingClientRect().top+o.offsetHeight/2},i=a.elementFromPoint(i.x,i.y)===o,h(".fancybox-container").css("pointer-events",""),!i)))&&(o=h.fancybox.getTranslate(t),i=parseFloat(t.css("border-top-width")||0),n=parseFloat(t.css("border-right-width")||0),e=parseFloat(t.css("border-bottom-width")||0),t=parseFloat(t.css("border-left-width")||0),n={top:o.top+i,left:o.left+t,width:o.width-n-t,height:o.height-i-e,scaleX:1,scaleY:1},0<o.width&&0<o.height&&n)},complete:function(){var t,n=this,e=n.current,o={};!n.isMoved()&&e.isLoaded&&(e.isComplete||(e.isComplete=!0,e.$slide.siblings().trigger("onReset"),n.preload("inline"),f(e.$slide),e.$slide.addClass("fancybox-slide--complete"),h.each(n.slides,function(t,e){e.pos>=n.currPos-1&&e.pos<=n.currPos+1?o[e.pos]=e:e&&(h.fancybox.stop(e.$slide),e.$slide.off().remove())}),n.slides=o),n.isAnimating=!1,n.updateCursor(),n.trigger("afterShow"),e.opts.video.autoStart&&e.$slide.find("video,audio").filter(":visible:first").trigger("play").one("ended",function(){Document.exitFullscreen?Document.exitFullscreen():this.webkitExitFullscreen&&this.webkitExitFullscreen(),n.next()}),e.opts.autoFocus&&"html"===e.contentType&&((t=e.$content.find("input[autofocus]:enabled:visible:first")).length?t.trigger("focus"):n.focus(null,!0)),e.$slide.scrollTop(0).scrollLeft(0))},preload:function(t){var e,n,o=this;o.group.length<2||(n=o.slides[o.currPos+1],(e=o.slides[o.currPos-1])&&e.type===t&&o.loadSlide(e),n&&n.type===t&&o.loadSlide(n))},focus:function(t,e){var n=this,o=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"])'].join(",");n.isClosing||((e=(e=!t&&n.current&&n.current.isComplete?n.current.$slide.find("*:visible"+(e?":not(.fancybox-close-small)":"")):n.$refs.container.find("*:visible")).filter(o).filter(function(){return"hidden"!==h(this).css("visibility")&&!h(this).hasClass("disabled")})).length?(o=e.index(a.activeElement),t&&t.shiftKey?(o<0||0==o)&&(t.preventDefault(),e.eq(e.length-1).trigger("focus")):(o<0||o==e.length-1)&&(t&&t.preventDefault(),e.eq(0).trigger("focus"))):n.$refs.container.trigger("focus"))},activate:function(){var e=this;h(".fancybox-container").each(function(){var t=h(this).data("FancyBox");t&&t.id!==e.id&&!t.isClosing&&(t.trigger("onDeactivate"),t.removeEvents(),t.isVisible=!1)}),e.isVisible=!0,(e.current||e.isIdle)&&(e.update(),e.updateControls()),e.trigger("onActivate"),e.addEvents()},close:function(t,e){function n(){c.cleanUp(t)}var o,i,s,a,r,c=this,l=c.current;return!c.isClosing&&(!(c.isClosing=!0)===c.trigger("beforeClose",t)?(c.isClosing=!1,d(function(){c.update()}),!1):(c.removeEvents(),i=l.$content,o=l.opts.animationEffect,e=h.isNumeric(e)?e:o?l.opts.animationDuration:0,l.$slide.removeClass("fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated"),!0!==t?h.fancybox.stop(l.$slide):o=!1,l.$slide.siblings().trigger("onReset").remove(),e&&c.$refs.container.removeClass("fancybox-is-open").addClass("fancybox-is-closing").css("transition-duration",e+"ms"),c.hideLoading(l),c.hideControls(!0),c.updateCursor(),"zoom"===(o="zoom"!==o||i&&e&&"image"===l.type&&!c.isMoved()&&!l.hasError&&(r=c.getThumbPos(l))?o:"fade")?(h.fancybox.stop(i),a={top:(a=h.fancybox.getTranslate(i)).top,left:a.left,scaleX:a.width/r.width,scaleY:a.height/r.height,width:r.width,height:r.height},(s="auto"==(s=l.opts.zoomOpacity)?.1<Math.abs(l.width/l.height-r.width/r.height):s)&&(r.opacity=0),h.fancybox.setTranslate(i,a),f(i),h.fancybox.animate(i,r,e,n)):o&&e?h.fancybox.animate(l.$slide.addClass("fancybox-slide--previous").removeClass("fancybox-slide--current"),"fancybox-animated fancybox-fx-"+o,e,n):!0===t?setTimeout(n,e):n(),!0))},cleanUp:function(t){var e,n=this,o=n.current.opts.$orig;n.current.$slide.trigger("onReset"),n.$refs.container.empty().remove(),n.trigger("afterClose",t),n.current.opts.backFocus&&(o=o&&o.length&&o.is(":visible")?o:n.$trigger)&&o.length&&(t=c.scrollX,e=c.scrollY,o.trigger("focus"),h("html, body").scrollTop(e).scrollLeft(t)),n.current=null,(o=h.fancybox.getInstance())?o.activate():(h("body").removeClass("fancybox-active compensate-for-scrollbar"),h("#fancybox-style-noscroll").remove())},trigger:function(t,e){var n,o=Array.prototype.slice.call(arguments,1),i=this,e=e&&e.opts?e:i.current;if(e?o.unshift(e):e=i,o.unshift(i),!1===(n=h.isFunction(e.opts[t])?e.opts[t].apply(e,o):n))return n;("afterClose"!==t&&i.$refs?i.$refs.container:s).trigger(t+".fb",o)},updateControls:function(){var t=this,e=t.current,n=e.index,o=t.$refs.container,i=t.$refs.caption,s=e.opts.caption;e.$slide.trigger("refresh"),s&&s.length?(t.$caption=i).children().eq(0).html(s):t.$caption=null,t.hasHiddenControls||t.isIdle||t.showControls(),o.find("[data-fancybox-count]").html(t.group.length),o.find("[data-fancybox-index]").html(n+1),o.find("[data-fancybox-prev]").prop("disabled",!e.opts.loop&&n<=0),o.find("[data-fancybox-next]").prop("disabled",!e.opts.loop&&n>=t.group.length-1),"image"===e.type?o.find("[data-fancybox-zoom]").show().end().find("[data-fancybox-download]").attr("href",e.opts.image.src||e.src).show():e.opts.toolbar&&o.find("[data-fancybox-download],[data-fancybox-zoom]").hide(),h(a.activeElement).is(":hidden,[disabled]")&&t.$refs.container.trigger("focus")},hideControls:function(t){var e=["infobar","toolbar","nav"];!t&&this.current.opts.preventCaptionOverlap||e.push("caption"),this.$refs.container.removeClass(e.map(function(t){return"fancybox-show-"+t}).join(" ")),this.hasHiddenControls=!0},showControls:function(){var t=this,e=(t.current||t).opts,n=t.$refs.container;t.hasHiddenControls=!1,t.idleSecondsCounter=0,n.toggleClass("fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("fancybox-show-infobar",!!(e.infobar&&1<t.group.length)).toggleClass("fancybox-show-caption",!!t.$caption).toggleClass("fancybox-show-nav",!!(e.arrows&&1<t.group.length)).toggleClass("fancybox-is-modal",!!e.modal)},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls()}}),h.fancybox={version:"3.5.7",defaults:t,getInstance:function(t){var e=h('.fancybox-container:not(".fancybox-is-closing"):last').data("FancyBox"),n=Array.prototype.slice.call(arguments,1);return e instanceof o&&("string"===h.type(t)?e[t].apply(e,n):"function"===h.type(t)&&t.apply(e,n),e)},open:function(t,e,n){return new o(t,e,n)},close:function(t){var e=this.getInstance();e&&(e.close(),!0===t&&this.close(t))},destroy:function(){this.close(!0),s.add("body").off("click.fb-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:(t=a.createElement("div"),c.getComputedStyle&&c.getComputedStyle(t)&&c.getComputedStyle(t).getPropertyValue("transform")&&!(a.documentMode&&a.documentMode<11)),getTranslate:function(t){var e;return!(!t||!t.length)&&{top:(e=t[0].getBoundingClientRect()).top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))}},setTranslate:function(t,e){var n="",o={};if(t&&e)return void 0===e.left&&void 0===e.top||(n=(void 0===e.left?t.position():e).left+"px, "+(void 0===e.top?t.position():e).top+"px",n=this.use3d?"translate3d("+n+", 0px)":"translate("+n+")"),void 0!==e.scaleX&&void 0!==e.scaleY?n+=" scale("+e.scaleX+", "+e.scaleY+")":void 0!==e.scaleX&&(n+=" scaleX("+e.scaleX+")"),n.length&&(o.transform=n),void 0!==e.opacity&&(o.opacity=e.opacity),void 0!==e.width&&(o.width=e.width),void 0!==e.height&&(o.height=e.height),t.css(o)},animate:function(e,n,o,i,s){var a,r=this;h.isFunction(o)&&(i=o,o=null),r.stop(e),a=r.getTranslate(e),e.on(l,function(t){t&&t.originalEvent&&(!e.is(t.originalEvent.target)||"z-index"==t.originalEvent.propertyName)||(r.stop(e),h.isNumeric(o)&&e.css("transition-duration",""),h.isPlainObject(n)?void 0!==n.scaleX&&void 0!==n.scaleY&&r.setTranslate(e,{top:n.top,left:n.left,width:a.width*n.scaleX,height:a.height*n.scaleY,scaleX:1,scaleY:1}):!0!==s&&e.removeClass(n),h.isFunction(i)&&i(t))}),h.isNumeric(o)&&e.css("transition-duration",o+"ms"),h.isPlainObject(n)?(void 0!==n.scaleX&&void 0!==n.scaleY&&(delete n.width,delete n.height,e.parent().hasClass("fancybox-slide--image")&&e.parent().addClass("fancybox-is-scaling")),h.fancybox.setTranslate(e,n)):e.addClass(n),e.data("timer",setTimeout(function(){e.trigger(l)},o+33))},stop:function(t,e){t&&t.length&&(clearTimeout(t.data("timer")),e&&t.trigger(l),t.off(l).css("transition-duration",""),t.parent().removeClass("fancybox-is-scaling"))}},h.fn.fancybox=function(t){var e;return(e=(t=t||{}).selector||!1)?h("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},n):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},n),this},s.on("click.fb-start","[data-fancybox]",n),s.on("click.fb-start","[data-fancybox-trigger]",function(t){h('[data-fancybox="'+h(this).attr("data-fancybox-trigger")+'"]').eq(h(this).attr("data-fancybox-index")||0).trigger("click.fb-start",{$trigger:h(this)})}),p=null,s.on("mousedown mouseup focus blur",".fancybox-button",function(t){switch(t.type){case"mousedown":p=h(this);break;case"mouseup":p=null;break;case"focusin":h(".fancybox-button").removeClass("fancybox-focus"),h(this).is(p)||h(this).is("[disabled]")||h(this).addClass("fancybox-focus");break;case"focusout":h(".fancybox-button").removeClass("fancybox-focus")}})}var p}(window,document,jQuery),function(p){"use strict";function h(n,t,e){if(n)return"object"===p.type(e=e||"")&&(e=p.param(e,!0)),p.each(t,function(t,e){n=n.replace("$"+t,e||"")}),e.length&&(n+=(0<n.indexOf("?")?"&":"?")+e),n}var o={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"https://www.youtube-nocookie.com/embed/$4",thumb:"https://img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12]+"").replace(/\?/,"&")+"&output="+(t[12]&&0<t[12].indexOf("layer=c")?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}},i=(p(document).on("objectNeedsType.fb",function(t,e,i){var s,a,r,c,l,d,u=i.src||"",f=!1,n=p.extend(!0,{},o,i.opts.media);p.each(n,function(t,e){if(a=u.match(e.matcher)){if(f=e.type,d=t,l={},e.paramPlace&&a[e.paramPlace]){c=(c="?"==(c=a[e.paramPlace])[0]?c.substring(1):c).split("&");for(var n=0;n<c.length;++n){var o=c[n].split("=",2);2==o.length&&(l[o[0]]=decodeURIComponent(o[1].replace(/\+/g," ")))}}return r=p.extend(!0,{},e.params,i.opts[t],l),u="function"===p.type(e.url)?e.url.call(this,a,r,i):h(e.url,a,r),s="function"===p.type(e.thumb)?e.thumb.call(this,a,r,i):h(e.thumb,a),"youtube"===t?u=u.replace(/&t=((\d+)m)?(\d+)s/,function(t,e,n,o){return"&start="+((n?60*parseInt(n,10):0)+parseInt(o,10))}):"vimeo"===t&&(u=u.replace("&%23","#")),!1}}),f?(i.opts.thumb||i.opts.$thumb&&i.opts.$thumb.length||(i.opts.thumb=s),"iframe"===f&&(i.opts=p.extend(!0,i.opts,{iframe:{preload:!1,attr:{scrolling:"no"}}})),p.extend(i,{type:f,src:u,origSrc:i.src,contentSource:d,contentType:"image"===f?"image":"gmap_place"==d||"gmap_search"==d?"map":"video"})):u&&(i.type=i.opts.defaultType)}),{youtube:{src:"https://www.youtube.com/iframe_api",class:"YT",loading:!1,loaded:!1},vimeo:{src:"https://player.vimeo.com/api/player.js",class:"Vimeo",loading:!1,loaded:!1},load:function(t){var e,n=this;this[t].loaded?setTimeout(function(){n.done(t)}):this[t].loading||(this[t].loading=!0,(e=document.createElement("script")).type="text/javascript",e.src=this[t].src,"youtube"===t?window.onYouTubeIframeAPIReady=function(){n[t].loaded=!0,n.done(t)}:e.onload=function(){n[t].loaded=!0,n.done(t)},document.body.appendChild(e))},done:function(t){var e,n;"youtube"===t&&delete window.onYouTubeIframeAPIReady,(e=p.fancybox.getInstance())&&(n=e.current.$content.find("iframe"),"youtube"===t&&void 0!==YT&&YT?new YT.Player(n.attr("id"),{events:{onStateChange:function(t){0==t.data&&e.next()}}}):"vimeo"===t&&void 0!==Vimeo&&Vimeo&&new Vimeo.Player(n).on("ended",function(){e.next()}))}});p(document).on({"afterShow.fb":function(t,e,n){1<e.group.length&&("youtube"===n.contentSource||"vimeo"===n.contentSource)&&i.load(n.contentSource)}})}(jQuery),function(d,c,u){"use strict";function f(t){var e,n=[];for(e in t=(t=t.originalEvent||t||d.e).touches&&t.touches.length?t.touches:t.changedTouches&&t.changedTouches.length?t.changedTouches:[t])t[e].pageX?n.push({x:t[e].pageX,y:t[e].pageY}):t[e].clientX&&n.push({x:t[e].clientX,y:t[e].clientY});return n}function p(t,e,n){return e&&t?"x"===n?t.x-e.x:"y"===n?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function l(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe')||u.isFunction(t.get(0).onclick)||t.data("selectable"))return 1;for(var e=0,n=t[0].attributes,o=n.length;e<o;e++)if("data-fancybox-"===n[e].nodeName.substr(0,14))return 1}function h(t){for(var e,n,o,i=!1;(e=t.get(0),o=n=o=n=void 0,n=d.getComputedStyle(e)["overflow-y"],o=d.getComputedStyle(e)["overflow-x"],n=("scroll"===n||"auto"===n)&&e.scrollHeight>e.clientHeight,o=("scroll"===o||"auto"===o)&&e.scrollWidth>e.clientWidth,!(i=n||o))&&((t=t.parent()).length&&!t.hasClass("fancybox-stage")&&!t.is("body")););return i}function n(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",u.proxy(e,"ontouchstart"))}var g=d.requestAnimationFrame||d.webkitRequestAnimationFrame||d.mozRequestAnimationFrame||d.oRequestAnimationFrame||function(t){return d.setTimeout(t,1e3/60)},b=d.cancelAnimationFrame||d.webkitCancelAnimationFrame||d.mozCancelAnimationFrame||d.oCancelAnimationFrame||function(t){d.clearTimeout(t)};n.prototype.destroy=function(){var t=this;t.$container.off(".fb.touch"),u(c).off(".fb.touch"),t.requestId&&(b(t.requestId),t.requestId=null),t.tapped&&(clearTimeout(t.tapped),t.tapped=null)},n.prototype.ontouchstart=function(t){var e=this,n=u(t.target),o=e.instance,i=o.current,s=i.$slide,a=i.$content,r="touchstart"==t.type;if(r&&e.$container.off("mousedown.fb.touch"),(!t.originalEvent||2!=t.originalEvent.button)&&s.length&&n.length&&!l(n)&&!l(n.parent())&&(n.is("img")||!(t.originalEvent.clientX>n[0].clientWidth+n.offset().left))){if(!i||o.isAnimating||i.$slide.hasClass("fancybox-animated"))return t.stopPropagation(),void t.preventDefault();e.realPoints=e.startPoints=f(t),e.startPoints.length&&(i.touch&&t.stopPropagation(),e.startEvent=t,e.canTap=!0,e.$target=n,e.$content=a,e.opts=i.opts.touch,e.isPanning=!1,e.isSwiping=!1,e.isZooming=!1,e.isScrolling=!1,e.canPan=o.canPan(),e.startTime=(new Date).getTime(),e.distanceX=e.distanceY=e.distance=0,e.canvasWidth=Math.round(s[0].clientWidth),e.canvasHeight=Math.round(s[0].clientHeight),e.contentLastPos=null,e.contentStartPos=u.fancybox.getTranslate(e.$content)||{top:0,left:0},e.sliderStartPos=u.fancybox.getTranslate(s),e.stagePos=u.fancybox.getTranslate(o.$refs.stage),e.sliderStartPos.top-=e.stagePos.top,e.sliderStartPos.left-=e.stagePos.left,e.contentStartPos.top-=e.stagePos.top,e.contentStartPos.left-=e.stagePos.left,u(c).off(".fb.touch").on(r?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",u.proxy(e,"ontouchend")).on(r?"touchmove.fb.touch":"mousemove.fb.touch",u.proxy(e,"ontouchmove")),u.fancybox.isMobile&&c.addEventListener("scroll",e.onscroll,!0),((e.opts||e.canPan)&&(n.is(e.$stage)||e.$stage.find(n).length)||(n.is(".fancybox-image")&&t.preventDefault(),u.fancybox.isMobile&&n.parents(".fancybox-caption").length))&&(e.isScrollable=h(n)||h(n.parent()),u.fancybox.isMobile&&e.isScrollable||t.preventDefault(),1!==e.startPoints.length&&!i.hasError||(e.canPan?(u.fancybox.stop(e.$content),e.isPanning=!0):e.isSwiping=!0,e.$container.addClass("fancybox-is-grabbing")),2===e.startPoints.length&&"image"===i.type&&(i.isLoaded||i.$ghost)&&(e.canTap=!1,e.isSwiping=!1,e.isPanning=!1,e.isZooming=!0,u.fancybox.stop(e.$content),e.centerPointStartX=.5*(e.startPoints[0].x+e.startPoints[1].x)-u(d).scrollLeft(),e.centerPointStartY=.5*(e.startPoints[0].y+e.startPoints[1].y)-u(d).scrollTop(),e.percentageOfImageAtPinchPointX=(e.centerPointStartX-e.contentStartPos.left)/e.contentStartPos.width,e.percentageOfImageAtPinchPointY=(e.centerPointStartY-e.contentStartPos.top)/e.contentStartPos.height,e.startDistanceBetweenFingers=p(e.startPoints[0],e.startPoints[1]))))}},n.prototype.onscroll=function(t){this.isScrolling=!0,c.removeEventListener("scroll",this.onscroll,!0)},n.prototype.ontouchmove=function(t){var e=this;return void 0!==t.originalEvent.buttons&&0===t.originalEvent.buttons?void e.ontouchend(t):e.isScrolling?void(e.canTap=!1):(e.newPoints=f(t),void((e.opts||e.canPan)&&e.newPoints.length&&e.newPoints.length&&(e.isSwiping&&!0===e.isSwiping||t.preventDefault(),e.distanceX=p(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=p(e.newPoints[0],e.startPoints[0],"y"),e.distance=p(e.newPoints[0],e.startPoints[0]),0<e.distance&&(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&&e.onZoom()))))},n.prototype.onSwipe=function(t){var i=this,s=i.instance,e=i.isSwiping,n=i.sliderStartPos.left||0;!0!==e?("x"==e&&(0<i.distanceX&&(i.instance.group.length<2||0===i.instance.current.index&&!i.instance.current.opts.loop)?n+=Math.pow(i.distanceX,.8):i.distanceX<0&&(i.instance.group.length<2||i.instance.current.index===i.instance.group.length-1&&!i.instance.current.opts.loop)?n-=Math.pow(-i.distanceX,.8):n+=i.distanceX),i.sliderLastPos={top:"x"==e?0:i.sliderStartPos.top+i.distanceY,left:n},i.requestId&&(b(i.requestId),i.requestId=null),i.requestId=g(function(){i.sliderLastPos&&(u.each(i.instance.slides,function(t,e){var n=e.pos-i.instance.currPos;u.fancybox.setTranslate(e.$slide,{top:i.sliderLastPos.top,left:i.sliderLastPos.left+n*i.canvasWidth+n*e.opts.gutter})}),i.$container.addClass("fancybox-is-sliding"))})):10<Math.abs(i.distance)&&(i.canTap=!1,s.group.length<2&&i.opts.vertical?i.isSwiping="y":s.isDragging||!1===i.opts.vertical||"auto"===i.opts.vertical&&800<u(d).width()?i.isSwiping="x":(e=Math.abs(180*Math.atan2(i.distanceY,i.distanceX)/Math.PI),i.isSwiping=45<e&&e<135?"y":"x"),"y"===i.isSwiping&&u.fancybox.isMobile&&i.isScrollable?i.isScrolling=!0:(s.isDragging=i.isSwiping,i.startPoints=i.newPoints,u.each(s.slides,function(t,e){var n,o;u.fancybox.stop(e.$slide),n=u.fancybox.getTranslate(e.$slide),o=u.fancybox.getTranslate(s.$refs.stage),e.$slide.css({transform:"",opacity:"","transition-duration":""}).removeClass("fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ")}),e.pos===s.current.pos&&(i.sliderStartPos.top=n.top-o.top,i.sliderStartPos.left=n.left-o.left),u.fancybox.setTranslate(e.$slide,{top:n.top-o.top,left:n.left-o.left})}),s.SlideShow&&s.SlideShow.isActive&&s.SlideShow.stop()))},n.prototype.onPan=function(){var t=this;p(t.newPoints[0],t.realPoints[0])<(u.fancybox.isMobile?10:5)?t.startPoints=t.newPoints:(t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&b(t.requestId),t.requestId=g(function(){u.fancybox.setTranslate(t.$content,t.contentLastPos)}))},n.prototype.limitMovement=function(){var t=this,e=t.canvasWidth,n=t.canvasHeight,o=t.distanceX,i=t.distanceY,t=t.contentStartPos,s=t.left,a=t.top,r=t.width,t=t.height,c=e<r?s+o:s,l=a+i,d=Math.max(0,.5*e-.5*r),u=Math.max(0,.5*n-.5*t),e=Math.min(e-r,.5*e-.5*r),r=Math.min(n-t,.5*n-.5*t);return 0<o&&d<c&&(c=d-1+Math.pow(-d+s+o,.8)||0),o<0&&c<e&&(c=e+1-Math.pow(e-s-o,.8)||0),0<i&&u<l&&(l=u-1+Math.pow(-u+a+i,.8)||0),{top:l=i<0&&l<r?r+1-Math.pow(r-a-i,.8)||0:l,left:c}},n.prototype.limitPosition=function(t,e,n,o){var i=this.canvasWidth,s=this.canvasHeight;return t=i<n?(t=0<t?0:t)<i-n?i-n:t:Math.max(0,i/2-n/2),{top:e=s<o?(e=0<e?0:e)<s-o?s-o:e:Math.max(0,s/2-o/2),left:t}},n.prototype.onZoom=function(){var t=this,e=t.contentStartPos,n=e.width,o=e.height,i=e.left,e=e.top,s=p(t.newPoints[0],t.newPoints[1])/t.startDistanceBetweenFingers,a=Math.floor(n*s),r=Math.floor(o*s),n=(n-a)*t.percentageOfImageAtPinchPointX,o=(o-r)*t.percentageOfImageAtPinchPointY,c=(t.newPoints[0].x+t.newPoints[1].x)/2-u(d).scrollLeft(),l=(t.newPoints[0].y+t.newPoints[1].y)/2-u(d).scrollTop(),c=c-t.centerPointStartX,e={top:e+(o+(l-t.centerPointStartY)),left:i+(n+c),scaleX:s,scaleY:s};t.canTap=!1,t.newWidth=a,t.newHeight=r,t.contentLastPos=e,t.requestId&&b(t.requestId),t.requestId=g(function(){u.fancybox.setTranslate(t.$content,t.contentLastPos)})},n.prototype.ontouchend=function(t){var e=this,n=e.isSwiping,o=e.isPanning,i=e.isZooming,s=e.isScrolling;if(e.endPoints=f(t),e.dMs=Math.max((new Date).getTime()-e.startTime,1),e.$container.removeClass("fancybox-is-grabbing"),u(c).off(".fb.touch"),c.removeEventListener("scroll",e.onscroll,!0),e.requestId&&(b(e.requestId),e.requestId=null),e.isSwiping=!1,e.isPanning=!1,e.isZooming=!1,e.isScrolling=!1,e.instance.isDragging=!1,e.canTap)return e.onTap(t);e.speed=100,e.velocityX=e.distanceX/e.dMs*.5,e.velocityY=e.distanceY/e.dMs*.5,o?e.endPanning():i?e.endZooming():e.endSwiping(n,s)},n.prototype.endSwiping=function(t,e){var n=this,o=!1,i=n.instance.group.length,s=Math.abs(n.distanceX),i="x"==t&&1<i&&(130<n.dMs&&10<s||50<s);n.sliderLastPos=null,"y"==t&&!e&&50<Math.abs(n.distanceY)?(u.fancybox.animate(n.instance.current.$slide,{top:n.sliderStartPos.top+n.distanceY+150*n.velocityY,opacity:0},200),o=n.instance.close(!0,250)):i&&0<n.distanceX?o=n.instance.previous(300):i&&n.distanceX<0&&(o=n.instance.next(300)),!1!==o||"x"!=t&&"y"!=t||n.instance.centerSlide(200),n.$container.removeClass("fancybox-is-sliding")},n.prototype.endPanning=function(){var t,e,n=this;n.contentLastPos&&(t=!1===n.opts.momentum||350<n.dMs?(e=n.contentLastPos.left,n.contentLastPos.top):(e=n.contentLastPos.left+500*n.velocityX,n.contentLastPos.top+500*n.velocityY),(e=n.limitPosition(e,t,n.contentStartPos.width,n.contentStartPos.height)).width=n.contentStartPos.width,e.height=n.contentStartPos.height,u.fancybox.animate(n.$content,e,366))},n.prototype.endZooming=function(){var t,e,n=this,o=n.instance.current,i=n.newWidth,s=n.newHeight;n.contentLastPos&&(t=n.contentLastPos.left,e=n.contentLastPos.top,u.fancybox.setTranslate(n.$content,{top:e,left:t,width:i,height:s,scaleX:1,scaleY:1}),i<n.canvasWidth&&s<n.canvasHeight?n.instance.scaleToFit(150):i>o.width||s>o.height?n.instance.scaleToActual(n.centerPointStartX,n.centerPointStartY,150):(o=n.limitPosition(t,e,i,s),u.fancybox.animate(n.$content,o,150)))},n.prototype.onTap=function(e){function t(t){if(t=a.opts[t],t=u.isFunction(t)?t.apply(s,[a,e]):t)switch(t){case"close":s.close(o.startEvent);break;case"toggleControls":s.toggleControls();break;case"next":s.next();break;case"nextOrClose":1<s.group.length?s.next():s.close(o.startEvent);break;case"zoom":"image"==a.type&&(a.isLoaded||a.$ghost)&&(s.canPan()?s.scaleToFit():s.isScaledDown()?s.scaleToActual(c,l):s.group.length<2&&s.close(o.startEvent))}}var n,o=this,i=u(e.target),s=o.instance,a=s.current,r=e&&f(e)||o.startPoints,c=r[0]?r[0].x-u(d).scrollLeft()-o.stagePos.left:0,l=r[0]?r[0].y-u(d).scrollTop()-o.stagePos.top:0;if((!e.originalEvent||2!=e.originalEvent.button)&&(i.is("img")||!(c>i[0].clientWidth+i.offset().left))){if(i.is(".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container"))n="Outside";else if(i.is(".fancybox-slide"))n="Slide";else{if(!s.current.$content||!s.current.$content.find(i).addBack().filter(i).length)return;n="Content"}if(o.tapped){if(clearTimeout(o.tapped),o.tapped=null,50<Math.abs(c-o.tapX)||50<Math.abs(l-o.tapY))return this;t("dblclick"+n)}else o.tapX=c,o.tapY=l,a.opts["dblclick"+n]&&a.opts["dblclick"+n]!==a.opts["click"+n]?o.tapped=setTimeout(function(){o.tapped=null,s.isAnimating||t("click"+n)},500):t("click"+n);return this}},u(c).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new n(e))}).on("beforeClose.fb",function(t,e){e&&e.Guestures&&e.Guestures.destroy()})}(window,document,jQuery),function(s,a){"use strict";a.extend(!0,a.fancybox.defaults,{btnTpl:{slideShow:'<button data-fancybox-play class="fancybox-button fancybox-button--play" title="{{PLAY_START}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.5 5.4v13.2l11-6.6z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.33 5.75h2.2v12.5h-2.2V5.75zm5.15 0h2.2v12.5h-2.2V5.75z"/></svg></button>'},slideShow:{autoStart:!1,speed:3e3,progress:!0}});function n(t){this.instance=t,this.init()}a.extend(n.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this,e=t.instance,n=e.group[e.currIndex].opts.slideShow;t.$button=e.$refs.toolbar.find("[data-fancybox-play]").on("click",function(){t.toggle()}),e.group.length<2||!n?t.$button.hide():n.progress&&(t.$progress=a('<div class="fancybox-progress"></div>').appendTo(e.$refs.inner))},set:function(t){var e=this,n=e.instance,o=n.current;o&&(!0===t||o.opts.loop||n.currIndex<n.group.length-1)?e.isActive&&"video"!==o.contentType&&(e.$progress&&a.fancybox.animate(e.$progress.show(),{scaleX:1},o.opts.slideShow.speed),e.timer=setTimeout(function(){n.current.opts.loop||n.current.index!=n.group.length-1?n.next():n.jumpTo(0)},o.opts.slideShow.speed)):(e.stop(),n.idleSecondsCounter=0,n.showControls())},clear:function(){clearTimeout(this.timer),this.timer=null,this.$progress&&this.$progress.removeAttr("style").hide()},start:function(){var t=this,e=t.instance.current;e&&(t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_STOP).removeClass("fancybox-button--play").addClass("fancybox-button--pause"),t.isActive=!0,e.isComplete&&t.set(!0),t.instance.trigger("onSlideShowChange",!0))},stop:function(){var t=this,e=t.instance.current;t.clear(),t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_START).removeClass("fancybox-button--pause").addClass("fancybox-button--play"),t.isActive=!1,t.instance.trigger("onSlideShowChange",!1),t.$progress&&t.$progress.removeAttr("style").hide()},toggle:function(){this.isActive?this.stop():this.start()}}),a(s).on({"onInit.fb":function(t,e){e&&!e.SlideShow&&(e.SlideShow=new n(e))},"beforeShow.fb":function(t,e,n,o){e=e&&e.SlideShow;o?e&&n.opts.slideShow.autoStart&&e.start():e&&e.isActive&&e.clear()},"afterShow.fb":function(t,e,n){e=e&&e.SlideShow;e&&e.isActive&&e.set()},"afterKeydown.fb":function(t,e,n,o,i){e=e&&e.SlideShow;!e||!n.opts.slideShow||80!==i&&32!==i||a(s.activeElement).is("button,a,input")||(o.preventDefault(),e.toggle())},"beforeClose.fb onDeactivate.fb":function(t,e){e=e&&e.SlideShow;e&&e.stop()}}),a(s).on("visibilitychange",function(){var t=a.fancybox.getInstance(),t=t&&t.SlideShow;t&&t.isActive&&(s.hidden?t.clear():t.set())})}(document,jQuery),function(s,n){"use strict";var o,i=function(){for(var t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],e={},n=0;n<t.length;n++){var o=t[n];if(o&&o[1]in s){for(var i=0;i<o.length;i++)e[t[0][i]]=o[i];return e}}return!1}();i&&(o={request:function(t){(t=t||s.documentElement)[i.requestFullscreen](t.ALLOW_KEYBOARD_INPUT)},exit:function(){s[i.exitFullscreen]()},toggle:function(t){t=t||s.documentElement,this.isFullscreen()?this.exit():this.request(t)},isFullscreen:function(){return Boolean(s[i.fullscreenElement])},enabled:function(){return Boolean(s[i.fullscreenEnabled])}},n.extend(!0,n.fancybox.defaults,{btnTpl:{fullScreen:'<button data-fancybox-fullscreen class="fancybox-button fancybox-button--fsenter" title="{{FULL_SCREEN}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"/></svg></button>'},fullScreen:{autoStart:!1}}),n(s).on(i.fullscreenchange,function(){var t=o.isFullscreen(),e=n.fancybox.getInstance();e&&(e.current&&"image"===e.current.type&&e.isAnimating&&(e.isAnimating=!1,e.update(!0,!0,0),e.isComplete||e.complete()),e.trigger("onFullscreenChange",t),e.$refs.container.toggleClass("fancybox-is-fullscreen",t),e.$refs.toolbar.find("[data-fancybox-fullscreen]").toggleClass("fancybox-button--fsenter",!t).toggleClass("fancybox-button--fsexit",t))})),n(s).on({"onInit.fb":function(t,e){i?e&&e.group[e.currIndex].opts.fullScreen?(e.$refs.container.on("click.fb-fullscreen","[data-fancybox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),o.toggle()}),e.opts.fullScreen&&!0===e.opts.fullScreen.autoStart&&o.request(),e.FullScreen=o):e&&e.$refs.toolbar.find("[data-fancybox-fullscreen]").hide():e.$refs.toolbar.find("[data-fancybox-fullscreen]").remove()},"afterKeydown.fb":function(t,e,n,o,i){e&&e.FullScreen&&70===i&&(o.preventDefault(),e.FullScreen.toggle())},"beforeClose.fb":function(t,e){e&&e.FullScreen&&e.$refs.container.hasClass("fancybox-is-fullscreen")&&o.exit()}})}(document,jQuery),function(t,s){"use strict";function n(t){this.init(t)}var a="fancybox-thumbs";s.fancybox.defaults=s.extend(!0,{btnTpl:{thumbs:'<button data-fancybox-thumbs class="fancybox-button fancybox-button--thumbs" title="{{THUMBS}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.59 14.59h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76H5.65V5.65z"/></svg></button>'},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"}},s.fancybox.defaults);s.extend(n.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e=this,n=t.group,o=0;e.instance=t,e.opts=n[t.currIndex].opts.thumbs,(t.Thumbs=e).$button=t.$refs.toolbar.find("[data-fancybox-thumbs]");for(var i=0,s=n.length;i<s&&(n[i].thumb&&o++,!(1<o));i++);1<o&&e.opts?(e.$button.removeAttr("style").on("click",function(){e.toggle()}),e.isActive=!0):e.$button.hide()},create:function(){var n,t=this,e=t.instance,o=t.opts.parentEl,i=[];t.$grid||(t.$grid=s('<div class="'+a+" "+a+"-"+t.opts.axis+'"></div>').appendTo(e.$refs.container.find(o).addBack().filter(o)),t.$grid.on("click","a",function(){e.jumpTo(s(this).attr("data-index"))})),t.$list||(t.$list=s('<div class="'+a+'__list">').appendTo(t.$grid)),s.each(e.group,function(t,e){(n=e.thumb)||"image"!==e.type||(n=e.src),i.push('<a href="javascript:;" tabindex="0" data-index="'+t+'"'+(n&&n.length?' style="background-image:url('+n+')"':'class="fancybox-thumbs-missing"')+"></a>")}),t.$list[0].innerHTML=i.join(""),"x"===t.opts.axis&&t.$list.width(parseInt(t.$grid.css("padding-right"),10)+e.group.length*t.$list.children().eq(0).outerWidth(!0))},focus:function(t){var e,n,o=this,i=o.$list,s=o.$grid;o.instance.current&&(n=(e=i.children().removeClass("fancybox-thumbs-active").filter('[data-index="'+o.instance.current.index+'"]').addClass("fancybox-thumbs-active")).position(),"y"===o.opts.axis&&(n.top<0||n.top>i.height()-e.outerHeight())?i.stop().animate({scrollTop:i.scrollTop()+n.top},t):"x"===o.opts.axis&&(n.left<s.scrollLeft()||n.left>s.scrollLeft()+(s.width()-e.outerWidth()))&&i.parent().stop().animate({scrollLeft:n.left},t))},update:function(){var t=this;t.instance.$refs.container.toggleClass("fancybox-show-thumbs",this.isVisible),t.isVisible?(t.$grid||t.create(),t.instance.trigger("onThumbsShow"),t.focus(0)):t.$grid&&t.instance.trigger("onThumbsHide"),t.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),s(t).on({"onInit.fb":function(t,e){!e||e.Thumbs||(e=new n(e)).isActive&&!0===e.opts.autoStart&&e.show()},"beforeShow.fb":function(t,e,n,o){e=e&&e.Thumbs;e&&e.isVisible&&e.focus(o?0:250)},"afterKeydown.fb":function(t,e,n,o,i){e=e&&e.Thumbs;e&&e.isActive&&71===i&&(o.preventDefault(),e.toggle())},"beforeClose.fb":function(t,e){e=e&&e.Thumbs;e&&e.isVisible&&!1!==e.opts.hideOnClose&&e.$grid.hide()}})}(document,jQuery),function(t,i){"use strict";i.extend(!0,i.fancybox.defaults,{btnTpl:{share:'<button data-fancybox-share class="fancybox-button fancybox-button--share" title="{{SHARE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.55 19c1.4-8.4 9.1-9.8 11.9-9.8V5l7 7-7 6.3v-3.5c-2.8 0-10.5 2.1-11.9 4.2z"/></svg></button>'},share:{url:function(t,e){return!t.currentHash&&"inline"!==e.type&&"html"!==e.type&&(e.origSrc||e.src)||window.location},tpl:'<div class="fancybox-share"><h1>{{SHARE}}</h1><p><a class="fancybox-share__button fancybox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{url}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg><span>Facebook</span></a><a class="fancybox-share__button fancybox-share__button--tw" href="https://twitter.com/intent/tweet?url={{url}}&text={{descr}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg><span>Twitter</span></a><a class="fancybox-share__button fancybox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{url}}&description={{descr}}&media={{media}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg><span>Pinterest</span></a></p><p><input class="fancybox-share__input" type="text" value="{{url_raw}}" onclick="select()" /></p></div>'}}),i(t).on("click","[data-fancybox-share]",function(){var t,e,n=i.fancybox.getInstance(),o=n.current||null;o&&("function"===i.type(o.opts.share.url)&&(t=o.opts.share.url.apply(o,[n,o])),o=o.opts.share.tpl.replace(/\{\{media\}\}/g,"image"===o.type?encodeURIComponent(o.src):"").replace(/\{\{url\}\}/g,encodeURIComponent(t)).replace(/\{\{url_raw\}\}/g,(e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"},String(t).replace(/[&<>"'`=\/]/g,function(t){return e[t]}))).replace(/\{\{descr\}\}/g,n.$caption?encodeURIComponent(n.$caption.text()):""),i.fancybox.open({src:n.translate(n,o),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){n.$refs.container.one("beforeClose.fb",function(){t.close(null,0)}),e.$content.find(".fancybox-share__button").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1})},mobile:{autoFocus:!1}}}))})}(document,jQuery),function(s,a,o){"use strict";function i(){var t=s.location.hash.substr(1),e=t.split("-"),n=1<e.length&&/^\+?\d+$/.test(e[e.length-1])&&parseInt(e.pop(-1),10)||1;return{hash:t,index:n<1?1:n,gallery:e.join("-")}}function e(t){""!==t.gallery&&o("[data-fancybox='"+o.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.fb-start")}function r(t){return!!t&&(""!==(t=(t=(t.current||t).opts).hash||(t.$orig?t.$orig.data("fancybox")||t.$orig.data("fancybox-trigger"):""))&&t)}o.escapeSelector||(o.escapeSelector=function(t){return(t+"").replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t})}),o(function(){!1!==o.fancybox.defaults.hash&&(o(a).on({"onInit.fb":function(t,e){var n,o;!1!==e.group[e.currIndex].opts.hash&&(n=i(),(o=r(e))&&n.gallery&&o==n.gallery&&(e.currIndex=n.index-1))},"beforeShow.fb":function(t,e,n,o){var i;n&&!1!==n.opts.hash&&(i=r(e))&&(e.currentHash=i+(1<e.group.length?"-"+(n.index+1):""),s.location.hash!=="#"+e.currentHash&&(o&&!e.origHash&&(e.origHash=s.location.hash),e.hashTimer&&clearTimeout(e.hashTimer),e.hashTimer=setTimeout(function(){"replaceState"in s.history?(s.history[o?"pushState":"replaceState"]({},a.title,s.location.pathname+s.location.search+"#"+e.currentHash),o&&(e.hasCreatedHistory=!0)):s.location.hash=e.currentHash,e.hashTimer=null},300)))},"beforeClose.fb":function(t,e,n){n&&!1!==n.opts.hash&&(clearTimeout(e.hashTimer),e.currentHash&&e.hasCreatedHistory?s.history.back():e.currentHash&&("replaceState"in s.history?s.history.replaceState({},a.title,s.location.pathname+s.location.search+(e.origHash||"")):s.location.hash=e.origHash),e.currentHash=null)}}),o(s).on("hashchange.fb",function(){var t=i(),n=null;o.each(o(".fancybox-container").get().reverse(),function(t,e){e=o(e).data("FancyBox");if(e&&e.currentHash)return n=e,!1}),n?n.currentHash===t.gallery+"-"+t.index||1===t.index&&n.currentHash==t.gallery||(n.currentHash=null,n.close()):""!==t.gallery&&e(t)}),setTimeout(function(){o.fancybox.getInstance()||e(i())},50))})}(window,document,jQuery),function(t,e){"use strict";var i=(new Date).getTime();e(t).on({"onInit.fb":function(t,o,e){o.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var e=o.current,n=(new Date).getTime();o.group.length<2||!1===e.opts.wheel||"auto"===e.opts.wheel&&"image"!==e.type||(t.preventDefault(),t.stopPropagation(),e.$slide.hasClass("fancybox-animated")||(t=t.originalEvent||t,n-i<250||(i=n,o[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())))})}})}(document,jQuery);var doJsRedirect=function(e){e=e||!1,0<(redirect=$('*[data-redirect="1"]')).length&&((redirectUrl=redirect.attr("data-redirect-url"))?location.href=redirectUrl:window.location.reload(),e&&e.modal("hide"))};$(function(){$("#redirect-flash-message").length&&$("#redirect-flash-message").modal()});;var TYPO3=TYPO3||{};TYPO3.lang={"pm_site_hbm":{"choose_language":"","language_menu.language":"Language","language_menu.country":"Country","vat_explanation":" Please, enter the VAT number preceded by the country code (e.g. IT12345678900)"}};