var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); /* SCRIPTS MADE BY THEMEMOUNTAIN: Swipe It, Timber, Avalanche Slider, Summit Lightbox, Snowbridge Parallax, Horizon, Retinize, Equalize, Counter THESE PLUGINS ARE LICENSED UNDER ENVATO'S REGULAR/EXTENDED LICENSE SEPCIFICALLY FOR USE IN OUR PRODUCTS. REDISTRIBUTON PROHIBITED! For individual licenses please visit thememountain.com. */ /** * Swipe Plugin * Version: 1.0 */ !function(t){"use strict";t.fn.swipeIt=function(i){var e=t.extend({swipeThreshold:40,scrollThreshold:10,draggable:!1,preventTouchOn:"",onSwipeMove:null,onSwipeEnd:null},i),a=this,n=0,s=0,o=e.swipeThreshold,r="ontouchend"in document,d=r?"touchstart":"pointerdown",c=r?"touchmove":"pointermove",l=r?"touchend":"pointermove",u=function(t){t.stopPropagation(),n=t.originalEvent.touches?t.originalEvent.touches[0].pageX:t,a.on(c,h)},h=function(i){if(!t(i.target).closest(e.preventTouchOn).length||""===e.preventTouchOn){if(s=i.originalEvent.touches?i.originalEvent.touches[0].pageX:i,Math.abs(n-s)>e.scrollThreshold&&i.preventDefault(),e.draggable){var o;o=-(n-s),e.onSwipeMove(o)}if(s===n)return!1;a.on(l,p)}},p=function(){var t;Math.abs(s-n)>o&&(t=s>n?"left":"right",e.onSwipeEnd(t)),a.off(c,h),a.off(l,p)};return a.on(d,u),this}}(jQuery); /** * Timber * Version: 1.1.4 */ $(document).ready(function(){"use strict";var a,b=ea?"touchstart":"click",c=".wrapper",d=".element-reveal-left",e=".element-reveal-right",f=".side-navigation-wrapper",g=".side-nav-show, a.side-nav-show",h=".side-nav-hide a",i=".no-scroll",j=".element-show-left",k=".element-show-right",l="easeInOutQuint",m={init:function(){if(!$(f).length)return!1;$("body").data("aux-nav",!1);var a=$(f).data("animation")?$(f).data("animation"):"no-transition",n=$(f).is("[data-no-scrollbar]")?"no-scrollbar":"scrollbar";"no-transition"===a&&$(c).addClass(a+"-reset"),$(c).addClass("reveal-side-navigation"),$(f).addClass(a+"-reset "+n);var o=$(f).hasClass("enter-right")?"right":"left";_?p="left"===o?d:e:(p="left"===o?j:k,$(f).addClass("hide"));var p=p.split(".").join("");i=i.split(".").join(""),$(g).on(b,function(d){if(d.preventDefault(),$(f).hasClass("active"))m.closeNav(p,a);else{A.state(!0),y.state(!0),$("body").data("aux-nav",!0),$("html, body").addClass(i);var e=$(window).scrollTop();ea||$(".header-inner").css({top:e+"px"}),_?($(c).addClass(p+" inactive "+a).css({transitionTimingFunction:da[l]}),$(f).addClass("active "+a).css({transitionTimingFunction:da[l]})):($(c).addClass(p),$(f).removeClass("hide").addClass("active")),$(c).on(ca,function(c){return c.target===$(this)[0]&&(c.stopPropagation(),$(this).off(ca),void $(".reveal-side-navigation").on(b,function(c){$(".reveal-side-navigation").off(b),m.closeNav(p,a)}))})}}),$(h).on(b,function(c){c.preventDefault(),$(".reveal-side-navigation").off(b),m.closeNav(p,a)}),$(window).on("resize",function(){$("body").data("aux-nav")?y.state(!0):y.state(!1)})},closeNav:function(a,b){_?(A.state(!0),$(c).removeClass(a+" "+b),$(f).removeClass(b),"no-transition"===b&&($("html, body").removeClass(i),$(c).removeClass("inactive"),$(f).removeClass("active")),$(c).on(ca,function(a){return a.target===$(this)[0]&&(a.stopPropagation(),y.state(!1),$(this).off(ca),$("html, body").removeClass(i),$(c).removeClass("inactive"),$(f).removeClass("active"),void(ea||$(".header-inner").css({top:0})))})):($(c).removeClass(a+" "+b),$(f).addClass("hide").removeClass("active")),$("body").data("aux-nav",!1)}},n=".overlay-navigation-wrapper",o=".overlay-navigation-inner",p=".overlay-nav-show a, a.overlay-nav-show",q=".overlay-nav-hide a, .one-page-nav .overlay-navigation .scroll-link",r=".no-scroll",s="easeInOutQuint",t={init:function(){if(!$(n).length)return!1;var a=$(n).data("animation")?$(n).data("animation"):"no-transition",c=$(n).is("[data-no-scrollbar]")?"no-scrollbar":"scrollbar";$(n).addClass(a+"-reset "+c),r=r.split(".").join(""),$(p).on(b,function(b){b.preventDefault(),$(n).hasClass("active")?t.closeNav(a):($("body").data("aux-nav",!0),$("html, body").addClass(r),_?$(n).addClass("active "+a).css({transitionTimingFunction:da[s]}):$(n).addClass("active"),$(n).on(ca,function(a){return a.target===$(this)[0]&&(a.stopPropagation(),y.state(!0),void $(this).off(ca))}))}),$(o).on(b,function(b){b.target===this&&t.closeNav(a)}),$(q).on(b,function(b){b.preventDefault(),t.closeNav(a)}),$(window).on("resize",function(){$("body").data("aux-nav")?y.state(!0):y.state(!1)})},closeNav:function(a){_?($(n).removeClass(a),"no-transition"===a&&($("html, body").removeClass(r),$(n).removeClass("active")),$(n).on(ca,function(a){return a.target===$(this)[0]&&(a.stopPropagation(),y.state(!1),$(this).off(ca),$("html, body").removeClass(r),void $(n).removeClass("active"))})):$(n).removeClass("active").css({top:"-100%"}),$("body").data("aux-nav",!1)}},u=".side-navigation-wrapper, .overlay-navigation-wrapper",v=".sub-menu",w=".contains-sub-menu",x={init:function(){$(u).find(w).each(function(){var a,c;$(this).parent().hasClass("current")&&(a=$(this).siblings(v).children(),c=0,a.each(function(){c+=$(this).outerHeight()}),$(this).siblings(v).addClass("open").css({height:c+"px"})),$(this).on(b,function(b){b.preventDefault(),$(this).parent().hasClass("current")?$(u).find("nav").children("ul").children().removeClass("current"):($(u).find("nav").children("ul").children().removeClass("current"),$(this).parent().addClass("current")),A.state(!0),a=$(this).siblings(v).children(),c=0,a.each(function(){c+=$(this).outerHeight()}),$(this).siblings(v).hasClass("open")?$(this).closest(u).find(v).css({height:0}).removeClass("open"):($(this).closest(u).find(v).css({height:0}).removeClass("open"),$(this).siblings(v).css({height:c+"px"}),$(this).siblings(v).addClass("open"))})})}},y={state:function(a){ea?a?$("body").addClass("aux-navigation-active"):$("body").removeClass("aux-navigation-active"):a?$("body").addClass("aux-navigation-active"):$("body").data("aux-nav")||$("body").removeClass("aux-navigation-active")}},z=".header, .header-inner, .logo, .logo a, .header .navigation",A={init:function(){ea||$(window).on("scroll",function(){A.state(!0)}),$(window).on("resize",function(){A.state(!1)})},state:function(a){a?$(z).removeClass("no-transition"):$(z).addClass("no-transition")}},B=300,C=".scroll-to-top",D=600,E={init:function(){$(window).on("scroll",function(){return!$(C).is("[data-no-hide]")&&void($(this).scrollTop()>B?$(C).fadeIn(D):$(C).fadeOut(D))}),$(C).on(b,function(a){a.preventDefault(),E.scrollUp()})},scrollUp:function(){$("html, body").animate({scrollTop:0},D)}},F=".header",G=".tabs",H=".tab-trigger-click",I=".accordion",J="icon-plus",K="icon-minus",L=".accordion-content",M=".accordion-trigger-click",N=".box.dismissable",O=300,P="swing",Q=".dropdown",R=".thumbnail",S=".overlay-info, img",T=".overlay-info",U=400,V="easeInOutQuint",W=".background-image-container",X={init:function(){X.tabs(),X.accordions(),X.dismissable(),X.dropdown(),X.rollovers(),X.thumbnailRatio(),X.setAsBackground()},tabs:function(){$(G).each(function(){var a=$(this).children(".tab-nav").find("li > a");$(this).find(".tab-panes > .active").addClass("animate-in"),a.each(function(){$(this).on(b,function(){var a=$(this).attr("href"),b=$(this).closest(".tabs").find(a);if($(this).closest(".tab-nav").find(".active").removeClass("active"),$(this).parent().addClass("active"),$(this).closest(".tabs").find(".tab-panes > .active").removeClass("active animate-in"),b.addClass("active"),b.find(".tm-slider-container").length>0){var c=b.find(".tm-slider-container").data("avalancheSlider");c.resizeSlider()}var d=null;return clearTimeout(d),d=setTimeout(function(){b.addClass("animate-in")},50),!1}),$(this).parent().hasClass("active")&&$(this).closest(".tabs").find($(this).attr("href")).addClass("active")})}),$(H).each(function(){$(this).on("click",function(){var a=$(this).data("target-tab");return $(G).find(a).trigger("click"),!1})})},accordions:function(){$(I).each(function(){var a=$(this).children().children().children("a");a.each(function(){$(this).closest(I).is("[data-toggle-icon]")&&($(this).find("span").length||$(this).parent().hasClass("active")?!$(this).find("span").length&&$(this).parent().hasClass("active")&&$(this).prepend(''):$(this).prepend('')),$(this).on(b,function(){var a=$(this),b=a.attr("href"),c=a.closest(I).find(b),d=a.closest(I).find(L).parent();a.closest(I).children().children(".active").children("div").each(function(){var a=$(this).children().outerHeight();$(this).addClass("no-transition").css({height:a+"px"})});var e=null;return clearTimeout(e),e=a.parent().hasClass("active")?setTimeout(function(){a.closest(I).is("[data-toggle-multiple]")?a.siblings(c).removeClass("no-transition").css({height:0}):a.siblings("div").removeClass("no-transition").css({height:0}),a.parent().removeClass("active")},50):setTimeout(function(){var b=a.siblings(c).find(L).outerHeight();a.closest(I).is("[data-toggle-multiple]")||(d.removeClass("no-transition").css({height:0}),a.closest(I).children().children("li").removeClass("active")),a.parent().addClass("active"),a.siblings(c).removeClass("no-transition").css({height:b+"px"})},50),a.find("."+K).length?a.find("."+K).removeClass(K).addClass(J):a.find("."+J).length&&(a.closest(I).is("[data-toggle-multiple]")||a.closest("ul").find("."+K).removeClass(K).addClass(J),a.find("."+J).removeClass(J).addClass(K)),!1})}),$(M).each(function(){$(this).on("click",function(){var a=$(this).data("target-accordion");return $(I).find(a).trigger("click"),!1})}),$(window).on("resize",function(){$(I).each(function(){$(this).children().children(".active").children("div").addClass("no-transition").css({height:"auto"})})})})},dismissable:function(){$(N).each(function(){$(this).find(".close").length||$(this).prepend(''),$(this).find(".close").on(b,function(a){a.preventDefault(),_?$(this).parent().css({transitionProperty:"opacity",opacity:0,transitionDuration:O+"ms",transitionTimingFunction:da[P]}).on(ca,function(a){return a.stopPropagation(),a.target===$(this)[0]&&void $(this).remove()}):$(this).parent().animate({opacity:0},U,P,function(){$(this).remove()})})})},dropdown:function(){$(Q).each(function(){$(this).children(".button, button").not().each(function(){$(this).on(b,function(b){b.preventDefault(),$(Q).children(".button, button").removeClass("active");var c=$(this).parent().children(".dropdown-list");return!$(this).parent().hasClass("disabled")&&($(".dropdown-list").not($(c)).removeClass("active"),$(c).hasClass("active")?($(c).removeClass("active"),$(this).removeClass("active")):($(c).addClass("active"),$(this).addClass("active")),void $(document).on("click.closeDropdown",function(b){$(b.target).closest(Q).length||a()}))}),$(this).parent().children(".dropdown-list").find("li a").on(b,function(a){a.preventDefault(),$(".dropdown-list").removeClass("active"),$(this).removeClass("active")}),ea||$(window).on("scroll",function(){a()}),$(F).find(".navigation > ul > li > a").mouseenter(function(){a()});var a=function(){$(Q).each(function(){$(this).find(".button, button").removeClass("active"),$(this).find(".dropdown-list").removeClass("active")}),$(document).off("click.closeDropdown")}})})},rollovers:function(){_?$(R).each(function(){var a,b=$(this).data("hover-speed")?$(this).data("hover-speed"):U,c=$(this).data("hover-easing")?$(this).data("hover-easing"):V,d=$(this).data("hover-bkg-opacity")?$(this).data("hover-bkg-opacity"):1;if($(this).data("hover-bkg-color")){var e=$(this).data("hover-bkg-color");e=e.replace("#","");var f=parseInt(e.substring(0,2),16),g=parseInt(e.substring(2,4),16),h=parseInt(e.substring(4,6),16);a="rgba( "+f+","+g+","+h+","+d/1+" )"}else a=$(this).find(T).css("background-color");$(this).find(S).css({transitionDuration:b+"ms",transitionTimingFunction:da[c]}),$(this).find(T).css({backgroundColor:a})}):$(R).find(".overlay-link").mouseenter(function(){$(this).find(T).css({opacity:0}).stop().animate({opacity:1},U,V)}).mouseleave(function(){$(this).find(T).stop().animate({opacity:0},U,V)})},thumbnailRatio:function(){$(window).on("resize",function(){$(R).each(function(){if($(this).find(".caption-over-outer").length){var a=$(this).find("img, video"),b=a.attr("width"),c=a.attr("height"),d=$(this).find("img, video").width(),e=b>=c?b/c:c/b,f=b>=c?d/e:d*e;$(this).find(".caption-over-outer").css({opacity:1}),$(this).css({height:f+"px"})}})}).resize()},setAsBackground:function(){$(W).each(function(){var a=$(this).children("img").attr("src");$(this).css({"background-image":"url("+a+")"})})}},Y=document.body||document.documentElement,Z=Y.style,_=void 0!==Z.transition||void 0!==Z.WebkitTransition||void 0!==Z.MozTransition||void 0!==Z.MsTransition||void 0!==Z.OTransition,aa=["WebkitTransform","MozTransform","OTransform","msTransform"];for(var ba in aa)void 0!==Z[aa[ba]]&&(a="-"+aa[ba].replace("Transform","").toLowerCase());var ca="webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend";_&&(document.getElementsByTagName("body")[0].className+=" transition-support");var da={linear:"cubic-bezier(0, 0, 1, 1)",swing:"cubic-bezier(0.42, 0, 0.58, 1)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};window.onpageshow=function(a){a.persisted&&$("body").addClass("page-fade-reset").removeClass("page-fade-out")};var ea=!1;(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/Windows Phone/i))&&(ea=!0,document.getElementsByTagName("body")[0].className+=" mobile");var fa="WebkitAppearance"in document.documentElement.style;fa&&(document.getElementsByTagName("body")[0].className+=" webkit");var ga=/constructor/i.test(window.HTMLElement);ga&&(document.getElementsByTagName("body")[0].className+=" safari-browser");var ha=document.all&&document.addEventListener||"-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style;ha&&(document.getElementsByTagName("body")[0].className+=" ie-browser");var ia=document.all&&document.addEventListener;ia&&(document.getElementsByTagName("body")[0].className+=" ie-be-11",$(".flex").removeClass("flex").addClass("equalize")),m.init(),t.init(),x.init(),A.init(),E.init(),X.init()}); /** * Avalanche Slider * Version: 1.1.9 */ !function(a,e,t,i){"use strict";function s(e){e.find(".tms-caption").each(function(){function e(){a.each(i,function(a,e){e=e.split(":");var i=e[0],s=e[1];"opacity"===i&&t.data("o",s),"scale"===i&&t.data("s",s),"easing"===i&&t.data("e",s),"transX"===i&&t.data("tx",parseFloat(s)),"transY"===i&&t.data("ty",parseFloat(s)),"transZ"===i&&t.data("tz",parseFloat(s)),"rotateX"===i&&t.data("rx",parseFloat(s)),"rotateY"===i&&t.data("ry",parseFloat(s)),"rotateZ"===i&&t.data("rz",parseFloat(s)),"transOrigX"===i&&t.data("ox",s),"transOrigY"===i&&t.data("oy",s),"duration"===i&&t.data("du",parseFloat(s)),"delay"===i&&t.data("de",parseFloat(s))})}var t=a(this),i=String(t.data("animate-in")).split(";");t.is("[data-no-scale]")?t.addClass("no-scale"):t.addClass("scale"),t.parent().addClass("tms-perspective"),-1!=a.inArray("preset",String(i).split(":"))?i.filter(function(t){if("preset"===t.split(":")[0]){i.splice(a.inArray(t,i),1);var s=String(M[t.split(":")[1]]).split(";");i=a.merge(s,i).filter(Boolean),e()}}):e(),t.data("w",parseFloat(t.css("width"))),t.data("h",parseFloat(t.css("height"))),t.data("fs",parseFloat(t.css("font-size"))),t.data("lh",parseFloat(t.css("line-height"))),t.data("pt",parseFloat(t.css("padding-top"))),t.data("pr",parseFloat(t.css("padding-right"))),t.data("pb",parseFloat(t.css("padding-bottom"))),t.data("pl",parseFloat(t.css("padding-left"))),t.data("mt",parseFloat(t.css("margin-top"))),t.data("mr",parseFloat(t.css("margin-right"))),t.data("mb",parseFloat(t.css("margin-bottom"))),t.data("ml",parseFloat(t.css("margin-left"))),t.data("bt",parseFloat(t.css("border-top-width"))),t.data("br",parseFloat(t.css("border-right-width"))),t.data("bb",parseFloat(t.css("border-bottom-width"))),t.data("bl",parseFloat(t.css("border-left-width")))})}function n(e,i,s){var n=e.find(".tms-slide"),o=0;n.each(function(){var n=a(this),d=n.find("img").length,l=n.find("iframe, video").length;n.children(".tms-caption").length;w(n,i);var c=a('
');if(d>0&&(i.lazyLoad?c.appendTo(n):a(e).find(".tm-loader").length||c.appendTo(e)),l){X&&n.is("[data-video-bkg]")&&n.children("video").css({display:"none"});var u=n.find("iframe, video");k(e,u,i),b(n,i),v(e,i)}d?n.find("img").each(function(e,l){l=a(this).data("src");var c=l,u=l.substr(l.lastIndexOf("."));if((t.isRetinaDevice()&&i.retinaSupport||t.isRetinaDevice()&&a(this).is("[data-retina]"))&&(!X&&!i.retinaSupportMobile||X&&i.retinaSupportMobile)&&(l.match(/\.(svg)/i)||(l=a(this).data("retina")?a(this).data("retina"):a(this).data("src").replace(u,i.retinaSuffix+u))),n.data("overlay-bkg-color")&&!n.find(".tms-overlay").length)var p=n.data("overlay-bkg-color").replace("#",""),h=n.data("overlay-bkg-opacity")?n.data("overlay-bkg-opacity"):.5,g=parseInt(p.substring(0,2),16),f=parseInt(p.substring(2,4),16),m=parseInt(p.substring(4,6),16),v="rgba( "+g+","+f+","+m+","+h/1+" )",b=a('
').css({backgroundColor:v,opacity:0}).appendTo(n);a(this).css({opacity:0}).attr("src",l).one("error",function(){a(this).attr("src",c),console.log("Error src:"+l)}).one("load",function(){n.css({transition:"none",opacity:0}),n.find(b).css({opacity:1}),a(this).data("loaded",!0).css({opacity:1}),e++,e===d&&(o++,r(n,o,i,s))})}):(o++,v(e,i),r(n,o,i,s))})}function r(e,t,i,s){var n=e.closest(".tm-slider-container"),r=n.find(".tms-slides"),d=n.find("li.active"),l=null,c=null,u=e.is("[data-video-bkg-youtube]")||e.is("[data-video-bkg-vimeo]")?!0:!1;if(e.find(".no-transition").css({visibility:"visible"}),n.data("setup",!0),n.data("first-load",!1),n.data("animate-first-slide",!0),e.is("[data-as-bkg-image]")||e.is("[data-video-bkg]")||u){var h=e.children("img").attr("src"),f=e.data("image-wrapper")?e.data("image-wrapper"):e;e.data("image-wrapper")?e.find("."+f).css({"background-image":"url("+h+")"}):e.css({"background-image":"url("+h+")"}),e.children("img").hide()}if(0===n.height()&&!n.data("height")&&e.hasClass("active")){d.children("img").css({maxHeight:"none"});var m=d.children("img").height();n.data("refH",m),n.css({height:m+"px"}),d.children("img").css({maxHeight:"100%"})}if(b(e,i),v(n,i),i.carousel&&!i.lazyLoad&&(r.children().css({opacity:1}),r.css({opacity:0})),u||e.find("iframe, video").css({opacity:1}),t===r.children().length&&i.onLoadEnd&&i.onLoadEnd(),i.lazyLoad||t!==r.children().length?i.lazyLoad&&1===t&&(n.data("loaded",!0),i.autoAdvance&&s.initSlideshow()):(n.data("loaded",!0),i.autoAdvance&&s.initSlideshow()),i.lazyLoad){if((e.find(".tm-loader").length&&!u||X)&&o(n,e,i),(e.is(d)||i.carouselVisible>1)&&e.find(".tms-caption").show(),!e.hasClass("active"))return!1;A?(clearTimeout(c),c=setTimeout(function(){p(d,1,0,0,0,0,0,0,1,"50%","50%",1e3,0,"easeIn",i)},50)):e.animate({opacity:1}),(!u||X)&&(clearTimeout(l),l=setTimeout(function(){d.find(".tms-caption").length>0&&g(d,i),d.find(".tms-content-scalable").length>0&&a(".tms-content-scalable").css({opacity:1})},300))}else t===r.children().length&&((n.find(".tm-loader").length&&!u||X)&&o(n,e,i),d.find(".tms-caption").show(),i.carouselVisible>1&&n.find(".tms-caption").show(),A?i.carousel?p(r,1,0,0,0,0,0,0,1,"50%","50%",1e3,0,"easeIn",i):p(d,1,0,0,0,0,0,0,1,"50%","50%",1e3,0,"easeIn",i):i.carousel?r.animate({opacity:1}):d.animate({opacity:1}),(!u||X)&&(clearTimeout(l),l=setTimeout(function(){d.find(".tms-caption").length>0&&g(d,i),d.find(".tms-content-scalable").length>0&&a(".tms-content-scalable").css({opacity:1})},300)),n.find(".tms-arrow-nav, .tms-pagination").css({display:"block"}))}function o(a,e,t){var i=".tm-loader";t.lazyLoad?e.find(i).remove():a.find(i).remove()}var d=function(i,r){var o,d=a.extend({},a.fn.avalancheSlider.tmsOpts,r),u=a(i),g=this,y=d.fulscreen?a(t).width():d.fullwidth?d.scaleUnder:u.data("width")?parseFloat(u.data("width")):parseFloat(u.css("width")),x=d.fulscreen?a(t).height():u.data("height")?parseFloat(u.data("height")):parseFloat(u.css("height")),S=u.find(".tms-slides"),O=S.children("li:first-child").addClass("active"),F=[];if(S.children(".tms-slide").each(function(e){e++,a(this).attr("id","tms-slide-"+e),F.push(a(this).attr("id")),d.carousel||(A?a(this).not(".active").css({transition:"none",transform:"translate3d( 100%, 0, 0)"}):a(this).not(".active").css({left:"100%"}));var t=a(this).is("[data-video-bkg]")||a(this).is("[data-video-bkg-youtube]")||a(this).is("[data-video-bkg-vimeo]")?!0:!1;(d.forceFit||a(this).is("[data-force-fit]")||t)&&a(this).addClass("tms-forcefit"),t&&a(this).addClass("tms-bkg-video"),a(this).is("[data-video-bkg-youtube]")&&a(this).addClass("tms-bkg-video-youtube"),a(this).is("[data-video-bkg-vimeo]")&&a(this).addClass("tms-bkg-video-vimeo")}),d.lazyLoad||O.css({opacity:0}),d.scaleUnder=u.data("scale-under")?u.data("scale-under"):d.scaleUnder,d.scaleMinHeight=u.data("scale-min-height")?u.data("scale-min-height"):d.scaleMinHeight,d.animation=u.data("animation")?u.data("animation"):d.animation,o=d.animation,d.easing=u.data("easing")?u.data("easing"):d.easing,d.speed=u.data("speed")?u.data("speed"):d.speed,d.carousel=u.data("carousel")?u.data("carousel"):d.carousel,d.carouselVisible=u.data("carousel-visible-slides")?u.data("carousel-visible-slides"):d.carouselVisible,d.carouselVisible=d.carouselVisible>S.children().length?S.children().length:d.carouselVisible,d.showProgressBar=u.is('[data-progress-bar="false"]')?!1:d.showProgressBar,d.autoAdvance=u.is("[data-auto-advance]")?!0:d.autoAdvance,d.interval=u.data("auto-advance-interval")?u.data("auto-advance-interval"):d.interval,d.pauseOnHover=u.is('[data-pause-on-hover="false"]')?!1:d.pauseOnHover,d.navArrows=u.is('[data-nav-arrows="false"]')?!1:d.navArrows,d.navPagination=u.is('[data-nav-pagination="false"]')?!1:d.navPagination,d.navShowOnHover=u.is('[data-nav-show-on-hover="false"]')?!1:d.navShowOnHover,d.navKeyboard=u.is('[data-nav-keyboard="false"]')?!1:d.navKeyboard,(u.is("[data-nav-dark]")||O.is("[data-nav-dark]"))&&(u.addClass("tms-nav-dark"),u.is("[data-featured-slider]")&&a("header").addClass("nav-dark")),d.fullscreen&&(u.css({top:0,left:0}).addClass("tms-fullscreen"),d.carouselVisible=1,d.fsUseHeightOf=d.fsUseHeightOf||u.data("fs-use-height")?d.fsUseHeightOf&&!u.data("fs-use-height")?d.fsUseHeightOf:u.data("fs-use-height"):"",d.fsUseHeightOf=d.fsUseHeightOf?"parent"===d.fsUseHeightOf?u.parent():u.closest("."+d.fsUseHeightOf):""),d.parallax=u.is("[data-parallax]")?!0:d.parallax,d.parallaxSpeed=u.data("parallax-speed")?u.data("parallax-speed"):d.parallaxSpeed,d.parallaxScale=u.is("[data-parallax-scale-out]")||u.is("[data-parallax-scale-in]")?!0:d.parallaxScale,d.parallaxFadeOut=u.is("[data-parallax-fade-out]")?!0:d.parallaxFadeOut,d.captionScaling||u.addClass("tms-caption-no-scaling"),!d.carousel&&d.carouselVisible&&(d.carouselVisible=1),d.carouselVisible>1&&(d.animation="slide"),d.carousel&&u.addClass("tms-carousel"),d.carouselScaleHeight&&u.addClass("tms-scalable-height"),d.autoPlay=u.is('[data-video-auto-play="false"]')?!1:d.autoPlay,d.replayOnEnd=u.is('[data-replay-on-end="false"]')?!1:d.replayOnEnd,d.muteBkgVideo=u.is("[data-mute-video]")?!0:d.muteBkgVideo,X&&(d.autoPlay=!1,d.useVideoAPI=!1),d.navShowOnHover&&u.addClass("show-on-hover"),d.navArrows&&S.children().length>1){var k=a('').attr("id","tms-prev").addClass("tms-arrow-nav").appendTo(u),C=a('').attr("id","tms-next").addClass("tms-arrow-nav").appendTo(u);k.each(function(){a(this).on("click",function(a){a.preventDefault(),d.autoAdvance&&u.data("loaded")&&g.resetSlideshow(),g.prevSlide()})}),C.each(function(){a(this).on("click",function(a){a.preventDefault(),d.autoAdvance&&u.data("loaded")&&g.resetSlideshow(),g.nextSlide()})}),d.lazyLoad&&u.addClass("lazyload").find(".tms-arrow-nav").css({display:"block"})}if(d.navPagination&&S.children().length>1){for(var T=a("
").addClass("tms-pagination").appendTo(u),z=1;z');var H="bullets"===d.paginationType?u.find(".tms-bullet-nav"):u.find(".tms-thumb-nav");H.each(function(){a(this).on("click",function(){return O=u.find("li.active"),a(this).hasClass("active")?!1:(d.autoAdvance&&u.data("loaded")&&g.resetSlideshow(),parseFloat(a(this).data("index"))>parseFloat(T.find(".active").data("index"))?g.slideTo(a(this).data("index"),"next"):g.slideTo(a(this).data("index"),"prev"),!1)})}),T.find(".tms-bullet-nav:first-child").addClass("active"),d.lazyLoad&&T.css({display:"block"})}if(d.navKeyboard&&S.children().length>1){var V=[];a(e).on("keydown",function(a){return V[a.keyCode]=!0,V[37]&&V[39]?!1:void(V[37]?(d.autoAdvance&&u.data("loaded")&&g.resetSlideshow(),d.lazyLoad?g.prevSlide():u.data("loaded")&&g.prevSlide()):V[39]&&(d.autoAdvance&&u.data("loaded")&&g.resetSlideshow(),d.lazyLoad?g.nextSlide():u.data("loaded")&&g.nextSlide()))}).on("keyup",function(a){V[a.keyCode]=!1})}u.swipeIt({draggable:!1,onSwipeMove:function(a){},onSwipeEnd:function(a){"left"===a?g.prevSlide():g.nextSlide()}}),a(t).on("resize",function(){u.data("first-load")&&(y=d.fulscreen?a(t).width():d.fullwidth?d.scaleUnder:u.data("width")?parseFloat(u.data("width")):parseFloat(u.css("width")),x=d.fulscreen?a(t).height():u.data("height")?parseFloat(u.data("height")):parseFloat(u.css("height")),u.data("refW",y).data("refH",x).data("carousel-height",x));var e=u.find("li.active, li.target");d.carousel&&d.carouselVisible>1?S.children(".tms-slide").each(function(){b(a(this),d)}):b(e,d),v(u,d),u.addClass("resizing"),I(function(){u.removeClass("resizing")},300,"resize")}),u.parent().hasClass("tm-slider-parallax-container")&&d.parallax?(a(t).on("scroll",function(){l(u,d)}),c(u,d)):!u.parent().hasClass("tm-slider-parallax-container")&&d.parallax&&console.log("Add the class tm-slider-parallax-container to slider parent"),u.data("setup",!1).data("loaded",!1).data("first-load",!0).data("scale-first",!0).data("transitioning",!1).data("refW",y).data("refH",x).data("carousel-height",x),s(u),v(u,d),d.onSetup&&d.onSetup(),g.resizeSlider=function(){var a=u.find("li.active, li.target");b(a,d),v(u,d)};var B,Y,M,E,L,D,R,U=null,W=null;g.initSlideshow=function(){return B||S.children().length<2?!1:(d.autoAdvance=!0,!X&&d.pauseOnHover&&(S.on("mouseleave ",g.resumeSlideshow),S.on("mouseenter ",g.pauseSlideshow)),d.showProgressBar&&(R=a("
").addClass("tms-progress-bar").appendTo(u)),g.startSlideshow(),Q(d.interval),Y=(new Date).getTime(),L=d.interval,void(d.onSlideshowStart&&d.onSlideshowStart()))},g.startSlideshow=function(a){a=a?E:d.interval,B=setInterval(function(){a!==d.interval&&(clearInterval(B),a=d.interval,L=d.interval,g.startSlideshow()),Y=(new Date).getTime(),"undefined"!=typeof R&&R.css({transition:"none",width:"0px"}),Q(d.interval),g.nextSlide()},a)},g.pauseSlideshow=function(){return D||!B?!1:(clearInterval(B),M=(new Date).getTime(),E=50>L-(M-Y)?50:L-(M-Y),L=0===L?d.interval:E,"undefined"!=typeof R&&R.stop().css({width:R.width()+"px"}),D=!0,void(d.onSlideshowPause&&d.onSlideshowPause()))},g.resumeSlideshow=function(){return D?(clearInterval(B),u.data("ssPaused",!1),Y=(new Date).getTime(),Q(E),g.startSlideshow(E),void(D=!1)):!1},g.resetSlideshow=function(){return B?(clearInterval(B),"undefined"!=typeof R&&R.css({transition:"none",width:"0px"}),Q(d.interval),Y=(new Date).getTime(),E=d.interval,L=d.interval,void g.startSlideshow(d.interval)):!1},g.endSlideshow=function(){return B?(clearInterval(B),B="",D=!1,!X&&d.pauseOnHover&&(S.off("mouseleave ",g.resumeSlideshow),S.off("mouseenter ",g.pauseSlideshow)),"undefined"!=typeof R&&R.remove(),void(d.onSlideshowEnd&&d.onSlideshowEnd())):!1};var Q=function(a){return"undefined"==typeof R?!1:void(A?(clearTimeout(U),U=setTimeout(function(){R.css({transitionProperty:"width",width:"100%",transitionDuration:a+"ms",transitionTimingFunction:"ease"})},50)):R.stop(!0,!0).animate({width:"100%"},a))};g.nextSlide=function(){if(u.data("transitioning"))return!1;var e;O=u.find("li.active");var t=F[a.inArray(O.attr("id"),F)+1];if(e=a.inArray(t,F)+1===0?1:a.inArray(t,F)+1,d.carousel&&d.carouselVisible>1){var i=m(u,d);1!==i&&(e=e===S.children().length-(i-2)?1:a.inArray(t,F)+1)}this.slideTo(e,"next")},g.prevSlide=function(){if(u.data("transitioning"))return!1;var e;O=u.find("li.active");var t=F[a.inArray(O.attr("id"),F)-1];if(e=a.inArray(t,F)+1===0?S.children().length:a.inArray(t,F)+1,d.carousel&&d.carouselVisible>1){var i=m(u,d);e=e===S.children().length?S.children().length-(i-1):a.inArray(t,F)+1}this.slideTo(e,"prev")},g.slideTo=function(e,t){if(u.data("first-load",!1),u.data("scale-first",!1),t||(O=u.find("li.active")),u.data("transitioning")||e===a.inArray(O.attr("id"),F)+1)return!1;f(u,e);var i=u.width(),s=u.height(),n=u.find("#tms-slide-"+e);n.addClass("target").css({zIndex:2,opacity:0===r?0:1}),O.css({zIndex:1}),d.animation=n.data("animation")?n.data("animation"):o;var r="slide"===d.animation||"slideLeftRight"===d.animation?i:0,c="slideTopBottom"===d.animation?s:0;r*=d.carousel?e-1:1;var g="scaleIn"===d.animation?1-d.scaleFactor:"scaleOut"===d.animation?1+d.scaleFactor:1;u.is("[data-nav-dark]")||u.removeClass("tms-nav-dark"),n.is("[data-nav-dark]")?(u.addClass("tms-nav-dark"),u.is("[data-featured-slider]")&&a("header").addClass("nav-dark")):u.is("[data-featured-slider]")&&a("header").removeClass("nav-dark"),w(n,d),u.parent().hasClass("tm-slider-parallax-container")&&d.parallax&&l(u,d),(n.children("img").data("loaded")||!n.children("img").length)&&b(n,d),v(u,d,n),t||(t="next"),t=d.carousel?1:"next"===t?1:-1;var y=m(u,d);A?d.carousel?p(S,1,-(r/y)*t,0,0,0,0,0,1,"50%","50%",d.speed,0,P[d.easing],d):(n.css({opacity:0,transition:"none",transform:"translate3d("+r*t+"px,"+c*t+"px, 0) scale3d("+g+", "+g+", "+g+")"}),clearTimeout(W),W=setTimeout(function(){p(O,1,-r*t,-c*t,0,0,0,0,g,"50%","50%",d.speed,0,P[d.easing],d),p(n,1,0,0,0,0,0,0,1,"50%","50%",d.speed,0,P[d.easing],d)},50)):d.carousel?(u.data("transitioning",!0),S.animate({opacity:1,left:-(r/y)*t+"px"},d.speed,d.easingFallback,function(){h(u,d)})):(u.data("transitioning",!0),n.css({left:i*t+"px",visibility:"visible"}).animate({opacity:1,left:"0px"},d.speed,d.easingFallback,function(){h(u,d)}),O.animate({left:-i*t+"px"},d.speed,d.easingFallback))},n(u,d,g)},l=function(e,i){var s=a(t);s.data("animating")||(s.data("animating",!0),t.requestAnimationFrame(function(){c(e,i),s.data("animating",!1)}))},c=function(e,i){var s=a(t),n=s.scrollTop(),r=(s.height(),e.parent().height()+e.parent().offset().top-n),o=n*i.parallaxSpeed,d=i.parallaxScale&&e.is("[data-parallax-scale-out]")?1.1+r/e.parent().height():i.parallaxScale&&e.is("[data-parallax-scale-in]")?2-r/e.parent().height():1;d=1>d?1:d;var l=i.parallaxFadeOut?r/e.parent().height():1,c=e.find("li.active"),p=c.is("[data-pause-on-scroll]")?!0:!1;if(!X&&A&&u(e.parent())){e.css({position:"fixed",transform:"translate3d( 0, "+-o+"px, 0)",opacity:l.toFixed(2)});var h=".active > img, .target > img, .active > iframe, .target > iframe, .active > video, .target > video";e.find(h).css({transform:"scale3d( "+d+","+d+", 1 )"}),p&&x(c,"play",i)}else e.css({position:"relative"}),p&&x(c,"pause",i)},u=function(e){var i=a(t).scrollTop(),s=i+a(t).height(),n=e.offset().top,r=n+e.outerHeight();return s>=n&&r>=i},p=function(e,t,i,s,n,r,o,d,l,c,u,p,g,f,m){var v=e.closest(".tm-slider-container");(e.hasClass("active")||e.hasClass("target")||e.hasClass("tms-slides"))&&(v.data("animate-first-slide")||v.data("transitioning",!0),m.onSlideBefore&&m.onSlideBefore());var b={};b.transform="translate3d("+i+"px, "+s+"px, "+n+"px) rotateX("+r+"deg) rotateY("+o+"deg) rotateZ("+d+"deg) scale3d("+l+", "+l+", "+l+")",b.transitionProperty=B+", opacity",b.transformOrigin=c+" "+u+" 0",b.transitionDuration=p+"ms",b.transitionDelay=g+"ms",b.transitionTimingFunction=f,b.visibility="visible",b.opacity=t,e.css(b).on(Y,function(e){e.stopPropagation(),a(this).off(Y),(a(this).hasClass("target")||a(this).hasClass("tms-slides")&&!v.data("animate-first-slide"))&&h(v,m),a(this).hasClass("tms-caption")&&a(this).css({transition:""}),v.data("animate-first-slide")&&v.data("animate-first-slide",!1)})},h=function(a,e){a.data("transitioning",!1),e.onSlideAfter&&e.onSlideAfter();var t=a.find("li.active"),i=a.find("li.target"),s=i.is("[data-video-bkg-youtube]")||i.is("[data-video-bkg-vimeo]")?!0:!1;return x(t,"pause",e),1===e.carouselVisible&&t.find(".tms-caption").not(".no-transition").css({display:"none",visibility:"hidden"}),e.carousel||t.css({visibility:"hidden"}),t.removeClass("active"),i.removeClass("target").addClass("active"),t=i,x(t,"play",e),e.carouselVisible>1?!1:void((!s||X)&&g(t,e))},g=function(e,t){e.find(".tms-caption").not(".no-transition").show().each(function(){var e=a(this),i=a(this).data("ox")?e.data("ox"):"50%",s=a(this).data("oy")?e.data("oy"):"50%",n=a(this).data("du")?e.data("du"):t.speed,r=a(this).data("de")?e.data("de"):0,o=a(this).data("e")?P[e.data("e")]:P[t.easing],d=null;A?(clearTimeout(d),d=setTimeout(function(){p(e,1,0,0,0,0,0,0,1,i,s,n,r,o)},500)):(o=t.easingFallback,e.delay(r).css({visibility:"visible"}).animate({opacity:1},n,o))})},f=function(a,e){var t=a.find(".tms-pagination");t.find(".active").removeClass("active"),t.find("#tms-pagination-"+e).addClass("active")},m=function(e,i){var s;return s=a(t).width()>=768&&a(t).width()<=959&&i.carouselVisible>3?3:a(t).width()>=480&&a(t).width()<=767&&i.carouselVisible>2?2:a(t).width()<=479?1:i.carouselVisible},v=function(e,t,i){if(!t.carousel)return!1;var s,n,r=e.find(".tms-slides"),o=e.find("li.active"),d=o.index(),l=e.find(".tms-pagination"),c=r.children().length,u=m(e,t),p=e.width()/u,h=0,g=null;r.children().each(function(e){t.carouselVisible=0===t.carouselVisible?1:t.carouselVisible,a(this).css({width:p+"px",opacity:1,visibility:"visible"}),h=h>a(this).outerHeight()?h:a(this).outerHeight()}),2===u&&d>r.children().length-2?(s=r.children().length-1,n=!0):3===u&&d>r.children().length-3?(s=r.children().length-2,n=!0):d>r.children().length-u?(s=r.children().length-u+1,n=!0):(s=d,n=!1),l.children().hide().slice(0,r.children().length-u+1).show(),n&&(o.removeClass("active"),r.find("li:nth-child("+s+")").addClass("active"),f(e,s)),A?(e.data("transitioning")||r.css({width:p*c+"px",transition:"none",transform:"translate3d("+-(p*s)+"px, 0, 0)"}),clearTimeout(g),g=setTimeout(function(){r.css({transitionProperty:"opacity, "+B,transitionDuration:t.speed+"ms"})},50)):r.css({width:p*c+"px",left:-(p*s)+"px"})},b=function(e,i){var s=e.closest(".tm-slider-container, .featured-media"),n=s.parent().width(),r=i.fsUseHeightOf?i.fsUseHeightOf.height():a(t).height(),o=s.data("refW"),d=s.data("refH"),l=i.fullscreen?a(t).width()/r:o/d,c=s.data("external-padding")?s.data("external-padding"):i.externalPadding;c=a.isNumeric(c)?c:2*parseFloat(a(c).css("padding"));var u=i.fullscreen||i.fullwidth?a(t).width()-c:n,p=i.fullscreen?r-c:i.carousel&&i.carouselVisible>1&&!i.carouselScaleHeight?d:i.fullwidth&&n/l>d?d-c:n/l-c,h=p<=i.scaleMinHeight?!0:!1,g=h?u/i.scaleMinHeight:u/p,f=i.carouselScaleHeight&&1===i.carouselVisible?!0:!1,m=i.forceFit||e.hasClass("tms-forcefit");if(s.data("newSW",u),s.data("newSH",p),i.carousel){var v=null;clearTimeout(v),s.css({width:Math.round(u)+"px"}),v=setTimeout(function(){s.css({height:s.data("scale-first")&&f?s.find("li:first-child").find(".tms-content-scalable, img").outerHeight()+"px":!s.data("scale-first")&&f?e.find(".tms-content-scalable, img").outerHeight():"auto"})},100)}else s.css({width:Math.round(u)+"px",height:p>i.scaleMinHeight||"auto"===i.scaleMinHeight?Math.round(p)+"px":i.scaleMinHeight+"px"}),i.parallax&&s.parent().css({height:s.height()+"px"}),p=p>i.scaleMinHeight||"auto"===i.scaleMinHeight?p:i.scaleMinHeight,s.data("newSH",p);if(!s.data("setup")||i.carousel&&i.carouselVisible>1)return!1;var b=e.is("[data-image]")?"image":"video",w=e.is("[data-video-bkg]")||e.is("[data-video-bkg-youtube]")||e.is("[data-video-bkg-vimeo]")?!0:!1,x=e.is("[data-video-ratio]")?parseFloat(e.data("video-ratio")):1.778;e.find("img, iframe, video, .mejs-container").not(".tms-caption img, .tms-caption iframe, .tms-caption video").each(function(){var t,s,n,r=50,o=p+r,d=u+r;if("image"===b?(t=a(this).width(),s=a(this).height()):"video"===b&&((!i.respectRatio&&!w||i.fullscreen&&!w)&&e.addClass("tms-video-no-ratio"),w?(t=i.fullscreen&&i.fullwidth?o*x:u,s=i.fullscreen&&i.fullwidth?o:u/x):(t=a(this).attr("width")&&u>a(this).attr("width")?a(this).attr("width"):u,s=m?t/x:t/x)),n=t/s,"image"===b&&i.fullscreen||m||"video"===b&&w){if(a(this).is("img")&&!a(this).data("loaded"))return!1;g>n?a(this).css({width:w?d+"px":i.fullwidth&&!m?"auto":u+"px",height:w?Math.round(d/n)+"px":Math.round(u/n)+"px",top:w?Math.floor((p-s)/2)+"px":Math.round(-((u/n-p)/2))+"px",left:w?-(r/2)+"px":0}):a(this).css({width:!i.fullwidth||m||w?Math.round(p*n)+"px":"auto",height:p+"px",top:0,left:Math.round(-((p*n-u)/2))+"px"})}else"video"===b&&a(this).css({width:Math.floor(t)+"px",height:Math.floor(s)+"px",top:Math.floor((p-s)/2)+"px",left:Math.floor((u-t)/2)+"px"})}),y(e,i)},y=function(e,t){var i=e.closest(".tm-slider-container"),s=i.data("newSW"),n=i.data("newSH"),r=i.data("refW"),o=i.data("refH");return!t.captionScaling||t.carouselVisible>1?!1:void e.find(".tms-caption").each(function(){if(!a(this).is("[data-no-scale]")){var e=a(this),i=e.data("x"),d=e.data("y"),l=e.data("w"),c=e.data("pt"),u=e.data("pr"),p=e.data("pb"),h=e.data("pl"),g=e.data("mt"),f=e.data("mr"),m=e.data("mb"),v=e.data("ml"),b=e.data("bt"),y=e.data("br"),w=e.data("bb"),x=e.data("bl"),S=e.data("fs"),O=0===e.data("lh")?S:e.data("lh"),F=e.is("[data-offsetx]")?parseFloat(e.data("offsetx")):0,k=e.is("[data-offsety]")?parseFloat(e.data("offsety")):0,I=0>s*(F/r)?s*(F/r):s*(F/r)>F?F:s*(F/r),C=0>n*(k/o)?s*(k/r):s*(k/r)>k?k:n*(k/o);t.fullwidth&&k>C&&0>C&&(C=k);var T;e.find("img, iframe, video").length&&(T=s*(l/r)>l?l:s*(l/r)>s?s:s*(l/r)),e.find("img").length||e.find("iframe, video").length?e.css({width:T+"px",height:e.children("iframe, video").length?T/1.778+"px":"auto"}):e.css({fontSize:s*(S/r)>S?S:s*(S/r)+"px",lineHeight:s*(O/r)>O?O+"px":s*(O/r)+"px",paddingTop:s*(c/r)>c?c:s*(c/r)+"px",paddingRight:s*(u/r)>u?u:s*(u/r)+"px",paddingBottom:s*(p/r)>p?p:s*(p/r)+"px",paddingLeft:s*(h/r)>h?h:s*(h/r)+"px",marginTop:s*(g/r)>g?g:s*(g/r)+"px",marginRight:s*(f/r)>f?f:s*(f/r)+"px",marginBottom:s*(m/r)>m?m:s*(m/r)+"px",marginLeft:s*(v/r)>v?v:s*(v/r)+"px",borderTopWidth:s*(b/r)>b?b:Math.ceil(s*(b/r))+"px",borderRightWidth:s*(y/r)>y?y:Math.ceil(s*(y/r))+"px",borderBottomWidth:s*(w/r)>w?w:Math.ceil(s*(w/r))+"px",borderLeftWidth:s*(x/r)>x?x:Math.ceil(s*(x/r))+"px",whiteSpace:"nowrap"}),e.css({top:"top"===d?0+C:"bottom"===d?n-e.outerHeight()-C:(n-e.outerHeight())/2+C+"px",left:"left"===i?0+I:"right"===i?s-e.outerWidth()-I:(s-e.outerWidth())/2+I+"px"})}})},w=function(e,t){return t.carouselVisible>1?!1:void e.find(".tms-caption").not(".no-transition").each(function(){var e=a(this),t=e.data("o")?parseFloat(e.data("o")):0,i=e.data("tx")?parseFloat(e.data("tx")):0,s=e.data("ty")?parseFloat(e.data("ty")):0,n=e.data("tz")?parseFloat(e.data("tz")):0,r=e.data("rx")?parseFloat(e.data("rx")):0,o=e.data("ry")?parseFloat(e.data("ry")):0,d=e.data("rz")?parseFloat(e.data("rz")):0,l=e.data("s")?parseFloat(e.data("s")):1;A?e.css({transition:"none",transform:"translate3d("+i+"px, "+s+"px, "+n+"px )rotateX("+r+"deg) rotateY("+o+"deg) rotateZ("+d+"deg) scale3d("+l+", "+l+", "+l+")",opacity:t}):e.css({opacity:0})})},x=function(e,t,i){if(!i.useVideoAPI||i.carouselVisible>1)return!1;var s;try{if(e.find("iframe").length){s="#"+e.find("iframe").attr("id");var n=a(s).attr("src");"undefined"!=typeof n&&n.indexOf("vimeo")>-1?(s=$f(a(s)[0]),"play"===t&&i.autoPlay?s.api("play"):s.api("pause")):"undefined"!=typeof n&&n.indexOf("youtu")>-1&&(s=s.replace("#",""),"play"===t&&i.autoPlay?S[s].playVideo():S[s].stopVideo())}else e.find("video").length&&(s="#"+e.find("video").attr("id"),"play"===t&&i.autoPlay?a(s)[0].play():a(s)[0].pause())}catch(r){}},S={},O=!1,F=!1,k=function(i,s,n){if(!n.useVideoAPI||n.carouselVisible>1)return!1;var r=s.closest("li"),d=s.attr("src"),l=new Date;if(s.attr("id","video-"+l.getTime()),"undefined"!=typeof d&&d.indexOf("vimeo")>-1){if(s.attr("src",s.attr("src")+"&player_id="+s.attr("id")).addClass("vimeo"),r.is("[data-video-bkg-vimeo]")&&s.attr("src",s.attr("src")+"&autoplay=0&title=0&byline=0&portrait=0&badge=0&background=1").addClass("vimeo"),!O){O=!0;var c=e.createElement("script");c.src="https://web.archive.org/web/20220419083246/http://a.vimeocdn.com/js/froogaloop2.min.js";var u=e.getElementsByTagName("script")[0];u.parentNode.insertBefore(c,u)}s.on("load",function(){var e=a(this),t="#"+e.attr("id"),s=$f(a(t)[0]),r=e.closest("li"),d=r.is(":first-child")?!0:!1;s.addEvent("ready",function(){d&&n.autoPlay&&s.api("play"),s.api("setVolume",1),(n.muteBkgVideo||r.is("[data-mute-video]"))&&s.api("setVolume",0),s.addEvent("playProgress",function(a){o(i,r,n),r.addClass("video-bkg-loaded"),g(r,n)}),s.addEvent("finish",function(){n.replayOnEnd&&s.api("play")})})})}else if("undefined"!=typeof d&&d.indexOf("youtu")>-1){if(s.addClass("youtube"),r.is("[data-video-bkg-youtube]")&&s.attr("src",s.attr("src")+"&controls=0&showinfo=0&rel=0&modestbranding=0&loop=1&iv_load_policy=3&playlist="+s.attr("src").split("embed/")[1].substring(0,11)).addClass("youtube"),a("body").hasClass("safari-browser")&&r.hasClass("active")&&(s.attr("src",s.attr("src")+"&autoplay=1"),o(i,r,n),r.addClass("video-bkg-loaded"),g(r,n)),!F){F=!0;var p=e.createElement("script");p.src="https://web.archive.org/web/20220419083246/http://www.youtube.com/player_api";var h=e.getElementsByTagName("script")[0];h.parentNode.insertBefore(p,h)}var f=function(){a(".youtube").each(function(){var e=a(".youtube"),t=e.attr("id"),s=e.closest("li"),r=s.is(":first-child")?!0:!1;S[t]=new YT.Player(t,{events:{onStateChange:function(a){a.data===YT.PlayerState.PLAYING&&s.is("[data-video-bkg-youtube]")&&!X&&(o(i,s,n),s.addClass("video-bkg-loaded"),g(s,n)),a.data===YT.PlayerState.ENDED&&n.replayOnEnd&&S[t].playVideo()},onReady:function(a){r&&n.autoPlay&&S[t].playVideo(),(n.muteBkgVideo||s.is("[data-mute-video]"))&&S[t].mute()},onError:function(a){2===a.data?console.log("Avalance Slider - YouTube Video: Check video ID"):100===a.data?console.log("Avalance Slider - YouTube Video: Video not found"):(101===a.data||150===a.data)&&console.log("Avalance Slider - YouTube Video: Owner does not allow this video to be played as an embeded video"),e.hide(),o(i,s,n),s.addClass("error"),g(s,n)}}})})};t.onYouTubePlayerAPIReady=function(){f()}}else if(s.is("video")){s.addClass("html5-video");var m=e.getElementById(s.attr("id")),v=r.is(":first-child")?!0:!1;v&&n.autoPlay&&(m.load(),m.autoplay=!0),(n.muteBkgVideo||r.is("[data-mute-video]"))&&(m.muted=n.muteBkgVideo),n.replayOnEnd&&(m.loop=!0)}},I=function(){var a={};return function(e,t,i){i||(i="id"),a[i]&&clearTimeout(a[i]),a[i]=setTimeout(e,t)}}();t.isRetinaDevice=function(){var a="(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)";return this.devicePixelRatio>1||this.matchMedia&&this.matchMedia(a).matches?!0:!1};var C,T=e.body||e.documentElement,z=T.style,A=z.transition!==i||z.WebkitTransition!==i||z.MozTransition!==i||z.MsTransition!==i||z.OTransition!==i,H=["WebkitTransform","MozTransform","OTransform","msTransform"];for(var V in H)z[H[V]]!==i&&(C="-"+H[V].replace("Transform","").toLowerCase());var B=C+"-transform",Y="webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",P={linear:"cubic-bezier(0, 0, 1, 1)",swing:"cubic-bezier(0.42, 0, 0.58, 1)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)",easeFastSlow:"cubic-bezier(.11,.69,.66,1.01)",easeBounceBack:"cubic-bezier(.16,1.36,.57,.96)",easeBounceBackHard:"cubic-bezier(.8,1.91,0,.94)",easeBounceIn:"cubic-bezier(.15,2.6,0,-0.2)",easeSwingInOut:"cubic-bezier(.35,3.8,0.3,-0.6)"},M={fadeIn:"opacity: 0;easing: swing;",slideInUpShort:"opacity:0;transY: 50px;easing:easeFastSlow;",slideInRightShort:"opacity:0;transX: 50px;easing:easeFastSlow;",slideInDownShort:"opacity:0;transY: -50px;easing:easeFastSlow;",slideInLeftShort:"opacity:0;transX: -50px;easing:easeFastSlow;",slideInUpLong:"opacity:0;transY: 250px;easing:easeFastSlow;",slideInRightLong:"opacity:0;transX: 250px;easing:easeFastSlow;",slideInDownLong:"opacity:0;transY: -250px;easing:easeFastSlow;",slideInLeftLong:"opacity:0;transX: -250px;easing:easeFastSlow;",bounceIn:"opacity:0;scale:0.7;easing:easeBounceIn;",bounceOut:"opacity:0;scale:1.4;easing:easeBounceIn;",bounceInUp:"opacity:0;transY: 250px;easing:easeBounceIn;",bounceInRight:"opacity:0;transX: 250px;easing:easeBounceIn;",bounceInDown:"opacity:0;transY: -250px;easing:easeBounceIn;",bounceInLeft:"opacity:0;transX: -250px;easing:easeBounceIn;",scaleIn:"opacity:0;scale: 0.6;easing:easeFastSlow;",scaleOut:"opacity:0;scale: 1.4;easing:easeFastSlow",flipInX:"opacity:0;rotateX: -180deg;easing:easeFastSlow;",flipInY:"opacity:0;rotateY: -180deg;easing:easeFastSlow;",spinInX:"opacity:0;rotateX: -540deg;easing:easeFastSlow;",spinInY:"opacity:0;rotateY: -540deg;easing:easeFastSlow;",helicopterIn:"opacity:0;scale: 0.6;rotateZ: -360deg;easing:easeFastSlow;", helicopterOut:"opacity:0;scale: 1.4;rotateZ: -360deg;easing:easeFastSlow;",signSwingTop:"opacity:0;rotateX:-60deg;transOrigX:top;transOrigY:center;easing:easeSwingInOut;",signSwingRight:"opacity:0;rotateY:-60deg;transOrigX:right;transOrigY:center;easing:easeSwingInOut;",signSwingBottom:"opacity:0;rotateX:-60deg;transOrigX:bottom;transOrigY:center;easing:easeSwingInOut;",signSwingLeft:"opacity:0;rotateY:-60deg;transOrigX:left;transOrigY:center;easing:easeSwingInOut;",wiggleX:"opacity:0;rotateX:-90deg;transOrigX:center;transOrigY:center;easing:easeSwingInOut;",wiggleY:"opacity:0;rotateY:-90deg;transOrigX:center;transOrigY:center;easing:easeSwingInOut;",dropUp:"opacity:0;transY: 250px;rotateZ:60deg;transOrigX:left;transOrigY:top;easing:easeBounceBackHard;",dropDown:"opacity:0;transY: -250px;rotateZ:-60deg;transOrigX:left;transOrigY:top;easing:easeBounceBackHard;",rollInLeft:"opacity:0;transX: -250px;transY: 200px;rotateZ: -120px;transOrigX:left;transOrigY:top;easing:easeFastSlow;",rollInRight:"opacity:0;transX: 250px;transY: 200px;rotateZ: 120px;transOrigX:right;transOrigY:top;easing:easeFastSlow;",turnInRight:"opacity:0;transX: 250px;rotateX:20deg;rotateY:75deg;transOrigX:left;transOrigY:top;easing:easeBounceBack;",turnInLeft:"opacity:0;transX: -250px;rotateX:20deg;rotateY:-75deg;transOrigX:right;transOrigY:top;easing:easeBounceBack;"},X=!1;(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/Windows Phone/i))&&(X=!0),function(){for(var a=0,e=["ms","moz","webkit","o"],i=0;i
');var l=t("#tm-lightbox"),c=t("#tml-content-wrapper"),h=t("#tml-content"),p=null;l.addClass(n.auxClasses.replace(/,/g," ")),o.is("[data-modal-mode]")&&(l.addClass("tml-modal-mode"),h.addClass("modal-dialog"),t("body").addClass("modal-open"),o.data("modal-width")&&l.data("modal-width",o.data("modal-width")),o.data("modal-height")&&l.data("modal-height",o.data("modal-height"))),l.data("initLoad",!0);var v=n.contentMargin;if(c.css({top:v+"%",right:v+"%",bottom:v+"%",left:v+"%"}),e.length<2||h.swipeIt({preventTouchOn:".scrollable-content",onSwipeMove:function(t){h.css({left:t+"px"})},onSwipeEnd:function(t){"left"===t?s.prevContent():s.nextContent()}}),n.overlay||l.css({background:"none"}),n.navArrows&&e.length>=2){var f=t('
').attr("id","tml-prev").addClass("tml-nav").appendTo(l),g=t('').attr("id","tml-next").addClass("tml-nav").appendTo(l);f.on("click",function(t){t.preventDefault(),s.prevContent()}),g.on("click",function(t){t.preventDefault(),s.nextContent()})}if(n.navExit){var x;x=t('').appendTo(l.hasClass("tml-modal-mode")?h:l),x.on("click",function(t){t.preventDefault(),s.destroyLightbox()})}if(n.navToolbar){var y,C,z,k=600,T=400,A=t(i).height()/2-T/2,I=t(i).width()/2-k/2,S=t(location).attr("href"),O=t('
').appendTo(l),L=(o.data("toolbar")+"").split(";");if(n.navZoom=o.is("[data-toolbar]")?t.inArray("zoom",L)>-1?!0:!1:n.navZoom,n.navShare=o.is("[data-toolbar]")?t.inArray("share",L)>-1?!0:!1:n.navShare,n.navZoom&&(C=t('').appendTo(O),C.on("click",function(t){t.preventDefault(),c.toggleClass("zoomed"),m(n)})),n.navShare){var M=o.is("[data-list-vertical]")?"list-vertical":"list-horizontal";z=t('
').appendTo(O);var E=o.data("networks")?(o.data("networks")+"").split(";"):n.navNetworks.split(",");t.each(E,function(t,a){z.find("ul").append("
  • '+a+"
  • ")}),z.children("a").on("click",function(t){t.preventDefault(),z.children("ul").toggleClass("active")}),z.find("ul a").on("click",function(a){a.preventDefault();var e=o.data("caption"),n=o.data("twitter-user")?o.data("twitter-user"):"",r=o.data("image-url")?o.data("image-url"):o.attr("href");return t(this).is("[data-facebook]")?y="https://web.archive.org/web/20220419083246/https://www.facebook.com/sharer/sharer.php?u="+S+",sharer":t(this).is("[data-twitter]")?y="https://web.archive.org/web/20220419083246/https://twitter.com/intent/tweet?url="+r+"&via="+n:t(this).is("[data-pinterest]")&&(y="https://web.archive.org/web/20220419083246/http://pinterest.com/pin/create/button/?url="+S+"&media="+r+"&description="+e),i.open(y,"popup","width="+k+",height="+T+", scrollbars=yes, top="+A+",left="+I),!1})}}n.navKeyboard&&t(a).on("keyup",function(t){37!=t.keyCode||e.length<2?39!=t.keyCode||e.length<2?27==t.keyCode&&s.destroyLightbox():s.nextContent():s.prevContent()}),n.overlayClickClose&&l.on("click",function(t){(t.target===this||"tml-content-wrapper"===t.target.id)&&s.destroyLightbox()});var D=r(l,n);if(b){if(l.css({transition:"none",transform:"translate3d("+D.x+"px, "+D.y+"px, 0px)"}),l.data("transitioning"))return!1;clearTimeout(p),p=setTimeout(function(){l.one(w,function(){d(t(".tml-active"),"next",n)}),u(l,1,0,0,n)},50)}else l.css({left:D.x+"px",top:D.y+"px"}),l.animate({opacity:1,left:0,top:0},n.speed,n.easing,function(){d(t(".tml-active"),"next",n)})},l=function(a,i,e){var n=(t("#tm-lightbox"),t("#tml-content"));n.data("loading",!0);var o="fade"===e.contentAnimation?0:e.slideAmount;if(i="next"===i?1:-1,b)n.one(w,function(){t(this).css({visibility:"hidden"}),d(a,i,e)}),u(n,0,-o*i,0,e);else{var r=n.position().left;n.animate({opacity:0,left:r-o*i+"px"},e.speed,e.easing,function(){t(this).css({visibility:"hidden"}),d(a,i,e)})}},d=function(a,e,n){var o=t("#tm-lightbox"),r=t("#tml-content"),s=t("#tml-exit").clone(!0),l=o.hasClass("tml-modal-mode")?!0:!1;r.find("iframe").attr("src",""),r.removeClass("tml-error scrollable-content").data("type","").html("");var d=a.attr("href"),m=d.match(/\.(jpeg|jpg|png|gif)/i),u=d.match(/(vimeo\.com|youtu(be\.com|\.be))\/(watch\?v=)?([A-Za-z0-9._%-]*)(\&\S+)?/),h=a.is('[data-content="inline"]'),p=a.is('[data-content="iframe"]'),v=a.is('[data-content="ajax"]');if(t("#tml-loader").length&&t("#tml-loader").remove(),o.append('
    '),m){var f=d.substr(d.lastIndexOf("."));(i.isRetinaDevice()&&n.retinaSupport||i.isRetinaDevice()&&a.is("[data-retina]"))&&(!z&&!n.retinaSupportMobile||z&&n.retinaSupportMobile)&&(d.match(/\.(svg)/i)||(d=a.data("retina")?a.data("retina"):d.replace(f,n.retinaSuffix+f))),r.data("type","img"),t("").addClass("tml-image").attr("src",d).one("load",function(){r.html(t(this)),c(!0,e,n)}).each(function(){this.complete&&t(this).trigger("load")}).on("error",function(){c(!1,e,n)})}if(u){r.data("type","video");var b=t('';if(typeof $f=="function"){var l=$f(j.childNodes[0]);l.addEvent("ready",function(){function o(n,p,r,s){n={type:r,target:p};if(r=="timeupdate"){p.currentTime=n.currentTime=s.seconds;p.duration=n.duration=s.duration}p.dispatchEvent(n.type,n)}l.playVideo=function(){l.api("play")};l.pauseVideo=function(){l.api("pause")};l.seekTo=function(n){l.api("seekTo",n)};l.addEvent("play",function(){o(l,h,"play");o(l,h,"playing")}); l.addEvent("pause",function(){o(l,h,"pause")});l.addEvent("finish",function(){o(l,h,"ended")});l.addEvent("playProgress",function(n){o(l,h,"timeupdate",n)});h.pluginApi=l;mejs.MediaPluginBridge.initPlugin(k)})}else console.warn("You need to include froogaloop for vimeo to work")}c.style.display="none";c.removeAttribute("autoplay");return h},updateNative:function(a,b){var c=a.htmlMediaElement,d;for(d in mejs.HtmlMediaElement)c[d]=mejs.HtmlMediaElement[d];b.success(c,c);return c}}; mejs.YouTubeApi={isIframeStarted:false,isIframeLoaded:false,loadIframeApi:function(){if(!this.isIframeStarted){var a=document.createElement("script");a.src="//web.archive.org/web/20220419083246/http://www.youtube.com/player_api";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b);this.isIframeStarted=true}},iframeQueue:[],enqueueIframe:function(a){if(this.isLoaded)this.createIframe(a);else{this.loadIframeApi();this.iframeQueue.push(a)}},createIframe:function(a){var b=a.pluginMediaElement,c=new YT.Player(a.containerId, {height:a.height,width:a.width,videoId:a.videoId,playerVars:{controls:0},events:{onReady:function(){a.pluginMediaElement.pluginApi=c;mejs.MediaPluginBridge.initPlugin(a.pluginId);setInterval(function(){mejs.YouTubeApi.createEvent(c,b,"timeupdate")},250)},onStateChange:function(d){mejs.YouTubeApi.handleStateChange(d.data,c,b)}}})},createEvent:function(a,b,c){c={type:c,target:b};if(a&&a.getDuration){b.currentTime=c.currentTime=a.getCurrentTime();b.duration=c.duration=a.getDuration();c.paused=b.paused; c.ended=b.ended;c.muted=a.isMuted();c.volume=a.getVolume()/100;c.bytesTotal=a.getVideoBytesTotal();c.bufferedBytes=a.getVideoBytesLoaded();var d=c.bufferedBytes/c.bytesTotal*c.duration;c.target.buffered=c.buffered={start:function(){return 0},end:function(){return d},length:1}}b.dispatchEvent(c.type,c)},iFrameReady:function(){for(this.isIframeLoaded=this.isLoaded=true;this.iframeQueue.length>0;)this.createIframe(this.iframeQueue.pop())},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]= a;var b,c="//web.archive.org/web/20220419083246/http://www.youtube.com/apiplayer?enablejsapi=1&playerapiid="+a.pluginId+"&version=3&autoplay=0&controls=0&modestbranding=1&loop=0";if(mejs.MediaFeatures.isIE){b=document.createElement("div");a.container.appendChild(b);b.outerHTML=''}else a.container.innerHTML=''},flashReady:function(a){var b=this.flashPlayers[a],c= document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c;mejs.MediaPluginBridge.initPlugin(a);c.cueVideoById(b.videoId);a=b.containerId+"_callback";window[a]=function(e){mejs.YouTubeApi.handleStateChange(e,c,d)};c.addEventListener("onStateChange",a);setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250)},handleStateChange:function(a,b,c){switch(a){case -1:c.paused=true;c.ended=true;mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=false; c.ended=true;mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=false;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"play");mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=true;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress")}}};function onYouTubePlayerAPIReady(){mejs.YouTubeApi.iFrameReady()}function onYouTubePlayerReady(a){mejs.YouTubeApi.flashReady(a)}window.mejs=mejs;window.MediaElement=mejs.MediaElement; (function(a,b){var c={locale:{language:"",strings:{}},methods:{}};c.getLanguage=function(){return(c.locale.language||window.navigator.userLanguage||window.navigator.language).substr(0,2).toLowerCase()};if(typeof mejsL10n!="undefined")c.locale.language=mejsL10n.language;c.methods.checkPlain=function(d){var e,g,f={"&":"&",'"':""","<":"<",">":">"};d=String(d);for(e in f)if(f.hasOwnProperty(e)){g=RegExp(e,"g");d=d.replace(g,f[e])}return d};c.methods.t=function(d,e){if(c.locale.strings&& c.locale.strings[e.context]&&c.locale.strings[e.context][d])d=c.locale.strings[e.context][d];return c.methods.checkPlain(d)};c.t=function(d,e){if(typeof d==="string"&&d.length>0){var g=c.getLanguage();e=e||{context:g};return c.methods.t(d,e)}else throw{name:"InvalidArgumentException",message:"First argument is either not a string or empty."};};b.i18n=c})(document,mejs);(function(a){if(typeof mejsL10n!="undefined")a[mejsL10n.language]=mejsL10n.strings})(mejs.i18n.locale.strings); (function(a){if(typeof a.de==="undefined")a.de={Fullscreen:"Vollbild","Go Fullscreen":"Vollbild an","Turn off Fullscreen":"Vollbild aus",Close:"Schlie\u00dfen"}})(mejs.i18n.locale.strings);(function(a){if(typeof a.zh==="undefined")a.zh={Fullscreen:"\u5168\u87a2\u5e55","Go Fullscreen":"\u5168\u5c4f\u6a21\u5f0f","Turn off Fullscreen":"\u9000\u51fa\u5168\u5c4f\u6a21\u5f0f",Close:"\u95dc\u9589"}})(mejs.i18n.locale.strings); /*! * MediaElementPlayer * http://mediaelementjs.com/ * * Creates a controller bar for HTML5
    ').appendTo(b).click(function(g){g.preventDefault();e.paused?e.play():e.pause();return false});e.addEventListener("play",function(){d.removeClass("mejs-play").addClass("mejs-pause")}, false);e.addEventListener("playing",function(){d.removeClass("mejs-play").addClass("mejs-pause")},false);e.addEventListener("pause",function(){d.removeClass("mejs-pause").addClass("mejs-play")},false);e.addEventListener("paused",function(){d.removeClass("mejs-pause").addClass("mejs-play")},false)}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{stopText:"Stop"});f.extend(MediaElementPlayer.prototype,{buildstop:function(a,b,c,e){f('
    ').appendTo(b).click(function(){e.paused||e.pause();if(e.currentTime>0){e.setCurrentTime(0);e.pause();b.find(".mejs-time-current").width("0px");b.find(".mejs-time-handle").css("left", "0px");b.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0));b.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0));c.find(".mejs-poster").show()}})}})})(mejs.$); (function(f){f.extend(MediaElementPlayer.prototype,{buildprogress:function(a,b,c,e){f('
    00:00
    ').appendTo(b);b.find(".mejs-time-buffering").hide();var d= this,g=b.find(".mejs-time-total");c=b.find(".mejs-time-loaded");var k=b.find(".mejs-time-current"),j=b.find(".mejs-time-handle"),m=b.find(".mejs-time-float"),q=b.find(".mejs-time-float-current"),p=function(h){h=h.originalEvent.changedTouches?h.originalEvent.changedTouches[0].pageX:h.pageX;var l=g.offset(),r=g.outerWidth(true),n=0,o=n=0;if(e.duration){if(hr+l.left)h=r+l.left;o=h-l.left;n=o/r;n=n<=0.02?0:n*e.duration;t&&n!==e.currentTime&&e.setCurrentTime(n);if(!mejs.MediaFeatures.hasTouch){m.css("left", o);q.html(mejs.Utility.secondsToTimeCode(n));m.show()}}},t=false;g.bind("mousedown touchstart",function(h){if(h.which===1||h.which===0){t=true;p(h);d.globalBind("mousemove.dur touchmove.dur",function(l){p(l)});d.globalBind("mouseup.dur touchend.dur",function(){t=false;m.hide();d.globalUnbind(".dur")});return false}}).bind("mouseenter",function(){d.globalBind("mousemove.dur",function(h){p(h)});mejs.MediaFeatures.hasTouch||m.show()}).bind("mouseleave",function(){if(!t){d.globalUnbind(".dur");m.hide()}}); e.addEventListener("progress",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false);e.addEventListener("timeupdate",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false);d.loaded=c;d.total=g;d.current=k;d.handle=j},setProgressRail:function(a){var b=a!=undefined?a.target:this.media,c=null;if(b&&b.buffered&&b.buffered.length>0&&b.buffered.end&&b.duration)c=b.buffered.end(0)/b.duration;else if(b&&b.bytesTotal!=undefined&&b.bytesTotal>0&&b.bufferedBytes!=undefined)c=b.bufferedBytes/b.bytesTotal; else if(a&&a.lengthComputable&&a.total!=0)c=a.loaded/a.total;if(c!==null){c=Math.min(1,Math.max(0,c));this.loaded&&this.total&&this.loaded.width(this.total.width()*c)}},setCurrentRail:function(){if(this.media.currentTime!=undefined&&this.media.duration)if(this.total&&this.handle){var a=Math.round(this.total.width()*this.media.currentTime/this.media.duration),b=a-Math.round(this.handle.outerWidth(true)/2);this.current.width(a);this.handle.css("left",b)}}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:" | "});f.extend(MediaElementPlayer.prototype,{buildcurrent:function(a,b,c,e){f('
    '+(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00")+"
    ").appendTo(b);this.currenttime=this.controls.find(".mejs-currenttime");e.addEventListener("timeupdate",function(){a.updateCurrent()},false)},buildduration:function(a,b, c,e){if(b.children().last().find(".mejs-currenttime").length>0)f(this.options.timeAndDurationSeparator+''+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"").appendTo(b.find(".mejs-time"));else{b.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container"); f('
    '+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"
    ").appendTo(b)}this.durationD=this.controls.find(".mejs-duration");e.addEventListener("timeupdate",function(){a.updateDuration()}, false)},updateCurrent:function(){if(this.currenttime)this.currenttime.html(mejs.Utility.secondsToTimeCode(this.media.currentTime,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))},updateDuration:function(){this.container.toggleClass("mejs-long-video",this.media.duration>3600);if(this.durationD&&(this.options.duration>0||this.media.duration))this.durationD.html(mejs.Utility.secondsToTimeCode(this.options.duration>0?this.options.duration: this.media.duration,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{muteText:mejs.i18n.t("Mute Toggle"),hideVolumeOnTouchDevices:true,audioVolume:"horizontal",videoVolume:"vertical"});f.extend(MediaElementPlayer.prototype,{buildvolume:function(a,b,c,e){if(!((mejs.MediaFeatures.isAndroid||mejs.MediaFeatures.isiOS)&&this.options.hideVolumeOnTouchDevices)){var d=this,g=d.isVideo?d.options.videoVolume:d.options.audioVolume,k=g=="horizontal"?f('
    ').appendTo(b):f('
    ').appendTo(b), j=d.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),m=d.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),q=d.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),p=d.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),t=function(n,o){if(!j.is(":visible")&&typeof o=="undefined"){j.show();t(n,true);j.hide()}else{n=Math.max(0,n);n=Math.min(n,1);n==0?k.removeClass("mejs-mute").addClass("mejs-unmute"):k.removeClass("mejs-unmute").addClass("mejs-mute"); if(g=="vertical"){var s=m.height(),u=m.position(),v=s-s*n;p.css("top",Math.round(u.top+v-p.height()/2));q.height(s-v);q.css("top",u.top+v)}else{s=m.width();u=m.position();s=s*n;p.css("left",Math.round(u.left+s-p.width()/2));q.width(Math.round(s))}}},h=function(n){var o=null,s=m.offset();if(g=="vertical"){o=m.height();parseInt(m.css("top").replace(/px/,""),10);o=(o-(n.pageY-s.top))/o;if(s.top==0||s.left==0)return}else{o=m.width();o=(n.pageX-s.left)/o}o=Math.max(0,o);o=Math.min(o,1);t(o);o==0?e.setMuted(true): e.setMuted(false);e.setVolume(o)},l=false,r=false;k.hover(function(){j.show();r=true},function(){r=false;!l&&g=="vertical"&&j.hide()});j.bind("mouseover",function(){r=true}).bind("mousedown",function(n){h(n);d.globalBind("mousemove.vol",function(o){h(o)});d.globalBind("mouseup.vol",function(){l=false;d.globalUnbind(".vol");!r&&g=="vertical"&&j.hide()});l=true;return false});k.find("button").click(function(){e.setMuted(!e.muted)});e.addEventListener("volumechange",function(){if(!l)if(e.muted){t(0); k.removeClass("mejs-mute").addClass("mejs-unmute")}else{t(e.volume);k.removeClass("mejs-unmute").addClass("mejs-mute")}},false);if(d.container.is(":visible")){t(a.options.startVolume);a.options.startVolume===0&&e.setMuted(true);e.pluginType==="native"&&e.setVolume(a.options.startVolume)}}}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{usePluginFullScreen:true,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")});f.extend(MediaElementPlayer.prototype,{isFullScreen:false,isNativeFullScreen:false,isInIframe:false,buildfullscreen:function(a,b,c,e){if(a.isVideo){a.isInIframe=window.location!=window.parent.location;if(mejs.MediaFeatures.hasTrueNativeFullScreen){c=function(){if(a.isFullScreen)if(mejs.MediaFeatures.isFullScreen()){a.isNativeFullScreen=true;a.setControlsSize()}else{a.isNativeFullScreen= false;a.exitFullScreen()}};mejs.MediaFeatures.hasMozNativeFullScreen?a.globalBind(mejs.MediaFeatures.fullScreenEventName,c):a.container.bind(mejs.MediaFeatures.fullScreenEventName,c)}var d=this,g=f('
    ').appendTo(b);if(d.media.pluginType==="native"||!d.options.usePluginFullScreen&&!mejs.MediaFeatures.isFirefox)g.click(function(){mejs.MediaFeatures.hasTrueNativeFullScreen&& mejs.MediaFeatures.isFullScreen()||a.isFullScreen?a.exitFullScreen():a.enterFullScreen()});else{var k=null;if(function(){var h=document.createElement("x"),l=document.documentElement,r=window.getComputedStyle;if(!("pointerEvents"in h.style))return false;h.style.pointerEvents="auto";h.style.pointerEvents="x";l.appendChild(h);r=r&&r(h,"").pointerEvents==="auto";l.removeChild(h);return!!r}()&&!mejs.MediaFeatures.isOpera){var j=false,m=function(){if(j){for(var h in q)q[h].hide();g.css("pointer-events", "");d.controls.css("pointer-events","");d.media.removeEventListener("click",d.clickToPlayPauseCallback);j=false}},q={};b=["top","left","right","bottom"];var p,t=function(){var h=g.offset().left-d.container.offset().left,l=g.offset().top-d.container.offset().top,r=g.outerWidth(true),n=g.outerHeight(true),o=d.container.width(),s=d.container.height();for(p in q)q[p].css({position:"absolute",top:0,left:0});q.top.width(o).height(l);q.left.width(h).height(n).css({top:l});q.right.width(o-h-r).height(n).css({top:l, left:h+r});q.bottom.width(o).height(s-n-l).css({top:l+n})};d.globalBind("resize",function(){t()});p=0;for(c=b.length;p').appendTo(d.container).mouseover(m).hide();g.on("mouseover",function(){if(!d.isFullScreen){var h=g.offset(),l=a.container.offset();e.positionFullscreenButton(h.left-l.left,h.top-l.top,false);g.css("pointer-events","none");d.controls.css("pointer-events","none");d.media.addEventListener("click",d.clickToPlayPauseCallback);for(p in q)q[p].show(); t();j=true}});e.addEventListener("fullscreenchange",function(){d.isFullScreen=!d.isFullScreen;d.isFullScreen?d.media.removeEventListener("click",d.clickToPlayPauseCallback):d.media.addEventListener("click",d.clickToPlayPauseCallback);m()});d.globalBind("mousemove",function(h){if(j){var l=g.offset();if(h.pageYl.top+g.outerHeight(true)||h.pageXl.left+g.outerWidth(true)){g.css("pointer-events","");d.controls.css("pointer-events","");j=false}}})}else g.on("mouseover", function(){if(k!==null){clearTimeout(k);delete k}var h=g.offset(),l=a.container.offset();e.positionFullscreenButton(h.left-l.left,h.top-l.top,true)}).on("mouseout",function(){if(k!==null){clearTimeout(k);delete k}k=setTimeout(function(){e.hideFullscreenButton()},1500)})}a.fullscreenBtn=g;d.globalBind("keydown",function(h){if((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||d.isFullScreen)&&h.keyCode==27)a.exitFullScreen()})}},cleanfullscreen:function(a){a.exitFullScreen()}, containerSizeTimeout:null,enterFullScreen:function(){var a=this;if(!(a.media.pluginType!=="native"&&(mejs.MediaFeatures.isFirefox||a.options.usePluginFullScreen))){f(document.documentElement).addClass("mejs-fullscreen");normalHeight=a.container.height();normalWidth=a.container.width();if(a.media.pluginType==="native")if(mejs.MediaFeatures.hasTrueNativeFullScreen){mejs.MediaFeatures.requestFullScreen(a.container[0]);a.isInIframe&&setTimeout(function c(){if(a.isNativeFullScreen){var e=(window.devicePixelRatio|| 1)*f(window).width(),d=screen.width;Math.abs(d-e)>d*0.0020?a.exitFullScreen():setTimeout(c,500)}},500)}else if(mejs.MediaFeatures.hasSemiNativeFullScreen){a.media.webkitEnterFullscreen();return}if(a.isInIframe){var b=a.options.newWindowCallback(this);if(b!=="")if(mejs.MediaFeatures.hasTrueNativeFullScreen)setTimeout(function(){if(!a.isNativeFullScreen){a.pause();window.open(b,a.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no")}}, 250);else{a.pause();window.open(b,a.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");return}}a.container.addClass("mejs-container-fullscreen").width("100%").height("100%");a.containerSizeTimeout=setTimeout(function(){a.container.css({width:"100%",height:"100%"});a.setControlsSize()},500);if(a.media.pluginType==="native")a.$media.width("100%").height("100%");else{a.container.find(".mejs-shim").width("100%").height("100%"); a.media.setVideoSize(f(window).width(),f(window).height())}a.layers.children("div").width("100%").height("100%");a.fullscreenBtn&&a.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen");a.setControlsSize();a.isFullScreen=true}},exitFullScreen:function(){clearTimeout(this.containerSizeTimeout);if(this.media.pluginType!=="native"&&mejs.MediaFeatures.isFirefox)this.media.setFullscreen(false);else{if(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()|| this.isFullScreen))mejs.MediaFeatures.cancelFullScreen();f(document.documentElement).removeClass("mejs-fullscreen");this.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight);if(this.media.pluginType==="native")this.$media.width(normalWidth).height(normalHeight);else{this.container.find(".mejs-shim").width(normalWidth).height(normalHeight);this.media.setVideoSize(normalWidth,normalHeight)}this.layers.children("div").width(normalWidth).height(normalHeight);this.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen"); this.setControlsSize();this.isFullScreen=false}}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{startLanguage:"",tracksText:mejs.i18n.t("Captions/Subtitles"),hideCaptionsButtonWhenEmpty:true,toggleCaptionsButtonWhenOnlyOne:false,slidesSelector:""});f.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(a,b,c,e){if(a.tracks.length!=0){var d;if(this.domNode.textTracks)for(d=this.domNode.textTracks.length-1;d>=0;d--)this.domNode.textTracks[d].mode="hidden";a.chapters=f('
    ').prependTo(c).hide();a.captions= f('
    ').prependTo(c).hide();a.captionsText=a.captions.find(".mejs-captions-text");a.captionsButton=f('
    ").appendTo(b);for(d=b=0;d0&&b.displayChapters(c)},false);c.kind=="slides"&&b.setupSlides(c)},error:function(){b.loadNextTrack()}})},enableTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("input[value="+a+"]").prop("disabled",false).siblings("label").html(b); this.options.startLanguage==a&&f("#"+this.id+"_captions_"+a).click();this.adjustLanguageBox()},addTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("ul").append(f('
  • "));this.adjustLanguageBox();this.container.find(".mejs-captions-translations option[value="+a+"]").remove()}, adjustLanguageBox:function(){this.captionsButton.find(".mejs-captions-selector").height(this.captionsButton.find(".mejs-captions-selector ul").outerHeight(true)+this.captionsButton.find(".mejs-captions-translations").outerHeight(true))},checkForTracks:function(){var a=false;if(this.options.hideCaptionsButtonWhenEmpty){for(i=0;i=b.entries.times[a].start&&this.media.currentTime<=b.entries.times[a].stop){this.captionsText.html(b.entries.text[a]);this.captions.show().height(0);return}this.captions.hide()}},setupSlides:function(a){this.slides=a;this.slides.entries.imgs=[this.slides.entries.text.length];this.showSlide(0)},showSlide:function(a){if(!(typeof this.tracks=="undefined"||typeof this.slidesContainer== "undefined")){var b=this,c=b.slides.entries.text[a],e=b.slides.entries.imgs[a];if(typeof e=="undefined"||typeof e.fadeIn=="undefined")b.slides.entries.imgs[a]=e=f('').on("load",function(){e.appendTo(b.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()});else!e.is(":visible")&&!e.is(":animated")&&e.fadeIn().siblings(":visible").fadeOut()}},displaySlides:function(){if(typeof this.slides!="undefined"){var a=this.slides,b;for(b=0;b= a.entries.times[b].start&&this.media.currentTime<=a.entries.times[b].stop){this.showSlide(b);break}}},displayChapters:function(){var a;for(a=0;a100||c==a.entries.times.length- 1&&e+d<100)e=100-d;b.chapters.append(f('
    '+a.entries.text[c]+''+mejs.Utility.secondsToTimeCode(a.entries.times[c].start)+"–"+mejs.Utility.secondsToTimeCode(a.entries.times[c].stop)+"
    "));d+=e}b.chapters.find("div.mejs-chapter").click(function(){b.media.setCurrentTime(parseFloat(f(this).attr("rel"))); b.media.paused&&b.media.play()});b.chapters.show()}});mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",tl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese", ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}};mejs.TrackFormatParser={webvvt:{pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,pattern_timecode:/^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/, parse:function(a){var b=0;a=mejs.TrackFormatParser.split2(a,/\r?\n/);for(var c={text:[],times:[]},e,d;b$1");c.text.push(d);c.times.push({start:mejs.Utility.convertSMPTEtoSeconds(e[1])==0?0.2:mejs.Utility.convertSMPTEtoSeconds(e[1]), stop:mejs.Utility.convertSMPTEtoSeconds(e[3]),settings:e[5]})}}return c}},dfxp:{parse:function(a){a=f(a).filter("tt");var b=0;b=a.children("div").eq(0);var c=b.find("p");b=a.find("#"+b.attr("style"));var e,d;a={text:[],times:[]};if(b.length){d=b.removeAttr("id").get(0).attributes;if(d.length){e={};for(b=0;b$1");a.text.push(d);if(a.times.start==0)a.times.start=2}return a}},split2:function(a,b){return a.split(b)}};if("x\n\ny".split(/\n/gi).length!=3)mejs.TrackFormatParser.split2=function(a,b){var c=[],e="",d;for(d=0;d
    ').appendTo(f("body")).hide();a.container.bind("contextmenu",function(b){if(a.isContextMenuEnabled){b.preventDefault();a.renderContextMenu(b.clientX-1,b.clientY-1);return false}});a.container.bind("click",function(){a.contextMenu.hide()});a.contextMenu.bind("mouseleave",function(){a.startContextMenuTimer()})},cleancontextmenu:function(a){a.contextMenu.remove()}, isContextMenuEnabled:true,enableContextMenu:function(){this.isContextMenuEnabled=true},disableContextMenu:function(){this.isContextMenuEnabled=false},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer();a.contextMenuTimer=setTimeout(function(){a.hideContextMenu();a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;if(a!=null){clearTimeout(a);delete a}},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(a, b){for(var c=this,e="",d=c.options.contextMenuItems,g=0,k=d.length;g
    ';else{var j=d[g].render(c);if(j!=null)e+='
    '+j+"
    "}c.contextMenu.empty().append(f(e)).css({top:b,left:a}).show();c.contextMenu.find(".mejs-contextmenu-item").each(function(){var m=f(this),q=parseInt(m.data("itemindex"),10),p=c.options.contextMenuItems[q];typeof p.show!= "undefined"&&p.show(m,c);m.click(function(){typeof p.click!="undefined"&&p.click(c);c.contextMenu.hide()})});setTimeout(function(){c.killControlsTimer("rev3")},100)}})})(mejs.$); (function(f){f.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")});f.extend(MediaElementPlayer.prototype,{buildpostroll:function(a,b,c){var e=this.container.find('link[rel="postroll"]').attr("href");if(typeof e!=="undefined"){a.postroll=f('').prependTo(c).hide();this.media.addEventListener("ended", function(){f.ajax({dataType:"html",url:e,success:function(d){c.find(".mejs-postroll-layer-content").html(d)}});a.postroll.show()},false)}}})})(mejs.$); /** * Template Functions * Version: 1.1.9 */ $(document).ready(function(){"use strict";var a=".header",b=".header-animated",c=".header-sticky",d=".header-background",e=".header-compact",f=".header-in",g=".header-out",h=".header-positioned",i="#bkg-retina-img, #retina-img, [data-2x]",j=".equalize",k=".fullscreen-sections-wrapper",l=".fullscreen-section",m=".scroll-link",n=1e3,o="easeInOutQuart",p=.6,q=".grid-container",r=".grid-item, .masonry-stamp",s=".grid-filter-menu",t="700ms",u="700ms",v=!1,w=[".video-container iframe",".video-container object"],x=["www.youtube.com","player.vimeo.com"],y=".mejs-container audio, .mejs-container video",z=".carousel-slider",A=".content-slider",B=".previous-content-slider",C=".next-content-slider",D=".tm-slider-container.fullscreen",E=".previous-fullscreen-slider",F=".next-fullscreen-slider",G=".full-width-slider",H=".previous-full-width-slider",I=".next-full-width-slider",J=".logo-slider",K=".hero-slider",L=".testimonial-slider",M=".previous-testimonial-slider",N=".next-testimonial-slider",O=".testimonial-slider-aux-nav .api-button",P=".team-slider",Q=".previous-team-slider",R=".next-team-slider",S=".recent-slider",T=".previous-recent-slider",U=".next-recent-slider",V="#tm-lightbox",W=".lightbox-link",X=".form-element",Y=".form-response",Z=".form-honeypot",_=".form-submit",aa=".signup-form",ba=".required-field",ca="Please wait.",da="Sending...",ea="You have been added to our list!",fa="Oh boy an error occurred, please try again.",ga="Please fill out required fields.",ha="Please enter a valid email address.",ia=".contact-form",ja=".required-field",ka="Please wait.",la="Sending...",ma="Thank you, your email has been received!",na="Oh boy an error occurred, please try again.",oa="Please fill out required fields.",pa="Please enter a valid email address.",qa=".map-container",ra=".map-pan-link-container",sa=".map-pan-link",ta=["images/assets/map-marker.png","images/assets/map-marker-2.png"],ua=[[40.723301,-74.002988]],va=["Downtown New York Office
    44 St. West 32"],wa=45,xa=53,ya=12,za=!1,Aa=!1,Ba=!1,Ca=!0,Da=!0,Ea=!1,Fa=!0,Ga=".content",Ha=".footer-fixed",Ia=".footer",Ja=!0,Ka="body",La=".fade-location, .logo a, .footer-logo a, .navigation a, .side-navigation a, .overlay-navigation a, .grid .overlay-link, .post-media .overlay-link, .post-title a, .post-read-more a, .pagination-previous, .pagination-next, .breadcrumb a, a.read-more",Ma=".no-page-fade, .mail-link, .lightbox-link, .contains-sub-menu, .blog .pagination-previous, .blog .pagination-next, .disabled, .scroll-link, .navigation-show a, a.navigation-show",Na="webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",Oa={init:function(){$(Ka).removeClass("no-js"),Oa.siteHeader(),Oa.retinize(),Oa.equalize(768),Oa.parallax(".parallax.fixed-height",!0,!1,!0),Oa.parallax(".parallax.fullscreen",!0,!0,!0),Oa.fullScreenSection(),Oa.masonry(),Oa.logoSlider(),Oa.heroSlider(),Oa.testimonialSlider(),Oa.teamSlider(),Oa.recentSlider(),Oa.carouselSlider(),Oa.contentSlider(),Oa.fullScreenSlider(),Oa.fullWidthSlider(),Oa.lightbox(),Oa.counter(".stat",".stat-counter",!1),Oa.horizon(".horizon",".parallax .horizon","easeInOutQuint",!1,1),Oa.videos(),Oa.mediaElement(),Oa.signupForm(),Oa.contactForm(),Oa.enablePlaceHolder();try{document.getElementsByClassName("map-canvas")&&google.maps.event.addDomListener(window,"load",Oa.googleMap)}catch(a){}Oa.fixedFooter(),Oa.pageFade(),Oa.scrollToSection(),$("body").hasClass("preload-page")&&Oa.preloadPage()},retinize:function(){$(i).retinizeImages()},equalize:function(a){imagesLoaded($(j),function(){$(j).equalizeHeights({clearUnder:a})})},parallax:function(a,b,c,d){$(a).snowBridge({scaleContainer:b,scaleUnder:960,scaleMinHeight:400,fullscreen:c,fadeInOut:d,fadeThreshold:.5,retinaSupport:!1,parallaxFactor:.6,onLoaded:function(){Oa.horizon(".horizon","","easeInOutQuint",!1,1)}})},horizon:function(a,b,c,d,e){return!$("body").hasClass("preload-page")&&void $(a).not(b).horizon({easing:c,recurring:d,threshold:e})},counter:function(a,b,c){$(b).counter({autoStart:!1}),$(a).each(function(){var a=$(this);a.horizon({recurring:c,inView:function(){return!a.find(b).data("counting")&&void a.find(b).each(function(){a.find(b).data("counting",!0);var c=$(this).data("counter");c.startCounter()})},outOfView:function(){return!(!c||!a.find(b).data("counting"))&&void a.find(b).each(function(){a.find(b).data("counting",!1);var c=$(this).data("counter");c.clearCounter()})}})})},carouselSlider:function(){$(z).avalancheSlider({animation:"slide",easing:"easeInOutQuart",speed:700,autoAdvance:!1,forceFit:!1,scaleMinHeight:"auto",carousel:!0,carouselVisible:3,lazyLoad:!1,navArrows:!1,navPagination:!0,navShowOnHover:!1,retinaSupport:!1})},contentSlider:function(){$(A).avalancheSlider({animation:"slide",easing:"easeInOutQuart",speed:700,autoAdvance:!1,forceFit:!1,scaleMinHeight:"auto",lazyLoad:!0,navArrows:!0,navPagination:!0,navShowOnHover:!1,retinaSupport:!1});var a=$(A).data("avalancheSlider");$(B).on("click",function(b){b.preventDefault(),a.prevSlide()}),$(C).on("click",function(b){b.preventDefault(),a.nextSlide()})},fullScreenSlider:function(){$(D).avalancheSlider({animation:"slide",easing:"easeInOutQuart",speed:700,autoAdvance:!1,fullscreen:!0,captionScaling:!1,lazyLoad:!0,navArrows:!0,navPagination:!0,navShowOnHover:!0,respectRatio:!1,retinaSupport:!1});var a=$(D).data("avalancheSlider");$(E).on("click",function(b){b.preventDefault(),a.prevSlide()}),$(F).on("click",function(b){b.preventDefault(),a.nextSlide()})},fullWidthSlider:function(){$(G).avalancheSlider({animation:"slide",easing:"easeInOutQuart",speed:700,autoAdvance:!1,forceFit:!1,fullwidth:!0,scaleUnder:960,scaleMinHeight:400,captionScaling:!0,lazyLoad:!0,navArrows:!0,navPagination:!0,navShowOnHover:!0,respectRatio:!1,retinaSupport:!1});var a=$(G).data("avalancheSlider");$(H).on("click",function(b){b.preventDefault(),a.prevSlide()}),$(I).on("click",function(b){b.preventDefault(),a.nextSlide()})},logoSlider:function(){$(J).avalancheSlider({animation:"slide",easing:"easeInOutQuart",speed:700,autoAdvance:!0,carousel:!0,carouselVisible:5,carouselScaleHeight:!0,lazyLoad:!1,navArrows:!1,navPagination:!0,showProgressBar:!1,navShowOnHover:!1,retinaSupport:!1})},heroSlider:function(){$(K).avalancheSlider({animation:"slide",easing:"easeInOutQuart",speed:900,autoAdvance:!1,scaleMinHeight:"auto",carousel:!0,carouselVisible:1,carouselScaleHeight:!0,lazyLoad:!1,navArrows:!1,navPagination:!0,navShowOnHover:!1,retinaSupport:!1})},testimonialSlider:function(){$(L).avalancheSlider({animation:"slide",easing:"easeInOutQuart",speed:900,autoAdvance:!1,scaleMinHeight:"auto",carousel:!0,carouselVisible:1,carouselScaleHeight:!0,lazyLoad:!1,navArrows:!1,navPagination:!0,navShowOnHover:!1,retinaSupport:!1});var a=$(L).data("avalancheSlider");$(M).on("click",function(b){b.preventDefault(),a.prevSlide()}),$(N).on("click",function(b){b.preventDefault(),a.nextSlide()}),$(O).each(function(){$(this).on("click",function(b){b.preventDefault();var c=$(this).data("slide");a.slideTo(c),$(O).removeClass("active"),$(this).addClass("active")})})},teamSlider:function(){$(P).avalancheSlider({animation:"slide",easing:"easeInOutQuart",speed:900,autoAdvance:!1,carousel:!0,carouselVisible:3,carouselScaleHeight:!0,lazyLoad:!1,navArrows:!1,navPagination:!0,navShowOnHover:!1,retinaSupport:!1});var a=$(P).data("avalancheSlider");$(Q).on("click",function(b){b.preventDefault(),a.prevSlide()}),$(R).on("click",function(b){b.preventDefault(),a.nextSlide()})},recentSlider:function(){$(S).avalancheSlider({animation:"slide",easing:"easeInOutQuart",speed:900,autoAdvance:!1,carousel:!0,carouselVisible:3,carouselScaleHeight:!0,lazyLoad:!0,navArrows:!1,navPagination:!0,navShowOnHover:!1,retinaSupport:!1});var a=$(S).data("avalancheSlider");$(T).on("click",function(b){b.preventDefault(),a.prevSlide()}),$(U).on("click",function(b){b.preventDefault(),a.nextSlide()})},lightbox:function(){$(W).summitLightbox({lightboxAnimation:"slideInTop",contentAnimation:"slide",slideAmount:100,easing:"swing",speed:350,onLoaded:function(){var a=$(V).find(".tml-aux-exit");if(0===a.length)return!1;var b=$(W).data("summitLightbox");a.on("click",function(a){a.preventDefault(),$(this).css({transition:"none"}),b.destroyLightbox()})}})},videos:function(){fluidvids.init({selector:w,players:x})},mediaElement:function(){$(y).each(function(){var a=!1;$(this).is("audio")&&(a=!0),$(this).mediaelementplayer({features:a?["playpause","progress","volume","fullscreen"]:["playpause","progress","current","duration","tracks","volume","fullscreen"],videoWidth:"100%",videoHeight:"100%",audioWidth:"100%",videoVolume:"vertical",audioVolume:"horizontal"})})},siteHeader:function(){function i(){j=$(window).width(),k=$(window).height(),l=Math.ceil(u.outerHeight()),m="window-height"===u.data("bkg-threshold")?k-l:u.data("bkg-threshold"),n="window-height"===u.data("compact-threshold")?k-l:u.data("compact-threshold"),o="window-height"===u.data("sticky-threshold")?k-l:u.data("sticky-threshold"),p=u.data("helper-in-threshold"),q=u.data("helper-out-threshold")}var j,k,l,m,n,o,p,q,r,s=0,t=960,u=$(a),v=!!u.is("[data-sticky-threshold]");b=b.split(".").join(""),c=c.split(".").join(""),d=d.split(".").join(""),e=e.split(".").join(""),f=f.split(".").join(""),g=g.split(".").join(""),h=h.split(".").join("");var w=function(b){return!($("body").hasClass("mobile")||j=o||0===o?($(a).addClass(c),p&&q&&$(a).addClass(h)):($(a).removeClass(c),p&&q&&$(a).removeClass(h)),m&&$(b).scrollTop()>=m?$(a).addClass(d):$(a).removeClass(d),n&&$(b).scrollTop()>=n?$(a).addClass(e):$(a).removeClass(e),r=$(b).scrollTop(),r>s?(p&&$(b).scrollTop()>=p&&$(a).addClass(f),$(a).removeClass(g)):r=p&&$(b).scrollTop()<=q&&($(a).addClass(g),$(g).on(Na,function(c){return c.stopPropagation(),c.target===$(b)[0]&&void $(a).removeClass(g)}))),void(s=r))},x=function(b){return i(),!$("body").hasClass("mobile")&&(j>t&&v&&u.css({height:u.outerHeight()+"px"}),j>t&&$(window).scrollTop()>=o?($(a).addClass(c),p&&q&&$(a).addClass(h)):($(a).removeClass(c),p&&q&&$(a).removeClass(h)),j>t&&$(window).scrollTop()t&&$(window).scrollTop()>m&&$(a).addClass(d),j>t&&$(window).scrollTop()t&&$(window).scrollTop()>n&&$(a).addClass(e),void(jt&&v&&u.css({height:l+"px"}),$(a).addClass(b)})},fullScreenSection:function(){var a=function(){var a;if($(k).find(l).length>1){if($("body").hasClass("mobile"))return!1;var b,c=!$(k).hasClass("no-navigation");if(c){b=$("
    ").addClass("fs-pagination").appendTo($(k));for(var d=1;d<$(k).children().length;d++)a=$(k).children().eq(d-1).attr("id"),$(k).find("#"+a).data("index",d),$(k).find(b).append('');$(window).on("resize",function(){e()});var e=function(){$(b).css({marginTop:-$(b).outerHeight()/2+"px",opacity:1})};e();var f=$(k).find(".fs-bullet-nav");f.each(function(){$(this).on("click",function(b){if(b.preventDefault(),$(this).hasClass("active"))return!1;parseFloat($(this).data("index"));a=$(this).attr("href"),Oa.scrollPage(a,0)})})}$(window).on("scroll",function(){$(k).find(l).each(function(){g($(this))})});var g=function(a){a.data("fs-scrolling")||(window.requestAnimationFrame(function(){h(a)}),a.data("fs-scrolling",!0))},h=function(a){if(Oa.isElementVisible(a,p)&&c){$(b).css({opacity:1});var d=$(k).find(a).data("index");b.find(".active").removeClass("active"),b.find("#fs-pagination-"+d).addClass("active"),a.hasClass("nav-dark")?b.addClass("nav-dark"):b.removeClass("nav-dark")}c&&Oa.isElementVisible($(k),p)?$(b).css({opacity:1,visibility:"visible"}):$(b).css({opacity:0,visibility:"hidden"}),a.data("fs-scrolling",!1)};$(k).find(l).each(function(){g($(this))})}},b=function(){$(l).each(function(){var a=$(this),b=a.find(".background-image, .background-slider-wrapper");if($(this).is("[data-width],[data-height]"))if($("body").hasClass("mobile")||c<=768){a.addClass("fs-image-scale content-below-on-mobile");var e=a.data("width"),f=a.data("height"),g=a.data("min-height"),h=a.width(),i=e>=f?e/f:f/e,j=e>=f?h/i:h*i;j=g&&j<=g?g:j,a.css({height:"auto"}),b.css({height:j+"px",minHeight:j+"px"})}else a.removeClass("fs-image-scale"),a.css({height:""}),b.css({height:"",minHeight:""});else $("body").hasClass("mobile")||c<=768?b.css({height:d+"px"}):(a.removeClass("fs-image-scale"),a.css({height:""}),b.css({height:"",minHeight:""}))})},c=$(window).width(),d=$(window).height();$(window).on("resize",function(){c=$(window).width(),d=$(this).height(),b()}).resize(),a()},scrollToSection:function(){var a=[];$(m).each(function(){a.push($(this).attr("href")),$(this).on("click",function(a){a.preventDefault();var b=$(this).attr("href"),c=$(this).data("offset")?$(this).data("offset"):0;Oa.scrollPage(b,c)})}),$(window).one("load",function(){$.each(a,function(a,c){b($(c))})}),$(window).on("scroll",function(){$.each(a,function(a,c){b($(c))})});var b=function(a){a.data("section-scrolling")||(window.requestAnimationFrame(function(){c(a)}),a.data("section-scrolling",!0))},c=function(a){if(Oa.isElementVisible(a,p)){var b=a.attr("id"),c=$('a[href="#'+b+'"]').closest("header, .side-navigation-wrapper, .overlay-navigation-wrapper");c&&($('a[href="#'+b+'"]').closest("header, .side-navigation-wrapper, .overlay-navigation-wrapper").find(m).parent().removeClass("current"),$('a[href="#'+b+'"]').parent().addClass("current"))}a.data("section-scrolling",!1)}},isElementVisible:function(a,b){if(b=a.is("[data-visible-threshold]")?a.data("visible-threshold"):p,"undefined"==typeof a.offset())return console.log("template-functions.js@isElementVisible: "+a.selector+" cannot be found in your html page."),!1;var c=$(window).height(),d=$(window).scrollTop(),e=d+$(window).height(),f=a.offset().top,g=(a.height(),f+a.outerHeight()-c*b),h=f+c*b;return a.is($(k))||(e>=h&&d<=g?a.addClass("in-view"):a.removeClass("in-view")),e>=h&&d<=g},scrollPage:function(a,b){$("html, body").animate({scrollTop:$(a).offset().top+b},n,o)},masonry:function(){$(q).each(function(){var a,b,c=$(this),d=$(this).find(".grid"),e=$(c).data("default-filter")?$(c).data("default-filter"):"*";if("*"!==e&&($(s).find(".active").removeClass("active"),$(s).find('[data-filter="'+e+'"]').addClass("active")),c.data("layout-mode")){a=c.data("layout-mode")?c.data("layout-mode"):"masonry",c.is("[data-layout-mode]")&&c.addClass("masonry"),c.is("[data-set-dimensions]")&&c.addClass("masonry-set-dimensions"),v=!!c.is("[data-animate-resize]"),u=c.is("[data-animate-resize-duration]")?c.data("animate-resize-duration")+"ms":u,c.is(".masonry-set-dimensions, .masonry-set-dimensions-2")?(c.is(".full-width.no-margins")&&Oa.masonryWrapperWidth(c,d),b=Oa.masonryColWidth(c,d),Oa.masonryThumbSizes(c,d,Oa.masonryColWidth(c,d))):b=".grid-sizer";var f=$('
    ');f.appendTo(c),imagesLoaded(d,function(){d.isotope({filter:e,itemSelector:".grid-item",isResizeBound:!!v,transitionDuration:t,layoutMode:a,stamp:".masonry-stamp",masonry:{columnWidth:b}}),c.find(f).remove(),d.css({visibility:"visible",minHeight:"initial"});var g=d.children().length-1;$("body").hasClass("transition-support")||c.removeClass("fade-in-progressively"),d.children().each(function(a){$(this).delay(100*a).animate({opacity:1},500,"easeInOutQuart",function(){a===g&&c.removeClass("fade-in-progressively")})}),$(window).on("resize",function(){c.is(".full-width.no-margins")&&Oa.masonryWrapperWidth(c,d),Oa.masonryThumbSizes(c,d,Oa.masonryColWidth(c,d)),v?d.isotope({transitionDuration:u,masonry:{columnWidth:".grid-sizer"!==b?Oa.masonryColWidth(c,d):".grid-sizer"}}):(d.removeClass("filtering"),d.isotope({transitionDuration:0,masonry:{columnWidth:".grid-sizer"!==b?Oa.masonryColWidth(c,d):".grid-sizer"}}).isotope("layout").isotope({transitionDuration:u}))})})}else d.css({visibility:"visible"})}),$(s).each(function(){var a,b;$(this).find("a").on("click",function(c){c.preventDefault(),$(this).closest(s).find(".active").removeClass("active"),$(this).addClass("active"),a=$(this).closest(s).data("target-grid")?$(this).closest(s).data("target-grid"):q,t=$(a).is("[data-animate-filter-duration]")?$(a).data("animate-filter-duration")+"ms":t,a=$(a).find(".grid"),a.isotope({transitionDuration:t}),b=$(this).attr("data-filter"),$(a).addClass("filtering").isotope({filter:b})}),$(this).find("a").each(function(){if(a=$(this).closest(s).data("target-grid")?$(this).closest(s).data("target-grid"):q,b="*"!=$(this).data("filter")?$(this).data("filter"):".grid-item",$(this).find(".project-count").length>0){var c=$(a).find(b).length;$(this).find(".project-count").html(c)}})})},masonryWrapperWidth:function(a,b){var c=Math.ceil(1.001*a.width());b.css({maxWidth:c+"px",width:c+"px"})},masonryColWidth:function(a,b){var c,d=$(window).width(),e=Math.ceil(a.width()),f=a.is(".full-width.no-margins")?Math.ceil(1.001*e):b.width();return a.is(".full-width.small-margins, .full-width.no-margins")?(b.hasClass("content-grid-2")&&(c=d>=480?f/2:f/1),b.hasClass("content-grid-3")&&(c=d>768?f/3:d<=768&&d>480?f/2:f/1),b.hasClass("content-grid-4")&&(c=d>1140?f/4:d<=1140&&d>768?f/3:d<=768&&d>480?f/2:f/1),b.hasClass("content-grid-5")&&(c=d>1300?f/5:d<=1300&&d>1140?f/4:d<=1140&&d>=768?f/3:d<=768&&d>480?f/2:f/1),b.hasClass("content-grid-6")&&(c=d>1300?f/6:d<=1300&&d>1140?f/4:d<=1140&&d>=768?f/3:d<=768&&d>480?f/2:f/1)):(b.hasClass("content-grid-2")&&(c=d>=600?f/2:f/1),b.hasClass("content-grid-3")&&(c=d>960?f/3:d<=960&&d>600?f/2:f/1),b.hasClass("content-grid-4")&&(c=d>1140?f/4:d<=1140&&d>960?f/3:d<=960&&d>600?f/2:f/1),b.hasClass("content-grid-5")&&(c=d>1300?f/5:d<=1300&&d>1140?f/4:d<=1140&&d>960?f/3:d<=960&&d>600?f/2:f/1),b.hasClass("content-grid-6")&&(c=d>1300?f/6:d<=1300&&d>1140?f/4:d<=1140&&d>960?f/3:d<=960&&d>600?f/2:f/1)),c=Math.floor(c)},masonryThumbSizes:function(a,b,c){var d,e=$(window).width(),f=2,g=$(".masonry-set-dimensions").hasClass("no-margins")?0:parseFloat(b.find(".grid-item").css("padding-left")),h=a.is(".masonry-set-dimensions")?a.is("[data-grid-ratio]")?parseFloat(a.data("grid-ratio")):1.5:1;if(d=Math.floor((c-g)/h+g),a.is(".masonry-set-dimensions")){var i=a.is(".full-width.small-margins, .full-width.no-margins")?480:600;b.find(r).each(function(){$(this).is(".large, .masonry-stamp.large")?$(this).is(".portrait, .masonry-stamp.portrait")?$(this).css({width:e>i?Math.floor(c*f)+"px":c+"px",height:e>i?Math.floor(d*(2*f))+"px":2*d+"px"}):$(this).css({width:e>i?Math.floor(c*f)+"px":c+"px",height:e>i?Math.floor(d*f)+"px":d+"px"}):$(this).is(".wide, .masonry-stamp.wide")?$(this).css({width:e>i?Math.floor(c*f)+"px":c+"px",height:e>i?d+"px":d/2+"px"}):$(this).is(".portrait, .masonry-stamp.portrait")?$(this).css({width:c+"px",height:Math.floor(d*f)+"px"}):$(this).css({width:c+"px",height:d+"px"})})}a.is(".masonry-set-dimensions-2")&&(e>600?b.find(r).each(function(){$(this).hasClass("horizontal")?$(this).hasClass("two-third")?$(this).children(".item-description").length?$(this).css({width:Math.floor(c*(f+1))+"px",height:Math.floor(d)+"px"}):$(this).addClass("no-description").css({width:Math.floor(c*f)+"px",height:Math.floor(d)+"px"}):$(this).css({width:Math.floor(c*f)+"px",height:Math.floor(d)+"px"}):$(this).hasClass("vertical")?$(this).hasClass("two-third")&&$(this).children(".item-description").length?$(this).css({width:c+"px",height:Math.floor(c*(f+1))+"px"}):$(this).css({width:c+"px",height:Math.floor(d*f)+"px"}):$(this).css({width:c+"px",height:Math.floor(d)+"px"})}):b.find(r).each(function(){$(this).find("iframe, video, .tm-slider-container").length?$(this).css({width:c+"px",height:d+"px"}):$(this).css({width:"",height:""})}))},signupForm:function(){$(aa).submit(function(a){a.preventDefault();var b=$(this),c=b.parent().find(Y),d=b.find(X),e=b.find('input[type="email"]'),f=b.find(Z),g=b.find(_),h=b.attr("action"),i=b.attr("method"),j=b.serialize(),k=!1,l=!1,m=!1;if(ba=ba.split(".").join(""),d.removeClass(ba),d.each(function(){$(this).attr("required")&&($(this).val()||(k=!0,$(this).addClass(ba),c.hide().text(ga).fadeIn(200)))}),k||(l=!0),e.val()&&!Oa.isValidEmail(e.val())?(c.hide().text(ha).fadeIn(200),e.addClass(ba)):m=!0,""!==f.val())return!1;if(k&&e.val()&&!Oa.isValidEmail(e.val())&&c.hide().text(ga+" "+ha).fadeIn(200),l&&m){var n=$(g).val();$(g).css({width:$(g).outerWidth()+"px"}).val(da).attr("disabled",!0),c.hide().text(ca).fadeIn(200),$.ajax({url:h,type:i,data:j,dataType:"json"}).done(function(a){try{a.response===!0?(c.text(ea),c.delay(1500).fadeOut(200),d.val("")):c.hide().text(a.json.error_message).fadeIn(200)}catch(a){console.log("error in parsing returned ajax data: "+a),c.hide().text("Error occurred. Please see the console for details.").fadeIn(200)}}).fail(function(a,b,d){console.log("Error occured in processing your request:"),console.log(a),console.log("Text status"),console.log(b),console.log("Error thrown"),console.log(d),console.log("Servre response"),console.log(a.status),console.log("Response Text may contain error output from PHP"),console.log(a.responseText),c.hide().text(fa+b+" ("+d+")").fadeIn(200)}).always(function(){$(g).css({width:""}).val(n).attr("disabled",!1)})}})},contactForm:function(){$(ia).submit(function(a){a.preventDefault();var b=$(this),c=b.parent().find(Y),d=b.find(X),e=b.find('input[type="email"]'),f=b.find(Z),g=b.find(_),h=b.attr("action"),i=b.attr("method"),j=[],k=encodeURIComponent(b.find("textarea[name=message]").val()+"\n"),l=[];b.find("input:not([type=submit]),select,textarea").each(function(a,b){var c=$(b),d=c.attr("name");if(c.hasClass("form-aux")&&d){var e=c.data("label")||d,f=c.find("option:selected").text(),g=c.val();!g&&c.is("select")?g=e==f?"Not selected":c.find("option:selected").text():"checkbox"!=c.attr("type")||c.prop("checked")||(g="Not checked"),l.push({name:d,label:encodeURIComponent(e),value:encodeURIComponent(g)})}else d&&"message"!=d&&j.push(d+"="+encodeURIComponent(c.val()))});for(var m=0;m960&&$(Ga).css({marginBottom:c+"px"}),$(Ia).is("[data-animate-reveal]")&&(b=$(Ga).outerHeight()+e-$(window).scrollTop(),b<=$(window).height()&&$(window).width()>960?$(Ga).addClass("animate-content"):$(Ga).removeClass("animate-content"))}if($("body").hasClass("mobile"))return!1;var b,c=$(Ha).outerHeight(),d=Ha.split(".").join(""),e=$(Ga).offset().top;$(Ia).hasClass(d)&&$(Ga).addClass("reveal-footer"),$(window).on("scroll",function(){a()}),$(window).on("resize",function(){c=$(Ha).outerHeight(),a()}),a()},pageFade:function(){return!!Ja&&void $(La).not(Ma).on("click",function(a){a.preventDefault();var b=this.href;$("body").hasClass("transition-support")?$(Ka).addClass("page-fade-out").on(Na,function(a){return a.stopPropagation(),a.target===$(this)[0]&&void Oa.goToNewPage(b)}):Oa.goToNewPage(b)})},goToNewPage:function(a){window.location=a},preloadPage:function(a){$("body").preloadPage({onComplete:function(){Oa.horizon(".horizon",".parallax .horizon","easeInOutQuint",!1,1)}})}};!function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c