You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

2 lines
78 KiB

  1. (function(a,v,y,k){function d(n,e,t){var i=this;if(a.data(n,"cubeportfolio"))throw new Error("cubeportfolio is already initialized. Destroy it before initialize again!");i.obj=n,i.$obj=a(n),a.data(i.obj,"cubeportfolio",i),e.sortToPreventGaps!==k&&(e.sortByDimension=e.sortToPreventGaps,delete e.sortToPreventGaps),i.options=a.extend({},a.fn.cubeportfolio.options,e,i.$obj.data("cbp-options")),i.isAnimating=!0,i.defaultFilter=i.options.defaultFilter,i.registeredEvents=[],i.queue=[],i.addedWrapp=!1,a.isFunction(t)&&i.registerEvent("initFinish",t,!0);var s=i.$obj.children();i.$obj.addClass("cbp"),(s.length===0||s.first().hasClass("cbp-item"))&&(i.wrapInner(i.obj,"cbp-wrapper"),i.addedWrapp=!0),i.$ul=i.$obj.children().addClass("cbp-wrapper"),i.wrapInner(i.obj,"cbp-wrapper-outer"),i.wrapper=i.$obj.children(".cbp-wrapper-outer"),i.blocks=i.$ul.children(".cbp-item"),i.blocksOn=i.blocks,i.wrapInner(i.blocks,"cbp-item-wrapper"),i.plugins={},a.each(d.plugins,function(c,o){var r=o(i);r&&(i.plugins[c]=r)}),i.triggerEvent("afterPlugins"),i.removeAttrAfterStoreData=a.Deferred(),i.loadImages(i.$obj,i.display)}a.extend(d.prototype,{storeData:function(n,e){var t=this;e=e||0,n.each(function(i,s){var c=a(s),o=c.width(),r=c.height();c.data("cbp",{index:e+i,indexInitial:e+i,wrapper:c.children(".cbp-item-wrapper"),widthInitial:o,heightInitial:r,width:o,height:r,widthAndGap:o+t.options.gapVertical,heightAndGap:r+t.options.gapHorizontal,left:null,leftNew:null,top:null,topNew:null,pack:!1})}),this.removeAttrAfterStoreData.resolve()},wrapInner:function(n,e){var t,i,s;if(e=e||"",!(n.length&&n.length<1))for(n.length===k&&(n=[n]),i=n.length-1;i>=0;i--){for(t=n[i],(s=y.createElement("div")).setAttribute("class",e);t.childNodes.length;)s.appendChild(t.childNodes[0]);t.appendChild(s)}},removeAttrImage:function(n){this.removeAttrAfterStoreData.then(function(){n.removeAttribute("width"),n.removeAttribute("height"),n.removeAttribute("style")})},loadImages:function(n,e){var t=this;requestAnimationFrame(function(){var i=n.find("img").map(function(c,o){if(o.hasAttribute("width")&&o.hasAttribute("height")){if(o.style.width=o.getAttribute("width")+"px",o.style.height=o.getAttribute("height")+"px",o.hasAttribute("data-cbp-src"))return null;if(t.checkSrc(o)===null)t.removeAttrImage(o);else{var r=a("<img>");r.on("load.cbp error.cbp",function(){a(this).off("load.cbp error.cbp"),t.removeAttrImage(o)}),o.srcset?(r.attr("sizes",o.sizes||"100vw"),r.attr("srcset",o.srcset)):r.attr("src",o.src)}return null}return t.checkSrc(o)}),s=i.length;s!==0?a.each(i,function(c,o){var r=a("<img>");r.on("load.cbp error.cbp",function(){a(this).off("load.cbp error.cbp"),--s===0&&e.call(t)}),o.srcset?(r.attr("sizes",o.sizes),r.attr("srcset",o.srcset)):r.attr("src",o.src)}):e.call(t)})},checkSrc:function(n){var e=n.srcset,t=n.src;if(t==="")return null;var i=a("<img>");e?(i.attr("sizes",n.sizes||"100vw"),i.attr("srcset",e)):i.attr("src",t);var s=i[0];return s.complete&&s.naturalWidth!==k&&s.naturalWidth!==0?null:s},display:function(){var n=this;n.width=n.$obj.outerWidth(),n.triggerEvent("initStartRead"),n.triggerEvent("initStartWrite"),n.width>0&&(n.storeData(n.blocks),n.layoutAndAdjustment()),n.triggerEvent("initEndRead"),n.triggerEvent("initEndWrite"),n.$obj.addClass("cbp-ready"),n.runQueue("delayFrame",n.delayFrame)},delayFrame:function(){var n=this;requestAnimationFrame(function(){n.resizeEvent(),n.triggerEvent("initFinish"),n.isAnimating=!1,n.$obj.trigger("initComplete.cbp")})},resizeEvent:function(){var n=this;d.private.resize.initEvent({instance:n,fn:function(){n.triggerEvent("beforeResizeGrid");var e=n.$obj.outerWidth();e&&n.width!==e&&(n.width=e,n.options.gridAdjustment==="alignCenter"&&(n.wrapper[0].style.maxWidth=""),n.layoutAndAdjustment(),n.triggerEvent("resizeGrid")),n.triggerEvent("resizeWindow")}})},gridAdjust:function(){var n=this;n.options.gridAdjustment==="responsive"?n.responsiveLayout():(n.blocks.removeAttr("style"),n.blocks.each(function(e,t){var i=a(t).data("cbp"),s=t.getBoundingClientRect(),c=n.columnWidthTruncate(s.right-s.left),o=Math.round(s.bottom-s.top);i.height=o,i.heightAndGap=o+n.options.gapHorizontal,i.width=c,i.widthAndGap=c+n.options.gapVertical}),n.widthAvailable=n.width+n.options.gapVertical),n.triggerEvent("gridAdjust")},layoutAndAdjustment:function(n){n&&(this.width=this.$obj.outerWidth()),this.gridAdjust(),this.layout()},layout:function(){var n=this;n.computeBlocks(n.filterConcat(n.defaultFilter)),n.options.layoutMode==="slider"?(n.sliderLayoutReset(),n.sliderLayout()):(n.mosaicLayoutReset(),n.mosaicLayout()),n.blocksOff.addClass("cbp-item-off"),n.blocksOn.removeClass("cbp-item-off").each(function(e,t){var i=a(t).data("cbp");i.left=i.leftNew,i.top=i.topNew,t.style.left=i.left+"px",t.style.top=i.top+"px"}),n.resizeMainContainer()},computeFilter:function(n){this.computeBlocks(n),this.mosaicLayoutReset(),this.mosaicLayout(),this.filterLayout()},filterLayout:function(){this.blocksOff.addClass("cbp-item-off"),this.blocksOn.removeClass("cbp-item-off").each(function(n,e){var t=a(e).data("cbp");t.left=t.leftNew,t.top=t.topNew,e.style.left=t.left+"px",e.style.top=t.top+"px"}),this.resizeMainContainer(),this.filterFinish()},filterFinish:function(){this.isAnimating=!1,this.$obj.trigger("filterComplete.cbp"),this.triggerEvent("filterFinish")},computeBlocks:function(n){var e=this;e.blocksOnInitial=e.blocksOn,e.blocksOn=e.blocks.filter(n),e.blocksOff=e.blocks.not(n),e.triggerEvent("computeBlocksFinish",n)},responsiveLayout:function(){var n=this;n.cols=n[a.isArray(n.options.mediaQueries)?"getColumnsBreakpoints":"getColumnsAuto"](),n.columnWidth=n.columnWidthTruncate((n.width+n.options.gapVertical)/n.cols),n.widthAvailable=n.columnWidth*n.cols,n.options.layoutMode==="mosaic"&&n.getMosaicWidthReference(),n.blocks.each(function(t,i){var s,c=a(i).data("cbp"),o=1;n.options.layoutMode==="mosaic"&&(o=n.getColsMosaic(c.widthInitial)),s=n.columnWidth*o-n.options.gapVertical,i.style.width=s+"px",c.width=s,c.widthAndGap=s+n.options.gapVertical,i.style.height=""});var e=[];n.blocks.each(function(t,i){a.each(a(i).find("img").filter("[width][height]"),function(s,c){var o=0;a(c).parentsUntil(".cbp-item").each(function(f,g){var u=a(g).width();if(u>0)return o=u,!1});var r=parseInt(c.getAttribute("width"),10),l=parseInt(c.getAttribute("height"),10),p=parseFloat((r/l).toFixed(10));e.push({el:c,width:o,height:Math.round(o/p)})})}),a.each(e,function(t,i){i.el.width=i.width,i.el.height=i.height,i.el.style.width=i.width+"px",i.el.style.height=i.height+"px"}),n.blocks.each(function(t,i){var s=a(i).data("cbp"),c=i.getBoundingClientRect(),o=Math.round(c.bottom-c.top);s.height=o,s.heightAndGap=o+n.options.gapHorizontal})},getMosaicWidthReference:function(){var n=[];this.blocks.each(function(e,t){var i=a(t).data("cbp");n.push(i.widthInitial)}),n.sort(function(e,t){return e-t}),n[0]?this.mosaicWidthReference=n[0]:this.mosaicWidthReference=this.columnWidth},getColsMosaic:function(n){if(n===this.width)return this.cols;var e=n/this.mosaicWidthReference;return e=e%1>=.79?Math.ceil(e):Math.floor(e),Math.min(Math.max(e,1),this.cols)},getColumnsAuto:function(){if(this.blocks.length===0)return 1;var n=this.blocks.first().data("cbp").widthInitial+this.options.gapVertical;return Math.max(Math.round(this.width/n),1)},getColumnsBreakpoints:function(){var n,e=this,t=e.width;return a.each(e.options.mediaQueries,function(i,s){if(t>=s.width)return n=s,!1}),n||(n=e.options.mediaQueries[e.options.mediaQueries.length-1]),e.triggerEvent("onMediaQueries",n.options),n.cols},columnWidthTruncate:function(n){return Math.floor(n)},resizeMainContainer:function(){var n,e=this,t=Math.max(e.freeSpaces.slice(-1)[0].topStart-e.options.gapHorizontal,0);e.options.gridAdjustment==="alignCenter"&&(n=0,e.blocksOn.each(function(i,s){var c=a(s).data("cbp"),o=c.left+c.width;o>n&&(n=o)}),e.wrapper[0].style.maxWidth=n+"px"),t!==e.height&&(e.obj.style.height=t+"px",e.height!==k&&(d.private.modernBrowser?e.$obj.one(d.private.transitionend,function(){e.$obj.trigger("pluginResize.cbp")}):e.$obj.trigger("pluginResize.cbp")),e.height=t),e.triggerEvent("resizeMainContainer")},filterConcat:function(n){return n.replace(/\|/gi,"")},pushQueue:function(n,e){this.queue[n]=this.queue[n]||[],this.queue[n].push(e)},runQueue:function(n,e){var t=this.queue[n]||[];a.when.apply(a,t).then(a.proxy(e,this))},clearQueue:function(n){this.queue[n]=[]},registerEvent:function(n,e,t){this.registeredEvents[n]||(this.registeredEvents[n]=[]),this.registeredEvents[n].push({func:e,oneTime:t||!1})},triggerEvent:function(n,e){var t,i,s=this;if(s.registeredEvents[n])for(t=0,i=s.registeredEvents[n].length;t<i;t++)s.registeredEvents[n][t].func.call(s,e),s.registeredEvents[n][t].oneTime&&(s.registeredEvents[n].splice(t,1),t--,i--)},addItems:function(n,e,t){var i=this;i.wrapInner(n,"cbp-item-wrapper"),i.$ul[t](n.addClass("cbp-item-loading").css({top:"100%",left:0})),d.private.modernBrowser?n.last().one(d.private.animationend,function(){i.addItemsFinish(n,e)}):i.addItemsFinish(n,e),i.loadImages(n,function(){if(i.$obj.addClass("cbp-updateItems"),t==="append")i.storeData(n,i.blocks.length),a.merge(i.blocks,n);else{i.storeData(n);var s=n.length;i.blocks.each(function(c,o){a(o).data("cbp").index=s+c}),i.blocks=a.merge(n,i.blocks)}i.triggerEvent("addItemsToDOM",n),i.triggerEvent("triggerSort"),i.layoutAndAdjustment(!0),i.elems&&d.public.showCounter.call(i.obj,i.elems)})},addItemsFinish:function(n,e){this.isAnimating=!1,this.$obj.removeClass("cbp-updateItems"),n.removeClass("cbp-item-loading"),a.isFunction(e)&&e.call(this,n),this.$obj.trigger("onAfterLoadMore.cbp",[n])},removeItems:function(n,e){var t=this;t.$obj.addClass("cbp-updateItems"),d.private.modernBrowser?n.last().one(d.private.animationend,function(){t.removeItemsFinish(n,e)}):t.removeItemsFinish(n,e),n.each(function(i,s){t.blocks.each(function(c,o){if(s===o){var r=a(o);t.blocks.splice(c,1),d.private.modernBrowser?(r.one(d.private.animationend,function(){r.remove()}),r.addClass("cbp-removeItem")):r.remove()}})}),t.blocks.each(function(i,s){a(s).data("cbp").index=i}),t.triggerEvent("triggerSort"),t.layoutAndAdjustment(!0),t.elems&&d.public.showCounter.call(t.obj,t.elems)},removeItemsFinish:function(n,e){this.isAnimating=!1,this.$obj.removeClass("cbp-updateItems"),a.isFunction(e)&&e.call(this,n)}}),a.fn.cubeportfolio=function(n,e,t){return this.each(function(){if(typeof n=="object"||!n)return d.public.init.call(this,n,e);if(d.public[n])return d.public[n].call(this,e,t);throw new Error("Method "+n+" does not exist on jquery.cubeportfolio.js")})},d.plugins={},a.fn.cubeportfolio.constructor=d})(jQuery,window,document),function(a,v,y,k){var d=a.fn.cubeportfolio.constructor;a.extend(d.prototype,{mosaicLayoutReset:function(){var n=this;n.blocksAreSorted=!1,n.blocksOn.each(function(e,t){a(t).data("cbp").pack=!1,n.options.sortByDimension&&(t.style.height="")}),n.freeSpaces=[{leftStart:0,leftEnd:n.widthAvailable,topStart:0,topEnd:Math.pow(2,18)}]},mosaicLayout:function(){for(var n=this,e=0,t=n.blocksOn.length;e<t;e++){var i=n.getSpaceIndexAndBlock();if(i===null)return n.mosaicLayoutReset(),n.blocksAreSorted=!0,n.sortBlocks(n.blocksOn,"widthAndGap","heightAndGap",!0),void n.mosaicLayout();n.generateF1F2(i.spaceIndex,i.dataBlock),n.generateG1G2G3G4(i.dataBlock),n.cleanFreeSpaces(),n.addHeightToBlocks()}n.blocksAreSorted&&n.sortBlocks(n.blocksOn,"topNew","leftNew")},getSpaceIndexAndBlock:function(){var n=this,e=null;return a.each(n.freeSpaces,function(t,i){var s=i.leftEnd-i.leftStart,c=i.topEnd-i.topStart;return n.blocksOn.each(function(o,r){var l=a(r).data("cbp");if(l.pack!==!0)return l.widthAndGap<=s&&l.heightAndGap<=c?(l.pack=!0,e={spaceIndex:t,dataBlock:l},l.leftNew=i.leftStart,l.topNew=i.topStart,!1):void 0}),!n.blocksAreSorted&&n.options.sortByDimension&&t>0?(e=null,!1):e===null&&void 0}),e},generateF1F2:function(n,e){var t=this.freeSpaces[n],i={leftStart:t.leftStart+e.widthAndGap,leftEnd:t.leftEnd,topStart:t.topStart,topEnd:t.topEnd},s={leftStart:t.leftStart,leftEnd:t.leftEnd,topStart:t.topStart+e.heightAndGap,topEnd:t.topEnd};this.freeSpaces.splice(n,1),i.leftEnd>i.leftStart&&i.topEnd>i.topStart&&(this.freeSpaces.splice(n,0,i),n++),s.leftEnd>s.leftStart&&s.topEnd>s.topStart&&this.freeSpaces.splice(n,0,s)},generateG1G2G3G4:function(n){var e=this,t=[];a.each(e.freeSpaces,function(i,s){var c=e.intersectSpaces(s,n);c!==null?(e.generateG1(s,c,t),e.generateG2(s,c,t),e.generateG3(s,c,t),e.generateG4(s,c,t)):t.push(s)}),e.freeSpaces=t},intersectSpaces:function(n,e){var t={leftStart:e.leftNew,leftEnd:e.leftNew+e.widthAndGap,topStart:e.topNew,topEnd:e.topNew+e.heightAndGap};if(n.leftStart===t.leftStart&&n.leftEnd===t.leftEnd&&n.topStart===t.topStart&&n.topEnd===t.topEnd)return null;var i=Math.max(n.leftStart,t.leftStart),s=Math.min(n.leftEnd,t.leftEnd),c=Math.max(n.topStart,t.topStart),o=Math.min(n.topEnd,t.topEnd);return s<=i||o<=c?null:{leftStart:i,leftEnd:s,topStart:c,topEnd:o}},generateG1:function(n,e,t){n.topStart!==e.topStart&&t.push({leftStart:n.leftStart,leftEnd:n.leftEnd,topStart:n.topStart,topEnd:e.topStart})},generateG2:function(n,e,t){n.leftEnd!==e.leftEnd&&t.push({leftStart:e.leftEnd,leftEnd:n.leftEnd,topStart:n.topStart,topEnd:n.topEnd})},generateG3:function(n,e,t){n.topEnd!==e.topEnd&&t.push({leftStart:n.leftStart,leftEnd:n.leftEnd,topStart:e.topEnd,topEnd:n.topEnd})},generateG4:function(n,e,t){n.leftStart!==e.leftStart&&t.push({leftStart:n.leftStart,leftEnd:e.leftStart,topStart:n.topStart,topEnd:n.topEnd})},cleanFreeSpaces:function(){this.freeSpaces.sort(function(n,e){return n.topStart>e.topStart?1:n.topStart<e.topStart?-1:n.leftStart>e.leftStart?1:n.leftStart<e.leftStart?-1:0}),this.correctSubPixelValues(),this.removeNonMaximalFreeSpaces()},correctSubPixelValues:function(){var n,e,t,i;for(n=0,e=this.freeSpaces.length-1;n<e;n++)t=this.freeSpaces[n],(i=this.freeSpaces[n+1]).topStart-t.topStart<=1&&(i.topStart=t.topStart)},removeNonMaximalFreeSpaces:function(){var n=this;n.uniqueFreeSpaces(),n.freeSpaces=a.map(n.freeSpaces,function(e,t){return a.each(n.freeSpaces,function(i,s){if(t!==i)return s.leftStart<=e.leftStart&&s.leftEnd>=e.leftEnd&&s.topStart<=e.topStart&&s.topEnd>=e.topEnd?(e=null,!1):void 0}),e})},uniqueFreeSpaces:function(){var n=[];a.each(this.freeSpaces,function(e,t){a.each(n,function(i,s){if(s.leftStart===t.leftStart&&s.leftEnd===t.leftEnd&&s.topStart===t.topStart&&s.topEnd===t.topEnd)return t=null,!1}),t!==null&&n.push(t)}),this.freeSpaces=n},addHeightToBlocks:function(){var n=this;a.each(n.freeSpaces,function(e,t){n.blocksOn.each(function(i,s){var c=a(s).data("cbp");c.pack===!0&&n.intersectSpaces(t,c)&&t.topStart-c.topNew-c.heightAndGap===-1&&(s.style.height=c.height-1+"px")})})},sortBlocks:function(n,e,t,i){t=t===void 0?"leftNew":t,i=i===void 0?1:-1,n.sort(function(s,c){var o=a(s).data("cbp"),r=a(c).data("cbp");return o[e]>r[e]?i:o[e]<r[e]?-i:o[t]>r[t]?i:o[t]<r[t]?-i:o.index>r.index?i:o.index<r.index?-i:void 0})}})}(jQuery),jQuery.fn.cubeportfolio.options={filters:"",search:"",layoutMode:"grid",sortByDimension:!1,drag:!0,auto:!1,autoTimeout:5e3,autoPauseOnHover:!0,showNavigation:!0,showPagination:!0,rewindNav:!0,scrollByPage:!1,defaultFilter:"*",filterDeeplinking:!1,animationType:"fadeOut",gridAdjustment:"responsive",mediaQueries:!1,gapHorizontal:10,gapVertical:10,caption:"pushTop",displayType:"fadeIn",displayTypeSpeed:400,lightboxDelegate:".cbp-lightbox",lightboxGallery:!0,lightboxTitleSrc:"data-title",lightboxCounter:'<div class="cbp-popup-lightbox-counter">{{current}} of {{total}}</div>',singlePageDelegate:".cbp-singlePage",singlePageDeeplinking:!0,singlePageStickyNavigation:!0,singlePageCounter:'<div class="cbp-popup-singlePage-counter">{{current}} of {{total}}</div>',singlePageAnimation:"left",singlePageCallback:null,singlePageInlineDelegate:".cbp-singlePageInline",singlePageInlineDeeplinking:!1,singlePageInlinePosition:"top",singlePageInlineInFocus:!0,singlePageInlineCallback:null,plugins:{}},function(a,v,y,k){var d=a.fn.cubeportfolio.constructor,n=a(v);d.private={publicEvents:function(e,t,i){var s=this;s.events=[],s.initEvent=function(c){s.events.length===0&&s.scrollEvent(),s.events.push(c)},s.destroyEvent=function(c){s.events=a.map(s.events,function(o,r){if(o.instance!==c)return o}),s.events.length===0&&n.off(e)},s.scrollEvent=function(){var c;n.on(e,function(){clearTimeout(c),c=setTimeout(function(){a.isFunction(i)&&i.call(s)||a.each(s.events,function(o,r){r.fn.call(r.instance)})},t)})}},checkInstance:function(e){var t=a.data(this,"cubeportfolio");if(!t)throw new Error("cubeportfolio is not initialized. Initialize it before calling "+e+" method!");return t.triggerEvent("publicMethod"),t},browserInfo:function(){var e,t,i=d.private,s=navigator.appVersion;s.indexOf("MSIE 8.")!==-1?i.browser="ie8":s.indexOf("MSIE 9.")!==-1?i.browser="ie9":s.indexOf("MSIE 10.")!==-1?i.browser="ie10":v.ActiveXObject||"ActiveXObject"in v?i.browser="ie11":/android/gi.test(s)?i.browser="android":/iphone|ipad|ipod/gi.test(s)?i.browser="ios":/chrome/gi.test(s)?i.browser="chrome":i.browser="",typeof i.styleSupport("perspective")!==void 0&&(e=i.styleSupport("transition"),i.transitionend={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[e],t=i.styleSupport("animation"),i.animationend={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"}[t],i.animationDuration={WebkitAnimation:"webkitAnimationDuration",animation:"animationDuration"}[t],i.animationDelay={WebkitAnimation:"webkitAnimationDelay",animation:"animationDelay"}[t],i.transform=i.styleSupport("transform"),e&&t&&i.transform&&(i.modernBrowser=!0))},styleSupport:function(e){var t,i="Webkit"+e.charAt(0).toUpperCase()+e.slice(1),s=y.createElement("div");return e in s.style?t=e:i in s.style&&(t=i),s=null,t}},d.private.browserInfo(),d.private.resize=new d.private.publicEvents("resize.cbp",50,function(){if(v.innerHeight==screen.height)return!0})}(jQuery,window,document),function(a,v,y,k){var d=a.fn.cubeportfolio.constructor;d.public={init:function(n,e){new d(this,n,e)},destroy:function(n){var e=d.private.checkInstance.call(this,"destroy");e.triggerEvent("beforeDestroy"),a.removeData(this,"cubeportfolio"),e.blocks.removeData("cbp"),e.$obj.removeClass("cbp-ready").removeAttr("style"),e.$ul.removeClass("cbp-wrapper"),d.private.resize.destroyEvent(e),e.$obj.off(".cbp"),e.blocks.removeClass("cbp-item-off").removeAttr("style"),e.blocks.find(".cbp-item-wrapper").each(function(t,i){var s=a(i),c=s.children();c.length?c.unwrap():s.remove()}),e.destroySlider&&e.destroySlider(),e.$ul.unwrap(),e.addedWrapp&&e.blocks.unwrap(),e.blocks.length===0&&e.$ul.remove(),a.each(e.plugins,function(t,i){typeof i.destroy=="function"&&i.destroy()}),a.isFunction(n)&&n.call(e),e.triggerEvent("afterDestroy")},filter:function(n,e){var t,i=d.private.checkInstance.call(this,"filter");if(!i.isAnimating){if(i.isAnimating=!0,a.isFunction(e)&&i.registerEvent("filterFinish",e,!0),a.isFunction(n)){if((t=n.call(i,i.blocks))===void 0)throw new Error("When you call cubeportfolio API `filter` method with a param of type function you must return the blocks that will be visible.")}else{if(i.options.filterDeeplinking){var s=location.href.replace(/#cbpf=(.*?)([#\?&]|$)/gi,"");location.href=s+"#cbpf="+encodeURIComponent(n),i.singlePage&&i.singlePage.url&&(i.singlePage.url=location.href)}i.defaultFilter=n,t=i.filterConcat(i.defaultFilter)}i.triggerEvent("filterStart",t),i.singlePageInline&&i.singlePageInline.isOpen?i.singlePageInline.close("promise",{callback:function(){i.computeFilter(t)}}):i.computeFilter(t)}},showCounter:function(n,e){var t=d.private.checkInstance.call(this,"showCounter");a.isFunction(e)&&t.registerEvent("showCounterFinish",e,!0),t.elems=n,n.each(function(){var i=a(this),s=t.blocks.filter(i.data("filter")).length;i.find(".cbp-filter-counter").text(s)}),t.triggerEvent("showCounterFinish",n)},appendItems:function(n,e){d.public.append.call(this,n,e)},append:function(n,e){var t=d.private.checkInstance.call(this,"append"),i=a(n).filter(".cbp-item");t.isAnimating||i.length<1?a.isFunction(e)&&e.call(t,i):(t.isAnimating=!0,t.singlePageInline&&t.singlePageInline.isOpen?t.singlePageInline.close("promise",{callback:function(){t.addItems(i,e,"append")}}):t.addItems(i,e,"append"))},prepend:function(n,e){var t=d.private.checkInstance.call(this,"prepend"),i=a(n).filter(".cbp-item");t.isAnimating||i.length<1?a.isFunction(e)&&e.call(t,i):(t.isAnimating=!0,t.singlePageInline&&t.singlePageInline.isOpen?t.singlePageInline.close("promise",{callback:function(){t.addItems(i,e,"prepend")}}):t.addItems(i,e,"prepend"))},remove:function(n,e){var t=d.private.checkInstance.call(this,"remove"),i=a(n).filter(".cbp-item");t.isAnimating||i.length<1?a.isFunction(e)&&e.call(t,i):(t.isAnimating=!0,t.singlePageInline&&t.singlePageInline.isOpen?t.singlePageInline.close("promise",{callback:function(){t.removeItems(i,e)}}):t.removeItems(i,e))},layout:function(n){var e=d.private.checkInstance.call(this,"layout");e.width=e.$obj.outerWidth(),e.isAnimating||e.width<=0||(e.options.gridAdjustment==="alignCenter"&&(e.wrapper[0].style.maxWidth=""),e.storeData(e.blocks),e.layoutAndAdjustment()),a.isFunction(n)&&n.call(e)}}}(jQuery),function(a,v,y,k){var d=a.fn.cubeportfolio.constructor;a.extend(d.prototype,{updateSliderPagination:function(){var n,e,t=this;if(t.options.showPagination){for(n=Math.ceil(t.blocksOn.length/t.cols),t.navPagination.empty(),e=n-1;e>=0;e--)a("<div/>",{class:"cbp-nav-pagination-item","data-slider-action":"jumpTo"}).appendTo(t.navPagination);t.navPaginationItems=t.navPagination.children()}t.enableDisableNavSlider()},destroySlider:function(){var n=this;n.options.layoutMode==="slider"&&(n.$obj.removeClass("cbp-mode-slider"),n.$ul.removeAttr("style"),n.$ul.off(".cbp"),a(y).off(".cbp"),n.options.auto&&n.stopSliderAuto())},nextSlider:function(n){var e=this;if(e.isEndSlider()){if(!e.isRewindNav())return;e.sliderActive=0}else e.options.scrollByPage?e.sliderActive=Math.min(e.sliderActive+e.cols,e.blocksOn.length-e.cols):e.sliderActive+=1;e.goToSlider()},prevSlider:function(n){var e=this;if(e.isStartSlider()){if(!e.isRewindNav())return;e.sliderActive=e.blocksOn.length-e.cols}else e.options.scrollByPage?e.sliderActive=Math.max(0,e.sliderActive-e.cols):e.sliderActive-=1;e.goToSlider()},jumpToSlider:function(n){var e=this,t=Math.min(n.index()*e.cols,e.blocksOn.length-e.cols);t!==e.sliderActive&&(e.sliderActive=t,e.goToSlider())},jumpDragToSlider:function(n){var e,t,i,s=this,c=n>0;s.options.scrollByPage?(e=s.cols*s.columnWidth,t=s.cols):(e=s.columnWidth,t=1),n=Math.abs(n),i=Math.floor(n/e)*t,n%e>20&&(i+=t),s.sliderActive=c?Math.min(s.sliderActive+i,s.blocksOn.length-s.cols):Math.max(0,s.sliderActive-i),s.goToSlider()},isStartSlider:function(){return this.sliderActive===0},isEndSlider:function(){return this.sliderActive+this.cols>this.blocksOn.length-1},goToSlider:function(){this.enableDisableNavSlider(),this.updateSliderPosition()},startSliderAuto:function(){var n=this;n.isDrag?n.stopSliderAuto():n.timeout=setTimeout(function(){n.nextSlider(),n.startSliderAuto()},n.options.autoTimeout)},stopSliderAuto:function(){clearTimeout(this.timeout)},enableDisableNavSlider:function(){var n,e,t=this;t.isRewindNav()||(e=t.isStartSlider()?"addClass":"removeClass",t.navPrev[e]("cbp-nav-stop"),e=t.isEndSlider()?"addClass":"removeClass",t.navNext[e]("cbp-nav-stop")),t.options.showPagination&&(n=t.options.scrollByPage?Math.ceil(t.sliderActive/t.cols):t.isEndSlider()?t.navPaginationItems.length-1:Math.floor(t.sliderActive/t.cols),t.navPaginationItems.removeClass("cbp-nav-pagination-active").eq(n).addClass("cbp-nav-pagination-active")),t.customPagination&&(n=t.options.scrollByPage?Math.ceil(t.sliderActive/t.cols):t.isEndSlider()?t.customPaginationItems.length-1:Math.floor(t.sliderActive/t.cols),t.customPaginationItems.removeClass(t.customPaginationClass).eq(n).addClass(t.customPaginationClass))},isRewindNav:function(){return!this.options.showNavigation||!(this.blocksOn.length<=this.cols)&&!!this.options.rewindNav},sliderItemsLength:function(){return this.blocksOn.length<=this.cols},sliderLayout:function(){var n=this;n.blocksOn.each(function(e,t){var i=a(t).data("cbp");i.leftNew=n.columnWidth*e,i.topNew=0,n.sliderFreeSpaces.push({topStart:i.heightAndGap})}),n.getFreeSpacesForSlider(),n.$ul.width(n.columnWidth*n.blocksOn.length-n.options.gapVertical)},getFreeSpacesForSlider:function(){var n=this;n.freeSpaces=n.sliderFreeSpaces.slice(n.sliderActive,n.sliderActive+n.cols),n.freeSpaces.sort(function(e,t){return e.topStart>t.topStart?1:e.topStart<t.topStart?-1:void 0})},updateSliderPosition:function(){var n=this,e=-n.sliderActive*n.columnWidth;d.private.modernBrowser?n.$ul[0].style[d.private.transform]="translate3d("+e+"px, 0px, 0)":n.$ul[0].style.left=e+"px",n.getFreeSpacesForSlider(),n.resizeMainContainer()},dragSlider:function(){var n,e,t,i,s,c=this,o=a(y),r=!1,l={},p=!1;function f(h){c.$obj.removeClass("cbp-mode-slider-dragStart"),r=!0,e!==0?(t.one("click.cbp",function(b){return!1}),requestAnimationFrame(function(){c.jumpDragToSlider(e),c.$ul.one(d.private.transitionend,u)})):u.call(c),o.off(l.move),o.off(l.end)}function g(h){((e=n-w(h).x)>8||e<-8)&&h.preventDefault(),c.isDrag=!0;var b=i-e;e<0&&e<i?b=(i-e)/5:e>0&&i-e<-s&&(b=(s+i-e)/5-s),d.private.modernBrowser?c.$ul[0].style[d.private.transform]="translate3d("+b+"px, 0px, 0)":c.$ul[0].style.left=b+"px"}function u(){if(r=!1,c.isDrag=!1,c.options.auto){if(c.mouseIsEntered)return;c.startSliderAuto()}}function w(h){return h.originalEvent!==k&&h.originalEvent.touches!==k&&(h=h.originalEvent.touches[0]),{x:h.pageX,y:h.pageY}}c.isDrag=!1,"ontouchstart"in v||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?(l={start:"touchstart.cbp",move:"touchmove.cbp",end:"touchend.cbp"},p=!0):l={start:"mousedown.cbp",move:"mousemove.cbp",end:"mouseup.cbp"},c.$ul.on(l.start,function(h){c.sliderItemsLength()||(p||h.preventDefault(),c.options.auto&&c.stopSliderAuto(),r?a(t).one("click.cbp",function(){return!1}):(t=a(h.target),n=w(h).x,e=0,i=-c.sliderActive*c.columnWidth,s=c.columnWidth*(c.blocksOn.length-c.cols),o.on(l.move,g),o.on(l.end,f),c.$obj.addClass("cbp-mode-slider-dragStart")))})},sliderLayoutReset:function(){this.freeSpaces=[],this.sliderFreeSpaces=[]}})}(jQuery,window,document),typeof Object.create!="function"&&(Object.create=function(a){function v(){}return v.prototype=a,new v}),function(){for(var a=0,v=["moz","webkit"],y=0;y<v.length&&!window.requestAnimationFrame;y++)window.requestAnimationFrame=window[v[y]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[v[y]+"CancelAnimationFrame"]||window[v[y]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(k,d){var n=new Date().getTime(),e=Math.max(0,16-(n-a)),t=window.setTimeout(function(){k(n+e)},e);return a=n+e,t}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(k){clearTimeout(k)})}(),function(a,v,y,k){var d=a.fn.cubeportfolio.constructor;function n(e){this.parent=e,e.filterLayout=this.filterLayout,e.registerEvent("computeBlocksFinish",function(t){e.blocksOn2On=e.blocksOnInitial.filter(t),e.blocksOn2Off=e.blocksOnInitial.not(t)})}n.prototype.filterLayout=function(){var e=this;function t(){e.blocks.removeClass("cbp-item-on2off cbp-item-off2on cbp-item-on2on").each(function(i,s){var c=a(s).data("cbp");c.left=c.leftNew,c.top=c.topNew,s.style.left=c.left+"px",s.style.top=c.top+"px",s.style[d.private.transform]=""}),e.blocksOff.addClass("cbp-item-off"),e.$obj.removeClass("cbp-animation-"+e.options.animationType),e.filterFinish()}e.$obj.addClass("cbp-animation-"+e.options.animationType),e.blocksOn2On.addClass("cbp-item-on2on").each(function(i,s){var c=a(s).data("cbp");s.style[d.private.transform]="translate3d("+(c.leftNew-c.left)+"px, "+(c.topNew-c.top)+"px, 0)"}),e.blocksOn2Off.addClass("cbp-item-on2off"),e.blocksOff2On=e.blocksOn.filter(".cbp-item-off").removeClass("cbp-item-off").addClass("cbp-item-off2on").each(function(i,s){var c=a(s).data("cbp");s.style.left=c.leftNew+"px",s.style.top=c.topNew+"px"}),e.blocksOn2Off.length?e.blocksOn2Off.last().data("cbp").wrapper.one(d.private.animationend,t):e.blocksOff2On.length?e.blocksOff2On.last().data("cbp").wrapper.one(d.private.animationend,t):e.blocksOn2On.length?e.blocksOn2On.last().one(d.private.transitionend,t):t(),e.resizeMainContainer()},n.prototype.destroy=function(){var e=this.parent;e.$obj.removeClass("cbp-animation-"+e.options.animationType)},d.plugins.animationClassic=function(e){return!d.private.modernBrowser||a.inArray(e.options.animationType,["boxShadow","fadeOut","flipBottom","flipOut","quicksand","scaleSides","skew"])<0?null:new n(e)}}(jQuery),function(a,v,y,k){var d=a.fn.cubeportfolio.constructor;function n(e){this.parent=e,e.filterLayout=this.filterLayout}n.prototype.filterLayout=function(){var e=this,t=e.$ul[0].cloneNode(!0);function i(){e.wrapper[0].removeChild(t),e.options.animationType==="sequentially"&&e.blocksOn.each(function(s,c){a(c).data("cbp").wrapper[0].style[d.private.animationDelay]=""}),e.$obj.removeClass("cbp-animation-"+e.options.animationType),e.filterFinish()}t.setAttribute("class","cbp-wrapper-helper"),e.wrapper[0].insertBefore(t,e.$ul[0]),requestAnimationFrame(function(){e.$obj.addClass("cbp-animation-"+e.options.animationType),e.blocksOff.addClass("cbp-item-off"),e.blocksOn.removeClass("cbp-item-off").each(function(s,c){var o=a(c).data("cbp");o.left=o.leftNew,o.top=o.topNew,c.style.left=o.left+"px",c.style.top=o.top+"px",e.options.animationType==="sequentially"&&(o.wrapper[0].style[d.private.animationDelay]=60*s+"ms")}),e.blocksOn.length?e.blocksOn.last().data("cbp").wrapper.one(d.private.animationend,i):e.blocksOnInitial.length?e.blocksOnInitial.last().data("cbp").wrapper.one(d.private.animationend,i):i(),e.resizeMainContainer()})},n.prototype.destroy=function(){var e=this.parent;e.$obj.removeClass("cbp-animation-"+e.options.animationType)},d.plugins.animationClone=function(e){return!d.private.modernBrowser||a.inArray(e.options.animationType,["fadeOutTop","slideLeft","sequentially"])<0?null:new n(e)}}(jQuery),function(a,v,y,k){var d=a.fn.cubeportfolio.constructor;function n(e){this.parent=e,e.filterLayout=this.filterLayout}n.prototype.filterLayout=function(){var e=this,t=e.$ul.clone(!0,!0);t[0].setAttribute("class","cbp-wrapper-helper"),e.wrapper[0].insertBefore(t[0],e.$ul[0]);var i=t.find(".cbp-item").not(".cbp-item-off");function s(){e.wrapper[0].removeChild(t[0]),e.$obj.removeClass("cbp-animation-"+e.options.animationType),e.blocks.each(function(c,o){a(o).data("cbp").wrapper[0].style[d.private.animationDelay]=""}),e.filterFinish()}e.blocksAreSorted&&e.sortBlocks(i,"top","left"),i.children(".cbp-item-wrapper").each(function(c,o){o.style[d.private.animationDelay]=50*c+"ms"}),requestAnimationFrame(function(){e.$obj.addClass("cbp-animation-"+e.options.animationType),e.blocksOff.addClass("cbp-item-off"),e.blocksOn.removeClass("cbp-item-off").each(function(r,l){var p=a(l).data("cbp");p.left=p.leftNew,p.top=p.topNew,l.style.left=p.left+"px",l.style.top=p.top+"px",p.wrapper[0].style[d.private.animationDelay]=50*r+"ms"});var c=e.blocksOn.length,o=i.length;c===0&&o===0?s():c<o?i.last().children(".cbp-item-wrapper").one(d.private.animationend,s):e.blocksOn.last().data("cbp").wrapper.one(d.private.animationend,s),e.resizeMainContainer()})},n.prototype.destroy=function(){var e=this.parent;e.$obj.removeClass("cbp-animation-"+e.options.animationType)},d.plugins.animationCloneDelay=function(e){return!d.private.modernBrowser||a.inArray(e.options.animationType,["3dflip","flipOutDelay","foldLeft","frontRow","rotateRoom","rotateSides","scaleDown","slideDelay","unfold"])<0?null:new n(e)}}(jQuery),function(a,v,y,k){var d=a.fn.cubeportfolio.constructor;function n(e){this.parent=e,e.filterLayout=this.filterLayout}n.prototype.filterLayout=function(){var e=this,t=e.$ul[0].cloneNode(!0);function i(){e.wrapper[0].removeChild(t),e.$obj.removeClass("cbp-animation-"+e.options.animationType),e.filterFinish()}t.setAttribute("class","cbp-wrapper-helper"),e.wrapper[0].insertBefore(t,e.$ul[0]),requestAnimationFrame(function(){e.$obj.addClass("cbp-animation-"+e.options.animationType),e.blocksOff.addClass("cbp-item-off"),e.blocksOn.removeClass("cbp-item-off").each(function(s,c){var o=a(c).data("cbp");o.left=o.leftNew,o.top=o.topNew,c.style.left=o.left+"px",c.style.top=o.top+"px"}),e.blocksOn.length?e.$ul.one(d.private.animationend,i):e.blocksOnInitial.length?a(t).one(d.private.animationend,i):i(),e.resizeMainContainer()})},n.prototype.destroy=function(){var e=this.parent;e.$obj.removeClass("cbp-animation-"+e.options.animationType)},d.plugins.animationWrapper=function(e){return!d.private.modernBrowser||a.inArray(e.options.animationType,["bounceBottom","bounceLeft","bounceTop","moveLeft"])<0?null:new n(e)}}(jQuery),function(a,v,y,k){var d=a.fn.cubeportfolio.constructor;function n(e){var t=this,i=e.options;t.parent=e,t.captionOn=i.caption,e.registerEvent("onMediaQueries",function(s){s&&s.hasOwnProperty("caption")?t.captionOn!==s.caption&&(t.destroy(),t.captionOn=s.caption,t.init()):t.captionOn!==i.caption&&(t.destroy(),t.captionOn=i.caption,t.init())}),t.init()}n.prototype.init=function(){var e=this;e.captionOn!=""&&(e.captionOn==="expand"||d.private.modernBrowser||(e.parent.options.caption=e.captionOn="minimal"),e.parent.$obj.addClass("cbp-caption-active cbp-caption-"+e.captionOn))},n.prototype.destroy=function(){this.parent.$obj.removeClass("cbp-caption-active cbp-caption-"+this.captionOn)},d.plugins.caption=function(e){return new n(e)}}(jQuery),function(a,v,y,k){var d=a.fn.cubeportfolio.constructor;function n(e){this.parent=e,e.registerEvent("initFinish",function(){e.$obj.on("click.cbp",".cbp-caption-defaultWrap",function(t){if(t.preventDefault(),!e.isAnimating){e.isAnimating=!0;var i=a(this),s=i.next(),c=i.parent(),o={position:"relative",height:s.outerHeight(!0)},r={position:"relative",height:0};if(e.$obj.addClass("cbp-caption-expand-active"),c.hasClass("cbp-caption-expand-open")){var l=r;r=o,o=l,c.removeClass("cbp-caption-expand-open")}s.css(o),e.$obj.one("pluginResize.cbp",function(){e.isAnimating=!1,e.$obj.removeClass("cbp-caption-expand-active"),o.height===0&&(c.removeClass("cbp-caption-expand-open"),s.attr("style",""))}),e.layoutAndAdjustment(!0),s.css(r),requestAnimationFrame(function(){c.addClass("cbp-caption-expand-open"),s.css(o),e.triggerEvent("gridAdjust"),e.triggerEvent("resizeGrid")})}})},!0)}n.prototype.destroy=function(){this.parent.$obj.find(".cbp-caption-defaultWrap").off("click.cbp").parent().removeClass("cbp-caption-expand-active")},d.plugins.captionExpand=function(e){return e.options.caption!=="expand"?null:new n(e)}}(jQuery),function(a,v,y,k){var d=a.fn.cubeportfolio.constructor;d.plugins.displayBottomToTop=function(n){return d.private.modernBrowser&&n.options.displayType==="bottomToTop"&&n.blocksOn.length!==0?new function(e){e.registerEvent("initEndWrite",function(){if(!(e.width<=0)){var t=a.Deferred();e.pushQueue("delayFrame",t),e.blocksOn.each(function(i,s){s.style[d.private.animationDelay]=i*e.options.displayTypeSpeed+"ms"}),e.$obj.addClass("cbp-displayType-bottomToTop"),e.blocksOn.last().one(d.private.animationend,function(){e.$obj.removeClass("cbp-displayType-bottomToTop"),e.blocksOn.each(function(i,s){s.style[d.private.animationDelay]=""}),t.resolve()})}},!0)}(n):null}}(jQuery),function(a,v,y,k){var d=a.fn.cubeportfolio.constructor;d.plugins.displayFadeIn=function(n){return!d.private.modernBrowser||n.options.displayType!=="lazyLoading"&&n.options.displayType!=="fadeIn"||n.blocksOn.length===0?null:new function(e){e.registerEvent("initEndWrite",function(){if(!(e.width<=0)){var t=a.Deferred();e.pushQueue("delayFrame",t),e.obj.style[d.private.animationDuration]=e.options.displayTypeSpeed+"ms",e.$obj.addClass("cbp-displayType-fadeIn"),e.$obj.one(d.private.animationend,function(){e.$obj.removeClass("cbp-displayType-fadeIn"),e.obj.style[d.private.animationDuration]="",t.resolve()})}},!0)}(n)}}(jQuery),function(a,v,y,k){var d=a.fn.cubeportfolio.constructor;d.plugins.displayFadeInToTop=function(n){return d.private.modernBrowser&&n.options.displayType==="fadeInToTop"&&n.blocksOn.length!==0?new function(e){e.registerEvent("initEndWrite",function(){if(!(e.width<=0)){var t=a.Deferred();e.pushQueue("delayFrame",t),e.obj.style[d.private.animationDuration]=e.options.displayTypeSpeed+"ms",e.$obj.addClass("cbp-displayType-fadeInToTop"),e.$obj.one(d.private.animationend,function(){e.$obj.removeClass("cbp-displayType-fadeInToTop"),e.obj.style[d.private.animationDuration]="",t.resolve()})}},!0)}(n):null}}(jQuery),function(a,v,y,k){var d=a.fn.cubeportfolio.constructor;d.plugins.displaySequentially=function(n){return d.private.modernBrowser&&n.options.displayType==="sequentially"&&n.blocksOn.length!==0?new function(e){e.registerEvent("initEndWrite",function(){if(!(e.width<=0)){var t=a.Deferred();e.pushQueue("delayFrame",t),e.blocksOn.each(function(i,s){s.style[d.private.animationDelay]=i*e.options.displayTypeSpeed+"ms"}),e.$obj.addClass("cbp-displayType-sequentially"),e.blocksOn.last().one(d.private.animationend,function(){e.$obj.removeClass("cbp-displayType-sequentially"),e.blocksOn.each(function(i,s){s.style[d.private.animationDelay]=""}),t.resolve()})}},!0)}(n):null}}(jQuery),function(a,v,y,k){var d=a.fn.cubeportfolio.constructor;function n(e){var t=this;t.parent=e,t.filters=a(e.options.filters),t.filterData=[],e.registerEvent("afterPlugins",function(i){t.filterFromUrl(),t.registerFilter()}),e.registerEvent("resetFiltersVisual",function(){var i=e.options.defaultFilter.split("|");t.filters.each(function(s,c){var o=a(c).find(".cbp-filter-item");a.each(i,function(r,l){var p=o.filter('[data-filter="'+l+'"]');if(p.length)return p.addClass("cbp-filter-item-active").siblings().removeClass("cbp-filter-item-active"),i.splice(r,1),!1})}),e.defaultFilter=e.options.defaultFilter})}n.prototype.registerFilter=function(){var e=this,t=e.parent,i=t.defaultFilter.split("|");e.wrap=e.filters.find(".cbp-l-filters-dropdownWrap").on({"mouseover.cbp":function(){a(this).addClass("cbp-l-filters-dropdownWrap-open")},"mouseleave.cbp":function(){a(this).removeClass("cbp-l-filters-dropdownWrap-open")}}),e.filters.each(function(s,c){var o=a(c),r="*",l=o.find(".cbp-filter-item"),p={};o.hasClass("cbp-l-filters-dropdown")&&(p.wrap=o.find(".cbp-l-filters-dropdownWrap"),p.header=o.find(".cbp-l-filters-dropdownHeader"),p.headerText=p.header.text()),t.$obj.cubeportfolio("showCounter",l),a.each(i,function(f,g){if(l.filter('[data-filter="'+g+'"]').length)return r=g,i.splice(f,1),!1}),a.data(c,"filterName",r),e.filterData.push(c),e.filtersCallback(p,l.filter('[data-filter="'+r+'"]')),l.on("click.cbp",function(){var f=a(this);if(!f.hasClass("cbp-filter-item-active")&&!t.isAnimating){e.filtersCallback(p,f),a.data(c,"filterName",f.data("filter"));var g=a.map(e.filterData,function(w,h){var b=a.data(w,"filterName");return b!==""&&b!=="*"?b:null});g.length<1&&(g=["*"]);var u=g.join("|");t.defaultFilter!==u&&t.$obj.cubeportfolio("filter",u)}})})},n.prototype.filtersCallback=function(e,t){a.isEmptyObject(e)||(e.wrap.trigger("mouseleave.cbp"),e.headerText?e.headerText="":e.header.html(t.html())),t.addClass("cbp-filter-item-active").siblings().removeClass("cbp-filter-item-active")},n.prototype.filterFromUrl=function(){var e=/#cbpf=(.*?)([#\?&]|$)/gi.exec(location.href);e!==null&&(this.parent.defaultFilter=decodeURIComponent(e[1]))},n.prototype.destroy=function(){this.filters.find(".cbp-filter-item").off(".cbp"),this.wrap.off(".cbp")},d.plugins.filters=function(e){return e.options.filters===""?null:new n(e)}}(jQuery),function(a,v,y,k){a.fn.cubeportfolio.constructor.plugins.changeGapOnMediaQueries=function(d){return new function(n){var e=n.options.gapVertical,t=n.options.gapHorizontal;n.registerEvent("onMediaQueries",function(i){n.options.gapVertical=i&&i.hasOwnProperty("gapVertical")?i.gapVertical:e,n.options.gapHorizontal=i&&i.hasOwnProperty("gapHorizontal")?i.gapHorizontal:t,n.blocks.each(function(s,c){var o=a(c).data("cbp");o.widthAndGap=o.width+n.options.gapVertical,o.heightAndGap=o.height+n.options.gapHorizontal})})}(d)}}(jQuery),function(a,v,y,k){var d={},n=a.fn.cubeportfolio.constructor;function e(i){var s=this;s.parent=i,s.options=a.extend({},d,s.parent.options.plugins.inlineSlider),s.runInit(),i.registerEvent("addItemsToDOM",function(){s.runInit()})}function t(i){var s=this;i.hasClass("cbp-slider-inline-ready")||(i.addClass("cbp-slider-inline-ready"),s.items=i.find(".cbp-slider-wrapper").children(".cbp-slider-item"),s.active=s.items.filter(".cbp-slider-item--active").index(),s.total=s.items.length-1,s.updateLeft(),i.find(".cbp-slider-next").on("click.cbp",function(c){c.preventDefault(),s.active<s.total?(s.active++,s.updateLeft()):s.active===s.total&&(s.active=0,s.updateLeft())}),i.find(".cbp-slider-prev").on("click.cbp",function(c){c.preventDefault(),s.active>0?(s.active--,s.updateLeft()):s.active===0&&(s.active=s.total,s.updateLeft())}))}t.prototype.updateLeft=function(){var i=this;i.items.removeClass("cbp-slider-item--active"),i.items.eq(i.active).addClass("cbp-slider-item--active"),i.items.each(function(s,c){c.style.left=s-i.active+"00%"})},e.prototype.runInit=function(){var i=this;i.parent.$obj.find(".cbp-slider-inline").not(".cbp-slider-inline-ready").each(function(s,c){var o=a(c),r=o.find(".cbp-slider-item--active").find("img")[0];r.hasAttribute("data-cbp-src")?i.parent.$obj.on("lazyLoad.cbp",function(l,p){p.src===r.src&&new t(o)}):new t(o)})},e.prototype.destroy=function(){this.parent.$obj.find(".cbp-slider-next").off("click.cbp"),this.parent.$obj.find(".cbp-slider-prev").off("click.cbp"),this.parent.$obj.off("lazyLoad.cbp"),this.parent.$obj.find(".cbp-slider-inline").each(function(i,s){var c=a(s);c.removeClass("cbp-slider-inline-ready");var o=c.find(".cbp-slider-item");o.removeClass("cbp-slider-item--active"),o.removeAttr("style"),o.eq(0).addClass("cbp-slider-item--active")})},n.plugins.inlineSlider=function(i){return new e(i)}}(jQuery),function(a,v,y,k){var d={loadingClass:"cbp-lazyload",threshold:400},n=a.fn.cubeportfolio.constructor,e=a(v);function t(i){var s=this;s.parent=i,s.options=a.extend({},d,s.parent.options.plugins.lazyLoad),i.registerEvent("initFinish",function(){s.loadImages(),i.registerEvent("resizeMainContainer",function(){s.loadImages()}),i.registerEvent("filterFinish",function(){s.loadImages()}),n.private.lazyLoadScroll.initEvent({instance:s,fn:s.loadImages})},!0)}n.private.lazyLoadScroll=new n.private.publicEvents("scroll.cbplazyLoad",50),t.prototype.loadImages=function(){var i=this,s=i.parent.$obj.find("img").filter("[data-cbp-src]");s.length!==0&&(i.screenHeight=e.height(),s.each(function(c,o){var r=a(o.parentNode);if(i.isElementInScreen(o)){var l=o.getAttribute("data-cbp-src");i.parent.checkSrc(a("<img>").attr("src",l))===null?(i.removeLazyLoad(o,l),r.removeClass(i.options.loadingClass)):(r.addClass(i.options.loadingClass),a("<img>").on("load.cbp error.cbp",function(){i.removeLazyLoad(o,l,r)}).attr("src",l))}else r.addClass(i.options.loadingClass)}))},t.prototype.removeLazyLoad=function(i,s,c){var o=this;i.src=s,i.removeAttribute("data-cbp-src"),o.parent.removeAttrImage(i),o.parent.$obj.trigger("lazyLoad.cbp",i),c&&(n.private.modernBrowser?a(i).one(n.private.transitionend,function(){c.removeClass(o.options.loadingClass)}):c.removeClass(o.options.loadingClass))},t.prototype.isElementInScreen=function(i){var s=i.getBoundingClientRect(),c=s.bottom+this.options.threshold,o=this.screenHeight+c-(s.top-this.options.threshold);return c>=0&&c<=o},t.prototype.destroy=function(){n.private.lazyLoadScroll.destroyEvent(this)},n.plugins.lazyLoad=function(i){return new t(i)}}(jQuery,window),function(a,v,y,k){var d={element:"",action:"click",loadItems:3},n=a.fn.cubeportfolio.constructor;function e(t){var i=this;i.parent=t,i.options=a.extend({},d,i.parent.options.plugins.loadMore),i.loadMore=a(i.options.element).find(".cbp-l-loadMore-link"),i.loadMore.length!==0&&(i.loadItems=i.loadMore.find(".cbp-l-loadMore-loadItems"),i.loadItems.text()==="0"&&i.loadMore.addClass("cbp-l-loadMore-stop"),t.registerEvent("filterStart",function(s){i.populateItems().then(function(){var c=i.items.filter(s).length;c>0?(i.loadMore.removeClass("cbp-l-loadMore-stop"),i.loadItems.html(c)):i.loadMore.addClass("cbp-l-loadMore-stop")})}),i[i.options.action]())}e.prototype.populateItems=function(){var t=this;return t.items?a.Deferred().resolve():(t.items=a(),a.ajax({url:t.loadMore.attr("href"),type:"GET",dataType:"HTML"}).done(function(i){var s=a.map(i.split(/\r?\n/),function(c,o){return a.trim(c)}).join("");s.length!==0&&a.each(a.parseHTML(s),function(c,o){a(o).hasClass("cbp-item")?t.items=t.items.add(o):a.each(o.children,function(r,l){a(l).hasClass("cbp-item")&&(t.items=t.items.add(l))})})}).fail(function(){t.items=null,t.loadMore.removeClass("cbp-l-loadMore-loading")}))},e.prototype.populateInsertItems=function(t){var i=this,s=[],c=i.parent.defaultFilter,o=0;i.items.each(function(r,l){if(o===i.options.loadItems)return!1;c&&c!=="*"?a(l).filter(c).length&&(s.push(l),i.items[r]=null,o++):(s.push(l),i.items[r]=null,o++)}),i.items=i.items.map(function(r,l){return l}),s.length!==0?i.parent.$obj.cubeportfolio("append",s,t):i.loadMore.removeClass("cbp-l-loadMore-loading").addClass("cbp-l-loadMore-stop")},e.prototype.click=function(){var t=this;function i(){t.loadMore.removeClass("cbp-l-loadMore-loading");var s,c=t.parent.defaultFilter;(s=c&&c!=="*"?t.items.filter(c).length:t.items.length)===0?t.loadMore.addClass("cbp-l-loadMore-stop"):t.loadItems.html(s)}t.loadMore.on("click.cbp",function(s){s.preventDefault(),t.parent.isAnimating||t.loadMore.hasClass("cbp-l-loadMore-stop")||(t.loadMore.addClass("cbp-l-loadMore-loading"),t.populateItems().then(function(){t.populateInsertItems(i)}))})},e.prototype.auto=function(){var t=this,i=a(v),s=!1;function c(){s||t.loadMore.hasClass("cbp-l-loadMore-stop")||t.loadMore.offset().top-200>i.scrollTop()+i.height()||(s=!0,t.populateItems().then(function(){t.populateInsertItems(o)}).fail(function(){s=!1}))}function o(){var r,l=t.parent.defaultFilter;(r=l&&l!=="*"?t.items.filter(l).length:t.items.length)===0?t.loadMore.removeClass("cbp-l-loadMore-loading").addClass("cbp-l-loadMore-stop"):(t.loadItems.html(r),i.trigger("scroll.loadMore")),s=!1,t.items.length===0&&(n.private.loadMoreScroll.destroyEvent(t),t.parent.$obj.off("filterComplete.cbp"))}n.private.loadMoreScroll=new n.private.publicEvents("scroll.loadMore",100),t.parent.$obj.one("initComplete.cbp",function(){t.loadMore.addClass("cbp-l-loadMore-loading").on("click.cbp",function(r){r.preventDefault()}),n.private.loadMoreScroll.initEvent({instance:t,fn:function(){t.parent.isAnimating||c()}}),t.parent.$obj.on("filterComplete.cbp",function(){c()}),c()})},e.prototype.destroy=function(){this.loadMore.off(".cbp"),n.private.loadMoreScroll&&n.private.loadMoreScroll.destroyEvent(this)},n.plugins.loadMore=function(t){var i=t.options.plugins;return t.options.loadMore&&(i.loadMore||(i.loadMore={}),i.loadMore.element=t.options.loadMore),t.options.loadMoreAction&&(i.loadMore||(i.loadMore={}),i.loadMore.action=t.options.loadMoreAction),i.loadMore&&i.loadMore.selector!==void 0&&(i.loadMore.element=i.loadMore.selector,delete i.loadMore.selector),i.loadMore&&i.loadMore.element?new e(t):null}}(jQuery,window),function(a,v,y,k){var d=a.fn.cubeportfolio.constructor,n={delay:0},e={init:function(o,r){var l,p=this;if(p.cubeportfolio=o,p.type=r,p.isOpen=!1,p.options=p.cubeportfolio.options,r==="lightbox"&&(p.cubeportfolio.registerEvent("resizeWindow",function(){p.resizeImage()}),p.localOptions=a.extend({},n,p.cubeportfolio.options.plugins.lightbox)),r!=="singlePageInline"){if(p.createMarkup(),r==="singlePage"){if(p.cubeportfolio.registerEvent("resizeWindow",function(){if(p.options.singlePageStickyNavigation){var m=p.contentWrap[0].clientWidth;m>0&&(p.navigationWrap.width(m),p.navigation.width(m))}}),p.options.singlePageDeeplinking){if(p.url=location.href,p.url.slice(-1)==="#"&&(p.url=p.url.slice(0,-1)),b=(h=p.url.split("#cbp=")).shift(),a.each(h,function(m,S){if(p.cubeportfolio.blocksOn.each(function(I,C){var A=a(C).find(p.options.singlePageDelegate+'[href="'+S+'"]');if(A.length)return l=A,!1}),l)return!1}),l){p.url=b;var f=l,g=f.attr("data-cbp-singlePage"),u=[];g?u=f.closest(a(".cbp-item")).find('[data-cbp-singlePage="'+g+'"]'):p.cubeportfolio.blocksOn.each(function(m,S){var I=a(S);I.not(".cbp-item-off")&&I.find(p.options.singlePageDelegate).each(function(C,A){a(A).attr("data-cbp-singlePage")||u.push(A)})}),p.openSinglePage(u,l[0])}else if(h.length){var w=y.createElement("a");w.setAttribute("href",h[0]),p.openSinglePage([w],w)}}p.localOptions=a.extend({},n,p.cubeportfolio.options.plugins.singlePage)}}else{if(p.height=0,p.createMarkupSinglePageInline(),p.cubeportfolio.registerEvent("resizeGrid",function(){p.isOpen&&p.close()}),p.options.singlePageInlineDeeplinking){p.url=location.href,p.url.slice(-1)==="#"&&(p.url=p.url.slice(0,-1));var h,b=(h=p.url.split("#cbpi=")).shift();a.each(h,function(m,S){if(p.cubeportfolio.blocksOn.each(function(I,C){var A=a(C).find(p.options.singlePageInlineDelegate+'[href="'+S+'"]');if(A.length)return l=A,!1}),l)return!1}),l&&p.cubeportfolio.registerEvent("initFinish",function(){p.openSinglePageInline(p.cubeportfolio.blocksOn,l[0])},!0)}p.localOptions=a.extend({},n,p.cubeportfolio.options.plugins.singlePageInline)}},createMarkup:function(){var o=this,r="";if(o.type==="singlePage"&&o.options.singlePageAnimation!=="left"&&(r=" cbp-popup-singlePage-"+o.options.singlePageAnimation),o.wrap=a("<div/>",{class:"cbp-popup-wrap cbp-popup-"+o.type+r,"data-action":o.type==="lightbox"?"close":""}).on("click.cbp",function(g){if(!o.stopEvents){var u=a(g.target).attr("data-action");o[u]&&(o[u](),g.preventDefault())}}),o.type==="singlePage"?(o.contentWrap=a("<div/>",{class:"cbp-popup-content-wrap"}).appendTo(o.wrap),d.private.browser==="ios"&&o.contentWrap.css("overflow","auto"),o.content=a("<div/>",{class:"cbp-popup-content"}).appendTo(o.contentWrap)):o.content=a("<div/>",{class:"cbp-popup-content"}).appendTo(o.wrap),a("<div/>",{class:"cbp-popup-loadingBox"}).appendTo(o.wrap),d.private.browser==="ie8"&&(o.bg=a("<div/>",{class:"cbp-popup-ie8bg","data-action":o.type==="lightbox"?"close":""}).appendTo(o.wrap)),o.type==="singlePage"&&o.options.singlePageStickyNavigation===!1?o.navigationWrap=a("<div/>",{class:"cbp-popup-navigation-wrap"}).appendTo(o.contentWrap):o.navigationWrap=a("<div/>",{class:"cbp-popup-navigation-wrap"}).appendTo(o.wrap),o.navigation=a("<div/>",{class:"cbp-popup-navigation"}).appendTo(o.navigationWrap),o.closeButton=a("<div/>",{class:"cbp-popup-close",title:"Close (Esc arrow key)","data-action":"close"}).appendTo(o.navigation),o.nextButton=a("<div/>",{class:"cbp-popup-next",title:"Next (Right arrow key)","data-action":"next"}).appendTo(o.navigation),o.prevButton=a("<div/>",{class:"cbp-popup-prev",title:"Previous (Left arrow key)","data-action":"prev"}).appendTo(o.navigation),o.type==="singlePage"){o.options.singlePageCounter&&(o.counter=a(o.options.singlePageCounter).appendTo(o.navigation),o.counter.text("")),o.content.on("click.cbp",o.options.singlePageDelegate,function(g){g.preventDefault();var u,w,h=o.dataArray.length,b=this.getAttribute("href");for(u=0;u<h;u++)if(o.dataArray[u].url===b){w=u;break}if(w===void 0){var m=y.createElement("a");m.setAttribute("href",b),o.dataArray=[{url:b,element:m}],o.counterTotal=1,o.nextButton.hide(),o.prevButton.hide(),o.singlePageJumpTo(0)}else o.singlePageJumpTo(w-o.current)});var l=!1;try{var p=Object.defineProperty({},"passive",{get:function(){l={passive:!0}}});v.addEventListener("testPassive",null,p),v.removeEventListener("testPassive",null,p)}catch{}var f="onwheel"in y.createElement("div")?"wheel":"mousewheel";o.contentWrap[0].addEventListener(f,function(g){g.stopImmediatePropagation()},l)}a(y).on("keydown.cbp",function(g){o.isOpen&&(o.stopEvents||(i&&g.stopImmediatePropagation(),g.keyCode===37?o.prev():g.keyCode===39?o.next():g.keyCode===27&&o.close()))})},createMarkupSinglePageInline:function(){var o=this;o.wrap=a("<div/>",{class:"cbp-popup-singlePageInline"}).on("click.cbp",function(r){if(!o.stopEvents){var l=a(r.target).attr("data-action");l&&o[l]&&(o[l](),r.preventDefault())}}),o.content=a("<div/>",{class:"cbp-popup-content"}).appendTo(o.wrap),o.navigation=a("<div/>",{class:"cbp-popup-navigation"}).appendTo(o.wrap),o.closeButton=a("<div/>",{class:"cbp-popup-close",title:"Close (Esc arrow key)","data-action":"close"}).appendTo(o.navigation)},destroy:function(){var o=this,r=a("body");a(y).off("keydown.cbp"),r.off("click.cbp",o.options.lightboxDelegate),r.off("click.cbp",o.options.singlePageDelegate),o.content.off("click.cbp",o.options.singlePageDelegate),o.cubeportfolio.$obj.off("click.cbp",o.options.singlePageInlineDelegate),o.cubeportfolio.$obj.off("click.cbp",o.options.lightboxDelegate),o.cubeportfolio.$obj.off("click.cbp",o.options.singlePageDelegate),o.cubeportfolio.$obj.removeClass("cbp-popup-isOpening"),o.cubeportfolio.$obj.find(".cbp-item").removeClass("cbp-singlePageInline-active"),o.wrap.remove()},openLightbox:function(o,r){var l,p,f=this,g=0,u=[];if(!f.isOpen){if(i=!0,f.isOpen=!0,f.stopEvents=!1,f.dataArray=[],f.current=null,(l=r.getAttribute("href"))===null)throw new Error("HEI! Your clicked element doesn't have a href attribute.");a.each(o,function(w,h){var b,m=h.getAttribute("href"),S=m,I="isImage";if(a.inArray(m,u)===-1){if(l===m)f.current=g;else if(!f.options.lightboxGallery)return;if(/youtu\.?be/i.test(m)){var C=m.lastIndexOf("v=")+2;C===1&&(C=m.lastIndexOf("/")+1),b=m.substring(C),/autoplay=/i.test(b)||(b+="&autoplay=1"),S="//www.youtube.com/embed/"+(b=b.replace(/\?|&/,"?")),I="isYoutube"}else/vimeo\.com/i.test(m)?(b=m.substring(m.lastIndexOf("/")+1),/autoplay=/i.test(b)||(b+="&autoplay=1"),S="//player.vimeo.com/video/"+(b=b.replace(/\?|&/,"?")),I="isVimeo"):/www\.ted\.com/i.test(m)?(S="http://embed.ted.com/talks/"+m.substring(m.lastIndexOf("/")+1)+".html",I="isTed"):/soundcloud\.com/i.test(m)?(S=m,I="isSoundCloud"):/(\.mp4)|(\.ogg)|(\.ogv)|(\.webm)/i.test(m)?(S=m.indexOf("|")!==-1?m.split("|"):m.split("%7C"),I="isSelfHostedVideo"):/\.mp3$/i.test(m)&&(S=m,I="isSelfHostedAudio");f.dataArray.push({src:S,title:h.getAttribute(f.options.lightboxTitleSrc),type:I}),g++}u.push(m)}),f.counterTotal=f.dataArray.length,f.counterTotal===1?(f.nextButton.hide(),f.prevButton.hide(),f.dataActionImg=""):(f.nextButton.show(),f.prevButton.show(),f.dataActionImg='data-action="next"'),f.wrap.appendTo(y.body),f.scrollTop=a(v).scrollTop(),f.originalStyle=a("html").attr("style"),a("html").css({overflow:"hidden",marginRight:v.innerWidth-a(y).width()}),f.wrap.addClass("cbp-popup-transitionend"),f.wrap.show(),p=f.dataArray[f.current],f[p.type](p)}},openSinglePage:function(o,r){var l,p=this,f=0,g=[];if(!p.isOpen){if(p.cubeportfolio.singlePageInline&&p.cubeportfolio.singlePageInline.isOpen&&p.cubeportfolio.singlePageInline.close(),p.isOpen=!0,p.stopEvents=!1,p.dataArray=[],p.current=null,(l=r.getAttribute("href"))===null)throw new Error("HEI! Your clicked element doesn't have a href attribute.");if(a.each(o,function(w,h){var b=h.getAttribute("href");a.inArray(b,g)===-1&&(l===b&&(p.current=f),p.dataArray.push({url:b,element:h}),f++),g.push(b)}),p.counterTotal=p.dataArray.length,p.counterTotal===1?(p.nextButton.hide(),p.prevButton.hide()):(p.nextButton.show(),p.prevButton.show()),p.wrap.appendTo(y.body),p.scrollTop=a(v).scrollTop(),p.contentWrap.scrollTop(0),p.wrap.show(),p.finishOpen=2,p.navigationMobile=a(),p.wrap.one(d.private.transitionend,function(){a("html").css({overflow:"hidden",marginRight:v.innerWidth-a(y).width()}),p.wrap.addClass("cbp-popup-transitionend"),p.options.singlePageStickyNavigation&&(p.wrap.addClass("cbp-popup-singlePage-sticky"),p.navigationWrap.width(p.contentWrap[0].clientWidth)),p.finishOpen--,p.finishOpen<=0&&p.updateSinglePageIsOpen.call(p)}),d.private.browser!=="ie8"&&d.private.browser!=="ie9"||(a("html").css({overflow:"hidden",marginRight:v.innerWidth-a(y).width()}),p.wrap.addClass("cbp-popup-transitionend"),p.options.singlePageStickyNavigation&&(p.navigationWrap.width(p.contentWrap[0].clientWidth),setTimeout(function(){p.wrap.addClass("cbp-popup-singlePage-sticky")},1e3)),p.finishOpen--),p.wrap.addClass("cbp-popup-loading"),p.wrap.offset(),p.wrap.addClass("cbp-popup-singlePage-open"),p.options.singlePageDeeplinking&&(p.url=p.url.split("#cbp=")[0],location.href=p.url+"#cbp="+p.dataArray[p.current].url),a.isFunction(p.options.singlePageCallback)&&p.options.singlePageCallback.call(p,p.dataArray[p.current].url,p.dataArray[p.current].element),d.private.browser==="ios"){var u=p.contentWrap[0];u.addEventListener("touchstart",function(){var w=u.scrollTop,h=u.scrollHeight,b=w+u.offsetHeight;w===0?u.scrollTop=1:b===h&&(u.scrollTop=w-1)})}}},openSinglePageInline:function(o,r,l){var p,f,g,u=this;if(l=l||!1,u.fromOpen=l,u.storeBlocks=o,u.storeCurrentBlock=r,u.isOpen)return f=u.cubeportfolio.blocksOn.index(a(r).closest(".cbp-item")),void(u.dataArray[u.current].url!==r.getAttribute("href")||u.current!==f?u.cubeportfolio.singlePageInline.close("open",{blocks:o,currentBlock:r,fromOpen:!0}):u.close());if(u.isOpen=!0,u.stopEvents=!1,u.dataArray=[],u.current=null,(p=r.getAttribute("href"))===null)throw new Error("HEI! Your clicked element doesn't have a href attribute.");if(g=a(r).closest(".cbp-item")[0],o.each(function(S,I){g===I&&(u.current=S)}),u.dataArray[u.current]={url:p,element:r},a(u.dataArray[u.current].element).parents(".cbp-item").addClass("cbp-singlePageInline-active"),u.counterTotal=o.length,u.wrap.insertBefore(u.cubeportfolio.wrapper),u.topDifference=0,u.options.singlePageInlinePosition==="top")u.blocksToMove=o,u.top=0;else if(u.options.singlePageInlinePosition==="bottom")u.blocksToMove=a(),u.top=u.cubeportfolio.height;else if(u.options.singlePageInlinePosition==="above"){var w=a(o[u.current]),h=(b=w.data("cbp").top)+w.height();u.top=b,u.blocksToMove=a(),o.each(function(S,I){var C=a(I),A=C.data("cbp").top,P=A+C.height();P<=b||(A>=b&&(u.blocksToMove=u.blocksToMove.add(I)),A<b&&P>b&&(u.top=P+u.options.gapHorizontal,P-b>u.topDifference&&(u.topDifference=P-b+u.options.gapHorizontal)))}),u.top=Math.max(u.top-u.options.gapHorizontal,0)}else{var b;w=a(o[u.current]),h=(b=w.data("cbp").top)+w.height(),u.top=h,u.blocksToMove=a(),o.each(function(S,I){var C=a(I),A=C.height(),P=C.data("cbp").top,x=P+A;x<=h||(P>=h-A/2?u.blocksToMove=u.blocksToMove.add(I):x>h&&P<h&&(x>u.top&&(u.top=x),x-h>u.topDifference&&(u.topDifference=x-h)))})}if(u.wrap[0].style.height=u.wrap.outerHeight(!0)+"px",u.deferredInline=a.Deferred(),u.options.singlePageInlineInFocus){u.scrollTop=a(v).scrollTop();var m=u.cubeportfolio.$obj.offset().top+u.top-100;u.scrollTop!==m?a("html,body").animate({scrollTop:m},350).promise().then(function(){u.resizeSinglePageInline(),u.deferredInline.resolve()}):(u.resizeSinglePageInline(),u.deferredInline.resolve())}else u.resizeSinglePageInline(),u.deferredInline.resolve();u.cubeportfolio.$obj.addClass("cbp-popup-singlePageInline-open"),u.wrap.css({top:u.top}),u.options.singlePageInlineDeeplinking&&(u.url=u.url.split("#cbpi=")[0],location.href=u.url+"#cbpi="+u.dataArray[u.current].url),a.isFunction(u.options.singlePageInlineCallback)&&u.options.singlePageInlineCallback.call(u,u.dataArray[u.current].url,u.dataArray[u.current].element)},resizeSinglePageInline:function(){var o=this;o.height=o.top===0||o.top===o.cubeportfolio.height?o.wrap.outerHeight(!0):o.wrap.outerHeight(!0)-o.options.gapHorizontal,o.height+=o.topDifference,o.storeBlocks.each(function(r,l){d.private.modernBrowser?l.style[d.private.transform]="":l.style.marginTop=""}),o.blocksToMove.each(function(r,l){d.private.modernBrowser?l.style[d.private.transform]="translate3d(0px, "+o.height+"px, 0)":l.style.marginTop=o.height+"px"}),o.cubeportfolio.obj.style.height=o.cubeportfolio.height+o.height+"px"},revertResizeSinglePageInline:function(){this.deferredInline=a.Deferred(),this.storeBlocks.each(function(o,r){d.private.modernBrowser?r.style[d.private.transform]="":r.style.marginTop=""}),this.cubeportfolio.obj.style.height=this.cubeportfolio.height+"px"},appendScriptsToWrap:function(o){var r=this,l=0,p=function(f){var g=y.createElement("script"),u=f.src;g.type="text/javascript",g.readyState?g.onreadystatechange=function(){g.readyState!="loaded"&&g.readyState!="complete"||(g.onreadystatechange=null,o[++l]&&p(o[l]))}:g.onload=function(){o[++l]&&p(o[l])},u?g.src=u:g.text=f.text,r.content[0].appendChild(g)};p(o[0])},updateSinglePage:function(o,r,l){var p,f=this;f.content.addClass("cbp-popup-content").removeClass("cbp-popup-content-basic"),l===!1&&f.content.removeClass("cbp-popup-content").addClass("cbp-popup-content-basic"),f.counter&&(p=a(f.getCounterMarkup(f.options.singlePageCounter,f.current+1,f.counterTotal)),f.counter.text(p.text())),f.fromAJAX={html:o,scripts:r},f.finishOpen--,f.finishOpen<=0&&f.updateSinglePageIsOpen.call(f)},updateSinglePageIsOpen:function(){var o,r=this;r.wrap.addClass("cbp-popup-ready"),r.wrap.removeClass("cbp-popup-loading"),r.content.html(r.fromAJAX.html),r.fromAJAX.scripts&&r.appendScriptsToWrap(r.fromAJAX.scripts),r.fromAJAX={},r.cubeportfolio.$obj.trigger("updateSinglePageStart.cbp"),(o=r.content.find(".cbp-slider")).length?(o.find(".cbp-slider-item").addClass("cbp-item"),r.slider=o.cubeportfolio({layoutMode:"slider",mediaQueries:[{width:1,cols:1}],gapHorizontal:0,gapVertical:0,caption:"",coverRatio:""})):r.slider=null,r.checkForSocialLinks(r.content),r.cubeportfolio.$obj.trigger("updateSinglePageComplete.cbp")},checkForSocialLinks:function(o){this.createFacebookShare(o.find(".cbp-social-fb")),this.createTwitterShare(o.find(".cbp-social-twitter")),this.createGooglePlusShare(o.find(".cbp-social-googleplus")),this.createPinterestShare(o.find(".cbp-social-pinterest"))},createFacebookShare:function(o){o.length&&!o.attr("onclick")&&o.attr("onclick","window.open('http://www.facebook.com/sharer.php?u="+encodeURIComponent(v.location.href)+"', '_blank', 'top=100,left=100,toolbar=0,status=0,width=620,height=400'); return false;")},createTwitterShare:function(o){o.length&&!o.attr("onclick")&&o.attr("onclick","window.open('https://twitter.com/intent/tweet?source="+encodeURIComponent(v.location.href)+"&text="+encodeURIComponent(y.title)+"', '_blank', 'top=100,left=100,toolbar=0,status=0,width=620,height=300'); return false;")},createGooglePlusShare:function(o){o.length&&!o.attr("onclick")&&o.attr("onclick","window.open('https://plus.google.com/share?url="+encodeURIComponent(v.location.href)+"', '_blank', 'top=100,left=100,toolbar=0,status=0,width=620,height=450'); return false;")},createPinterestShare:function(o){if(o.length&&!o.attr("onclick")){var r="",l=this.content.find("img")[0];l&&(r=l.src),o.attr("onclick","window.open('http://pinterest.com/pin/create/button/?url="+encodeURIComponent(v.location.href)+"&media="+r+"', '_blank', 'top=100,left=100,toolbar=0,status=0,width=620,height=400'); return false;")}},updateSinglePageInline:function(o,r){var l=this;l.content.html(o),r&&l.appendScriptsToWrap(r),l.cubeportfolio.$obj.trigger("updateSinglePageInlineStart.cbp"),l.localOptions.delay!==0?setTimeout(function(){l.singlePageInlineIsOpen.call(l)},l.localOptions.delay):l.singlePageInlineIsOpen.call(l)},singlePageInlineIsOpen:function(){var o=this;function r(){o.wrap.addClass("cbp-popup-singlePageInline-ready"),o.wrap[0].style.height="",o.resizeSinglePageInline(),o.cubeportfolio.$obj.trigger("updateSinglePageInlineComplete.cbp")}o.cubeportfolio.loadImages(o.wrap,function(){var l=o.content.find(".cbp-slider");l.length?(l.find(".cbp-slider-item").addClass("cbp-item"),l.one("initComplete.cbp",function(){o.deferredInline.done(r)}),l.on("pluginResize.cbp",function(){o.deferredInline.done(r)}),o.slider=l.cubeportfolio({layoutMode:"slider",displayType:"default",mediaQueries:[{width:1,cols:1}],gapHorizontal:0,gapVertical:0,caption:"",coverRatio:""})):(o.slider=null,o.deferredInline.done(r)),o.checkForSocialLinks(o.content)})},isImage:function(o){var r=this;new Image,r.tooggleLoading(!0),r.cubeportfolio.loadImages(a('<div><img src="'+o.src+'"></div>'),function(){r.updateImagesMarkup(o.src,o.title,r.getCounterMarkup(r.options.lightboxCounter,r.current+1,r.counterTotal)),r.tooggleLoading(!1)})},isVimeo:function(o){var r=this;r.updateVideoMarkup(o.src,o.title,r.getCounterMarkup(r.options.lightboxCounter,r.current+1,r.counterTotal))},isYoutube:function(o){var r=this;r.updateVideoMarkup(o.src,o.title,r.getCounterMarkup(r.options.lightboxCounter,r.current+1,r.counterTotal))},isTed:function(o){var r=this;r.updateVideoMarkup(o.src,o.title,r.getCounterMarkup(r.options.lightboxCounter,r.current+1,r.counterTotal))},isSoundCloud:function(o){var r=this;r.updateVideoMarkup(o.src,o.title,r.getCounterMarkup(r.options.lightboxCounter,r.current+1,r.counterTotal))},isSelfHostedVideo:function(o){var r=this;r.updateSelfHostedVideo(o.src,o.title,r.getCounterMarkup(r.options.lightboxCounter,r.current+1,r.counterTotal))},isSelfHostedAudio:function(o){var r=this;r.updateSelfHostedAudio(o.src,o.title,r.getCounterMarkup(r.options.lightboxCounter,r.current+1,r.counterTotal))},getCounterMarkup:function(o,r,l){if(!o.length)return"";var p={current:r,total:l};return o.replace(/\{\{current}}|\{\{total}}/gi,function(f){return p[f.slice(2,-2)]})},updateSelfHostedVideo:function(o,r,l){var p;this.wrap.addClass("cbp-popup-lightbox-isIframe");var f='<div class="cbp-popup-lightbox-iframe"><video controls="controls" height="auto" style="width: 100%">';for(p=0;p<o.length;p++)/(\.mp4)/i.test(o[p])?f+='<source src="'+o[p]+'" type="video/mp4">':/(\.ogg)|(\.ogv)/i.test(o[p])?f+='<source src="'+o[p]+'" type="video/ogg">':/(\.webm)/i.test(o[p])&&(f+='<source src="'+o[p]+'" type="video/webm">');f+='Your browser does not support the video tag.</video><div class="cbp-popup-lightbox-bottom">'+(r?'<div class="cbp-popup-lightbox-title">'+r+"</div>":"")+l+"</div></div>",this.content.html(f),this.wrap.addClass("cbp-popup-ready"),this.preloadNearbyImages()},updateSelfHostedAudio:function(o,r,l){this.wrap.addClass("cbp-popup-lightbox-isIframe");var p='<div class="cbp-popup-lightbox-iframe"><div class="cbp-misc-video"><audio controls="controls" height="auto" style="width: 75%"><source src="'+o+'" type="audio/mpeg">Your browser does not support the audio tag.</audio></div><div class="cbp-popup-lightbox-bottom">'+(r?'<div class="cbp-popup-lightbox-title">'+r+"</div>":"")+l+"</div></div>";this.content.html(p),this.wrap.addClass("cbp-popup-ready"),this.preloadNearbyImages()},updateVideoMarkup:function(o,r,l){this.wrap.addClass("cbp-popup-lightbox-isIframe");var p='<div class="cbp-popup-lightbox-iframe"><iframe src="'+o+'" frameborder="0" allowfullscreen scrolling="no"></iframe><div class="cbp-popup-lightbox-bottom">'+(r?'<div class="cbp-popup-lightbox-title">'+r+"</div>":"")+l+"</div></div>";this.content.html(p),this.wrap.addClass("cbp-popup-ready"),this.preloadNearbyImages()},updateImagesMarkup:function(o,r,l){var p=this;p.wrap.removeClass("cbp-popup-lightbox-isIframe");var f='<div class="cbp-popup-lightbox-figure"><img src="'+o+'" class="cbp-popup-lightbox-img" '+p.dataActionImg+' /><div class="cbp-popup-lightbox-bottom">'+(r?'<div class="cbp-popup-lightbox-title">'+r+"</div>":"")+l+"</div></div>";p.content.html(f),p.wrap.addClass("cbp-popup-ready"),p.resizeImage(),p.preloadNearbyImages()},next:function(){this[this.type+"JumpTo"](1)},prev:function(){this[this.type+"JumpTo"](-1)},lightboxJumpTo:function(o){var r,l=this;l.current=l.getIndex(l.current+o),l[(r=l.dataArray[l.current]).type](r)},singlePageJumpTo:function(o){var r=this;r.current=r.getIndex(r.current+o),a.isFunction(r.options.singlePageCallback)&&(r.resetWrap(),r.contentWrap.scrollTop(0),r.wrap.addClass("cbp-popup-loading"),r.slider&&d.private.resize.destroyEvent(a.data(r.slider[0],"cubeportfolio")),r.options.singlePageCallback.call(r,r.dataArray[r.current].url,r.dataArray[r.current].element),r.options.singlePageDeeplinking&&(location.href=r.url+"#cbp="+r.dataArray[r.current].url))},resetWrap:function(){var o=this;o.type==="singlePage"&&o.options.singlePageDeeplinking&&(location.href=o.url+"#"),o.type==="singlePageInline"&&o.options.singlePageInlineDeeplinking&&(location.href=o.url+"#")},getIndex:function(o){return(o%=this.counterTotal)<0&&(o=this.counterTotal+o),o},close:function(o,r){var l=this;function p(){l.slider&&d.private.resize.destroyEvent(a.data(l.slider[0],"cubeportfolio")),l.content.html(""),l.wrap.detach(),l.cubeportfolio.$obj.removeClass("cbp-popup-singlePageInline-open cbp-popup-singlePageInline-close"),l.isOpen=!1,o==="promise"&&a.isFunction(r.callback)&&r.callback.call(l.cubeportfolio)}function f(){var g=a(v).scrollTop();l.resetWrap(),a(v).scrollTop(g),l.options.singlePageInlineInFocus&&o!=="promise"?a("html,body").animate({scrollTop:l.scrollTop},350).promise().then(function(){p()}):p()}l.type==="singlePageInline"?o==="open"?(l.wrap.removeClass("cbp-popup-singlePageInline-ready"),a(l.dataArray[l.current].element).closest(".cbp-item").removeClass("cbp-singlePageInline-active"),l.isOpen=!1,l.openSinglePageInline(r.blocks,r.currentBlock,r.fromOpen)):(l.height=0,l.revertResizeSinglePageInline(),l.wrap.removeClass("cbp-popup-singlePageInline-ready"),l.cubeportfolio.$obj.addClass("cbp-popup-singlePageInline-close"),l.cubeportfolio.$obj.find(".cbp-item").removeClass("cbp-singlePageInline-active"),d.private.modernBrowser?l.wrap.one(d.private.transitionend,function(){f()}):f()):l.type==="singlePage"?(l.resetWrap(),l.stopScroll=!0,l.wrap.removeClass("cbp-popup-ready cbp-popup-transitionend cbp-popup-singlePage-open cbp-popup-singlePage-sticky"),a("html").css({overflow:"",marginRight:"",position:""}),a(v).scrollTop(l.scrollTop),d.private.browser!=="ie8"&&d.private.browser!=="ie9"||(l.slider&&d.private.resize.destroyEvent(a.data(l.slider[0],"cubeportfolio")),l.content.html(""),l.wrap.detach(),l.isOpen=!1),l.wrap.one(d.private.transitionend,function(){l.slider&&d.private.resize.destroyEvent(a.data(l.slider[0],"cubeportfolio")),l.content.html(""),l.wrap.detach(),l.isOpen=!1})):(i=!1,l.originalStyle?a("html").attr("style",l.originalStyle):a("html").css({overflow:"",marginRight:""}),a(v).scrollTop(l.scrollTop),l.slider&&d.private.resize.destroyEvent(a.data(l.slider[0],"cubeportfolio")),l.content.html(""),l.wrap.detach(),l.isOpen=!1)},tooggleLoading:function(o){this.stopEvents=o,this.wrap[o?"addClass":"removeClass"]("cbp-popup-loading")},resizeImage:function(){if(this.isOpen){var o=this.content.find("img"),r=o.parent(),l=a(v).height()-(r.outerHeight(!0)-r.height())-this.content.find(".cbp-popup-lightbox-bottom").outerHeight(!0);o.css("max-height",l+"px")}},preloadNearbyImages:function(){for(var o=this,r=[o.getIndex(o.current+1),o.getIndex(o.current+2),o.getIndex(o.current+3),o.getIndex(o.current-1),o.getIndex(o.current-2),o.getIndex(o.current-3)],l=r.length-1;l>=0;l--)o.dataArray[r[l]].type==="isImage"&&o.cubeportfolio.checkSrc(o.dataArray[r[l]])}};function t(o){var r=this;r.parent=o,o.options.lightboxShowCounter===!1&&(o.options.lightboxCounter=""),o.options.singlePageShowCounter===!1&&(o.options.singlePageCounter=""),o.registerEvent("initStartRead",function(){r.run()},!0)}var i=!1,s=!1,c=!1;t.prototype.run=function(){var o=this,r=o.parent,l=a(y.body);r.lightbox=null,r.options.lightboxDelegate&&!s&&(s=!0,r.lightbox=Object.create(e),r.lightbox.init(r,"lightbox"),l.on("click.cbp",r.options.lightboxDelegate,function(p){p.preventDefault();var f=a(this),g=f.attr("data-cbp-lightbox"),u=o.detectScope(f),w=u.data("cubeportfolio"),h=[];w?w.blocksOn.each(function(b,m){var S=a(m);S.not(".cbp-item-off")&&S.find(r.options.lightboxDelegate).each(function(I,C){g?a(C).attr("data-cbp-lightbox")===g&&h.push(C):h.push(C)})}):h=g?u.find(r.options.lightboxDelegate+"[data-cbp-lightbox="+g+"]"):u.find(r.options.lightboxDelegate),r.lightbox.openLightbox(h,f[0])})),r.singlePage=null,r.options.singlePageDelegate&&!c&&(c=!0,r.singlePage=Object.create(e),r.singlePage.init(r,"singlePage"),l.on("click.cbp",r.options.singlePageDelegate,function(p){p.preventDefault();var f=a(this),g=f.attr("data-cbp-singlePage"),u=o.detectScope(f),w=u.data("cubeportfolio"),h=[];w?w.blocksOn.each(function(b,m){var S=a(m);S.not(".cbp-item-off")&&S.find(r.options.singlePageDelegate).each(function(I,C){g?a(C).attr("data-cbp-singlePage")===g&&h.push(C):h.push(C)})}):h=g?u.find(r.options.singlePageDelegate+"[data-cbp-singlePage="+g+"]"):u.find(r.options.singlePageDelegate),r.singlePage.openSinglePage(h,f[0])})),r.singlePageInline=null,r.options.singlePageInlineDelegate&&(r.singlePageInline=Object.create(e),r.singlePageInline.init(r,"singlePageInline"),r.$obj.on("click.cbp",r.options.singlePageInlineDelegate,function(p){p.preventDefault();var f=a.data(this,"cbp-locked"),g=a.data(this,"cbp-locked",+new Date);(!f||g-f>300)&&r.singlePageInline.openSinglePageInline(r.blocksOn,this)}))},t.prototype.detectScope=function(o){var r,l,p;return(r=o.closest(".cbp-popup-singlePageInline")).length?(p=o.closest(".cbp",r[0])).length?p:r:(l=o.closest(".cbp-popup-singlePage")).length?(p=o.closest(".cbp",l[0])).length?p:l:(p=o.closest(".cbp")).length?p:a(y.body)},t.prototype.destroy=function(){var o=this.parent;a(y.body).off("click.cbp"),s=!1,c=!1,o.lightbox&&o.lightbox.destroy(),o.singlePage&&o.singlePage.destroy(),o.singlePageInline&&o.singlePageInline.destroy()},d.plugins.popUp=function(o){return new t(o)}}(jQuery,window,document),function(a,v,y,k){var d=a.fn.cubeportfolio.constructor;function n(e){var t=this;t.parent=e,t.searchInput=a(e.options.search),t.searchInput.each(function(s,c){var o=c.getAttribute("data-search");o||(o="*"),a.data(c,"searchData",{value:c.value,el:o})});var i=null;t.searchInput.on("keyup.cbp paste.cbp",function(s){s.preventDefault();var c=a(this);clearTimeout(i),i=setTimeout(function(){t.runEvent.call(t,c)},350)}),t.searchNothing=t.searchInput.siblings(".cbp-search-nothing").detach(),t.searchNothingHeight=null,t.searchNothingHTML=t.searchNothing.html(),t.searchInput.siblings(".cbp-search-icon").on("click.cbp",function(s){s.preventDefault(),t.runEvent.call(t,a(this).prev().val(""))})}n.prototype.runEvent=function(e){var t=this,i=e.val(),s=e.data("searchData"),c=new RegExp(i,"i");s.value===i||t.parent.isAnimating||(s.value=i,i.length>0?e.attr("value",i):e.removeAttr("value"),t.parent.$obj.cubeportfolio("filter",function(o){var r=o.filter(function(p,f){if(a(f).find(s.el).text().search(c)>-1)return!0});if(r.length===0&&t.searchNothing.length){var l=t.searchNothingHTML.replace("{{query}}",i);t.searchNothing.html(l),t.searchNothing.appendTo(t.parent.$obj),t.searchNothingHeight===null&&(t.searchNothingHeight=t.searchNothing.outerHeight(!0)),t.parent.registerEvent("resizeMainContainer",function(){t.parent.height=t.parent.height+t.searchNothingHeight,t.parent.obj.style.height=t.parent.height+"px"},!0)}else t.searchNothing.detach();return t.parent.triggerEvent("resetFiltersVisual"),r},function(){e.trigger("keyup.cbp")}))},n.prototype.destroy=function(){this.searchInput.off(".cbp"),this.searchInput.next(".cbp-search-icon").off(".cbp"),this.searchInput.each(function(e,t){a.removeData(t)})},d.plugins.search=function(e){return e.options.search===""?null:new n(e)}}(jQuery),function(a,v,y,k){var d={pagination:"",paginationClass:"cbp-pagination-active"},n=a.fn.cubeportfolio.constructor;function e(t){var i=this;i.parent=t,i.options=a.extend({},d,i.parent.options.plugins.slider);var s=a(i.options.pagination);s.length>0&&(i.parent.customPagination=s,i.parent.customPaginationItems=s.children(),i.parent.customPaginationClass=i.options.paginationClass,i.parent.customPaginationItems.on("click.cbp",function(c){c.preventDefault(),c.stopImmediatePropagation(),c.stopPropagation(),i.parent.sliderStopEvents||i.parent.jumpToSlider(a(this))})),i.parent.registerEvent("gridAdjust",function(){i.sliderMarkup.call(i.parent),i.parent.registerEvent("gridAdjust",function(){i.updateSlider.call(i.parent)})},!0)}e.prototype.sliderMarkup=function(){var t=this;t.sliderStopEvents=!1,t.sliderActive=0,t.$obj.one("initComplete.cbp",function(){t.$obj.addClass("cbp-mode-slider")}),t.nav=a("<div/>",{class:"cbp-nav"}),t.nav.on("click.cbp","[data-slider-action]",function(i){if(i.preventDefault(),i.stopImmediatePropagation(),i.stopPropagation(),!t.sliderStopEvents){var s=a(this),c=s.attr("data-slider-action");t[c+"Slider"]&&t[c+"Slider"](s)}}),t.options.showNavigation&&(t.controls=a("<div/>",{class:"cbp-nav-controls"}),t.navPrev=a("<div/>",{class:"cbp-nav-prev","data-slider-action":"prev"}).appendTo(t.controls),t.navNext=a("<div/>",{class:"cbp-nav-next","data-slider-action":"next"}).appendTo(t.controls),t.controls.appendTo(t.nav)),t.options.showPagination&&(t.navPagination=a("<div/>",{class:"cbp-nav-pagination"}).appendTo(t.nav)),(t.controls||t.navPagination)&&t.nav.appendTo(t.$obj),t.updateSliderPagination(),t.options.auto&&(t.options.autoPauseOnHover&&(t.mouseIsEntered=!1,t.$obj.on("mouseenter.cbp",function(i){t.mouseIsEntered=!0,t.stopSliderAuto()}).on("mouseleave.cbp",function(i){t.mouseIsEntered=!1,t.startSliderAuto()})),t.startSliderAuto()),t.options.drag&&n.private.modernBrowser&&t.dragSlider()},e.prototype.updateSlider=function(){this.updateSliderPosition(),this.updateSliderPagination()},e.prototype.destroy=function(){var t=this;t.parent.customPaginationItems&&t.parent.customPaginationItems.off(".cbp"),(t.parent.controls||t.parent.navPagination)&&(t.parent.nav.off(".cbp"),t.parent.nav.remove())},n.plugins.slider=function(t){return t.options.layoutMode!=="slider"?null:new e(t)}}(jQuery),function(a,v,y,k){var d={element:""},n=a.fn.cubeportfolio.constructor;function e(t){var i=this;i.parent=t,i.options=a.extend({},d,i.parent.options.plugins.sort),i.element=a(i.options.element),i.element.length!==0&&(i.sort="",i.sortBy="string:asc",i.element.on("click.cbp",".cbp-sort-item",function(s){s.preventDefault(),i.target=s.target,a(i.target).hasClass("cbp-l-dropdown-item--active")||t.isAnimating||(i.processSort(),t.$obj.cubeportfolio("filter",t.defaultFilter))}),t.registerEvent("triggerSort",function(){i.target&&(i.processSort(),t.$obj.cubeportfolio("filter",t.defaultFilter))}),i.dropdownWrap=i.element.find(".cbp-l-dropdown-wrap").on({"mouseover.cbp":function(){a(this).addClass("cbp-l-dropdown-wrap--open")},"mouseleave.cbp":function(){a(this).removeClass("cbp-l-dropdown-wrap--open")}}),i.dropdownHeader=i.element.find(".cbp-l-dropdown-header"))}e.prototype.processSort=function(){var t=this,i=t.parent,s=(g=t.target).hasAttribute("data-sort"),c=g.hasAttribute("data-sortBy");if(s&&c)t.sort=g.getAttribute("data-sort"),t.sortBy=g.getAttribute("data-sortBy");else if(s)t.sort=g.getAttribute("data-sort");else{if(!c)return;t.sortBy=g.getAttribute("data-sortBy")}var o=t.sortBy.split(":"),r="string",l=1;if(o[0]==="int"?r="int":o[0]==="float"&&(r="float"),o[1]==="desc"&&(l=-1),t.sort){var p=[];i.blocks.each(function(w,h){var b=a(h),m=b.find(t.sort).text();r==="int"&&(m=parseInt(m,10)),r==="float"&&(m=parseFloat(m,10)),p.push({sortText:m,data:b.data("cbp")})}),p.sort(function(w,h){var b=w.sortText,m=h.sortText;return r==="string"&&(b=b.toUpperCase(),m=m.toUpperCase()),b<m?-l:b>m?l:0}),a.each(p,function(w,h){h.data.index=w})}else{var f=[];l===-1&&(i.blocks.each(function(w,h){f.push(a(h).data("cbp").indexInitial)}),f.sort(function(w,h){return h-w})),i.blocks.each(function(w,h){var b=a(h).data("cbp");b.index=l===-1?f[b.indexInitial]:b.indexInitial})}i.sortBlocks(i.blocks,"index"),t.dropdownWrap.trigger("mouseleave.cbp");var g=a(t.target),u=a(t.target).parent();u.hasClass("cbp-l-dropdown-list")?(t.dropdownHeader.html(g.html()),g.addClass("cbp-l-dropdown-item--active").siblings(".cbp-l-dropdown-item").removeClass("cbp-l-dropdown-item--active")):u.hasClass("cbp-l-direction")&&(g.index()===0?u.addClass("cbp-l-direction--second").removeClass("cbp-l-direction--first"):u.addClass("cbp-l-direction--first").removeClass("cbp-l-direction--second"))},e.prototype.destroy=function(){this.element.off("click.cbp")},n.plugins.sort=function(t){return new e(t)}}(jQuery);