!function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var i={};e.m=t,e.c=i,e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,i){if(1&i&&(t=e(t)),8&i)return t;if(4&i&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&i&&"string"!=typeof t)for(var o in t)e.d(n,o,function(e){return t[e]}.bind(null,o));return n},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=5)}([function(t,e){t.exports=jQuery},function(t,e,i){"use strict";var n,o,r;"function"==typeof Symbol&&Symbol.iterator,window,o=[i(2),i(3)],void 0!==(r="function"==typeof(n=function(t,e){function i(t){this.isotope=t,t&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}var n=i.prototype;return["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout","_getOption"].forEach(function(t){n[t]=function(){return e.prototype[t].apply(this.isotope,arguments)}}),n.needsVerticalResizeLayout=function(){var e=t(this.isotope.element);return this.isotope.size&&e&&e.innerHeight!=this.isotope.size.innerHeight},n._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},n.getColumnWidth=function(){this.getSegmentSize("column","Width")},n.getRowHeight=function(){this.getSegmentSize("row","Height")},n.getSegmentSize=function(t,e){var i=t+e,n="outer"+e;if(this._getMeasurement(i,n),!this[i]){var o=this.getFirstItemSize();this[i]=o&&o[n]||this.isotope.size["inner"+e]}},n.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},n.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},n.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function o(){i.apply(this,arguments)}return o.prototype=Object.create(n),o.prototype.constructor=o,e&&(o.options=e),o.prototype.namespace=t,i.modes[t]=o,o},i})?n.apply(e,o):n)&&(t.exports=r)},function(t,e,i){var n; /*! * getSize v2.0.2 * measure size of elements * MIT license */!function(o,r){"use strict";void 0!==(n=function(){return function(){function t(t){var e=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(e)&&e}function e(t){var e=getComputedStyle(t);return e||r("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),e}function i(){if(!l){l=!0;var i=document.createElement("div");i.style.width="200px",i.style.padding="1px 2px 3px 4px",i.style.borderStyle="solid",i.style.borderWidth="1px 2px 3px 4px",i.style.boxSizing="border-box";var r=document.body||document.documentElement;r.appendChild(i);var s=e(i);n.isBoxSizeOuter=o=200==t(s.width),r.removeChild(i)}}function n(n){if(i(),"string"==typeof n&&(n=document.querySelector(n)),n&&"object"==typeof n&&n.nodeType){var r=e(n);if("none"==r.display)return function(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e0?t("#envira-gallery-wrap-"+i.gallery_id).find("#"+i.video_id+" iframe"):t("#envira-gallery-wrap-"+i.gallery_id).find("#"+i.video_id+" video").length>0?t("#envira-gallery-wrap-"+i.gallery_id).find("#"+i.video_id+" video"):t("#envira-gallery-wrap-"+i.gallery_id).find("img#"+i.image_id))||""===n)return;if(t("#envira-gallery-wrap-"+i.gallery_id).find("div.envira-gallery-public").hasClass("envira-gallery-0-columns"))t(n).closest("div.envira-gallery-item-inner").find("div.envira-gallery-position-overlay").delay(100).show();else{t(n).closest("div.envira-gallery-item-inner").find("div.envira-gallery-position-overlay").delay(100).show();var o=t(n).closest("div.envira-gallery-item-inner").find(".envira-lazy").width(),r=i.naturalHeight/i.naturalWidth,s=i.naturalHeight/o;if(s=1?"floor":"ceil"](c/r),u=Math[u>=1?"floor":"ceil"](u/r),d=Math[d>=1?"floor":"ceil"](d/r),h.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();g=e.clientX-y.left,f=e.clientY-y.top}return e.deltaX=u,e.deltaY=d,e.deltaFactor=r,e.offsetX=g,e.offsetY=f,e.deltaMode=0,a.unshift(e,c,u,d),o&&clearTimeout(o),o=setTimeout(i,200),(t.event.dispatch||t.event.handle).apply(this,a)}}function i(){r=null}function n(t,e){return h.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120==0}var o,r,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],a="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(t.event.fixHooks)for(var c=s.length;c;)t.event.fixHooks[s[--c]]=t.event.mouseHooks;var h=t.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var i=a.length;i;)this.addEventListener(a[--i],e,!1);else this.onmousewheel=e;t.data(this,"mousewheel-line-height",h.getLineHeight(this)),t.data(this,"mousewheel-page-height",h.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var i=a.length;i;)this.removeEventListener(a[--i],e,!1);else this.onmousewheel=null;t.removeData(this,"mousewheel-line-height"),t.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var i=t(e),n=i["offsetParent"in t.fn?"offsetParent":"parent"]();return n.length||(n=t("body")),parseInt(n.css("fontSize"),10)||parseInt(i.css("fontSize"),10)||16},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})},void 0!==(r="function"==typeof n?n.apply(e,o):n)&&(t.exports=r)},function(t,e,i){"use strict"},function(t,e,i){"use strict";(function(t){ /*! * Justified Gallery - v3.6.2 * http://miromannino.github.io/Justified-Gallery/ * Copyright (c) 2016 Miro Mannino * Licensed under the MIT license. */ !function(t){function e(){return t("body").height()>t(window).height()}var i=function(e,i){this.settings=i,this.checkSettings(),this.imgAnalyzerTimeout=null,this.entries=null,this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0},this.lastAnalyzedIndex=-1,this.yield={every:2,flushed:0},this.border=i.border>=0?i.border:i.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.rows=0,this.spinner={phase:0,timeSlot:150,$el:t('
'),intervalId:null},this.checkWidthIntervalId=null,this.galleryWidth=e.width(),this.$gallery=e};i.prototype.getSuffix=function(t,e){var i,n;for(i=t>e?t:e,n=0;n img");return 0===e.length&&(e=t.find("> a > img")),0===e.length?null:e},i.prototype.captionFromEntry=function(t){var e=t.find(".caption");return 0===e.length?null:e},i.prototype.displayEntry=function(e,i,n,o,r,s){e.width(o),e.height(s),e.css("top",n),e.css("left",i);var a=this.imgFromEntry(e);if(null!==a){a.css("width",o),a.css("height",r),a.css("margin-left",-o/2),a.css("margin-top",-r/2);var l=a.attr("src"),c=this.newSrc(l,o,r);a.one("error",function(){a.attr("src",a.data("jg.originalSrc"))});var h=function(){l!==c&&a.attr("src",c)};"skipped"===e.data("jg.loaded")?this.onImageEvent(l,t.proxy(function(){this.showImg(e,h),e.data("jg.loaded",!0)},this)):this.showImg(e,h)}else this.showImg(e);this.displayEntryCaption(e)},i.prototype.displayEntryCaption=function(e){var i=this.imgFromEntry(e);if(null!==i&&this.settings.captions){var n=this.captionFromEntry(e);if(null===n){var o=i.attr("alt");this.isValidCaption(o)||(o=e.attr("title")),this.isValidCaption(o)&&(n=t('
'+o+"
"),e.append(n),e.data("jg.createdCaption",!0))}null!==n&&(this.settings.cssAnimation||n.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(e))}else this.removeCaptionEventsHandlers(e)},i.prototype.isValidCaption=function(t){return void 0!==t&&t.length>0},i.prototype.onEntryMouseEnterForCaption=function(e){var i=this.captionFromEntry(t(e.currentTarget));this.settings.cssAnimation?void 0!==i&&null!=i&&i.addClass("caption-visible").removeClass("caption-hidden"):void 0!==i&&null!=i&&i.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)},i.prototype.onEntryMouseLeaveForCaption=function(e){var i=this.captionFromEntry(t(e.currentTarget));this.settings.cssAnimation?void 0!==i&&null!=i&&i.removeClass("caption-visible").removeClass("caption-hidden"):void 0!==i&&null!=i&&i.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)},i.prototype.addCaptionEventsHandlers=function(e){var i=e.data("jg.captionMouseEvents");void 0===i&&(i={mouseenter:t.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:t.proxy(this.onEntryMouseLeaveForCaption,this)},e.on("mouseenter",void 0,void 0,i.mouseenter),e.on("mouseleave",void 0,void 0,i.mouseleave),e.data("jg.captionMouseEvents",i))},i.prototype.removeCaptionEventsHandlers=function(t){var e=t.data("jg.captionMouseEvents");void 0!==e&&(t.off("mouseenter",void 0,e.mouseenter),t.off("mouseleave",void 0,e.mouseleave),t.removeData("jg.captionMouseEvents"))},i.prototype.prepareBuildingRow=function(t){var e,i,n,o,r,s=!0,a=0,l=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,c=l/this.buildingRow.aspectRatio,h=this.settings.rowHeight,u=this.buildingRow.width/l>this.settings.justifyThreshold;if(t&&"hide"===this.settings.lastRow&&!u){for(e=0;e0&&(s=(h=(this.offY-this.border-this.settings.margins*this.rows)/this.rows)*this.buildingRow.aspectRatio/l>this.settings.justifyThreshold)),e=0;er)&&(a=r);return this.settings.fixedHeight&&a>this.settings.rowHeight&&(a=this.settings.rowHeight),this.buildingRow.height=a,s},i.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[],this.buildingRow.aspectRatio=0,this.buildingRow.width=0},i.prototype.flushRow=function(t){var e,i,n,o=this.settings,r=this.border;if(i=this.prepareBuildingRow(t),t&&"hide"===o.lastRow&&-1===i)this.clearBuildingRow();else{if(this.maxRowHeight.isPercentage?this.maxRowHeight.value*o.rowHeight0&&this.maxRowHeight.valuethis.settings.refreshSensitivity&&(this.galleryWidth=t,this.rewind(),this.startImgAnalyzer(!0)):(n=e(),this.galleryWidth=t)},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,e=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;e--)i=Math.floor(Math.random()*(e+1)),n=t[e],t[e]=t[i],t[i]=n;return this.insertToGallery(t),t},i.prototype.sortArray=function(t){return t.sort(this.settings.sort),this.insertToGallery(t),t},i.prototype.resetFilters=function(e){for(var i=0;i=this.yield.every))return void this.startImgAnalyzer(e);this.buildingRow.entriesBuff.push(n),this.buildingRow.aspectRatio+=r,this.buildingRow.width+=r*this.settings.rowHeight,this.lastAnalyzedIndex=i}else if("error"!==n.data("jg.loaded"))return}this.buildingRow.entriesBuff.length>0&&this.flushRow(!0),this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation(),this.stopImgAnalyzerStarter(),this.$gallery.trigger(e?"jg.resize":"jg.complete"),this.$gallery.height(this.galleryHeightToSet)},i.prototype.stopImgAnalyzerStarter=function(){this.yield.flushed=0,null!==this.imgAnalyzerTimeout&&clearTimeout(this.imgAnalyzerTimeout)},i.prototype.startImgAnalyzer=function(t){var e=this;this.stopImgAnalyzerStarter(),this.imgAnalyzerTimeout=setTimeout(function(){e.analyzeImages(t)},.001)},i.prototype.onImageEvent=function(e,i,n){if(i||n){var o=new Image,r=t(o);i&&r.one("load",function(){r.off("load error"),i(o)}),n&&r.one("error",function(){r.off("load error"),n(o)}),o.src=e}},i.prototype.init=function(){var e=!1,i=!1,n=this;t.each(this.entries,function(o,r){var s=t(r),a=n.imgFromEntry(s);if(s.addClass("jg-entry"),!0!==s.data("jg.loaded")&&"skipped"!==s.data("jg.loaded"))if(null!==n.settings.rel&&s.attr("rel",n.settings.rel),null!==n.settings.target&&s.attr("target",n.settings.target),null!==a){var l=n.extractImgSrcFromImage(a);if(a.attr("src",l),!1===n.settings.waitThumbnailsLoad){var c=parseFloat(a.attr("width")),h=parseFloat(a.attr("height"));if(!isNaN(c)&&!isNaN(h))return s.data("jg.width",c),s.data("jg.height",h),s.data("jg.loaded","skipped"),i=!0,n.startImgAnalyzer(!1),!0}s.data("jg.loaded",!1),e=!0,n.isSpinnerActive()||n.startLoadingSpinnerAnimation(),n.onImageEvent(l,function(t){s.data("jg.width",s.find(".envira-gallery-image").data("envira-width")),s.data("jg.height",s.find(".envira-gallery-image").data("envira-height")),s.data("jg.loaded",!0),n.startImgAnalyzer(!1)},function(){s.data("jg.loaded","error"),n.startImgAnalyzer(!1)})}else s.data("jg.loaded",!0),s.data("jg.width",s.width()|parseFloat(s.css("width"))|1),s.data("jg.height",s.height()|parseFloat(s.css("height"))|1)}),e||i||this.startImgAnalyzer(!1),this.checkWidth()},i.prototype.checkOrConvertNumber=function(e,i){if("string"===t.type(e[i])&&(e[i]=parseFloat(e[i])),"number"!==t.type(e[i]))throw i+" must be a number";if(isNaN(e[i]))throw"invalid number for "+i},i.prototype.checkSizeRangesSuffixes=function(){if("object"!==t.type(this.settings.sizeRangeSuffixes))throw"sizeRangeSuffixes must be defined and must be an object";var e=[];for(var i in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(i)&&e.push(i);for(var n={0:""},o=0;o0&&e.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(!1!==this.settings.sort&&!t.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(!1!==this.settings.filter&&!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 e in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(e)&&t.push(parseInt(e,10));return t.sort(function(t,e){return t>e?1:t=0?this.settings.border:this.settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges()},t.fn.justifiedGallery=function(e){return this.each(function(n,o){var r=t(o);r.addClass("envira-justified-gallery");var s=r.data("jg.controller");if(void 0===s){if(void 0!==e&&null!==e&&"object"!==t.type(e)){if("destroy"===e)return;throw"The argument must be an object"}s=new i(r,t.extend({},t.fn.justifiedGallery.defaults,e)),r.data("jg.controller",s)}else if("norewind"===e);else{if("destroy"===e)return void s.destroy();s.updateSettings(e),s.rewind()}s.updateEntries("norewind"===e)&&s.init()})},t.fn.justifiedGallery.defaults={sizeRangeSuffixes:{},thumbnailPath:void 0,rowHeight:120,maxRowHeight:-1,margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.9,fixedHeight:!1,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!1,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\\/]+$/,refreshTime:100,refreshSensitivity:0,randomize:!1,sort:!1,filter:!1,selector:"> a, > div:not(.spinner)"}}(t)}).call(this,i(0))},function(t,e,i){"use strict";(function(t){ /*! * Justified Gallery / Envira Extensions and Overrides - v3.6.2 * Copyright (c) 2016 David Bisset, Benjamin Rojas * Licensed under the MIT license. */ !function(t){var e=t.fn.justifiedGallery,i={};t.fn.enviraJustifiedGallery=function(){var n=e.apply(this,arguments);if(void 0!==(i=n.data("jg.controller")))return i.displayEntryCaption=function(e){var i=this.imgFromEntry(e);if(null!==i&&this.settings.captions){var n=this.captionFromEntry(e);if(null===n){var o=i.data("automatic-caption"),r="";void 0!==o&&"string"==typeof o&&(o=o.replace("<","<"),r=t("