!function(a,b,c,undefined){if(a&&b){b.FooBox={defaults:{affiliate:{enabled:!0,prefix:"Powered by ",url:"http://fooplugins.com/plugins/foobox/"},alwaysInit:!1,closeOnOverlayClick:!0,containerCssClass:"fbx-instance",countMessage:"item %index of %total",error:"Could not load the item",excludes:".fbx-link, .nofoobox",externalSelector:"a[data-foobox],input[data-foobox]",fitToScreen:!1,hideScrollbars:!0,loadDelay:0,loaderTimeout:600,modalClass:"",preload:!1,rel:null,resizeSpeed:300,selector:"a",showButtons:!0,showCount:!0,style:"fbx-rounded",theme:"fbx-light",transitionInSpeed:200,transitionOutSpeed:200,initCallback:null,loop:!0},version:"2.0.10",instances:[],ready:function(b){(Function("/*@cc_on return true@*/")()?"complete"===document.readyState:"loading"!==document.readyState)?b(a):setTimeout(function(){FooBox.ready(b)},1)}},FooBox.$=a,FooBox.format=function(a,b,c){var d,e,f=arguments[0];for(d=0;d-1||a.indexOf("crios")>-1,FooBox.browser.isChrome&&(FooBox.browser.css+=" fbx-chrome"),FooBox.browser.isSafari=a.indexOf("safari")>-1&&!FooBox.browser.isChrome,FooBox.browser.isSafari&&(FooBox.browser.css+=" fbx-safari",FooBox.browser.isLtSafari10=/constructor/i.test(b.HTMLElement)),FooBox.browser.isFirefox=c.indexOf("firefox")>-1,FooBox.browser.isFirefox&&(FooBox.browser.css+=" fbx-firefox");var e=c.indexOf("msie "),f=c.indexOf("trident/"),g=c.indexOf("edge/");if(FooBox.browser.isIE=e>-1||f>-1||g>-1,FooBox.browser.isIE){if(e>-1)FooBox.browser.version=parseInt(c.substring(e+5,c.indexOf(".",e)),10);else if(f>-1){var h=c.indexOf("rv:");FooBox.browser.version=parseInt(c.substring(h+3,c.indexOf(".",h)),10)}else g>-1&&(FooBox.browser.version=parseInt(c.substring(g+5,c.indexOf(".",g)),10));FooBox.browser.css=FooBox.format("fbx-ie fbx-ie{0}",FooBox.browser.version)}},supportsTransitions:function(){var a,b=document.body||document.documentElement,c=b.style,d="transition";if("string"==typeof c[d])return!0;a=["Moz","Webkit","Khtml","O","ms"],d=d.charAt(0).toUpperCase()+d.substr(1);for(var e=0;e0&&-1!==a.indexOf(b)},hasProperties:function(a){if("object"!=typeof a)return!1;var b;for(b in a)if(a.hasOwnProperty(b))return!0;return!1},get:function(a,b){if(FooBox.options.isMultipart(b,".")){var c=b.substring(0,b.indexOf(".")),d=b.substring(b.indexOf(".")+1);return a[c]=a[c]||{},FooBox.options.get(a[c],d)}return a[b]},set:function(a,b,c){if(FooBox.options.isMultipart(b,".")){var d=b.substring(0,b.indexOf(".")),e=b.substring(b.indexOf(".")+1);a[d]=a[d]||{},FooBox.options.set(a[d],e,c)}else a[b]=c},merge:function(a,b,c){var d,e=Array.prototype.slice.call(arguments);for(a=e.shift(),b=e.shift(),FooBox.options._merge(a,b),d=0;d'),e.element.append('
');var b=a('
');b.append('
'),b.append('
');var c=a('
');c.append(b),c.append(''),c.append(''),c.append(''),c.append(''),c.append(''),e.element.append('
'),e.element.append(c),e.FooBox.raise("foobox.setupHtml"),a("body").append(e.element)}},options:function(a){var b;e.element.removeClass().addClass("fbx-modal").addClass(FooBox.format("fbx-{0}",e.FooBox.id)).addClass(e.FooBox.element.data("style")||a.style).addClass(e.FooBox.element.data("theme")||a.theme).addClass(e.FooBox.element.data("modal-class")).addClass(a.modalClass).data("fbx_instance",e.FooBox),e.element.addClass(FooBox.browser.css),b=a.affiliate.enabled?"":"none",e.element.find(".fbx-credit").css("display",b),a.affiliate.enabled&&(e.element.find(".fbx-credit > a").attr("href",a.affiliate.url),e.element.find(".fbx-credit > a > em").text(a.affiliate.prefix)),b=a.showCount&&e.FooBox.items.multiple()?"":"none",e.element.find(".fbx-count").css("display",b),a.showButtons&&e.FooBox.items.multiple()||e.element.addClass("fbx-no-buttons"),e.FooBox.raise("foobox.setupOptions")},bind:function(){1==e.FooBox.options.closeOnOverlayClick&&e.element.off("click.foobox").on("click.foobox",function(b){1==e.FooBox.options.closeOnOverlayClick&&a(b.target).is(".fbx-modal")&&e.close()}),e.element.find(".fbx-close").off("click.foobox").on("click.foobox",function(a){a.preventDefault(),a.stopPropagation(),e.close()}).end().find(".fbx-prev").off("click.foobox").on("click.foobox",function(b){b.preventDefault(),b.stopPropagation(),a(this).hasClass("fbx-disabled")||e.prev()}).end().find(".fbx-next").off("click.foobox").on("click.foobox",function(b){b.preventDefault(),b.stopPropagation(),a(this).hasClass("fbx-disabled")||e.next()})}},this.prioritize=function(){FooBox.instances.length>1&&e.element.nextAll(".fbx-modal:last").after(e.element)},this.preload=function(){if(1==e.FooBox.options.preload){var a=e.FooBox.items.prev();a&&a.handler.preload(a);var b=e.FooBox.items.next();b&&b.handler.preload(b)}},this.show=function(b){function c(a){if(e.loaderTimeout.stop(),e.element.removeClass("fbx-loading"),e._busy=!1,d.error(a),!e.FooBox.raise("foobox.onError",{error:a}).isDefaultPrevented()){var c=e.FooBox.items.error(f.index);null!=c&&e.show(b)}}var f=e.FooBox.items.current();if(f){b=b||!1,e._first=b,e._busy=!0,e._closed=!1,a("body").addClass("fbx-active"),e.FooBox.options.hideScrollbars&&a("html").addClass("fbx-no-scroll"),1==f.error?e.element.addClass("fbx-error"):e.element.removeClass("fbx-error"),e.element.hasClass("fbx-show")||(e.prioritize(),e.element.addClass("fbx-loading").find(".fbx-inner").css({width:"100px",height:"100px","margin-top":"-50px","margin-left":"-50px"}));var g=e.element.find(".fbx-item-current"),h=e.element.find(".fbx-item-next");if(h.hide().css("opacity","0"),e.element.find(".fbx-count").text(e.FooBox.options.countMessage.replace("%index",""+(e.FooBox.items.indexes.current+1)).replace("%total",""+e.FooBox.items.array.length)),e.FooBox.raise("foobox.beforeLoad",{item:f}).isDefaultPrevented())return void(e._busy=!1);if(f.handler.hasChanged(f)){var i=f.index,j=f.element.get(0);f=f.handler.parse(f.element);var k=e.FooBox.raise("foobox.parseItem",{element:f.element,item:f});j.index=k.fb.item.index=i,e.FooBox.items.array[i]=k.fb.item}e.preload(),e.loaderTimeout.start(function(){e.element.addClass("fbx-loading")},e.FooBox.options.loaderTimeout),setTimeout(function(){e.checkForLoop(f),f.handler.load(f,h,function(a){return 1==e._closed?void(e._busy=!1):void e.transitionOut(g,function(){return 1==e._closed?void(e._busy=!1):void e.resize(a,h,function(){return 1==e._closed?void(e._busy=!1):(e.loaderTimeout.stop(),h.show(),void e.transitionIn(h,function(){return 1==e._closed?void(e._busy=!1):(h.add(g).toggleClass("fbx-item-next fbx-item-current"),g.empty(),void(e.element.hasClass("fbx-show")?(e.element.removeClass("fbx-loading"),e.FooBox.raise("foobox.afterLoad",{item:f}),e.triggerFooGalleryLayout(h),e._busy=!1):e.FooBox.raise("foobox.beforeShow",{item:f}).isDefaultPrevented()||(e.element.removeClass("fbx-loading").addClass("fbx-show"),e.FooBox.raise("foobox.afterShow",{item:f}),e.FooBox.raise("foobox.afterLoad",{item:f}),e.triggerFooGalleryLayout(h),e._busy=!1)))},c))},c)},c)},c)},e.FooBox.options.loadDelay)}},this.triggerFooGalleryLayout=function(c){b.FooGallery&&c.find(".foogallery").each(function(){var b=a(this).data("__FooGallery__");b&&b.initialized&&b.layout()})},this.checkForLoop=function(a){1!=e.FooBox.options.loop&&(e.element.find(".fbx-prev, .fbx-next").removeClass("fbx-disabled"),e.FooBox.items.is.first(a)&&e.element.find(".fbx-prev").addClass("fbx-disabled"),e.FooBox.items.is.last(a)&&e.element.find(".fbx-next").addClass("fbx-disabled"))},this.resize=function(b,c,d,f){try{if(0===b.width||0===b.height)return void(a.isFunction(f)&&f(FooBox.format("Invalid size supplied. Width={0}, Height={1}",b.width,b.height)));var g=e.FooBox.items.current(),h=new FooBox.Size(b.width,b.height),i=e.element.find(".fbx-inner"),j=e.element.find(".fbx-inner-spacer"),k=parseInt(j.css("padding-top"),0),l=parseInt(j.css("padding-bottom"),0),m=parseInt(j.css("padding-left"),0),n=parseInt(j.css("padding-right"),0),o=parseInt(i.css("border-top-width"),0),p=parseInt(i.css("border-bottom-width"),0),q=parseInt(i.css("border-left-width"),0),r=parseInt(i.css("border-right-width"),0),s=parseInt(i.css("padding-left"),0),t=k+l+2*s+o+p,u=m+n+2*s+q+r,v=new FooBox.Size(parseInt(i.css("width"),0),parseInt(i.css("height"),0)),w=new FooBox.Size(e.element.width()-u,e.element.height()-t),x=w.width/b.width;b.height*x>w.height&&(x=w.height/b.height),e.FooBox.options.fitToScreen===!0||1==g.proportion&&(b.height>w.height||b.width>w.width)?(b.height=Math.floor(b.height*x),b.width=Math.floor(b.width*x)):0==g.proportion&&(b.height>w.height&&(b.height=w.height),b.width>w.width&&(b.width=w.width)),b.height<100&&(b.height=100),b.width<100&&(b.width=100);var y=-(b.height/2+s+(p+o)/2+l/2-k/2),z=-(b.width/2+s+(r+q)/2+n/2-m/2);if(v.equalTo(b))i.css({height:b.height,width:b.width,"margin-top":y,"margin-left":z}),e.overflow(g,h,b,c),e.FooBox.raise("foobox.afterResize",{item:g,size:b}),a.isFunction(d)&&d();else if(!e.FooBox.raise("foobox.beforeResize",{item:g,size:b,offset:{top:y,left:z},error:f,success:d}).isDefaultPrevented())if(y=-(b.height/2+s+(p+o)/2+l/2-k/2),z=-(b.width/2+s+(r+q)/2+n/2-m/2),e.element.hasClass("fbx-show"))if(FooBox.browser.supportsTransitions()){var A=e.FooBox.options.resizeSpeed/1e3,B="all "+A+"s ease-in-out";i.css({WebkitTransition:B,MozTransition:B,MsTransition:B,OTransition:B,transition:B}),i.css({height:b.height,width:b.width,"margin-top":y,"margin-left":z}),setTimeout(function(){i.css({WebkitTransition:"",MozTransition:"",MsTransition:"",OTransition:"",transition:""}),e.overflow(g,h,b,c),e.FooBox.raise("foobox.afterResize",{item:g,size:b}),a.isFunction(d)&&d(b)},e.FooBox.options.resizeSpeed)}else i.animate({height:b.height,width:b.width,"margin-top":y,"margin-left":z},e.FooBox.options.resizeSpeed,function(){e.overflow(g,h,b,c),e.FooBox.raise("foobox.afterResize",{item:g,size:b}),a.isFunction(d)&&d(b)});else i.css({height:b.height,width:b.width,"margin-top":y,"margin-left":z}),e.overflow(g,h,b,c),e.FooBox.raise("foobox.afterResize",{item:g,size:b}),a.isFunction(d)&&d()}catch(C){a.isFunction(f)&&f(C)}},this.overflow=function(a,b,c,d){var f=d.find(".fbx-item");1==a.overflow&&(c.width<.8*b.width||c.height<.8*b.height)||1==a.overflow&&0==a.proportion&&(c.width0?(c.element.data("fbx_instance",c),c.options.containerCssClass&&c.element.addClass(c.options.containerCssClass),c.setup.bind(),c.modal.init(b,c.options),FooBox.handlers.call(c,"init",c.element,c.options),c.raise("foobox.initialized"),a.isFunction(c.options.initCallback)&&c.options.initCallback.call(c)):c.destroy()},this.reinit=function(a){c.options=FooBox.options.merge(c.options,a||{}),c.items.init(!0),c.items.array.length>0?(c.setup.bind(),c.modal.reinit(c.options),FooBox.handlers.call(c,"reinit",c.options),c.raise("foobox.reinitialized")):c.destroy()},this.destroy=function(){FooBox.addons.call(c,"destroy"),FooBox.handlers.call(c,"destroy"),c.items.destroy(),c.modal.destroy(),c.element.removeClass("fbx-instance fbx-item").data({fbx_instance:null,fbx_p_instance:null}),c.id==FooBox.instances.length?FooBox.instances.splice(c.id-1,1):FooBox.instances[c.id-1]=null,c.raise("foobox.destroy")},this.setup={bind:function(){a(c.options.externalSelector).off("click.fooboxExternal").on("click.fooboxExternal",function(b){b.preventDefault();var c=a(this).data("foobox"),d=a(c),e=d.data("fbx_instance")||d.data("fbx_p_instance");return d.length>0&&e instanceof FooBox.Instance&&e.modal instanceof FooBox.Modal&&e.modal.show(!0),!1})}},this.items={array:[],indexes:{prev:-1,current:0,next:1,direction:"*",set:function(a){var b=c.items.indexes.current;a=a||0,a=a>c.items.array.length-1?0:0>a?c.items.array.length-1:a;var d=a-1,e=a+1;c.items.indexes.current=a,c.items.indexes.prev=0>d?c.items.array.length-1:d,c.items.indexes.next=e>c.items.array.length-1?0:e,c.items.indexes.direction=c.items.indexes._direction(b,a,c.items.array.length-1)},_direction:function(a,b,c){return 0==b&&a==c?">":b==c&&0==a?"<":b>a?">":a>b?"<":"*"}},new_array:function(b){b=b||!1;var d,e,f,g=0;if(1==b){if(c.items.array.length>0){for(var h=0;h0){d.filter&&a.isArray(d.filter.items)&&(e=d.filter.items.slice(0));var f=a.map(e,function(a){return a.$anchor?a.$anchor.get(0):null});a(f).not(c.options.excludes).off("click.item").filter(function(){return c.items.add(this)}).on("click.item",c.items.clicked),c.element.on("click.item",".fbx-link",c.items.clicked)}else c.element.find(c.options.selector).not(c.options.excludes).off("click.item").filter(function(){return c.items.add(this)}).on("click.item",c.items.clicked),c.element.on("click.item",".fbx-link",c.items.clicked);c.items.rel()},destroy:function(){c.element.off("click.item",".fbx-link",c.items.clicked);var b,d;for(d=0;d0&&e<=c.items.array.length-1&&(d=c.items.array[e]),d},parse:function(b,d){b=FooBox.isjQuery(b)?b:a(b);for(var e,f,g=0;gb&&1==c.items.array[b].error)return c.items.array[b];var e,f,g=FooBox.handlers.get(c,"html"),h=!1;if(null==g&&(g=new d(c)),null!==c.options.error.match(/^#/i)&&a(c.options.error).length>0)e=a(c.options.error),h=!0;else{var i=FooBox.format('

{0}

',c.options.error);e=a(i)}return f=new FooBox.Item(g.type,e.get(0),g),f.selector=1==h?c.options.error:null,f.index=b,f.error=!0,f.title=e.data("title")||null,f.description=e.data("description")||null,f.width=e.data("width")||240||null,f.height=e.data("height")||240||null,f.content=1==h?null:e,f.fullscreen=!0,f.handler=g,c.items.array[b]=f,f},first:function(a){for(var b=null,d=0;d1},clicked:function(a){return a.preventDefault(),c.items.indexes.set(this.index),c.modal.show(!0),!1}},this},FooBox.open=function(b){var c,d=null;if("object"==typeof b){var e=document.createElement("a");a(e).foobox(b),d=a(e).data("fbx_instance")}else"number"==typeof b?c=b:(c=parseInt(b||0),c=isNaN(c)?0:c),c=c>FooBox.instances.length-1?FooBox.instances.length-1:0>c?0:c,d=FooBox.instances[c];return null!=d&&d.modal instanceof FooBox.Modal?(d.modal.show(!0),d):null},FooBox.close=function(){var a,b=[],c=null;for(a=0;a0&&a.maxHeight>0&&(a.width>a.maxWidth||a.height>a.maxHeight)){var c=a.width>a.height?a.maxWidth/a.width:a.maxHeight/a.height;a.width*=c,a.height*=c}return new b.Size(a.width,a.height)}return new b.Size(0,0)},this.hasChanged=function(a){if(b.isjQuery(a.element)){var c=d.FooBox.options.images.findUrl(d.FooBox,a.element);return a.url!=c}return!1}},b.handlers.register(b.ImageHandler,c)}(jQuery,window.FooBox),function(a,b){var c={keyboard:{enabled:!0,preventDefault:!1,stopPropagation:!1}};b.Keyboard=function(a){this.FooBox=a;var c=this;this.preinit=function(a){c.handlers.unbind(!0),a.on({"foobox.initialized foobox.reinitialized":c.handlers.initialized,"foobox.setupHtml":c.handlers.setupHtml})},this.destroy=function(){c.handlers.unbind(!0)},this.handlers={unbind:function(a){a=a||!1,a&&c.FooBox.element.off({"foobox.initialized foobox.reinitialized":c.handlers.initialized,"foobox.setupHtml":c.handlers.setupHtml}),c.FooBox.element.off("foobox.afterLoad",c.handlers.afterLoad),b.isjQuery(c.FooBox.modal.element)&&c.FooBox.modal.element.off("keydown.foobox",c.handlers.onKeydown)},initialized:function(){c.handlers.unbind(),1==c.FooBox.options.keyboard.enabled&&(c.FooBox.element.on("foobox.afterLoad",c.handlers.afterLoad),b.isjQuery(c.FooBox.modal.element)&&c.FooBox.modal.element.on("keydown.foobox",c.handlers.onKeydown))},setupHtml:function(a){a.fb.modal.attr("tabindex",0)},afterLoad:function(a){a.fb.modal.focus()},onKeydown:function(a){var b=c.FooBox.modal,d=c.FooBox.options.keyboard;b.element.hasClass("fbx-show")&&(b.element.hasClass("fbx-fullscreen-mode")||27!==a.which?c.FooBox.items.multiple()&&37===a.which?b.prev():c.FooBox.items.multiple()&&39===a.which&&b.next():b.close(),1==d.preventDefault&&a.preventDefault(),1==d.stopPropagation&&a.stopPropagation(),c.FooBox.raise("foobox.keydown",{keyCode:a.which}))}}},b.addons.register(b.Keyboard,c)}(jQuery,window.FooBox),function(a,b){var c={hideNavOnMobile:!1,resizeTimeout:300,breakpoints:{phone:812,tablet:1366},iosInterval:200};b.BPInfo=function(b){var c=a(window);this.width=c.width(),this.height=c.height(),this.orientation=this.width>this.height?"fbx-landscape":"fbx-portrait";var d,e=null;if(a.isArray(b))for(var f=0;f=c?(e=!0,d.iosRedraw()):(null==e||1==e)&&c>=h&&(e=!1,d.iosRedraw()),d.timers.ios.start(d.handlers.ios,d.FooBox.options.iosInterval)}},this.setup={breakpoints:function(){d.breakpoint.values=[],d.breakpoint.names="";for(var a in d.FooBox.options.breakpoints)d.FooBox.options.breakpoints.hasOwnProperty(a)&&(d.breakpoint.values.push({name:d.fixName(a),width:d.FooBox.options.breakpoints[a]}),d.breakpoint.names+=d.fixName(a)+" ");d.breakpoint.values.sort(function(a,b){return a.width-b.width})}},this.iosRedraw=function(){window.scrollTo(0,document.body.scrollTop),a(window).trigger("resize")},this.fixName=function(a){return/^fbx-[a-zA-Z0-9]/.test(a)?a:"fbx-"+a},this.style=function(){var a=new b.BPInfo(d.breakpoint.values),c=d.FooBox.modal.element;c.removeClass(d.breakpoint.names).removeClass("fbx-desktop fbx-landscape fbx-portrait").addClass(a.breakpoint).addClass(a.orientation),d.FooBox.options.hideNavOnMobile===!0?c.addClass("fbx-no-nav"):c.removeClass("fbx-no-nav")}},b.Responsive.metaCheck=function(){var b=a("meta[name=viewport]"),c=b.attr("content");if(b.length>0&&"string"==typeof c){for(var d=c.split(","),e=!1,f=!1,g=0;g",{"class":"fbx-caption"}),e=a("",{"class":"fbx-open-caption",html:"…"}).on("click.captions",d.handlers.toggleCaptions);"string"==typeof b.fb.options.modalClass&&-1!=b.fb.options.modalClass.indexOf("fbx-sticky-caption")?b.fb.modal.append(c,e):(b.fb.modal.find(".fbx-stage").append(c),b.fb.modal.find(".fbx-inner").append(e))},setupOptions:function(a){a.fb.modal.find(".fbx-caption").addClass(d.animation())},beforeClose:function(a){1!=a.fb.options.captions.onlyShowOnHover&&a.fb.modal.find(".fbx-caption").addClass("fbx-hide-caption")},beforeLoad:function(a){1!=a.fb.options.captions.onlyShowOnHover&&a.fb.modal.find(".fbx-caption").addClass(d.animation())},afterLoad:function(a){var b=a.fb.item;return!b||b.error||b.captionLoaded||(a.fb.instance.raise("foobox.alterCaption",{element:a.fb.element,item:b}),b.captionLoaded=!0),1==a.fb.options.captions.onlyShowOnHover?void d.update():void(0==a.fb.options.captions.onlyShowOnClick&&d.show())},onError:function(a){a.fb.modal.find(".fbx-caption").addClass(d.animation())},parseItem:function(c){var e=c.fb.options.captions;if(c.fb.item.captions&&0!=e.enabled){var f,g,h="";if(null!=c.fb.element){var i=a(c.fb.element).data("titleSource")||a(c.fb.instance.element).data("titleSource")||e.titleSource,j=a(c.fb.element).data("descSource")||a(c.fb.instance.element).data("descSource")||e.descSource;"none"!=i&&(f=c.fb.element.data("captionTitle")||c.fb.element.data("title")||d.text(c.fb.element,i)),"none"!=j&&(g=c.fb.element.data("captionDesc")||c.fb.element.data("description")||d.text(c.fb.element,j))}else f=c.fb.item.title,g=c.fb.item.description;f=null==f||"undefined"==typeof f?"":f+"",g=null==g||"undefined"==typeof g?"":g+"",f&&f==g&&(g=null),h="string"==typeof f&&f.length>0?b.format('
{0}
',f):h,h="string"==typeof g&&g.length>0?h+b.format('
{0}
',g):h,c.fb.item.title=f,c.fb.item.description=g,c.fb.item.caption=h,c.fb.instance.raise("foobox.createCaption",{element:c.fb.element,item:c.fb.item})}}},this.text=function(b,c){var e;switch(c){case"find":e=a.trim(b.data("enviraCaption")||b.data("title")||b.attr("title")||b.find("img:first").data("title")||b.find("img:first").data("alt")||b.find("img:first").attr("title")||b.find("img:first").attr("alt"));break;case"image_find":e=a.trim(b.find("img:first").data("title")||b.find("img:first").data("alt")||b.find("img:first").attr("title")||b.find("img:first").attr("alt"));break;case"image":e=a.trim(b.find("img:first").data("title")||b.find("img:first").attr("title"));break;case"image_alt":e=a.trim(b.find("img:first").data("alt")||b.find("img:first").attr("alt"));break;case"anchor":e=a.trim(b.data("enviraCaption")||b.data("title")||b.attr("title"));break;default:e=null}return d.FooBox.options.captions.prettify&&(e=d.prettifier(e)),e},this.animation=function(){switch(d.FooBox.options.captions.animation){case"fade":return"fbx-fade-caption";case"slide":return"fbx-slide-caption";default:return"fbx-hide-caption"}},this.hide=function(){var a=d.FooBox.items.current(),b=d.FooBox.modal.element.find(".fbx-caption");return d.FooBox.options.captions.enabled&&a.captions&&"string"==typeof a.caption&&0!=a.caption.length?(b.addClass(d.animation()),void d.FooBox.raise("foobox.captionsHide",{item:a})):void b.addClass("fbx-hide-caption")},this.show=function(){var a=d.FooBox,c=a.items.current(),e=a.modal.element.find(".fbx-caption");return!a.options.captions.enabled||!c.captions||"string"!=typeof c.caption||0==c.caption.length||a.modal.element.hasClass("fbx-captions-hidden")||b.isjQuery(c.element)&&c.element.hasClass("no-captions")?void e.addClass("fbx-hide-caption"):(d.update(),e.removeClass("fbx-fade-caption fbx-slide-caption fbx-hide-caption"),void d.FooBox.raise("foobox.captionsShow",{item:c}))},this.update=function(){var c=d.FooBox.items.current(),e=d.FooBox.modal.element.find(".fbx-caption");e.html(c.caption).find('a[href^="#"]').filter(function(){var c=a(this).attr("href"),d=a(c),e=d.data("fbx_instance")||d.data("fbx_p_instance");return d.length>0&&e instanceof b.Instance?(a(this).data("hrefTarget",d.get(0)),!0):!1}).off("click.captions").on("click.captions",function(c){c.preventDefault();var e=a(this).data("hrefTarget"),f=a(e).data("fbx_instance")||a(e).data("fbx_p_instance");return f instanceof b.Instance&&(d.FooBox.modal.close(),f.items.indexes.set(e.index),f.modal.show()),!1}),a("
",{"class":"fbx-close-caption",html:"×"}).on("click.captions",d.handlers.toggleCaptions).prependTo(e)},this.prettifier=function(a){return"string"!=typeof a?null:(a=a.replace(/\s*-\d+/g,"").replace(/\s*_\d+/g,"").replace(/-/g," ").replace(/_/g," "),a=a.replace(/\w\S*/g,function(a){return-1!=a.indexOf("#")?a:a.charAt(0).toUpperCase()+a.substr(1).toLowerCase()}))}},b.addons.register(b.Captions,c)}(jQuery,window.FooBox),function(a,b){var c={wordpress:{enabled:!1}};b.Wordpress=function(c){this.FooBox=c;var d=this;this.preinit=function(a){d.handlers.unbind(!0),a.on("foobox.createCaption",d.handlers.onCreateCaption)},this.destroy=function(){d.handlers.unbind(!0)},this.handlers={unbind:function(a){a=a||!1,a&&d.FooBox.element.off("foobox.createCaption",d.handlers.onCreateCaption)},onCreateCaption:function(c){var d=c.fb.options,e=c.fb.instance.element,f=c.fb.item.element,g="",h=c.fb.item.title,i=c.fb.item.description;if(1==d.wordpress.enabled&&b.isjQuery(f)){var j=f.data("captionTitle")||f.data("title"),k=f.data("captionDesc")||f.data("description");if(e.hasClass("gallery"))d.captions.overrideTitle===!1&&(h=j||f.parents(".gallery-item:first").find(".wp-caption-text:first").html()||f.parents(".gallery-item:first").find(".gallery-caption:first").html()||h||""),d.captions.overrideDesc===!1&&(i=k||f.find("img").attr("alt")||i||"");else if(e.hasClass("wp-caption")||f.hasClass("wp-caption"))d.captions.overrideTitle===!1&&(h=j||f.find("img").attr("title")||f.parents(".wp-caption:first").find(".wp-caption-text:first").html()||h||""),d.captions.overrideDesc===!1&&(i=k||f.find("img").attr("alt")||i||"");else if(f.parents(".wp-caption:first").length>0)d.captions.overrideTitle===!1&&(h=j||f.parents(".wp-caption:first").find("img").attr("title")||f.parents(".wp-caption:first").find(".wp-caption-text:first").html()||h||""),d.captions.overrideDesc===!1&&(i=k||f.parents(".wp-caption:first").find("img").attr("alt")||i||"");else if(e.hasClass("tiled-gallery"))d.captions.overrideTitle===!1&&(h=j||f.parents(".tiled-gallery-item:first").find(".tiled-gallery-caption").html()||f.find("img").data("image-title")||f.find("img").attr("title")||h||""),d.captions.overrideDesc===!1&&(i=k||a.trim(f.find("img").data("image-description")).replace(/(^

)|(<\/p>$)/gi,"")||i||"");else{if(!e.hasClass("wp-block-gallery")&&!e.hasClass("wp-block-image"))return;d.captions.overrideTitle===!1&&(h=j||f.parents("figure:first").find("figcaption").html()||h||""),d.captions.overrideDesc===!1&&(i=k||i||"")}h+="",i+="",h=h||"",i=i||"";var l=a("

"),m=l.html(h).text(),n=l.html(i).text();(a.trim(h)==a.trim(i)||m==n)&&(i=null),g="string"==typeof h&&h.length>0?b.format('
{0}
',h):g,g="string"==typeof i&&i.length>0?g+b.format('
{0}
',i):g,c.fb.item.title=h,c.fb.item.description=i,c.fb.item.caption=g}}}},b.addons.register(b.Wordpress,c)}(jQuery,window.FooBox),function(a,b){var c={pan:{enabled:!0,showOverview:!0,position:"fbx-top-right"}};b.Pan=function(c){this.FooBox=c;var d,e,f,g,h=this,i=!1,j=!1,k=null,l=null,m=null,n=null,o=null,p=0;this.preinit=function(a){h.handlers.unbind(!0),a.on({"foobox.initialized foobox.reinitialized":h.handlers.initialized})},this.destroy=function(){h.handlers.unbind(!0)},this.setOverview=function(){var a=parseInt(n.css("max-width")),b=parseInt(n.css("max-height")),c=a/k.width,d=b/k.height;p=c>d?d:c;var e=k.width*p,f=k.height*p;n.width(e).height(f).css("background-image","url("+k.url+")")},this.setViewport=function(){var a=m.width(),b=m.height(),c=a*p,d=b*p;o.width(c).height(d)},this.disableCaptionImageClick=function(){var a=h.FooBox.modal.element,c=b.objects.get("addons",h.FooBox,function(a){return a instanceof b.Captions});c&&a.find(".fbx-item-current, .fbx-item-next").off("click.captions",c.handlers.toggleCaptions)},this.enableCaptionImageClick=function(){var a=h.FooBox.modal.element,c=b.objects.get("addons",h.FooBox,function(a){return a instanceof b.Captions});c&&a.find(".fbx-item-current, .fbx-item-next").on("click.captions",c.handlers.toggleCaptions)},this.handlers={unbind:function(a){a=a||!1,a&&h.FooBox.element.off({"foobox.initialized foobox.reinitialized":h.handlers.initialized}),h.FooBox.element.off({"foobox.afterLoad":h.handlers.onAfterLoad,"foobox.showOverflow":h.handlers.onShowOverflow,"foobox.hideOverflow foobox.beforeLoad":h.handlers.onHideOverflow}),h.FooBox.modal instanceof b.Modal&&b.isjQuery(h.FooBox.modal.element)&&h.FooBox.modal.element.find(".fbx-stage").off({mousedown:h.handlers.onMouseDown,mousemove:h.handlers.onMouseMove,mouseup:h.handlers.onMouseUp}).removeClass("fbx-pannable fbx-panning")},initialized:function(a){h.handlers.unbind(),a.fb.options.pan.enabled===!0&&h.FooBox.element.on({"foobox.close":h.handlers.onMouseUp,"foobox.afterLoad":h.handlers.onAfterLoad,"foobox.showOverflow":h.handlers.onShowOverflow,"foobox.hideOverflow foobox.beforeLoad":h.handlers.onHideOverflow})},onAfterLoad:function(a){i===!0&&"image"==a.fb.item.handler.type&&(h.setOverview(),h.setViewport())},onShowOverflow:function(b){"image"==b.fb.item.handler.type&&(i===!0?(h.setOverview(),h.setViewport()):(i=!0,h.disableCaptionImageClick(),k=b.fb.item,m=h.FooBox.modal.element.addClass("fbx-pannable-item").find(".fbx-stage").on({mousedown:h.handlers.onMouseDown,mousemove:h.handlers.onMouseMove,"mouseup mouseleave":h.handlers.onMouseUp}).addClass("fbx-pannable"),l=b.fb.container,b.fb.options.pan.showOverview===!0&&(n=a("
",{"class":"fbx-pan-overview"}).addClass(b.fb.options.pan.position).on("click",h.handlers.onOverviewClick).appendTo(m),o=a("
",{"class":"fbx-pan-viewport"}).appendTo(n),l.on("scroll",h.handlers.onScroll),h.setOverview(),h.setViewport())))},onHideOverflow:function(a){i===!0&&(i=!1,h.enableCaptionImageClick(),a.fb.options.pan.showOverview===!0&&n.remove(),l.off("scroll",h.handlers.onScroll),m.off({mousedown:h.handlers.onMouseDown,mousemove:h.handlers.onMouseMove,"mouseup mouseleave":h.handlers.onMouseUp}).removeClass("fbx-pannable fbx-panning"),h.FooBox.modal.element.removeClass("fbx-pannable-item"))},onMouseDown:function(a){if(i===!0){a.preventDefault(),m.addClass("fbx-panning");var b=l.get(0);j=!0,d=a.pageX,e=a.pageY,f=b.scrollLeft,g=b.scrollTop}},onMouseMove:function(a){if(j===!0&&i===!0){var b=l.get(0);b.scrollLeft=f-(a.pageX-d),b.scrollTop=g-(a.pageY-e)}},onMouseUp:function(){i===!0&&(j=!1,m.removeClass("fbx-panning"),d=0,e=0,f=0,g=0)},onScroll:function(){var a=l.get(0),b=a.scrollTop/k.height*100,c=a.scrollLeft/k.width*100;o.css({top:b+"%",left:c+"%"})},onOverviewClick:function(b){var c=a(this).offset(),d=(b.pageX-c.left)/p,e=(b.pageY-c.top)/p,f=d-l.width()/2,g=e-l.height()/2;l.animate({scrollTop:g,scrollLeft:f},300)}}},b.addons.register(b.Pan,c)}(jQuery,window.FooBox),function(a,b){var c={swipe:{enabled:!0,min:80}};b.Swipe=function(a){this.FooBox=a,this.isMoving=!1;var c,d=this;this.preinit=function(a){d.handlers.unbind(!0),a.on("foobox.initialized foobox.reinitialized",d.handlers.initialized)},this.destroy=function(){d.handlers.unbind(!0)},this.handlers={unbind:function(a){a=a||!1,a&&d.FooBox.element.off("foobox.initialized foobox.reinitialized",d.handlers.initialized),d.FooBox.modal instanceof b.Modal&&b.isjQuery(d.FooBox.modal.element)&&d.FooBox.modal.element.off({touchstart:d.handlers.onTouchStart,touchmove:d.handlers.onTouchMove})},initialized:function(a){d.handlers.unbind(),a.fb.options.swipe.enabled===!0&&a.fb.modal.on("touchstart",d.handlers.onTouchStart)},onTouchStart:function(a){var b=a.originalEvent.touches||a.touches;1==b.length&&d.FooBox.items.multiple()&&(c=b[0].pageX,d.isMoving=!0,d.FooBox.modal.element.on("touchmove",d.handlers.onTouchMove))},onTouchMove:function(a){if(d.isMoving){var b=a.originalEvent.touches||a.touches,e=b[0].pageX,f=c-e;Math.abs(f)>=d.FooBox.options.swipe.min&&(d.cancelTouch(),f>0?(d.FooBox.raise("foobox.swipeRight"),d.FooBox.modal.next()):(d.FooBox.raise("foobox.swipeLeft"),d.FooBox.modal.prev()))}}},this.cancelTouch=function(){d.FooBox.modal.element.off("touchmove",d.handlers.onTouchMove),c=null,d.isMoving=!1}},b.addons.register(b.Swipe,c)}(jQuery,window.FooBox),function(a,b,c){if(!c)return void console.log("No configuration for FooBox found.");if(c.o&&c.customOptions&&a.extend(!0,c.o,c.customOptions),c.init=function(){if(a(".fbx-link").removeClass("fbx-link"),a.isFunction(c.pre))try{c.pre(a)}catch(b){console.error(b)}if(c.disableOthers&&(a("a.thickbox").removeClass("thickbox").unbind("click"),a("#TB_overlay, #TB_load, #TB_window").remove()),a.each(c.selectors,function(b,d){a(d).foobox(c.o)}),c.disableOthers&&a(".fbx-link").unbind(".prettyphoto").unbind(".fb"),a.isFunction(c.post))try{c.post(a)}catch(b){console.error(b)}},b.once=function(){var b=a("body");c.preloadFont&&b.append(a("",{"class":"foobox_font_preload",text:"f"})),c.init(),a(document).trigger("foobox-after-init"),b.on("post-load",c.init)},c.ready?b.ready(b.once):a(b.once),a.isFunction(c.custom))try{c.custom(a)}catch(d){console.error(d)}}(jQuery,window.FooBox,window.FOOBOX); (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.raterJs=f()}})(function(){var define,module,exports;return (function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 1){ throw new Error("step must be a number between 0 and 1"); }} var stars=options.max||5; var starSize=options.starSize||16; var step=options.step||1; var onHover=options.onHover; var onLeave=options.onLeave; var rating; var myRating; var elem=options.element; elem.classList.add("star-rating"); var div=document.createElement("div"); div.classList.add("star-value"); div.style.backgroundSize=starSize + "px"; elem.appendChild(div); elem.style.width=starSize * stars + "px"; elem.style.height=starSize + "px"; elem.style.backgroundSize=starSize + "px"; var callback=options.rateCallback; var disabled = !!options.readOnly; var disableText; var isRating=false; var isBusyText=options.isBusyText; var currentRating; var ratingText; if(typeof options.disableText!=="undefined"){ disableText=options.disableText; }else{ disableText="{rating}/{maxRating}"; } if(typeof options.ratingText!=="undefined"){ ratingText=options.ratingText; }else{ ratingText="{rating}/{maxRating}"; } if(options.rating){ setRating(options.rating); }else{ var dataRating=elem.dataset.rating; if(dataRating){ setRating(+dataRating); }} if(typeof rating==="undefined"){ elem.querySelector(".star-value").style.width="0px"; } if(disabled){ disable(); } function onMouseMove(e){ if(disabled===true||isRating===true){ return; } var xCoor=e.offsetX; var width=elem.offsetWidth; var percent=xCoor / width * 100; if(percent < 101){ if(step===1){ currentRating=Math.ceil(percent / 100 * stars); }else{ var rat=percent / 100 * stars; for (var i=0;; i +=step){ if(i >=rat){ currentRating=i; break; }} } elem.querySelector(".star-value").style.width=currentRating / stars * 100 + "%"; if(showToolTip){ var toolTip=ratingText.replace("{rating}", currentRating); toolTip=toolTip.replace("{maxRating}", stars); elem.setAttribute("data-title", toolTip); } if(typeof onHover==="function"){ onHover(currentRating, rating); }} } function onStarOut(e){ if(typeof rating!=="undefined"){ elem.querySelector(".star-value").style.width=rating / stars * 100 + "%"; elem.setAttribute("data-rating", rating); }else{ elem.querySelector(".star-value").style.width="0%"; elem.removeAttribute("data-rating"); } if(typeof onLeave==="function"){ onLeave(currentRating, rating); }} function onStarClick(e){ if(disabled===true){ return; } if(isRating===true){ return; } if(typeof callback!=="undefined"){ isRating=true; myRating=currentRating; if(typeof isBusyText==="undefined"){ elem.removeAttribute("data-title"); }else{ elem.setAttribute("data-title", isBusyText); } callback.call(this, myRating, function (){ if(disabled===false){ elem.removeAttribute("data-title"); } isRating=false; }); }} function disable(){ disabled=true; if(showToolTip&&!!disableText){ var toolTip=disableText.replace("{rating}", rating); toolTip=toolTip.replace("{maxRating}", stars); elem.setAttribute("data-title", toolTip); }else{ elem.removeAttribute("data-title"); }} function enable(){ disabled=false; elem.removeAttribute("data-title"); } function setRating(value){ if(value===-1){ value=undefined; } if(typeof value!=="number"&&typeof value!=="undefined"){ throw new Error("Value must be a number or undefined."); } if(value < 0||value > stars){ var ratingError=new Error("Value too high. Please set a rating of " + stars + " or below."); ratingError.name="ratingError"; throw ratingError; } rating=value; elem.querySelector(".star-value").style.width=value / stars * 100 + "%"; elem.setAttribute("data-rating", value); } function getRating(){ return rating; } function dispose(){ elem.removeEventListener("mousemove", onMouseMove); elem.removeEventListener("mouseleave", onStarOut); elem.removeEventListener("click", onStarClick); } elem.addEventListener("mousemove", onMouseMove); elem.addEventListener("mouseleave", onStarOut); var module={ setRating: setRating, getRating: getRating, disable: disable, enable: enable, dispose: dispose }; elem.addEventListener("click", onStarClick.bind(module)); return module; };},{"./style.css":2}],2:[function(require,module,exports){ var css=".star-rating {\n width: 0;\n position: relative;\n display: inline-block;\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDguOSIgaGVpZ2h0PSIxMDMuNiIgdmlld0JveD0iMCAwIDEwOC45IDEwMy42Ij48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2UzZTZlNjt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPnN0YXJfMDwvdGl0bGU+PGcgaWQ9IkxheWVyXzIiIGRhdGEtbmFtZT0iTGF5ZXIgMiI+PGcgaWQ9IkxheWVyXzEtMiIgZGF0YS1uYW1lPSJMYXllciAxIj48cG9seWdvbiBjbGFzcz0iY2xzLTEiIHBvaW50cz0iMTA4LjkgMzkuNiA3MS4zIDM0LjEgNTQuNCAwIDM3LjYgMzQuMSAwIDM5LjYgMjcuMiA2Ni4xIDIwLjggMTAzLjYgNTQuNCA4NS45IDg4LjEgMTAzLjYgODEuNyA2Ni4xIDEwOC45IDM5LjYiLz48L2c+PC9nPjwvc3ZnPgo=);\n background-position: 0 0;\n background-repeat: repeat-x;\n cursor: pointer;\n}\n.star-rating[data-title]:hover:after {\n content: attr(data-title);\n padding: 4px 8px;\n color: #333;\n position: absolute;\n left: 0;\n top: 100%;\n z-index: 20;\n white-space: nowrap;\n -moz-border-radius: 5px;\n -webkit-border-radius: 5px;\n border-radius: 5px;\n -moz-box-shadow: 0px 0px 4px #222;\n -webkit-box-shadow: 0px 0px 4px #222;\n box-shadow: 0px 0px 4px #222;\n background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);\n background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #eeeeee),color-stop(1, #cccccc));\n background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);\n background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);\n background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);\n background-image: -o-linear-gradient(top, #eeeeee, #cccccc);\n}\n.star-rating .star-value {\n height: 100%;\n position: absolute;\n}\n.star-rating .star-value {\n position: absolute;\n height: 100%;\n width: 100%;\n background: url('data:image/svg+xml;base64,PHN2ZwoJeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTA4LjkiIGhlaWdodD0iMTAzLjYiIHZpZXdCb3g9IjAgMCAxMDguOSAxMDMuNiI+Cgk8ZGVmcz4KCQk8c3R5bGU+LmNscy0xe2ZpbGw6I2YxYzk0Nzt9PC9zdHlsZT4KCTwvZGVmcz4KCTx0aXRsZT5zdGFyMTwvdGl0bGU+Cgk8ZyBpZD0iTGF5ZXJfMiIgZGF0YS1uYW1lPSJMYXllciAyIj4KCQk8ZyBpZD0iTGF5ZXJfMS0yIiBkYXRhLW5hbWU9IkxheWVyIDEiPgoJCQk8cG9seWdvbiBjbGFzcz0iY2xzLTEiIHBvaW50cz0iNTQuNCAwIDcxLjMgMzQuMSAxMDguOSAzOS42IDgxLjcgNjYuMSA4OC4xIDEwMy42IDU0LjQgODUuOSAyMC44IDEwMy42IDI3LjIgNjYuMSAwIDM5LjYgMzcuNiAzNC4xIDU0LjQgMCIvPgoJCTwvZz4KCTwvZz4KPC9zdmc+Cg==');\n background-repeat: repeat-x;\n}\n"; (require("browserify-css").createStyle(css, { "href": "lib\\style.css" }, { "insertAt": "bottom" })); module.exports=css; },{"browserify-css":3}],3:[function(require,module,exports){ 'use strict'; var styleElementsInsertedAtTop=[]; var insertStyleElement=function(styleElement, options){ var head=document.head||document.getElementsByTagName('head')[0]; var lastStyleElementInsertedAtTop=styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1]; options=options||{}; options.insertAt=options.insertAt||'bottom'; if(options.insertAt==='top'){ if(!lastStyleElementInsertedAtTop){ head.insertBefore(styleElement, head.firstChild); }else if(lastStyleElementInsertedAtTop.nextSibling){ head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling); }else{ head.appendChild(styleElement); } styleElementsInsertedAtTop.push(styleElement); }else if(options.insertAt==='bottom'){ head.appendChild(styleElement); }else{ throw new Error('Invalid value for parameter \'insertAt\'. Must be \'top\' or \'bottom\'.'); }}; module.exports={ createLink: function(href, attributes){ var head=document.head||document.getElementsByTagName('head')[0]; var link=document.createElement('link'); link.href=href; link.rel='stylesheet'; for (var key in attributes){ if(! attributes.hasOwnProperty(key)){ continue; } var value=attributes[key]; link.setAttribute('data-' + key, value); } head.appendChild(link); }, createStyle: function(cssText, attributes, extraOptions){ extraOptions=extraOptions||{}; var style=document.createElement('style'); style.type='text/css'; for (var key in attributes){ if(! attributes.hasOwnProperty(key)){ continue; } var value=attributes[key]; style.setAttribute('data-' + key, value); } if(style.sheet){ style.innerHTML=cssText; style.sheet.cssText=cssText; insertStyleElement(style, { insertAt: extraOptions.insertAt }); }else if(style.styleSheet){ insertStyleElement(style, { insertAt: extraOptions.insertAt }); style.styleSheet.cssText=cssText; }else{ style.appendChild(document.createTextNode(cssText)); insertStyleElement(style, { insertAt: extraOptions.insertAt }); }} };},{}]},{},[1])(1) }); document.addEventListener('DOMContentLoaded', function(event){ var yasrRaterInDom=document.getElementsByClassName('yasr-rater-stars'); if(yasrRaterInDom.length > 0){ yasrSetRatingOnLoad(yasrRaterInDom); } var yasrRaterVVInDom=document.getElementsByClassName('yasr-rater-stars-visitor-votes'); if(yasrRaterVVInDom.length > 0){ yasrVisitorVotesFront(yasrRaterVVInDom); } var yasrMultiSetVisitorInDom=document.getElementsByClassName('yasr-multiset-visitors-rater'); if(yasrMultiSetVisitorInDom.length > 0){ yasrRaterVisitorsMultiSet(yasrMultiSetVisitorInDom) } if(yasrRaterVVInDom){ if(yasrCommonData.visitorStatsEnabled==='yes'){ var yasrStatsInDom=document.getElementsByClassName('yasr-dashicons-visitor-stats'); if(yasrStatsInDom){ yasrDrawTipsProgress (yasrStatsInDom); }} } if(typeof yasrMostHighestRanking!=='undefined'){ document.getElementById('yasr-highest-rated-posts').style.display='none'; }}); function yasrShowHighest (){ document.getElementById('yasr-most-rated-posts').style.display='none'; document.getElementById('yasr-highest-rated-posts').style.display=''; } function yasrShowMost (){ document.getElementById('yasr-highest-rated-posts').style.display='none'; document.getElementById('yasr-most-rated-posts').style.display=''; } function yasrDrawTipsProgress (yasrStatsInDom){ var htmlIdChecked=false; for (var i=0; i < yasrStatsInDom.length; i++){ (function (i){ var htmlId='#'+yasrStatsInDom.item(i).id; var postId=yasrStatsInDom.item(i).getAttribute('data-postid'); var data={ action: 'yasr_stats_visitors_votes', post_id: postId }; var initialContent='Loading...'; tippy(htmlId, { content: initialContent, theme: 'yasr', arrow: 'true', arrowType: 'round', onShow: function onShow(tip){ if(htmlId!==htmlIdChecked){ jQuery.post(yasrCommonData.ajaxurl, data, function (response){ response=JSON.parse(response); tip.setContent(response); }); }}, onHidden: function onHidden(){ htmlIdChecked=htmlId; }}); })(i); }} function yasrSetRaterValue (starSize, htmlId){ starSize=parseInt(starSize); raterJs({ starSize: starSize, step: 0.1, showToolTip: false, readOnly: true, element: document.getElementById(htmlId), }); } function yasrSetRatingOnLoad (yasrRatingsInDom){ for (var i=0; i < yasrRatingsInDom.length; i++){ var htmlId=yasrRatingsInDom.item(i).id; var starSize=yasrRatingsInDom.item(i).getAttribute('data-rater-starsize'); yasrSetRaterValue(starSize, htmlId); }} function yasrVisitorVotesFront (yasrRaterVVInDom){ for (var i=0; i < yasrRaterVVInDom.length; i++){ (function(i){ var postId=yasrRaterVVInDom.item(i).getAttribute('data-rater-postid'); var htmlId=yasrRaterVVInDom.item(i).id; var uniqueId=htmlId.replace('yasr-visitor-votes-rater-', ''); var starSize=parseInt(yasrRaterVVInDom.item(i).getAttribute('data-rater-starsize')); var readonly=yasrRaterVVInDom.item(i).getAttribute('data-rater-readonly'); var nonce=yasrRaterVVInDom.item(i).getAttribute('data-rater-nonce'); var isSingular=yasrRaterVVInDom.item(i).getAttribute('data-issingular'); readonly=yasrTrueFalseStringConvertion(readonly); isSingular=yasrTrueFalseStringConvertion (isSingular); raterJs({ starSize: starSize, step: 1, showToolTip: false, readOnly: readonly, element: document.getElementById(htmlId), rateCallback: function rateCallback(rating, done){ document.getElementById('yasr-visitor-votes-container-after-stars-' + uniqueId).innerHTML=yasrCommonData.loaderHtml; rating=rating.toFixed(1); rating=parseFloat(rating); var data={ action: 'yasr_send_visitor_rating', rating: rating, post_id: postId, nonce_visitor: nonce, is_singular:isSingular }; this.setRating(rating); this.disable(); jQuery.post(yasrCommonData.ajaxurl, data, function (response){ response=JSON.parse(response); document.getElementById('yasr-visitor-votes-container-after-stars-' + uniqueId).innerHTML=response; }); done(); }}); })(i); }} function yasrRaterVisitorsMultiSet (yasrMultiSetVisitorInDom){ var ratingObject=""; var ratingArray=[]; for (var i=0; i < yasrMultiSetVisitorInDom.length; i++){ (function (i){ var htmlId=yasrMultiSetVisitorInDom.item(i).id; var readonly=yasrMultiSetVisitorInDom.item(i).getAttribute('data-rater-readonly'); readonly=yasrTrueFalseStringConvertion(readonly); var elem=document.querySelector("#" + htmlId); raterJs({ starSize: 16, step: 1, showToolTip: false, readOnly: readonly, element: elem, rateCallback: function rateCallback(rating, done){ var postId=elem.getAttribute('data-rater-postid'); var setId=elem.getAttribute('data-rater-setid'); var setIdField=elem.getAttribute('data-rater-set-field-id'); rating=rating.toFixed(1); var vote=parseInt(rating); this.setRating(vote); ratingObject={ postid: postId, setid: setId, field: setIdField, rating: vote }; ratingArray.push(ratingObject); done(); }}); })(i); } jQuery('.yasr-send-visitor-multiset').on('click', function(){ var multiSetPostId=this.getAttribute('data-postid'); var multiSetId=this.getAttribute('data-setid'); jQuery('#yasr-send-visitor-multiset-'+multiSetPostId+'-'+multiSetId).hide(); jQuery('#yasr-loader-multiset-visitor-'+multiSetPostId+'-'+multiSetId).show(); var data={ action: 'yasr_visitor_multiset_field_vote', nonce: yasrMultiSetData.nonceVisitor, post_id: multiSetPostId, rating: ratingArray, set_type: multiSetId }; jQuery.post(yasrCommonData.ajaxurl, data, function(response){ jQuery('#yasr-loader-multiset-visitor-'+multiSetPostId+'-'+multiSetId).text(response); }); }); } function yasrTrueFalseStringConvertion(string){ if(typeof string==='undefined'||string===null||string===''){ string=true; } if(string==='true'||string==='1'){ string=true; } if(string==='false'||string==='0'){ string=false; } return string; }; (function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.tippy=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var r=e.ownerDocument.defaultView,a=r.getComputedStyle(e,null);return t?a[t]:a}function r(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function a(e){if(!e)return document.body;switch(e.nodeName){case'HTML':case'BODY':return e.ownerDocument.body;case'#document':return e.body;}var p=t(e),o=p.overflow,i=p.overflowX,n=p.overflowY;return /(auto|scroll|overlay)/.test(o+n+i)?e:a(r(e))}function p(e){return 11===e?ht:10===e?bt:ht||bt}function o(e){if(!e)return document.documentElement;for(var r=p(10)?document.body:null,a=e.offsetParent||null;a===r&&e.nextElementSibling;)a=(e=e.nextElementSibling).offsetParent;var i=a&&a.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TH','TD','TABLE'].indexOf(a.nodeName)&&'static'===t(a,'position')?o(a):a:e?e.ownerDocument.documentElement:document.documentElement}function n(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||o(e.firstElementChild)===e)}function s(e){return null===e.parentNode?e:s(e.parentNode)}function l(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var r=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,a=r?e:t,p=r?t:e,i=document.createRange();i.setStart(a,0),i.setEnd(p,0);var d=i.commonAncestorContainer;if(e!==d&&t!==d||a.contains(p))return n(d)?d:o(d);var c=s(e);return c.host?l(c.host,t):l(e,s(t).host)}function d(e){var t=1=r.clientWidth&&a>=r.clientHeight}),d=0')):t.className='tippy-arrow',t}function ne(){var e=ee();return e.className='tippy-backdrop',e.setAttribute('data-state','hidden'),e}function se(e,t){e.setAttribute('tabindex','-1'),t.setAttribute('data-interactive','')}function le(e,t){e.removeAttribute('tabindex'),t.removeAttribute('data-interactive')}function de(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+'ms')})}function ce(e,t,r){e[t+'EventListener']('transitionend',r)}function me(e){var t=e.getAttribute('x-placement');return t?t.split('-')[0]:''}function fe(e,t){e.forEach(function(e){e&&e.setAttribute('data-state',t)})}function he(e){void e.offsetHeight}function be(e,t){var r=ee();r.className='tippy-popper',r.setAttribute('role','tooltip'),r.id='tippy-'+e,r.style.zIndex=t.zIndex;var a=ee();a.className='tippy-tooltip',a.style.maxWidth=t.maxWidth+('number'==typeof t.maxWidth?'px':''),a.setAttribute('data-size',t.size),a.setAttribute('data-animation',t.animation),a.setAttribute('data-state','hidden'),t.theme.split(' ').forEach(function(e){a.classList.add(e+'-theme')});var p=ee();return p.className='tippy-content',p.setAttribute('data-state','hidden'),t.interactive&&se(r,a),t.arrow&&a.appendChild(ie(t.arrowType)),t.animateFill&&(a.appendChild(ne()),a.setAttribute('data-animatefill','')),t.inertia&&pe(a),re(p,t),a.appendChild(p),r.appendChild(a),r.addEventListener('focusout',function(t){t.relatedTarget&&r._tippy&&!$(t.relatedTarget,function(e){return e===r})&&t.relatedTarget!==r._tippy.reference&&r._tippy.props.shouldPopperHideOnBlur(t)&&r._tippy.hide()}),r}function ye(e,t,r){var a=ae(e),p=a.tooltip,o=a.content,i=a.backdrop,n=a.arrow;e.style.zIndex=r.zIndex,p.setAttribute('data-size',r.size),p.setAttribute('data-animation',r.animation),p.style.maxWidth=r.maxWidth+('number'==typeof r.maxWidth?'px':''),t.content!==r.content&&re(o,r),!t.animateFill&&r.animateFill?(p.appendChild(ne()),p.setAttribute('data-animatefill','')):t.animateFill&&!r.animateFill&&(p.removeChild(i),p.removeAttribute('data-animatefill')),!t.arrow&&r.arrow?p.appendChild(ie(r.arrowType)):t.arrow&&!r.arrow&&p.removeChild(n),t.arrow&&r.arrow&&t.arrowType!==r.arrowType&&p.replaceChild(ie(r.arrowType),n),!t.interactive&&r.interactive?se(e,p):t.interactive&&!r.interactive&&le(e,p),!t.inertia&&r.inertia?pe(p):t.inertia&&!r.inertia&&oe(p),t.theme!==r.theme&&(t.theme.split(' ').forEach(function(e){p.classList.remove(e+'-theme')}),r.theme.split(' ').forEach(function(e){p.classList.add(e+'-theme')}))}function ue(e,t){var r=e.popper,a=e.options,p=a.onCreate,o=a.onUpdate;a.onCreate=a.onUpdate=function(){he(r),t(),o(),a.onCreate=p,a.onUpdate=o}}function ge(e){J(document.querySelectorAll(Ct.POPPER)).forEach(function(t){var r=t._tippy;r&&!0===r.props.hideOnClick&&(!e||t!==e.popper)&&r.hide()})}function xe(e,t,r,a){if(!e)return!0;var p=r.clientX,o=r.clientY,i=a.interactiveBorder,n=a.distance,s=t.top-o>('top'===e?i+n:i),l=o-t.bottom>('bottom'===e?i+n:i),d=t.left-p>('left'===e?i+n:i),c=p-t.right>('right'===e?i+n:i);return s||l||d||c}function we(e,t){return-(e-t)+'px'}function ve(){At||(At=!0,ot&&document.body.classList.add('tippy-iOS'),window.performance&&document.addEventListener('mousemove',ke))}function ke(){var e=performance.now();20>e-Yt&&(At=!1,document.removeEventListener('mousemove',ke),!ot&&document.body.classList.remove('tippy-iOS')),Yt=e}function Ee(e){var t=e.target;if(!(t instanceof Element))return ge();var r=Z(t,Ct.POPPER);if(!(r&&r._tippy&&r._tippy.props.interactive)){var a=$(t,function(e){return e._tippy&&e._tippy.reference===e});if(a){var p=a._tippy,o=-1o&&(l=Ke(r,window.innerWidth-o)),n&&d>o&&(d=Ke(a,window.innerHeight-o));var c=q.reference.getBoundingClientRect(),m=q.props.followCursor,f='horizontal'===m,h='vertical'===m;q.popperInstance.reference={getBoundingClientRect:function(){return{width:0,height:0,top:f?c.top:d,bottom:f?c.bottom:d,left:h?c.left:l,right:h?c.right:l}},clientWidth:0,clientHeight:0},q.popperInstance.scheduleUpdate(),'initial'===m&&q.state.isVisible&&s()}}function o(e){var t=Z(e.target,q.props.target);t&&!t._tippy&&(qe(t,Dt({},q.props,{target:'',showOnInit:!0})),i(e))}function i(e){if(T(),!q.state.isVisible){if(q.props.target)return o(e);if(B=!0,q.props.wait)return q.props.wait(q,e);x()&&document.addEventListener('mousemove',p);var t=Pe(q.props.delay,0,nt.delay);t?H=setTimeout(function(){A()},t):A()}}function n(){if(T(),!q.state.isVisible)return s();B=!1;var e=Pe(q.props.delay,1,nt.delay);e?W=setTimeout(function(){q.state.isVisible&&Y()},e):Y()}function s(){document.removeEventListener('mousemove',p),N=null}function l(){document.body.removeEventListener('mouseleave',n),document.removeEventListener('mousemove',F)}function d(e){!q.state.isEnabled||y(e)||(!q.state.isVisible&&(I=e),'click'===e.type&&!1!==q.props.hideOnClick&&q.state.isVisible?n():i(e))}function c(e){var t=$(e.target,function(e){return e._tippy}),r=Z(e.target,Ct.POPPER)===q.popper,a=t===q.reference;r||a||xe(me(q.popper),q.popper.getBoundingClientRect(),e,q.props)&&(l(),n())}function m(e){return y(e)?void 0:q.props.interactive?(document.body.addEventListener('mouseleave',n),void document.addEventListener('mousemove',F)):void n()}function f(e){if(e.target===q.reference){if(q.props.interactive){if(!e.relatedTarget)return;if(Z(e.relatedTarget,Ct.POPPER))return}n()}}function h(e){Z(e.target,q.props.target)&&i(e)}function b(e){Z(e.target,q.props.target)&&n()}function y(e){var t=-1l[e]&&!t.escapeWithReference&&(a=Ke(c[r],l[e]-('right'===e?c.width:c.height))),gt({},r,a)}};return d.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';c=xt({},c,m[t](e))}),e.offsets.popper=c,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,r=t.popper,a=t.reference,p=e.placement.split('-')[0],o=Ge,i=-1!==['top','bottom'].indexOf(p),n=i?'right':'bottom',s=i?'left':'top',l=i?'width':'height';return r[n]o(a[n])&&(e.offsets.popper[s]=o(a[n])),e}},arrow:{order:500,enabled:!0,fn:function(e,r){var a;if(!V(e.instance.modifiers,'arrow','keepTogether'))return e;var p=r.element;if('string'==typeof p){if(p=e.instance.popper.querySelector(p),!p)return e;}else if(!e.instance.popper.contains(p))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var o=e.placement.split('-')[0],i=e.offsets,n=i.popper,s=i.reference,l=-1!==['left','right'].indexOf(o),d=l?'height':'width',c=l?'Top':'Left',m=c.toLowerCase(),f=l?'left':'top',h=l?'bottom':'right',y=C(p)[d];s[h]-yn[h]&&(e.offsets.popper[m]+=s[m]+y-n[h]),e.offsets.popper=b(e.offsets.popper);var u=s[m]+s[d]/2-y/2,g=t(e.instance.popper),x=parseFloat(g['margin'+c],10),w=parseFloat(g['border'+c+'Width'],10),v=u-e.offsets.popper[m]-x-w;return v=Je(Ke(n[d]-y,v),0),e.arrowElement=p,e.offsets.arrow=(a={},gt(a,m,Qe(v)),gt(a,f,''),a),e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(D(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var r=v(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),a=e.placement.split('-')[0],p=L(a),o=e.placement.split('-')[1]||'',i=[];switch(t.behavior){case Et.FLIP:i=[a,p];break;case Et.CLOCKWISE:i=j(a);break;case Et.COUNTERCLOCKWISE:i=j(a,!0);break;default:i=t.behavior;}return i.forEach(function(n,s){if(a!==n||i.length===s+1)return e;a=e.placement.split('-')[0],p=L(a);var l=e.offsets.popper,d=e.offsets.reference,c=Ge,m='left'===a&&c(l.right)>c(d.left)||'right'===a&&c(l.left)c(d.top)||'bottom'===a&&c(l.top)c(r.right),b=c(l.top)c(r.bottom),u='left'===a&&f||'right'===a&&h||'top'===a&&b||'bottom'===a&&y,g=-1!==['top','bottom'].indexOf(a),x=!!t.flipVariations&&(g&&'start'===o&&f||g&&'end'===o&&h||!g&&'start'===o&&b||!g&&'end'===o&&y);(m||u||x)&&(e.flipped=!0,(m||u)&&(a=i[s+1]),x&&(o=q(o)),e.placement=a+(o?'-'+o:''),e.offsets.popper=xt({},e.offsets.popper,T(e.instance.popper,e.offsets.reference,e.placement)),e=Y(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,r=t.split('-')[0],a=e.offsets,p=a.popper,o=a.reference,i=-1!==['left','right'].indexOf(r),n=-1===['top','left'].indexOf(r);return p[i?'left':'top']=o[r]-(n?p[i?'width':'height']:0),e.placement=L(t),e.offsets.popper=b(p),e}},hide:{order:800,enabled:!0,fn:function(e){if(!V(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,r=S(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottomr.right||t.top>r.bottom||t.rightwindow.devicePixelRatio||!wt),m='bottom'===r?'top':'bottom',f='right'===a?'left':'right',h=X('transform'),b=void 0,y=void 0;if(y='bottom'==m?'HTML'===s.nodeName?-s.clientHeight+c.bottom:-l.height+c.bottom:c.top,b='right'==f?'HTML'===s.nodeName?-s.clientWidth+c.right:-l.width+c.right:c.left,n&&h)d[h]='translate3d('+b+'px, '+y+'px, 0)',d[m]=0,d[f]=0,d.willChange='transform';else{var g='bottom'==m?-1:1,x='right'==f?-1:1;d[m]=y*g,d[f]=b*x,d.willChange=m+', '+f}var w={"x-placement":e.placement};return e.attributes=xt({},w,e.attributes),e.styles=xt({},d,e.styles),e.arrowStyles=xt({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:'bottom',y:'right'},applyStyle:{order:900,enabled:!0,fn:function(e){return F(e.instance.popper,e.styles),_(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&F(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,r,a,p){var o=O(p,t,e,r.positionFixed),i=E(r.placement,o,t,e,r.modifiers.flip.boundariesElement,r.modifiers.flip.padding);return t.setAttribute('x-placement',i),F(t,{position:r.positionFixed?'fixed':'absolute'}),r},gpuAcceleration:void 0}}};var Ct={POPPER:'.tippy-popper',TOOLTIP:'.tippy-tooltip',CONTENT:'.tippy-content',BACKDROP:'.tippy-backdrop',ARROW:'.tippy-arrow',ROUND_ARROW:'.tippy-roundarrow'},Lt=et?Element.prototype:{},Tt=Lt.matches||Lt.matchesSelector||Lt.webkitMatchesSelector||Lt.mozMatchesSelector||Lt.msMatchesSelector,St={x:!0},At=!1,Yt=0,Pt=Object.keys(nt),Dt=Object.assign||function(e){for(var t,r=1;rparseInt(cnArgs.onScrollOffset)&&(i.setCookieNotice("accept"),i.off("scroll",d))}t(document).ready(function(){var s=t("#cookie-notice"),c=t.fn.getCookieNotice();t(document).on("click",".cn-set-cookie",function(e){e.preventDefault(),t(this).setCookieNotice(t(this).data("cookie-set"))}),t(document).on("click",".cn-revoke-cookie",function(e){if(e.preventDefault(),"yes"===cnArgs.refuse){var i=t(this);if("yes"===cnArgs.onScroll&&t(window).on("scroll",d),"1"===cnArgs.revoke_cookies){if(i.hasClass("cn-revoke-inline")){var o=t("body");o.hasClass("cookies-revoke")||o.hasClass("cookies-not-set")||("automatic"===cnArgs.revoke_cookies_opt?s.showCookieNotice(3):s.showCookieNotice(2))}else s.showCookieNotice(1);c=t.fn.getCookieNotice(),t.fn.setCookieNoticeBodyClass("cookies-set cookies-revoke "+("true"===c?"cookies-accepted":"cookies-refused"))}}}),void 0===c?("yes"===cnArgs.onScroll&&t(window).on("scroll",d),s.showCookieNotice(0),t.fn.setCookieNoticeBodyClass("cookies-not-set")):"yes"===cnArgs.refuse?"1"===cnArgs.revoke_cookies&&("automatic"===cnArgs.revoke_cookies_opt&&s.hideCookieNotice(1),t.fn.setCookieNoticeBodyClass("cookies-set "+("true"===c?"cookies-accepted":"cookies-refused"))):t.fn.setCookieNoticeBodyClass("cookies-set "+("true"===c?"cookies-accepted":"cookies-refused"))}),t.fn.setCookieNotice=function(e){"yes"===cnArgs.onScroll&&t(window).off("scroll",d);var i=new Date,o=new Date,s=t("#cookie-notice");if(o.setTime(parseInt(i.getTime())+1e3*parseInt(cnArgs.cookieTime)),e="accept"===e?"true":"false",document.cookie=cnArgs.cookieName+"="+e+";expires="+o.toUTCString()+";"+(void 0!==cnArgs.cookieDomain&&""!==cnArgs.cookieDomain?"domain="+cnArgs.cookieDomain+";":"")+(void 0!==cnArgs.cookiePath&&""!==cnArgs.cookiePath?"path="+cnArgs.cookiePath+";":"")+("1"===cnArgs.secure?"secure;":""),t.event.trigger({type:"setCookieNotice",value:e,time:i,expires:o}),t.fn.setCookieNoticeBodyClass("cookies-set "+("true"===e?"cookies-accepted":"cookies-refused")),"yes"===cnArgs.refuse&&"1"===cnArgs.revoke_cookies&&"automatic"===cnArgs.revoke_cookies_opt?s.hideCookieNotice(2):s.hideCookieNotice(0),e&&"1"===cnArgs.redirection){var c=window.location.protocol+"//",n=window.location.host+"/"+window.location.pathname;"1"===cnArgs.cache?(c=c+n.replace("//","/")+(""===window.location.search?"?":window.location.search+"&")+"cn-reloaded=1"+window.location.hash,window.location.href=c):(c=c+n.replace("//","/")+window.location.search+window.location.hash,window.location.reload(!0))}else;},t.fn.setCookieNoticeBodyClass=function(e){t("body").removeClass("cookies-revoke cookies-accepted cookies-refused cookies-set cookies-not-set").addClass(e)},t.fn.getCookieNotice=function(){var e=("; "+document.cookie).split("; cookie_notice_accepted=");return 2===e.length?e.pop().split(";").shift():void 0},t.fn.showCookieNotice=function(e){t.event.trigger({type:"showCookieNotice",value:e,data:cnArgs});var i=this;switch(e){case 0:"fade"===cnArgs.hideEffect?i.css({visibility:"visible",display:"none"}).fadeIn(400):"slide"===cnArgs.hideEffect?i.css({visibility:"visible",display:"none"}).slideDown(400):i.css({visibility:"visible"}).show();break;case 1:"fade"===cnArgs.hideEffect?i.find(".cookie-notice-revoke-container").fadeOut(400,function(){i.css({visibility:"visible",display:"none"}).fadeIn(400)}):"slide"===cnArgs.hideEffect?i.find(".cookie-notice-revoke-container").slideUp(400,function(){i.css({visibility:"visible",display:"none"}).slideDown(400)}):i.css({visibility:"visible"}).find(".cookie-notice-revoke-container").hide();break;case 2:"fade"===cnArgs.hideEffect?i.css({visibility:"visible",display:"none"}).fadeIn(400):"slide"===cnArgs.hideEffect?i.css({visibility:"visible",display:"none"}).slideDown(400):i.css({visibility:"visible"});break;case 3:"fade"===cnArgs.hideEffect?i.find(".cookie-notice-revoke-container").fadeOut(400,function(){i.css({visibility:"visible",display:"none"}).fadeIn(400)}):"slide"===cnArgs.hideEffect?i.find(".cookie-notice-revoke-container").slideUp(400,function(){i.css({visibility:"visible",display:"none"}).slideDown(400)}):i.css({visibility:"visible"}).find(".cookie-notice-revoke-container").hide()}},t.fn.hideCookieNotice=function(e){t.event.trigger({type:"hideCookieNotice",value:e,data:cnArgs});var i=this,o=this.css("display");switch(e){case 0:"fade"===cnArgs.hideEffect?i.fadeOut(400):"slide"===cnArgs.hideEffect?i.slideUp(400):i.css({visibility:"hidden"});break;case 1:"fade"===cnArgs.hideEffect?i.find(".cookie-notice-revoke-container").hide().fadeIn(400).css({visibility:"visible",display:"block"}):"slide"===cnArgs.hideEffect?i.find(".cookie-notice-revoke-container").hide().slideDown(400).css({visibility:"visible",display:"block"}):i.find(".cookie-notice-revoke-container").css({visibility:"visible",display:"block"});break;case 2:"fade"===cnArgs.hideEffect?i.fadeOut(400,function(){i.css({visibility:"hidden",display:o}).find(".cookie-notice-revoke-container").hide().fadeIn(400).css({visibility:"visible",display:"block"})}):"slide"===cnArgs.hideEffect?i.slideUp(400,function(){i.css({visibility:"hidden",display:o}).find(".cookie-notice-revoke-container").hide().slideDown(400).css({visibility:"visible",display:"block"})}):i.css({visibility:"hidden"}).find(".cookie-notice-revoke-container").css({visibility:"visible",display:"block"})}}}(jQuery); jQuery(document).ready(function ($){ $(".gallery").removeClass("gallery-columns-1 gallery-columns-2 gallery-columns-3 gallery-columns-4 gallery-columns-5 gallery-columns-6 gallery-columns-7 gallery-columns-8 gallery-columns-9"); }); !function(a,b,c,d){var e=a(b);a.fn.lazyload=function(f){function g(){var b=0;i.each(function(){var c=a(this);if(!j.skip_invisible||c.is(":visible"))if(a.abovethetop(this,j)||a.leftofbegin(this,j));else if(a.belowthefold(this,j)||a.rightoffold(this,j)){if(++b>j.failure_limit)return!1}else c.trigger("appear"),b=0})}var h,i=this,j={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:b,data_attribute:"original",skip_invisible:!1,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};return f&&(d!==f.failurelimit&&(f.failure_limit=f.failurelimit,delete f.failurelimit),d!==f.effectspeed&&(f.effect_speed=f.effectspeed,delete f.effectspeed),a.extend(j,f)),h=j.container===d||j.container===b?e:a(j.container),0===j.event.indexOf("scroll")&&h.bind(j.event,function(){return g()}),this.each(function(){var b=this,c=a(b);b.loaded=!1,(c.attr("src")===d||c.attr("src")===!1)&&c.is("img")&&c.attr("src",j.placeholder),c.one("appear",function(){if(!this.loaded){if(j.appear){var d=i.length;j.appear.call(b,d,j)}a("").bind("load",function(){var d=c.attr("data-"+j.data_attribute);c.hide(),c.is("img")?c.attr("src",d):c.css("background-image","url('"+d+"')"),c[j.effect](j.effect_speed),b.loaded=!0;var e=a.grep(i,function(a){return!a.loaded});if(i=a(e),j.load){var f=i.length;j.load.call(b,f,j)}}).attr("src",c.attr("data-"+j.data_attribute))}}),0!==j.event.indexOf("scroll")&&c.bind(j.event,function(){b.loaded||c.trigger("appear")})}),e.bind("resize",function(){g()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&e.bind("pageshow",function(b){b.originalEvent&&b.originalEvent.persisted&&i.each(function(){a(this).trigger("appear")})}),a(c).ready(function(){g()}),this},a.belowthefold=function(c,f){var g;return g=f.container===d||f.container===b?(b.innerHeight?b.innerHeight:e.height())+e.scrollTop():a(f.container).offset().top+a(f.container).height(),g<=a(c).offset().top-f.threshold},a.rightoffold=function(c,f){var g;return g=f.container===d||f.container===b?e.width()+e.scrollLeft():a(f.container).offset().left+a(f.container).width(),g<=a(c).offset().left-f.threshold},a.abovethetop=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollTop():a(f.container).offset().top,g>=a(c).offset().top+f.threshold+a(c).height()},a.leftofbegin=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollLeft():a(f.container).offset().left,g>=a(c).offset().left+f.threshold+a(c).width()},a.inviewport=function(b,c){return!(a.rightoffold(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.abovethetop(b,c))},a.extend(a.expr[":"],{"below-the-fold":function(b){return a.belowthefold(b,{threshold:0})},"above-the-top":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-screen":function(b){return a.rightoffold(b,{threshold:0})},"left-of-screen":function(b){return!a.rightoffold(b,{threshold:0})},"in-viewport":function(b){return a.inviewport(b,{threshold:0})},"above-the-fold":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-fold":function(b){return a.rightoffold(b,{threshold:0})},"left-of-fold":function(b){return!a.rightoffold(b,{threshold:0})}})}(jQuery,window,document); (function(){"use strict";function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,s=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;th;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(window),function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;be;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function c(){}function d(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=g.length;c>b;b++){var d=g[b];a[d]=0}return a}function e(c){function e(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||f("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=c("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var g=document.body||document.documentElement;g.appendChild(e);var h=j(e);l=200===b(h.width),g.removeChild(e)}}}function h(a){if(e(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var c=j(a);if("none"===c.display)return d();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var h=f.isBorderBox=!(!k||!c[k]||"border-box"!==c[k]),m=0,n=g.length;n>m;m++){var o=g[m],p=c[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q}var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=h&&l,y=b(c.width);y!==!1&&(f.width=y+(x?0:r+v));var z=b(c.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}}function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c}var j,k,l,m=!1;return h}var f="undefined"==typeof console?c:function(a){console.error(a)},g=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],e):"object"==typeof exports?module.exports=e(require("desandro-get-style-property")):a.getSize=e(a.getStyleProperty)}(window),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}}function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(a){function b(a,b){return a[g](b)}function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}function e(a,d){return c(a),b(a,d)}var f,g=function(){if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a,b){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("doc-ready"),require("desandro-matches-selector")):a.fizzyUIUtils=b(a,a.docReady,a.matchesSelector)}(window,function(a,b,c){var d={};d.extend=function(a,b){for(var c in b)a[c]=b[c];return a},d.modulo=function(a,b){return(a%b+b)%b};var e=Object.prototype.toString;d.isArray=function(a){return"[object Array]"==e.call(a)},d.makeArray=function(a){var b=[];if(d.isArray(a))b=a;else if(a&&"number"==typeof a.length)for(var c=0,e=a.length;e>c;c++)b.push(a[c]);else b.push(a);return b},d.indexOf=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},d.removeFrom=function(a,b){var c=d.indexOf(a,b);-1!=c&&a.splice(c,1)},d.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1==a.nodeType&&"string"==typeof a.nodeName},d.setText=function(){function a(a,c){b=b||(void 0!==document.documentElement.textContent?"textContent":"innerText"),a[b]=c}var b;return a}(),d.getParent=function(a,b){for(;a!=document.body;)if(a=a.parentNode,c(a,b))return a},d.getQueryElement=function(a){return"string"==typeof a?document.querySelector(a):a},d.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},d.filterFindElements=function(a,b){a=d.makeArray(a);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f];if(d.isElement(h))if(b){c(h,b)&&e.push(h);for(var i=h.querySelectorAll(b),j=0,k=i.length;k>j;j++)e.push(i[j])}else e.push(h)}return e},d.debounceMethod=function(a,b,c){var d=a.prototype[b],e=b+"Timeout";a.prototype[b]=function(){var a=this[e];a&&clearTimeout(a);var b=arguments,f=this;this[e]=setTimeout(function(){d.apply(f,b),delete f[e]},c||100)}},d.toDashed=function(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()};var f=a.console;return d.htmlInit=function(c,e){b(function(){for(var b=d.toDashed(e),g=document.querySelectorAll(".js-"+b),h="data-"+b+"-options",i=0,j=g.length;j>i;i++){var k,l=g[i],m=l.getAttribute(h);try{k=m&&JSON.parse(m)}catch(n){f&&f.error("Error parsing "+h+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+n);continue}var o=new c(l,k),p=a.jQuery;p&&p.data(l,e,o)}})},d}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(a.Outlayer={},a.Outlayer.Item=b(a,a.EventEmitter,a.getSize,a.getStyleProperty,a.fizzyUIUtils))}(window,function(a,b,c,d,e){function f(a){for(var b in a)return!1;return b=null,!0}function g(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}function h(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}var i=a.getComputedStyle,j=i?function(a){return i(a,null)}:function(a){return a.currentStyle},k=d("transition"),l=d("transform"),m=k&&l,n=!!d("perspective"),o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[k],p=["transform","transition","transitionDuration","transitionProperty"],q=function(){for(var a={},b=0,c=p.length;c>b;b++){var e=p[b],f=d(e);f&&f!==e&&(a[e]=f)}return a}();e.extend(g.prototype,b.prototype),g.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.getSize=function(){this.size=c(this.element)},g.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=q[c]||c;b[d]=a[c]}},g.prototype.getPosition=function(){var a=j(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=a[c?"left":"right"],f=a[d?"top":"bottom"],g=this.layout.size,h=-1!=e.indexOf("%")?parseFloat(e)/100*g.width:parseInt(e,10),i=-1!=f.indexOf("%")?parseFloat(f)/100*g.height:parseInt(f,10);h=isNaN(h)?0:h,i=isNaN(i)?0:i,h-=c?g.paddingLeft:g.paddingRight,i-=d?g.paddingTop:g.paddingBottom,this.position.x=h,this.position.y=i},g.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={},d=b.isOriginLeft?"paddingLeft":"paddingRight",e=b.isOriginLeft?"left":"right",f=b.isOriginLeft?"right":"left",g=this.position.x+a[d];c[e]=this.getXValue(g),c[f]="";var h=b.isOriginTop?"paddingTop":"paddingBottom",i=b.isOriginTop?"top":"bottom",j=b.isOriginTop?"bottom":"top",k=this.position.y+a[h];c[i]=this.getYValue(k),c[j]="",this.css(c),this.emitEvent("layout",[this])},g.prototype.getXValue=function(a){var b=this.layout.options;return b.percentPosition&&!b.isHorizontal?a/this.layout.size.width*100+"%":a+"px"},g.prototype.getYValue=function(a){var b=this.layout.options;return b.percentPosition&&b.isHorizontal?a/this.layout.size.height*100+"%":a+"px"},g.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={};j.transform=this.getTranslate(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},g.prototype.getTranslate=function(a,b){var c=this.layout.options;return a=c.isOriginLeft?a:-a,b=c.isOriginTop?b:-b,n?"translate3d("+a+"px, "+b+"px, 0)":"translate("+a+"px, "+b+"px)"},g.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},g.prototype.moveTo=m?g.prototype._transitionTo:g.prototype.goTo,g.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},g.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},g.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var r="opacity,"+h(q.transform||"transform");g.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:r,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(o,this,!1))},g.prototype.transition=g.prototype[k?"_transition":"_nonTransition"],g.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},g.prototype.onotransitionend=function(a){this.ontransitionend(a)};var s={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};g.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,c=s[a.propertyName]||a.propertyName;if(delete b.ingProperties[c],f(b.ingProperties)&&this.disableTransition(),c in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[c]),c in b.onEnd){var d=b.onEnd[c];d.call(this),delete b.onEnd[c]}this.emitEvent("transitionEnd",[this])}},g.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},g.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var t={transitionProperty:"",transitionDuration:""};return g.prototype.removeTransitionStyles=function(){this.css(t)},g.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},g.prototype.remove=function(){if(!k||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.once("transitionEnd",function(){a.removeElem()}),this.hide()},g.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("visibleStyle");b[c]=this.onRevealTransitionEnd,this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},g.prototype.getHideRevealTransitionEndProperty=function(a){var b=this.layout.options[a];if(b.opacity)return"opacity";for(var c in b)return c},g.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");b[c]=this.onHideTransitionEnd,this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},g.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},g}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,d,e,f,g){return b(a,c,d,e,f,g)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):a.Outlayer=b(a,a.eventie,a.EventEmitter,a.getSize,a.fizzyUIUtils,a.Outlayer.Item)}(window,function(a,b,c,d,e,f){function g(a,b){var c=e.getQueryElement(a);if(!c)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(c||a)));this.element=c,i&&(this.$element=i(this.element)),this.options=e.extend({},this.constructor.defaults),this.option(b);var d=++k;this.element.outlayerGUID=d,l[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var h=a.console,i=a.jQuery,j=function(){},k=0,l={};return g.namespace="outlayer",g.Item=f,g.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e.extend(g.prototype,c.prototype),g.prototype.option=function(a){e.extend(this.options,a)},g.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},g.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},g.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},g.prototype._filterFindItemElements=function(a){return e.filterFindElements(a,this.options.itemSelector)},g.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},g.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},g.prototype._init=g.prototype.layout,g.prototype._resetLayout=function(){this.getSize()},g.prototype.getSize=function(){this.size=d(this.element)},g.prototype._getMeasurement=function(a,b){var c,f=this.options[a];f?("string"==typeof f?c=this.element.querySelector(f):e.isElement(f)&&(c=f),this[a]=c?d(c)[b]:f):this[a]=0},g.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},g.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},g.prototype._layoutItems=function(a,b){if(this._emitCompleteOnItems("layout",a),a&&a.length){for(var c=[],d=0,e=a.length;e>d;d++){var f=a[d],g=this._getItemLayoutPosition(f);g.item=f,g.isInstant=b||f.isLayoutInstant,c.push(g)}this._processLayoutQueue(c)}},g.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},g.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},g.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},g.prototype._postLayout=function(){this.resizeContainer()},g.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},g.prototype._getContainerSize=j,g.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},g.prototype._emitCompleteOnItems=function(a,b){function c(){e.dispatchEvent(a+"Complete",null,[b])}function d(){g++,g===f&&c()}var e=this,f=b.length;if(!b||!f)return void c();for(var g=0,h=0,i=b.length;i>h;h++){var j=b[h];j.once(a,d)}},g.prototype.dispatchEvent=function(a,b,c){var d=b?[b].concat(c):c;if(this.emitEvent(a,d),i)if(this.$element=this.$element||i(this.element),b){var e=i.Event(b);e.type=a,this.$element.trigger(e,c)}else this.$element.trigger(a,c)},g.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},g.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},g.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},g.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e.removeFrom(this.stamps,d),this.unignore(d)}},g.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=e.makeArray(a)):void 0},g.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},g.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},g.prototype._manageStamp=j,g.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,e=d(a),f={left:b.left-c.left-e.marginLeft,top:b.top-c.top-e.marginTop,right:c.right-b.right-e.marginRight,bottom:c.bottom-b.bottom-e.marginBottom};return f},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.bindResize=function(){this.isResizeBound||(b.bind(a,"resize",this),this.isResizeBound=!0)},g.prototype.unbindResize=function(){this.isResizeBound&&b.unbind(a,"resize",this),this.isResizeBound=!1},g.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},g.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},g.prototype.needsResizeLayout=function(){var a=d(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},g.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},g.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},g.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},g.prototype.reveal=function(a){this._emitCompleteOnItems("reveal",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.reveal()}},g.prototype.hide=function(a){this._emitCompleteOnItems("hide",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.hide()}},g.prototype.revealItemElements=function(a){var b=this.getItems(a);this.reveal(b)},g.prototype.hideItemElements=function(a){var b=this.getItems(a);this.hide(b)},g.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},g.prototype.getItems=function(a){a=e.makeArray(a);for(var b=[],c=0,d=a.length;d>c;c++){var f=a[c],g=this.getItem(f);g&&b.push(g)}return b},g.prototype.remove=function(a){var b=this.getItems(a);if(this._emitCompleteOnItems("remove",b),b&&b.length)for(var c=0,d=b.length;d>c;c++){var f=b[c];f.remove(),e.removeFrom(this.items,f)}},g.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize();var e=this.element.outlayerGUID;delete l[e],delete this.element.outlayerGUID,i&&i.removeData(this.element,this.constructor.namespace)},g.data=function(a){a=e.getQueryElement(a);var b=a&&a.outlayerGUID;return b&&l[b]},g.create=function(a,b){function c(){g.apply(this,arguments)}return Object.create?c.prototype=Object.create(g.prototype):e.extend(c.prototype,g.prototype),c.prototype.constructor=c,c.defaults=e.extend({},g.defaults),e.extend(c.defaults,b),c.prototype.settings={},c.namespace=a,c.data=g.data,c.Item=function(){f.apply(this,arguments)},c.Item.prototype=new f,e.htmlInit(c,a),i&&i.bridget&&i.bridget(a,c),c},g.Item=f,g}),function(a,b){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):a.Masonry=b(a.Outlayer,a.getSize,a.fizzyUIUtils)}(window,function(a,b,c){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}var d=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,f=e/d,g=d-e%d,h=g&&1>g?"round":"floor";f=Math[h](f),this.cols=Math.max(f,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c.indexOf(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}); !function(a){"use strict";var b=a.Masonry;b.prototype._remapV2Options=function(){this._remapOption("gutterWidth","gutter"),this._remapOption("isResizable","isResizeBound"),this._remapOption("isRTL","isOriginLeft",function(a){return!a});var a=this.options.isAnimated;if(void 0!==a&&(this.options.transitionDuration=a?this.options.transitionDuration:0),void 0===a||a){var b=this.options.animationOptions,c=b&&b.duration;c&&(this.options.transitionDuration="string"==typeof c?c:c+"ms")}},b.prototype._remapOption=function(a,b,c){var d=this.options[a];void 0!==d&&(this.options[b]=c?c(d):d)};var c=b.prototype._create;b.prototype._create=function(){var a=this;this._remapV2Options(),c.apply(this,arguments),setTimeout(function(){jQuery(a.element).addClass("masonry")},0)};var d=b.prototype.layout;b.prototype.layout=function(){this._remapV2Options(),d.apply(this,arguments)};var e=b.prototype.option;b.prototype.option=function(){e.apply(this,arguments),this._remapV2Options()};var f=b.prototype._itemize;b.prototype._itemize=function(a){var b=f.apply(this,arguments);return jQuery(a).addClass("masonry-brick"),b};var g=b.prototype.measureColumns;b.prototype.measureColumns=function(){var a=this.options.columnWidth;a&&"function"==typeof a&&(this.getContainerWidth(),this.columnWidth=a(this.containerWidth)),g.apply(this,arguments)},b.prototype.reload=function(){this.reloadItems.apply(this,arguments),this.layout.apply(this)};var h=b.prototype.destroy;b.prototype.destroy=function(){var a=this.getItemElements();jQuery(this.element).removeClass("masonry"),jQuery(a).removeClass("masonry-brick"),h.apply(this,arguments)}}(window); jQuery(document).ready(function ($){ $('.gallery-item img[src]').each(function (){ var $images=$(this); $images.attr({'data-original': $images.attr('src')}) .removeAttr('src'); }); $(".gallery-item img").each(function (){ $(this).closest('.gallery-item').css({ 'width': $(this).attr('width'), 'height': $(this).attr('height') }) }).css({ 'max-height': '100%', 'max-width': '100%', 'display': 'block' }).addClass('jmig-img-hide'); $(".gallery-item img").lazyload({ threshold: 400, load: function (){ $(this).removeClass("jmig-img-hide").addClass("jmig-img-show"); masonry_update(); }}); function masonry_update(){ var $gallery=$('.gallery'); $gallery.imagesLoaded(function (){ $gallery.masonry({ itemSelector: '.gallery-item', columnWidth: '.gallery-item', isFitWidth: true }) setTimeout(function (){ $('.gallery').addClass('jmig-gallery-loaded'); }, 300); }); }}); !function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(t){function e(t){return t.replace(/(:|\.|\/)/g,"\\$1")}var o="1.6.0",i={},l={exclude:[],excludeWithin:[],offset:0,direction:"top",delegateSelector:null,scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},s=function(e){var o=[],i=!1,l=e.dir&&"left"===e.dir?"scrollLeft":"scrollTop";return this.each(function(){var e=t(this);return this!==document&&this!==window?!document.scrollingElement||this!==document.documentElement&&this!==document.body?void(e[l]()>0?o.push(this):(e[l](1),i=e[l]()>0,i&&o.push(this),e[l](0))):(o.push(document.scrollingElement),!1):void 0}),o.length||this.each(function(){"BODY"===this.nodeName&&(o=[this])}),"first"===e.el&&o.length>1&&(o=[o[0]]),o};t.fn.extend({scrollable:function(t){var e=s.call(this,{dir:t});return this.pushStack(e)},firstScrollable:function(t){var e=s.call(this,{el:"first",dir:t});return this.pushStack(e)},smoothScroll:function(o,i){if(o=o||{},"options"===o)return i?this.each(function(){var e=t(this),o=t.extend(e.data("ssOpts")||{},i);t(this).data("ssOpts",o)}):this.first().data("ssOpts");var l=t.extend({},t.fn.smoothScroll.defaults,o),s=function(o){var i=this,s=t(this),n=t.extend({},l,s.data("ssOpts")||{}),c=l.exclude,a=n.excludeWithin,r=0,h=0,u=!0,d={},p=t.smoothScroll.filterPath(location.pathname),f=t.smoothScroll.filterPath(i.pathname),m=location.hostname===i.hostname||!i.hostname,g=n.scrollTarget||f===p,v=e(i.hash);if(n.scrollTarget||m&&g&&v){for(;u&&r1&&"[object Object]"!==String(e)){if(o=jQuery.extend({},o),(null===e||void 0===e)&&(o.expires=-1),"number"==typeof o.expires){var i=o.expires,l=o.expires=new Date;l.setDate(l.getDate()+i)}return e=String(e),document.cookie=[encodeURIComponent(t),"=",o.raw?e:encodeURIComponent(e),o.expires?"; expires="+o.expires.toUTCString():"",o.path?"; path="+o.path:"",o.domain?"; domain="+o.domain:"",o.secure?"; secure":""].join("")}o=e||{};var s,n=o.raw?function(t){return t}:decodeURIComponent;return(s=new RegExp("(?:^|;)"+encodeURIComponent(t)+"=([^;]*)").exec(document.cookie))?n(s[1]):null},jQuery(document).ready(function(t){if("undefined"!=typeof tocplus){if(t.fn.shrinkTOCWidth=function(){t(this).css({width:"auto",display:"table"}),/MSIE 7\./.test(navigator.userAgent)&&t(this).css("width","")},1==tocplus.smooth_scroll){var e=hostname=pathname=qs=hash=null;t("body a").click(function(){if(hostname=t(this).prop("hostname"),pathname=t(this).prop("pathname"),qs=t(this).prop("search"),hash=t(this).prop("hash"),pathname.length>0&&"/"!=pathname.charAt(0)&&(pathname="/"+pathname),window.location.hostname==hostname&&window.location.pathname==pathname&&window.location.search==qs&&""!==hash){var o=hash.replace(/([ !"$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g,"\\$1");t(o).length>0?e=hash:(anchor=hash,anchor=anchor.replace("#",""),e='a[name="'+anchor+'"]',0==t(e).length&&(e="")),offset="undefined"!=typeof tocplus.smooth_scroll_offset?-1*tocplus.smooth_scroll_offset:t("#wpadminbar").length>0&&t("#wpadminbar").is(":visible")?-30:0,e&&t.smoothScroll({scrollTarget:e,offset:offset})}})}if("undefined"!=typeof tocplus.visibility_show){var o="undefined"!=typeof tocplus.visibility_hide_by_default?!0:!1;if(t.cookie)var i=t.cookie("tocplus_hidetoc")?tocplus.visibility_show:tocplus.visibility_hide;else var i=tocplus.visibility_hide;o&&(i=i==tocplus.visibility_hide?tocplus.visibility_show:tocplus.visibility_hide),t("#toc_container p.toc_title").append(' ['+i+"]"),i==tocplus.visibility_show&&(t("ul.toc_list").hide(),t("#toc_container").addClass("contracted").shrinkTOCWidth()),t("span.toc_toggle a").click(function(e){switch(e.preventDefault(),t(this).html()){case t("
").html(tocplus.visibility_hide).text():t(this).html(tocplus.visibility_show),t.cookie&&(o?t.cookie("tocplus_hidetoc",null,{path:"/"}):t.cookie("tocplus_hidetoc","1",{expires:30,path:"/"})),t("ul.toc_list").hide("fast"),t("#toc_container").addClass("contracted").shrinkTOCWidth();break;case t("
").html(tocplus.visibility_show).text():default:t(this).html(tocplus.visibility_hide),t.cookie&&(o?t.cookie("tocplus_hidetoc","1",{expires:30,path:"/"}):t.cookie("tocplus_hidetoc",null,{path:"/"})),t("#toc_container").css("width",tocplus.width).removeClass("contracted"),t("ul.toc_list").show("fast")}})}}}); !function(t,e){"use strict";function r(r,a,i,l,u){function f(){L=t.devicePixelRatio>1,c(i),a.delay>=0&&setTimeout(function(){s(!0)},a.delay),(a.delay<0||a.combined)&&(l.e=v(a.throttle,function(t){"resize"===t.type&&(w=B=-1),s(t.all)}),l.a=function(t){c(t),i.push.apply(i,t)},l.g=function(){return i=n(i).filter(function(){return!n(this).data(a.loadedName)})},l.f=function(t){for(var e=0;ee.top&&-ne.left&&-n=0?w:w=n(t).width()}function h(){return B>=0?B:B=n(t).height()}function m(t){return t.tagName.toLowerCase()}function b(t,e){if(e){var r=t.split(",");t="";for(var a=0,n=r.length;at||!a.enableThrottle||l?u():n=setTimeout(u,t-f)}}function p(){--z,i.length||z||y("onFinishedAll")}function y(t,e,n){return!!(t=a[t])&&(t.apply(r,[].slice.call(arguments,1)),!0)}var z=0,w=-1,B=-1,L=!1,T="afterLoad",D="load",I="error",N="img",E="src",F="srcset",C="sizes",O="background-image";"event"===a.bind||o?f():n(t).on(D+"."+u,f)}function a(a,o){var l=this,u=n.extend({},l.config,o),f={},c=u.name+"-"+ ++i;return l.config=function(t,r){return r===e?u[t]:(u[t]=r,l)},l.addItems=function(t){return f.a&&f.a("string"===n.type(t)?n(t):t),l},l.getItems=function(){return f.g?f.g():{}},l.update=function(t){return f.e&&f.e({},!t),l},l.force=function(t){return f.f&&f.f("string"===n.type(t)?n(t):t),l},l.loadAll=function(){return f.e&&f.e({all:!0},!0),l},l.destroy=function(){return n(u.appendScroll).off("."+c,f.e),n(t).off("."+c),f={},e},r(l,u,a,f,c),u.chainable?a:l}var n=t.jQuery||t.Zepto,i=0,o=!1;n.fn.Lazy=n.fn.lazy=function(t){return new a(this,t)},n.Lazy=n.lazy=function(t,r,i){if(n.isFunction(r)&&(i=r,r=[]),n.isFunction(i)){t=n.isArray(t)?t:[t],r=n.isArray(r)?r:[r];for(var o=a.prototype.config,l=o._f||(o._f={}),u=0,f=t.length;ux

",r.appendChild(d.childNodes[1])}return e&&t.extend(i,e),this.each(function(){var e=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];i.customSelector&&e.push(i.customSelector);var r=".fitvidsignore";i.ignore&&(r=r+", "+i.ignore);var a=t(this).find(e.join(","));a=a.not("object object"),a=a.not(r),a.each(function(){var e=t(this);if(!(e.parents(r).length>0||"embed"===this.tagName.toLowerCase()&&e.parent("object").length||e.parent(".fluid-width-video-wrapper").length)){e.css("height")||e.css("width")||!isNaN(e.attr("height"))&&!isNaN(e.attr("width"))||(e.attr("height",9),e.attr("width",16));var i="object"===this.tagName.toLowerCase()||e.attr("height")&&!isNaN(parseInt(e.attr("height"),10))?parseInt(e.attr("height"),10):e.height(),a=isNaN(parseInt(e.attr("width"),10))?e.width():parseInt(e.attr("width"),10),d=i/a;if(!e.attr("name")){var o="fitvid"+t.fn.fitVids._count;e.attr("name",o),t.fn.fitVids._count++}e.wrap('
').parent(".fluid-width-video-wrapper").css("padding-top",100*d+"%"),e.removeAttr("height").removeAttr("width")}})})},t.fn.fitVids._count=0}(window.jQuery||window.Zepto); !function(t,e){"use strict";"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,s,a){function u(t,e,n){var o,s="$()."+i+'("'+e+'")';return t.each(function(t,u){var h=a.data(u,i);if(!h)return void r(i+" not initialized. Cannot call methods, i.e. "+s);var d=h[e];if(!d||"_"==e.charAt(0))return void r(s+" is not a valid method");var l=d.apply(h,n);o=void 0===o?l:o}),void 0!==o?o:t}function h(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new s(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(s.prototype.option||(s.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return u(this,t,e)}return h(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var s=this._onceEvents&&this._onceEvents[t];o;){var r=s&&s[o];r&&(this.off(t,o),delete s[o]),o.apply(this,e),n+=r?0:1,o=i[n]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return e()}):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=-1==t.indexOf("%")&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;h>e;e++){var i=u[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);s.isBoxSizeOuter=r=200==t(o.width),i.removeChild(e)}}function s(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var s=n(e);if("none"==s.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==s.boxSizing,l=0;h>l;l++){var f=u[l],c=s[f],m=parseFloat(c);a[f]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,y=a.paddingTop+a.paddingBottom,g=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,I=a.borderTopWidth+a.borderBottomWidth,z=d&&r,x=t(s.width);x!==!1&&(a.width=x+(z?0:p+_));var S=t(s.height);return S!==!1&&(a.height=S+(z?0:y+I)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(y+I),a.outerWidth=a.width+g,a.outerHeight=a.height+v,a}}var r,a="undefined"==typeof console?e:function(t){console.error(t)},u=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],h=u.length,d=!1;return s}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;ir?"round":"floor";s=Math[a](s),this.cols=Math.max(s,1)},i.prototype.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},i.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this._getColGroup(n),s=Math.min.apply(Math,o),r=o.indexOf(s),a={x:this.columnWidth*r,y:s},u=s+t.size.outerHeight,h=this.cols+1-o.length,d=0;h>d;d++)this.colYs[r+d]=u;return a},i.prototype._getColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++){var o=this.colYs.slice(n,n+t);e[n]=Math.max.apply(Math,o)}return e},i.prototype._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),s=o?n.left:n.right,r=s+i.outerWidth,a=Math.floor(s/this.columnWidth);a=Math.max(0,a);var u=Math.floor(r/this.columnWidth);u-=r%this.columnWidth?0:1,u=Math.min(this.cols-1,u);for(var h=this._getOption("originTop"),d=(h?n.top:n.bottom)+i.outerHeight,l=a;u>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},i.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},i.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},i.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope/js/layout-modes/masonry",["../layout-mode","masonry/masonry"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode"),require("masonry-layout")):e(t.Isotope.LayoutMode,t.Masonry)}(window,function(t,e){"use strict";var i=t.create("masonry"),n=i.prototype,o={_getElementOffset:!0,layout:!0,_getMeasurement:!0};for(var s in e.prototype)o[s]||(n[s]=e.prototype[s]);var r=n.measureColumns;n.measureColumns=function(){this.items=this.isotope.filteredItems,r.call(this)};var a=n._getOption;return n._getOption=function(t){return"fitWidth"==t?void 0!==this.options.isFitWidth?this.options.isFitWidth:this.options.fitWidth:a.apply(this.isotope,arguments)},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope/js/layout-modes/fit-rows",["../layout-mode"],e):"object"==typeof exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("fitRows"),i=e.prototype;return i._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},i._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,i=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>i&&(this.x=0,this.y=this.maxY);var n={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,n},i._getContainerSize=function(){return{height:this.maxY}},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope/js/layout-modes/vertical",["../layout-mode"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("vertical",{horizontalAlignment:0}),i=e.prototype;return i._resetLayout=function(){this.y=0},i._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},i._getContainerSize=function(){return{height:this.y}},e}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","desandro-matches-selector/matches-selector","fizzy-ui-utils/utils","isotope/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/js/layout-modes/vertical"],function(i,n,o,s,r,a){return e(t,i,n,o,s,r,a)}):"object"==typeof module&&module.exports?module.exports=e(t,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("isotope/js/item"),require("isotope/js/layout-mode"),require("isotope/js/layout-modes/masonry"),require("isotope/js/layout-modes/fit-rows"),require("isotope/js/layout-modes/vertical")):t.Isotope=e(t,t.Outlayer,t.getSize,t.matchesSelector,t.fizzyUIUtils,t.Isotope.Item,t.Isotope.LayoutMode)}(window,function(t,e,i,n,o,s,r){function a(t,e){return function(i,n){for(var o=0;oa||a>r){var u=void 0!==e[s]?e[s]:e,h=u?1:-1;return(r>a?1:-1)*h}}return 0}}var u=t.jQuery,h=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},d=e.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});d.Item=s,d.LayoutMode=r;var l=d.prototype;l._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),e.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var t in r.modes)this._initLayoutMode(t)},l.reloadItems=function(){this.itemGUID=0,e.prototype.reloadItems.call(this)},l._itemize=function(){for(var t=e.prototype._itemize.apply(this,arguments),i=0;ii;i++){var n=t[i];n.updateSortData()}};var f=function(){function t(t){if("string"!=typeof t)return t;var i=h(t).split(" "),n=i[0],o=n.match(/^\[(.+)\]$/),s=o&&o[1],r=e(s,n),a=d.sortDataParsers[i[1]]; return t=a?function(t){return t&&a(r(t))}:function(t){return t&&r(t)}}function e(t,e){return t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&i.textContent}}return t}();d.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},l._sort=function(){var t=this.options.sortBy;if(t){var e=[].concat.apply(t,this.sortHistory),i=a(e,this.options.sortAscending);this.filteredItems.sort(i),t!=this.sortHistory[0]&&this.sortHistory.unshift(t)}},l._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},l._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},l._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},l._manageStamp=function(t){this._mode()._manageStamp(t)},l._getContainerSize=function(){return this._mode()._getContainerSize()},l.needsResizeLayout=function(){return this._mode().needsResizeLayout()},l.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},l.prepended=function(t){var e=this._itemize(t);if(e.length){this._resetLayout(),this._manageStamps();var i=this._filterRevealAdded(e);this.layoutItems(this.filteredItems),this.filteredItems=i.concat(this.filteredItems),this.items=e.concat(this.items)}},l._filterRevealAdded=function(t){var e=this._filter(t);return this.hide(e.needHide),this.reveal(e.matches),this.layoutItems(e.matches,!0),e.matches},l.insert=function(t){var e=this.addItems(t);if(e.length){var i,n,o=e.length;for(i=0;o>i;i++)n=e[i],this.element.appendChild(n.element);var s=this._filter(e).matches;for(i=0;o>i;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;o>i;i++)delete e[i].isLayoutInstant;this.reveal(s)}};var c=l.remove;return l.remove=function(t){t=o.makeArray(t);var e=this.getItems(t);c.call(this,t);for(var i=e&&e.length,n=0;i&&i>n;n++){var s=e[n];o.removeFrom(this.filteredItems,s)}},l.shuffle=function(){for(var t=0;th;h++)if(t.contains(a,f[h])){r=t(f[h]);var p=r.height(),s=r.width(),g=r.offset(),c=r.data("inview");if(!i||!e)break;g.top+p>i.top&&g.topi.left&&g.leftg.left?"right":i.left+e.widthg.top?"bottom":i.top+e.heighta?a-e:0,p=0;p=e)null!==l.currentTop&&(l.stickyElement.css("position","").css("top",""),l.stickyElement.trigger("sticky-end",[l]).parent().removeClass(l.className),l.currentTop=null);else{var u=o-l.stickyElement.outerHeight()-l.topSpacing-l.bottomSpacing-e-c;0>u?u+=l.topSpacing:u=l.topSpacing,l.currentTop!=u&&(l.stickyElement.css("position","fixed").css("top",u),"undefined"!=typeof l.getWidthFrom&&l.stickyElement.css("width",t(l.getWidthFrom).width()),l.stickyElement.trigger("sticky-start",[l]).parent().addClass(l.className),l.currentTop=u)}}},a=function(){r=i.height();for(var e=0;e
").attr("id",r+"-sticky-wrapper").addClass(n.wrapperClassName));i.wrapAll(o),n.center&&i.parent().css({width:i.outerWidth(),marginLeft:"auto",marginRight:"auto"}),"right"==i.css("float")&&i.css({"float":"none"}).parent().css({"float":"right"});var a=i.parent();a.css("height",i.outerHeight()),s.push({topSpacing:n.topSpacing,bottomSpacing:n.bottomSpacing,stickyElement:i,currentTop:null,stickyWrapper:a,className:n.className,getWidthFrom:n.getWidthFrom,responsiveWidth:n.responsiveWidth})})},update:o,unstick:function(){return this.each(function(){for(var e=t(this),i=-1,n=0;n(e||I.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(n){return n.target===t.wrap[0]||e.contains(t.wrap[0],n.target)?void 0:(t._setFocus(),!1)},_parseMarkup:function(t,n,i){var o;i.data&&(n=e.extend(i.data,n)),T(p,[t,n,i]),e.each(n,function(e,n){if(void 0===n||n===!1)return!0;if(o=e.split("_"),o.length>1){var i=t.find(h+"-"+o[0]);if(i.length>0){var r=o[1];"replaceWith"===r?i[0]!==n[0]&&i.replaceWith(n):"img"===r?i.is("img")?i.attr("src",n):i.replaceWith(''):i.attr(o[1],n)}}else t.find(h+"-"+e).html(n)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.id="mfp-sbm",e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:w.prototype,modules:[],open:function(t,n){return _(),t=t?e.extend(!0,{},t):{},t.isObj=!0,t.index=n||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,n){n.options&&(e.magnificPopup.defaults[t]=n.options),e.extend(this.proto,n.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'',tClose:"Close (Esc)",tLoading:"Loading..."}},e.fn.magnificPopup=function(n){_();var i=e(this);if("string"==typeof n)if("open"===n){var o,r=b?i.data("magnificPopup"):i[0].magnificPopup,a=parseInt(arguments[1],10)||0;r.items?o=r.items[a]:(o=i,r.delegate&&(o=o.find(r.delegate)),o=o.eq(a)),t._openClick({mfpEl:o},i,r)}else t.isOpen&&t[n].apply(t,Array.prototype.slice.call(arguments,1));else n=e.extend(!0,{},n),b?i.data("magnificPopup",n):i[0].magnificPopup=n,t.addGroup(i,n);return i};var P,O,z,M="inline",B=function(){z&&(O.after(z.addClass(P)).detach(),z=null)};e.magnificPopup.registerModule(M,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(M),x(l+"."+M,function(){B()})},getInline:function(n,i){if(B(),n.src){var o=t.st.inline,r=e(n.src);if(r.length){var a=r[0].parentNode;a&&a.tagName&&(O||(P=o.hiddenClass,O=k(P),P="mfp-"+P),z=r.after(O).detach().removeClass(P)),t.updateStatus("ready")}else t.updateStatus("error",o.tNotFound),r=e("
");return n.inlineElement=r,r}return t.updateStatus("ready"),t._parseMarkup(i,{},n),i}}});var F,H="ajax",L=function(){F&&i.removeClass(F)},A=function(){L(),t.req&&t.req.abort()};e.magnificPopup.registerModule(H,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){t.types.push(H),F=t.st.ajax.cursor,x(l+"."+H,A),x("BeforeChange."+H,A)},getAjax:function(n){F&&i.addClass(F),t.updateStatus("loading");var o=e.extend({url:n.src,success:function(i,o,r){var a={data:i,xhr:r};T("ParseAjax",a),t.appendContent(e(a.data),H),n.finished=!0,L(),t._setFocus(),setTimeout(function(){t.wrap.addClass(v)},16),t.updateStatus("ready"),T("AjaxContentAdded")},error:function(){L(),n.finished=n.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",n.src))}},t.st.ajax.settings);return t.req=e.ajax(o),""}}});var j,N=function(n){if(n.data&&void 0!==n.data.title)return n.data.title;var i=t.st.image.titleSrc;if(i){if(e.isFunction(i))return i.call(t,n);if(n.el)return n.el.attr(i)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'
',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'The image could not be loaded.'},proto:{initImage:function(){var e=t.st.image,n=".image";t.types.push("image"),x(f+n,function(){"image"===t.currItem.type&&e.cursor&&i.addClass(e.cursor)}),x(l+n,function(){e.cursor&&i.removeClass(e.cursor),I.off("resize"+h)}),x("Resize"+n,t.resizeImage),t.isLowIE&&x("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var n=0;t.isLowIE&&(n=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-n)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,j&&clearInterval(j),e.isCheckingImgSize=!1,T("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var n=0,i=e.img[0],o=function(r){j&&clearInterval(j),j=setInterval(function(){return i.naturalWidth>0?void t._onImageHasSize(e):(n>200&&clearInterval(j),n++,3===n?o(10):40===n?o(50):100===n&&o(500),void 0)},r)};o(1)},getImage:function(n,i){var o=0,r=function(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("ready")),n.hasSize=!0,n.loaded=!0,T("ImageLoadComplete")):(o++,200>o?setTimeout(r,100):a()))},a=function(){n&&(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("error",s.tError.replace("%url%",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},s=t.st.image,l=i.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",n.img=e(c).on("load.mfploader",r).on("error.mfploader",a),c.src=n.src,l.is("img")&&(n.img=n.img.clone()),c=n.img[0],c.naturalWidth>0?n.hasSize=!0:c.width||(n.hasSize=!1)}return t._parseMarkup(i,{title:N(n),img_replaceWith:n.img},n),t.resizeImage(),n.hasSize?(j&&clearInterval(j),n.loadError?(i.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",n.src))):(i.removeClass("mfp-loading"),t.updateStatus("ready")),i):(t.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,i.addClass("mfp-loading"),t.findImageSize(n)),i)}}});var W,R=function(){return void 0===W&&(W=void 0!==document.createElement("p").style.MozTransform),W};e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,n=t.st.zoom,i=".zoom";if(n.enabled&&t.supportsTransition){var o,r,a=n.duration,s=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),i="all "+n.duration/1e3+"s "+n.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},r="transition";return o["-webkit-"+r]=o["-moz-"+r]=o["-o-"+r]=o[r]=i,t.css(o),t},d=function(){t.content.css("visibility","visible")};x("BuildControls"+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.content.css("visibility","hidden"),e=t._getItemToZoom(),!e)return void d();r=s(e),r.css(t._getOffset()),t.wrap.append(r),o=setTimeout(function(){r.css(t._getOffset(!0)),o=setTimeout(function(){d(),setTimeout(function(){r.remove(),e=r=null,T("ZoomAnimationEnded")},16)},a)},16)}}),x(c+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.st.removalDelay=a,!e){if(e=t._getItemToZoom(),!e)return;r=s(e)}r.css(t._getOffset(!0)),t.wrap.append(r),t.content.css("visibility","hidden"),setTimeout(function(){r.css(t._getOffset())},16)}}),x(l+i,function(){t._allowZoom()&&(d(),r&&r.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(n){var i;i=n?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var o=i.offset(),r=parseInt(i.css("padding-top"),10),a=parseInt(i.css("padding-bottom"),10);o.top-=e(window).scrollTop()-r;var s={width:i.width(),height:(b?i.innerHeight():i[0].offsetHeight)-a-r};return R()?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var Z="iframe",q="//about:blank",D=function(e){if(t.currTemplate[Z]){var n=t.currTemplate[Z].find("iframe");n.length&&(e||(n[0].src=q),t.isIE8&&n.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(Z,{options:{markup:'
',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(Z),x("BeforeChange",function(e,t,n){t!==n&&(t===Z?D():n===Z&&D(!0))}),x(l+"."+Z,function(){D()})},getIframe:function(n,i){var o=n.src,r=t.st.iframe;e.each(r.patterns,function(){return o.indexOf(this.index)>-1?(this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1):void 0});var a={};return r.srcAction&&(a[r.srcAction]=o),t._parseMarkup(i,a,n),t.updateStatus("ready"),i}}});var K=function(e){var n=t.items.length;return e>n-1?e-n:0>e?n+e:e},Y=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var n=t.st.gallery,i=".mfp-gallery",r=Boolean(e.fn.mfpFastClick);return t.direction=!0,n&&n.enabled?(a+=" mfp-gallery",x(f+i,function(){n.navigateByImgClick&&t.wrap.on("click"+i,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),o.on("keydown"+i,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),x("UpdateStatus"+i,function(e,n){n.text&&(n.text=Y(n.text,t.currItem.index,t.items.length))}),x(p+i,function(e,i,o,r){var a=t.items.length;o.counter=a>1?Y(n.tCounter,r.index,a):""}),x("BuildControls"+i,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var i=n.arrowMarkup,o=t.arrowLeft=e(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(y),a=t.arrowRight=e(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(y),s=r?"mfpFastClick":"click";o[s](function(){t.prev()}),a[s](function(){t.next()}),t.isIE7&&(k("b",o[0],!1,!0),k("a",o[0],!1,!0),k("b",a[0],!1,!0),k("a",a[0],!1,!0)),t.container.append(o.add(a))}}),x(m+i,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),x(l+i,function(){o.off(i),t.wrap.off("click"+i),t.arrowLeft&&r&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null}),void 0):!1},next:function(){t.direction=!0,t.index=K(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=K(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,i=Math.min(n[0],t.items.length),o=Math.min(n[1],t.items.length);for(e=1;e<=(t.direction?o:i);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?i:o);e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=K(n),!t.items[n].preloaded){var i=t.items[n];i.parsed||(i=t.parseEl(n)),T("LazyLoad",i),"image"===i.type&&(i.img=e('').on("load.mfploader",function(){i.hasSize=!0}).on("error.mfploader",function(){i.hasSize=!0,i.loadError=!0,T("LazyLoadError",i)}).attr("src",i.src)),i.preloaded=!0}}}});var U="retina";e.magnificPopup.registerModule(U,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,n=e.ratio;n=isNaN(n)?n():n,n>1&&(x("ImageHasSize."+U,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),x("ElementParse."+U,function(t,i){i.src=e.replaceSrc(i,n)}))}}}}),function(){var t=1e3,n="ontouchstart"in window,i=function(){I.off("touchmove"+r+" touchend"+r)},o="mfpFastClick",r="."+o;e.fn.mfpFastClick=function(o){return e(this).each(function(){var a,s=e(this);if(n){var l,c,d,u,p,f;s.on("touchstart"+r,function(e){u=!1,f=1,p=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],c=p.clientX,d=p.clientY,I.on("touchmove"+r,function(e){p=e.originalEvent?e.originalEvent.touches:e.touches,f=p.length,p=p[0],(Math.abs(p.clientX-c)>10||Math.abs(p.clientY-d)>10)&&(u=!0,i())}).on("touchend"+r,function(e){i(),u||f>1||(a=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){a=!1},t),o())})})}s.on("click"+r,function(){a||o()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+r+" click"+r),n&&I.off("touchmove"+r+" touchend"+r)}}(),_()}(window.jQuery||window.Zepto); !function(i){i.fn.theiaStickySidebar=function(t){var o={containerSelector:"",additionalMarginTop:0,additionalMarginBottom:0,updateSidebarHeight:!0,minWidth:0};t=i.extend(o,t),t.additionalMarginTop=parseInt(t.additionalMarginTop)||0,t.additionalMarginBottom=parseInt(t.additionalMarginBottom)||0,i("head").append(i('')),this.each(function(){function o(){e.fixedScrollTop=0,e.sidebar.css({"min-height":"1px"}),e.stickySidebar.css({position:"static",width:""})}function a(t){var o=t.height();return t.children().each(function(){o=Math.max(o,i(this).height())}),o}var e={};e.sidebar=i(this),e.options=t||{},e.container=i(e.options.containerSelector),0==e.container.size()&&(e.container=e.sidebar.parent()),e.sidebar.parents().css("-webkit-transform","none"),e.sidebar.css({position:"relative",overflow:"visible","-webkit-box-sizing":"border-box","-moz-box-sizing":"border-box","box-sizing":"border-box"}),e.stickySidebar=e.sidebar.find(".theiaStickySidebar"),0==e.stickySidebar.length&&(e.sidebar.find("script").remove(),e.stickySidebar=i("
").addClass("theiaStickySidebar").append(e.sidebar.children()),e.sidebar.append(e.stickySidebar)),e.marginTop=parseInt(e.sidebar.css("margin-top")),e.marginBottom=parseInt(e.sidebar.css("margin-bottom")),e.paddingTop=parseInt(e.sidebar.css("padding-top")),e.paddingBottom=parseInt(e.sidebar.css("padding-bottom"));var d=e.stickySidebar.offset().top,r=e.stickySidebar.outerHeight();e.stickySidebar.css("padding-top",1),e.stickySidebar.css("padding-bottom",1),d-=e.stickySidebar.offset().top,r=e.stickySidebar.outerHeight()-r-d,0==d?(e.stickySidebar.css("padding-top",0),e.stickySidebarPaddingTop=0):e.stickySidebarPaddingTop=1,0==r?(e.stickySidebar.css("padding-bottom",0),e.stickySidebarPaddingBottom=0):e.stickySidebarPaddingBottom=1,e.previousScrollTop=null,e.fixedScrollTop=0,o(),e.onScroll=function(e){if(e.stickySidebar.is(":visible")){if(i("body").width()e.container.width())return void o();var d=i(document).scrollTop(),r="static";if(d>=e.container.offset().top+(e.paddingTop+e.marginTop-e.options.additionalMarginTop)){var s,n=e.paddingTop+e.marginTop+t.additionalMarginTop,c=e.paddingBottom+e.marginBottom+t.additionalMarginBottom,p=e.container.offset().top,b=e.container.offset().top+a(e.container),g=0+t.additionalMarginTop,l=e.stickySidebar.outerHeight()+n+c0?Math.min(h,g):Math.max(h,s-e.stickySidebar.outerHeight()),h=Math.max(h,f),h=Math.min(h,S-e.stickySidebar.outerHeight());var y=e.container.height()==e.stickySidebar.outerHeight();r=(y||h!=g)&&(y||h!=s-e.stickySidebar.outerHeight())?d+h-e.sidebar.offset().top-e.paddingTop<=t.additionalMarginTop?"static":"absolute":"fixed"}if("fixed"==r)e.stickySidebar.css({position:"fixed",width:e.sidebar.width(),top:h,left:e.sidebar.offset().left+parseInt(e.sidebar.css("padding-left"))+parseInt(e.sidebar.css("border-left"))});else if("absolute"==r){var k={};"absolute"!=e.stickySidebar.css("position")&&(k.position="absolute",k.top=d+h-e.sidebar.offset().top-e.stickySidebarPaddingTop-e.stickySidebarPaddingBottom),k.width=e.sidebar.width(),k.left="",e.stickySidebar.css(k)}else"static"==r&&o();"static"!=r&&1==e.options.updateSidebarHeight&&e.sidebar.css({"min-height":e.stickySidebar.outerHeight()+e.stickySidebar.offset().top-e.sidebar.offset().top+e.paddingBottom}),e.previousScrollTop=d}},e.onScroll(e),i(document).scroll(function(i){return function(){i.onScroll(i)}}(e)),i(window).resize(function(i){return function(){i.stickySidebar.css({position:"static"}),i.onScroll(i)}}(e))})}}(jQuery); !function(t,n,o){"use strict";t.fn.doubleTouchToGo=function(){return"ontouchstart"in n||navigator.msMaxTouchPoints||navigator.userAgent.toLowerCase().match(/windows phone os 7/i)?(this.each(function(){var n=!1;t(this).on("click",function(o){var i=t(this);i[0]!=n[0]&&(o.preventDefault(),n=i)}),t(o).on("click touchstart MSPointerDown",function(o){for(var i=!0,e=t(o.target).parents(),r=0;ra.indexOf("{")&&(a="{"+a+"}"),a=eval("("+a+")"),c.data(b,d.single,a),a}}}),c.fn.metadata=function(e){return c.metadata.get(this[0],e)}}(jQuery),String.prototype.getVideoID=function(){var e;return e="http://youtu.be/"==this.substr(0,16)?this.replace("http://youtu.be/",""):this.indexOf("http")>-1?this.match(/[\\?&]v=([^&#]*)/)[1]:this},jQuery.mbYTPlayer={name:"jquery.mb.YTPlayer",version:"2.6.0",author:"Matteo Bicocchi",defaults:{containment:"body",ratio:"16/9",showYTLogo:!1,videoURL:null,startAt:0,autoPlay:!0,vol:100,addRaster:!1,opacity:1,quality:"default",mute:!1,loop:!0,showControls:!1,showAnnotations:!1,printUrl:!0,stopMovieOnClick:!1,realfullscreen:!0,onReady:function(){},onStateChange:function(){},onPlaybackQualityChange:function(){},onError:function(){}},controls:{play:"P",pause:"p",mute:"M",unmute:"A",onlyYT:"O",showSite:"R",ytLogo:"Y"},rasterImg:"images/raster.png",rasterImgRetina:"images/raster@2x.png",locationProtocol:"file:"!=location.protocol?location.protocol:"http:",buildPlayer:function(options){return this.each(function(){var YTPlayer=this,$YTPlayer=jQuery(YTPlayer);YTPlayer.loop=0,YTPlayer.opt={};var property={};$YTPlayer.addClass("mb_YTVPlayer"),jQuery.metadata&&(jQuery.metadata.setType("class"),property=$YTPlayer.metadata()),jQuery.isEmptyObject(property)&&(property=$YTPlayer.data("property")&&"string"==typeof $YTPlayer.data("property")?eval("("+$YTPlayer.data("property")+")"):$YTPlayer.data("property")),jQuery.extend(YTPlayer.opt,jQuery.mbYTPlayer.defaults,options,property);var canGoFullscreen=!(jQuery.browser.msie||jQuery.browser.opera||self.location.href!=top.location.href);canGoFullscreen||(YTPlayer.opt.realfullscreen=!1),$YTPlayer.attr("id")||$YTPlayer.attr("id","id_"+(new Date).getTime()),YTPlayer.opt.id=YTPlayer.id,YTPlayer.isAlone=!1,YTPlayer.opt.isBgndMovie&&(YTPlayer.opt.containment="body"),YTPlayer.opt.isBgndMovie&&void 0!=YTPlayer.opt.isBgndMovie.mute&&(YTPlayer.opt.mute=YTPlayer.opt.isBgndMovie.mute),YTPlayer.opt.videoURL||(YTPlayer.opt.videoURL=$YTPlayer.attr("href"));var playerID="mbYTP_"+YTPlayer.id,videoID=this.opt.videoURL?this.opt.videoURL.getVideoID():$YTPlayer.attr("href")?$YTPlayer.attr("href").getVideoID():!1;YTPlayer.videoID=videoID,YTPlayer.opt.showAnnotations=YTPlayer.opt.showAnnotations?"0":"3";var playerVars={autoplay:0,modestbranding:1,controls:0,showinfo:0,rel:0,enablejsapi:1,version:3,playerapiid:playerID,origin:"*",allowfullscreen:!0,wmode:"transparent",iv_load_policy:YTPlayer.opt.showAnnotations},canPlayHTML5=!1,v=document.createElement("video");v.canPlayType&&(canPlayHTML5=!0),canPlayHTML5&&jQuery.extend(playerVars,{html5:1}),jQuery.browser.msie&&jQuery.browser.version<9&&(this.opt.opacity=1);var playerBox=jQuery("
").attr("id",playerID).addClass("playerBox"),overlay=jQuery("
").css({position:"absolute",top:0,left:0,width:"100%",height:"100%"}).addClass("YTPOverlay");if(YTPlayer.opt.containment=jQuery("self"==YTPlayer.opt.containment?this:YTPlayer.opt.containment),YTPlayer.isBackground="body"==YTPlayer.opt.containment.get(0).tagName.toLowerCase(),ytp.isDevice&&YTPlayer.isBackground)return void $YTPlayer.hide();if(YTPlayer.opt.addRaster){var retina=window.retina||window.devicePixelRatio>1;overlay.addClass(retina?"raster retina":"raster")}else overlay.removeClass("raster retina");var wrapper=jQuery("
").addClass("mbYTP_wrapper").attr("id","wrapper_"+playerID);if(wrapper.css({position:"absolute",zIndex:0,minWidth:"100%",minHeight:"100%",left:0,top:0,overflow:"hidden",opacity:0}),playerBox.css({position:"absolute",zIndex:0,width:"100%",height:"100%",top:0,left:0,overflow:"hidden",opacity:this.opt.opacity}),wrapper.append(playerBox),!YTPlayer.isBackground||!ytp.isInit){if(YTPlayer.opt.containment.children().each(function(){"static"==jQuery(this).css("position")&&jQuery(this).css("position","relative")}),YTPlayer.isBackground?(jQuery("body").css({position:"relative",minWidth:"100%",minHeight:"100%",zIndex:1,boxSizing:"border-box"}),wrapper.css({position:"fixed",top:0,left:0,zIndex:0}),$YTPlayer.hide(),YTPlayer.opt.containment.prepend(wrapper)):YTPlayer.opt.containment.prepend(wrapper),YTPlayer.wrapper=wrapper,playerBox.css({opacity:1}),ytp.isDevice||(playerBox.after(overlay),YTPlayer.overlay=overlay),YTPlayer.isBackground||overlay.on("mouseenter",function(){$YTPlayer.find(".mb_YTVPBar").addClass("visible")}).on("mouseleave",function(){$YTPlayer.find(".mb_YTVPBar").removeClass("visible")}),ytp.YTAPIReady)setTimeout(function(){jQuery(document).trigger("YTAPIReady")},200);else{var tag=document.createElement("script");tag.src=jQuery.mbYTPlayer.locationProtocol+"//www.youtube.com/player_api",tag.id="YTAPI";var firstScriptTag=document.getElementsByTagName("script")[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag)}jQuery(document).on("YTAPIReady",function(){YTPlayer.isBackground&&ytp.isInit||YTPlayer.opt.isInit||(YTPlayer.isBackground&&YTPlayer.opt.stopMovieOnClick&&jQuery(document).off("mousedown.ytplayer").on("mousedown,.ytplayer",function(e){var r=jQuery(e.target);(r.is("a")||r.parents().is("a"))&&$YTPlayer.pauseYTP()}),YTPlayer.isBackground&&(ytp.isInit=!0),YTPlayer.opt.isInit=!0,YTPlayer.opt.vol=YTPlayer.opt.vol?YTPlayer.opt.vol:100,jQuery.mbYTPlayer.getDataFromFeed(YTPlayer.videoID,YTPlayer),jQuery(document).on("getVideoInfo_"+YTPlayer.opt.id,function(){return ytp.isDevice&&!YTPlayer.isBackground?void new YT.Player(playerID,{height:"100%",width:"100%",videoId:YTPlayer.videoID,events:{onReady:function(){$YTPlayer.optimizeDisplay(),playerBox.css({opacity:1}),YTPlayer.wrapper.css({opacity:1}),$YTPlayer.optimizeDisplay()},onStateChange:function(){}}}):void new YT.Player(playerID,{videoId:YTPlayer.videoID.toString(),playerVars:playerVars,events:{onReady:function(e){YTPlayer.player=e.target,YTPlayer.isReady||(YTPlayer.isReady=!0,YTPlayer.playerEl=YTPlayer.player.getIframe(),$YTPlayer.optimizeDisplay(),YTPlayer.videoID=videoID,jQuery(window).on("resize.YTP",function(){$YTPlayer.optimizeDisplay()}),YTPlayer.opt.showControls&&jQuery(YTPlayer).buildYTPControls(),YTPlayer.player.setPlaybackQuality(YTPlayer.opt.quality),YTPlayer.opt.startAt>0&&YTPlayer.player.seekTo(parseFloat(YTPlayer.opt.startAt),!0),YTPlayer.opt.autoPlay?($YTPlayer.playYTP(),YTPlayer.player.setVolume(YTPlayer.opt.vol),YTPlayer.opt.mute?jQuery(YTPlayer).muteYTPVolume():jQuery(YTPlayer).unmuteYTPVolume()):(YTPlayer.player.pauseVideo(),YTPlayer.checkForStartAt=setInterval(function(){YTPlayer.player.getCurrentTime()>=YTPlayer.opt.startAt&&(clearInterval(YTPlayer.checkForStartAt),YTPlayer.opt.mute?jQuery(YTPlayer).muteYTPVolume():jQuery(YTPlayer).unmuteYTPVolume())},1)),"function"==typeof YTPlayer.opt.onReady&&YTPlayer.opt.onReady($YTPlayer),jQuery.mbYTPlayer.checkForState(YTPlayer))},onStateChange:function(e){if("function"==typeof e.target.getPlayerState){var r=e.target.getPlayerState();"function"==typeof YTPlayer.opt.onStateChange&&YTPlayer.opt.onStateChange($YTPlayer,r);var t=(jQuery(YTPlayer.playerEl),jQuery("#controlBar_"+YTPlayer.id)),a=YTPlayer.opt;if(0==r){if(YTPlayer.state==r)return;YTPlayer.state=r,YTPlayer.player.pauseVideo();var o=YTPlayer.opt.startAt?YTPlayer.opt.startAt:1;a.loop?(YTPlayer.wrapper.css({opacity:0}),$YTPlayer.playYTP(),YTPlayer.player.seekTo(o,!0)):YTPlayer.isBackground||(YTPlayer.player.seekTo(o,!0),$YTPlayer.playYTP(),setTimeout(function(){$YTPlayer.pauseYTP()},10)),!a.loop&&YTPlayer.isBackground?YTPlayer.wrapper.CSSAnimate({opacity:0},2e3):a.loop&&(YTPlayer.wrapper.css({opacity:0}),YTPlayer.loop++),t.find(".mb_YTVPPlaypause").html(jQuery.mbYTPlayer.controls.play),jQuery(YTPlayer).trigger("YTPEnd")}if(3==r){if(YTPlayer.state==r)return;YTPlayer.state=r,t.find(".mb_YTVPPlaypause").html(jQuery.mbYTPlayer.controls.play),jQuery(YTPlayer).trigger("YTPBuffering")}if(-1==r){if(YTPlayer.state==r)return;YTPlayer.state=r,YTPlayer.wrapper.css({opacity:0}),jQuery(YTPlayer).trigger("YTPUnstarted")}if(1==r){if(YTPlayer.state==r)return;YTPlayer.state=r,YTPlayer.player.setPlaybackQuality(YTPlayer.opt.quality),YTPlayer.opt.mute&&($YTPlayer.muteYTPVolume(),YTPlayer.opt.mute=!1),YTPlayer.opt.autoPlay&&0==YTPlayer.loop?YTPlayer.wrapper.CSSAnimate({opacity:YTPlayer.isAlone?1:YTPlayer.opt.opacity},2e3):YTPlayer.isBackground?setTimeout(function(){jQuery(YTPlayer.playerEl).CSSAnimate({opacity:1},2e3),YTPlayer.wrapper.CSSAnimate({opacity:YTPlayer.opt.opacity},2e3)},1e3):(YTPlayer.wrapper.css({opacity:YTPlayer.isAlone?1:YTPlayer.opt.opacity}),$YTPlayer.css({background:"rgba(0,0,0,0.5)"})),t.find(".mb_YTVPPlaypause").html(jQuery.mbYTPlayer.controls.pause),jQuery(YTPlayer).trigger("YTPStart"),"undefined"!=typeof _gaq&&_gaq.push(["_trackEvent","YTPlayer","Play",YTPlayer.title||YTPlayer.videoID.toString()])}if(2==r){if(YTPlayer.state==r)return;YTPlayer.state=r,t.find(".mb_YTVPPlaypause").html(jQuery.mbYTPlayer.controls.play),jQuery(YTPlayer).trigger("YTPPause")}}},onPlaybackQualityChange:function(){"function"==typeof YTPlayer.opt.onPlaybackQualityChange&&YTPlayer.opt.onPlaybackQualityChange($YTPlayer)},onError:function(e){2==e.data&&YTPlayer.isPlayList&&jQuery(YTPlayer).playNext(),"function"==typeof YTPlayer.opt.onError&&YTPlayer.opt.onError($YTPlayer,e)}}})}))})}})},getDataFromFeed:function(e,r){r.videoID=e,jQuery.browser.msie?("auto"==r.opt.ratio?r.opt.ratio="16/9":r.opt.ratio,r.isInit||(r.isInit=!0,setTimeout(function(){jQuery(document).trigger("getVideoInfo_"+r.opt.id)},100)),jQuery(r).trigger("YTPChanged")):(jQuery.getJSON(jQuery.mbYTPlayer.locationProtocol+"//gdata.youtube.com/feeds/api/videos/"+e+"?v=2&alt=jsonc",function(e){r.dataReceived=!0;var t=e.data;if(r.title=t.title,r.videoData=t,"auto"==r.opt.ratio&&(r.opt.ratio=t.aspectRatio&&"widescreen"===t.aspectRatio?"16/9":"4/3"),!r.isInit){if(r.isInit=!0,!r.isBackground){var a=r.videoData.thumbnail.hqDefault;jQuery(r).css({background:"rgba(0,0,0,0.5) url("+a+") center center",backgroundSize:"cover"})}jQuery(document).trigger("getVideoInfo_"+r.opt.id)}jQuery(r).trigger("YTPChanged")}),setTimeout(function(){r.dataReceived||r.isInit||(r.isInit=!0,jQuery(document).trigger("getVideoInfo_"+r.opt.id))},2500))},getVideoID:function(){var e=this.get(0);return e.videoID||!1},setVideoQuality:function(e){var r=this.get(0);r.player.setPlaybackQuality(e)},YTPlaylist:function(e,r,t){var a=this.get(0);a.isPlayList=!0,r&&(e=jQuery.shuffle(e)),a.videoID||(a.videos=e,a.videoCounter=0,a.videoLength=e.length,jQuery(a).data("property",e[0]),jQuery(a).mb_YTPlayer()),"function"==typeof t&&jQuery(a).on("YTPChanged",function(){t(a)}),jQuery(a).on("YTPEnd",function(){jQuery(a).playNext()})},playNext:function(){var e=this.get(0);e.videoCounter++,e.videoCounter>=e.videoLength&&(e.videoCounter=0),jQuery(e.playerEl).css({opacity:0}),jQuery(e).changeMovie(e.videos[e.videoCounter])},playPrev:function(){var e=this.get(0);e.videoCounter--,e.videoCounter<=0&&(e.videoCounter=e.videoLength),jQuery(e.playerEl).css({opacity:0}),jQuery(e).changeMovie(e.videos[e.videoCounter])},changeMovie:function(e){var r=this.get(0),t=r.opt;e&&jQuery.extend(t,e),r.videoID=t.videoURL.getVideoID(),jQuery(r).pauseYTP();var a=jQuery.browser.msie?1e3:0;if(jQuery(r).getPlayer().cueVideoByUrl(encodeURI(jQuery.mbYTPlayer.locationProtocol+"//www.youtube.com/v/"+r.videoID),5,r.opt.quality),setTimeout(function(){jQuery(r).playYTP(),jQuery(r).one("YTPStart",function(){jQuery(r.playerEl).CSSAnimate({opacity:1},2e3)})},a),r.opt.mute?jQuery(r).muteYTPVolume():jQuery(r).unmuteYTPVolume(),r.opt.addRaster){var o=window.retina||window.devicePixelRatio>1;r.overlay.addClass(o?"raster retina":"raster")}else r.overlay.removeClass("raster"),r.overlay.removeClass("retina");jQuery("#controlBar_"+r.id).remove(),r.opt.showControls&&jQuery(r).buildYTPControls(),jQuery.mbYTPlayer.getDataFromFeed(r.videoID,r),jQuery(r).optimizeDisplay(),jQuery.mbYTPlayer.checkForState(r)},getPlayer:function(){return jQuery(this).get(0).player},playerDestroy:function(){var e=this.get(0);ytp.YTAPIReady=!1,ytp.isInit=!1,e.opt.isInit=!1,e.videoID=null;var r=e.wrapper;r.remove(),jQuery("#controlBar_"+e.id).remove()},fullscreen:function(e){function r(e,r){for(var t,a,o=["webkit","moz","ms","o",""],n=0;n0||e&&r.player.getVolume()==e?jQuery(r).muteYTPVolume():r.opt.vol=e:jQuery(r).unmuteYTPVolume(),r.player.setVolume(r.opt.vol)},muteYTPVolume:function(){var e=this.get(0);e.opt.vol=e.player.getVolume()||50,e.player.mute(),e.player.setVolume(0);var r=jQuery("#controlBar_"+e.id),t=r.find(".mb_YTVPMuteUnmute");t.html(jQuery.mbYTPlayer.controls.unmute)},unmuteYTPVolume:function(){var e=this.get(0);e.player.unMute(),e.player.setVolume(e.opt.vol);var r=jQuery("#controlBar_"+e.id),t=r.find(".mb_YTVPMuteUnmute");t.html(jQuery.mbYTPlayer.controls.mute)},manageYTPProgress:function(){var e=this.get(0),r=jQuery("#controlBar_"+e.id),t=r.find(".mb_YTVPProgress"),a=r.find(".mb_YTVPLoaded"),o=r.find(".mb_YTVTime"),n=t.outerWidth(),i=Math.floor(e.player.getCurrentTime()),l=Math.floor(e.player.getDuration()),y=i*n/l,s=0,u=100*e.player.getVideoLoadedFraction();return a.css({left:s,width:u+"%"}),o.css({left:0,width:y}),{totalTime:l,currentTime:i}},buildYTPControls:function(){var e=this.get(0),r=e.opt;if(!jQuery("#controlBar_"+e.id).length){var t=jQuery("").attr("id","controlBar_"+e.id).addClass("mb_YTVPBar").css({whiteSpace:"noWrap",position:e.isBackground?"fixed":"absolute",zIndex:e.isBackground?1e4:1e3}).hide(),a=jQuery("
").addClass("buttonBar"),o=jQuery(""+jQuery.mbYTPlayer.controls.play+"").addClass("mb_YTVPPlaypause ytpicon").click(function(){1==e.player.getPlayerState()?jQuery(e).pauseYTP():jQuery(e).playYTP()}),n=jQuery(""+jQuery.mbYTPlayer.controls.mute+"").addClass("mb_YTVPMuteUnmute ytpicon").click(function(){0==e.player.getVolume()?jQuery(e).unmuteYTPVolume():jQuery(e).muteYTPVolume()}),i=jQuery("").addClass("mb_YTVPTime"),l=r.videoURL;l.indexOf("http")<0&&(l=jQuery.mbYTPlayer.locationProtocol+"//www.youtube.com/watch?v="+r.videoURL);var y=jQuery("").html(jQuery.mbYTPlayer.controls.ytLogo).addClass("mb_YTVPUrl ytpicon").attr("title","view on YouTube").on("click",function(){window.open(l,"viewOnYT")}),s=jQuery("").html(jQuery.mbYTPlayer.controls.onlyYT).addClass("mb_OnlyYT ytpicon").on("click",function(){jQuery(e).fullscreen(r.realfullscreen)}),u=jQuery("
").addClass("mb_YTVPProgress").css("position","absolute").click(function(r){d.css({width:r.clientX-d.offset().left}),e.timeW=r.clientX-d.offset().left,t.find(".mb_YTVPLoaded").css({width:0});var a=Math.floor(e.player.getDuration());e["goto"]=d.outerWidth()*a/u.outerWidth(),e.player.seekTo(parseFloat(e["goto"]),!0),t.find(".mb_YTVPLoaded").css({width:0})}),p=jQuery("
").addClass("mb_YTVPLoaded").css("position","absolute"),d=jQuery("
").addClass("mb_YTVTime").css("position","absolute");u.append(p).append(d),a.append(o).append(n).append(i),r.printUrl&&a.append(y),(e.isBackground||e.opt.realfullscreen&&!e.isBackground)&&a.append(s),t.append(a).append(u),e.isBackground?jQuery("body").after(t):(t.addClass("inlinePlayer"),e.wrapper.before(t)),t.fadeIn()}},checkForState:function(e){var r=jQuery("#controlBar_"+e.id),t=e.opt,a=e.opt.startAt?e.opt.startAt:1;e.getState=setInterval(function(){var o=jQuery(e).manageYTPProgress();r.find(".mb_YTVPTime").html(jQuery.mbYTPlayer.formatTime(o.currentTime)+" / "+jQuery.mbYTPlayer.formatTime(o.totalTime)),parseFloat(e.player.getDuration()-3)r?"0"+r:r)+":"+(9>t?"0"+t:t)}},jQuery.fn.toggleVolume=function(){var e=this.get(0);if(e)return e.player.isMuted()?(jQuery(e).unmuteYTPVolume(),!0):(jQuery(e).muteYTPVolume(),!1)},jQuery.fn.optimizeDisplay=function(){var e=this.get(0),r=e.opt,t=jQuery(e.playerEl),a={},o=e.isBackground?jQuery(window):r.containment;a.width=o.width(),a.height=o.height();var n=24,i={};i.width=a.width+a.width*n/100,i.height=Math.ceil("16/9"==r.ratio?9*a.width/16:3*a.width/4),i.marginTop=-((i.height-a.height)/2),i.marginLeft=-(a.width*(n/2)/100),i.height=0?e.border:e.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.spinner={phase:0,timeSlot:150,$el:t('
'),intervalId:null},this.checkWidthIntervalId=null,this.galleryWidth=i.width(),this.$gallery=i};i.prototype.getSuffix=function(t,i){var e,s;for(e=t>i?t:i,s=0;s img");return 0===i.length&&(i=t.find("> a > img")),0===i.length?null:i},i.prototype.captionFromEntry=function(t){var i=t.find("> .caption");return 0===i.length?null:i},i.prototype.displayEntry=function(i,e,s,n,r,a){i.width(n),i.height(a),i.css("top",s),i.css("left",e);var o=this.imgFromEntry(i);if(null!==o){o.css("width",n),o.css("height",r),o.css("margin-left",-n/2),o.css("margin-top",-r/2);var h=o.attr("src"),g=this.newSrc(h,n,r);o.one("error",function(){o.attr("src",o.data("jg.originalSrc"))});var l=function(){h!==g&&o.attr("src",g)};"skipped"===i.data("jg.loaded")?this.onImageEvent(h,t.proxy(function(){this.showImg(i,l),i.data("jg.loaded",!0)},this)):this.showImg(i,l)}else this.showImg(i);this.displayEntryCaption(i)},i.prototype.displayEntryCaption=function(i){var e=this.imgFromEntry(i);if(null!==e&&this.settings.captions){var s=this.captionFromEntry(i);if(null===s){var n=e.attr("alt");this.isValidCaption(n)||(n=i.attr("title")),this.isValidCaption(n)&&(s=t('
'+n+"
"),i.append(s),i.data("jg.createdCaption",!0))}null!==s&&(this.settings.cssAnimation||s.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(i))}else this.removeCaptionEventsHandlers(i)},i.prototype.isValidCaption=function(t){return"undefined"!=typeof t&&t.length>0},i.prototype.onEntryMouseEnterForCaption=function(i){var e=this.captionFromEntry(t(i.currentTarget));this.settings.cssAnimation?e.addClass("caption-visible").removeClass("caption-hidden"):e.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)},i.prototype.onEntryMouseLeaveForCaption=function(i){var e=this.captionFromEntry(t(i.currentTarget));this.settings.cssAnimation?e.removeClass("caption-visible").removeClass("caption-hidden"):e.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)},i.prototype.addCaptionEventsHandlers=function(i){var e=i.data("jg.captionMouseEvents");"undefined"==typeof e&&(e={mouseenter:t.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:t.proxy(this.onEntryMouseLeaveForCaption,this)},i.on("mouseenter",void 0,void 0,e.mouseenter),i.on("mouseleave",void 0,void 0,e.mouseleave),i.data("jg.captionMouseEvents",e))},i.prototype.removeCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");"undefined"!=typeof i&&(t.off("mouseenter",void 0,i.mouseenter),t.off("mouseleave",void 0,i.mouseleave),t.removeData("jg.captionMouseEvents"))},i.prototype.prepareBuildingRow=function(t){var i,e,s,n,r,a=!0,o=0,h=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,g=h/this.buildingRow.aspectRatio,l=this.buildingRow.width/h>this.settings.justifyThreshold;if(t&&"hide"===this.settings.lastRow&&!l){for(i=0;ir)&&(o=r);return this.settings.fixedHeight&&o>this.settings.rowHeight&&(o=this.settings.rowHeight),this.buildingRow.height=o,a},i.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[],this.buildingRow.aspectRatio=0,this.buildingRow.width=0},i.prototype.flushRow=function(t){var i,e,s,n=this.settings,r=this.border;if(e=this.prepareBuildingRow(t),t&&"hide"===n.lastRow&&-1===this.buildingRow.height)return void this.clearBuildingRow();if(this.maxRowHeight.isPercentage?this.maxRowHeight.value*n.rowHeight0&&this.maxRowHeight.valuethis.settings.refreshSensitivity&&(this.galleryWidth=t,this.rewind(),this.startImgAnalyzer(!0))},this),this.settings.refreshTime)},i.prototype.isSpinnerActive=function(){return null!==this.spinner.intervalId},i.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight()},i.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId),this.spinner.intervalId=null,this.$gallery.height(this.$gallery.height()-this.getSpinnerHeight()),this.spinner.$el.detach()},i.prototype.startLoadingSpinnerAnimation=function(){var t=this.spinner,i=t.$el.find("span");clearInterval(t.intervalId),this.$gallery.append(t.$el),this.$gallery.height(this.offY+this.buildingRow.height+this.getSpinnerHeight()),t.intervalId=setInterval(function(){t.phase0;i--)e=Math.floor(Math.random()*(i+1)),s=t[i],t[i]=t[e],t[e]=s;return this.insertToGallery(t),t},i.prototype.sortArray=function(t){return t.sort(this.settings.sort),this.insertToGallery(t),t},i.prototype.resetFilters=function(i){for(var e=0;e=this["yield"].every))return void this.startImgAnalyzer(i);this.buildingRow.entriesBuff.push(s),this.buildingRow.aspectRatio+=r,this.buildingRow.width+=r*this.settings.rowHeight,this.lastAnalyzedIndex=e}else if("error"!==s.data("jg.loaded"))return}this.buildingRow.entriesBuff.length>0&&this.flushRow(!0),this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation(),this.stopImgAnalyzerStarter(),this.$gallery.trigger(i?"jg.resize":"jg.complete")},i.prototype.stopImgAnalyzerStarter=function(){this["yield"].flushed=0,null!==this.imgAnalyzerTimeout&&clearTimeout(this.imgAnalyzerTimeout)},i.prototype.startImgAnalyzer=function(t){var i=this;this.stopImgAnalyzerStarter(),this.imgAnalyzerTimeout=setTimeout(function(){i.analyzeImages(t)},.001)},i.prototype.onImageEvent=function(i,e,s){if(e||s){var n=new Image,r=t(n);e&&r.one("load",function(){r.off("load error"),e(n)}),s&&r.one("error",function(){r.off("load error"),s(n)}),n.src=i}},i.prototype.init=function(){var i=!1,e=!1,s=this;t.each(this.entries,function(n,r){var a=t(r),o=s.imgFromEntry(a);if(a.addClass("jg-entry"),a.data("jg.loaded")!==!0&&"skipped"!==a.data("jg.loaded"))if(null!==s.settings.rel&&a.attr("rel",s.settings.rel),null!==s.settings.target&&a.attr("target",s.settings.target),null!==o){var h=s.extractImgSrcFromImage(o);if(o.attr("src",h),s.settings.waitThumbnailsLoad===!1){var g=parseFloat(o.attr("width")),l=parseFloat(o.attr("height"));if(!isNaN(g)&&!isNaN(l))return a.data("jg.width",g),a.data("jg.height",l),a.data("jg.loaded","skipped"),e=!0,s.startImgAnalyzer(!1),!0}a.data("jg.loaded",!1),i=!0,s.isSpinnerActive()||s.startLoadingSpinnerAnimation(),s.onImageEvent(h,function(t){a.data("jg.width",t.width),a.data("jg.height",t.height),a.data("jg.loaded",!0),s.startImgAnalyzer(!1)},function(){a.data("jg.loaded","error"),s.startImgAnalyzer(!1)})}else a.data("jg.loaded",!0),a.data("jg.width",a.width()|parseFloat(a.css("width"))|1),a.data("jg.height",a.height()|parseFloat(a.css("height"))|1)}),i||e||this.startImgAnalyzer(!1),this.checkWidth()},i.prototype.checkOrConvertNumber=function(i,e){if("string"===t.type(i[e])&&(i[e]=parseFloat(i[e])),"number"!==t.type(i[e]))throw e+" must be a number";if(isNaN(i[e]))throw"invalid number for "+e},i.prototype.checkSizeRangesSuffixes=function(){if("object"!==t.type(this.settings.sizeRangeSuffixes))throw"sizeRangeSuffixes must be defined and must be an object";var i=[];for(var e in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(e)&&i.push(e);for(var s={0:""},n=0;n0&&i.value1)throw"justifyThreshold must be in the interval [0,1]";if("boolean"!==t.type(this.settings.cssAnimation))throw"cssAnimation must be a boolean";if("boolean"!==t.type(this.settings.captions))throw"captions must be a boolean";if(this.checkOrConvertNumber(this.settings.captionSettings,"animationDuration"),this.checkOrConvertNumber(this.settings.captionSettings,"visibleOpacity"),this.settings.captionSettings.visibleOpacity<0||this.settings.captionSettings.visibleOpacity>1)throw"captionSettings.visibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings.captionSettings,"nonVisibleOpacity"),this.settings.captionSettings.nonVisibleOpacity<0||this.settings.captionSettings.nonVisibleOpacity>1)throw"captionSettings.nonVisibleOpacity must be in the interval [0, 1]";if("boolean"!==t.type(this.settings.fixedHeight))throw"fixedHeight must be a boolean";if(this.checkOrConvertNumber(this.settings,"imagesAnimationDuration"),this.checkOrConvertNumber(this.settings,"refreshTime"),this.checkOrConvertNumber(this.settings,"refreshSensitivity"),"boolean"!==t.type(this.settings.randomize))throw"randomize must be a boolean";if("string"!==t.type(this.settings.selector))throw"selector must be a string";if(this.settings.sort!==!1&&!t.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(this.settings.filter!==!1&&!t.isFunction(this.settings.filter)&&"string"!==t.type(this.settings.filter))throw"filter must be false, a string or a filter function"},i.prototype.retrieveSuffixRanges=function(){var t=[];for(var i in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(i)&&t.push(parseInt(i,10));return t.sort(function(t,i){return t>i?1:i>t?-1:0}),t},i.prototype.updateSettings=function(i){this.settings=t.extend({},this.settings,i),this.checkSettings(),this.border=this.settings.border>=0?this.settings.border:this.settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges()},t.fn.justifiedGallery=function(e){return this.each(function(s,n){var r=t(n);r.addClass("justified-gallery");var a=r.data("jg.controller");if("undefined"==typeof a){if("undefined"!=typeof e&&null!==e&&"object"!==t.type(e)){if("destroy"===e)return;throw"The argument must be an object"}a=new i(r,t.extend({},t.fn.justifiedGallery.defaults,e)),r.data("jg.controller",a)}else if("norewind"===e);else{if("destroy"===e)return void a.destroy();a.updateSettings(e),a.rewind()}a.updateEntries("norewind"===e)&&a.init()})},t.fn.justifiedGallery.defaults={sizeRangeSuffixes:{},thumbnailPath:void 0,rowHeight:120,maxRowHeight:-1,margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.75,fixedHeight:!1,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!1,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\/]+$/,refreshTime:200,refreshSensitivity:0,randomize:!1,sort:!1,filter:!1,selector:"> a, > div:not(.spinner)"}}(jQuery); !function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g--;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.settings.center&&(this.$stage.children(".center").removeClass("center"),this.$stage.children().eq(this.current()).addClass("center"))}}],e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var b,c,e;b=this.$element.find("img"),c=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,e=this.$element.children(c).width(),b.length&&e<=0&&this.preloadAutoWidthImages(b)}this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+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")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){a<=b&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),"function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};b0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.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")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.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")))))},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),this.settings.responsive!==!1&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.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",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.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"))},e.prototype.closest=function(b,c){var d=-1,e=30,f=this.width(),g=this.coordinates();return this.settings.freeDrag||a.each(g,a.proxy(function(a,h){return"left"===c&&b>h-e&&bh-f-e&&b",g[a+1]||h-f)&&(d="left"===c?a+1:a),d===-1},this)),this.settings.loop||(this.op(b,">",g[this.minimum()])?d=b=this.minimum():this.op(b,"<",g[this.maximum()])&&(d=b=this.maximum())),d},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){a=this.normalize(a),a!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||c<1?a=d:(a<0||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else if(e.autoWidth||e.merge){for(b=this._items.length,c=this._items[--b].width(),d=this.$element.width();b--&&(c+=this._items[b].width()+this.settings.margin,!(c>d)););f=b+1}else f=e.center?this._items.length-1:this._items.length-e.items;return a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2===0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c,e=1,f=b-1;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return 0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(e<0),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=f*-1*g),a=c+e,d=((a-h)%g+g)%g+h,d!==a&&d-e<=i&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.$element.is(":visible")&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){if(a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},e.prototype.viewport=function(){var d;return this.options.responsiveBaseElement!==b?d=a(this.options.responsiveBaseElement).width():b.innerWidth?d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth?d=c.documentElement.clientWidth:console.warn("Can not detect viewport width."),d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.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")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){a=this.normalize(a,!0),a!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),this.settings.responsive!==!1&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].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")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:a":return d?ac;case">=":return d?a<=c:a>=c;case"<=":return d?a>=c:a<=c}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&a.namespace.indexOf("owl")!==-1?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.$element.is(":visible"),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.$element.is(":visible")!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type))for(var c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&e*-1||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);f++-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":'url("'+g+'")',opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"==a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.$stage.children().toArray().slice(b,c),e=[],f=0;a.each(d,function(b,c){e.push(a(c).height())}),f=Math.max.apply(null,e),this._core.$stage.parent().height(f).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=function(){return a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.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+)?/),d[3].indexOf("youtu")>-1)c="youtube";else if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?'style="width:'+c.width+"px;height:"+c.height+'px;"':"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(a){e='
',d=k.lazyLoad?'
':'
',b.after(d),b.after(e)};if(b.wrap('
"),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length)return l(h.attr(i)),h.remove(),!1;"youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}})},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),"youtube"===f.type?c='':"vimeo"===f.type?c='':"vzaar"===f.type&&(c=''),a('
'+c+"
").insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)}, a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._timeout=null,this._paused=!1,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._core.settings.autoplay&&this._setAutoPlayInterval()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype.play=function(a,b){this._paused=!1,this._core.is("rotating")||(this._core.enter("rotating"),this._setAutoPlayInterval())},e.prototype._getNextTimeout=function(d,e){return this._timeout&&b.clearTimeout(this._timeout),b.setTimeout(a.proxy(function(){this._paused||this._core.is("busy")||this._core.is("interacting")||c.hidden||this._core.next(e||this._core.settings.autoplaySpeed)},this),d||this._core.settings.autoplayTimeout)},e.prototype._setAutoPlayInterval=function(){this._timeout=this._getNextTimeout()},e.prototype.stop=function(){this._core.is("rotating")&&(b.clearTimeout(this._timeout),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&(this._paused=!0)},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,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":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('
'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"
")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.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":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("
").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a("
").addClass(c.dotClass).append(a("")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("
").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","div",a.proxy(function(b){var d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b in this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var a,b,c,d;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},e.prototype.update=function(){var a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;a=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new Array(b+1).join(this._templates[0])):b<0&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,a.proxy(function(a,c){return a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var e;!d&&this._pages.length?(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c)):a.proxy(this._overrides.to,this._core)(b,c)},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(c){c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!c)return;this._hashes[c]=b.content}},this),"changed.owl.carousel":a.proxy(function(c){if(c.namespace&&"position"===c.property.name){var d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(a){var c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return a.each((b+" "+h.join(f+" ")+f).split(" "),function(a,b){if(g[b]!==d)return e=!c||b,!1}),e}function f(a){return e(a,!0)}var g=a("").get(0).style,h="Webkit Moz O ms".split(" "),i={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},j={csstransforms:function(){return!!e("transform")},csstransforms3d:function(){return!!e("perspective")},csstransitions:function(){return!!e("transition")},cssanimations:function(){return!!e("animation")}};j.csstransitions()&&(a.support.transition=new String(f("transition")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new String(f("animation")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new String(f("transform")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document); (function($){ "use strict"; var PENCI=PENCI||{}; PENCI.general=function (){ $('#top-search a.search-click').on('click', function (){ $('.show-search').fadeToggle(); $('.show-search input.search-input').focus(); }); $('.go-to-top, .penci-go-to-top-floating').on('click', function (){ $('html, body').animate({ scrollTop: 0 }, 700); return false; }); if($().doubleTouchToGo){ $('#navigation .menu li.menu-item-has-children, #navigation .menu li.penci-mega-menu').doubleTouchToGo(); } $('.penci-lazy').Lazy({ effect: 'fadeIn', effectTime: 300, scrollDirection: 'both' }); var $goto_button=$('.penci-go-to-top-floating'); if($goto_button.length){ $(document).scroll(function(){ var y=$(this).scrollTop(); if(y > 300){ $goto_button.addClass('show-up'); }else{ $goto_button.removeClass('show-up'); }}); }} PENCI.main_sticky=function (){ if($().sticky&&! $("nav#navigation").hasClass('penci-disable-sticky-nav')){ var spaceTop=0; if($('body').hasClass('admin-bar')){ spaceTop=32; } $("nav#navigation").each(function (){ $(this).sticky({ topSpacing: spaceTop }); }); }} PENCI.fixheadline=function (){ var $headline_title=$('.penci-headline .headline-title'); if($headline_title.length){ var headline_w=$headline_title.outerWidth() + 70; $('.penci-headline-posts').css('margin-left', headline_w + 'px'); $('.rtl .penci-headline-posts').css('margin-left', 0 + 'px'); $('.rtl .penci-headline-posts').css('margin-right', headline_w + 'px'); }} PENCI.featured_slider=function (){ if($().owlCarousel){ $('.featured-area .penci-owl-featured-area').each(function (){ var $this=$(this), $style=$this.data('style'), $auto=false, $autotime=$this.data('autotime'), $speed=$this.data('speed'), $loop=$this.data('loop'), $item=1, $nav=true, $dots=false, $rtl=false, $items_desktop=1, $items_tablet=1, $items_tabsmall=1; if($style==='style-2'){ $item=2; }else if($style==='style-28'){ $loop=true; }else if($style==='style-31'||$style==='style-32'){ $nav=false; $dots=true; } if($('html').attr('dir')==='rtl'){ $rtl=true; } if($this.attr('data-auto')==='true'){ $auto=true; } if($this.attr('data-item')){ $item=parseInt($this.data('item')); } if($this.attr('data-desktop')){ $items_desktop=parseInt($this.data('desktop')); } if($this.attr('data-tablet')){ $items_tablet=parseInt($this.data('tablet')); } if($this.attr('data-tabsmall')){ $items_tabsmall=parseInt($this.data('tabsmall')); } var owl_args={ rtl:$rtl, loop:$loop, margin:0, items:$item, navSpeed:$speed, dotsSpeed:$speed, nav:$nav, slideBy:$item, mouseDrag:false, lazyLoad:true, dots:$dots, navText:['', ''], autoplay:$auto, autoplayTimeout:$autotime, autoplayHoverPause: true, autoplaySpeed:$speed, responsive:{ 0:{ items: 1 }, 480:{ items:$items_tabsmall, slideBy: $items_tabsmall }, 768:{ items:$items_tablet, slideBy: $items_tablet }, 1170: { items:$items_desktop, slideBy: $items_desktop }} } if($style==='style-2'){ owl_args['center']=true; owl_args['margin']=10; owl_args['autoWidth']=true; }else if($style==='style-28'){ owl_args['margin']=4; owl_args['items']=6; owl_args['autoWidth']=true; } $this.owlCarousel(owl_args); if($style==='style-2'||$style==='style-5'||$style==='style-28'||$style==='style-29'){ $this.on('changed.owl.carousel', function(event){ $this.find('.penci-lazy').Lazy({ effect: 'fadeIn', effectTime: 300, scrollDirection: 'both' }); }); }}); }} PENCI.owl_slider=function (){ if($().owlCarousel){ $('.penci-owl-carousel-slider').each(function (){ var $this=$(this), $auto=true, $dots=false, $nav=true, $loop=true, $rtl=false, $dataauto=$this.data('auto'), $items_desktop=1, $items_tablet=1, $items_tabsmall=1, $speed=600, $item=1, $autotime=5000, $datalazy=false; if($('html').attr('dir')==='rtl'){ $rtl=true; } if($this.attr('data-dots')){ $dots=true; } if($this.attr('data-loop')){ $loop=false; } if($this.attr('data-nav')){ $nav=false; } if($this.attr('data-desktop')){ $items_desktop=parseInt($this.data('desktop')); } if($this.attr('data-tablet')){ $items_tablet=parseInt($this.data('tablet')); } if($this.attr('data-tabsmall')){ $items_tabsmall=parseInt($this.data('tabsmall')); } if($this.attr('data-speed')){ $speed=parseInt($this.data('speed')); } if($this.attr('data-autotime')){ $autotime=parseInt($this.data('autotime')); } if($this.attr('data-item')){ $item=parseInt($this.data('item')); } if($this.attr('data-lazy')){ $datalazy=true; } var owl_args={ loop:$loop, rtl:$rtl, margin:0, items:$item, slideBy:$item, lazyLoad:$datalazy, navSpeed:$speed, dotsSpeed:$speed, nav:$nav, dots:$dots, navText:['', ''], autoplay:$dataauto, autoplayTimeout:$autotime, autoHeight:true, autoplayHoverPause: true, autoplaySpeed:$speed, responsive:{ 0:{ items:1, slideBy: 1 }, 480:{ items:$items_tabsmall, slideBy: $items_tabsmall }, 768:{ items:$items_tablet, slideBy: $items_tablet }, 1170: { items:$items_desktop, slideBy: $items_desktop }} }; if($this.hasClass('penci-headline-posts')){ owl_args['animateOut']='slideOutUp'; owl_args['animateIn']='slideInUp'; } $this.owlCarousel(owl_args); $this.on('changed.owl.carousel', function(event){ $this.find('.penci-lazy').Lazy({ effect: 'fadeIn', effectTime: 300, scrollDirection: 'both' }); }); }); }} PENCI.fitvids=function(){ $(".container").fitVids(); } PENCI.sticky_sidebar=function(){ if($().theiaStickySidebar){ var top_margin=90; if($('body').hasClass('admin-bar')){ top_margin=122; } $('#main.penci-main-sticky-sidebar, #sidebar.penci-sticky-sidebar').theiaStickySidebar({ additionalMarginTop: top_margin }); }} PENCI.mega_menu=function (){ $('#navigation .penci-mega-child-categories a').mouseenter(function (){ if(!$(this).hasClass('cat-active')){ var $this=$(this), $row_active=$this.data('id'), $parentA=$this.parent().children('a'), $parent=$this.closest('.penci-megamenu'), $rows=$this.closest('.penci-megamenu').find('.penci-mega-latest-posts').children('.penci-mega-row'); $parentA.removeClass('cat-active'); $this.addClass('cat-active'); $rows.hide(); $parent.find('.' + $row_active).fadeIn('300').css('display', 'inline-block'); }}); } PENCI.mobile_menu=function (){ $('#sidebar-nav .menu li.menu-item-has-children > a').append(''); $('#sidebar-nav .penci-mega-child-categories').closest('li.penci-mega-menu').children('a').append(''); $('#navigation .button-menu-mobile').on('click', function (){ $('body').addClass('open-sidebar-nav'); }); $('#sidebar-nav .menu li a .indicator').on('click', function(e){ var $this=$(this); e.preventDefault(); $this.children().toggleClass('fa-angle-up'); $this.parent().next().slideToggle('fast'); }); $('#close-sidebar-nav').on('click', function (){ $('body').removeClass('open-sidebar-nav'); }); } PENCI.lightbox=function (){ if($().magnificPopup){ $('a[data-rel^="penci-gallery-image-content"], .penci-enable-lightbox .gallery-item a').magnificPopup({ type:'image', closeOnContentClick: true, closeBtnInside:false, fixedContentPos:true, image:{ verticalFit: true }, gallery:{ enabled: true }, zoom:{ enabled:true, duration: 300 }}); }} PENCI.masonry=function(){ $(window).load(function(){ var $masonry_container=$('.penci-masonry'); if($masonry_container.length){ $masonry_container.each(function (){ var $this=$(this); $this.isotope({ itemSelector:'.item-masonry', transitionDuration: '.55s', layoutMode:'masonry' }); }); }}); } PENCI.video_background=function(){ var $penci_videobg=$('#penci-featured-video-bg'); if($().mb_YTPlayer&&$penci_videobg.length){ $(window).load(function(){ $("#penci-featured-video-bg").mb_YTPlayer(); setTimeout(function(){ $('.featured-area').addClass('loaded-wait').append('
'); $('.overlay-video-click').on('click', function (){ var $this=$(this); if(!$this.hasClass('pause-video')){ $this.addClass('pause-video'); jQuery('#penci-featured-video-bg').pauseYTP(); }else{ $this.removeClass('pause-video'); jQuery('#penci-featured-video-bg').playYTP(); }}); }, 4000); }); }} PENCI.portfolio=function (){ var $penci_portfolio=$('.penci-portfolio'); if($().isotope&&$penci_portfolio.length){ $('.penci-portfolio').each(function (){ var $this=$(this); $(window).load(function (){ $this.isotope({ itemSelector:'.portfolio-item', animationEngine:'best-available', animationOptions: { duration: 250, queue:false }}); $this.addClass('loaded'); $('.portfolio-item .inner-item-portfolio').each(function (){ var $this=$(this); $this.one('inview', function(event, isInView, visiblePartX, visiblePartY){ $this.addClass('animated'); }); }); }); $this.parent().find('.penci-portfolio-filter').find('li').on('click', function (){ $this.parent().find('.penci-portfolio-filter').find('li').removeClass('active'); $(this).addClass('active'); var selector=$(this).find("a").attr('data-filter'); $this.isotope({ filter: selector }); return false; }); }); }} PENCI.gallery=function (){ var $justified_gallery=$('.penci-post-gallery-container.justified'); var $masonry_gallery=$('.penci-post-gallery-container.masonry'); if($().justifiedGallery&&$justified_gallery.length){ $('.penci-post-gallery-container.justified').each(function (){ var $this=$(this); $this.justifiedGallery({ rowHeight: $this.data('height'), lastRow:'nojustify', margins:$this.data('margin'), randomize: false }); }); } if($().isotope&&$masonry_gallery.length){ $('.penci-post-gallery-container.masonry .item-gallery-masonry').each(function (){ var $this=$(this); if($this.attr('title')){ var $title=$this.attr('title'); $this.children().append('
' + $title + '
'); }}); } $(window).load(function(){ if($masonry_gallery.length){ $masonry_gallery.each(function (){ var $this=$(this); $this.isotope({ itemSelector:'.item-gallery-masonry', transitionDuration: '.55s', layoutMode:'masonry' }); $this.addClass('loaded'); $('.penci-post-gallery-container.masonry .item-gallery-masonry').each(function (){ var $this=$(this); $this.one('inview', function(event, isInView, visiblePartX, visiblePartY){ $this.addClass('animated'); }); }); }); }}); } $(document).ready(function(){ PENCI.general(); PENCI.main_sticky(); PENCI.fixheadline(); PENCI.featured_slider(); PENCI.owl_slider(); PENCI.fitvids(); PENCI.sticky_sidebar(); PENCI.mega_menu(); PENCI.mobile_menu(); PENCI.lightbox(); PENCI.masonry(); PENCI.video_background(); PENCI.portfolio(); PENCI.gallery(); $(window).resize(function(){ PENCI.sticky_sidebar(); }); }); })(jQuery); jQuery(document).ready(function (){ jQuery('body').on('click', '.penci-post-like', function(event){ event.preventDefault(); var $this=jQuery(this), post_id=$this.data("post_id"), like_text=$this.data("like"), unlike_text=$this.data("unlike"), $selector=$this.children('.dt-share'); if($this.hasClass('single-like-button')){ $selector=$this.parent().find('.count-number-like'); } var $like=parseInt($selector.text()); if($this.hasClass('liked')){ $this.removeClass('liked'); $this.prop('title', 'Like'); $selector.html(( $like - 1)); }else{ $this.addClass('liked'); $this.prop('title', 'Unlike'); $selector.html(( $like + 1)); } jQuery.ajax({ type: "post", url:ajax_var.url, data: "action=penci-post-like&nonce=" + ajax_var.nonce + "&penci_post_like=&post_id=" + post_id }); }); }); !function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document); !function(e,n,t){var o,c=e.getElementsByTagName(n)[0];e.getElementById(t)||(o=e.createElement(n),o.id=t,o.src="//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v3.2",c.parentNode.insertBefore(o,c))}(document,"script","facebook-jssdk");