var sby_js_exists=void 0!==sby_js_exists;if(!sby_js_exists){function sbyAddImgLiquid(){var t,e,i,s=s||{VER:"0.9.944"};s.bgs_Available=!1,s.bgs_CheckRunned=!1,function(t){t.fn.extend({sby_imgLiquid:function(e){this.defaults={fill:!0,verticalAlign:"center",horizontalAlign:"center",useBackgroundSize:!0,useDataHtmlAttr:!0,responsive:!0,delay:0,fadeInTime:0,removeBoxBackground:!0,hardPixels:!0,responsiveCheckTime:500,timecheckvisibility:500,onStart:null,onFinish:null,onItemStart:null,onItemFinish:null,onItemError:null},function(){if(!s.bgs_CheckRunned){s.bgs_CheckRunned=!0;var e=t('');t("body").append(e),function(){var t=e[0];if(t&&window.getComputedStyle){var i=window.getComputedStyle(t,null);i&&i.backgroundSize&&(s.bgs_Available="cover"===i.backgroundSize)}}(),e.remove()}}();var i=this;return this.options=e,this.settings=t.extend({},this.defaults,this.options),this.settings.onStart&&this.settings.onStart(),this.each(function(e){function n(){(l.responsive||h.data("sby_imgLiquid_oldProcessed"))&&h.data("sby_imgLiquid_settings")&&(l=h.data("sby_imgLiquid_settings"),d.actualSize=d.get(0).offsetWidth+d.get(0).offsetHeight/1e4,d.sizeOld&&d.actualSize!==d.sizeOld&&o(),d.sizeOld=d.actualSize,setTimeout(n,l.responsiveCheckTime))}function a(){h.data("sby_imgLiquid_error",!0),d.addClass("sby_imgLiquid_error"),l.onItemError&&l.onItemError(e,d,h),r()}function o(){var t,i,s,n,a,o,c,u,y=0,g=0,p=d.width(),b=d.height();void 0===h.data("owidth")&&h.data("owidth",h[0].width),void 0===h.data("oheight")&&h.data("oheight",h[0].height),l.fill===p/b>=h.data("owidth")/h.data("oheight")?(t="100%",i="auto",s=Math.floor(p),n=Math.floor(p*(h.data("oheight")/h.data("owidth")))):(t="auto",i="100%",s=Math.floor(b*(h.data("owidth")/h.data("oheight"))),n=Math.floor(b)),c=p-s,"left"===(a=l.horizontalAlign.toLowerCase())&&(g=0),"center"===a&&(g=.5*c),"right"===a&&(g=c),-1!==a.indexOf("%")&&((a=parseInt(a.replace("%",""),10))>0&&(g=c*a*.01)),u=b-n,"left"===(o=l.verticalAlign.toLowerCase())&&(y=0),"center"===o&&(y=.5*u),"bottom"===o&&(y=u),-1!==o.indexOf("%")&&((o=parseInt(o.replace("%",""),10))>0&&(y=u*o*.01)),l.hardPixels&&(t=s,i=n),h.css({width:t,height:i,"margin-left":Math.floor(g),"margin-top":Math.floor(y)}),h.data("sby_imgLiquid_oldProcessed")||(h.fadeTo(l.fadeInTime,1),h.data("sby_imgLiquid_oldProcessed",!0),l.removeBoxBackground&&d.css("background-image","none"),d.addClass("sby_imgLiquid_nobgSize"),d.addClass("sby_imgLiquid_ready")),l.onItemFinish&&l.onItemFinish(e,d,h),r()}function r(){e===i.length-1&&i.settings.onFinish&&i.settings.onFinish()}var l=i.settings,d=t(this),h=t("img:first",d);return h.length?(h.data("sby_imgLiquid_settings")?(d.removeClass("sby_imgLiquid_error").removeClass("sby_imgLiquid_ready"),l=t.extend({},h.data("sby_imgLiquid_settings"),i.options)):l=t.extend({},i.settings,function(){var t={};if(i.settings.useDataHtmlAttr){var e=d.attr("data-sby_imgLiquid-fill"),n=d.attr("data-sby_imgLiquid-horizontalAlign"),a=d.attr("data-sby_imgLiquid-verticalAlign");("true"===e||"false"===e)&&(t.fill=Boolean("true"===e)),void 0===n||"left"!==n&&"center"!==n&&"right"!==n&&-1===n.indexOf("%")||(t.horizontalAlign=n),void 0===a||"top"!==a&&"bottom"!==a&&"center"!==a&&-1===a.indexOf("%")||(t.verticalAlign=a)}return s.isIE&&i.settings.ieFadeInDisabled&&(t.fadeInTime=0),t}()),h.data("sby_imgLiquid_settings",l),l.onItemStart&&l.onItemStart(e,d,h),void(s.bgs_Available&&l.useBackgroundSize?(-1===d.css("background-image").indexOf(encodeURI(h.attr("src")))&&d.css({"background-image":'url("'+encodeURI(h.attr("src"))+'")'}),d.css({"background-size":l.fill?"cover":"contain","background-position":(l.horizontalAlign+" "+l.verticalAlign).toLowerCase(),"background-repeat":"no-repeat"}),t("a:first",d).css({display:"block",width:"100%",height:"100%"}),t("img",d).css({display:"none"}),l.onItemFinish&&l.onItemFinish(e,d,h),d.addClass("sby_imgLiquid_bgSize"),d.addClass("sby_imgLiquid_ready"),r()):function i(){if(h.data("oldSrc")&&h.data("oldSrc")!==h.attr("src")){var s=h.clone().removeAttr("style");return s.data("sby_imgLiquid_settings",h.data("sby_imgLiquid_settings")),h.parent().prepend(s),h.remove(),(h=s)[0].width=0,void setTimeout(i,10)}return h.data("sby_imgLiquid_oldProcessed")?void o():(h.data("sby_imgLiquid_oldProcessed",!1),h.data("oldSrc",h.attr("src")),t("img:not(:first)",d).css("display","none"),d.css({overflow:"hidden"}),h.fadeTo(0,0).removeAttr("width").removeAttr("height").css({visibility:"visible","max-width":"none","max-height":"none",width:"auto",height:"auto",display:"block"}),h.on("error",a),h[0].onerror=a,function t(){h.data("sby_imgLiquid_error")||h.data("sby_imgLiquid_loaded")||h.data("sby_imgLiquid_oldProcessed")||(d.is(":visible")&&h[0].complete&&h[0].width>0&&h[0].height>0?(h.data("sby_imgLiquid_loaded",!0),setTimeout(o,e*l.delay)):setTimeout(t,l.timecheckvisibility))}(),void n())}())):void a()})}})}(jQuery),t=s.injectCss,e=document.getElementsByTagName("head")[0],(i=document.createElement("style")).type="text/css",i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t)),e.appendChild(i)}function sby_supports_video(){return!!document.createElement("video").canPlayType}window.sbyLinkify=function(){var t="[a-z\\d.-]+://",e="mailto:",i=new RegExp("(?:\\b[a-z\\d.-]+://[^<>\\s]+|\\b(?:(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)+(?:ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|coop|com|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mobi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xn--0zwm56d|xn--11b5bs3a9aj6g|xn--80akhbyknj4f|xn--9t4b11yi5a|xn--deba0ad|xn--g6w251d|xn--hgbk6aj7f53bba|xn--hlcj6aya9esc7a|xn--jxalpdlp|xn--kgbechtv|xn--zckzah|ye|yt|yu|za|zm|zw)|(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5]))(?:[;/][^#?<>\\s]*)?(?:\\?[^#<>\\s]*)?(?:#[^<>\\s]*)?(?!\\w)|(?:mailto:)?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)+(?:ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|coop|com|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mobi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xn--0zwm56d|xn--11b5bs3a9aj6g|xn--80akhbyknj4f|xn--9t4b11yi5a|xn--deba0ad|xn--g6w251d|xn--hgbk6aj7f53bba|xn--hlcj6aya9esc7a|xn--jxalpdlp|xn--kgbechtv|xn--zckzah|ye|yt|yu|za|zm|zw)|(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5]))(?:\\?[^#<>\\s]*)?(?:#[^<>\\s]*)?(?!\\w))","ig"),s=new RegExp("^"+t,"i"),n={"'":"`",">":"<",")":"(","]":"[","}":"{","B;":"B+","b:":"b9"},a={callback:function(t,e){return e?''+t+"":t},punct_regexp:/(?:[!?.,:;'"]|(?:&|&)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)$/};return function(t,o){o=o||{};var r,l,d,h,c,u,y,g,p,b,f,m,_="",v=[];for(l in a)void 0===o[l]&&(o[l]=a[l]);for(;r=i.exec(t);)if(d=r[0],y=(u=i.lastIndex)-d.length,!/[\/:]/.test(t.charAt(y-1))){do{g=d,m=d.substr(-1),(f=n[m])&&(p=d.match(new RegExp("\\"+f+"(?!$)","g")),b=d.match(new RegExp("\\"+m,"g")),(p?p.length:0)<(b?b.length:0)&&(d=d.substr(0,d.length-1),u--)),o.punct_regexp&&(d=d.replace(o.punct_regexp,function(t){return u-=t.length,""}))}while(d.length&&d!==g);h=d,s.test(h)||(h=(-1!==h.indexOf("@")?h.indexOf(e)?e:"":h.indexOf("irc.")?h.indexOf("ftp.")?"http://":"ftp://":"irc://")+h),c!=y&&(v.push([t.slice(c,y)]),c=u),v.push([d,h])}for(v.push([t.substr(c)]),l=0;l1||t.items.merge,a[s]=n?e*i:this._items[s].width();this._widths=a}},{filter:["items","settings"],run:function(){var e=[],i=this._items,s=this.settings,n=Math.max(2*s.items,4),a=2*Math.ceil(i.length/2),o=s.loop&&i.length?s.rewind?n:Math.max(n,a):0,r="",l="";for(o/=2;o--;)e.push(this.normalize(e.length/2,!0)),r+=i[e[e.length-1]][0].outerHTML,e.push(this.normalize(i.length-1-(e.length-1)/2,!0)),l=i[e[e.length-1]][0].outerHTML+l;this._clones=e,t(r).addClass("cloned").appendTo(this.$stage),t(l).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var t=this.settings.rtl?1:-1,e=this._clones.length+this._items.length,i=-1,s=0,n=0,a=[];++i",r)||this.op(e,"<",o)&&this.op(e,">",r))&&l.push(i);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+l.join("), :eq(")+")").addClass("active"),this.settings.center&&(this.$stage.children(".center").removeClass("center"),this.$stage.children().eq(this.current()).addClass("center"))}}],n.prototype.initialize=function(){var e,i,n;(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading"))&&(e=this.$element.find("img"),i=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:s,n=this.$element.children(i).width(),e.length&&n<=0&&this.preloadAutoWidthImages(e));this.$element.addClass(this.options.loadingClass),this.$stage=t("<"+this.settings.stageElement+' class="'+this.settings.stageClass+'"/>').wrap('
'),this.$element.append(this.$stage.parent()),this.replace(this.$element.children().not(this.$stage.parent())),this.$element.is(":visible")?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},n.prototype.setup=function(){var e=this.viewport(),i=this.options.responsive,s=-1,n=null;i?(t.each(i,function(t){t<=e&&t>s&&(s=Number(t))}),"function"==typeof(n=t.extend({},this.options,i[s])).stagePadding&&(n.stagePadding=n.stagePadding()),delete n.responsive,n.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+s))):n=t.extend({},this.options),this.trigger("change",{property:{name:"settings",value:n}}),this._breakpoint=s,this.settings=n,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},n.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},n.prototype.prepare=function(e){var i=this.trigger("prepare",{content:e});return i.data||(i.data=t("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(e)),this.trigger("prepared",{content:i.data}),i.data},n.prototype.update=function(){for(var e=0,i=this._pipe.length,s=t.proxy(function(t){return this[t]},this._invalidated),n={};e0)&&this._pipe[e].run(n),e++;this._invalidated={},!this.is("valid")&&this.enter("valid")},n.prototype.width=function(t){switch(t=t||n.Width.Default){case n.Width.Inner:case n.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},n.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},n.prototype.onThrottledResize=function(){e.clearTimeout(this.resizeTimer),this.resizeTimer=e.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},n.prototype.onResize=function(){return!!this._items.length&&this._width!==this.$element.width()&&!!this.$element.is(":visible")&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))},n.prototype.registerEventHandlers=function(){t.support.transition&&this.$stage.on(t.support.transition.end+".owl.core",t.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(e,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",t.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",t.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",t.proxy(this.onDragEnd,this)))},n.prototype.onDragStart=function(e){var s=null;3!==e.which&&(t.support.transform?s={x:(s=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","))[16===s.length?12:4],y:s[16===s.length?13:5]}:(s=this.$stage.position(),s={x:this.settings.rtl?s.left+this.$stage.width()-this.width()+this.settings.margin:s.left,y:s.top}),this.is("animating")&&(t.support.transform?this.animate(s.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===e.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=t(e.target),this._drag.stage.start=s,this._drag.stage.current=s,this._drag.pointer=this.pointer(e),t(i).on("mouseup.owl.core touchend.owl.core",t.proxy(this.onDragEnd,this)),t(i).one("mousemove.owl.core touchmove.owl.core",t.proxy(function(e){var s=this.difference(this._drag.pointer,this.pointer(e));t(i).on("mousemove.owl.core touchmove.owl.core",t.proxy(this.onDragMove,this)),Math.abs(s.x)0^this.settings.rtl?"left":"right";t(i).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==s.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(n.x,0!==s.x?a:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=a,(Math.abs(s.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},n.prototype.closest=function(e,i){var s=-1,n=this.width(),a=this.coordinates();return this.settings.freeDrag||t.each(a,t.proxy(function(t,o){return"left"===i&&e>o-30&&eo-n-30&&e",a[t+1]||o-n)&&(s="left"===i?t+1:t),-1===s},this)),this.settings.loop||(this.op(e,">",a[this.minimum()])?s=e=this.minimum():this.op(e,"<",a[this.maximum()])&&(s=e=this.maximum())),s},n.prototype.animate=function(e){var i=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),i&&(this.enter("animating"),this.trigger("translate")),t.support.transform3d&&t.support.transition?this.$stage.css({transform:"translate3d("+e+"px,0px,0px)",transition:this.speed()/1e3+"s"}):i?this.$stage.animate({left:e+"px"},this.speed(),this.settings.fallbackEasing,t.proxy(this.onTransitionEnd,this)):this.$stage.css({left:e+"px"})},n.prototype.is=function(t){return this._states.current[t]&&this._states.current[t]>0},n.prototype.current=function(t){if(t===s)return this._current;if(0===this._items.length)return s;if(t=this.normalize(t),this._current!==t){var e=this.trigger("change",{property:{name:"position",value:t}});e.data!==s&&(t=this.normalize(e.data)),this._current=t,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},n.prototype.invalidate=function(e){return"string"===t.type(e)&&(this._invalidated[e]=!0,this.is("valid")&&this.leave("valid")),t.map(this._invalidated,function(t,e){return e})},n.prototype.reset=function(t){(t=this.normalize(t))!==s&&(this._speed=0,this._current=t,this.suppress(["translate","translated"]),this.animate(this.coordinates(t)),this.release(["translate","translated"]))},n.prototype.normalize=function(t,e){var i=this._items.length,n=e?0:this._clones.length;return!this.isNumeric(t)||i<1?t=s:(t<0||t>=i+n)&&(t=((t-n/2)%i+i)%i+n/2),t},n.prototype.relative=function(t){return t-=this._clones.length/2,this.normalize(t,!0)},n.prototype.maximum=function(t){var e,i,s,n=this.settings,a=this._coordinates.length;if(n.loop)a=this._clones.length/2+this._items.length-1;else if(n.autoWidth||n.merge){for(e=this._items.length,i=this._items[--e].width(),s=this.$element.width();e--&&!((i+=this._items[e].width()+this.settings.margin)>s););a=e+1}else a=n.center?this._items.length-1:this._items.length-n.items;return t&&(a-=this._clones.length/2),Math.max(a,0)},n.prototype.minimum=function(t){return t?0:this._clones.length/2},n.prototype.items=function(t){return t===s?this._items.slice():(t=this.normalize(t,!0),this._items[t])},n.prototype.mergers=function(t){return t===s?this._mergers.slice():(t=this.normalize(t,!0),this._mergers[t])},n.prototype.clones=function(e){var i=this._clones.length/2,n=i+this._items.length,a=function(t){return t%2==0?n+t/2:i-(t+1)/2};return e===s?t.map(this._clones,function(t,e){return a(e)}):t.map(this._clones,function(t,i){return t===e?a(i):null})},n.prototype.speed=function(t){return t!==s&&(this._speed=t),this._speed},n.prototype.coordinates=function(e){var i,n=1,a=e-1;return e===s?t.map(this._coordinates,t.proxy(function(t,e){return this.coordinates(e)},this)):(this.settings.center?(this.settings.rtl&&(n=-1,a=e+1),i=this._coordinates[e],i+=(this.width()-i+(this._coordinates[a]||0))/2*n):i=this._coordinates[a]||0,i=Math.ceil(i))},n.prototype.duration=function(t,e,i){return 0===i?0:Math.min(Math.max(Math.abs(e-t),1),6)*Math.abs(i||this.settings.smartSpeed)},n.prototype.to=function(t,e){var i=this.current(),s=null,n=t-this.relative(i),a=(n>0)-(n<0),o=this._items.length,r=this.minimum(),l=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(n)>o/2&&(n+=-1*a*o),(s=(((t=i+n)-r)%o+o)%o+r)!==t&&s-n<=l&&s-n>0&&(i=s-n,t=s,this.reset(i))):this.settings.rewind?t=(t%(l+=1)+l)%l:t=Math.max(r,Math.min(l,t)),this.speed(this.duration(i,t,e)),this.current(t),this.$element.is(":visible")&&this.update()},n.prototype.next=function(t){t=t||!1,this.to(this.relative(this.current())+1,t)},n.prototype.prev=function(t){t=t||!1,this.to(this.relative(this.current())-1,t)},n.prototype.onTransitionEnd=function(t){if(t!==s&&(t.stopPropagation(),(t.target||t.srcElement||t.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},n.prototype.viewport=function(){var s;return this.options.responsiveBaseElement!==e?s=t(this.options.responsiveBaseElement).width():e.innerWidth?s=e.innerWidth:i.documentElement&&i.documentElement.clientWidth?s=i.documentElement.clientWidth:console.warn("Can not detect viewport width."),s},n.prototype.replace=function(e){this.$stage.empty(),this._items=[],e&&(e=e instanceof jQuery?e:t(e)),this.settings.nestedItemSelector&&(e=e.find("."+this.settings.nestedItemSelector)),e.filter(function(){return 1===this.nodeType}).each(t.proxy(function(t,e){e=this.prepare(e),this.$stage.append(e),this._items.push(e),this._mergers.push(1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},n.prototype.add=function(e,i){var n=this.relative(this._current);i=i===s?this._items.length:this.normalize(i,!0),e=e instanceof jQuery?e:t(e),this.trigger("add",{content:e,position:i}),e=this.prepare(e),0===this._items.length||i===this._items.length?(0===this._items.length&&this.$stage.append(e),0!==this._items.length&&this._items[i-1].after(e),this._items.push(e),this._mergers.push(1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[i].before(e),this._items.splice(i,0,e),this._mergers.splice(i,0,1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[n]&&this.reset(this._items[n].index()),this.invalidate("items"),this.trigger("added",{content:e,position:i})},n.prototype.remove=function(t){(t=this.normalize(t,!0))!==s&&(this.trigger("remove",{content:this._items[t],position:t}),this._items[t].remove(),this._items.splice(t,1),this._mergers.splice(t,1),this.invalidate("items"),this.trigger("removed",{content:null,position:t}))},n.prototype.preloadAutoWidthImages=function(e){e.each(t.proxy(function(e,i){this.enter("pre-loading"),i=t(i),t(new Image).one("load",t.proxy(function(t){i.attr("src",t.target.src),i.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",i.attr("src")||i.attr("data-src")||i.attr("data-src-retina"))},this))},n.prototype.destroy=function(){for(var s in this.$element.off(".owl.core"),this.$stage.off(".owl.core"),t(i).off(".owl.core"),!1!==this.settings.responsive&&(e.clearTimeout(this.resizeTimer),this.off(e,"resize",this._handlers.onThrottledResize)),this._plugins)this._plugins[s].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},n.prototype.op=function(t,e,i){var s=this.settings.rtl;switch(e){case"<":return s?t>i:t":return s?ti;case">=":return s?t<=i:t>=i;case"<=":return s?t>=i:t<=i}},n.prototype.on=function(t,e,i,s){t.addEventListener?t.addEventListener(e,i,s):t.attachEvent&&t.attachEvent("on"+e,i)},n.prototype.off=function(t,e,i,s){t.removeEventListener?t.removeEventListener(e,i,s):t.detachEvent&&t.detachEvent("on"+e,i)},n.prototype.trigger=function(e,i,s,a,o){var r={item:{count:this._items.length,index:this.current()}},l=t.camelCase(t.grep(["on",e,s],function(t){return t}).join("-").toLowerCase()),d=t.Event([e,"owl",s||"carousel"].join(".").toLowerCase(),t.extend({relatedTarget:this},r,i));return this._supress[e]||(t.each(this._plugins,function(t,e){e.onTrigger&&e.onTrigger(d)}),this.register({type:n.Type.Event,name:e}),this.$element.trigger(d),this.settings&&"function"==typeof this.settings[l]&&this.settings[l].call(this,d)),d},n.prototype.enter=function(e){t.each([e].concat(this._states.tags[e]||[]),t.proxy(function(t,e){this._states.current[e]===s&&(this._states.current[e]=0),this._states.current[e]++},this))},n.prototype.leave=function(e){t.each([e].concat(this._states.tags[e]||[]),t.proxy(function(t,e){this._states.current[e]--},this))},n.prototype.register=function(e){if(e.type===n.Type.Event){if(t.event.special[e.name]||(t.event.special[e.name]={}),!t.event.special[e.name].owl){var i=t.event.special[e.name]._default;t.event.special[e.name]._default=function(t){return!i||!i.apply||t.namespace&&-1!==t.namespace.indexOf("owl")?t.namespace&&t.namespace.indexOf("owl")>-1:i.apply(this,arguments)},t.event.special[e.name].owl=!0}}else e.type===n.Type.State&&(this._states.tags[e.name]?this._states.tags[e.name]=this._states.tags[e.name].concat(e.tags):this._states.tags[e.name]=e.tags,this._states.tags[e.name]=t.grep(this._states.tags[e.name],t.proxy(function(i,s){return t.inArray(i,this._states.tags[e.name])===s},this)))},n.prototype.suppress=function(e){t.each(e,t.proxy(function(t,e){this._supress[e]=!0},this))},n.prototype.release=function(e){t.each(e,t.proxy(function(t,e){delete this._supress[e]},this))},n.prototype.pointer=function(t){var i={x:null,y:null};return(t=(t=t.originalEvent||t||e.event).touches&&t.touches.length?t.touches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t).pageX?(i.x=t.pageX,i.y=t.pageY):(i.x=t.clientX,i.y=t.clientY),i},n.prototype.isNumeric=function(t){return!isNaN(parseFloat(t))},n.prototype.difference=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},t.fn.sbyOwlCarousel=function(e){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var s=t(this),a=s.data("owl.carousel");a||(a=new n(this,"object"==typeof e&&e),s.data("owl.carousel",a),t.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(e,i){a.register({type:n.Type.Event,name:i}),a.$element.on(i+".owl.carousel.core",t.proxy(function(t){t.namespace&&t.relatedTarget!==this&&(this.suppress([i]),a[i].apply(this,[].slice.call(arguments,1)),this.release([i]))},a))})),"string"==typeof e&&"_"!==e.charAt(0)&&a[e].apply(a,i)})},t.fn.sbyOwlCarousel.Constructor=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers)};n.Defaults={autoRefresh:!0,autoRefreshInterval:500},n.prototype.watch=function(){this._interval||(this._visible=this._core.$element.is(":visible"),this._interval=e.setInterval(t.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},n.prototype.refresh=function(){this._core.$element.is(":visible")!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("sby-owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},n.prototype.destroy=function(){var t,i;for(t in e.clearInterval(this._interval),this._handlers)this._core.$element.off(t,this._handlers[t]);for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},t.fn.sbyOwlCarousel.Constructor.Plugins.AutoRefresh=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":t.proxy(function(e){if(e.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(e.property&&"position"==e.property.name||"initialized"==e.type))for(var i=this._core.settings,s=i.center&&Math.ceil(i.items/2)||i.items,n=i.center&&-1*s||0,a=(e.property&&void 0!==e.property.value?e.property.value:this._core.current())+n,o=this._core.clones().length,r=t.proxy(function(t,e){this.load(e)},this);n++-1||(n.each(t.proxy(function(i,s){var n,a=t(s),o=e.devicePixelRatio>1&&a.attr("data-src-retina")||a.attr("data-src");this._core.trigger("load",{element:a,url:o},"lazy"),a.is("img")?a.one("load.owl.lazy",t.proxy(function(){a.css("opacity",1),this._core.trigger("loaded",{element:a,url:o},"lazy")},this)).attr("src",o):((n=new Image).onload=t.proxy(function(){a.css({"background-image":'url("'+o+'")',opacity:"1"}),this._core.trigger("loaded",{element:a,url:o},"lazy")},this),n.src=o)},this)),this._loaded.push(s.get(0)))},n.prototype.destroy=function(){var t,e;for(t in this.handlers)this._core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.sbyOwlCarousel.Constructor.Plugins.Lazy=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&"position"==t.property.name&&this.update()},this),"loaded.owl.lazy":t.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&t.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers)};n.Defaults={autoHeight:!1,autoHeightClass:"sby-owl-height"},n.prototype.update=function(){var e,i=this._core._current,s=i+this._core.settings.items,n=this._core.$stage.children().toArray().slice(i,s),a=[];t.each(n,function(e,i){a.push(t(i).height())}),e=Math.max.apply(null,a),this._core.$stage.parent().height(e).addClass(this._core.settings.autoHeightClass)},n.prototype.destroy=function(){var t,e;for(t in this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.sbyOwlCarousel.Constructor.Plugins.AutoHeight=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":t.proxy(function(t){t.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.video&&this.isInFullScreen()&&t.preventDefault()},this),"refreshed.owl.carousel":t.proxy(function(t){t.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .sby-owl-video-frame").remove()},this),"changed.owl.carousel":t.proxy(function(t){t.namespace&&"position"===t.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":t.proxy(function(e){if(e.namespace){var i=t(e.content).find(".sby-owl-video");i.length&&(i.css("display","none"),this.fetch(i,t(e.content)))}},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".sby-owl-video-play-icon",t.proxy(function(t){this.play(t)},this))};n.Defaults={video:!1,videoHeight:!1,videoWidth:!1},n.prototype.fetch=function(t,e){var i=t.attr("data-vimeo-id")?"vimeo":t.attr("data-vzaar-id")?"vzaar":"youtube",s=t.attr("data-vimeo-id")||t.attr("data-youtube-id")||t.attr("data-vzaar-id"),n=t.attr("data-width")||this._core.settings.videoWidth,a=t.attr("data-height")||this._core.settings.videoHeight,o=t.attr("href");if(!o)throw new Error("Missing video URL.");if((s=o.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/))[3].indexOf("youtu")>-1)i="youtube";else if(s[3].indexOf("vimeo")>-1)i="vimeo";else{if(!(s[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");i="vzaar"}s=s[6],this._videos[o]={type:i,id:s,width:n,height:a},e.attr("data-video",o),this.thumbnail(t,this._videos[o])},n.prototype.thumbnail=function(e,i){var s,n,a=i.width&&i.height?'style="width:'+i.width+"px;height:"+i.height+'px;"':"",o=e.find("img"),r="src",l="",d=this._core.settings,h=function(t){'
',s=d.lazyLoad?'
':'
',e.after(s),e.after('
')};if(e.wrap('
"),this._core.settings.lazyLoad&&(r="data-src",l="sby-owl-lazy"),o.length)return h(o.attr(r)),o.remove(),!1;"youtube"===i.type?(n="//img.youtube.com/vi/"+i.id+"/hqdefault.jpg",h(n)):"vimeo"===i.type?t.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+i.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t[0].thumbnail_large,h(n)}}):"vzaar"===i.type&&t.ajax({type:"GET",url:"//vzaar.com/api/videos/"+i.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t.framegrab_url,h(n)}})},n.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".sby-owl-video-frame").remove(),this._playing.removeClass("sby-owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},n.prototype.play=function(e){var i,s=t(e.target).closest("."+this._core.settings.itemClass),n=this._videos[s.attr("data-video")],a=n.width||"100%",o=n.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),s=this._core.items(this._core.relative(s.index())),this._core.reset(s.index()),"youtube"===n.type?i='':"vimeo"===n.type?i='':"vzaar"===n.type&&(i=''),t('
'+i+"
").insertAfter(s.find(".sby-owl-video")),this._playing=s.addClass("sby-owl-video-playing"))},n.prototype.isInFullScreen=function(){var e=i.fullscreenElement||i.mozFullScreenElement||i.webkitFullscreenElement;return e&&t(e).parent().hasClass("sby-owl-video-frame")},n.prototype.destroy=function(){var t,e;for(t in this._core.$element.off("click.owl.video"),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.sbyOwlCarousel.Constructor.Plugins.Video=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(e){this.core=e,this.core.options=t.extend({},n.Defaults,this.core.options),this.swapping=!0,this.previous=s,this.next=s,this.handlers={"change.owl.carousel":t.proxy(function(t){t.namespace&&"position"==t.property.name&&(this.previous=this.core.current(),this.next=t.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":t.proxy(function(t){t.namespace&&(this.swapping="translated"==t.type)},this),"translate.owl.carousel":t.proxy(function(t){t.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};n.Defaults={animateOut:!1,animateIn:!1},n.prototype.swap=function(){if(1===this.core.settings.items&&t.support.animation&&t.support.transition){this.core.speed(0);var e,i=t.proxy(this.clear,this),s=this.core.$stage.children().eq(this.previous),n=this.core.$stage.children().eq(this.next),a=this.core.settings.animateIn,o=this.core.settings.animateOut;this.core.current()!==this.previous&&(o&&(e=this.core.coordinates(this.previous)-this.core.coordinates(this.next),s.one(t.support.animation.end,i).css({left:e+"px"}).addClass("animated sby-owl-animated-out").addClass(o)),a&&n.one(t.support.animation.end,i).addClass("animated sby-owl-animated-in").addClass(a))}},n.prototype.clear=function(e){t(e.target).css({left:""}).removeClass("animated sby-owl-animated-out sby-owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},n.prototype.destroy=function(){var t,e;for(t in this.handlers)this.core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.sbyOwlCarousel.Constructor.Plugins.Animate=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._timeout=null,this._paused=!1,this._handlers={"changed.owl.carousel":t.proxy(function(t){t.namespace&&"settings"===t.property.name?this._core.settings.autoplay?this.play():this.stop():t.namespace&&"position"===t.property.name&&this._core.settings.autoplay&&this._setAutoPlayInterval()},this),"initialized.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":t.proxy(function(t,e,i){t.namespace&&this.play(e,i)},this),"stop.owl.autoplay":t.proxy(function(t){t.namespace&&this.stop()},this),"mouseover.owl.autoplay":t.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":t.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":t.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":t.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=t.extend({},n.Defaults,this._core.options)};n.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},n.prototype.play=function(t,e){this._paused=!1,this._core.is("rotating")||(this._core.enter("rotating"),this._setAutoPlayInterval())},n.prototype._getNextTimeout=function(s,n){return this._timeout&&e.clearTimeout(this._timeout),e.setTimeout(t.proxy(function(){this._paused||this._core.is("busy")||this._core.is("interacting")||i.hidden||this._core.next(n||this._core.settings.autoplaySpeed)},this),s||this._core.settings.autoplayTimeout)},n.prototype._setAutoPlayInterval=function(){this._timeout=this._getNextTimeout()},n.prototype.stop=function(){this._core.is("rotating")&&(e.clearTimeout(this._timeout),this._core.leave("rotating"))},n.prototype.pause=function(){this._core.is("rotating")&&(this._paused=!0)},n.prototype.destroy=function(){var t,e;for(t in this.stop(),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.sbyOwlCarousel.Constructor.Plugins.autoplay=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){"use strict";var n=function(e){this._core=e,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":t.proxy(function(e){e.namespace&&this._core.settings.dotsData&&this._templates.push('
'+t(e.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"
")},this),"added.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,0,this._templates.pop())},this),"remove.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,1)},this),"changed.owl.carousel":t.proxy(function(t){t.namespace&&"position"==t.property.name&&this.draw()},this),"initialized.owl.carousel":t.proxy(function(t){t.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":t.proxy(function(t){t.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this.$element.on(this._handlers)};n.Defaults={nav:!1,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"sby-owl-nav",navClass:["sby-owl-prev","sby-owl-next"],slideBy:1,dotClass:"sby-owl-dot",dotsClass:"sby-owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},n.prototype.initialize=function(){var e,i=this._core.settings;for(e in this._controls.$relative=(i.navContainer?t(i.navContainer):t("
").addClass(i.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=t("<"+i.navElement+">").addClass(i.navClass[0]).html(i.navText[0]).prependTo(this._controls.$relative).on("click",t.proxy(function(t){this.prev(i.navSpeed)},this)),this._controls.$next=t("<"+i.navElement+">").addClass(i.navClass[1]).html(i.navText[1]).appendTo(this._controls.$relative).on("click",t.proxy(function(t){this.next(i.navSpeed)},this)),i.dotsData||(this._templates=[t("
").addClass(i.dotClass).append(t("")).prop("outerHTML")]),this._controls.$absolute=(i.dotsContainer?t(i.dotsContainer):t("
").addClass(i.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","div",t.proxy(function(e){var s=t(e.target).parent().is(this._controls.$absolute)?t(e.target).index():t(e.target).parent().index();e.preventDefault(),this.to(s,i.dotsSpeed)},this)),this._overrides)this._core[e]=t.proxy(this[e],this)},n.prototype.destroy=function(){var t,e,i,s;for(t in this._handlers)this.$element.off(t,this._handlers[t]);for(e in this._controls)this._controls[e].remove();for(s in this.overides)this._core[s]=this._overrides[s];for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},n.prototype.update=function(){var t,e,i=this._core.clones().length/2,s=i+this._core.items().length,n=this._core.maximum(!0),a=this._core.settings,o=a.center||a.autoWidth||a.dotsData?1:a.dotsEach||a.items;if("page"!==a.slideBy&&(a.slideBy=Math.min(a.slideBy,a.items)),a.dots||"page"==a.slideBy)for(this._pages=[],t=i,e=0,0;t=o||0===e){if(this._pages.push({start:Math.min(n,t-i),end:t-i+o-1}),Math.min(n,t-i)===n)break;e=0,0}e+=this._core.mergers(this._core.relative(t))}},n.prototype.draw=function(){var e,i=this._core.settings,s=this._core.items().length<=i.items,n=this._core.relative(this._core.current()),a=i.loop||i.rewind;this._controls.$relative.toggleClass("disabled",!i.nav||s),i.nav&&(this._controls.$previous.toggleClass("disabled",!a&&n<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!a&&n>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!i.dots||s),i.dots&&(e=this._pages.length-this._controls.$absolute.children().length,i.dotsData&&0!==e?this._controls.$absolute.html(this._templates.join("")):e>0?this._controls.$absolute.append(new Array(e+1).join(this._templates[0])):e<0&&this._controls.$absolute.children().slice(e).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(t.inArray(this.current(),this._pages)).addClass("active"))},n.prototype.onTrigger=function(e){var i=this._core.settings;e.page={index:t.inArray(this.current(),this._pages),count:this._pages.length,size:i&&(i.center||i.autoWidth||i.dotsData?1:i.dotsEach||i.items)}},n.prototype.current=function(){var e=this._core.relative(this._core.current());return t.grep(this._pages,t.proxy(function(t,i){return t.start<=e&&t.end>=e},this)).pop()},n.prototype.getPosition=function(e){var i,s,n=this._core.settings;return"page"==n.slideBy?(i=t.inArray(this.current(),this._pages),s=this._pages.length,e?++i:--i,i=this._pages[(i%s+s)%s].start):(i=this._core.relative(this._core.current()),s=this._core.items().length,e?i+=n.slideBy:i-=n.slideBy),i},n.prototype.next=function(e){t.proxy(this._overrides.to,this._core)(this.getPosition(!0),e)},n.prototype.prev=function(e){t.proxy(this._overrides.to,this._core)(this.getPosition(!1),e)},n.prototype.to=function(e,i,s){var n;!s&&this._pages.length?(n=this._pages.length,t.proxy(this._overrides.to,this._core)(this._pages[(e%n+n)%n].start,i)):t.proxy(this._overrides.to,this._core)(e,i)},t.fn.sbyOwlCarousel.Constructor.Plugins.Navigation=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){"use strict";var n=function(i){this._core=i,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":t.proxy(function(i){i.namespace&&"URLHash"===this._core.settings.startPosition&&t(e).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":t.proxy(function(e){if(e.namespace){var i=t(e.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!i)return;this._hashes[i]=e.content}},this),"changed.owl.carousel":t.proxy(function(i){if(i.namespace&&"position"===i.property.name){var s=this._core.items(this._core.relative(this._core.current())),n=t.map(this._hashes,function(t,e){return t===s?e:null}).join();if(!n||e.location.hash.slice(1)===n)return;e.location.hash=n}},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this.$element.on(this._handlers),t(e).on("hashchange.owl.navigation",t.proxy(function(t){var i=e.location.hash.substring(1),s=this._core.$stage.children(),n=this._hashes[i]&&s.index(this._hashes[i]);void 0!==n&&n!==this._core.current()&&this._core.to(this._core.relative(n),!1,!0)},this))};n.Defaults={URLhashListener:!1},n.prototype.destroy=function(){var i,s;for(i in t(e).off("hashchange.owl.navigation"),this._handlers)this._core.$element.off(i,this._handlers[i]);for(s in Object.getOwnPropertyNames(this))"function"!=typeof this[s]&&(this[s]=null)},t.fn.sbyOwlCarousel.Constructor.Plugins.Hash=n}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){function n(e,i){var n=!1,a=e.charAt(0).toUpperCase()+e.slice(1);return t.each((e+" "+r.join(a+" ")+a).split(" "),function(t,e){if(o[e]!==s)return n=!i||e,!1}),n}function a(t){return n(t,!0)}var o=t("").get(0).style,r="Webkit Moz O ms".split(" "),l={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},d=function(){return!!n("transform")},h=function(){return!!n("perspective")},c=function(){return!!n("animation")};(function(){return!!n("transition")})()&&(t.support.transition=new String(a("transition")),t.support.transition.end=l.transition.end[t.support.transition]),c()&&(t.support.animation=new String(a("animation")),t.support.animation.end=l.animation.end[t.support.animation]),d()&&(t.support.transform=new String(a("transform")),t.support.transform3d=h())}(window.Zepto||window.jQuery,window,document),function(t,e,i,s){Owl2row=function(e){this.owl=e,this.owl.options=t.extend({},Owl2row.Defaults,this.owl.options),this.handlers={"initialize.owl.carousel":t.proxy(function(t){this.owl.settings.owl2row&&this.build2row(this)},this)},this.owl.$element.on(this.handlers)},Owl2row.Defaults={owl2row:!1,owl2rowTarget:"sby_item",owl2rowContainer:"sby_owl2row-item",owl2rowDirection:"utd"},Owl2row.prototype.build2row=function(e){var i=t(e.owl.$element),s=i.find("."+e.owl.options.owl2rowTarget),n=[],a=[];switch(t.each(s,function(t,e){t%2==0?n.push(e):a.push(e)}),e.owl.options.owl2rowDirection){case"ltr":e.leftToright(e,i,s);break;default:e.upTodown(e,n,a,i)}},Owl2row.prototype.leftToright=function(e,i,s){var n=e.owl.options.owl2rowContainer,a=e.owl.options.margin,o=s.length,r=[],l=[];o%2==1?o=(o-1)/2+1:o/=2,t.each(s,function(t,e){t'),d=r[e];d.style.marginBottom=a+"px",o.append(d).append(l[e]),i.append(o)})},Owl2row.prototype.upTodown=function(e,i,s,n){var a=e.owl.options.owl2rowContainer,o=e.owl.options.margin;t.each(i,function(e,r){var l=t('
'),d=i[e];d.style.marginBottom=o+"px",l.append(d).append(s[e]),n.append(l)})},Owl2row.prototype.destroy=function(){},t.fn.sbyOwlCarousel.Constructor.Plugins.owl2row=Owl2row}(window.Zepto||window.jQuery,window,document),function(t){function e(){this.feeds={},this.ctas={},this.options=sbyOptions,this.isTouch=function(){if("ontouchstart"in document.documentElement)return!0;return!1}()}function i(t,e,i){this.el=t,this.index=e,this.settings=i,this.placeholderURL=window.sby.options.placeholder,i.narrowPlayer&&(this.placeholderURL=window.sby.options.placeholderNarrow),this.playerAPIReady=!1,this.consentGiven=i.consentGiven,this.players={},this.minImageWidth=0,this.imageResolution=150,this.resizedImages={},this.needsResizing=[],this.outOfPages=!1,this.isInitialized=!1,this.mostRecentlyLoadedPosts=[]}function s(e,s,n){i.call(this,e,s,n),this.CTA={},this.initLayout=function(){this.initGalleryLayout(),this.initGrid(),this.initCarousels();var t=jQuery.Event("sbyafterlayoutinit");t.feed=this,jQuery(window).trigger(t)},this.initGrid=function(){if(window.sbySemiEagerLoading&&jQuery("#sby_lightbox").length){var e=this;playerID="sby_lb-player",jQuery("#sby_lightbox").addClass("sby_video_lightbox");var i=t(this.el).find("sby_item").first().attr("data-video-id"),s=sbyOptions.autoplay;if(void 0===window.sbyLightboxPlayer){var n={host:window.location.protocol+"//www.youtube-nocookie.com",videoId:i,playerVars:{modestbranding:1,rel:0,autoplay:s},events:{onStateChange:function(i){var s=i.target.getVideoData().video_id;e.afterStateChange(playerID,s,i,t("#"+playerID).closest(".sby_video_thumbnail_wrap"))}}};e.maybeAddCTA(playerID),window.sbyLightboxPlayer=new window.YT.Player(playerID,n)}}},this.initCarousels=function(){var e=this,i=t(this.el);if(void 0!==this.settings.general.carousel){var s=this.settings.cols,n=this.settings.colsmobile;i.find(".sby_items_wrap").addClass("sby_carousel"),i.find(".sby_load_btn").remove(),i.find(".sby_item").css({"padding-top":i.find(".sby_items_wrap").css("padding-top"),"padding-right":i.find(".sby_items_wrap").css("padding-top"),"padding-bottom":i.find(".sby_items_wrap").css("padding-top"),"padding-left":i.find(".sby_items_wrap").css("padding-top")}),i.find(".sby_item").each(function(){t(this).attr("style",t(this).attr("style").replace("padding: "+i.find(".sby_items_wrap").css("padding-top"),"padding: "+i.find(".sby_items_wrap").css("padding-top")+" !important"))});var a=e.settings.general.carousel[0],o=e.settings.general.carousel[1],r=e.settings.general.carousel[2],l=e.settings.general.carousel[3],d=e.settings.general.carousel[4],h=e.settings.general.carousel[5];r||(l=!1);var c=s,u=s,y=(a=a?"onhover":"hide",r=!1!==l,2==h);d=!d;i.hasClass("sby_mob_col_auto")?(c=2,2!=parseInt(s)&&(u=1),2==parseInt(s)&&(u=2)):u=n,this.carouselArgs={items:s,loop:d,rewind:!d,autoplay:r,autoplayTimeout:Math.max(l,2e3),autoplayHoverPause:!0,nav:!0,navText:['',''],dots:o,owl2row:y,responsive:{0:{items:u},480:{items:c},640:{items:s}},onChange:function(){setTimeout(function(){e.afterResize()},250)},onInitialize:function(){var t=jQuery(e.el);t.find(".sby_items_wrap.sby_carousel").fadeIn(),setTimeout(function(){t.find(".sby_items_wrap.sby_carousel .sby_info, .sby_owl2row-item,.sby_items_wrap.sby_carousel").fadeIn()},50),setTimeout(function(){var e=t.find(".sby-owl-nav");if("onhover"===a);else if("below"===a){var i=t.find(".sby-owl-dots"),s=t.find(".sby-owl-prev"),n=t.find(".sby-owl-next"),o=t.find(".sby-owl-nav"),r=t.find(".sby-owl-dot"),l=r.length*r.innerWidth();t.innerWidth(),s.after(i),o.css("position","relative"),n.css("position","absolute").css("top","-6px").css("right",Math.max(.5*o.innerWidth()-.5*l-n.innerWidth()-6,0)),s.css("position","absolute").css("top","-6px").css("left",Math.max(.5*o.innerWidth()-.5*l-s.innerWidth()-6,0))}else"hide"===a&&e.addClass("hide").hide()},100)}}}},this.stripEmojihtml=function(e){return e.find(".emoji").each(function(){t(this).replaceWith(t(this).attr("alt"))}),e.html()},this.afterItemRevealed=function(t){var e=this;if(t.find(".sby_caption").length&&!t.find(".sby_caption").hasClass("sby_full_caption")){var i=t.find(".sby_item_caption_wrap .sby_caption"),s=t.find(".sby_item_video_thumbnail .sby_caption"),n=void 0!==e.settings.general.descriptionlength?parseInt(e.settings.general.descriptionlength):150;n<1&&(n=99999);var a=this.stripEmojihtml(t.find(".sby_caption").first()),o=(a.match(/
/g)||[]).length;if((void 0===sbyOptions.brAdjust||"1"===sbyOptions.brAdjust||!0===sbyOptions.brAdjust)&&o>0&&a.indexOf("
")20?r.width():t.width(),fontSize=r.css("font-size"),charactersPerLine=captionWidth/parseInt(fontSize)*1.85,maxCharsPerLine=Math.floor(charactersPerLine),projectedMaxLines=Math.ceil(n/charactersPerLine);var l=a.split("
"),d=0,h=0;jQuery.each(l,function(){var t=projectedMaxLines-d;if(t>0){var e=Math.max(1,Math.ceil(this.length/charactersPerLine));h+=Math.min(this.length+4,t*maxCharsPerLine),d+=e}}),n=h}var c=a.substring(0,n);if(c=c.substr(0,Math.min(c.length,c.lastIndexOf(" "))),i.length&&(i.html(sbyLinkify(c)),c===a&&i.next(".sby_expand").remove()),s.length){var u=c;c!==a&&(u+='...'),s.html(u)}a.length>n&&t.find(".sby_expand").show(),t.find(".sby_expand a").off("click").on("click",function(s){s.preventDefault();jQuery(this);i=void 0!==i?i:t.find(".sby_info .sby_caption"),a="undefined"!=typeof captiontext?a:t.find(".sby_item_video_thumbnail").attr("data-title"),t.hasClass("sby_caption_full")&&void 0!==c?(i.html(c),t.removeClass("sby_caption_full")):(i.html(sbyLinkify(a)),t.addClass("sby_caption_full")),e.afterResize()})}this.setUpCTA(t);var y=void 0!==e.settings.general.disablelightbox&&e.settings.general.disablelightbox,g=void 0!==e.settings.general.captionlinks&&e.settings.general.captionlinks;if(y||g){if(g){var p="";void 0!==t.find("img").attr("alt")?p=t.find("img").attr("alt"):void 0!==t.find("video").attr("alt")&&(p=t.find("video").attr("alt"));var b=p.match(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/g);b&&t.find("a").attr("href",b)}t.find(".sby_link").addClass("sby_disable_lightbox")}else{var f=t.find(".sby_photo_wrap"),m=f.find(".sby_link");feedOptions={hovereffect:"true"},"none"==feedOptions.hovereffect?(m.css("background","none").show(),m.find("*").hide().end().find(".sby_link_area").show()):f.on("mouseenter mouseleave",function(e){switch(e.type){case"mouseenter":t.addClass("sby_animate");break;case"mouseleave":t.removeClass("sby_animate")}})}var _=void 0!==t.attr("data-video-id")?t.attr("data-video-id"):t.find(".sby_video_thumbnail").attr("data-video-id");this.mostRecentlyLoadedPosts.push(_)},this.afterFeedSet=function(){void 0!==this.carouselArgs&&(t(this.el).find(".sby_carousel").sbyOwlCarousel(this.carouselArgs),2===parseInt(this.settings.general.carousel[5])&&t(this.el).addClass("sby_carousel_2_row"))},this.setUpCTA=function(t,e){e=void 0!==e?e:t.find(".sby_item_video_thumbnail").attr("data-video-id");var i=void 0!==t.find(".sby_item_video_thumbnail").attr("data-title")?t.find(".sby_item_video_thumbnail").attr("data-title"):"",s=window.sby.ctaDetect(i);window.sby.ctas[e]=s||this.getDefaultCTA()},this.getDefaultCTA=function(){return void 0!==this.settings.general.cta&&"default"!==this.settings.general.cta.type&&("link"===this.settings.general.cta.type?{callback:"link",url:this.settings.general.cta.defaultLink,text:this.settings.general.cta.defaultText}:{callback:"related",related:this.settings.general.cta.defaultPosts})},this.afterResize=function(){this.setImageHeight(),this.setImageResolution(),this.maybeRaiseImageResolution(),this.setImageSizeClass(),this.setAllCTADimensions(),this.sizePlayer(),this.sizeItems()},this.setAllCTADimensions=function(){t.each(this.CTA,function(t,e){e.isInitialized&&e.setCTAStyles()})},this.afterSendCheckWPPostsToServer=function(e){var i=t(this.el);i.find(".sby_item").each(function(){if(void 0!==e[t(this).attr("data-video-id")]){var i=e[t(this).attr("data-video-id")];t(this).find(".sby_view_count").text(i.sby_view_count),t(this).find(".sby_comment_count").text(i.sby_comment_count),t(this).find(".sby_like_count").text(i.sby_like_count),"none"!==i.sby_live_broadcast.broadcast_type&&(t(this).find(".sby_ls_message").text(i.sby_live_broadcast.live_streaming_string),t(this).find(".sby_date").html(i.sby_live_broadcast.live_streaming_date)),void 0!==i.sby_live_broadcast.live_streaming_timestamp&&t(this).attr("data-live-date",i.sby_live_broadcast.live_streaming_timestamp),void 0!==i.sby_description&&t(this).find(".sby_item_video_thumbnail").attr("data-title",i.sby_description)}}),i.find(".sby_player_item").each(function(){if(void 0!==e[t(this).find(".sby_video_thumbnail").attr("data-video-id")]){var i=e[t(this).find(".sby_video_thumbnail").attr("data-video-id")];t(this).find(".sby_view_count").text(i.sby_view_count),t(this).find(".sby_comment_count").text(i.sby_comment_count),t(this).find(".sby_like_count").text(i.sby_like_count),"none"!==i.sby_live_broadcast.broadcast_type&&(t(this).find(".sby_ls_message").text(i.sby_live_broadcast.live_streaming_string),t(this).find(".sby_date").html(i.sby_live_broadcast.live_streaming_date)),void 0!==i.sby_live_broadcast.live_streaming_timestamp&&t(this).attr("data-live-date",i.sby_live_broadcast.live_streaming_timestamp)}});var n=jQuery.Event("sbyaftercheckposts");n.feed=window.sby.feeds[s],n.response=e,jQuery(window).trigger(n)},this.afterStateChange=function(t,e,i,s){this.CTA[t].toggleCTA(e,i.data,s)},this.changePlayerInfo=function(e){t(this.el).find(".sby_player_item").find(".sby_info").replaceWith(e.find(".sby_info").clone(!0,!0))},this.maybeAddCTA=function(t,e){void 0===this.CTA[t]&&(this.CTA[t]=new o(t,this))}}function n(){}function a(){n.call(this),this.getData=function(t){return{feedIndex:parseInt(t.closest(".sb_youtube").attr("data-sby-index")-1),link:t.attr("href"),video:t.attr("data-video-id"),title:t.attr("data-title"),videoTitle:void 0!==t.attr("data-video-title")?t.attr("data-video-title"):"YouTube Video",avatar:t.attr("data-avatar"),user:t.attr("data-user"),channelURL:t.attr("data-url")}},this.template=function(){return"
"},this.beforePlayerSetup=function(e,i,s,n,a){e.find(".sby_cta_items_wraps").length?e.find(".sby_cta_items_wraps").replaceWith(t(a.el).find(".sby_cta_items_wraps").clone()):e.find(".sby_lb_video_thumbnail_wrap").append(t(a.el).find(".sby_cta_items_wraps").clone())},this.afterPlayerSetup=function(t,e,i,s){this.availableAvatarUrls={};var n=e.title;void 0!==n&&""!==n&&(n=n.replace(/(>#)/g,"> #")),n=n?sbyLinkify(n):"","function"==typeof sbyLightboxAction&&setTimeout(function(){sbyLightboxAction()},100);var a="",o="";void 0!==e.avatar&&""!==e.avatar&&void 0!==e.user?(a="undefined"!==e.avatar?'':"",o=''+a+"

@"+e.user+"

"):void 0!==e.user&&jQuery.each(window.sby.feeds,function(){void 0!==this.availableAvatarUrls&&void 0!==this.availableAvatarUrls[e.user]&&"undefined"!==this.availableAvatarUrls[e.user]&&(a='')}),t.find(".sby_lb-caption").html(o+''+n+"").fadeIn("fast")}}function o(t,e){this.isInitialized=!1,this.videoID=t,this.callback=this.related,this.callbackArgs={},this.feedObjInContext=e,this.state=1,this.numItems=4,this.numItemColumns=2,this.$player=!1}function r(e,i){t.ajax({url:sbyOptions.adminAjaxUrl,type:"post",data:e,success:i})}e.prototype={createPage:function(e,i){void 0!==window.sbyajaxurl&&-1!==window.sbyajaxurl.indexOf(window.location.hostname)||(window.sbyajaxurl=window.location.hostname+"/wp-admin/admin-ajax.php"),t(".sby_no_js_error_message").remove(),t(".sby_no_js").removeClass("sby_no_js"),e(i)},maybeAddYTAPI:function(){if(null===document.getElementById("sby-youtube-api")){var t=document.createElement("script"),e=document.getElementsByTagName("script")[0];t.src="https://www.youtube.com/iframe_api",t.id="sby-youtube-api",e.parentNode.insertBefore(t,e)}},createLightbox:function(){var e,i=new a,s=(e=0,function(t,i){clearTimeout(e),e=setTimeout(t,i)});jQuery(window).on("resize",function(){s(function(){i.afterResize()},200)}),function(){var e=jQuery,s=function(){function t(){this.fadeDuration=500,this.fitImagesInViewport=!0,this.resizeDuration=700,this.positionFromTop=50,this.showImageNumberLabel=!0,this.alwaysShowNavOnTouchDevices=!1,this.wrapAround=!1}return t.prototype.albumLabel=function(t,e){return t+" / "+e},t}(),n=function(){function s(t){this.options=t,this.album=[],this.currentImageIndex=void 0,this.init()}return s.prototype.init=function(){this.enable(),this.build()},s.prototype.enable=function(){var t=this;e("body").on("click","a[data-sby-lightbox]",function(i){return t.start(e(i.currentTarget)),!1})},s.prototype.build=function(){var t=this;e(""+i.template()).appendTo(e("body")),this.$lightbox=e("#sby_lightbox"),this.$overlay=e("#sby_lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".sby_lb-outerContainer"),this.$container=this.$lightbox.find(".sby_lb-container"),this.containerTopPadding=parseInt(this.$container.css("padding-top"),10),this.containerRightPadding=parseInt(this.$container.css("padding-right"),10),this.containerBottomPadding=parseInt(this.$container.css("padding-bottom"),10),this.containerLeftPadding=parseInt(this.$container.css("padding-left"),10),this.$overlay.hide().on("click",function(){return t.end(),!1}),jQuery(document).on("click",function(t,e,s){jQuery(t.target).closest(".sby_lb-outerContainer").length||jQuery(t.target).closest(".sby_lb-dataContainer").length||(i.pausePlayer(),jQuery("#sby_lightboxOverlay, #sby_lightbox").fadeOut())}),this.$lightbox.hide(),jQuery("#sby_lightboxOverlay").on("click",function(s){return i.pausePlayer(),"sby_lightbox"===e(s.target).attr("id")&&t.end(),!1}),this.$lightbox.find(".sby_lb-prev").on("click",function(){return i.pausePlayer(),t.changeImage(0===t.currentImageIndex?t.album.length-1:t.currentImageIndex-1),!1}),this.$lightbox.find(".sby_lb-container").on("swiperight",function(){return i.pausePlayer(),t.changeImage(0===t.currentImageIndex?t.album.length-1:t.currentImageIndex-1),!1}),this.$lightbox.find(".sby_lb-next").on("click",function(){return i.pausePlayer(),t.changeImage(t.currentImageIndex===t.album.length-1?0:t.currentImageIndex+1),!1}),this.$lightbox.find(".sby_lb-container").on("swipeleft",function(){return i.pausePlayer(),t.changeImage(t.currentImageIndex===t.album.length-1?0:t.currentImageIndex+1),!1}),this.$lightbox.find(".sby_lb-loader, .sby_lb-close").on("click",function(){return i.pausePlayer(),t.end(),!1})},s.prototype.start=function(t){function s(t){n.album.push(i.getData(t))}var n=this,a=e(window);a.on("resize",e.proxy(this.sizeOverlay,this)),e("select, object, embed").css({visibility:"hidden"}),this.sizeOverlay(),this.album=[];var o,r=0,l=t.attr("data-sby-lightbox");if(l){o=e(t.prop("tagName")+'[data-sby-lightbox="'+l+'"]');for(var d=0;dl||n.height>r)&&(n.width/l>n.height/r?(o=l,a=parseInt(n.height/(n.width/o),10),s.width(o),s.height(a)):(a=r,o=parseInt(n.width/(n.height/a),10),s.width(o),s.height(a)))),i.sizeContainer(s.width(),s.height())},n.src=this.album[t].link,this.currentImageIndex=t},s.prototype.sizeOverlay=function(){this.$overlay.width(e(window).width()).height(e(document).height())},s.prototype.sizeContainer=function(t,e){function i(){s.$lightbox.find(".sby_lb-dataContainer").width(o),s.$lightbox.find(".sby_lb-prevLink").height(r),s.$lightbox.find(".sby_lb-nextLink").height(r),s.showImage()}var s=this,n=this.$outerContainer.outerWidth(),a=this.$outerContainer.outerHeight(),o=t+this.containerLeftPadding+this.containerRightPadding,r=e+this.containerTopPadding+this.containerBottomPadding;n!==o||a!==r?this.$outerContainer.animate({width:o,height:r},this.options.resizeDuration,"swing",function(){i()}):i()},s.prototype.showImage=function(){this.$lightbox.find(".sby_lb-loader").hide(),this.$lightbox.find(".sby_lb-image").fadeIn("slow"),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},s.prototype.updateNav=function(){var t=!1;try{document.createEvent("TouchEvent"),t=!!this.options.alwaysShowNavOnTouchDevices}catch(t){}this.$lightbox.find(".sby_lb-nav").show(),this.album.length>1&&(this.options.wrapAround?(t&&this.$lightbox.find(".sby_lb-prev, .sby_lb-next").css("opacity","1"),this.$lightbox.find(".sby_lb-prev, .sby_lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".sby_lb-prev").show(),t&&this.$lightbox.find(".sby_lb-prev").css("opacity","1")),this.currentImageIndex')}i.afterPlayerSetup(this.$lightbox,this.album[this.currentImageIndex],this.currentImageIndex,this.album),this.album.length>1&&this.options.showImageNumberLabel?this.$lightbox.find(".sby_lb-number").text(this.options.albumLabel(this.currentImageIndex+1,this.album.length)).fadeIn("fast"):this.$lightbox.find(".sby_lb-number").hide()}},s.prototype.preloadNeighboringImages=function(){this.album.length>this.currentImageIndex+1&&((new Image).src=this.album[this.currentImageIndex+1].link);this.currentImageIndex>0&&((new Image).src=this.album[this.currentImageIndex-1].link)},s.prototype.enableKeyboardNav=function(){e(document).on("keyup.keyboard",e.proxy(this.keyboardAction,this))},s.prototype.disableKeyboardNav=function(){e(document).off(".keyboard")},s.prototype.keyboardAction=function(e){var s=event.keyCode,n=String.fromCharCode(s).toLowerCase();27===s||n.match(/x|o|c/)?(sby_supports_video()&&t("#sby_lightbox video.sby_video")[0].pause(),t("#sby_lightbox iframe").attr("src",""),this.end()):"p"===n||37===s?(0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this.changeImage(this.album.length-1),sby_supports_video()&&t("#sby_lightbox video.sby_video")[0].pause(),t("#sby_lightbox iframe").attr("src","")):"n"!==n&&39!==s||(this.currentImageIndex!==this.album.length-1?this.changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this.changeImage(0),i.pausePlayer())},s.prototype.end=function(){this.disableKeyboardNav(),e(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),e("select, object, embed").css({visibility:"visible"})},s}();e(function(){var e=new s;new n(e),t(".sby_lightbox_action a").off().on("click",function(){t(this).parent().find(".sby_lightbox_tooltip").toggle()})})}.call(this)},createFeeds:function(e){window.sby.createLightbox(),e.whenFeedsCreated(t(".sb_youtube").each(function(e){t(this).attr("data-sby-index",e+1),t(this).find(".sby_player").replaceWith('
');var i=t(this),n=void 0!==i.attr("data-sby-flags")?i.attr("data-sby-flags").split(","):[],a=void 0!==i.attr("data-options")?JSON.parse(i.attr("data-options")):{};if(n.indexOf("testAjax")>-1){window.sby.triggeredTest=!0;r({action:"sby_on_ajax_test_trigger"},function(t){console.log("did test")})}var o={cols:i.attr("data-cols"),colsmobile:"same"!==i.attr("data-colsmobile")?i.attr("data-colsmobile"):i.attr("data-cols"),num:i.attr("data-num"),imgRes:i.attr("data-res"),feedID:i.attr("data-feedid"),postID:"undefind"!=typeof i.attr("data-postid")?i.attr("data-postid"):"unknown",shortCodeAtts:i.attr("data-shortcode-atts"),resizingEnabled:-1===n.indexOf("resizeDisable"),imageLoadEnabled:-1===n.indexOf("imageLoadDisable"),debugEnabled:n.indexOf("debug")>-1,favorLocal:n.indexOf("favorLocal")>-1,ajaxPostLoad:n.indexOf("ajaxPostLoad")>-1,checkWPPosts:n.indexOf("checkWPPosts")>-1,singleCheckPosts:n.indexOf("singleCheckPosts")>-1,narrowPlayer:n.indexOf("narrowPlayer")>-1,gdpr:n.indexOf("gdpr")>-1,consentGiven:-1===n.indexOf("gdpr"),noCDN:n.indexOf("disablecdn")>-1,lightboxEnabled:void 0!==i.attr("data-sby-supports-lightbox"),locator:n.indexOf("locator")>-1,autoMinRes:1,general:a};window.sby.feeds[e]=function(t,e,i){return new s(t,e,i)}(this,e,o),void 0!==window.sbyAPIReady&&(window.sby.feeds[e].playerAPIReady=!0),window.sby.feeds[e].setResizedImages(),window.sby.feeds[e].init();var l=jQuery.Event("sbyafterfeedcreate");l.feed=window.sby.feeds[e],jQuery(window).trigger(l)}))},afterFeedsCreated:function(){if(t(".sb_youtube_header").each(function(){var e=t(this);e.find(".sby_header_link").on("mouseenter mouseleave",function(t){switch(t.type){case"mouseenter":e.find(".sby_header_img_hover").addClass("sby_fade_in");break;case"mouseleave":e.find(".sby_header_img_hover").removeClass("sby_fade_in")}})}),window.sbyAPIReady){var e=jQuery.Event("sbyfeedandytready");jQuery(window).trigger(e)}},encodeHTML:function(t){return void 0===t?"":t.replace(/(>)/g,">").replace(/(<)/g,"<").replace(/(<br\/>)/g,"
").replace(/(<br>)/g,"
")},urlDetect:function(t){return t.match(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/g)},ctaDetect:function(t){var e=t.match(/{Link:(.*)}/g),i=!1;if(null!==e){var s=window.sby.urlDetect(e[0]);if(null!==s){var n=s[0].trim();i={callback:"link",url:n,text:e[0].replace("{Link:","").replace("}","").replace(n,"").replace(" "," ").trim()}}else console.log("CTA found but no URL")}return i},shuffle:function(t){for(var e,i,s=t.length;0!==s;)i=Math.floor(Math.random()*s),e=t[s-=1],t[s]=t[i],t[i]=e;return t}},i.prototype={init:function(){var e=this;e.settings.consentGiven=e.checkConsent(),e.settings.consentGiven&&window.sby.maybeAddYTAPI(),e.settings.noCDN&&!e.settings.consentGiven&&(t(this.el).find(".sb_youtube_header").length?t(this.el).find(".sb_youtube_header").addClass("sby_no_consent"):t(this.el).prev(".sb_youtube_header").length&&t(this.el).prev(".sb_youtube_header").addClass("sby_no_consent")),t(this.el).find("#sby_mod_error").length&&t(this.el).prepend(t(this.el).find("#sby_mod_error")),this.settings.ajaxPostLoad?this.getNewPostSet():this.afterInitialImagesLoaded();var i,s=(i=0,function(t,e){clearTimeout(i),i=setTimeout(t,e)});jQuery(window).on("resize",function(){s(function(){e.afterResize()},500)})},initLayout:function(){this.initGalleryLayout()},initGalleryLayout:function(){var e=t(this.el),i=this;e.hasClass("sby_layout_gallery")&&e.find(".sby_player_outer_wrap").length&&(this.maybeRaiseSingleImageResolution(e.find(".sby_player_outer_wrap"),0,!0),e.find(".sby_player_outer_wrap .sby_video_thumbnail").off().on("click",function(e){if((!i.settings.lightboxEnabled||i.settings.lightboxEnabled&&i.settings.noCDN)&&(i.settings.noCDN||!i.settings.consentGiven))return t(this).closest(".sby_item").length,void(void 0!==t(this).closest(".sby_item").attr("data-video-id")&&t(this).attr("href","https://www.youtube.com/watch?v="+t(this).closest(".sby_item").attr("data-video-id")));e.preventDefault(),i.onThumbnailClick(t(this),!0)}),e.find(".sby_item").first().addClass("sby_current"),e.on("mouseenter",function(){i.canCreatePlayer()&&(e.find(".sby_player_outer_wrap iframe").length?void 0===i.player&&i.playerEagerLoaded()&&i.createPlayer("sby_player"+i.index):(e.addClass("sby_player_added").find(".sby_player_outer_wrap").addClass("sby_player_loading"),e.find(".sby_player_outer_wrap .sby_video_thumbnail").find(".sby_loader").show().removeClass("sby_hidden"),i.createPlayer("sby_player"+i.index)))}),window.sbySemiEagerLoading&&i.createPlayer("sby_player"+i.index),i.settings.noCDN&&e.find(".sby_player_outer_wrap").append('
\n \n
'))},createPlayer:function(e,i,s,n){var a=t(this.el),o=this;if(i=void 0!==i?i:this.getVideoID(a.find(".sby_item").first()),s=void 0!==s?s:0,void 0===n&&(n={host:window.location.protocol+"//www.youtube-nocookie.com",videoId:i,playerVars:{modestbranding:1,rel:0,autoplay:s}}),void 0===n.events&&(n.events={onReady:function(){a.find(".sby_player_outer_wrap").removeClass("sby_player_loading").find(".sby_video_thumbnail").css("z-index",-1).find(".sby_loader").hide().addClass("sby_hidden"),t("#"+e).length&&t("#"+e).closest(".sby_video_thumbnail_wrap").find(".sby_video_thumbnail").length&&t("#"+e).closest(".sby_video_thumbnail_wrap").find(".sby_video_thumbnail").fadeTo(0,"slow",function(){t(this).css("z-index",-1),t(this).find(".sby_loader").hide().addClass("sby_hidden"),t(this).closest(".sby_item").removeClass("sby_player_loading")});var i=jQuery.Event("sbyafterplayerready");i.feed=o,i.player=this,jQuery(window).trigger(i)},onStateChange:function(s){a.find(".sby_player_outer_wrap").removeClass("sby_player_loading").find(".sby_video_thumbnail").css("z-index",-1).find(".sby_loader").hide().addClass("sby_hidden"),o.afterStateChange(e,i,s,t("#"+e).closest(".sby_video_thumbnail_wrap")),1===s.data&&void 0!==o.players&&a.find(".sby_item").each(function(){var e=o.getVideoID(t(this));t(this).find("iframe").length&&e!==i&&void 0!==o.players[e]&&"function"==typeof o.players[e].pauseVideo&&o.players[e].pauseVideo()})}}),window.sbyEagerLoading)var r=YT.get(e);else r=new window.YT.Player(e,n);this.maybeAddCTA(e),a.hasClass("sby_layout_list")&&void 0===this.players[i]?this.players[i]=r:void 0===this.player&&(this.player=r);var l=jQuery.Event("sbyafterplayercreated");return l.feed=this,jQuery(window).trigger(l),r},afterStateChange:function(t,e,i,s){},afterInitialImagesLoaded:function(){this.initLayout(),this.loadMoreButtonInit(),this.hideExtraItemsForWidth(),this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed(),this.afterFeedSet(),this.sizePlayer(),this.sizeItems(),this.settings.consentGiven?this.applyFullFeatures():this.removeFeatures()},afterResize:function(){this.setImageHeight(),this.setImageResolution(),this.maybeRaiseImageResolution(),this.setImageSizeClass()},afterLoadMoreClicked:function(t){t.find(".sby_loader").removeClass("sby_hidden"),t.find(".sby_btn_text").addClass("sby_hidden"),t.closest(".sb_youtube").find(".sby_num_diff_hide").addClass("sby_transition").removeClass("sby_num_diff_hide")},afterNewImagesLoaded:function(){var e=t(this.el),i=this;this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed(),this.sizePlayer(),this.sizeItems(),setTimeout(function(){e.find(".sby_loader").addClass("sby_hidden"),e.find(".sby_btn_text").removeClass("sby_hidden"),i.maybeRaiseImageResolution()},500),this.settings.consentGiven?this.applyFullFeatures():this.removeFeatures()},beforeNewImagesRevealed:function(){this.setImageHeight(),this.maybeRaiseImageResolution(!0),this.setImageSizeClass()},afterFeedSet:function(){},sizePlayer:function(){var e=t(this.el),i=this;if(e.hasClass("sby_layout_gallery")){$playerThumbnail=e.find(".sby_player_item").find(".sby_player_video_thumbnail");var s=$playerThumbnail.innerWidth(),n=Math.floor(9*s/16);i.settings.narrowPlayer&&(n=Math.floor(3*s/4)),$playerThumbnail.css("height",n+"px").css("overflow","hidden")}else e.hasClass("sby_layout_list")&&e.find(".sby_item").each(function(){$playerThumbnail=t(this).find(".sby_item_video_thumbnail");var e=$playerThumbnail.innerWidth(),s=Math.floor(9*e/16);i.settings.narrowPlayer&&(s=Math.floor(3*e/4)),$playerThumbnail.css("height",s+"px").css("overflow","hidden")})},sizeItems:function(){var e=t(this.el);e.hasClass("sby_layout_list")||e.find(".sby_item").find(".sby_item_video_thumbnail").each(function(){if(t(this).hasClass("sby_imgLiquid_ready")){var e=t(this).innerWidth(),i=Math.floor(9*e/16);t(this).css("height",i+"px").css("overflow","hidden")}})},revealNewImages:function(){var e=t(this.el),i=this;this.applyImageLiquid(),"function"==typeof sbyCustomJS&&setTimeout(function(){sbyCustomJS()},100),e.find(".sby-screenreader").find("img").remove(),e.find(".sby_item.sby_new").each(function(e){var s=jQuery(this);videoID=s.attr("data-video-id"),window.sbyEagerLoading&&i.canCreatePlayer()&&t("#sby_player_"+videoID).length&&(player=new YT.Player("sby_player_"+videoID,{height:"100",width:"100",videoId:videoID,playerVars:{modestbranding:1,rel:0,autoplay:0},events:{onStateChange:function(t){t.target.getVideoData().video_id;1===t.data&&s.find(".sby_item").each(function(){var e=jQuery(this).attr("data-video-id");jQuery(this).find("iframe").length&&jQuery(t.target.a).attr("id")!==jQuery(this).find("iframe").attr("id")&&YT.get("sby_player_"+e).pauseVideo()})}}})),s.find(".sby_video_thumbnail").on("mouseenter",function(){i.onThumbnailEnter(t(this),!1)}),s.find(".sby_player_wrap").on("mouseleave",function(){i.onThumbnailLeave(t(this),!1)}),s.find(".sby_video_thumbnail").on("click",function(e){if((!i.settings.lightboxEnabled||i.settings.lightboxEnabled&&i.settings.noCDN)&&(i.settings.noCDN||!i.settings.consentGiven))return t(this).closest(".sby_item").length,void(void 0!==t(this).closest(".sby_item").attr("data-video-id")&&t(this).attr("href","https://www.youtube.com/watch?v="+t(this).closest(".sby_item").attr("data-video-id")));e.preventDefault(),i.onThumbnailClick(t(this),!1)}),i.settings.lightboxEnabled&&(s.find(".sby_video_thumbnail").attr("data-sby-lightbox",i.index),"undefined"!=typeof sbyOptions&&void 0!==sbyOptions.lightboxPlaceholder&&(i.settings.narrowPlayer?s.find(".sby_video_thumbnail").attr("href",sbyOptions.lightboxPlaceholderNarrow):s.find(".sby_video_thumbnail").attr("href",sbyOptions.lightboxPlaceholder))),i.afterItemRevealed(s),""===s.find(".sby_info_item").text().trim()&&s.find(".sby_info_item").addClass("sby_no_space")}),e.find(".sby_player_item").each(function(t){var e=jQuery(this);i.afterItemRevealed(e)}),setTimeout(function(){e.find(".sby_item.sby_new").removeClass("sby_new");var t=10;e.find(".sby_transition").length;e.find(".sby_transition").each(function(e){var i=jQuery(this);setTimeout(function(){i.removeClass("sby_transition")},t),t+=10})},500)},afterItemRevealed:function(){},afterNewImagesRevealed:function(){this.listenForVisibilityChange(),this.sendNeedsResizingToServer(),this.sendCheckWPPostsToServer(),this.settings.imageLoadEnabled||t(".sby_no_resraise").removeClass("sby_no_resraise");var e=t.Event("sbyafterimagesloaded");e.el=t(this.el),t(window).trigger(e)},setResizedImages:function(){t(this.el).find(".sby_resized_image_data").length&&void 0!==t(this.el).find(".sby_resized_image_data").attr("data-resized")&&0===t(this.el).find(".sby_resized_image_data").attr("data-resized").indexOf('{"')&&(this.resizedImages=JSON.parse(t(this.el).find(".sby_resized_image_data").attr("data-resized")),t(this.el).find(".sby_resized_image_data").remove())},sendNeedsResizingToServer:function(){var e=this;if(e.needsResizing.length>0&&e.settings.resizingEnabled){var i=t(this.el).find(".sby_item").length;r({action:"sby_resized_images_submit",needs_resizing:e.needsResizing,offset:i,feed_id:e.settings.feedID,location:e.locationGuess(),post_id:e.settings.postID,atts:e.settings.shortCodeAtts},function(t){if(0===t.trim().indexOf("{")){var i=JSON.parse(t);e.settings.debugEnabled&&console.log(i)}})}},sendCheckWPPostsToServer:function(){var e=this;if(e.settings.checkWPPosts||e.settings.singleCheckPosts){var i=void 0!==e.settings.feedID?e.settings.feedID:"sby_single",s=e.mostRecentlyLoadedPosts;e.mostRecentlyLoadedPosts=[];r({action:"sby_check_wp_submit",feed_id:i,atts:e.settings.shortCodeAtts,location:e.locationGuess(),post_id:e.settings.postID,offset:t(this.el).hasClass("sby_layout_carousel")?Math.floor(t(this.el).find(".sby_item").length/2-1):t(this.el).find(".sby_item").length,posts:s},function(t){if(0===t.trim().indexOf("{")){var i=JSON.parse(t);e.settings.debugEnabled&&console.log(i),e.afterSendCheckWPPostsToServer(i)}})}},afterSendCheckWPPostsToServer:function(t){},loadMoreButtonInit:function(){var e=t(this.el),i=this;e.find(".sby_footer .sby_load_btn").off().on("click",function(){i.afterLoadMoreClicked(jQuery(this)),i.getNewPostSet()})},getNewPostSet:function(){var e=t(this.el),i=this;r({action:"sby_load_more_clicked",offset:e.find(".sby_item").length,feed_id:i.settings.feedID,atts:i.settings.shortCodeAtts,location:i.locationGuess(),post_id:i.settings.postID,current_resolution:i.imageResolution},function(s){if(0===s.trim().indexOf("{")){var n=JSON.parse(s),a=void 0!==n.feedStatus.checkWPPosts&&n.feedStatus.checkWPPosts;i.settings.debugEnabled&&console.log(n),i.settings.checkWPPosts=!!a,i.appendNewPosts(n.html),i.addResizedImages(n.resizedImages),i.settings.ajaxPostLoad?(i.settings.ajaxPostLoad=!1,i.afterInitialImagesLoaded()):i.afterNewImagesLoaded(),n.feedStatus.shouldPaginate?i.outOfPages=!1:(i.outOfPages=!0,e.find(".sby_load_btn").hide()),t(".sby_no_js").removeClass("sby_no_js")}})},appendNewPosts:function(e){var i=t(this.el);i.find(".sby_items_wrap .sby_item").length?i.find(".sby_items_wrap .sby_item").last().after(e):i.find(".sby_items_wrap").append(e)},addResizedImages:function(t){for(var e in t)this.resizedImages[e]=t[e]},setImageHeight:function(){},maybeRaiseSingleImageResolution:function(e,i,s){var n=this,a=n.getImageUrls(e),o=e.find(".sby_video_thumbnail > img").attr("src"),r=150;s=void 0!==s&&s;if(!(e.hasClass("sby_no_resraise")||!n.settings.consentGiven&&n.settings.noCDN)){t.each(a,function(t,e){e===o&&(r=parseInt(t),s=!1)});var l=640;switch(n.settings.imgRes){case"thumb":l=120;break;case"medium":l=320;break;case"large":l=480;break;case"full":l=640;break;default:var d=Math.max(n.settings.autoMinRes,e.find(".sby_video_thumbnail").innerWidth());switch(n.getBestResolutionForAuto(d,1,t(this.el).find("sby_item").first())){case 480:l=480;break;case 320:l=320;break;case 120:l=120}}if(l>r||o===n.placeholderURL||s){if(n.settings.debugEnabled){var h=o===n.placeholderURL?"was placeholder":"too small";console.log("rais res for "+o,h)}var c=a[l];e.find(".sby_video_thumbnail > img").attr("src",c),e.find(".sby_video_thumbnail").hasClass("sby_imgLiquid_ready")&&e.find(".sby_video_thumbnail").css("background-image",'url("'+c+'")')}e.find("img").on("error",function(){if(t(this).hasClass("sby_img_error"))console.log("unfixed error "+t(this).attr("src"));else{if(t(this).addClass("sby_img_error"),t(this).attr("src").indexOf("i.ytimg.com")>-1)n.settings.favorLocal=!0,n.getImageUrls(t(this).closest(".sby_item"))[640];else void 0!==t(this).closest(".sby_video_thumbnail").attr("data-full-res")||t(this).closest(".sby_video_thumbnail").attr("href");setTimeout(function(){n.afterResize()},1500)}})}},maybeRaiseImageResolution:function(e){var i=this,s=void 0!==e&&!0===e?".sby_item.sby_new":".sby_item",n=!i.isInitialized;t(i.el).find(s).each(function(e){!t(this).hasClass("sby_num_diff_hide")&&t(this).find(".sby_video_thumbnail").length&&void 0!==t(this).find(".sby_video_thumbnail").attr("data-img-src-set")&&i.maybeRaiseSingleImageResolution(t(this),e,n)}),i.isInitialized=!0},getBestResolutionForAuto:function(e,i,s){(isNaN(i)||i<1)&&(i=1);var n=e*i,a=10*Math.ceil(n/10),o=[120,320,480,640];if(s.hasClass("sby_highlighted")&&(a*=2),-1===o.indexOf(parseInt(a))){var r=!1;t.each(o,function(t,e){e>parseInt(a)&&!r&&(a=e,r=!0)})}return a},hideExtraItemsForWidth:function(){if("carousel"!==this.layout){var e=t(this.el),i=void 0!==e.attr("data-num")&&""!==e.attr("data-num")?parseInt(e.attr("data-num")):1,s=void 0!==e.attr("data-nummobile")&&""!==e.attr("data-nummobile")?parseInt(e.attr("data-nummobile")):i;e.hasClass(".sby_layout_carousel")||(t(window).width()<480?s140&&a<240?e.addClass("sby_medium"):a<=140&&e.addClass("sby_small")},setMinImageWidth:function(){t(this.el).find(".sby_item .sby_video_thumbnail").first().length?this.minImageWidth=t(this.el).find(".sby_item .sby_video_thumbnail").first().innerWidth():this.minImageWidth=150},setImageResolution:function(){if("auto"===this.settings.imgRes)this.imageResolution="auto";else switch(this.settings.imgRes){case"thumb":this.imageResolution=150;break;case"medium":this.imageResolution=320;break;default:this.imageResolution=640}},getImageUrls:function(t){var e=JSON.parse(t.find(".sby_video_thumbnail").attr("data-img-src-set").replace(/\\\//g,"/")),i=t.attr("id").replace("sby_","").replace("player_","");if(void 0!==this.resizedImages[i]&&"video"!==this.resizedImages[i]&&"pending"!==this.resizedImages[i]&&"error"!==this.resizedImages[i].id&&"video"!==this.resizedImages[i].id&&"pending"!==this.resizedImages[i].id){if(void 0!==this.resizedImages[i].sizes){var s=[];void 0!==this.resizedImages[i].sizes.full&&(s.push(640),e[640]=sbyOptions.resized_url+this.resizedImages[i].id+"full.jpg",t.find(".sby_link_area").attr("href",sbyOptions.resized_url+this.resizedImages[i].id+"full.jpg"),t.find(".sby_video_thumbnail").attr("data-full-res",sbyOptions.resized_url+this.resizedImages[i].id+"full.jpg")),void 0!==this.resizedImages[i].sizes.low&&(s.push(320),e[320]=sbyOptions.resized_url+this.resizedImages[i].id+"low.jpg",this.settings.favorLocal&&void 0===this.resizedImages[i].sizes.full&&(t.find(".sby_link_area").attr("href",sbyOptions.resized_url+this.resizedImages[i].id+"low.jpg"),t.find(".sby_video_thumbnail").attr("data-full-res",sbyOptions.resized_url+this.resizedImages[i].id+"low.jpg"))),void 0!==this.resizedImages[i].sizes.thumb&&(s.push(150),e[150]=sbyOptions.resized_url+this.resizedImages[i].id+"thumb.jpg"),this.settings.favorLocal&&(-1===s.indexOf(640)&&s.indexOf(320)>-1&&(e[640]=sbyOptions.resized_url+this.resizedImages[i].id+"low.jpg"),-1===s.indexOf(320)&&(s.indexOf(640)>-1?e[320]=sbyOptions.resized_url+this.resizedImages[i].id+"full.jpg":s.indexOf(150)>-1&&(e[320]=sbyOptions.resized_url+this.resizedImages[i].id+"thumb.jpg")),-1===s.indexOf(150)&&(s.indexOf(320)>-1?e[150]=sbyOptions.resized_url+this.resizedImages[i].id+"low.jpg":s.indexOf(640)>-1&&(e[150]=sbyOptions.resized_url+this.resizedImages[i].id+"full.jpg")))}}else(void 0===this.resizedImages[i]||void 0!==this.resizedImages[i].id&&"pending"!==this.resizedImages[i].id&&"error"!==this.resizedImages[i].id)&&this.addToNeedsResizing(i);return e},getVideoID:function(e){if(e.hasClass("sby_item")||e.hasClass("sby_player_item")){if(void 0!==e.find(".sby_video_thumbnail").attr("data-video-id"))return e.find(".sby_video_thumbnail").attr("data-video-id")}else if(e.closest("sby_item").length||e.closest("sby_player_item").length){var i=e.closest("sby_item").length?e.closest("sby_item"):e.closest("sby_player_item");if(void 0!==i.find(".sby_video_thumbnail").attr("data-video-id"))return i.find(".sby_video_thumbnail").attr("data-video-id")}else{if(e.hasClass("sb_youtube"))return e.find(".sby_item").first().find(".sby_video_thumbnail").attr("data-video-id");if(t(this.el).find(".sby_video_thumbnail").first().length&&void 0!==t(this.el).find(".sby_video_thumbnail").first().attr("data-video-id"))return t(this.el).find(".sby_video_thumbnail").first().attr("data-video-id")}return""},getAvatarUrl:function(t,e){if(""===t)return"";var i=this.settings.general.avatars;return"local"===(e=void 0!==e?e:"local")?void 0!==i["LCL"+t]&&1===parseInt(i["LCL"+t])?sbyOptions.resized_url+t+".jpg":void 0!==i[t]?i[t]:"":void 0!==i[t]?i[t]:void 0!==i["LCL"+t]&&1===parseInt(i["LCL"+t])?sbyOptions.resized_url+t+".jpg":""},addToNeedsResizing:function(t){-1===this.needsResizing.indexOf(t)&&this.needsResizing.push(t)},applyImageLiquid:function(){var e=t(this.el);sbyAddImgLiquid(),"function"==typeof e.find(".sby_player_item").sby_imgLiquid&&(e.find(".sby_player_item").length&&e.find(".sby_player_item .sby_player_video_thumbnail").sby_imgLiquid({fill:!0}),e.find(".sby_item .sby_item_video_thumbnail").sby_imgLiquid({fill:!0}))},listenForVisibilityChange:function(){var e,i,s,n=this;e=jQuery,i={callback:function(){},runOnLoad:!0,frequency:100,sbyPreviousVisibility:null},s={sbyCheckVisibility:function(t,e){if(jQuery.contains(document,t[0])){var i=e.sbyPreviousVisibility,n=t.is(":visible");e.sbyPreviousVisibility=n,null==i?e.runOnLoad&&e.callback(t,n):i!==n&&e.callback(t,n),setTimeout(function(){s.sbyCheckVisibility(t,e)},e.frequency)}}},e.fn.sbyVisibilityChanged=function(t){var n=e.extend({},i,t);return this.each(function(){s.sbyCheckVisibility(e(this),n)})},"function"==typeof t(this.el).filter(":hidden").sbyVisibilityChanged&&t(this.el).filter(":hidden").sbyVisibilityChanged({callback:function(t,e){n.afterResize()},runOnLoad:!1})},getColumnCount:function(){var e=t(this.el),i=this.settings.cols,s=this.settings.colsmobile,n=i;return sbyWindowWidth=window.innerWidth,e.hasClass("sby_mob_col_auto")?(sbyWindowWidth<640&&parseInt(i)>2&&parseInt(i)<7&&(n=2),sbyWindowWidth<640&&parseInt(i)>6&&parseInt(i)<11&&(n=4),sbyWindowWidth<=480&&parseInt(i)>2&&(n=1)):sbyWindowWidth<=480&&(n=s),parseInt(n)},onThumbnailClick:function(e,i,s){if(this.canCreatePlayer()){var n=t(this.el);if(n.hasClass("sby_layout_gallery"))if(n.find(".sby_current").removeClass("sby_current"),e.closest(".sby_item").addClass("sby_current"),e.closest(".sby_item").addClass("sby_current"),n.addClass("sby_player_added").find(".sby_player_outer_wrap").addClass("sby_player_loading"),n.find(".sby_player_outer_wrap .sby_video_thumbnail").find(".sby_loader").show().removeClass("sby_hidden"),n.find(".sby_player_outer_wrap iframe").length)if(i){s=void 0===s?this.getVideoID(n.find(".sby_item").first()):s;this.playVideoInPlayer(s)}else{s=void 0===s?this.getVideoID(e.closest(".sby_item")):s;this.changePlayerInfo(e.closest(".sby_item")),this.playVideoInPlayer(s),this.afterVideoChanged()}else if(i)this.createPlayer("sby_player"+this.index);else{var s=void 0===s?this.getVideoID(e.closest(".sby_item")):s;this.createPlayer("sby_player"+this.index,s)}else if(t(this.el).hasClass("sby_layout_grid")||t(this.el).hasClass("sby_layout_carousel")){var a=e.closest(".sby_item");s=void 0===s?this.getVideoID(a):s;this.playVideoInPlayer(s),this.afterVideoChanged()}else if(t(this.el).hasClass("sby_layout_list")){a=e.closest(".sby_item"),s=void 0===s?this.getVideoID(a):s;a.length&&!a.find("iframe").length?(a.find(".sby_loader").show().removeClass("sby_hidden"),a.addClass("sby_player_loading sby_player_loaded"),this.createPlayer("sby_player_"+s,s)):(this.playVideoInPlayer(s,a.attr("data-video-id")),this.afterVideoChanged())}}},onThumbnailEnter:function(e){if(this.canCreatePlayer()&&t(this.el).hasClass("sby_layout_list")){var i=e.closest(".sby_item"),s=this.getVideoID(i);i.find("iframe").length||(i.find(".sby_loader").show().removeClass("sby_hidden"),i.addClass("sby_player_loading sby_player_loaded"),this.createPlayer("sby_player_"+s,s,0))}},onThumbnailLeave:function(t){},changePlayerInfo:function(t){},playerEagerLoaded:function(){if(void 0!==this.player||t(this.el).hasClass("sby_player_loaded"))return!0},canCreatePlayer:function(){return!t(this.el).find("#sby_blank").length&&(this.playerEagerLoaded()||this.playerAPIReady&&this.settings.consentGiven||window.sbyAPIReady&&this.settings.consentGiven)},playVideoInPlayer:function(t,e){void 0!==this.player&&void 0!==this.player.loadVideoById?this.player.loadVideoById(t):void 0!==window.sbyLightboxPlayer&&void 0!==window.sbyLightboxPlayer.loadVideoById?window.sbyLightboxPlayer.loadVideoById(t):void 0!==e&&void 0!==this.players&&void 0!==this.players[e]&&void 0!==this.players[e].loadVideoById&&this.players[e].loadVideoById(t)},afterVideoChanged:function(){t(this.el).hasClass("sby_layout_gallery")&&(t(this.el).find(".sby_player_outer_wrap").removeClass("sby_player_loading"),t(this.el).find(".sby_player_outer_wrap .sby_video_thumbnail").find(".sby_loader").hide().addClass("sby_hidden"),t(window).width()<480&&t("html, body").animate({scrollTop:t(this.el).find(".sby_player_outer_wrap").offset().top},300))},checkConsent:function(){if(this.settings.consentGiven||!this.settings.gdpr)return this.settings.noCDN=!1,!0;if("undefined"!=typeof CLI_Cookie)null!==CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)&&(this.settings.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-non-necessary"));else if(void 0!==window.cnArgs){var t=("; "+document.cookie).split("; cookie_notice_accepted=");if(2===t.length){var e=t.pop().split(";").shift();this.settings.consentGiven="true"===e}}else void 0!==window.cookieconsent?this.settings.consentGiven="allow"===function(t){for(var e=t+"=",i=window.document.cookie.split(";"),s=0;s
"},beforePlayerSetup:function(t,e,i,s,n){},afterPlayerSetup:function(t,e,i,s){},afterResize:function(){var e=t("#sby_lightbox .sby_lb-player").height();if(e>100){var i=t("#sby_lightbox .sby_lb-outerContainer").height()-e;i>10&&t("#sby_lightbox .sby_lb-player").css("top",i/2)}},pausePlayer:function(){void 0===window.sbyLightboxPlayer&&"undefined"==typeof YT||(void 0!==YT.get("sby_lb-player")&&"function"==typeof YT.get("sby_lb-player").pauseVideo?YT.get("sby_lb-player").pauseVideo():void 0!==window.sbyLightboxPlayer&&"function"==typeof window.sbyLightboxPlayer.pauseVideo&&window.sbyLightboxPlayer.pauseVideo())}},a.prototype=Object.create(n.prototype),o.prototype={toggleCTA:function(e,i,s){this.$player=s.length?s:t(".sby_lb-container"),this.state=i,this.videoID=e,this.isInitialized=!0,this.resetCTA(),void 0!==window.sby.ctas[e]&&(this.callbackArgs=window.sby.ctas[e]);var n=this.callbackArgs.callback;if("link"===n)this.callback=this.link;else{if("related"!==n)return;this.callback=this.related}2===i||0===i?(this.$player.find(".sby_cta_items_wraps").addClass("sby_cta_is_open"),2===i?this.$player.find(".sby_cta_items_wraps").addClass("sby_cta_state_paused"):this.$player.find(".sby_cta_items_wraps").addClass("sby_cta_state_ended"),this.$player.find(".sby_cta_items_wraps").show(),this.callback(),this.setCTAStyles()):(this.$player.find(".sby_cta_items_wraps").removeClass("sby_cta_is_open"),this.$player.find(".sby_cta_items_wraps").hide().removeClass("sby_cta_state_paused").removeClass("sby_cta_state_ended").removeClass("sby_cta_is_open"))},related:function(e){var i=this,s=this.feedObjInContext,n=window.sby.shuffle(this.getRelated(s)),a=0,o=this.videoID,r=this.$player;this.$player.find(".sby_cta_items_wraps").removeClass("sby_cta_cols_"+this.numItemColumns),this.numItems=4,this.numItemColumns=2,r.width()<480&&(this.numItems=1,this.numItemColumns=1);var l=this.numItems;t.each(n,function(t,e){e.videoID!==o&&a
'),a++)}),r.find(".sby_cta_items_wraps .sby_video_thumbnail").each(function(){t(this).off().on("click",function(e){e.preventDefault();var n=t(this).attr("data-video-id");s.onThumbnailClick(t(this),!0,n),i.videoID=n})})},getRelated:function(e){if(void 0===e.settings.general.cta.defaultPosts[0]){var i=t(e.el),s=[];return i.find(".sby_item").each(function(){if(void 0!==t(this).find(".sby_item_video_thumbnail").attr("data-full-res")){var e={videoID:t(this).attr("data-video-id"),title:t(this).attr("data-video-title"),thumbnail:t(this).find(".sby_item_video_thumbnail").attr("data-full-res")};s.push(e)}}),s}return e.settings.general.ctaPosts},link:function(t){var e=this.$player,i=this.feedObjInContext;this.$player.find(".sby_cta_items_wraps").removeClass("sby_cta_cols_"+this.numItemColumns),this.numItems=1,this.numItemColumns=1;var s="",n="";""===i.settings.general.cta.color&&""===i.settings.general.cta.textColor||(s=' style="',n=" sby_custom",""!==i.settings.general.cta.color&&(s+="background: rgb("+i.settings.general.cta.color+");"),""!==i.settings.general.cta.textColor&&(s+="color: rgb("+i.settings.general.cta.textColor+");"),s+='"');var a="";"newwindow"===i.settings.general.cta.openType&&(a=' target="_blank" rel="noopener"'),e.find(".sby_cta_items_wraps .sby_cta_inner_wrap").append('")},setCTAStyles:function(){var t=Math.max(90,this.$player.height()-60-49);this.$player.find(".sby_cta_items_wraps").css("height",t+"px").css("width",this.$player.find("iframe").width()-20+"px").addClass("sby_cta_cols_"+this.numItemColumns);var e=Math.max(1,this.numItems/this.numItemColumns),i=2*parseInt(this.$player.find(".sby_cta_items_wraps").css("padding-top").replace("px","")),s=Math.max(90,(t-i)/e);this.$player.find(".sby_cta_item").css("max-height",s+"px").find("img").css({"max-height":s+"px",width:"auto",margin:"auto"}),this.$player.find(".sby_btn_wrap").css("height",s+"px")},resetCTA:function(){this.$player.find(".sby_cta_items_wraps .sby_cta_inner_wrap").empty()}},window.sby_init=function(){window.sby=new e,window.sby.createPage(window.sby.createFeeds,{whenFeedsCreated:window.sby.afterFeedsCreated})}}(jQuery),void 0===window.sbyEagerLoading&&(window.sbyEagerLoading=void 0!==window.sbyOptions&&window.sbyOptions.eagerload,jQuery("div[data-vc-video-bg]").length&&(window.sbyEagerLoading=!0)),void 0===window.sbySemiEagerLoading&&(window.sbySemiEagerLoading=void 0!==window.sbyOptions&&window.sbyOptions.semiEagerload,(jQuery("div[data-vc-video-bg]").length||window.sbyEagerLoading)&&(window.sbySemiEagerLoading=!1)),jQuery(document).ready(function(t){window.sbySemiEagerLoading||sby_init(),t("#cookie-notice a").on("click",function(){setTimeout(function(){t.each(window.sby.feeds,function(t){window.sby.feeds[t].afterConsentToggled()})},1e3)}),t("#cookie-law-info-bar a").on("click",function(){setTimeout(function(){t.each(window.sby.feeds,function(t){window.sby.feeds[t].afterConsentToggled()})},1e3)}),t(".cli-user-preference-checkbox").on("click",function(){setTimeout(function(){t.each(window.sby.feeds,function(t){window.sby.feeds[t].settings.consentGiven=!1,window.sby.feeds[t].afterConsentToggled()})},1e3)}),t(window).on("CookiebotOnAccept",function(e){t.each(window.sby.feeds,function(t){window.sby.feeds[t].settings.consentGiven=!0,window.sby.feeds[t].afterConsentToggled()})}),t(document).on("cmplzAcceptAll",function(e){t.each(window.sby.feeds,function(t){window.sby.feeds[t].settings.consentGiven=!0,window.sby.feeds[t].afterConsentToggled()})}),t(document).on("cmplzRevoke",function(e){t.each(window.sby.feeds,function(t){window.sby.feeds[t].settings.consentGiven=!1,window.sby.feeds[t].afterConsentToggled()})}),t(document).on("borlabs-cookie-consent-saved",function(e){t.each(window.sby.feeds,function(t){window.sby.feeds[t].settings.consentGiven=!1,window.sby.feeds[t].afterConsentToggled()})})})}if(window.sbySemiEagerLoading){var sbyYScriptId="sby-youtube-api",sbyYScript=document.getElementById(sbyYScriptId);if(null===sbyYScript){var tag=document.createElement("script"),firstScript=document.getElementsByTagName("script")[0];tag.src="https://www.youtube.com/iframe_api",tag.id=sbyYScriptId,firstScript.parentNode.insertBefore(tag,firstScript)}}window.onYouTubeIframeAPIReady=function(){var t=document.getElementsByClassName("sb_youtube").length;if(t>0){if(window.sbySemiEagerLoading){if(void 0!==window.sby)for(var e=0;e
'),player=new YT.Player("sby_lb-player",{height:"100",width:"100",videoId:jQuery(this).find(".sby_item").first().attr("data-video-id"),playerVars:{modestbranding:1,rel:0,autoplay:s}}),window.sbyLightboxPlayer=player)}if(void 0!==window.sby){var n=jQuery.Event("sbyfeedandytready");jQuery(window).trigger(n)}};