(function(n){"use strict";function f(n){return new RegExp("(^|\\s+)"+n+"(\\s+|$)")}function e(n,u){var f=t(n,u)?r:i;f(n,u)}var t,i,r,u;"classList"in document.documentElement?(t=function(n,t){return n.classList.contains(t)},i=function(n,t){n.classList.add(t)},r=function(n,t){n.classList.remove(t)}):(t=function(n,t){return f(t).test(n.className)},i=function(n,i){t(n,i)||(n.className=n.className+" "+i)},r=function(n,t){n.className=n.className.replace(f(t)," ")}),u={hasClass:t,addClass:i,removeClass:r,toggleClass:e,has:t,add:i,remove:r,toggle:e},typeof define=="function"&&define.amd?define(u):n.classie=u})(window),function(n){"use strict";var t=document.documentElement,r=function(){},i,u;t.addEventListener?r=function(n,t,i){n.addEventListener(t,i,!1)}:t.attachEvent&&(r=function(t,i,r){t[i+r]=r.handleEvent?function(){var t=n.event;t.target=t.target||t.srcElement,r.handleEvent.call(r,t)}:function(){var i=n.event;i.target=i.target||i.srcElement,r.call(t,i)},t.attachEvent("on"+i,t[i+r])}),i=function(){},t.removeEventListener?i=function(n,t,i){n.removeEventListener(t,i,!1)}:t.detachEvent&&(i=function(n,t,i){n.detachEvent("on"+t,n[t+i]);try{delete n[t+i]}catch(r){n[t+i]=undefined}}),u={bind:r,unbind:i},typeof define=="function"&&define.amd?define(u):n.eventie=u}(this),function(n){"use strict";function t(n){typeof n=="function"&&(t.isReady?n():r.push(n))}function u(n){var o=n.type==="readystatechange"&&i.readyState!=="complete",u,f,e;if(!t.isReady&&!o)for(t.isReady=!0,u=0,f=r.length;u<f;u++)e=r[u],e()}function f(r){return r.bind(i,"DOMContentLoaded",u),r.bind(i,"readystatechange",u),r.bind(n,"load",u),t}var i=n.document,r=[];t.isReady=!1,typeof define=="function"&&define.amd?define(["eventie"],f):n.docReady=f(n.eventie)}(this),function(n){"use strict";function i(){}function r(n,t){if(u)return t.indexOf(n);for(var i=t.length;i--;)if(t[i]===n)return i;return-1}var t=i.prototype,u=Array.prototype.indexOf?!0:!1;t._getEvents=function(){return this._events||(this._events={})},t.getListeners=function(n){var t=this._getEvents(),r,i;if(typeof n=="object"){r={};for(i in t)t.hasOwnProperty(i)&&n.test(i)&&(r[i]=t[i])}else r=t[n]||(t[n]=[]);return r},t.getListenersAsObject=function(n){var t=this.getListeners(n),i;return t instanceof Array&&(i={},i[n]=t),i||t},t.addListener=function(n,t){var i=this.getListenersAsObject(n),u;for(u in i)i.hasOwnProperty(u)&&r(t,i[u])===-1&&i[u].push(t);return this},t.on=t.addListener,t.defineEvent=function(n){return this.getListeners(n),this},t.defineEvents=function(n){for(var t=0;t<n.length;t+=1)this.defineEvent(n[t]);return this},t.removeListener=function(n,t){var i=this.getListenersAsObject(n),f,u;for(u in i)i.hasOwnProperty(u)&&(f=r(t,i[u]),f!==-1&&i[u].splice(f,1));return this},t.off=t.removeListener,t.addListeners=function(n,t){return this.manipulateListeners(!1,n,t)},t.removeListeners=function(n,t){return this.manipulateListeners(!0,n,t)},t.manipulateListeners=function(n,t,i){var r,u,f=n?this.removeListener:this.addListener,e=n?this.removeListeners:this.addListeners;if(typeof t!="object"||t instanceof RegExp)for(r=i.length;r--;)f.call(this,t,i[r]);else for(r in t)t.hasOwnProperty(r)&&(u=t[r])&&(typeof u=="function"?f.call(this,r,u):e.call(this,r,u));return this},t.removeEvent=function(n){var r=typeof n,t=this._getEvents(),i;if(r==="string")delete t[n];else if(r==="object")for(i in t)t.hasOwnProperty(i)&&n.test(i)&&delete t[i];else delete this._events;return this},t.emitEvent=function(n,t){var i=this.getListenersAsObject(n),u,r,f;for(r in i)if(i.hasOwnProperty(r))for(u=i[r].length;u--;)f=t?i[r][u].apply(null,t):i[r][u](),f===!0&&this.removeListener(n,i[r][u]);return this},t.trigger=t.emitEvent,t.emit=function(n){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(n,t)},typeof define=="function"&&define.amd?define(function(){return i}):n.EventEmitter=i}(this),function(n){"use strict";function r(n){var u,r,f;if(n){if(typeof i[n]=="string")return n;for(n=n.charAt(0).toUpperCase()+n.slice(1),r=0,f=t.length;r<f;r++)if(u=t[r]+n,typeof i[u]=="string")return u}}var t="Webkit Moz ms Ms O".split(" "),i=document.documentElement.style;typeof define=="function"&&define.amd?define(function(){return r}):n.getStyleProperty=r}(window),function(n){"use strict";function u(n){var t=parseFloat(n),i=n.indexOf("%")===-1&&!isNaN(t);return i&&t}function o(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},u,n=0,r=i.length;n<r;n++)u=i[n],t[u]=0;return t}function e(n){function e(n){var s,e,d,h,l,c;if(typeof n=="object"&&n.nodeType){if(s=f(n),s.display==="none")return o();for(e={},e.width=n.offsetWidth,e.height=n.offsetHeight,d=e.isBorderBox=!!(t&&s[t]&&s[t]==="border-box"),h=0,l=i.length;h<l;h++){var a=i[h],nt=s[a],g=parseFloat(nt);e[a]=isNaN(g)?0:g}var y=e.paddingLeft+e.paddingRight,p=e.paddingTop+e.paddingBottom,tt=e.marginLeft+e.marginRight,it=e.marginTop+e.marginBottom,w=e.borderLeftWidth+e.borderRightWidth,b=e.borderTopWidth+e.borderBottomWidth,k=d&&r,v=u(s.width);return v!==!1&&(e.width=v+(k?0:y+w)),c=u(s.height),c!==!1&&(e.height=c+(k?0:p+b)),e.innerWidth=e.width-(y+w),e.innerHeight=e.height-(p+b),e.outerWidth=e.width+tt,e.outerHeight=e.height+it,e}}var t=n("boxSizing"),r;return function(){var n,i,e;t&&(n=document.createElement("div"),n.style.width="200px",n.style.padding="1px 2px 3px 4px",n.style.borderStyle="solid",n.style.borderWidth="1px 2px 3px 4px",n.style[t]="border-box",i=document.body||document.documentElement,i.appendChild(n),e=f(n),r=u(e.width)===200,i.removeChild(n))}(),e}var r=document.defaultView,f=r&&r.getComputedStyle?function(n){return r.getComputedStyle(n,null)}:function(n){return n.currentStyle},i=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];typeof define=="function"&&define.amd?define(["get-style-property"],e):n.getSize=e(n.getStyleProperty)}(window),function(n){"use strict";function r(){}function t(n){function u(t){t.prototype.option||(t.prototype.option=function(t){n.isPlainObject(t)&&(this.options=n.extend(!0,this.options,t))})}function f(r,u){n.fn[r]=function(f){var h,o,c,l,e,s;if(typeof f=="string"){for(h=i.call(arguments,1),o=0,c=this.length;o<c;o++){if(l=this[o],e=n.data(l,r),!e){t("cannot call methods on "+r+" prior to initialization; attempted to call '"+f+"'");continue}if(!n.isFunction(e[f])||f.charAt(0)==="_"){t("no such method '"+f+"' for "+r+" instance");continue}if(s=e[f].apply(e,h),s!==undefined)return s}return this}return this.each(function(){var t=n.data(this,r);t?(t.option(f),t._init()):(t=new u(this,f),n.data(this,r,t))})}}if(n){var t=typeof console=="undefined"?r:function(n){console.error(n)};n.bridget=function(n,t){u(t),f(n,t)}}}var i=Array.prototype.slice;typeof define=="function"&&define.amd?define(["jquery"],t):t(n.jQuery)}(window),function(n,t){"use strict";function r(n,t){return n[u](t)}function f(n){if(!n.parentNode){var t=document.createDocumentFragment();t.appendChild(n)}}function s(n,t){var r,i,u;for(f(n),r=n.parentNode.querySelectorAll(t),i=0,u=r.length;i<u;i++)if(r[i]===n)return!0;return!1}function h(n,t){return f(n),r(n,t)}var u=function(){var i,n,u,f,r;if(t.matchesSelector)return"matchesSelector";for(i=["webkit","moz","ms","o"],n=0,u=i.length;n<u;n++)if(f=i[n],r=f+"MatchesSelector",t[r])return r}(),i,e,o;u?(e=document.createElement("div"),o=r(e,"div"),i=o?r:h):i=s,typeof define=="function"&&define.amd?define(function(){return i}):window.matchesSelector=i}(this,Element.prototype),function(n){"use strict";function t(n){for(var i in t.defaults)this[i]=t.defaults[i];for(i in n)this[i]=n[i]}var i=n.Packery=function(){};i.Rect=t,t.defaults={x:0,y:0,width:0,height:0},t.prototype.contains=function(n){var t=n.width||0,i=n.height||0;return this.x<=n.x&&this.y<=n.y&&this.x+this.width>=n.x+t&&this.y+this.height>=n.y+i},t.prototype.overlaps=function(n){var t=this.x+this.width,i=this.y+this.height,r=n.x+n.width,u=n.y+n.height;return this.x<r&&t>n.x&&this.y<u&&i>n.y},t.prototype.getMaximalFreeRects=function(n){if(!this.overlaps(n))return!1;var r=[],i,e=this.x+this.width,o=this.y+this.height,u=n.x+n.width,f=n.y+n.height;return this.y<n.y&&(i=new t({x:this.x,y:this.y,width:this.width,height:n.y-this.y}),r.push(i)),e>u&&(i=new t({x:u,y:this.y,width:e-u,height:this.height}),r.push(i)),o>f&&(i=new t({x:this.x,y:f,width:this.width,height:o-f}),r.push(i)),this.x<n.x&&(i=new t({x:this.x,y:this.y,width:n.x-this.x,height:this.height}),r.push(i)),r},t.prototype.canFit=function(n){return this.width>=n.width&&this.height>=n.height}}(window),function(n){"use strict";function t(n,t){this.width=n||0,this.height=t||0,this.reset()}var i=n.Packery,r=i.Rect;t.prototype.reset=function(){this.spaces=[],this.newSpaces=[];var n=new r({x:0,y:0,width:this.width,height:this.height});this.spaces.push(n)},t.prototype.pack=function(n){for(var i,t=0,r=this.spaces.length;t<r;t++)if(i=this.spaces[t],i.canFit(n)){this.placeInSpace(n,i);break}},t.prototype.placeInSpace=function(n,t){n.x=t.x,n.y=t.y,this.placed(n)},t.prototype.placed=function(n){for(var i=[],u,f,r=0,e=this.spaces.length;r<e;r++)u=this.spaces[r],f=u.getMaximalFreeRects(n),f?i.push.apply(i,f):i.push(u);this.spaces=i,t.mergeRects(this.spaces),this.spaces.sort(t.spaceSorterTopLeft)},t.mergeRects=function(n){for(var u,r,f,i,o,s,h,t=0,e=n.length;t<e;t++)if(u=n[t],u)for(r=n.slice(0),r.splice(t,1),f=0,i=0,o=r.length;i<o;i++)s=r[i],h=t>i?0:1,u.contains(s)&&(n.splice(i+h-f,1),f++);return n},t.spaceSorterTopLeft=function(n,t){return n.y-t.y||n.x-t.x},t.spaceSorterLeftTop=function(n,t){return n.x-t.x||n.y-t.y},i.Packer=t}(window),function(n){"use strict";function w(n,t){for(var i in t)n[i]=t[i];return n}function t(n,t){this.element=n,this.packery=t,this.position={x:0,y:0},this.rect=new h,this.placeRect=new h,this.element.style.position="absolute"}var c=n.Packery,h=c.Rect,a=n.getSize,f=n.getStyleProperty,l=n.EventEmitter,e=document.defaultView,p=e&&e.getComputedStyle?function(n){return e.getComputedStyle(n,null)}:function(n){return n.currentStyle},i=f("transition"),u=f("transform"),v=i&&u,y=!!f("perspective"),o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[i],r={WebkitTransform:"-webkit-transform",MozTransform:"-moz-transform",OTransform:"-o-transform",transform:"transform"}[u],s;w(t.prototype,l.prototype),t.prototype.handleEvent=function(n){var t="on"+n.type;this[t]&&this[t](n)},t.prototype.getSize=function(){this.size=a(this.element)},t.prototype.css=function(n){var i=this.element.style,t;for(t in n)i[t]=n[t]},t.prototype.getPosition=function(){var r=p(this.element),n=parseInt(r.left,10),t=parseInt(r.top,10),i;n=isNaN(n)?0:n,t=isNaN(t)?0:t,i=this.packery.elementSize,n-=i.paddingLeft,t-=i.paddingTop,this.position.x=n,this.position.y=t},s=y?function(n,t){return"translate3d( "+n+"px, "+t+"px, 0)"}:function(n,t){return"translate( "+n+"px, "+t+"px)"},t.prototype._transitionTo=function(n,t){this.getPosition();var u=this.position.x,f=this.position.y,e=parseInt(n,10),o=parseInt(t,10),h=e===this.position.x&&o===this.position.y;if(this.setPosition(n,t),h&&!this.isTransitioning){this.layoutPosition();return}var c=n-u,l=t-f,i={};i[r]=s(c,l),this.transition(i,this.layoutPosition)},t.prototype.goTo=function(n,t){this.setPosition(n,t),this.layoutPosition()},t.prototype.moveTo=v?t.prototype._transitionTo:t.prototype.goTo,t.prototype.setPosition=function(n,t){this.position.x=parseInt(n,10),this.position.y=parseInt(t,10)},t.prototype.layoutPosition=function(){var n=this.packery.elementSize;this.css({left:this.position.x+n.paddingLeft+"px",top:this.position.y+n.paddingTop+"px"}),this.emitEvent("layout",[this])},t.prototype._nonTransition=function(n,t){this.css(n),t&&t.call(this)},t.prototype._transition=function(n,t){var u,f,r;this.transitionStyle=n,u=[];for(f in n)u.push(f);if(r={},r[i+"Property"]=u.join(","),r[i+"Duration"]=this.packery.options.transitionDuration,this.element.addEventListener(o,this,!1),t)this.on("transitionEnd",function(n){return t.call(n),!0});this.css(r),this.css(n),this.isTransitioning=!0},t.prototype.transition=t.prototype[i?"_transition":"_nonTransition"],t.prototype.onwebkitTransitionEnd=function(n){this.ontransitionend(n)},t.prototype.onotransitionend=function(n){this.ontransitionend(n)},t.prototype.ontransitionend=function(n){var t,i;if(n.target===this.element){this.onTransitionEnd&&(this.onTransitionEnd(),delete this.onTransitionEnd),this.removeTransitionStyles(),t={};for(i in this.transitionStyle)t[i]="";this.css(t),this.element.removeEventListener(o,this,!1),delete this.transitionStyle,this.isTransitioning=!1,this.emitEvent("transitionEnd",[this])}},t.prototype.removeTransitionStyles=function(){var n={};n[i+"Property"]="",n[i+"Duration"]="",this.css(n)},t.prototype.remove=function(){var n={opacity:0};n[r]="scale(0.001)",this.transition(n,this.removeElem)},t.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},t.prototype.reveal=i?function(){var i={opacity:0},t,n;i[r]="scale(0.001)",this.css(i),t=this.element.offsetHeight,n={opacity:1},n[r]="scale(1)",this.transition(n),t=null}:function(){},t.prototype.destroy=function(){this.css({position:"",left:"",top:""})},t.prototype.dragStart=function(){this.getPosition(),this.removeTransitionStyles(),this.isTransitioning&&u&&(this.element.style[u]="none"),this.getSize(),this.isPlacing=!0,this.needsPositioning=!1,this.positionPlaceRect(this.position.x,this.position.y),this.isTransitioning=!1,this.didDrag=!1},t.prototype.dragMove=function(n,t){this.didDrag=!0;var i=this.packery.elementSize;n-=i.paddingLeft,t-=i.paddingTop,this.positionPlaceRect(n,t)},t.prototype.dragStop=function(){this.getPosition();var n=this.position.x!==this.placeRect.x,t=this.position.y!==this.placeRect.y;this.needsPositioning=n||t,this.didDrag=!1},t.prototype.positionPlaceRect=function(n,t,i){this.placeRect.x=this.getPlaceRectCoord(n,!0),this.placeRect.y=this.getPlaceRectCoord(t,!1,i)},t.prototype.getPlaceRectCoord=function(n,t,i){var o=t?"Width":"Height",s=this.size["outer"+o],r=this.packery[t?"columnWidth":"rowHeight"],u=this.packery.elementSize["inner"+o],f,e;return t||(u=Math.max(u,this.packery.maxY),this.packery.rowHeight||(u-=this.packery.gutter)),r?(r+=this.packery.gutter,u+=t?this.packery.gutter:0,n=Math.round(n/r),e=Math[t?"floor":"ceil"](u/r),e-=Math.ceil(s/r),f=e):f=u-s,n=i?n:Math.min(n,f),n*=r||1,Math.max(0,n)},t.prototype.copyPlaceRectPosition=function(){this.rect.x=this.placeRect.x,this.rect.y=this.placeRect.y},c.Item=t}(window),function(n){"use strict";function f(n,t){for(var i in t)n[i]=t[i];return n}function u(n){var i=[],t,r;if(typeof n.length=="number")for(t=0,r=n.length;t<r;t++)i.push(n[t]);else i.push(n);return i}function t(n,t){if(!n||!h(n)){r&&r.error("bad Packery element: "+n);return}this.element=n,this.options=f({},this.options),f(this.options,t);var i=++k;this.element.packeryGUID=i,c[i]=this,this._create(),this.options.isInitLayout&&this.layout()}var o=n.Packery,l=o.Rect,p=o.Packer,y=o.Item,v=n.classie,b=n.docReady,w=n.EventEmitter,a=n.eventie,e=n.getSize,d=n.matchesSelector,g=n.document,r=n.console,i=n.jQuery,h=typeof HTMLElement=="object"?function(n){return n instanceof HTMLElement}:function(n){return n&&typeof n=="object"&&n.nodeType===1&&typeof n.nodeName=="string"},s=Array.prototype.indexOf?function(n,t){return n.indexOf(t)}:function(n,t){for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return i;return-1},k=0,c={};f(t.prototype,w.prototype),t.prototype.options={containerStyle:{position:"relative"},isInitLayout:!0,isResizeBound:!0,transitionDuration:"0.4s"},t.prototype._create=function(){var t,n;this.packer=new p,this.reloadItems(),this.stampedElements=[],this.stamp(this.options.stamped),t=this.options.containerStyle,f(this.element.style,t),this.options.isResizeBound&&this.bindResize(),n=this,this.handleDraggabilly={dragStart:function(t){n.itemDragStart(t.element)},dragMove:function(t){n.itemDragMove(t.element,t.position.x,t.position.y)},dragEnd:function(t){n.itemDragEnd(t.element)}},this.handleUIDraggable={start:function(t){n.itemDragStart(t.currentTarget)},drag:function(t,i){n.itemDragMove(t.currentTarget,i.position.left,i.position.top)},stop:function(t){n.itemDragEnd(t.currentTarget)}}},t.prototype.reloadItems=function(){this.items=this._getItems(this.element.children)},t.prototype._getItems=function(n){for(var i=this._filterFindItemElements(n),r=[],f,e,t=0,u=i.length;t<u;t++)f=i[t],e=new y(f,this),r.push(e);return r},t.prototype._filterFindItemElements=function(n){var t,i,r,s,f,o,e,h;if(n=u(n),t=this.options.itemSelector,!t)return n;for(i=[],r=0,s=n.length;r<s;r++)for(f=n[r],d(f,t)&&i.push(f),o=f.querySelectorAll(t),e=0,h=o.length;e<h;e++)i.push(o[e]);return i},t.prototype.getItemElements=function(){for(var t=[],n=0,i=this.items.length;n<i;n++)t.push(this.items[n].element);return t},t.prototype.layout=function(){this._prelayout();var n=this.options.isLayoutInstant!==undefined?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,n),this._isLayoutInited=!0},t.prototype._init=t.prototype.layout,t.prototype._prelayout=function(){this.elementSize=e(this.element),this._getMeasurements(),this.packer.width=this.elementSize.innerWidth+this.gutter,this.packer.height=Number.POSITIVE_INFINITY,this.packer.reset(),this.maxY=0,this.placeStampedElements()},t.prototype._getMeasurements=function(){this._getMeasurement("columnWidth","width"),this._getMeasurement("rowHeight","height"),this._getMeasurement("gutter","width")},t.prototype._getMeasurement=function(n,t){var i=this.options[n],r;i?(typeof i=="string"?r=this.element.querySelector(i):h(i)&&(r=i),this[n]=r?e(r)[t]:i):this[n]=0},t.prototype.layoutItems=function(n,t){var i=this._getLayoutItems(n),f,o,e,r,u;if(i&&i.length)for(this._itemsOn(i,"layout",function(){this.emitEvent("layoutComplete",[this,i])}),f=0,o=i.length;f<o;f++)e=i[f],this._packItem(e),this._layoutItem(e,t);else this.emitEvent("layoutComplete",[this,[]]);r=this.elementSize,u=this.maxY-this.gutter,r.isBorderBox&&(u+=r.paddingBottom+r.paddingTop+r.borderTopWidth+r.borderBottomWidth),u=Math.max(u,0),this.element.style.height=u+"px"},t.prototype._getLayoutItems=function(n){for(var r=[],i,t=0,u=n.length;t<u;t++)i=n[t],i.isIgnored||r.push(i);return r},t.prototype._packItem=function(n){this._setRectSize(n.element,n.rect),this.packer.pack(n.rect),this._setMaxY(n.rect)},t.prototype._setMaxY=function(n){this.maxY=Math.max(n.y+n.height,this.maxY)},t.prototype._setRectSize=function(n,t){var u=e(n),i=u.outerWidth,r=u.outerHeight,f=this.columnWidth+this.gutter,o=this.rowHeight+this.gutter;i=this.columnWidth?Math.ceil(i/f)*f:i+this.gutter,r=this.rowHeight?Math.ceil(r/o)*o:r+this.gutter,t.width=Math.min(i,this.packer.width),t.height=r},t.prototype._layoutItem=function(n,t){var i=n.rect;t?n.goTo(i.x,i.y):n.moveTo(i.x,i.y)},t.prototype._itemsOn=function(n,t,i){function h(){return u++,u===o&&i.call(s),!0}for(var u=0,o=n.length,s=this,e,r=0,f=n.length;r<f;r++){e=n[r];e.on(t,h)}},t.prototype.stamp=function(n){var t,i,r;if(n)for(typeof n=="string"&&(n=this.element.querySelectorAll(n)),n=u(n),this.stampedElements.push.apply(this.stampedElements,n),t=0,i=n.length;t<i;t++)r=n[t],this.ignore(r)},t.prototype.unstamp=function(n){var t,f,i,r;if(n)for(n=u(n),t=0,f=n.length;t<f;t++)i=n[t],r=s(this.stampedElements,i),r!==-1&&this.stampedElements.splice(r,1),this.unignore(i)},t.prototype.placeStampedElements=function(){var n,t,i;if(this.stampedElements&&this.stampedElements.length)for(this._getBounds(),n=0,t=this.stampedElements.length;n<t;n++)i=this.stampedElements[n],this.placeStamp(i)},t.prototype._getBounds=function(){var n=this.element.getBoundingClientRect();this._boundingLeft=n.left+this.elementSize.paddingLeft,this._boundingTop=n.top+this.elementSize.paddingTop},t.prototype.placeStamp=function(n){var i=this.getItem(n),t;t=i&&i.isPlacing?i.placeRect:this._getElementOffsetRect(n),this._setRectSize(n,t),this.packer.placed(t),this._setMaxY(t)},t.prototype._getElementOffsetRect=function(n){var i=n.getBoundingClientRect(),t=new l({x:i.left-this._boundingLeft,y:i.top-this._boundingTop});return t.x-=this.elementSize.borderLeftWidth,t.y-=this.elementSize.borderTopWidth,t},t.prototype.handleEvent=function(n){var t="on"+n.type;this[t]&&this[t](n)},t.prototype.bindResize=function(){this.isResizeBound||(a.bind(n,"resize",this),this.isResizeBound=!0)},t.prototype.unbindResize=function(){a.unbind(n,"resize",this),this.isResizeBound=!1},t.prototype.onresize=function(){function t(){n.resize()}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var n=this;this.resizeTimeout=setTimeout(t,100)},t.prototype.resize=function(){var n=e(this.element),t=this.elementSize&&n;t&&n.innerWidth===this.elementSize.innerWidth||(this.layout(),delete this.resizeTimeout)},t.prototype.addItems=function(n){var t=this._getItems(n);if(t.length)return this.items.push.apply(this.items,t),t},t.prototype.appended=function(n){var t=this.addItems(n);t.length&&(this.layoutItems(t,!0),this.reveal(t))},t.prototype.prepended=function(n){var t=this._getItems(n),i;t.length&&(i=this.items.slice(0),this.items=t.concat(i),this._prelayout(),this.layoutItems(t,!0),this.reveal(t),this.layoutItems(i))},t.prototype.reveal=function(n){var t,i,r;if(n&&n.length)for(t=0,i=n.length;t<i;t++)r=n[t],r.reveal()},t.prototype.getItem=function(n){for(var i,t=0,r=this.items.length;t<r;t++)if(i=this.items[t],i.element===n)return i},t.prototype.getItems=function(n){var i,t,u,f,r;if(n&&n.length){for(i=[],t=0,u=n.length;t<u;t++)f=n[t],r=this.getItem(f),r&&i.push(r);return i}},t.prototype.remove=function(n){var t,i,f,r,e;for(n=u(n),t=this.getItems(n),this._itemsOn(t,"remove",function(){this.emitEvent("removeComplete",[this,t])}),i=0,f=t.length;i<f;i++)r=t[i],r.remove(),e=s(this.items,r),this.items.splice(e,1)},t.prototype.ignore=function(n){var t=this.getItem(n);t&&(t.isIgnored=!0)},t.prototype.unignore=function(n){var t=this.getItem(n);t&&delete t.isIgnored},t.prototype.sortItemsByPosition=function(){this.items.sort(function(n,t){return n.position.y-t.position.y||n.position.x-t.position.x})},t.prototype.fit=function(n,t,i){function e(){(f++,f===2)&&u.emitEvent("fitComplete",[u,r])}var r=this.getItem(n),u,f;if(r){this._getMeasurements(),this.stamp(r.element),r.getSize(),r.isPlacing=!0,t=t===undefined?r.rect.x:t,i=i===undefined?r.rect.y:i,r.positionPlaceRect(t,i,!0),u=this,f=0;r.on("layout",function(){return e(),!0});this.on("layoutComplete",function(){return e(),!0});r.moveTo(r.placeRect.x,r.placeRect.y),this.layout(),this.unstamp(r.element),this.sortItemsByPosition(),r.isPlacing=!1,r.copyPlaceRectPosition()}},t.prototype.itemDragStart=function(n){this.stamp(n);var t=this.getItem(n);t&&t.dragStart()},t.prototype.itemDragMove=function(n,t,i){function f(){r.layout(),delete r.dragTimeout}var u=this.getItem(n),r;u&&u.dragMove(t,i),r=this,this.clearDragTimeout(),this.dragTimeout=setTimeout(f,40)},t.prototype.clearDragTimeout=function(){this.dragTimeout&&clearTimeout(this.dragTimeout)},t.prototype.itemDragEnd=function(n){function e(){return(f++,f!==o)?!0:(t&&(v.remove(t.element,"is-positioning-post-drag"),t.isPlacing=!1,t.copyPlaceRectPosition()),i.unstamp(n),i.sortItemsByPosition(),t&&r&&i.emitEvent("dragItemPositioned",[i,t]),!0)}var t=this.getItem(n),u;if(t&&(u=t.didDrag,t.dragStop()),!t||!u&&!t.needsPositioning){this.unstamp(n);return}v.add(t.element,"is-positioning-post-drag");var r=t.needsPositioning,o=r?2:1,f=0,i=this;if(r){t.on("layout",e);t.moveTo(t.placeRect.x,t.placeRect.y)}else t&&t.copyPlaceRectPosition();this.clearDragTimeout();this.on("layoutComplete",e);this.layout()},t.prototype.bindDraggabillyEvents=function(n){n.on("dragStart",this.handleDraggabilly.dragStart);n.on("dragMove",this.handleDraggabilly.dragMove);n.on("dragEnd",this.handleDraggabilly.dragEnd)},t.prototype.bindUIDraggableEvents=function(n){n.on("dragstart",this.handleUIDraggable.start).on("drag",this.handleUIDraggable.drag).on("dragstop",this.handleUIDraggable.stop)},t.prototype.destroy=function(){var n,t,i;for(this.element.style.position="",this.element.style.height="",delete this.element.packeryGUID,n=0,t=this.items.length;n<t;n++)i=this.items[n],i.destroy();this.unbindResize()},t.data=function(n){var t=n.packeryGUID;return t&&c[t]},b(function(){for(var e=g.querySelectorAll(".js-packery"),n,f,s,h,u=0,o=e.length;u<o;u++){n=e[u],f=n.getAttribute("data-packery-options");try{s=f&&JSON.parse(f)}catch(c){r&&r.error("Error parsing data-packery-options on "+n.nodeName.toLowerCase()+(n.id?"#"+n.id:"")+": "+c);continue}h=new t(n,s),i&&i.data(n,"packery",h)}}),i&&i.bridget&&i.bridget("packery",t),t.Rect=l,t.Packer=p,t.Item=y,n.Packery=t}(window),function(n){"use strict";function i(){}function r(n,t){if(u)return t.indexOf(n);for(var i=t.length;i--;)if(t[i]===n)return i;return-1}var t=i.prototype,u=Array.prototype.indexOf?!0:!1;t._getEvents=function(){return this._events||(this._events={})},t.getListeners=function(n){var t=this._getEvents(),r,i;if(typeof n=="object"){r={};for(i in t)t.hasOwnProperty(i)&&n.test(i)&&(r[i]=t[i])}else r=t[n]||(t[n]=[]);return r},t.getListenersAsObject=function(n){var t=this.getListeners(n),i;return t instanceof Array&&(i={},i[n]=t),i||t},t.addListener=function(n,t){var i=this.getListenersAsObject(n),u;for(u in i)i.hasOwnProperty(u)&&r(t,i[u])===-1&&i[u].push(t);return this},t.on=t.addListener,t.defineEvent=function(n){return this.getListeners(n),this},t.defineEvents=function(n){for(var t=0;t<n.length;t+=1)this.defineEvent(n[t]);return this},t.removeListener=function(n,t){var i=this.getListenersAsObject(n),f,u;for(u in i)i.hasOwnProperty(u)&&(f=r(t,i[u]),f!==-1&&i[u].splice(f,1));return this},t.off=t.removeListener,t.addListeners=function(n,t){return this.manipulateListeners(!1,n,t)},t.removeListeners=function(n,t){return this.manipulateListeners(!0,n,t)},t.manipulateListeners=function(n,t,i){var r,u,f=n?this.removeListener:this.addListener,e=n?this.removeListeners:this.addListeners;if(typeof t!="object"||t instanceof RegExp)for(r=i.length;r--;)f.call(this,t,i[r]);else for(r in t)t.hasOwnProperty(r)&&(u=t[r])&&(typeof u=="function"?f.call(this,r,u):e.call(this,r,u));return this},t.removeEvent=function(n){var r=typeof n,t=this._getEvents(),i;if(r==="string")delete t[n];else if(r==="object")for(i in t)t.hasOwnProperty(i)&&n.test(i)&&delete t[i];else delete this._events;return this},t.emitEvent=function(n,t){var i=this.getListenersAsObject(n),u,r,f;for(r in i)if(i.hasOwnProperty(r))for(u=i[r].length;u--;)f=t?i[r][u].apply(null,t):i[r][u](),f===!0&&this.removeListener(n,i[r][u]);return this},t.trigger=t.emitEvent,t.emit=function(n){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(n,t)},typeof define=="function"&&define.amd?define(function(){return i}):n.EventEmitter=i}(this),function(n){"use strict";var t=document.documentElement,r=function(){},i,u;t.addEventListener?r=function(n,t,i){n.addEventListener(t,i,!1)}:t.attachEvent&&(r=function(t,i,r){t[i+r]=r.handleEvent?function(){var t=n.event;t.target=t.target||t.srcElement,r.handleEvent.call(r,t)}:function(){var i=n.event;i.target=i.target||i.srcElement,r.call(t,i)},t.attachEvent("on"+i,t[i+r])}),i=function(){},t.removeEventListener?i=function(n,t,i){n.removeEventListener(t,i,!1)}:t.detachEvent&&(i=function(n,t,i){n.detachEvent("on"+t,n[t+i]);try{delete n[t+i]}catch(r){n[t+i]=undefined}}),u={bind:r,unbind:i},typeof define=="function"&&define.amd?define(u):n.eventie=u}(this),function(n){"use strict";function r(n,t){for(var i in t)n[i]=t[i];return n}function o(n){return e.call(n)==="[object Array]"}function s(n){var t=[],i,r;if(o(n))t=n;else if(typeof n.length=="number")for(i=0,r=n.length;i<r;i++)t.push(n[i]);else t.push(n);return t}function u(n,u){function e(n,i,u){if(!(this instanceof e))return new e(n,i);if(typeof n=="string"&&(n=document.querySelectorAll(n)),this.elements=s(n),this.options=r({},this.options),typeof i=="function"?u=i:r(this.options,i),u)this.on("always",u);this.getImages(),t&&(this.jqDeferred=new t.Deferred);var f=this;setTimeout(function(){f.check()})}function o(n){this.img=n}e.prototype=new n,e.prototype.options={},e.prototype.getImages=function(){var n,u,t,r,i,f,e;for(this.images=[],n=0,u=this.elements.length;n<u;n++)for(t=this.elements[n],t.nodeName==="IMG"&&this.addImage(t),r=t.querySelectorAll("img"),i=0,f=r.length;i<f;i++)e=r[i],this.addImage(e)},e.prototype.addImage=function(n){var t=new o(n);this.images.push(t)},e.prototype.check=function(){function o(n,r){return t.options.debug&&f&&i.log("confirm",n,r),t.progress(n),u++,u===e&&t.complete(),!0}var t=this,u=0,e=this.images.length,n,r;for(this.hasAnyBroken=!1,n=0;n<e;n++){r=this.images[n];r.on("confirm",o);r.check()}},e.prototype.progress=function(n){this.hasAnyBroken=this.hasAnyBroken||!n.isLoaded,this.emit("progress",this,n),this.jqDeferred&&this.jqDeferred.notify(this,n)},e.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done",n;this.isComplete=!0,this.emit(t,this),this.emit("always",this),this.jqDeferred&&(n=this.hasAnyBroken?"reject":"resolve",this.jqDeferred[n](this))},t&&(t.fn.imagesLoaded=function(n,i){var r=new e(this,n,i);return r.jqDeferred.promise(t(this))});var h={};return o.prototype=new n,o.prototype.check=function(){var t=h[this.img.src],n;if(t){this.useCached(t);return}if(h[this.img.src]=this,this.img.complete&&this.img.naturalWidth!==undefined){this.confirm(this.img.naturalWidth!==0,"naturalWidth");return}n=this.proxyImage=new Image,u.bind(n,"load",this),u.bind(n,"error",this),n.src=this.img.src},o.prototype.useCached=function(n){if(n.isConfirmed)this.confirm(n.isLoaded,"cached was confirmed");else{var t=this;n.on("confirm",function(n){return t.confirm(n.isLoaded,"cache emitted confirmed"),!0})}},o.prototype.confirm=function(n,t){this.isConfirmed=!0,this.isLoaded=n,this.emit("confirm",this,t)},o.prototype.handleEvent=function(n){var t="on"+n.type;this[t]&&this[t](n)},o.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindProxyEvents()},o.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindProxyEvents()},o.prototype.unbindProxyEvents=function(){u.unbind(this.proxyImage,"load",this),u.unbind(this.proxyImage,"error",this)},e}var t=n.jQuery,i=n.console,f=typeof i!="undefined",e=Object.prototype.toString;typeof define=="function"&&define.amd?define(["eventEmitter","eventie"],u):n.imagesLoaded=u(n.EventEmitter,n.eventie)}(window)