function resizeAccordions(){}$(function(){$(".region-map ul li a[title]").tooltip({effect:"bouncy"});$(".accordion-nav h2").on("click",function(){$(this).closest("article").toggleClass("open").toggleClass("closed").siblings("article").removeClass("open").addClass("closed")});$(".titleimage--withtitle").parent(".homepage-item").removeClass("yui-u-gt550-1-2").addClass("fullwidth"),equalheight(".homepage-block--elections .homepage-item"),$(".sidebar-nav li li").each(function(){$(this).parent("ul").parent("li").addClass("has-children"),$(this).parent("ul").siblings("i").length<1&&$(this).parent("ul").parent("li").prepend('<i class="fa fa-angle-down"></i><i class="fa fa-angle-up"></i><i class="fa fa-angle-right"></i>'),$(this).siblings("li.backLink").length<1&&$(this).parent("ul").prepend('<li class="backLink"><a href="#"><i class="fa fa-angle-left"></i>Back</a></li>')});$(".sidebar-nav i.fa-angle-up, .sidebar-nav i.fa-angle-down").on("click",function(){$(this).hide().siblings("i").show().siblings("ul").children("li").slideToggle()});$(".sidebar-nav i.fa-angle-right").on("click",function(){$(this).siblings("ul").show();var n=100*parseFloat($(".sidebar-nav").css("left"))/parseFloat($(".sidebar-nav").css("width")),t=n-100+"%";$(".sidebar-nav").css("left",t)});$(".backLink a").on("click",function(n){n.preventDefault();var t=100*parseFloat($(".sidebar-nav").css("left"))/parseFloat($(".sidebar-nav").css("width")),i=t+100+"%";$(".sidebar-nav").css("left",i),$(this).closest("ul").hide()});$("li.current").addClass("active").parents("li").addClass("active"),$("li.current").closest(".sidebar").removeClass("sidebar-empty"),$(".mega-nav li li").each(function(){$(this).parent("ul").parent("li").addClass("has-children")}),$(".mega-nav li.active").addClass("current current--page").parents(".mega-nav li").addClass("current current--parent"),$(".mega-nav li.active").closest("nav").addClass("open-nav"),$(".mega-menu i").click(function(){$(this).parent("span").siblings("ul").slideToggle().closest("li").toggleClass("active").siblings("li").removeClass("active").children("ul").slideUp().siblings("span").children("i").removeClass("fa-angle-up").addClass("fa-angle-down"),$(this).toggleClass("fa-angle-down").toggleClass("fa-angle-up")});$(".mega-nav a").on("click",function(n){if($(this).attr("data-mega-menu")){$("body, html").scrollTop(0),n.preventDefault();var t=$(this).attr("data-mega-menu");$('.mega-menu ul[data-menu-for="'+t+'"]').slideToggle()}});$(".action__item--print a").on("click",function(){return window.print(),!1});$(".fa-bars").on("click",function(){$(".sidebar-nav").slideToggle(),$(".entry-icons").slideToggle()});$(".action__item > a").on("click",function(){if($(this).siblings(".action__item__sub").length>0)return $(this).parent("li").addClass("action__item--highlight").siblings("li").removeClass("action__item--highlight"),!1});$(".action__item .fa-times").on("click",function(){return $(this).closest("li").removeClass("action__item--highlight"),!1});$(".accordion h2").on("click",function(){$(this).siblings(".accordion__inner").slideToggle()});$("a.fa-search").on("click",function(n){n.preventDefault(),n.stopPropagation(),$(".searchbox").toggle(),$(".mega-nav li .fa-search").toggleClass("invisible"),$(".searchbox .search").focus()});$("html").click(function(){$(".searchbox").hide(),$(".fa-search").removeClass("invisible")});$(".searchbox").on("click",function(n){n.stopPropagation()});$(".action__item--bookmark a").click(function(){"sidebar"in window&&"addPanel"in window.sidebar?window.sidebar.addPanel(location.href,document.title,""):/*@cc_on!@*/!1?window.external.AddFavorite(location.href,document.title):alert("Press "+(navigator.userAgent.toLowerCase().indexOf("mac")!=-1?"Command/Cmd":"CTRL")+" + D to bookmark this page.")}),$.get("/api/newsfeed",function(n){var t=[];$.each(n,function(n,i){t+="<li><span>"+i.DateString+"</span><br/><a href="+i.Uri+' target="_blank">'+i.Title+"</a><br><span>"+i.Source+"</span></li>"}),$("#news-feed-data").html('<ul class="cycle-slideshow" data-cycle-fx=carousel data-cycle-timeout=3000 data-cycle-carousel-visible=3 data-cycle-carousel-vertical=true data-cycle-slides="> li">'+t+"</ul>")});var n=localStorage.getItem("cookiesDismissed");n==null&&$(".cookie-warning").addClass("cookie-warning--visible");$("#accept-cookies").on("click",function(){localStorage.setItem("cookiesDismissed",!0),$(".cookie-warning").removeClass("cookie-warning--visible")})}),$(window).load(function(){$(".accordion__inner").not(".accordion--downloads").hide(),$(".cycle-slideshow").cycle()}),$(window).resize(function(){equalheight(".homepage-block--elections .homepage-item")}),$.fn.setAllToMaxHeight=function(){return this.height(""),this.height(Math.max.apply(this,$.map(this,function(n){return $(n).height()})))},$("#iframe").load(function(){}),$(window).scroll(function(){var t=$("html").height()-$(window).height();$(window).scrollTop()>=140&&t>=450?$("body").addClass("fixed"):$("body").removeClass("fixed")}),window.addEventListener("message",function(n){var t=jQuery("#dashboardframe"),i=n.data[0],r=n.data[1];switch(i){case"setHeight":t.height(r)}},!1),function(n){function i(){}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(i,u){n.fn[i]=function(f){var h,e,s;if("string"==typeof f){for(var c=r.call(arguments,1),o=0,l=this.length;l>o;o++)if(h=this[o],e=n.data(h,i),e)if(n.isFunction(e[f])&&"_"!==f.charAt(0)){if(s=e[f].apply(e,c),void 0!==s)return s}else t("no such method '"+f+"' for "+i+" instance");else t("cannot call methods on "+i+" prior to initialization; attempted to call '"+f+"'");return this}return this.each(function(){var t=n.data(this,i);t?(t.option(f),t._init()):(t=new u(this,f),n.data(this,i,t))})}}if(n){var t="undefined"==typeof console?i:function(n){console.error(n)};return n.bridget=function(n,t){u(t),f(n,t)},n.bridget}}var r=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],t):"object"==typeof exports?t(require("jquery")):t(n.jQuery)}(window),function(n){function f(n){return 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},"function"==typeof define&&define.amd?define("classie/classie",u):"object"==typeof exports?module.exports=u:n.classie=u}(window),function(n){function t(n){if(n){if("string"==typeof r[n])return n;n=n.charAt(0).toUpperCase()+n.slice(1);for(var t,u=0,f=i.length;f>u;u++)if(t=i[u]+n,"string"==typeof r[t])return t}}var i="Webkit Moz ms Ms O".split(" "),r=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return t}):"object"==typeof exports?module.exports=t:n.getStyleProperty=t}(window),function(n){function i(n){var t=parseFloat(n),i=-1===n.indexOf("%")&&!isNaN(t);return i&&t}function u(){}function f(){for(var r,i={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},n=0,u=t.length;u>n;n++)r=t[n],i[r]=0;return i}function r(r){function c(){var f,t,c,l;h||(h=!0,f=n.getComputedStyle,(o=function(){var n=f?function(n){return f(n,null)}:function(n){return n.currentStyle};return function(t){var i=n(t);return i||e("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),i}}(),u=r("boxSizing"))&&(t=document.createElement("div"),t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style[u]="border-box",c=document.body||document.documentElement,c.appendChild(t),l=o(t),s=200===i(l.width),c.removeChild(t)))}function l(n){var e,r,l,h,v,p;if(c(),"string"==typeof n&&(n=document.querySelector(n)),n&&"object"==typeof n&&n.nodeType){if(e=o(n),"none"===e.display)return f();r={},r.width=n.offsetWidth,r.height=n.offsetHeight;for(var tt=r.isBorderBox=!(!u||!e[u]||"border-box"!==e[u]),y=0,ut=t.length;ut>y;y++)l=t[y],h=e[l],h=a(n,h),v=parseFloat(h),r[l]=isNaN(v)?0:v;var b=r.paddingLeft+r.paddingRight,k=r.paddingTop+r.paddingBottom,it=r.marginLeft+r.marginRight,rt=r.marginTop+r.marginBottom,d=r.borderLeftWidth+r.borderRightWidth,g=r.borderTopWidth+r.borderBottomWidth,nt=tt&&s,w=i(e.width);return w!==!1&&(r.width=w+(nt?0:b+d)),p=i(e.height),p!==!1&&(r.height=p+(nt?0:k+g)),r.innerWidth=r.width-(b+d),r.innerHeight=r.height-(k+g),r.outerWidth=r.width+it,r.outerHeight=r.height+rt,r}}function a(t,i){if(n.getComputedStyle||-1===i.indexOf("%"))return i;var r=t.style,e=r.left,u=t.runtimeStyle,f=u&&u.left;return f&&(u.left=t.currentStyle.left),r.left=i,i=r.pixelLeft,r.left=e,f&&(u.left=f),i}var o,u,s,h=!1;return l}var e="undefined"==typeof console?u:function(n){console.error(n)},t=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],r):"object"==typeof exports?module.exports=r(require("desandro-get-style-property")):n.getSize=r(n.getStyleProperty)}(window),function(n){function f(t){var i=n.event;return i.target=i.target||i.srcElement||t,i}var t=document.documentElement,u=function(){},i,r;t.addEventListener?u=function(n,t,i){n.addEventListener(t,i,!1)}:t.attachEvent&&(u=function(n,t,i){n[t+i]=i.handleEvent?function(){var t=f(n);i.handleEvent.call(i,t)}:function(){var t=f(n);i.call(n,t)},n.attachEvent("on"+t,n[t+i])}),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]=void 0}}),r={bind:u,unbind:i},"function"==typeof define&&define.amd?define("eventie/eventie",r):"object"==typeof exports?module.exports=r:n.eventie=r}(window),function(n){function t(n){"function"==typeof n&&(t.isReady?n():f.push(n))}function r(n){var r="readystatechange"===n.type&&"complete"!==i.readyState;t.isReady||r||e()}function e(){var n,i,r;for(t.isReady=!0,n=0,i=f.length;i>n;n++)r=f[n],r()}function u(u){return"complete"===i.readyState?e():(u.bind(i,"DOMContentLoaded",r),u.bind(i,"readystatechange",r),u.bind(n,"load",r)),t}var i=n.document,f=[];t.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],u):"object"==typeof exports?module.exports=u(require("eventie")):n.docReady=u(n.eventie)}(window),function(){function t(){}function u(n,t){for(var i=n.length;i--;)if(n[i].listener===t)return i;return-1}function i(n){return function(){return this[n].apply(this,arguments)}}var n=t.prototype,r=this,f=r.EventEmitter;n.getListeners=function(n){var r,t,i=this._getEvents();if(n instanceof RegExp){r={};for(t in i)i.hasOwnProperty(t)&&n.test(t)&&(r[t]=i[t])}else r=i[n]||(i[n]=[]);return r},n.flattenListeners=function(n){for(var i=[],t=0;n.length>t;t+=1)i.push(n[t].listener);return i},n.getListenersAsObject=function(n){var t,i=this.getListeners(n);return i instanceof Array&&(t={},t[n]=i),t||i},n.addListener=function(n,t){var i,r=this.getListenersAsObject(n),f="object"==typeof t;for(i in r)r.hasOwnProperty(i)&&-1===u(r[i],t)&&r[i].push(f?t:{listener:t,once:!1});return this},n.on=i("addListener"),n.addOnceListener=function(n,t){return this.addListener(n,{listener:t,once:!0})},n.once=i("addOnceListener"),n.defineEvent=function(n){return this.getListeners(n),this},n.defineEvents=function(n){for(var t=0;n.length>t;t+=1)this.defineEvent(n[t]);return this},n.removeListener=function(n,t){var f,i,r=this.getListenersAsObject(n);for(i in r)r.hasOwnProperty(i)&&(f=u(r[i],t),-1!==f&&r[i].splice(f,1));return this},n.off=i("removeListener"),n.addListeners=function(n,t){return this.manipulateListeners(!1,n,t)},n.removeListeners=function(n,t){return this.manipulateListeners(!0,n,t)},n.manipulateListeners=function(n,t,i){var r,u,f=n?this.removeListener:this.addListener,e=n?this.removeListeners:this.addListeners;if("object"!=typeof t||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])&&("function"==typeof u?f.call(this,r,u):e.call(this,r,u));return this},n.removeEvent=function(n){var t,r=typeof n,i=this._getEvents();if("string"===r)delete i[n];else if(n instanceof RegExp)for(t in i)i.hasOwnProperty(t)&&n.test(t)&&delete i[t];else delete this._events;return this},n.removeAllListeners=i("removeEvent"),n.emitEvent=function(n,t){var i,f,r,e,u=this.getListenersAsObject(n);for(r in u)if(u.hasOwnProperty(r))for(f=u[r].length;f--;)i=u[r][f],i.once===!0&&this.removeListener(n,i.listener),e=i.listener.apply(this,t||[]),e===this._getOnceReturnValue()&&this.removeListener(n,i.listener);return this},n.trigger=i("emitEvent"),n.emit=function(n){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(n,t)},n.setOnceReturnValue=function(n){return this._onceReturnValue=n,this},n._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},n._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return r.EventEmitter=f,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:r.EventEmitter=t}.call(this),function(n){function i(n,t){return n[u](t)}function r(n){if(!n.parentNode){var t=document.createDocumentFragment();t.appendChild(n)}}function o(n,t){r(n);for(var u=n.parentNode.querySelectorAll(t),i=0,f=u.length;f>i;i++)if(u[i]===n)return!0;return!1}function s(n,t){return r(n),i(n,t)}var t,u=function(){var u,i;if(n.matchesSelector)return"matchesSelector";for(var r=["webkit","moz","ms","o"],t=0,f=r.length;f>t;t++)if(u=r[t],i=u+"MatchesSelector",n[i])return i}(),f,e;u?(f=document.createElement("div"),e=i(f,"div"),t=e?i:s):t=o,"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return t}):"object"==typeof exports?module.exports=t:window.matchesSelector=t}(Element.prototype),function(n){function r(n,t){for(var i in t)n[i]=t[i];return n}function u(n){for(var t in n)return!1;return t=null,!0}function f(n){return n.replace(/([A-Z])/g,function(n){return"-"+n.toLowerCase()})}function t(n,t,i){function o(n,t){n&&(this.element=n,this.layout=t,this.position={x:0,y:0},this._create())}var s=i("transition"),h=i("transform"),w=s&&h,b=!!i("perspective"),c={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[s],l=["transform","transition","transitionDuration","transitionProperty"],k=function(){for(var n,t,u={},r=0,f=l.length;f>r;r++)n=l[r],t=i(n),t&&t!==n&&(u[n]=t);return u}(),a,v,y,p;return r(o.prototype,n.prototype),o.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},o.prototype.handleEvent=function(n){var t="on"+n.type;this[t]&&this[t](n)},o.prototype.getSize=function(){this.size=t(this.element)},o.prototype.css=function(n){var r=this.element.style,t,i;for(t in n)i=k[t]||t,r[i]=n[t]},o.prototype.getPosition=function(){var r=e(this.element),u=this.layout.options,f=u.isOriginLeft,o=u.isOriginTop,n=parseInt(r[f?"left":"right"],10),t=parseInt(r[o?"top":"bottom"],10),i;n=isNaN(n)?0:n,t=isNaN(t)?0:t,i=this.layout.size,n-=f?i.paddingLeft:i.paddingRight,t-=o?i.paddingTop:i.paddingBottom,this.position.x=n,this.position.y=t},o.prototype.layoutPosition=function(){var t=this.layout.size,i=this.layout.options,n={};i.isOriginLeft?(n.left=this.position.x+t.paddingLeft+"px",n.right=""):(n.right=this.position.x+t.paddingRight+"px",n.left=""),i.isOriginTop?(n.top=this.position.y+t.paddingTop+"px",n.bottom=""):(n.bottom=this.position.y+t.paddingBottom+"px",n.top=""),this.css(n),this.emitEvent("layout",[this])},a=b?function(n,t){return"translate3d("+n+"px, "+t+"px, 0)"}:function(n,t){return"translate("+n+"px, "+t+"px)"},o.prototype._transitionTo=function(n,t){this.getPosition();var e=this.position.x,o=this.position.y,s=parseInt(n,10),h=parseInt(t,10),c=s===this.position.x&&h===this.position.y;if(this.setPosition(n,t),c&&!this.isTransitioning)return this.layoutPosition(),void 0;var i=n-e,r=t-o,u={},f=this.layout.options;i=f.isOriginLeft?i:-i,r=f.isOriginTop?r:-r,u.transform=a(i,r),this.transition({to:u,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},o.prototype.goTo=function(n,t){this.setPosition(n,t),this.layoutPosition()},o.prototype.moveTo=w?o.prototype._transitionTo:o.prototype.goTo,o.prototype.setPosition=function(n,t){this.position.x=parseInt(n,10),this.position.y=parseInt(t,10)},o.prototype._nonTransition=function(n){this.css(n.to),n.isCleaning&&this._removeStyles(n.to);for(var t in n.onTransitionEnd)n.onTransitionEnd[t].call(this)},o.prototype._transition=function(n){var i,t,r;if(!parseFloat(this.layout.options.transitionDuration))return this._nonTransition(n),void 0;i=this._transn;for(t in n.onTransitionEnd)i.onEnd[t]=n.onTransitionEnd[t];for(t in n.to)i.ingProperties[t]=!0,n.isCleaning&&(i.clean[t]=!0);n.from&&(this.css(n.from),r=this.element.offsetHeight,r=null),this.enableTransition(n.to),this.css(n.to),this.isTransitioning=!0},v=h&&f(h)+",opacity",o.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:v,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(c,this,!1))},o.prototype.transition=o.prototype[s?"_transition":"_nonTransition"],o.prototype.onwebkitTransitionEnd=function(n){this.ontransitionend(n)},o.prototype.onotransitionend=function(n){this.ontransitionend(n)},y={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"},o.prototype.ontransitionend=function(n){var t,i,r;n.target===this.element&&(t=this._transn,i=y[n.propertyName]||n.propertyName,(delete t.ingProperties[i],u(t.ingProperties)&&this.disableTransition(),i in t.clean&&(this.element.style[n.propertyName]="",delete t.clean[i]),i in t.onEnd)&&(r=t.onEnd[i],r.call(this),delete t.onEnd[i]),this.emitEvent("transitionEnd",[this]))},o.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(c,this,!1),this.isTransitioning=!1},o.prototype._removeStyles=function(n){var t={},i;for(i in n)t[i]="";this.css(t)},p={transitionProperty:"",transitionDuration:""},o.prototype.removeTransitionStyles=function(){this.css(p)},o.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},o.prototype.remove=function(){if(!s||!parseFloat(this.layout.options.transitionDuration))return this.removeElem(),void 0;var n=this;this.on("transitionEnd",function(){return n.removeElem(),!0}),this.hide()},o.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var n=this.layout.options;this.transition({from:n.hiddenStyle,to:n.visibleStyle,isCleaning:!0})},o.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var n=this.layout.options;this.transition({from:n.visibleStyle,to:n.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},o.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},o}var i=n.getComputedStyle,e=i?function(n){return i(n,null)}:function(n){return n.currentStyle};"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],t):"object"==typeof exports?module.exports=t(require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property")):(n.Outlayer={},n.Outlayer.Item=t(n.EventEmitter,n.getSize,n.getStyleProperty))}(window),function(n){function t(n,t){for(var i in t)n[i]=t[i];return n}function c(n){return"[object Array]"===a.call(n)}function u(n){var t=[],i,r;if(c(n))t=n;else if(n&&"number"==typeof n.length)for(i=0,r=n.length;r>i;i++)t.push(n[i]);else t.push(n);return t}function o(n,t){var i=v(t,n);-1!==i&&t.splice(i,1)}function l(n){return n.replace(/(.)([A-Z])/g,function(n,t,i){return t+"-"+i}).toLowerCase()}function f(f,c,a,v,y,p){function w(n,i){if("string"==typeof n&&(n=s.querySelector(n)),!n||!e(n))return r&&r.error("Bad "+this.constructor.namespace+" element: "+n),void 0;this.element=n,this.options=t({},this.constructor.defaults),this.option(i);var u=++k;this.element.outlayerGUID=u,b[u]=this,this._create(),this.options.isInitLayout&&this.layout()}var k=0,b={};return w.namespace="outlayer",w.Item=p,w.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},t(w.prototype,a.prototype),w.prototype.option=function(n){t(this.options,n)},w.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),t(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},w.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},w.prototype._itemize=function(n){for(var u,f,i=this._filterFindItemElements(n),e=this.constructor.Item,r=[],t=0,o=i.length;o>t;t++)u=i[t],f=new e(u,this),r.push(f);return r},w.prototype._filterFindItemElements=function(n){var t;n=u(n);for(var r=this.options.itemSelector,i=[],f=0,h=n.length;h>f;f++)if(t=n[f],e(t))if(r){y(t,r)&&i.push(t);for(var s=t.querySelectorAll(r),o=0,c=s.length;c>o;o++)i.push(s[o])}else i.push(t);return i},w.prototype.getItemElements=function(){for(var t=[],n=0,i=this.items.length;i>n;n++)t.push(this.items[n].element);return t},w.prototype.layout=function(){this._resetLayout(),this._manageStamps();var n=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,n),this._isLayoutInited=!0},w.prototype._init=w.prototype.layout,w.prototype._resetLayout=function(){this.getSize()},w.prototype.getSize=function(){this.size=v(this.element)},w.prototype._getMeasurement=function(n,t){var r,i=this.options[n];i?("string"==typeof i?r=this.element.querySelector(i):e(i)&&(r=i),this[n]=r?v(r)[t]:i):this[n]=0},w.prototype.layoutItems=function(n,t){n=this._getItemsForLayout(n),this._layoutItems(n,t),this._postLayout()},w.prototype._getItemsForLayout=function(n){for(var i,r=[],t=0,u=n.length;u>t;t++)i=n[t],i.isIgnored||r.push(i);return r},w.prototype._layoutItems=function(n,t){function f(){e.emitEvent("layoutComplete",[e,n])}var e=this,i,r;if(!n||!n.length)return f(),void 0;this._itemsOn(n,"layout",f);for(var o=[],u=0,s=n.length;s>u;u++)i=n[u],r=this._getItemLayoutPosition(i),r.item=i,r.isInstant=t||i.isLayoutInstant,o.push(r);this._processLayoutQueue(o)},w.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},w.prototype._processLayoutQueue=function(n){for(var t,i=0,r=n.length;r>i;i++)t=n[i],this._positionItem(t.item,t.x,t.y,t.isInstant)},w.prototype._positionItem=function(n,t,i,r){r?n.goTo(t,i):n.moveTo(t,i)},w.prototype._postLayout=function(){this.resizeContainer()},w.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var n=this._getContainerSize();n&&(this._setContainerMeasure(n.width,!0),this._setContainerMeasure(n.height,!1))}},w.prototype._getContainerSize=h,w.prototype._setContainerMeasure=function(n,t){if(void 0!==n){var i=this.size;i.isBorderBox&&(n+=t?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),n=Math.max(n,0),this.element.style[t?"width":"height"]=n+"px"}},w.prototype._itemsOn=function(n,t,i){function e(){return u++,u===o&&i.call(s),!0}for(var f,u=0,o=n.length,s=this,r=0,h=n.length;h>r;r++){f=n[r];f.on(t,e)}},w.prototype.ignore=function(n){var t=this.getItem(n);t&&(t.isIgnored=!0)},w.prototype.unignore=function(n){var t=this.getItem(n);t&&delete t.isIgnored},w.prototype.stamp=function(n){var t,i,r;if(n=this._find(n))for(this.stamps=this.stamps.concat(n),t=0,i=n.length;i>t;t++)r=n[t],this.ignore(r)},w.prototype.unstamp=function(n){var t,r,i;if(n=this._find(n))for(t=0,r=n.length;r>t;t++)i=n[t],o(i,this.stamps),this.unignore(i)},w.prototype._find=function(n){if(n)return"string"==typeof n&&(n=this.element.querySelectorAll(n)),n=u(n)},w.prototype._manageStamps=function(){var n,t,i;if(this.stamps&&this.stamps.length)for(this._getBoundingRect(),n=0,t=this.stamps.length;t>n;n++)i=this.stamps[n],this._manageStamp(i)},w.prototype._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),n=this.size;this._boundingRect={left:t.left+n.paddingLeft+n.borderLeftWidth,top:t.top+n.paddingTop+n.borderTopWidth,right:t.right-(n.paddingRight+n.borderRightWidth),bottom:t.bottom-(n.paddingBottom+n.borderBottomWidth)}},w.prototype._manageStamp=h,w.prototype._getElementOffset=function(n){var t=n.getBoundingClientRect(),i=this._boundingRect,r=v(n);return{left:t.left-i.left-r.marginLeft,top:t.top-i.top-r.marginTop,right:i.right-t.right-r.marginRight,bottom:i.bottom-t.bottom-r.marginBottom}},w.prototype.handleEvent=function(n){var t="on"+n.type;this[t]&&this[t](n)},w.prototype.bindResize=function(){this.isResizeBound||(f.bind(n,"resize",this),this.isResizeBound=!0)},w.prototype.unbindResize=function(){this.isResizeBound&&f.unbind(n,"resize",this),this.isResizeBound=!1},w.prototype.onresize=function(){function t(){n.resize(),delete n.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var n=this;this.resizeTimeout=setTimeout(t,100)},w.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},w.prototype.needsResizeLayout=function(){var n=v(this.element),t=this.size&&n;return t&&n.innerWidth!==this.size.innerWidth},w.prototype.addItems=function(n){var t=this._itemize(n);return t.length&&(this.items=this.items.concat(t)),t},w.prototype.appended=function(n){var t=this.addItems(n);t.length&&(this.layoutItems(t,!0),this.reveal(t))},w.prototype.prepended=function(n){var t=this._itemize(n),i;t.length&&(i=this.items.slice(0),this.items=t.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(t,!0),this.reveal(t),this.layoutItems(i))},w.prototype.reveal=function(n){var i=n&&n.length,t,r;if(i)for(t=0;i>t;t++)r=n[t],r.reveal()},w.prototype.hide=function(n){var i=n&&n.length,t,r;if(i)for(t=0;i>t;t++)r=n[t],r.hide()},w.prototype.getItem=function(n){for(var i,t=0,r=this.items.length;r>t;t++)if(i=this.items[t],i.element===n)return i},w.prototype.getItems=function(n){var u,i;if(n&&n.length){for(var r=[],t=0,f=n.length;f>t;t++)u=n[t],i=this.getItem(u),i&&r.push(i);return r}},w.prototype.remove=function(n){var t,i,f,r;if(n=u(n),t=this.getItems(n),t&&t.length)for(this._itemsOn(t,"remove",function(){this.emitEvent("removeComplete",[this,t])}),i=0,f=t.length;f>i;i++)r=t[i],r.remove(),o(r,this.items)},w.prototype.destroy=function(){var t=this.element.style,n,r,u,f;for(t.height="",t.position="",t.width="",n=0,r=this.items.length;r>n;n++)u=this.items[n],u.destroy();this.unbindResize(),f=this.element.outlayerGUID,delete b[f],delete this.element.outlayerGUID,i&&i.removeData(this.element,this.constructor.namespace)},w.data=function(n){var t=n&&n.outlayerGUID;return t&&b[t]},w.create=function(n,u){function f(){w.apply(this,arguments)}return Object.create?f.prototype=Object.create(w.prototype):t(f.prototype,w.prototype),f.prototype.constructor=f,f.defaults=t({},w.defaults),t(f.defaults,u),f.prototype.settings={},f.namespace=n,f.data=w.data,f.Item=function(){p.apply(this,arguments)},f.Item.prototype=new p,c(function(){for(var a,t,e,v,o=l(n),h=s.querySelectorAll(".js-"+o),c="data-"+o+"-options",u=0,y=h.length;y>u;u++){t=h[u],e=t.getAttribute(c);try{a=e&&JSON.parse(e)}catch(p){r&&r.error("Error parsing "+c+" on "+t.nodeName.toLowerCase()+(t.id?"#"+t.id:"")+": "+p);continue}v=new f(t,a),i&&i.data(t,n,v)}}),i&&i.bridget&&i.bridget(n,f),f},w.Item=p,w}var s=n.document,r=n.console,i=n.jQuery,h=function(){},a=Object.prototype.toString,e="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(n){return n instanceof HTMLElement}:function(n){return n&&"object"==typeof n&&1===n.nodeType&&"string"==typeof n.nodeName},v=Array.prototype.indexOf?function(n,t){return n.indexOf(t)}:function(n,t){for(var i=0,r=n.length;r>i;i++)if(n[i]===t)return i;return-1};"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],f):"object"==typeof exports?module.exports=f(require("eventie"),require("doc-ready"),require("wolfy87-eventemitter"),require("get-size"),require("desandro-matches-selector"),require("./item")):n.Outlayer=f(n.eventie,n.docReady,n.EventEmitter,n.getSize,n.matchesSelector,n.Outlayer.Item)}(window),function(n){function t(){function n(t){for(var i in n.defaults)this[i]=n.defaults[i];for(i in t)this[i]=t[i]}return i.Rect=n,n.defaults={x:0,y:0,width:0,height:0},n.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},n.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 r>this.x&&t>n.x&&u>this.y&&i>n.y},n.prototype.getMaximalFreeRects=function(t){if(!this.overlaps(t))return!1;var i,r=[],e=this.x+this.width,o=this.y+this.height,u=t.x+t.width,f=t.y+t.height;return this.y<t.y&&(i=new n({x:this.x,y:this.y,width:this.width,height:t.y-this.y}),r.push(i)),e>u&&(i=new n({x:u,y:this.y,width:e-u,height:this.height}),r.push(i)),o>f&&(i=new n({x:this.x,y:f,width:this.width,height:o-f}),r.push(i)),this.x<t.x&&(i=new n({x:this.x,y:this.y,width:t.x-this.x,height:this.height}),r.push(i)),r},n.prototype.canFit=function(n){return this.width>=n.width&&this.height>=n.height},n}var i=n.Packery=function(){};"function"==typeof define&&define.amd?define("packery/js/rect",t):"object"==typeof exports?module.exports=t():(n.Packery=n.Packery||{},n.Packery.Rect=t())}(window),function(n){function t(n){function t(n,t,i){this.width=n||0,this.height=t||0,this.sortDirection=i||"downwardLeftToRight",this.reset()}t.prototype.reset=function(){this.spaces=[],this.newSpaces=[];var t=new n({x:0,y:0,width:this.width,height:this.height});this.spaces.push(t),this.sorter=i[this.sortDirection]||i.downwardLeftToRight},t.prototype.pack=function(n){for(var i,t=0,r=this.spaces.length;r>t;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 r,u,t=[],i=0,f=this.spaces.length;f>i;i++)r=this.spaces[i],u=r.getMaximalFreeRects(n),u?t.push.apply(t,u):t.push(r);this.spaces=t,this.mergeSortSpaces()},t.prototype.mergeSortSpaces=function(){t.mergeRects(this.spaces),this.spaces.sort(this.sorter)},t.prototype.addSpace=function(n){this.spaces.push(n),this.mergeSortSpaces()},t.mergeRects=function(n){for(var u,r,o,s,t=0,f=n.length;f>t;t++)if(u=n[t],u){r=n.slice(0),r.splice(t,1);for(var e=0,i=0,h=r.length;h>i;i++)o=r[i],s=t>i?0:1,u.contains(o)&&(n.splice(i+s-e,1),e++)}return n};var i={downwardLeftToRight:function(n,t){return n.y-t.y||n.x-t.x},rightwardTopToBottom:function(n,t){return n.x-t.x||n.y-t.y}};return t}if("function"==typeof define&&define.amd)define("packery/js/packer",["./rect"],t);else if("object"==typeof exports)module.exports=t(require("./rect"));else{var i=n.Packery=n.Packery||{};i.Packer=t(i.Rect)}}(window),function(n){function t(n,t,i){var u=n("transform"),r=function(){t.Item.apply(this,arguments)},f;return r.prototype=new t.Item,f=r.prototype._create,r.prototype._create=function(){f.call(this),this.rect=new i,this.placeRect=new i},r.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},r.prototype.dragMove=function(n,t){this.didDrag=!0;var i=this.layout.size;n-=i.paddingLeft,t-=i.paddingTop,this.positionPlaceRect(n,t)},r.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},r.prototype.positionPlaceRect=function(n,t,i){this.placeRect.x=this.getPlaceRectCoord(n,!0),this.placeRect.y=this.getPlaceRectCoord(t,!1,i)},r.prototype.getPlaceRectCoord=function(n,t,i){var o=t?"Width":"Height",s=this.size["outer"+o],r=this.layout[t?"columnWidth":"rowHeight"],u=this.layout.size["inner"+o],f,h,e;return t||(u=Math.max(u,this.layout.maxY),this.layout.rowHeight||(u-=this.layout.gutter)),r?(r+=this.layout.gutter,u+=t?this.layout.gutter:0,n=Math.round(n/r),h=this.layout.options.isHorizontal?t?"ceil":"floor":t?"floor":"ceil",e=Math[h](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)},r.prototype.copyPlaceRectPosition=function(){this.rect.x=this.placeRect.x,this.rect.y=this.placeRect.y},r.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.layout.packer.addSpace(this.rect),this.emitEvent("remove",[this])},r}"function"==typeof define&&define.amd?define("packery/js/item",["get-style-property/get-style-property","outlayer/outlayer","./rect"],t):"object"==typeof exports?module.exports=t(require("desandro-get-style-property"),require("outlayer"),require("./rect")):n.Packery.Item=t(n.getStyleProperty,n.Outlayer,n.Packery.Rect)}(window),function(n){function t(n,t,i,r,u,f){function o(n,t){return n.position.y-t.position.y||n.position.x-t.position.x}function s(n,t){return n.position.x-t.position.x||n.position.y-t.position.y}r.prototype.canFit=function(n){return this.width>=n.width-1&&this.height>=n.height-1};var e=i.create("packery");return e.Item=f,e.prototype._create=function(){i.prototype._create.call(this),this.packer=new u,this.stamp(this.options.stamped);var 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)}}},e.prototype._resetLayout=function(){this.getSize(),this._getMeasurements();var n=this.packer;this.options.isHorizontal?(n.width=Number.POSITIVE_INFINITY,n.height=this.size.innerHeight+this.gutter,n.sortDirection="rightwardTopToBottom"):(n.width=this.size.innerWidth+this.gutter,n.height=Number.POSITIVE_INFINITY,n.sortDirection="downwardLeftToRight"),n.reset(),this.maxY=0,this.maxX=0},e.prototype._getMeasurements=function(){this._getMeasurement("columnWidth","width"),this._getMeasurement("rowHeight","height"),this._getMeasurement("gutter","width")},e.prototype._getItemLayoutPosition=function(n){return this._packItem(n),n.rect},e.prototype._packItem=function(n){this._setRectSize(n.element,n.rect),this.packer.pack(n.rect),this._setMaxXY(n.rect)},e.prototype._setMaxXY=function(n){this.maxX=Math.max(n.x+n.width,this.maxX),this.maxY=Math.max(n.y+n.height,this.maxY)},e.prototype._setRectSize=function(n,i){var f=t(n),r=f.outerWidth,u=f.outerHeight;(r||u)&&(r=this._applyGridGutter(r,this.columnWidth),u=this._applyGridGutter(u,this.rowHeight)),i.width=Math.min(r,this.packer.width),i.height=Math.min(u,this.packer.height)},e.prototype._applyGridGutter=function(n,t){if(!t)return n+this.gutter;t+=this.gutter;var i=n%t,r=i&&1>i?"round":"ceil";return n=Math[r](n/t)*t},e.prototype._getContainerSize=function(){return this.options.isHorizontal?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}},e.prototype._manageStamp=function(n){var t,u=this.getItem(n),i;u&&u.isPlacing?t=u.placeRect:(i=this._getElementOffset(n),t=new r({x:this.options.isOriginLeft?i.left:i.right,y:this.options.isOriginTop?i.top:i.bottom})),this._setRectSize(n,t),this.packer.placed(t),this._setMaxXY(t)},e.prototype.sortItemsByPosition=function(){var n=this.options.isHorizontal?s:o;this.items.sort(n)},e.prototype.fit=function(n,t,i){var r=this.getItem(n);r&&(this._getMeasurements(),this.stamp(r.element),r.getSize(),r.isPlacing=!0,t=void 0===t?r.rect.x:t,i=void 0===i?r.rect.y:i,r.positionPlaceRect(t,i,!0),this._bindFitEvents(r),r.moveTo(r.placeRect.x,r.placeRect.y),this.layout(),this.unstamp(r.element),this.sortItemsByPosition(),r.isPlacing=!1,r.copyPlaceRectPosition())},e.prototype._bindFitEvents=function(n){function t(){r++,2===r&&i.emitEvent("fitComplete",[i,n])}var i=this,r=0;n.on("layout",function(){return t(),!0}),this.on("layoutComplete",function(){return t(),!0})},e.prototype.resize=function(){var n=t(this.element),r=this.size&&n,i=this.options.isHorizontal?"innerHeight":"innerWidth";r&&n[i]===this.size[i]||this.layout()},e.prototype.itemDragStart=function(n){this.stamp(n);var t=this.getItem(n);t&&t.dragStart()},e.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)},e.prototype.clearDragTimeout=function(){this.dragTimeout&&clearTimeout(this.dragTimeout)},e.prototype.itemDragEnd=function(t){var u,i=this.getItem(t),r;if(i&&(u=i.didDrag,i.dragStop()),!i||!u&&!i.needsPositioning)return this.unstamp(t),void 0;n.add(i.element,"is-positioning-post-drag"),r=this._getDragEndLayoutComplete(t,i),i.needsPositioning?(i.on("layout",r),i.moveTo(i.placeRect.x,i.placeRect.y)):i&&i.copyPlaceRectPosition(),this.clearDragTimeout(),this.on("layoutComplete",r),this.layout()},e.prototype._getDragEndLayoutComplete=function(t,i){var u=i&&i.needsPositioning,f=0,e=u?2:1,r=this;return function(){return f++,f!==e?!0:(i&&(n.remove(i.element,"is-positioning-post-drag"),i.isPlacing=!1,i.copyPlaceRectPosition()),r.unstamp(t),r.sortItemsByPosition(),u&&r.emitEvent("dragItemPositioned",[r,i]),!0)}},e.prototype.bindDraggabillyEvents=function(n){n.on("dragStart",this.handleDraggabilly.dragStart),n.on("dragMove",this.handleDraggabilly.dragMove),n.on("dragEnd",this.handleDraggabilly.dragEnd)},e.prototype.bindUIDraggableEvents=function(n){n.on("dragstart",this.handleUIDraggable.start).on("drag",this.handleUIDraggable.drag).on("dragstop",this.handleUIDraggable.stop)},e.Rect=r,e.Packer=u,e}"function"==typeof define&&define.amd?define(["classie/classie","get-size/get-size","outlayer/outlayer","packery/js/rect","packery/js/packer","packery/js/item"],t):"object"==typeof exports?module.exports=t(require("desandro-classie"),require("get-size"),require("outlayer"),require("./rect"),require("./packer"),require("./item")):n.Packery=t(n.classie,n.getSize,n.Outlayer,n.Packery.Rect,n.Packery.Packer,n.Packery.Item)}(window)