window.JSON||(window.JSON={}),function(){function f(e){return e<10?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,(function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function str(e,t){var a,r,n,s,i,u=gap,l=t[e];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(e)),"function"==typeof rep&&(l=rep.call(t,e,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,i=[],"[object Array]"===Object.prototype.toString.apply(l)){for(s=l.length,a=0;a<s;a+=1)i[a]=str(a,l)||"null";return n=0===i.length?"[]":gap?"[\n"+gap+i.join(",\n"+gap)+"\n"+u+"]":"["+i.join(",")+"]",gap=u,n}if(rep&&"object"==typeof rep)for(s=rep.length,a=0;a<s;a+=1)"string"==typeof(r=rep[a])&&((n=str(r,l))&&i.push(quote(r)+(gap?": ":":")+n));else for(r in l)Object.hasOwnProperty.call(l,r)&&((n=str(r,l))&&i.push(quote(r)+(gap?": ":":")+n));return n=0===i.length?"{}":gap?"{\n"+gap+i.join(",\n"+gap)+"\n"+u+"}":"{"+i.join(",")+"}",gap=u,n}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(e){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(e){return this.valueOf()});var JSON=window.JSON,cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(e,t,a){var r;if(gap="",indent="","number"==typeof a)for(r=0;r<a;r+=1)indent+=" ";else"string"==typeof a&&(indent=a);if(rep=t,!t||"function"==typeof t||"object"==typeof t&&"number"==typeof t.length)return str("",{"":e});throw new Error("JSON.stringify")}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(e,t){var a,r,n=e[t];if(n&&"object"==typeof n)for(a in n)Object.hasOwnProperty.call(n,a)&&(void 0!==(r=walk(n,a))?n[a]=r:delete n[a]);return reviver.call(e,t,n)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,(function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),function(e,t){"use strict";var a=e.History=e.History||{},r=e.jQuery;if(void 0!==a.Adapter)throw new Error("History.js Adapter has already been loaded...");a.Adapter={bind:function(e,t,a){r(e).bind(t,a)},trigger:function(e,t,a){r(e).trigger(t,a)},extractEventData:function(e,t,a){return t&&t.originalEvent&&t.originalEvent[e]||a&&a[e]||undefined},onDomLoad:function(e){r(e)}},void 0!==a.init&&a.init()}(window),function(e,t){"use strict";var a=e.document,r=e.setTimeout||r,n=e.clearTimeout||n,s=e.setInterval||s,i=e.History=e.History||{};if(void 0!==i.initHtml4)throw new Error("History.js HTML4 Support has already been loaded...");i.initHtml4=function(){if(void 0!==i.initHtml4.initialized)return!1;i.initHtml4.initialized=!0,i.enabled=!0,i.savedHashes=[],i.isLastHash=function(e){return e===i.getHashByIndex()},i.saveHash=function(e){return!i.isLastHash(e)&&(i.savedHashes.push(e),!0)},i.getHashByIndex=function(e){return void 0===e?i.savedHashes[i.savedHashes.length-1]:e<0?i.savedHashes[i.savedHashes.length+e]:i.savedHashes[e]},i.discardedHashes={},i.discardedStates={},i.discardState=function(e,t,a){var r,n=i.getHashByState(e);return r={discardedState:e,backState:a,forwardState:t},i.discardedStates[n]=r,!0},i.discardHash=function(e,t,a){var r={discardedHash:e,backState:a,forwardState:t};return i.discardedHashes[e]=r,!0},i.discardedState=function(e){var t=i.getHashByState(e);return i.discardedStates[t]||!1},i.discardedHash=function(e){return i.discardedHashes[e]||!1},i.recycleState=function(e){var t=i.getHashByState(e);return i.discardedState(e)&&delete i.discardedStates[t],!0},i.emulated.hashChange&&(i.hashChangeInit=function(){i.checkerFunction=null;var t,r,n,u="";return i.isInternetExplorer()?("historyjs-iframe",(t=a.createElement("iframe")).setAttribute("id","historyjs-iframe"),t.style.display="none",a.body.appendChild(t),t.contentWindow.document.open(),t.contentWindow.document.close(),r="",n=!1,i.checkerFunction=function(){if(n)return!1;n=!0;var a=i.getHash()||"",s=i.unescapeHash(t.contentWindow.document.location.hash)||"";return a!==u?(u=a,s!==a&&(r=s=a,t.contentWindow.document.open(),t.contentWindow.document.close(),t.contentWindow.document.location.hash=i.escapeHash(a)),i.Adapter.trigger(e,"hashchange")):s!==r&&(r=s,i.setHash(s,!1)),n=!1,!0}):i.checkerFunction=function(){var t=i.getHash();return t!==u&&(u=t,i.Adapter.trigger(e,"hashchange")),!0},i.intervalList.push(s(i.checkerFunction,i.options.hashChangeInterval)),!0},i.Adapter.onDomLoad(i.hashChangeInit)),i.emulated.pushState&&(i.onHashChange=function(t){var r,n=t&&t.newURL||a.location.href,s=i.getHashByUrl(n),u=null;return i.isLastHash(s)?(i.busy(!1),!1):(i.doubleCheckComplete(),i.saveHash(s),s&&i.isTraditionalAnchor(s)?(i.Adapter.trigger(e,"anchorchange"),i.busy(!1),!1):(u=i.extractState(i.getFullUrl(s||a.location.href,!1),!0),i.isLastSavedState(u)?(i.busy(!1),!1):(i.getHashByState(u),(r=i.discardedState(u))?(i.getHashByIndex(-2)===i.getHashByState(r.forwardState)?i.back(!1):i.forward(!1),!1):(i.pushState(u.data,u.title,u.url,!1),!0))))},i.Adapter.bind(e,"hashchange",i.onHashChange),i.pushState=function(t,r,n,s){if(i.getHashByUrl(n))throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(!1!==s&&i.busy())return i.pushQueue({scope:i,callback:i.pushState,args:arguments,queue:s}),!1;i.busy(!0);var u=i.createStateObject(t,r,n),l=i.getHashByState(u),c=i.getState(!1),d=i.getHashByState(c),p=i.getHash();return i.storeState(u),i.expectedStateId=u.id,i.recycleState(u),i.setTitle(u),l===d?(i.busy(!1),!1):l!==p&&l!==i.getShortUrl(a.location.href)?(i.setHash(l,!1),!1):(i.saveState(u),i.Adapter.trigger(e,"statechange"),i.busy(!1),!0)},i.replaceState=function(e,t,a,r){if(i.getHashByUrl(a))throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(!1!==r&&i.busy())return i.pushQueue({scope:i,callback:i.replaceState,args:arguments,queue:r}),!1;i.busy(!0);var n=i.createStateObject(e,t,a),s=i.getState(!1),u=i.getStateByIndex(-2);return i.discardState(s,n,u),i.pushState(n.data,n.title,n.url,!1),!0}),i.emulated.pushState&&i.getHash()&&!i.emulated.hashChange&&i.Adapter.onDomLoad((function(){i.Adapter.trigger(e,"hashchange")}))},void 0!==i.init&&i.init()}(window),function(e,t){"use strict";var a=e.console||t,r=e.document,n=e.navigator,s=e.sessionStorage||!1,i=e.setTimeout,u=e.clearTimeout,l=e.setInterval,c=e.clearInterval,d=e.JSON,p=e.alert,h=e.History=e.History||{},g=e.history;if(d.stringify=d.stringify||d.encode,d.parse=d.parse||d.decode,void 0!==h.init)throw new Error("History.js Core has already been loaded...");h.init=function(){return void 0!==h.Adapter&&(void 0!==h.initCore&&h.initCore(),void 0!==h.initHtml4&&h.initHtml4(),!0)},h.initCore=function(){if(void 0!==h.initCore.initialized)return!1;if(h.initCore.initialized=!0,h.options=h.options||{},h.options.hashChangeInterval=h.options.hashChangeInterval||100,h.options.safariPollInterval=h.options.safariPollInterval||500,h.options.doubleCheckInterval=h.options.doubleCheckInterval||500,h.options.storeInterval=h.options.storeInterval||1e3,h.options.busyDelay=h.options.busyDelay||250,h.options.debug=h.options.debug||!1,h.options.initialTitle=h.options.initialTitle||r.title,h.intervalList=[],h.clearAllIntervals=function(){var e,t=h.intervalList;if(null!=t){for(e=0;e<t.length;e++)c(t[e]);h.intervalList=null}},h.debug=function(){h.options.debug&&h.log.apply(h,arguments)},h.log=function(){var e,t,n,s,i,u=void 0!==a&&void 0!==a.log&&void 0!==a.log.apply,l=r.getElementById("log");for(u?(e=(s=Array.prototype.slice.call(arguments)).shift(),void 0!==a.debug?a.debug.apply(a,[e,s]):a.log.apply(a,[e,s])):e="\n"+arguments[0]+"\n",t=1,n=arguments.length;t<n;++t){if("object"==typeof(i=arguments[t])&&void 0!==d)try{i=d.stringify(i)}catch(e){}e+="\n"+i+"\n"}return l?(l.value+=e+"\n-----\n",l.scrollTop=l.scrollHeight-l.clientHeight):u||p(e),!0},h.getInternetExplorerMajorVersion=function(){return h.getInternetExplorerMajorVersion.cached=void 0!==h.getInternetExplorerMajorVersion.cached?h.getInternetExplorerMajorVersion.cached:function(){for(var e=3,t=r.createElement("div"),a=t.getElementsByTagName("i");(t.innerHTML="\x3c!--[if gt IE "+ ++e+"]><i></i><![endif]--\x3e")&&a[0];);return e>4&&e}()},h.isInternetExplorer=function(){return h.isInternetExplorer.cached=void 0!==h.isInternetExplorer.cached?h.isInternetExplorer.cached:Boolean(h.getInternetExplorerMajorVersion())},h.emulated={pushState:!Boolean(e.history&&e.history.pushState&&e.history.replaceState&&!/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(n.userAgent)&&!/AppleWebKit\/5([0-2]|3[0-2])/i.test(n.userAgent)),hashChange:Boolean(!("onhashchange"in e||"onhashchange"in r)||h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8)},h.enabled=!h.emulated.pushState,h.bugs={setHash:Boolean(!h.emulated.pushState&&"Apple Computer, Inc."===n.vendor&&/AppleWebKit\/5([0-2]|3[0-3])/.test(n.userAgent)),safariPoll:Boolean(!h.emulated.pushState&&"Apple Computer, Inc."===n.vendor&&/AppleWebKit\/5([0-2]|3[0-3])/.test(n.userAgent)),ieDoubleCheck:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<7)},h.isEmptyObject=function(e){for(var t in e)return!1;return!0},h.cloneObject=function(e){var t,a;return e?(t=d.stringify(e),a=d.parse(t)):a={},a},h.getRootUrl=function(){var e=r.location.protocol+"//"+(r.location.hostname||r.location.host);return r.location.port&&(e+=":"+r.location.port),e+="/"},h.getBaseHref=function(){var e=r.getElementsByTagName("base"),t="";return 1===e.length&&(t=e[0].href.replace(/[^\/]+$/,"")),(t=t.replace(/\/+$/,""))&&(t+="/"),t},h.getBaseUrl=function(){return h.getBaseHref()||h.getBasePageUrl()||h.getRootUrl()},h.getPageUrl=function(){return((h.getState(!1,!1)||{}).url||r.location.href).replace(/\/+$/,"").replace(/[^\/]+$/,(function(e,t,a){return/\./.test(e)?e:e+"/"}))},h.getBasePageUrl=function(){return r.location.href.replace(/[#\?].*/,"").replace(/[^\/]+$/,(function(e,t,a){return/[^\/]$/.test(e)?"":e})).replace(/\/+$/,"")+"/"},h.getFullUrl=function(e,t){var a=e,r=e.substring(0,1);return t=void 0===t||t,/[a-z]+\:\/\//.test(e)||(a="/"===r?h.getRootUrl()+e.replace(/^\/+/,""):"#"===r?h.getPageUrl().replace(/#.*/,"")+e:"?"===r?h.getPageUrl().replace(/[\?#].*/,"")+e:t?h.getBaseUrl()+e.replace(/^(\.\/)+/,""):h.getBasePageUrl()+e.replace(/^(\.\/)+/,"")),a.replace(/\#$/,"")},h.getShortUrl=function(e){var t=e,a=h.getBaseUrl(),r=h.getRootUrl();return h.emulated.pushState&&(t=t.replace(a,"")),t=t.replace(r,"/"),h.isTraditionalAnchor(t)&&(t="./"+t),t=t.replace(/^(\.\/)+/g,"./").replace(/\#$/,"")},h.store={},h.idToState=h.idToState||{},h.stateToId=h.stateToId||{},h.urlToId=h.urlToId||{},h.storedStates=h.storedStates||[],h.savedStates=h.savedStates||[],h.normalizeStore=function(){h.store.idToState=h.store.idToState||{},h.store.urlToId=h.store.urlToId||{},h.store.stateToId=h.store.stateToId||{}},h.getState=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);var a=h.getLastSavedState();return!a&&t&&(a=h.createStateObject()),e&&((a=h.cloneObject(a)).url=a.cleanUrl||a.url),a},h.getIdByState=function(e){var t,a=h.extractId(e.url);if(!a)if(t=h.getStateString(e),void 0!==h.stateToId[t])a=h.stateToId[t];else if(void 0!==h.store.stateToId[t])a=h.store.stateToId[t];else{for(;a=(new Date).getTime()+String(Math.random()).replace(/\D/g,""),void 0!==h.idToState[a]||void 0!==h.store.idToState[a];);h.stateToId[t]=a,h.idToState[a]=e}return a},h.normalizeState=function(e){var t,a;return e&&"object"==typeof e||(e={}),void 0!==e.normalized?e:(e.data&&"object"==typeof e.data||(e.data={}),(t={}).normalized=!0,t.title=e.title||"",t.url=h.getFullUrl(h.unescapeString(e.url||r.location.href)),t.hash=h.getShortUrl(t.url),t.data=h.cloneObject(e.data),t.id=h.getIdByState(t),t.cleanUrl=t.url.replace(/\??\&_suid.*/,""),t.url=t.cleanUrl,a=!h.isEmptyObject(t.data),(t.title||a)&&(t.hash=h.getShortUrl(t.url).replace(/\??\&_suid.*/,""),/\?/.test(t.hash)||(t.hash+="?"),t.hash+="&_suid="+t.id),t.hashedUrl=h.getFullUrl(t.hash),(h.emulated.pushState||h.bugs.safariPoll)&&h.hasUrlDuplicate(t)&&(t.url=t.hashedUrl),t)},h.createStateObject=function(e,t,a){var r={data:e,title:t,url:a};return r=h.normalizeState(r)},h.getStateById=function(e){return e=String(e),h.idToState[e]||h.store.idToState[e]||t},h.getStateString=function(e){var t;return t={data:h.normalizeState(e).data,title:e.title,url:e.url},d.stringify(t)},h.getStateId=function(e){return h.normalizeState(e).id},h.getHashByState=function(e){return h.normalizeState(e).hash},h.extractId=function(e){var t;return(t=/(.*)\&_suid=([0-9]+)$/.exec(e))&&t[1]||e,(t?String(t[2]||""):"")||!1},h.isTraditionalAnchor=function(e){return!/[\/\?\.]/.test(e)},h.extractState=function(e,t){var a,r,n=null;return t=t||!1,(a=h.extractId(e))&&(n=h.getStateById(a)),n||(r=h.getFullUrl(e),(a=h.getIdByUrl(r)||!1)&&(n=h.getStateById(a)),!n&&t&&!h.isTraditionalAnchor(e)&&(n=h.createStateObject(null,null,r))),n},h.getIdByUrl=function(e){return h.urlToId[e]||h.store.urlToId[e]||t},h.getLastSavedState=function(){return h.savedStates[h.savedStates.length-1]||t},h.getLastStoredState=function(){return h.storedStates[h.storedStates.length-1]||t},h.hasUrlDuplicate=function(e){var t;return(t=h.extractState(e.url))&&t.id!==e.id},h.storeState=function(e){return h.urlToId[e.url]=e.id,h.storedStates.push(h.cloneObject(e)),e},h.isLastSavedState=function(e){var t=!1;return h.savedStates.length&&(t=e.id===h.getLastSavedState().id),t},h.saveState=function(e){return!h.isLastSavedState(e)&&(h.savedStates.push(h.cloneObject(e)),!0)},h.getStateByIndex=function(e){return void 0===e?h.savedStates[h.savedStates.length-1]:e<0?h.savedStates[h.savedStates.length+e]:h.savedStates[e]},h.getHash=function(){return h.unescapeHash(r.location.hash)},h.unescapeString=function(t){for(var a,r=t;(a=e.unescape(r))!==r;)r=a;return r},h.unescapeHash=function(e){var t=h.normalizeHash(e);return t=h.unescapeString(t)},h.normalizeHash=function(e){return e.replace(/[^#]*#/,"").replace(/#.*/,"")},h.setHash=function(e,t){var a,n,s;return!1!==t&&h.busy()?(h.pushQueue({scope:h,callback:h.setHash,args:arguments,queue:t}),!1):(a=h.escapeHash(e),h.busy(!0),(n=h.extractState(e,!0))&&!h.emulated.pushState?h.pushState(n.data,n.title,n.url,!1):r.location.hash!==a&&(h.bugs.setHash?(s=h.getPageUrl(),h.pushState(null,null,s+"#"+a,!1)):r.location.hash=a),h)},h.escapeHash=function(t){var a=h.normalizeHash(t);return a=e.escape(a),h.bugs.hashEscape||(a=a.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),a},h.getHashByUrl=function(e){var t=String(e).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return t=h.unescapeHash(t)},h.setTitle=function(e){var t,a=e.title;a||(t=h.getStateByIndex(0))&&t.url===e.url&&(a=t.title||h.options.initialTitle);try{r.getElementsByTagName("title")[0].innerHTML=a.replace("<","&lt;").replace(">","&gt;").replace(" & "," &amp; ")}catch(e){}return r.title=a,h},h.queues=[],h.busy=function(e){if(void 0!==e?h.busy.flag=e:void 0===h.busy.flag&&(h.busy.flag=!1),!h.busy.flag){u(h.busy.timeout);var b=function(){var e,t,a;if(!h.busy.flag)for(e=h.queues.length-1;e>=0;--e)0!==(t=h.queues[e]).length&&(a=t.shift(),h.fireQueueItem(a),h.busy.timeout=i(b,h.options.busyDelay))};h.busy.timeout=i(b,h.options.busyDelay)}return h.busy.flag},h.busy.flag=!1,h.fireQueueItem=function(e){return e.callback.apply(e.scope||h,e.args||[])},h.pushQueue=function(e){return h.queues[e.queue||0]=h.queues[e.queue||0]||[],h.queues[e.queue||0].push(e),h},h.queue=function(e,t){return"function"==typeof e&&(e={callback:e}),void 0!==t&&(e.queue=t),h.busy()?h.pushQueue(e):h.fireQueueItem(e),h},h.clearQueue=function(){return h.busy.flag=!1,h.queues=[],h},h.stateChanged=!1,h.doubleChecker=!1,h.doubleCheckComplete=function(){return h.stateChanged=!0,h.doubleCheckClear(),h},h.doubleCheckClear=function(){return h.doubleChecker&&(u(h.doubleChecker),h.doubleChecker=!1),h},h.doubleCheck=function(e){return h.stateChanged=!1,h.doubleCheckClear(),h.bugs.ieDoubleCheck&&(h.doubleChecker=i((function(){return h.doubleCheckClear(),h.stateChanged||e(),!0}),h.options.doubleCheckInterval)),h},h.safariStatePoll=function(){var t=h.extractState(r.location.href);if(!h.isLastSavedState(t))return t||h.createStateObject(),h.Adapter.trigger(e,"popstate"),h},h.back=function(e){return!1!==e&&h.busy()?(h.pushQueue({scope:h,callback:h.back,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck((function(){h.back(!1)})),g.go(-1),!0)},h.forward=function(e){return!1!==e&&h.busy()?(h.pushQueue({scope:h,callback:h.forward,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck((function(){h.forward(!1)})),g.go(1),!0)},h.go=function(e,t){var a;if(e>0)for(a=1;a<=e;++a)h.forward(t);else{if(!(e<0))throw new Error("History.go: History.go requires a positive or negative integer passed.");for(a=-1;a>=e;--a)h.back(t)}return h},h.emulated.pushState){var o=function(){};h.pushState=h.pushState||o,h.replaceState=h.replaceState||o}else h.onPopState=function(t,a){var n,s,i=!1,u=!1;return h.doubleCheckComplete(),(n=h.getHash())?((s=h.extractState(n||r.location.href,!0))?h.replaceState(s.data,s.title,s.url,!1):(h.Adapter.trigger(e,"anchorchange"),h.busy(!1)),h.expectedStateId=!1,!1):((u=(i=h.Adapter.extractEventData("state",t,a)||!1)?h.getStateById(i):h.expectedStateId?h.getStateById(h.expectedStateId):h.extractState(r.location.href))||(u=h.createStateObject(null,null,r.location.href)),h.expectedStateId=!1,h.isLastSavedState(u)?(h.busy(!1),!1):(h.storeState(u),h.saveState(u),h.setTitle(u),h.Adapter.trigger(e,"statechange"),h.busy(!1),!0))},h.Adapter.bind(e,"popstate",h.onPopState),h.pushState=function(t,a,r,n){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(!1!==n&&h.busy())return h.pushQueue({scope:h,callback:h.pushState,args:arguments,queue:n}),!1;h.busy(!0);var s=h.createStateObject(t,a,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,g.pushState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0},h.replaceState=function(t,a,r,n){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(!1!==n&&h.busy())return h.pushQueue({scope:h,callback:h.replaceState,args:arguments,queue:n}),!1;h.busy(!0);var s=h.createStateObject(t,a,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,g.replaceState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0};if(s){try{h.store=d.parse(s.getItem("History.store"))||{}}catch(e){h.store={}}h.normalizeStore()}else h.store={},h.normalizeStore();h.Adapter.bind(e,"beforeunload",h.clearAllIntervals),h.Adapter.bind(e,"unload",h.clearAllIntervals),h.saveState(h.storeState(h.extractState(r.location.href,!0))),s&&(h.onUnload=function(){var e,t;try{e=d.parse(s.getItem("History.store"))||{}}catch(t){e={}}for(t in e.idToState=e.idToState||{},e.urlToId=e.urlToId||{},e.stateToId=e.stateToId||{},h.idToState)h.idToState.hasOwnProperty(t)&&(e.idToState[t]=h.idToState[t]);for(t in h.urlToId)h.urlToId.hasOwnProperty(t)&&(e.urlToId[t]=h.urlToId[t]);for(t in h.stateToId)h.stateToId.hasOwnProperty(t)&&(e.stateToId[t]=h.stateToId[t]);h.store=e,h.normalizeStore(),s.setItem("History.store",d.stringify(e))},h.intervalList.push(l(h.onUnload,h.options.storeInterval)),h.Adapter.bind(e,"beforeunload",h.onUnload),h.Adapter.bind(e,"unload",h.onUnload)),h.emulated.pushState||(h.bugs.safariPoll&&h.intervalList.push(l(h.safariStatePoll,h.options.safariPollInterval)),"Apple Computer, Inc."!==n.vendor&&"Mozilla"!==(n.appCodeName||"")||(h.Adapter.bind(e,"hashchange",(function(){h.Adapter.trigger(e,"popstate")})),h.getHash()&&h.Adapter.onDomLoad((function(){h.Adapter.trigger(e,"hashchange")}))))},h.init()}(window),History.unescapeString=function(e){return decodeURIComponent(e)};
/*!
Waypoints - 3.1.1
Copyright © 2011-2015 Caleb Troughton
Licensed under the MIT license.
https://github.com/imakewebthings/waypoints/blog/master/licenses.txt
*/
!function(){"use strict";function t(o){if(!o)throw new Error("No options passed to Waypoint constructor");if(!o.element)throw new Error("No element option passed to Waypoint constructor");if(!o.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,o),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=o.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,e+=1}var e=0,i={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var o in i)e.push(i[o]);for(var n=0,r=e.length;r>n;n++)e[n][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.invokeAll("enable")},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,o={},n=window.Waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical);t&&e&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,n.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||n.isTouch)&&(e.didScroll=!0,n.requestAnimationFrame(t))})},e.prototype.handleResize=function(){n.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newScroll>o.oldScroll,r=n?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s],l=o.oldScroll<a.triggerPoint,h=o.newScroll>=a.triggerPoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queueTrigger(r),t[a.group.id]=a.group)}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;n>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=this.adapter.offset(),o={};this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var n in t){var r=t[n];for(var s in this.waypoints[n]){var a,l,h,p,u,c=this.waypoints[n][s],d=c.options.offset,f=c.triggerPoint,w=0,y=null==f;c.element!==c.element.window&&(w=c.adapter.offset()[r.offsetProp]),"function"==typeof d?d=d.apply(c):"string"==typeof d&&(d=parseFloat(d),c.options.offset.indexOf("%")>-1&&(d=Math.ceil(r.contextDimension*d/100))),a=r.contextScroll-r.contextOffset,c.triggerPoint=w+a-d,l=f<r.oldScroll,h=c.triggerPoint>=r.oldScroll,p=l&&h,u=!l&&!h,!y&&p?(c.queueTrigger(r.backward),o[c.group.id]=c.group):!y&&u?(c.queueTrigger(r.forward),o[c.group.id]=c.group):y&&r.oldScroll>=c.triggerPoint&&(c.queueTrigger(r.forward),o[c.group.id]=c.group)}}for(var g in o)o[g].flushTriggers();return this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in o)o[t].refresh()},e.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){r&&r(),e.refreshAll()},n.requestAnimationFrame=function(e){var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t;i.call(window,e)},n.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},n=window.Waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},i.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var o=this.triggerQueues[i],n="up"===i||"left"===i;o.sort(n?e:t);for(var r=0,s=o.length;s>r;r+=1){var a=o[r];(a.options.continuous||r===o.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints),o=i===this.waypoints.length-1;return o?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},i.prototype.remove=function(t){var e=n.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findOrCreate=function(t){return o[t.axis][t.name]||new i(t)},n.Group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jQuery,i=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(e,i){t.prototype[i]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inArray","isEmptyObject"],function(i,o){t[o]=e[o]}),i.adapters.push({name:"jquery",Adapter:t}),i.Adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],o=arguments[0];return t.isFunction(arguments[0])&&(o=t.extend({},arguments[1]),o.handler=arguments[0]),this.each(function(){var n=t.extend({},o,{element:this});"string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]),i.push(new e(n))}),i}}var e=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}();
(function (t, e) { if (typeof define === "function" && define.amd) { define(["jquery"], e) } else if (typeof exports === "object") { module.exports = e(require("jquery")) } else { e(t.jQuery) } })(this, function (t) { t.transit = { version: "0.9.12", propertyMap: { marginLeft: "margin", marginRight: "margin", marginBottom: "margin", marginTop: "margin", paddingLeft: "padding", paddingRight: "padding", paddingBottom: "padding", paddingTop: "padding" }, enabled: true, useTransitionEnd: false }; var e = document.createElement("div"); var n = {}; function i(t) { if (t in e.style) return t; var n = ["Moz", "Webkit", "O", "ms"]; var i = t.charAt(0).toUpperCase() + t.substr(1); for (var r = 0; r < n.length; ++r) { var s = n[r] + i; if (s in e.style) { return s } } } function r() { e.style[n.transform] = ""; e.style[n.transform] = "rotateY(90deg)"; return e.style[n.transform] !== "" } var s = navigator.userAgent.toLowerCase().indexOf("chrome") > -1; n.transition = i("transition"); n.transitionDelay = i("transitionDelay"); n.transform = i("transform"); n.transformOrigin = i("transformOrigin"); n.filter = i("Filter"); n.transform3d = r(); var a = { transition: "transitionend", MozTransition: "transitionend", OTransition: "oTransitionEnd", WebkitTransition: "webkitTransitionEnd", msTransition: "MSTransitionEnd" }; var o = n.transitionEnd = a[n.transition] || null; for (var u in n) { if (n.hasOwnProperty(u) && typeof t.support[u] === "undefined") { t.support[u] = n[u] } } e = null; t.cssEase = { _default: "ease", "in": "ease-in", out: "ease-out", "in-out": "ease-in-out", snap: "cubic-bezier(0,1,.5,1)", easeInCubic: "cubic-bezier(.550,.055,.675,.190)", easeOutCubic: "cubic-bezier(.215,.61,.355,1)", easeInOutCubic: "cubic-bezier(.645,.045,.355,1)", easeInCirc: "cubic-bezier(.6,.04,.98,.335)", easeOutCirc: "cubic-bezier(.075,.82,.165,1)", easeInOutCirc: "cubic-bezier(.785,.135,.15,.86)", easeInExpo: "cubic-bezier(.95,.05,.795,.035)", easeOutExpo: "cubic-bezier(.19,1,.22,1)", easeInOutExpo: "cubic-bezier(1,0,0,1)", easeInQuad: "cubic-bezier(.55,.085,.68,.53)", easeOutQuad: "cubic-bezier(.25,.46,.45,.94)", easeInOutQuad: "cubic-bezier(.455,.03,.515,.955)", easeInQuart: "cubic-bezier(.895,.03,.685,.22)", easeOutQuart: "cubic-bezier(.165,.84,.44,1)", easeInOutQuart: "cubic-bezier(.77,0,.175,1)", easeInQuint: "cubic-bezier(.755,.05,.855,.06)", easeOutQuint: "cubic-bezier(.23,1,.32,1)", easeInOutQuint: "cubic-bezier(.86,0,.07,1)", easeInSine: "cubic-bezier(.47,0,.745,.715)", easeOutSine: "cubic-bezier(.39,.575,.565,1)", easeInOutSine: "cubic-bezier(.445,.05,.55,.95)", easeInBack: "cubic-bezier(.6,-.28,.735,.045)", easeOutBack: "cubic-bezier(.175, .885,.32,1.275)", easeInOutBack: "cubic-bezier(.68,-.55,.265,1.55)" }; t.cssHooks["transit:transform"] = { get: function (e) { return t(e).data("transform") || new f }, set: function (e, i) { var r = i; if (!(r instanceof f)) { r = new f(r) } if (n.transform === "WebkitTransform" && !s) { e.style[n.transform] = r.toString(true) } else { e.style[n.transform] = r.toString() } t(e).data("transform", r) } }; t.cssHooks.transform = { set: t.cssHooks["transit:transform"].set }; t.cssHooks.filter = { get: function (t) { return t.style[n.filter] }, set: function (t, e) { t.style[n.filter] = e } }; if (t.fn.jquery < "1.8") { t.cssHooks.transformOrigin = { get: function (t) { return t.style[n.transformOrigin] }, set: function (t, e) { t.style[n.transformOrigin] = e } }; t.cssHooks.transition = { get: function (t) { return t.style[n.transition] }, set: function (t, e) { t.style[n.transition] = e } } } p("scale"); p("scaleX"); p("scaleY"); p("translate"); p("rotate"); p("rotateX"); p("rotateY"); p("rotate3d"); p("perspective"); p("skewX"); p("skewY"); p("x", true); p("y", true); function f(t) { if (typeof t === "string") { this.parse(t) } return this } f.prototype = { setFromString: function (t, e) { var n = typeof e === "string" ? e.split(",") : e.constructor === Array ? e : [e]; n.unshift(t); f.prototype.set.apply(this, n) }, set: function (t) { var e = Array.prototype.slice.apply(arguments, [1]); if (this.setter[t]) { this.setter[t].apply(this, e) } else { this[t] = e.join(",") } }, get: function (t) { if (this.getter[t]) { return this.getter[t].apply(this) } else { return this[t] || 0 } }, setter: { rotate: function (t) { this.rotate = b(t, "deg") }, rotateX: function (t) { this.rotateX = b(t, "deg") }, rotateY: function (t) { this.rotateY = b(t, "deg") }, scale: function (t, e) { if (e === undefined) { e = t } this.scale = t + "," + e }, skewX: function (t) { this.skewX = b(t, "deg") }, skewY: function (t) { this.skewY = b(t, "deg") }, perspective: function (t) { this.perspective = b(t, "px") }, x: function (t) { this.set("translate", t, null) }, y: function (t) { this.set("translate", null, t) }, translate: function (t, e) { if (this._translateX === undefined) { this._translateX = 0 } if (this._translateY === undefined) { this._translateY = 0 } if (t !== null && t !== undefined) { this._translateX = b(t, "px") } if (e !== null && e !== undefined) { this._translateY = b(e, "px") } this.translate = this._translateX + "," + this._translateY } }, getter: { x: function () { return this._translateX || 0 }, y: function () { return this._translateY || 0 }, scale: function () { var t = (this.scale || "1,1").split(","); if (t[0]) { t[0] = parseFloat(t[0]) } if (t[1]) { t[1] = parseFloat(t[1]) } return t[0] === t[1] ? t[0] : t }, rotate3d: function () { var t = (this.rotate3d || "0,0,0,0deg").split(","); for (var e = 0; e <= 3; ++e) { if (t[e]) { t[e] = parseFloat(t[e]) } } if (t[3]) { t[3] = b(t[3], "deg") } return t } }, parse: function (t) { var e = this; t.replace(/([a-zA-Z0-9]+)\((.*?)\)/g, function (t, n, i) { e.setFromString(n, i) }) }, toString: function (t) { var e = []; for (var i in this) { if (this.hasOwnProperty(i)) { if (!n.transform3d && (i === "rotateX" || i === "rotateY" || i === "perspective" || i === "transformOrigin")) { continue } if (i[0] !== "_") { if (t && i === "scale") { e.push(i + "3d(" + this[i] + ",1)") } else if (t && i === "translate") { e.push(i + "3d(" + this[i] + ",0)") } else { e.push(i + "(" + this[i] + ")") } } } } return e.join(" ") } }; function c(t, e, n) { if (e === true) { t.queue(n) } else if (e) { t.queue(e, n) } else { t.each(function () { n.call(this) }) } } function l(e) { var i = []; t.each(e, function (e) { e = t.camelCase(e); e = t.transit.propertyMap[e] || t.cssProps[e] || e; e = h(e); if (n[e]) e = h(n[e]); if (t.inArray(e, i) === -1) { i.push(e) } }); return i } function d(e, n, i, r) { var s = l(e); if (t.cssEase[i]) { i = t.cssEase[i] } var a = "" + y(n) + " " + i; if (parseInt(r, 10) > 0) { a += " " + y(r) } var o = []; t.each(s, function (t, e) { o.push(e + " " + a) }); return o.join(", ") } t.fn.transition = t.fn.transit = function (e, i, r, s) { var a = this; var u = 0; var f = true; var l = t.extend(true, {}, e); if (typeof i === "function") { s = i; i = undefined } if (typeof i === "object") { r = i.easing; u = i.delay || 0; f = typeof i.queue === "undefined" ? true : i.queue; s = i.complete; i = i.duration } if (typeof r === "function") { s = r; r = undefined } if (typeof l.easing !== "undefined") { r = l.easing; delete l.easing } if (typeof l.duration !== "undefined") { i = l.duration; delete l.duration } if (typeof l.complete !== "undefined") { s = l.complete; delete l.complete } if (typeof l.queue !== "undefined") { f = l.queue; delete l.queue } if (typeof l.delay !== "undefined") { u = l.delay; delete l.delay } if (typeof i === "undefined") { i = t.fx.speeds._default } if (typeof r === "undefined") { r = t.cssEase._default } i = y(i); var p = d(l, i, r, u); var h = t.transit.enabled && n.transition; var b = h ? parseInt(i, 10) + parseInt(u, 10) : 0; if (b === 0) { var g = function (t) { a.css(l); if (s) { s.apply(a) } if (t) { t() } }; c(a, f, g); return a } var m = {}; var v = function (e) { var i = false; var r = function () { if (i) { a.unbind(o, r) } if (b > 0) { a.each(function () { this.style[n.transition] = m[this] || null }) } if (typeof s === "function") { s.apply(a) } if (typeof e === "function") { e() } }; if (b > 0 && o && t.transit.useTransitionEnd) { i = true; a.bind(o, r) } else { window.setTimeout(r, b) } a.each(function () { if (b > 0) { this.style[n.transition] = p } t(this).css(l) }) }; var z = function (t) { this.offsetWidth; v(t) }; c(a, f, z); return this }; function p(e, i) { if (!i) { t.cssNumber[e] = true } t.transit.propertyMap[e] = n.transform; t.cssHooks[e] = { get: function (n) { var i = t(n).css("transit:transform"); return i.get(e) }, set: function (n, i) { var r = t(n).css("transit:transform"); r.setFromString(e, i); t(n).css({ "transit:transform": r }) } } } function h(t) { return t.replace(/([A-Z])/g, function (t) { return "-" + t.toLowerCase() }) } function b(t, e) { if (typeof t === "string" && !t.match(/^[\-0-9\.]+$/)) { return t } else { return "" + t + e } } function y(e) { var n = e; if (typeof n === "string" && !n.match(/^[\-0-9\.]+/)) { n = t.fx.speeds[n] || t.fx.speeds._default } return b(n, "ms") } t.transit.getTransitionValue = d; return t });
/*!
 * Isotope PACKAGED v3.0.6
 *
 * Licensed GPLv3 for open source use
 * or Isotope Commercial License for commercial use
 *
 * https://isotope.metafizzy.co
 * Copyright 2010-2018 Metafizzy
 */

!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,s,a){function u(t,e,o){var n,s="$()."+i+'("'+e+'")';return t.each(function(t,u){var h=a.data(u,i);if(!h)return void r(i+" not initialized. Cannot call methods, i.e. "+s);var d=h[e];if(!d||"_"==e.charAt(0))return void r(s+" is not a valid method");var l=d.apply(h,o);n=void 0===n?l:n}),void 0!==n?n:t}function h(t,e){t.each(function(t,o){var n=a.data(o,i);n?(n.option(e),n._init()):(n=new s(o,e),a.data(o,i,n))})}a=a||e||t.jQuery,a&&(s.prototype.option||(s.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=n.call(arguments,1);return u(this,t,e)}return h(this,t),this},o(a))}function o(t){!t||t&&t.bridget||(t.bridget=i)}var n=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return o(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},o=i[t]=i[t]||[];return o.indexOf(e)==-1&&o.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},o=i[t]=i[t]||{};return o[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var o=i.indexOf(e);return o!=-1&&i.splice(o,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var o=this._onceEvents&&this._onceEvents[t],n=0;n<i.length;n++){var s=i[n],r=o&&o[s];r&&(this.off(t,s),delete o[s]),s.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=t.indexOf("%")==-1&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e<h;e++){var i=u[e];t[i]=0}return t}function o(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function n(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var n=o(e);r=200==Math.round(t(n.width)),s.isBoxSizeOuter=r,i.removeChild(e)}}function s(e){if(n(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var s=o(e);if("none"==s.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==s.boxSizing,l=0;l<h;l++){var f=u[l],c=s[f],m=parseFloat(c);a[f]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,y=a.paddingTop+a.paddingBottom,g=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,I=d&&r,x=t(s.width);x!==!1&&(a.width=x+(I?0:p+_));var S=t(s.height);return S!==!1&&(a.height=S+(I?0:y+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(y+z),a.outerWidth=a.width+g,a.outerHeight=a.height+v,a}}var r,a="undefined"==typeof console?e:function(t){console.error(t)},u=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],h=u.length,d=!1;return s}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var o=e[i],n=o+"MatchesSelector";if(t[n])return n}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e};var o=Array.prototype.slice;i.makeArray=function(t){if(Array.isArray(t))return t;if(null===t||void 0===t)return[];var e="object"==typeof t&&"number"==typeof t.length;return e?o.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);i!=-1&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,o){t=i.makeArray(t);var n=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!o)return void n.push(t);e(t,o)&&n.push(t);for(var i=t.querySelectorAll(o),s=0;s<i.length;s++)n.push(i[s])}}),n},i.debounceMethod=function(t,e,i){i=i||100;var o=t.prototype[e],n=e+"Timeout";t.prototype[e]=function(){var t=this[n];clearTimeout(t);var e=arguments,s=this;this[n]=setTimeout(function(){o.apply(s,e),delete s[n]},i)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var n=t.console;return i.htmlInit=function(e,o){i.docReady(function(){var s=i.toDashed(o),r="data-"+s,a=document.querySelectorAll("["+r+"]"),u=document.querySelectorAll(".js-"+s),h=i.makeArray(a).concat(i.makeArray(u)),d=r+"-options",l=t.jQuery;h.forEach(function(t){var i,s=t.getAttribute(r)||t.getAttribute(d);try{i=s&&JSON.parse(s)}catch(a){return void(n&&n.error("Error parsing "+r+" on "+t.className+": "+a))}var u=new e(t,i);l&&l.data(t,o,u)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function o(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function n(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var s=document.documentElement.style,r="string"==typeof s.transition?"transition":"WebkitTransition",a="string"==typeof s.transform?"transform":"WebkitTransform",u={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],h={transform:a,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"},d=o.prototype=Object.create(t.prototype);d.constructor=o,d._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.getSize=function(){this.size=e(this.element)},d.css=function(t){var e=this.element.style;for(var i in t){var o=h[i]||i;e[o]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),o=t[e?"left":"right"],n=t[i?"top":"bottom"],s=parseFloat(o),r=parseFloat(n),a=this.layout.size;o.indexOf("%")!=-1&&(s=s/100*a.width),n.indexOf("%")!=-1&&(r=r/100*a.height),s=isNaN(s)?0:s,r=isNaN(r)?0:r,s-=e?a.paddingLeft:a.paddingRight,r-=i?a.paddingTop:a.paddingBottom,this.position.x=s,this.position.y=r},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop"),n=i?"paddingLeft":"paddingRight",s=i?"left":"right",r=i?"right":"left",a=this.position.x+t[n];e[s]=this.getXValue(a),e[r]="";var u=o?"paddingTop":"paddingBottom",h=o?"top":"bottom",d=o?"bottom":"top",l=this.position.y+t[u];e[h]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},d.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},d.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},d._transitionTo=function(t,e){this.getPosition();var i=this.position.x,o=this.position.y,n=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),n&&!this.isTransitioning)return void this.layoutPosition();var s=t-i,r=e-o,a={};a.transform=this.getTranslate(s,r),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop");return t=i?t:-t,e=o?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},d.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.moveTo=d._transitionTo,d.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},d._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var o=this.element.offsetHeight;o=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+n(a);d.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(u,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var f={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,o=f[t.propertyName]||t.propertyName;if(delete e.ingProperties[o],i(e.ingProperties)&&this.disableTransition(),o in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[o]),o in e.onEnd){var n=e.onEnd[o];n.call(this),delete e.onEnd[o]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(u,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var c={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(c)},d.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},d.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.remove=function(){return r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},d.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},o}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,o,n,s){return e(t,i,o,n,s)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,o,n){"use strict";function s(t,e){var i=o.getQueryElement(t);if(!i)return void(u&&u.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,h&&(this.$element=h(this.element)),this.options=o.extend({},this.constructor.defaults),this.option(e);var n=++l;this.element.outlayerGUID=n,f[n]=this,this._create();var s=this._getOption("initLayout");s&&this.layout()}function r(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],o=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var n=m[o]||1;return i*n}var u=t.console,h=t.jQuery,d=function(){},l=0,f={};s.namespace="outlayer",s.Item=n,s.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var c=s.prototype;o.extend(c,e.prototype),c.option=function(t){o.extend(this.options,t)},c._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},s.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},c._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),o.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},c.reloadItems=function(){this.items=this._itemize(this.element.children)},c._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,o=[],n=0;n<e.length;n++){var s=e[n],r=new i(s,this);o.push(r)}return o},c._filterFindItemElements=function(t){return o.filterFindElements(t,this.options.itemSelector)},c.getItemElements=function(){return this.items.map(function(t){return t.element})},c.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},c._init=c.layout,c._resetLayout=function(){this.getSize()},c.getSize=function(){this.size=i(this.element)},c._getMeasurement=function(t,e){var o,n=this.options[t];n?("string"==typeof n?o=this.element.querySelector(n):n instanceof HTMLElement&&(o=n),this[t]=o?i(o)[e]:n):this[t]=0},c.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},c._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},c._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var o=this._getItemLayoutPosition(t);o.item=t,o.isInstant=e||t.isLayoutInstant,i.push(o)},this),this._processLayoutQueue(i)}},c._getItemLayoutPosition=function(){return{x:0,y:0}},c._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},c.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},c._positionItem=function(t,e,i,o,n){o?t.goTo(e,i):(t.stagger(n*this.stagger),t.moveTo(e,i))},c._postLayout=function(){this.resizeContainer()},c.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},c._getContainerSize=d,c._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},c._emitCompleteOnItems=function(t,e){function i(){n.dispatchEvent(t+"Complete",null,[e])}function o(){r++,r==s&&i()}var n=this,s=e.length;if(!e||!s)return void i();var r=0;e.forEach(function(e){e.once(t,o)})},c.dispatchEvent=function(t,e,i){var o=e?[e].concat(i):i;if(this.emitEvent(t,o),h)if(this.$element=this.$element||h(this.element),e){var n=h.Event(e);n.type=t,this.$element.trigger(n,i)}else this.$element.trigger(t,i)},c.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},c.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},c.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},c.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){o.removeFrom(this.stamps,t),this.unignore(t)},this)},c._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o.makeArray(t)},c._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},c._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},c._manageStamp=d,c._getElementOffset=function(t){var e=t.getBoundingClientRect(),o=this._boundingRect,n=i(t),s={left:e.left-o.left-n.marginLeft,top:e.top-o.top-n.marginTop,right:o.right-e.right-n.marginRight,bottom:o.bottom-e.bottom-n.marginBottom};return s},c.handleEvent=o.handleEvent,c.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},c.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},c.onresize=function(){this.resize()},o.debounceMethod(s,"onresize",100),c.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},c.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},c.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},c.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},c.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},c.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},c.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},c.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},c.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},c.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},c.getItems=function(t){t=o.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},c.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),o.removeFrom(this.items,t)},this)},c.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete f[e],delete this.element.outlayerGUID,h&&h.removeData(this.element,this.constructor.namespace)},s.data=function(t){t=o.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&f[e]},s.create=function(t,e){var i=r(s);return i.defaults=o.extend({},s.defaults),o.extend(i.defaults,e),i.compatOptions=o.extend({},s.compatOptions),i.namespace=t,i.data=s.data,i.Item=r(n),o.htmlInit(i,t),h&&h.bridget&&h.bridget(t,i),i};var m={ms:1,s:1e3};return s.Item=n,s}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/item",["outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.Item=e(t.Outlayer))}(window,function(t){"use strict";function e(){t.Item.apply(this,arguments)}var i=e.prototype=Object.create(t.Item.prototype),o=i._create;i._create=function(){this.id=this.layout.itemGUID++,o.call(this),this.sortData={}},i.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,e=this.layout._sorters;for(var i in t){var o=e[i];this.sortData[i]=o(this.element,this)}}};var n=i.destroy;return i.destroy=function(){n.apply(this,arguments),this.css({display:""})},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-mode",["get-size/get-size","outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("get-size"),require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=e(t.getSize,t.Outlayer))}(window,function(t,e){"use strict";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 o=i.prototype,n=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout","_getOption"];return n.forEach(function(t){o[t]=function(){return e.prototype[t].apply(this.isotope,arguments)}}),o.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),i=this.isotope.size&&e;return i&&e.innerHeight!=this.isotope.size.innerHeight},o._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},o.getColumnWidth=function(){this.getSegmentSize("column","Width")},o.getRowHeight=function(){this.getSegmentSize("row","Height")},o.getSegmentSize=function(t,e){var i=t+e,o="outer"+e;if(this._getMeasurement(i,o),!this[i]){var n=this.getFirstItemSize();this[i]=n&&n[o]||this.isotope.size["inner"+e]}},o.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},o.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},o.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function n(){i.apply(this,arguments)}return n.prototype=Object.create(o),n.prototype.constructor=n,e&&(n.options=e),n.prototype.namespace=t,i.modes[t]=n,n},i}),function(t,e){"function"==typeof define&&define.amd?define("masonry-layout/masonry",["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var o=i.prototype;return o._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},o.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var o=this.columnWidth+=this.gutter,n=this.containerWidth+this.gutter,s=n/o,r=o-n%o,a=r&&r<1?"round":"floor";s=Math[a](s),this.cols=Math.max(s,1)},o.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,o=e(i);this.containerWidth=o&&o.innerWidth},o._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&e<1?"round":"ceil",o=Math[i](t.size.outerWidth/this.columnWidth);o=Math.min(o,this.cols);for(var n=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",s=this[n](o,t),r={x:this.columnWidth*s.col,y:s.y},a=s.y+t.size.outerHeight,u=o+s.col,h=s.col;h<u;h++)this.colYs[h]=a;return r},o._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},o._getTopColGroup=function(t){if(t<2)return this.colYs;for(var e=[],i=this.cols+1-t,o=0;o<i;o++)e[o]=this._getColGroupY(o,t);return e},o._getColGroupY=function(t,e){if(e<2)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},o._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,o=t>1&&i+t>this.cols;i=o?0:i;var n=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=n?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},o._manageStamp=function(t){var i=e(t),o=this._getElementOffset(t),n=this._getOption("originLeft"),s=n?o.left:o.right,r=s+i.outerWidth,a=Math.floor(s/this.columnWidth);a=Math.max(0,a);var u=Math.floor(r/this.columnWidth);u-=r%this.columnWidth?0:1,u=Math.min(this.cols-1,u);for(var h=this._getOption("originTop"),d=(h?o.top:o.bottom)+i.outerHeight,l=a;l<=u;l++)this.colYs[l]=Math.max(d,this.colYs[l])},o._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},o._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},o.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/masonry",["../layout-mode","masonry-layout/masonry"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode"),require("masonry-layout")):e(t.Isotope.LayoutMode,t.Masonry)}(window,function(t,e){"use strict";var i=t.create("masonry"),o=i.prototype,n={_getElementOffset:!0,layout:!0,_getMeasurement:!0};for(var s in e.prototype)n[s]||(o[s]=e.prototype[s]);var r=o.measureColumns;o.measureColumns=function(){this.items=this.isotope.filteredItems,r.call(this)};var a=o._getOption;return o._getOption=function(t){return"fitWidth"==t?void 0!==this.options.isFitWidth?this.options.isFitWidth:this.options.fitWidth:a.apply(this.isotope,arguments)},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/fit-rows",["../layout-mode"],e):"object"==typeof exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("fitRows"),i=e.prototype;return i._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},i._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,i=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>i&&(this.x=0,this.y=this.maxY);var o={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,o},i._getContainerSize=function(){return{height:this.maxY}},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/vertical",["../layout-mode"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("vertical",{horizontalAlignment:0}),i=e.prototype;return i._resetLayout=function(){this.y=0},i._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},i._getContainerSize=function(){return{height:this.y}},e}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","desandro-matches-selector/matches-selector","fizzy-ui-utils/utils","isotope-layout/js/item","isotope-layout/js/layout-mode","isotope-layout/js/layout-modes/masonry","isotope-layout/js/layout-modes/fit-rows","isotope-layout/js/layout-modes/vertical"],function(i,o,n,s,r,a){return e(t,i,o,n,s,r,a)}):"object"==typeof module&&module.exports?module.exports=e(t,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("isotope-layout/js/item"),require("isotope-layout/js/layout-mode"),require("isotope-layout/js/layout-modes/masonry"),require("isotope-layout/js/layout-modes/fit-rows"),require("isotope-layout/js/layout-modes/vertical")):t.Isotope=e(t,t.Outlayer,t.getSize,t.matchesSelector,t.fizzyUIUtils,t.Isotope.Item,t.Isotope.LayoutMode)}(window,function(t,e,i,o,n,s,r){function a(t,e){return function(i,o){for(var n=0;n<t.length;n++){var s=t[n],r=i.sortData[s],a=o.sortData[s];if(r>a||r<a){var u=void 0!==e[s]?e[s]:e,h=u?1:-1;return(r>a?1:-1)*h}}return 0}}var u=t.jQuery,h=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},d=e.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});d.Item=s,d.LayoutMode=r;var l=d.prototype;l._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),e.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var t in r.modes)this._initLayoutMode(t)},l.reloadItems=function(){this.itemGUID=0,e.prototype.reloadItems.call(this)},l._itemize=function(){for(var t=e.prototype._itemize.apply(this,arguments),i=0;i<t.length;i++){var o=t[i];o.id=this.itemGUID++}return this._updateItemsSortData(t),t},l._initLayoutMode=function(t){var e=r.modes[t],i=this.options[t]||{};this.options[t]=e.options?n.extend(e.options,i):i,this.modes[t]=new e(this)},l.layout=function(){return!this._isLayoutInited&&this._getOption("initLayout")?void this.arrange():void this._layout()},l._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},l.arrange=function(t){this.option(t),this._getIsInstant();var e=this._filter(this.items);this.filteredItems=e.matches,this._bindArrangeComplete(),this._isInstant?this._noTransition(this._hideReveal,[e]):this._hideReveal(e),this._sort(),this._layout()},l._init=l.arrange,l._hideReveal=function(t){this.reveal(t.needReveal),this.hide(t.needHide)},l._getIsInstant=function(){var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;return this._isInstant=e,e},l._bindArrangeComplete=function(){function t(){e&&i&&o&&n.dispatchEvent("arrangeComplete",null,[n.filteredItems])}var e,i,o,n=this;this.once("layoutComplete",function(){e=!0,t()}),this.once("hideComplete",function(){i=!0,t()}),this.once("revealComplete",function(){o=!0,t()})},l._filter=function(t){var e=this.options.filter;e=e||"*";for(var i=[],o=[],n=[],s=this._getFilterTest(e),r=0;r<t.length;r++){var a=t[r];if(!a.isIgnored){var u=s(a);u&&i.push(a),u&&a.isHidden?o.push(a):u||a.isHidden||n.push(a)}}return{matches:i,needReveal:o,needHide:n}},l._getFilterTest=function(t){return u&&this.options.isJQueryFiltering?function(e){return u(e.element).is(t);
}:"function"==typeof t?function(e){return t(e.element)}:function(e){return o(e.element,t)}},l.updateSortData=function(t){var e;t?(t=n.makeArray(t),e=this.getItems(t)):e=this.items,this._getSorters(),this._updateItemsSortData(e)},l._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=f(i)}},l._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&i<e;i++){var o=t[i];o.updateSortData()}};var f=function(){function t(t){if("string"!=typeof t)return t;var i=h(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),s=n&&n[1],r=e(s,o),a=d.sortDataParsers[i[1]];return t=a?function(t){return t&&a(r(t))}:function(t){return t&&r(t)}}function e(t,e){return t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&i.textContent}}return t}();d.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},l._sort=function(){if(this.options.sortBy){var t=n.makeArray(this.options.sortBy);this._getIsSameSortBy(t)||(this.sortHistory=t.concat(this.sortHistory));var e=a(this.sortHistory,this.options.sortAscending);this.filteredItems.sort(e)}},l._getIsSameSortBy=function(t){for(var e=0;e<t.length;e++)if(t[e]!=this.sortHistory[e])return!1;return!0},l._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},l._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},l._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},l._manageStamp=function(t){this._mode()._manageStamp(t)},l._getContainerSize=function(){return this._mode()._getContainerSize()},l.needsResizeLayout=function(){return this._mode().needsResizeLayout()},l.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},l.prepended=function(t){var e=this._itemize(t);if(e.length){this._resetLayout(),this._manageStamps();var i=this._filterRevealAdded(e);this.layoutItems(this.filteredItems),this.filteredItems=i.concat(this.filteredItems),this.items=e.concat(this.items)}},l._filterRevealAdded=function(t){var e=this._filter(t);return this.hide(e.needHide),this.reveal(e.matches),this.layoutItems(e.matches,!0),e.matches},l.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;i<n;i++)o=e[i],this.element.appendChild(o.element);var s=this._filter(e).matches;for(i=0;i<n;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;i<n;i++)delete e[i].isLayoutInstant;this.reveal(s)}};var c=l.remove;return l.remove=function(t){t=n.makeArray(t);var e=this.getItems(t);c.call(this,t);for(var i=e&&e.length,o=0;i&&o<i;o++){var s=e[o];n.removeFrom(this.filteredItems,s)}},l.shuffle=function(){for(var t=0;t<this.items.length;t++){var e=this.items[t];e.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},l._noTransition=function(t,e){var i=this.options.transitionDuration;this.options.transitionDuration=0;var o=t.apply(this,e);return this.options.transitionDuration=i,o},l.getFilteredItemElements=function(){return this.filteredItems.map(function(t){return t.element})},d});
var $websiteHeader=$(".mtHeader"),$loadMoreHtmlBtn="<button class='mtLoadMoreBtn mtIsDesktop ' title='load more stories' aria-label='click to load more stories'>load more</button>",$showResults="<button class='mtLoadMoreBtn mtIsMobile ' title='show results' aria-label='click to see results'>show results</button>",mtLayout={prevScrollPosition:0,currentScrollPosition:$(window).scrollTop(),filterHolder:$(".filters-holder"),filtersOffset:-1,isSticky:!1,initAll:function(){mtLayout.setGridTopMargin(),mtLayout.topFiltersHandler(),mtLayout.scrollToTop(),mtLayout.arrangeAndOrElements(),mtLayout.setFilterTopOffset()},topFiltersHandler:function(){var t=$(window).scrollTop();t>40&&!mtLayout.isSticky&&(mtLayout.isSticky=!0,mtLayout.filterHolder.addClass("isSticky"),$(".mtMediaTitle").css("margin-top",-$(".mtMediaTitle").outerHeight())),t<40&&mtLayout.isSticky&&(mtLayout.isSticky=!1,mtLayout.filterHolder.removeClass("isSticky"),$(".mtMediaTitle").css("margin-top","0")),cdnGeneralHelpers.getWindowWidth()>1024?(mtLayout.prevScrollPosition<t&&t>0&&(mtLayout.filterHolder.removeClass("scroll-up").addClass("scroll-down"),$(".matrix-box").css("margin-top",-$(".matrix-box").outerHeight())),mtLayout.prevScrollPosition>t&&t>0&&(mtLayout.filterHolder.removeClass("scroll-down").addClass("scroll-up"),$(".matrix-box").css("margin-top","0")),mtLayout.prevScrollPosition=t):($(".matrix-box").css("margin-top",""),$(".mtMediaTitle").css("margin-top",""))},showHideStickyButtons:function(){var t=$(window).scrollTop(),e=$(".mtStickyButtons"),o=$websiteHeader.height()-1;t>mtLayout.currentScrollPosition?t>o&&e.addClass("isVisible"):t<o?(e.removeClass("isVisible"),$TiarcShare.CloseShare()):e.addClass("isVisible"),mtLayout.currentScrollPosition=t},scrollToTop:function(){mtHasReachedtheEndOfDocument((function(){$(".mtStickyButtons").addClass("atTheEnd")}),(function(){$(".mtStickyButtons").removeClass("atTheEnd")})),$(".mtStickyButtons__scrollTop").click((function(){$("html, body").animate({scrollTop:-100},1200)}))},arrangeAndOrElements:function(){cdnGeneralHelpers.getWindowWidth()>767?$(".matrix-box").insertAfter(".search-filtersWrapper"):$(".matrix-box").insertAfter(".mtSearch")},setGridTopMargin:function(){var t=$websiteHeader.outerHeight(),e=$(".mtMediaTitle").outerHeight()+$(".filter-wrapper").outerHeight();cdnGeneralHelpers.getWindowWidth()>1023?$(".mtGridContainer").css("margin-top",t+e):$(".mtGridContainer").css("margin-top",t+50)},appendLoadMoreHtml:function(){$(".mtGridContainer__loadMore").empty().append($loadMoreHtmlBtn),$(".show-results ").empty().append($showResults)},setFilterTopOffset:function(){setTimeout((function(){var t=$websiteHeader.outerHeight();t!==mtLayout.filtersOffset&&(mtLayout.filtersOffset=t,$(".filters-holder, .mtMobileFiltersToggle").css("top",t))}),30)}},mtMobileFilters={openCloseFilters:function(){var t,e=!1;$(".mtMobileFiltersToggle, .filters-holder .close-btn, .filters-holder .show-results").click((function(o){o.stopImmediatePropagation(),$("body").toggleClass("filters-open"),e?(mtMobileFilters.close(t,o),e=!1):(t=mtMobileFilters.open(),e=!0)}))},open:function(){return $(".mtMobileFiltersToggle").css("top",cdnGeneralHelpers.getWindowHeight()-$(".mtMobileFiltersToggle").outerHeight()),$(".mtFiltersContainer").addClass("isOpened").slideDown(300,(function(){$(".mtMobileFiltersToggle").removeClass("isFadingIn").addClass("isFadingOut"),$(".show-results").removeClass("isFadingOut").addClass("isFadingIn")})),setTimeout((function(){$("body").addClass("fixed")}),400),$(window).scrollTop()},close:function(t,e){$(".mtMobileFiltersToggle").css("top",$websiteHeader.outerHeight()),$(".mtFiltersContainer").removeClass("isOpened").slideUp(300,(function(){$(".mtMobileFiltersToggle").removeClass("isFadingOut").addClass("isFadingIn"),$(".show-results").removeClass("isFadingIn ").addClass("isFadingOut")})),$(".show-results").removeClass("show"),$("body").removeClass("fixed"),$(e.currentTarget).hasClass("show-results")&&(t=0),$("html, body").animate({scrollTop:t},0)}};
var $searchWrapper=$(".mtSearch"),$searchOptions=$(".mtSearch .mtSearch__suggestions"),typingSemafor=0,PreventNextUpKey=!1,PreventNextsearchFocus=!1,globalSearchTags=[],typingDelay=function(e,a){typingSemafor++,setTimeout((function(){0==--typingSemafor&&e()}),a)},mtSearch={$inputTag:$(".mtSearch input"),$errMsg:$(".mtSearch__error-message"),loaderHtml:$("<div class='mtGenericLoader'></div>"),matchFound:!1,searchInstances:0,init:function(){var e;mtSearch.clickEvents(),mtSearch.$inputTag.keyup((function(a){var t=$(this);t.val().length>2?typingDelay((function(){PreventNextUpKey||PreventNextsearchFocus?PreventNextUpKey=!1:(e=t.val().toLowerCase(),mtSearch.showHideLoaderWhenTyping(e),mtSearch.getSearchSuggestions(e))}),500):0===mtSearch.$inputTag.val().length?mtSearch.reset():(mtSearch.$errMsg.stop(!0,!0).fadeOut(50),$(".mtSearch").removeClass("noSuggestionFound"))}))},showHideLoaderWhenTyping:function(e){var a=$(".filters-holder .filter-wrapper .mtSearch form button");0===$searchWrapper.find(".mtGenericLoader").length&&e.length>0&&($searchWrapper.append(mtSearch.loaderHtml),a.addClass("isVisible")),0!==$searchWrapper.find(".mtGenericLoader").length&&e.length<1&&($searchWrapper.find(".mtGenericLoader").remove(),a.removeClass("isVisible"))},getSearchSuggestions:function(e){$.MediaServiceHelper.GetMediaItemsSearchSuggestionsNew(e,mtCore.GetFeedsToShow(),GetTagsToFilter(),(function(e,a){if(mtSearch.matchFound=!1,mtSearch.$errMsg.stop(!0,!0).fadeOut(50),$(".mtSearch").removeClass("noSuggestionFound"),e.SearchSuggestions.length&&a===mtSearch.$inputTag.val().toLowerCase()){!0,$searchOptions.empty(),$(".mtSearch").find(".mtGenericLoader").remove(),$(".mtSearch__error-message").stop(!0,!0).fadeOut(200),mtSearch.matchFound=!0;for(var t=0;t<e.SearchSuggestions.length;t++){var r=e.SearchSuggestions[t].SearchSuggestionOccurance;mtSearch.suggestionIsClean(r)&&mtSearch.suggestionIsUnique(r)&&$searchOptions.append('<li data-search-text="'+r+'" ><b>'+r.substring(0,e.SearchLength)+"</b>"+r.substring(e.SearchLength,r.length)+"</li>")}$(".mtSearch input").focus()}else $(".mtSearch").addClass("noSuggestionFound").find(".mtGenericLoader").remove(),mtSearch.$errMsg.stop(!0,!0).fadeIn(100,(function(){0===mtSearch.$inputTag.val().length&&(mtSearch.$errMsg.stop(!0,!0).fadeOut(50),$(".mtSearch").removeClass("noSuggestionFound"))})),$searchOptions.html("")}))},reset:function(){mtSearch.$inputTag.val("").attr("placeholder","search"),$(".mtSearch__clear").removeClass("isVisible").parents().find(".mtGenericLoader").remove(),mtSearch.$errMsg.fadeOut(200),$(".mtSearch").removeClass("noSuggestionFound"),$searchOptions.html("")},suggestionIsUnique:function(e){var a=!0;return $(".word-item").each((function(){$(this).text()===e&&(a=!1)})),a},suggestionIsClean:function(e){return null===e.match(new RegExp(/nbsp|&lt;|&gt/gm))},isExactMatch:function(e,a){return 1===e.SearchSuggestions.filter((function(e){return e.SearchSuggestionOccurance.toLowerCase()===a.toLowerCase()})).length},clickEvents:function(){var e=$(".matrix-box");$(".mtSearch").on("click",".mtSearch__suggestions li",(function(){mtSearch.submitSearchString($(this).attr("data-search-text")),mtSearch.reset()})),$(".mtSearch__clear").on("click",(function(e){return e.preventDefault(),mtSearch.reset(),!1})),e.on("click",".word-item ",(function(){var e=$(this).text();mtSearchExpression.deleteSearchTag(e),mtSearchExpression.drawMatrixBox(),removeUrlTagAndFilterStories(),0==$(".matrix-box > *").length&&($(".matrix-box").hide(),$(".show-results").removeClass("show"))})),e.on("click",".combinations",(function(){var e=$(this),a=e.attr("data-searchTagIndex");e.toggleClass("or"),e.parents(".combination-words").toggleClass("isOr"),mtSearchExpression.updateAndOrToggles(parseInt(a)),mtSearchExpression.drawMatrixBox(),updateUrlAndFilterStories("")})),e.on("click",".combination-words .combinations",(function(){})),$("body").on("click",(function(e){$searchOptions.html("")})),$(".mtSearch__search-icon").on("click",(function(){mtSearch.$inputTag.val()&&mtSearch.$inputTag.val().length>2&&(PreventNextsearchFocus=!0,mtSearch.submitSearchString(mtSearch.$inputTag.val()),mtSearch.reset())}))},submitSearchString:function(e){for(var a=e.split(" "),t=0;t<a.length;t++)mtSearchExpression.updateGlobalSearchTags(a[t]),mtSearchExpression.drawMatrixBox(),updateUrlAndFilterStories(a[t])}},mtSearchExpression={defaultLogicOperator:"or",getFromUrl:function(){return cdnGeneralHelpers.sanitizeInput(decodeURIComponent(cdnGeneralHelpers.getQueryVariable("SearchExpression"))).replace(/\s\s+/g," ")},decodeFromUrl:function(){var e=mtSearchExpression.getFromUrl();e.length>0&&(globalSearchTags=e.split(" ").filter((function(e){return/\S/.test(e)})))},updateGlobalSearchTags:function(e){globalSearchTags.length<1?globalSearchTags.push(e):("and"===mtSearchExpression.defaultLogicOperator&&(")"===globalSearchTags[globalSearchTags.length-1]?globalSearchTags.push("and",e):(globalSearchTags.splice(globalSearchTags.length-1,0,"("),globalSearchTags.push("and",e,")"))),"or"===mtSearchExpression.defaultLogicOperator&&globalSearchTags.push("or",e)),globalSearchTags=mtSearchExpression.reArrangeGlobalSearchTags()},reArrangeGlobalSearchTags:function(){for(var e=!1,a=globalSearchTags.filter((function(e){return"("!==e&&")"!==e})),t=0;t<a.length;t++)"and"!==a[t]||e?("or"===a[t]&&e||t===a.length-1&&e)&&(closeAndCombination(t),t--):(startAndCombination(t),t--);function startAndCombination(t){e=!0,t-2<0?a.unshift("("):a.splice([t-1],0,"(")}function closeAndCombination(t){e=!1,t===a.length-1?a.push(")"):a.splice([t],0,")")}return a},updateAndOrToggles:function(e){var a=$(".matrix-box").find("[data-searchTagIndex='"+e+"']").hasClass("or")?"or":"and";globalSearchTags[e]=a,globalSearchTags=mtSearchExpression.reArrangeGlobalSearchTags()},updateUrlAfterSearch:function(){return encodeURIComponent(encodeURIComponent(globalSearchTags.join(" "))).replace(/#/g,"%23")},deleteSearchTag:function(e){var a=$.inArray(e,globalSearchTags);a-1>=0&&("or"===globalSearchTags[a-1]||"and"===globalSearchTags[a-1])?(globalSearchTags.splice(a-1,1),globalSearchTags.splice(a-1,1)):(a+1<=globalSearchTags.length&&("or"===globalSearchTags[a+1]||"and"===globalSearchTags[a+1])&&globalSearchTags.splice(a+1,1),globalSearchTags.splice(a,1)),globalSearchTags=mtSearchExpression.reArrangeGlobalSearchTags()},drawMatrixBox:function(){var e=$(".matrix-box"),a=0,t=!1;if(e.html(""),globalSearchTags.length>0){e.css("display","block"),$(".filter-reset").css("display","inline-block");for(var r=0;r<globalSearchTags.length;r++){var n=globalSearchTags[r];")"===n&&(t=!1,a++),!0===t?"and"===n||"or"===n?($(".matrix-box .combination-words:last-of-type").append("<div class='combinations' data-searchTagIndex='"+a+"' title='toggle and/or'><span></span></div>"),"or"===n?$(".matrix-box .combination-words:last-of-type").addClass("isOr").find(".combinations").addClass("or"):$(".matrix-box .combination-words:last-of-type").removeClass("isOr"),a++):($(".matrix-box .combination-words:last-of-type").append("<div class='word-item'  data-searchTagIndex='"+a+"' title='delete "+n+" tag'><span></span>"+n+"</div>"),a++):"("!==n&&")"!==n&&("and"===n||"or"===n?(e.append("<div class='combinations' data-searchTagIndex='"+a+"' title='toggle and/or'><span></span></div>"),"or"===n&&e.find("> .combinations").addClass("or"),a++):(e.append("<div class='single-word' data-searchTagIndex='"+a+"'><div class='word-item' title='delete "+n+" tag'><span></span>"+n+"</div></div>"),a++)),"("===n&&(e.append('<div class="combination-words"></div>'),t=!0,a++)}}}};function selectTagsWithKeyboard(){var e=!1;mtSearch.$inputTag.keydown((function(a){var t,r=a.which,n=$(".mtSearch .mtSearch__suggestions"),s=n.find(".isSelected"),o=n.find("li");if(e&&($(".mtSearch__noSpecialChars").stop(!0,!0).fadeOut(50),e=!1),0!==o.length){if(40===r)return 0===s.length&&$(o[0]).addClass("isSelected"),0!==o.length&&(t=$(s[0]).index(),$(s[0]).removeClass("isSelected"),t<o.length-1&&t++,$(o[t]).addClass("isSelected")),PreventNextUpKey=!0,!1;if(38===r)return 0===s.length&&$(o[o.length-1]).addClass("isSelected"),0!==o.length&&(t=$(s[0]).index(),$(s[0]).removeClass("isSelected"),t>0&&(t--,$(o[t]).addClass("isSelected"))),PreventNextUpKey=!0,!1;if(13===r)return 1===s.length?($(s[0]).click(),$(".mtSearch input").blur(),PreventNextUpKey=!0):(PreventNextsearchFocus=!0,mtSearch.submitSearchString(mtSearch.$inputTag.val()),mtSearch.reset()),!1}else 13===r&&!$(".mtSearch").hasClass("noSuggestionFound")&&$(this).val().toLowerCase().length>2&&(PreventNextsearchFocus=!0,mtSearch.submitSearchString(mtSearch.$inputTag.val()),mtSearch.reset());return!(!a.shiftKey||50!==r&&51!==r)||(a.shiftKey&&r>=48&&r<=57?(PreventNextUpKey=!0,$(".mtSearch__noSpecialChars").stop(!0,!0).fadeIn(50),e=!0,!1):32!==r&&222!==r||0!==$(this).val().toLowerCase().length?r>=65&&r<=90||r>=48&&r<=57||r>=96&&r<=105||(8===r||27===r||46===r||32===r||222===r||r>=35&&r<=40):(PreventNextUpKey=!0,$(".mtSearch__noSpecialChars").stop(!0,!0).fadeIn(50),e=!0,!1))}))}function selectTagsWithKeyboard2(){var e=!1;mtSearch.$inputTag.keydown((function(a){a.which;var t,r=a.key,n=$(".mtSearch .mtSearch__suggestions"),s=n.find(".isSelected"),o=n.find("li");a.key,a.code;if(e&&($(".mtSearch__noSpecialChars").stop(!0,!0).fadeOut(50),e=!1),0!==o.length){if("ArrowDown"===r)return 0===s.length&&$(o[0]).addClass("isSelected"),0!==o.length&&(t=$(s[0]).index(),$(s[0]).removeClass("isSelected"),t<o.length-1&&t++,$(o[t]).addClass("isSelected")),PreventNextUpKey=!0,!1;if("ArrowUp"===r)return 0===s.length&&$(o[o.length-1]).addClass("isSelected"),0!==o.length&&(t=$(s[0]).index(),$(s[0]).removeClass("isSelected"),t>0&&(t--,$(o[t]).addClass("isSelected"))),PreventNextUpKey=!0,!1;if("Enter"===r)return 1===s.length?($(s[0]).click(),$(".mtSearch input").blur(),PreventNextUpKey=!0):(PreventNextsearchFocus=!0,mtSearch.submitSearchString(mtSearch.$inputTag.val()),mtSearch.reset()),!1}else"Enter"===r&&!$(".mtSearch").hasClass("noSuggestionFound")&&$(this).val().toLowerCase().length>2&&(PreventNextsearchFocus=!0,mtSearch.submitSearchString(mtSearch.$inputTag.val()),mtSearch.reset());return a.shiftKey?"@"===r||"#"===r||(PreventNextUpKey=!0,$(".mtSearch__noSpecialChars").stop(!0,!0).fadeIn(50),e=!0,!1):"Space"!==r&&"'"!==r||0!==$(this).val().toLowerCase().length?r>="a"&&r<="z"||r>="0"&&r<="9"||("Backspace"===r||"Escape"===r||"Delete"===r||"Space"===r||"'"===r||"End"===r||"Home"===r||"ArrowUp"===r||"ArrowDown"===r||"ArrowLeft"===r||"ArrowRight"===r||"-"===r||"/"===r||"#"===r):(PreventNextUpKey=!0,$(".mtSearch__noSpecialChars").stop(!0,!0).fadeIn(50),e=!0,!1)}))}function updateUrlAndFilterStories(e){$searchOptions.empty(),mtSearch.$inputTag.val(mtSearch.$inputTag.attr("data-default-text")),HistoryAddTag(e),mtCore.addFilteredStories(!0,!0)}function removeUrlTagAndFilterStories(){$searchOptions.empty(),mtSearch.$inputTag.val(mtSearch.$inputTag.attr("data-default-text")),HistoryRemoveTag(),mtCore.addFilteredStories(!0,!0)}function HistoryAddTag(e){if($("html").hasClass("history")){var a=window.location.pathname;a+=""===decodeURIComponent(cdnGeneralHelpers.getQueryVariable("SearchExpression"))?"?SearchExpression="+encodeURIComponent(encodeURIComponent(e)):"?SearchExpression="+mtSearchExpression.updateUrlAfterSearch(),History.pushState(a.replace(/#/g,"%23"),document.title,a.replace(/#/g,"%23"))}}function HistoryRemoveTag(){var e;$("html").hasClass("history")&&(e=0===globalSearchTags.length?window.location.pathname:window.location.pathname+"?SearchExpression="+mtSearchExpression.updateUrlAfterSearch(),History.pushState(e.replace(/#/g,"%23"),document.title,e.replace(/#/g,"%23")))}function GetTagsToFilter(){$(".matrix-box");var e=$(".matrix-box .word-item");if(e.length<1)return[];if(e.length>0){var a="";return e.each((function(){$(this).hasClass("RemoveTag")||(a+=$(this).text()+",")})),a.substr(0,a.length-1).split(",")}}
var mtCallbackTimeout;function getRSS2Url(){var e={selectedFeedsType:[],searchExpression:"",url:""},t=null;return t=$(".filter-wrapper .filters-box ul > li.active").length?".filter-wrapper .filters-box ul > li.active:not(.filter-reset)":".filter-wrapper .filters-box ul > li:not(.filter-reset)",$(t).each((function(){for(var t=$(this).data("feed-ids"),r=0;r<t.length;r++)for(var o=sharedFeedGroups.filter((function(e){return-1!=e.FeedIds.indexOf(t[r])})),s=0;s<o.length;s++)for(var a=o[s].Feeds,i=0;i<a.length;i++)-1===e.selectedFeedsType.indexOf(a[i])&&e.selectedFeedsType.push(a[i])})),e.searchExpression=new URL(window.location.href).searchParams.get("SearchExpression"),null!=e.searchExpression?e.url=$("#MediaPlusUrl").val().replace("/json/","/rss?feedTypes=")+encodeURIComponent(e.selectedFeedsType.join())+"&searchExpression="+encodeURIComponent(e.searchExpression):e.url=$("#MediaPlusUrl").val().replace("/json/","/rss?feedTypes=")+encodeURIComponent(e.selectedFeedsType.join()),e}var mtCore={hasCheckedDep:!1,isSafeToUse:!0,noFilterMatch:!1,settings:{excludeFeedIds:$("#excludedMediaWallFeeds").length>0&&$("#excludedMediaWallFeeds").val().length>0?JSON.parse($("#excludedMediaWallFeeds").val()):[]},getInitialStories:function(){$.mediaWall.AddMediaItems(mtCore.setupAfterFiltering,$(".temp-grid"),mtGlobals.takeOffset,mtGlobals.skipOffset),$(".mtGridContainer__loadMore button").click((function(e){e.preventDefault(),mtCore.addFilteredStories(!1,!1)}))},InterpretUrl:function(){var e=window.location.pathname.split("filter")[1],t=window.location.pathname.split("/")[1];switch(window.location.pathname.split(t)[1].split("/")[1]){case"filter":for(var r=0;r<e.split("/").length;r++)$(".filters-box li[data-type='"+e.split("/")[r].toLowerCase()+"']").addClass("active"),$(".filters-box .filter-reset").css("display","inline-block"),$.each(mediaCatIds,(function(t,o){e.split("/")[r]==t&&(individualFeedToFilter=e.split("/")[r].toLowerCase())}))}0===document.querySelectorAll(".filters-box li.active").length&&void 0!==e?mtCore.noFilterMatch=!0:mtCore.noFilterMatch=!1,mtDatePicker.updateValuesFromUrl(),mtSearchExpression.decodeFromUrl(),mtSearchExpression.drawMatrixBox()},GetMediaItems:function(e,t,r,o,s){$.MediaServiceHelper.GetMediaItemsAdvanced({FeedIds:e,TakeCount:o,SkipCount:s,IsTimeline:!0,Fields:["Id","FeedId","ItemType","Title","URL","Image","Date","Latitude","Longitude","Category1","Category1Id","Category2","Category2Id","User","IsFeatured","ItemsCount","BannerImage","Description","Tags","ScreenName","Extra","Source"],AndFilter:"",FullTextFilter:"",searchExpression:mtSearchExpression.getFromUrl(),orderAll:"orderAll",StartDate:mtDatePicker.currentStartDate.workingFormat||"",EndDate:mtDatePicker.currentEndDate.workingFormat||"",callback:function(e){r.html("");for(var s=0;s<e.length;s++)mtGlobals.storyNumber++,r.append(sharedGenerateMediaItemHtml(e[s],mtGlobals.storyNumber));mpHelper.storeInfoForMediaPopup(e),mtGlobals.skipOffset+=o,PreventNextsearchFocus=!1,t()}})},addFilteredStories:function(e,t){!0===e&&(mtGlobals.takeOffset=50,mtGlobals.skipOffset=0,mtCore.noFilterMatch=!1),!0===t&&($(".mtGridContainer__inner").html(""),mtItemsAddRemoveHelpers.reShowSkeletons(),0===$(".main-hero").length&&mtGenericHelpers.scrollToTop()),clearTimeout(mtCallbackTimeout),mtCallbackTimeout=setTimeout((function(){mtCore.GetMediaItems(mtCore.GetFeedsToShow(),mtCore.setupAfterFiltering,$(".temp-grid"),mtGlobals.takeOffset,mtGlobals.skipOffset)}),500)},GetFeedsToShow:function(){var e=new Array,t=decodeURIComponent(cdnGeneralHelpers.getQueryVariable("byServiceId")).replace(/\s\s+/g," ");return t?e.push(t):$(".filters-box li").each((function(){var t=$(this);(t.hasClass("active")||0===$(".filters-box li.active").length)&&t[0].hasAttribute("data-feed-ids")&&(e=e.concat(JSON.parse(t.attr("data-feed-ids"))))})),e},setupAfterFiltering:function(){$(".mtGridContainer__inner .skeletonCard").remove(),mtItemsAddRemoveHelpers.initIsotope(),mtItemsAddRemoveHelpers.moveItemsToIsotopeGrid(mtItemsAddRemoveHelpers.callbackAftAddingItems),mtFiltering.addAttributesToHashtags(),setTimeout((function(){mtLayout.setGridTopMargin()}),50)}},mtItemsAddRemoveHelpers={isotopeGrid:"",initIsotope:function(){mtItemsAddRemoveHelpers.grid=$(".mtGridContainer__inner").isotope({itemSelector:".mtStoryItem",sortBy:"number",getSortData:{number:"[data-order] parseInt"},masonry:{columnWidth:".mtStoryItem"}})},isotopeFromSkeletons:function(){$(".mtGridContainer__inner").css({opacity:1,height:"",position:""}),mtItemsAddRemoveHelpers.grid=$(".mtGridContainer__inner").isotope({itemSelector:".skeletonCard",sortBy:"number",getSortData:{number:"[data-order] parseInt"}})},showItems:function(){var e=$(".mtGridContainer");e.find(".loader").remove(),"undefined"!=typeof sharedMediaItemCallback&&sharedMediaItemCallback.init(),$(".mtGridContainer .mtGridContainer__inner").transition({opacity:1},800,(function(){e.addClass("complete")}))},moveItemsToIsotopeGrid:function(e){var t=[];$(".temp-grid .mtStoryItem").each((function(e,r){t.push({loaded:!1,loadeble:!1,element:r})})),t.length<mtGlobals.takeOffset?$(".mtGridContainer__loadMore").css("display","none"):$(".mtGridContainer__loadMore").css("display","block"),t.length<1?$(".mtMediaMessage").css("display","block"):$(".mtMediaMessage").css("display","none");for(var r=0;r<t.length;r++)if($(t[r].element).find(".mtStoryItem__img img").length){var o=t[r];$(o.element).attr("data-internalindex",r),$(o.element).imagesLoaded().progress((function(e,r){if(r.isLoaded)t[$(e.elements).attr("data-internalindex")].loadeble=!0,mtItemsAddRemoveHelpers.loadUnloadedItems(t);else{var o=$(e.elements);o.find("img").attr("src",o.find("img").attr("data-defaultimage")),o.imagesLoaded().progress((function(e,r){t[$(e.elements).attr("data-internalindex")].loadeble=!0,mtItemsAddRemoveHelpers.loadUnloadedItems(t)}))}}))}else t[r].loadeble=!0,mtItemsAddRemoveHelpers.loadUnloadedItems(t);e()},reShowSkeletons:function(){$(".mtGridContainer__inner").isotope("destroy"),$(".mtMediaMessage").css("display","none");$(".mtGridContainer__inner").append("<div class='skeletonCard'></div><div class='skeletonCard'></div><div class='skeletonCard'></div><div class='skeletonCard'></div><div class='skeletonCard'></div><div class='skeletonCard'></div><div class='skeletonCard'></div><div class='skeletonCard'></div><div class='skeletonCard'></div><div class='skeletonCard'></div>"),mtItemsAddRemoveHelpers.isotopeFromSkeletons()},loadUnloadedItems:function(e){for(var t=0;t<e.length&&(!e[t].loaded&&e[t].loadeble&&(e[t].loaded=!0,mtItemsAddRemoveHelpers.grid.isotope("insert",$(e[t].element))),e[t].loadeble);t++);},callbackAftAddingItems:function(){mtItemsAddRemoveHelpers.grid.isotope("reloadItems"),mtItemsAddRemoveHelpers.grid.isotope("layout"),mtItemsAddRemoveHelpers.showItems()}},mtGenericHelpers={scrollToTop:function(){var e=$(window).scrollTop()/3.7;return e<500&&(e=500),$("html, body").animate({scrollTop:0},e),!1}};$.mediaWall=function(){},$.mediaWall.AddMediaItems=function(e,t,r,o){MediaServiceHelper=new $.MediaServiceHelper({ServiceUrl:$("#MediaPlusUrl").val(),FeedsJson:MediaPlusFeedsArray,FeedGroups:sharedFeedGroups,InitCallBack:function(s){for(var a=[],i=0;i<s.FeedGroups.length;i++){for(var d=0;d<s.FeedGroups[i].FeedIds.length;d++)"events"!==s.FeedGroups[i].GroupName.toLowerCase()&&"fixtures"!==s.FeedGroups[i].GroupName.toLowerCase()&&-1!==$.inArray(s.FeedGroups[i].FeedIds[d],mtCore.settings.excludeFeedIds)&&a.push(s.FeedGroups[i].FeedIds[d]);mtFiltering.buildAllfilters(s,i,d)}mtCore.InterpretUrl(),mtCore.noFilterMatch?e():mtCore.GetMediaItems(mtCore.GetFeedsToShow(),e,t,r,o),mtLayout.setGridTopMargin()}})};
var mtFiltering={categoriesAvailable:["articles","pictures","video","socialMedia","audio","publications","live"],setFilterForIndividualFeed:function(t){var e="/media/filter/"+t.toLowerCase();mtFilteringHelpers.resetsFilters(),$(".filter-reset").css("display","inline-block"),$("html").hasClass("history")&&History.pushState(e,document.title,e)},filterByStoryType:function(){$("body").on("click","[data-mttype]",(function(t){t.preventDefault();var e=$(this).attr("data-mttype").toLowerCase();individualFeedToFilter=e,mtFiltering.setFilterForIndividualFeed(e),mtCore.addFilteredStories(!0,!0)}))},filterByHashTag:function(){$("body").on("click",".mtStoryItem [data-filter]",(function(t){t.preventDefault();var e=$(this).attr("data-filter");mtSearchExpression.updateGlobalSearchTags(e),mtSearchExpression.drawMatrixBox(),updateUrlAndFilterStories(e)}))},addAttributesToHashtags:function(t){var e="https://twitter.com/search?q=",r="https://www.facebook.com/hashtag/";$("body").find('.mtStoryItem a[href^="'+e+'"]').each((function(){var t=$(this),r=t.attr("href").split(e)[1];t.attr({title:" filter by #"+r,"data-filter":r})})),$("body").find('.mtStoryItem  a[href^="'+r+'"]').each((function(){var t=$(this),e=t.attr("href").split(r)[1];t.attr({title:" filter by #"+e,"data-filter":e})}))},buildFiltersByEveryCat:function(t,e){var r=t.GroupName.toLowerCase(),a=t.subCategory?t.subCategory.toLowerCase():"";if(mediaCatIds[r]=JSON.parse(e),a.length>1)if(void 0!==mediaCatIds[a]){var i=mediaCatIds[a]+","+JSON.parse(e);mediaCatIds[a]=i.split(",")}else mediaCatIds[a]=JSON.parse(e)},buildMainFilters:function(t,e){var r=t.GroupName.toLowerCase();switch(r){case"articles":distributeFeeds("articles",r,e,!1);break;case"pictures":distributeFeeds("pictures",r,e);break;case"video":distributeFeeds("video",r,e);break;case"socialMedia":distributeFeeds("socialMedia",r,e);break;case"audio":distributeFeeds("audio",r,e);break;case"publications":distributeFeeds("publications",r,e);break;case"live":distributeFeeds("live",r,e);break;default:mtFiltering.appendFilter(r,e);break;function distributeFeeds(t,e,r,a){-1!==$.inArray(t,mtFiltering.categoriesAvailable)?(mtFiltering.appendFilter(e,r,a),mtFiltering.categoriesAvailable.splice($.inArray(t,mtFiltering.categoriesAvailable),1)):mtFiltering.appendFilter(e,r,!0)}}},buildAllfilters:function(t,e){if(JSON.stringify(t.FeedGroups[e].FeedIds).length>2==!0&&"events"!==t.FeedGroups[e].GroupName.toLowerCase()&&"fixtures"!==t.FeedGroups[e].GroupName.toLowerCase())try{mtFiltering.buildMainFilters(t.FeedGroups[e],JSON.stringify(t.FeedGroups[e].FeedIds))}catch(t){}},appendFilter:function(t,e,r){let a="";if($("#startWithAllFiltersActive").length>0&&$("#startWithAllFiltersActive").val().length>0&&"true"===$("#startWithAllFiltersActive").val()&&(a=" active"),!0===r){var i=$(".filters-box ul li[data-type="+t+"]"),s=JSON.parse(i.attr("data-feed-ids")),n=$.merge(s,JSON.parse(e));i.attr("data-feed-ids",JSON.stringify(n))}else{var o=JSON.parse(e).filter((function(t){return-1===$.inArray(t,mtCore.settings.excludeFeedIds)}));let r=t.charAt(0).toUpperCase()+t.slice(1);"Twitter"===r&&(r="X"),o.length>0&&$(".filters-box ul").prepend("<li data-type='"+r.toLowerCase()+"' title='"+r+"' class='filter-"+t+a+"' data-feed-ids='"+JSON.stringify(o)+"' ></li>")}}},mtTopFilterButtonsEvents={setActiveOnClick:function(){var t;$(".filters-box").on("click","li",(function(){var e=$(this);$(".show-results").addClass("show"),e.hasClass("filter-reset")&&mtFilteringHelpers.resetsFilters(),e.hasClass("filter-reset")||(e.toggleClass("active"),$(".filters-box li.active").length?$(".filters-box li.filter-reset").css("display","inline-block"):$(".filters-box li.filter-reset").css("display","none")),mtTopFilterButtonsEvents.adjustUrlAfterFiltering(),clearTimeout(t),t=setTimeout((function(){mtCore.addFilteredStories(!0,!0)}),500)}))},adjustUrlAfterFiltering:function(){var t="/media/filter",e="Filtered by: ",r=!1,a="";$(".filters-box li").each((function(){$(this).hasClass("active")&&(a=$(this).attr("data-type"),t+="/"+a.toLowerCase(),r&&(e+=", "),e+=a.charAt(0).toUpperCase()+a.slice(1),r=!0)})),"/media/filter"==t?(t="/media",e=""):e+=" | ",$("html").hasClass("history")&&(window.location.search.length>0&&(t+=window.location.search),History.pushState(t,e+"Media"+document.title.split("Media")[1],t))}},mtFilteringHelpers={resetsFilters:function(){$("#startWithAllFiltersActive").length>0&&$("#startWithAllFiltersActive").val().length>0&&"true"===$("#startWithAllFiltersActive").val()?$(".filters-box li:not(.filter-reset)").addClass("active"):$(".filters-box li").removeClass("active"),$(".filters-box li.filter-reset").css("display","none"),$(".filters-holder .filter-wrapper .matrix-box").css("display","none"),globalSearchTags=[],mtCore.noFilterMatch=!1,mtFilteringHelpers.wipeUrl(),mtFilteringHelpers.wipeSearchTags(),mtDatePicker.reset()},wipeUrl:function(){var t="/media";$("html").hasClass("history")&&History.pushState(t,document.title,t)},wipeSearchTags:function(){$(".matrix-box").removeClass("hasTags").html("")},getParameterByName:function(t){const e=window.location.search.substring(1).split("&");for(let r of e)if(r.split("=")[0]===t)return r.split("=")[1];return""}},mtDatePicker={datePickerInstance:null,currentStartDate:{displayFormat:"",workingFormat:""},currentEndDate:{displayFormat:"",workingFormat:""},dateFormat:"d M",firstDayOfWeek:1,init:function(){if($(".mtDatePicker").length>0){var t;this.getLocaleDateFormats(),this.datePickerInstance=flatpickr(".mtDatePicker",{wrap:!0,position:"bellow center",maxDate:flatpickr.parseDate(function(){const t=new Date,e=String(t.getDate()).padStart(2,"0"),r=new Intl.DateTimeFormat("en-US",{month:"short"}).format(t);if("M d"===mtDatePicker.dateFormat)return`${r} ${e}`;return`${e} ${r}`}(),mtDatePicker.dateFormat),disableMobile:!0,mode:"range",dateFormat:mtDatePicker.dateFormat,defaultDate:[mtDatePicker.currentStartDate.displayFormat,mtDatePicker.currentEndDate.displayFormat],conjunction:" - ",locale:{firstDayOfWeek:mtDatePicker.firstDayOfWeek},onReady:function(t,e,r){},onChange:function(e,r,a){e.length>1&&(e.map((t=>a.formatDate(t,mtDatePicker.dateFormat))).join(" - "),mtDatePicker.updateDateRange(e[0],e[1]),mtDatePicker.updateUrl(),$(".filters-box li.filter-reset").css("display","inline-block"),clearTimeout(t),t=setTimeout((function(){mtCore.addFilteredStories(!0,!0)}),500))},onOpen:function(){document.querySelector(".mtDatePicker").classList.add("isOpened")},onClose:function(){document.querySelector(".mtDatePicker").classList.remove("isOpened")}})}},getLocaleDateFormats:function(){if("undefined"!=typeof ISWebsiteInformation&&void 0!==ISWebsiteInformation.websiteCountryCode)switch(ISWebsiteInformation.websiteCountryCode.toLowerCase()){case"us":case"usa":mtDatePicker.dateFormat="M d",mtDatePicker.firstDayOfWeek=0;break;default:mtDatePicker.dateFormat="d M",mtDatePicker.firstDayOfWeek=1}},updateDateRange:function(t,e){mtDatePicker.currentStartDate.workingFormat=`${String(t.getDate()).padStart(2,"0")}-${String(t.getMonth()+1).padStart(2,"0")}-${t.getFullYear()}`,mtDatePicker.currentEndDate.workingFormat=`${String(e.getDate()).padStart(2,"0")}-${String(e.getMonth()+1).padStart(2,"0")}-${e.getFullYear()}`,"d M"===mtDatePicker.dateFormat&&(mtDatePicker.currentStartDate.displayFormat=`${String(t.getDate())} ${String(t.toLocaleString("en-US",{month:"short"}))}`,mtDatePicker.currentEndDate.displayFormat=`${String(e.getDate())} ${String(e.toLocaleString("en-US",{month:"short"}))}`),"M d"===mtDatePicker.dateFormat&&(mtDatePicker.currentStartDate.displayFormat=`${String(t.toLocaleString("en-US",{month:"short"}))} ${String(t.getDate())}`,mtDatePicker.currentEndDate.displayFormat=`${String(e.toLocaleString("en-US",{month:"short"}))} ${String(e.getDate())}`)},convertDateToDDMM:function(t){const[e,r,a]=t.split("-"),i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][parseInt(r,10)-1];return"M d"===mtDatePicker.dateFormat?`${i} ${e}`:`${e} ${i}`},reset:function(){$(".mtDatePicker").length>0&&(mtDatePicker.datePickerInstance.clear(),mtDatePicker.currentStartDate.workingFormat="",mtDatePicker.currentEndDate.workingFormat="",mtDatePicker.currentStartDate.displayFormat="",mtDatePicker.currentEndDate.displayFormat="")},updateUrl:function(){if($("html").hasClass("history")&&mtDatePicker.currentStartDate.workingFormat.length>0&&mtDatePicker.currentEndDate.workingFormat.length>0){let t=`&startDate=${mtDatePicker.currentStartDate.workingFormat}&endDate=${mtDatePicker.currentEndDate.workingFormat}`,e=window.location.pathname+(window.location.search.includes("?")?t:`?${t}`);History.pushState(e,document.title,e)}},updateValuesFromUrl:function(){if($(".mtDatePicker").length>0){let t=mtFilteringHelpers.getParameterByName("startDate"),e=mtFilteringHelpers.getParameterByName("endDate");t.length>0&&(mtDatePicker.currentStartDate.workingFormat=t,mtDatePicker.currentStartDate.displayFormat=mtDatePicker.convertDateToDDMM(t)),e.length>0&&(mtDatePicker.currentEndDate.workingFormat=e,mtDatePicker.currentEndDate.displayFormat=mtDatePicker.convertDateToDDMM(e),$(".filters-box li.filter-reset").css("display","inline-block"))}}};
var mtGlobals={takeOffset:50,skipOffset:0,storyNumber:0},mediaCatIds={},individualFeedToFilter="";$(document).ready((function(){mtLayout.initAll(),mtMobileFilters.openCloseFilters(),mtItemsAddRemoveHelpers.isotopeFromSkeletons(),mtCore.getInitialStories(),selectTagsWithKeyboard2(),mtSearch.init(),mtDatePicker.init()})),$(window).load((function(){mtTopFilterButtonsEvents.setActiveOnClick(),mtFiltering.filterByStoryType(),mtFiltering.filterByHashTag()})),$(window).scroll((function(){mtLayout.topFiltersHandler(),mtLayout.showHideStickyButtons()})),mtOnResizeMethods((function(){mtLayout.setFilterTopOffset(),mtLayout.setGridTopMargin(),mtLayout.arrangeAndOrElements(),cdnGeneralHelpers.getWindowWidth()>767&&$("body").hasClass("filters-open")&&$("body").removeClass("filters-open")}));