/*!
 * Isotope PACKAGED v3.0.4
 *
 * Licensed GPLv3 for open source use
 * or Isotope Commercial License for commercial use
 *
 * http://isotope.metafizzy.co
 * Copyright 2017 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){var o=0,n=i[o];e=e||[];for(var s=this._onceEvents&&this._onceEvents[t];n;){var r=s&&s[n];r&&(this.off(t,n),delete s[n]),n.apply(this,e),o+=r?0:1,n=i[o]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return 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 http://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);s.isBoxSizeOuter=r=200==t(n.width),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,I=a.borderTopWidth+a.borderBottomWidth,z=d&&r,x=t(s.width);x!==!1&&(a.width=x+(z?0:p+_));var S=t(s.height);return S!==!1&&(a.height=S+(z?0:y+I)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(y+I),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},i.makeArray=function(t){var e=[];if(Array.isArray(t))e=t;else if(t&&"object"==typeof t&&"number"==typeof t.length)for(var i=0;i<t.length;i++)e.push(t[i]);else e.push(t);return e},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){var o=t.prototype[e],n=e+"Timeout";t.prototype[e]=function(){var t=this[n];t&&clearTimeout(t);var e=arguments,s=this;this[n]=setTimeout(function(){o.apply(s,e),delete s[n]},i||100)}},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 o=t.console;return i.htmlInit=function(e,n){i.docReady(function(){var s=i.toDashed(n),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(o&&o.error("Error parsing "+r+" on "+t.className+": "+a))}var u=new e(t,i);l&&l.data(t,n,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=this.layout.size,r=o.indexOf("%")!=-1?parseFloat(o)/100*s.width:parseInt(o,10),a=n.indexOf("%")!=-1?parseFloat(n)/100*s.height:parseInt(n,10);r=isNaN(r)?0:r,a=isNaN(a)?0:a,r-=e?s.paddingLeft:s.paddingRight,a-=i?s.paddingTop:s.paddingBottom,this.position.x=r,this.position.y=a},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=parseInt(t,10),s=parseInt(e,10),r=n===this.position.x&&s===this.position.y;if(this.setPosition(t,e),r&&!this.isTransitioning)return void this.layoutPosition();var a=t-i,u=e-o,h={};h.transform=this.getTranslate(a,u),this.transition({to:h,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=parseInt(t,10),this.position.y=parseInt(e,10)},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/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/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/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/js/layout-modes/masonry",["../layout-mode","masonry/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/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/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/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/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/js/item"),require("isotope/js/layout-mode"),require("isotope/js/layout-modes/masonry"),require("isotope/js/layout-modes/fit-rows"),require("isotope/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});;
/*!
 * imagesLoaded PACKAGED v4.1.4
 * JavaScript is all like "You images are done yet or what?"
 * MIT License
 */

!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(e,r),delete n[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){function i(e,t){for(var i in t)e[i]=t[i];return e}function n(e){if(Array.isArray(e))return e;var t="object"==typeof e&&"number"==typeof e.length;return t?d.call(e):[e]}function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);var s=e;return"string"==typeof e&&(s=document.querySelectorAll(e)),s?(this.elements=n(s),this.options=i({},this.options),"function"==typeof t?r=t:i(this.options,t),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||e))}function r(e){this.img=e}function s(e,t){this.url=e,this.element=t,this.img=new Image}var h=e.jQuery,a=e.console,d=Array.prototype.slice;o.prototype=Object.create(t.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&u[t]){for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=e.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var u={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(t.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,e),n=i.exec(t.backgroundImage)}},o.prototype.addImage=function(e){var t=new r(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var i=new s(e,t);this.images.push(i)},o.prototype.check=function(){function e(e,i,n){setTimeout(function(){t.progress(e,i,n)})}var t=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",e),t.check()}):void this.complete()},o.prototype.progress=function(e,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},r.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(h=t,h.fn.imagesLoaded=function(e,t){var i=new o(this,e,t);return i.jqDeferred.promise(h(this))})},o.makeJQueryPlugin(),o});;
// ANIM CORE
// ---- This JS partial will handle all the global JS based micro-ineractions and animations.
(function($) {
  $(document).ready(function() {
  		// all things anim parent when entering into the screen will be assigned an active class
  	// ---------------------------------------------- CARD ANIMATION FUNCTION
  		$.fn.cardAnim = function() {
  			if ($(this).is(":in-viewport")) {
  				$(this).each(function() {
  					if ($(this).is(":in-viewport") && !$(this).hasClass("anim-item--active")) {
  						$(this).addClass("anim-item--active");
  					}
  				});
  			}
  		};
  
  	// ---------------------------------------------- SEQUENCE ANIMATION FUNCTION
  	function initSequenceAnims(index, element) {
      var $this = $(element),
          $children = $this.find(".anim-parent");
  
      if ($this.is(":in-viewport")) {
        var animItem = $this.find(".sequence-anim-item");
        var count = 0, length = animItem.length;
        var interval = setInterval(function(){
          if(count == length)
            clearInterval(interval);
  
          animItem.eq(count++).addClass('sequence-anim-item--active');
        }, 100)
      }
  
      $(window).on('load', function() {
        if ($this.is(":in-viewport")) {
          var animItem = $this.find(".sequence-anim-item");
          var count = 0, length = animItem.length;
          var interval = setInterval(function(){
            if(count == length)
              clearInterval(interval);
  
            animItem.eq(count++).addClass('sequence-anim-item--active');
          }, 100)
        }
      });
  
      $(window).scroll(function() {
        if ($this.is(":in-viewport")) {
          var animItem = $this.find(".sequence-anim-item");
          var count = 0, length = animItem.length;
          var interval = setInterval(function(){
            if(count == length)
              clearInterval(interval);
  
            animItem.eq(count++).addClass('sequence-anim-item--active');
          }, 100)
        }
      });
  	}
  
  	// ---------------------------------------------- COUNTUP ANIMATION FUNCTION
  	function initCounterUp(index, element) {
      var	$this = $(element),
          statNumber = $this.attr("data-number");
  
      if ($this.hasClass('counterUpFired')) {
        return;
      }
  
      $this.counterUp({
        delay: 10,
        time: 1500
      });
  
      $this.addClass('counterUpFired');
  	}
  
    /**
  	 * Drives the init of all of the various animations.
     * @param
     */
  	function initAnims() {
  		// Set up a custom event listener on the body so that the animation can
  		// be triggered from outside this scope.
  		$('body').on('admissionsFireAnims', function(){
  			$(".anim-item").cardAnim();
  		});
  
  		// Need to fire this immediately in case this is an AJAX request and the
  		// window load has already fired.
      $(".anim-item").cardAnim();
  
      $(window).on('load', function() {
        $(".anim-item").cardAnim();
      });
  
      $(window).scroll(function() {
        $(".anim-item").cardAnim();
      });
  
      $(".sequence-anim-parent").each(initSequenceAnims);
  
      $(".count-up").each(initCounterUp);
  	}
  
    // ======== INIT
    initAnims();
  });  
})(jQuery); // function
;
// --------------------------------------------------
// APP.JS
// --------------------------------------------------
(function($){
  $(document).ready(function(){
    
    // NDM PROTO
    $(window).scroll(function(){    
      if(!$(".mock-header").is(":in-viewport")) {
        var $currentValue = $(".blue").attr("filtervalue");
        $(".blue").attr("filtervalue", $currentValue - .45);
        var $changingValue = $(".blue").attr("filtervalue"); 
        var filterVal = 'blur(' + $changingValue + 'px)';
        
        $(".blue")
          .css('filter',filterVal)
          .css('webkitFilter',filterVal)
          .css('mozFilter',filterVal)
          .css('oFilter',filterVal)
          .css('msFilter',filterVal);      
      }
    });
  
    /*
      -----------------------
      IMAGE SATURATION ANIM
      -----------------------
    */
  
    $(".destaurate-anim").each(function(){
      var animTrigger = $(this).find(".destaurate-anim__trigger");
      if ($(animTrigger).is(":in-viewport")) {
        $(this).addClass("destaurate-anim--active");
      }
    });  
    
    $(window).scroll(function(){
      $(".destaurate-anim").each(function(){
        var animTrigger = $(this).find(".destaurate-anim__trigger");
        if ($(animTrigger).is(":in-viewport")) {
          $(this).addClass("destaurate-anim--active");
        }
      });
    })
    
  
    /*
      -----------------------
      WRAPPER
      -----------------------
    */  
    enquire
      // Desktop
      .register("screen and (min-width:1024px)", function() {
      })
      
      // Mobile & Tablet
      .register("screen and (max-width:1024px)", function() {
            
      })
      
      .register("screen and (min-width: 641px)", function() {
        $(".hero--interior__content__description").insertAfter(".hero--interior__content__title:last-of-type");
      })
  
      .register("screen and (max-width: 641px)", function() {
        $(".hero--interior__content__description").insertAfter(".hero--interior");
      })
      
  });
})(jQuery);;
(function($){

  $(document).ready(function() {
	  
    // Toggles between two strings
    // Used for changing mobile menu button text on click
    $.fn.toggleText = (function(t1, t2) {
      this.each(function() {
        var $this = $(this)
        if ($this.text() == t1) { $this.text(t2); }

        else { $this.text(t1); }

      })
      return this;
    });
  
  /*
    -----------------------
    MORE IN THIS SECTION
    -----------------------
  */  
  
    $(".more-in-this-section").click(function(){
      $(this).toggleClass("more-in-this-section--active");
      $(this).siblings("nav").slideToggle();
      $(this).find(".toggle-text").toggleText("Click to expose navigation links on mobile.", "Click to hide navigation links on mobile.").toggleClass("active");
    });
  
    $(".sidebar-subnav--button").click(function(){
      $(this).toggleClass("sidebar-subnav--button--active");
      $(this).siblings(".sidebar-subnav--content").slideToggle();
      $(this).find(".toggle-text").toggleText("Click to expose navigation links on mobile.", "Click to hide navigation links on mobile.").toggleClass("active");
    });
    
  /*
    -----------------------
    'OHO EQUALIZE' Match height of all child divs to tallest sibling
    -----------------------
  */  
  
    $.fn.oho_equalize = function( children ) {
      $(this).each(function() {
        var $parents = $(this);
      
        if ($parents.length && children.length) { 
          $parents.each(function(pid, parent) {
            var newHeight = 0;
            $parents.find(children).css('height', 'auto');
            $(parent).find(children).each(function(cid, child) {
              if ($(child).outerHeight() > newHeight) {
                newHeight = $(child).outerHeight();
              }
            })
            if (newHeight > 0) {
              $parents.find(children).css('height', newHeight+'px');
            }
          });
        }
      });
  
    };  
  
  /*
    -----------------------
    VERTICAL CENTER
    -----------------------
  */  
  
    $.fn.vertical_align = function( children ) {
      
      var $parents = $(this);
      var $parentHeight = $(this).outerHeight()/2;
      var $childHeight = $(children).outerHeight()/2;
      var $bottomValue = (($parentHeight - $childHeight) + 'px');
      
      if ($parents.length && children.length) { 
        $parents.find(children).css('bottom', $bottomValue);
      }
  
    };
    
  /*
    -----------------------
    MESSAGES-STATUS CLOSE BUTTON
    -----------------------
  */     
   $('.messages--status').append( '<button type="button">Close</button>' ); 
    
   $('.messages--status button').click(function(){
     $(this).parents('.messages--status').hide();
   });
   
  /*
    -----------------------
    SITE-WIDE EXTERNAL LINKS OPEN IN A NEW WINDOW
    from css-tricks.com/snippets/jquery/open-external-links-in-new-window
    -----------------------
  */        
   
  $('a').not("[data-fancybox='']").not('[href^="mailto:"]').each(function() {
     var a = new RegExp('/' + window.location.host + '/');
     if(!a.test(this.href)) {
         $(this).click(function(event) {
             event.preventDefault();
             event.stopPropagation();
             window.open(this.href, '_blank');
         });
     }
  });   
    
  });
})(jQuery);
;
var URLreg = /(?:\(['|"]?)(.*?)(?:['|"]?\))/;

document.addEventListener('DOMContentLoaded', function() {
  var supportsBackgroundBlendMode = window.getComputedStyle(document.body).backgroundBlendMode;
  if(typeof supportsBackgroundBlendMode == 'undefined') {  
    // TODO: maybe check for Canvas composite support?
    createBlendedBackgrounds();
  }
}, false);

function createBlendedBackgrounds() {
  var els = document.querySelectorAll('.blend-multiply');
  for(var i = 0; i < els.length; i++) {
    var el = els[i];
    processElement(el);
  }
}

function processElement(el) {
  var style = window.getComputedStyle(el);
  var backgroundImageURL = URLreg.exec(style.backgroundImage)[1];
  var backgroundColor = style.backgroundColor;
  createBlendedBackgroundImageFromURLAndColor(backgroundImageURL, backgroundColor, function(imgData) {
    el.style.backgroundImage = 'url(' + imgData + ')';
  });
}

function createBlendedBackgroundImageFromURLAndColor(url, color, callback) {
  var img = document.createElement('img');
  img.src = url;
  img.onload = function() {
    var canvas = document.createElement('canvas');
    canvas.width = this.naturalWidth;
    canvas.height = this.naturalHeight;
    var context = canvas.getContext('2d');
    context.globalCompositeOperation = 'multiply'
    context.drawImage(this, 0, 0);
    context.fillStyle = color;
    context.fillRect(0, 0, canvas.width, canvas.height);
    var data = canvas.toDataURL('image/jpeg');
    callback(data);
  };
}
;
(function($){
  $(document).ready(function(){
    
  // define an ordinary expanded menu's anchor
  var subnavTrigger = $('.sidebar-subnav li.menu-item--expanded').not('.menu-item--active-trail').children('a');
  
  // define an active expanded menu's anchor
  var subnavActiveTrigger = $('.sidebar-subnav li.menu-item--expanded.menu-item--active-trail > a');  
  
  // ORDINARY insert a button to access the children of the anchor
  $('<button class="toggler" tabindex="0"><span class="show-for-sr">Open the sub-menu</span><i class="icon-u-down-arrow"></i></button>').insertAfter(subnavTrigger);  
 
   // ACTIVE PAGE insert a button to access the children of the anchor
  $('<button class="toggler engaged" tabindex="0"><span class="show-for-sr">Close the sub-menu</span><i class="icon-u-down-arrow"></i></button>').insertAfter(subnavActiveTrigger);
  
    // one variable for all togglers
  var eachToggler = $('.toggler');  
  
  $( eachToggler ).click(function(){
    $(this).toggleClass('engaged');
    $(this).siblings('.menu').slideToggle();
    $(this).children('span').text(function(i, v){
      return v === 'Open the sub-menu' ? 'Close the sub-menu' : 'Open the sub-menu'
    });
  });

  // ACTIVE PAGE button toggles adjacent menu

  var subnavActiveToggler = $(subnavActiveTrigger).siblings('.toggler');
   
 }); // for jQuery 
})(jQuery);;
(function($){
  $(document).ready(function(){

    // Checkbox toggling:
    // Disallows unchecking all when it is checked.
    // Unchecks all when an item is checked.
    // Unchecks all items when all is checked.
    // Checks all when all items are unchecked.
    var $checkbox = $('.filters__checkbox__itself');

    $checkbox.click(function(event) {

      // Variables
      var $this = $(this),
          checked = $this[0].checked,
          $parents = $this.parents('fieldset');

      // All checkbox
      if ( $this.val() === 'all' ) {

        // If unchecked, reset all. If checked, do nothing.
        if ( checked ) {
          $parents.find('input').not(this).prop('checked', false);
        } else {
          event.preventDefault();
        }
      // Other checkboxes, checking. Uncheck all.
      } else if ( checked ) {
        $parents.find('[value="all"]').prop('checked', false);
      // Other checkboxes, unchecking. If last unchecked item, check all.
      } else {
        var $checkboxes = $parents.find('[type="checkbox"]:not([value="all"])'),
            allChecked = false;
        $checkboxes.each(function() {
          if ( $(this)[0].checked ) {
            allChecked = true;
            return false;
          }
        });
        if ( ! allChecked ) {
          $parents.find('[value="all"]').prop('checked', true);
        }
      }
    });
    
  
 }); // for jQuery 
})(jQuery);  ;
(function($){
  $(document).ready(function(){
    
    
  listingSlick($('.listing-slick'));
  
  $(window).resize(function() {
    if( !$('.listing-slick').hasClass('slick-initialized') && $(window).width() < 1025 )
    {
      listingSlick($('.listing-slick'));
    }
  });
  
  // News & events carousel
  function listingSlick(element) {
  
    element.slick({
      arrows: false,
      dots: false,
      infinite: false,
      speed: 300,
      slidesToShow: 1,
      slidesToScroll: 1,
      centerMode: true,
      centerPadding: 'auto',
      variableWidth: true,
      mobileFirst: true,
      responsive: [
        {
          breakpoint: 641,
          settings: {
            centerMode: false,
            slidesToShow: 2
          }
        },
        {
          breakpoint: 1024,
          settings: 'unslick'
        }
      ]
    });
  };

    
    
  
 }); // for jQuery 
})(jQuery);  ;
// --------------------------------------------------
// hero-video.js
// --------------------------------------------------
(function($){
  $(document).ready(function(){            
      // Establish parallax for both the video
      // and messaging components to create some depth.
       var parallaxScroll = function(){
            var scrolled = $(window).scrollTop(),
            	divOffset = $('.video-feature').scrollTop();
                            
              $('.hero--parallax img, .hero--parallax video, .hero--parallax iframe').css('top',(-1-(scrolled*.090))+'px');
        }
        // We add autoplay if touch is disabled (Safest way to assume an internet connection)
        // --- additionally Safari does not support autoplay on any touch device
        if($(".hero--video").length && !$(".touchevents").length) {
          $(".hero video").attr("autoplay", "");
        }
        
        if(!$(".has-alert, .touchevents").length) {
          if($(".hero--parallax").length) {
            // Establish parallax for both the video & Images
            $(window).bind("scroll", parallaxScroll);
          }
        }
        if($("#bgndVideo").length) {
          $("#bgndVideo").YTPlayer();
          
          // setting the video to "body" is the only way to toggle its parallax behavior
          // This makes it a direct child of the <body> and we still want it in its hero container
          $("#wrapper_bgndVideo").appendTo(".video-feature");
        }
  }); // END DOC READY
})(jQuery);;
/**
 * @file
 * @see https://css-tricks.com/smooth-scrolling-accessibility/
 * Automatically smooth scroll when using anchor links.
 */
(function($){
  $(function() {

    $('a[href*="#"]:not([href="#"]):not(.js-no-jump-link):not(.details-title)').click(function() {

      if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {

        var targetSelector = $(this.hash).length ? this.hash : '[name=' + this.hash.slice(1) +']',
            $target = $(targetSelector),
            scrolled = $target.variableScrollTo();

        if (scrolled) {
          $target.focus();
          if ($target.is(':focus')) {
            return false;
          } else {
            $target.attr('tabindex', '-1');
            $target.focus();
          }
          return false;
        }
      }

    });

  });
})(jQuery);
;
// --------------------------------------------------
// object-fit-polyfill.JS
// --------------------------------------------------
(function($){
  $(document).ready(function() {

		if ( ! Modernizr.objectfit && $(".compat-object-fit-container").length ) {
		  $('.compat-object-fit-container').each(function () {
		    var $container = $(this),
		        imgUrl = $container.find('img').prop('src');
		    if (imgUrl) {
		      $container
		        .css('backgroundImage', 'url(' + imgUrl + ')')
		        .addClass('compat-object-fit');
		    }  
		  });
		}


  });
})(jQuery);;
// --------------------------------------------------
// OHO-STICKY-HEADER.JS
// --------------------------------------------------

(function($) {
  $(document).ready(function(){

        //We Add our classes before we clone

        // Add .has-ul class to menu items with submenu children
        $(".navigation li:has(ul) > a").addClass("has-ul");

        // Add a button to toggle the child menu
        $(".navigation li:has(ul)").each(function(){
          
          // collect the text from the parent anchor
          var $parentText = $(this).children('a').text();
          
          // add a class to style width of anchor
          $(this).addClass("has-ul");
          
          // add the button
          var $ulChild = $(this).children('ul');
          
          $('<button type="button"><span>Open</span> the ' + $parentText + ' menu</button>').insertBefore( $ulChild );
        });

        // code in which we use buttons to toggle sub menus
        
        $('li.has-ul > button').click(function(){
          
          $(this).children('span').text(function(i, v){
            return v === 'Open' ? 'Close' : 'Open'
          })    
          $(this).siblings('a.has-ul').toggleClass('engaged');  
          $(this).toggleClass('engaged');
          $(this).next('ul.menu').slideToggle();
          
          if ( $(window).width() > 1023 &&  !$('.strip--sticky .menu--main__collection').length ){
            $(this).parent('li.has-ul').siblings('li.has-ul').find('ul.menu').hide();
            $(this).parent('li.has-ul').siblings('li.has-ul').find('button').removeClass('engaged');
          }
        });

        // Toggles between two strings
        // Used for changing mobile menu button text on click
        $.fn.toggleText = (function(t1, t2) {
          this.each(function() {
            var $this = $(this)
            if ($this.text() == t1) { $this.text(t2); }

            else { $this.text(t1); }

          })
          return this;
        });



        // ------------------------------- Search toggle / Overlay Toggles
          //close them all
          $(".overlay__close").click(function(e) {
            $(".overlay").removeClass("active");
            e.preventDefault();
          });
          //search
          $(".search-toggle").click(function(e) {
            $(".header__search-overlay").addClass("active");
            $(".header__search-overlay").find('input.form-search').focus();
            e.preventDefault();
          });
				// ----------------------------------------
				// ------- STICKY HEADER FUNCTION
				// ----------------------------------------
					var $lastScrollTop = 0;
					/* Edited by Utica College - assigning values during function call does not work in IE */
					ohoSticky = function($stickyTarget, $stickyItem, mediaQueryValue, directionalScrollReveal) {
						if(!directionalScrollReveal)
							directionalScrollReveal=false;
		        var $stickyContainer = $($stickyTarget),
				        $stickyHeaderItem = $stickyContainer.find($stickyItem),
				        headerHeight = $stickyContainer.outerHeight(),
				        stickyItemOuterHeight = $stickyHeaderItem.outerHeight(),
				        headerMainOffsetTop = $stickyContainer.offset().top + $stickyContainer.outerHeight() - stickyItemOuterHeight;
				        
		        if($stickyContainer.attr("data-directional-scroll-reveal")  === "true" || directionalScrollReveal === "true") {
			        headerMainOffsetTop = headerMainOffsetTop + stickyItemOuterHeight;
			        directionalScrollReveal = true;
			      }

		        enquire.register("screen and (min-width:"+mediaQueryValue+")", {
		
		          match : function() {
								// -----------------------------
								// check if an alert is present      
								// -----------------------------
								if(!$('body').hasClass('has-alert')) { 
									// -------------------------------------------------------
									// if we want to hide/show the header based on scroll direction
									// -------------------------------------------------------
									if(directionalScrollReveal) {
										// We are using the HTML attr in the CSS - if we're explicitly setting it to be true
										// we will make sure to add the ATTR to the HTML so we can use it
										if(!$stickyContainer.attr("data-directional-scroll-reveal") === "true" ) {
											$stickyContainer.attr("data-directional-scroll-reveal", "true");
										}
			              var $st = $(window).scrollTop();
			               if ($st > $lastScrollTop) {
			                 // downscroll code
			                 $stickyContainer.removeClass("sticky--scrolling-up");
			               } else {
			                // upscroll code
			                $stickyContainer.addClass("sticky--scrolling-up");
			               }
			               $lastScrollTop = $st;
									}
									
									
									// -------------------------------------------------------
			            // Conditions for when the $stickyHeaderItem should stick
									// -------------------------------------------------------
			            if ($(window).scrollTop() > headerMainOffsetTop && !$stickyContainer.hasClass("sticky")) {
			              $stickyContainer.addClass("sticky");
			            } else if ($(window).scrollTop() < headerMainOffsetTop && $stickyContainer.hasClass("sticky")) {
			              $stickyContainer.removeClass("sticky");
			              
			            }
			            // -------------------------------------------------------
			          } else {
				          // if alert is present we remove the sticky header
				          $stickyHeaderItem.removeClass("sticky");
			          } // end if alert
		          },
		
		          unmatch : function() {
		            $stickyContainer.removeClass("sticky");
		          },
		        });
		      };
				// ------- OHO STICKY INIT
				$("[data-sticky-container]").each(function() {
					var $this = $(this);
					ohoSticky($this, "[data-sticky-item]", "1025px");
					$(window).scroll(function() {
						ohoSticky($this, "[data-sticky-item]", "1025px");
					});
				});




    }); // Doc Ready
})(jQuery); // function
;
// picker navigation
// adding event.preventDefault(); breaks it

(function($){
 
  $(document).ready(function(){
        
    //
    // Tab behavior
    //
    
    $('.picker button').click(function() {
      
      // Clicked element
      var $this = $(this);
      
      // Current picker
      var $picker = $this.parents('.tabs');
            
      // Index number, add one for zero index
      var tabNumber = $this.parent().index() + 1;
      
      // Current active tab
      var $current = $picker.find('[aria-hidden="false"]');
      
      // Tab to be activated
      var $toActivate = $picker.find('.tabs__tab:nth-of-type(' + tabNumber + ')');
      
      // Remove the active aria states
      $picker.find('[aria-selected="true"]').attr('aria-selected', 'false');
      $picker.find('[aria-hidden="false"]').attr('aria-hidden', 'true');
      
      // Add the active aria states
      $this.attr('aria-selected', 'true');
      $toActivate.attr('aria-hidden', 'false');
      
      // Create slick
      var $activateSlick = $toActivate.children('.tabs__slick');
      if( $activateSlick.length > 0 && !$activateSlick.hasClass('slick-slider') )
      {
        loadCarousel($activateSlick);
      }
      
    });
    
    
    


  });
  
})(jQuery);;
(function($){
  $(document).ready(function(){
    
    $('.slide-toggle a').click(function(event){
      event.preventDefault();
      
      // Clicked element
      var $this = $(this);
      
      // Current picker
      var $picker = $this.parents('.tabs__content__itself');   
         
      // Index number, add one for zero index 
      var tabCount = $(this).index() + 1;
      
      // Current active tab
      var $current = $picker.find('[aria-hidden="false"]');    
      
      // Tab to be activated
      var $toActivate = $picker.find('.slide-toggle__content__instance:nth-of-type(' + tabCount + ')');        
      
      // Remove the active aria states
      $picker.find('[aria-selected="true"]').attr('aria-selected', 'false');
      $picker.find('[aria-hidden="false"]').attr('aria-hidden', 'true');
      
      
      // Add the active aria states
      $this.attr('aria-selected', 'true');
      $toActivate.attr('aria-hidden', 'false');
             

          
      
      
        
    });
      
 }); // for jQuery 
})(jQuery);  ;
(function($){
  $(document).ready(function(){
    
    // tabs across the top
    
    $('.tabs__tabs__button').click(function(){
      $(this).toggleClass('engaged');
      
      // Clicked element
      var $this = $(this);
      
      // Current picker
      var $picker = $this.parents('.tabs');
      
      // Index number, add one for zero index 
      var tabCount = $(this).index() + 1;
      
      // Current active tab
    //  var $current = $picker.find('[aria-hidden="false"]');
      
      // Tab to be activated
      var $toActivate = $picker.find('.tabs__content:nth-of-type(' + tabCount + ')'); 
     
      // Remove the active aria states
      $picker.find('.tabs__tabs__button[aria-selected="true"]').attr('aria-selected', 'false');
      $picker.find('.tabs__content[aria-hidden="false"]').attr('aria-hidden', 'true');
      
      
      // Add the active aria states
      $this.attr('aria-selected', 'true');
      $toActivate.attr('aria-hidden', 'false');
             
    });
    

    
    // accordion version of top tabs

    $('.tabs__title').click(function(){
      $(this).next('.tabs__content__itself').slideToggle();
      $(this).toggleClass('engaged');
    });

    // event listing specific internal filter tabs - accordion version
    
    $('.tabs__content__itself__content .tabs__filter__title').click(function(){
      $(this).next('.tabs__filter__content').slideToggle();
      $(this).toggleClass('engaged');
    });
    
    // event listing specific internal filter tabs
        

    $('.tabs__content__itself__tabs .tabs__filter__tab').click(function(){

      // Clicked element
      var $this = $(this);
      
      // Current picker
      var $picker = $this.parents('.tabs__content');
      
      // Index number, add one for zero index 
      var tabCount = $(this).index() + 1;
      var contentCount = tabCount * 2;
      
      // Current active tab
    //  var $current = $picker.find('[aria-hidden="false"]');
      
      // Tab to be activated
      var $toActivate = $picker.find('.tabs__filter__content:nth-child(' + contentCount + ')');     
      
      // Remove the active aria states
      $picker.find('.tabs__filter__tab[aria-selected="true"]').attr('aria-selected', 'false');
      $picker.find('.tabs__filter__content[aria-hidden="false"]').attr('aria-hidden', 'true');
      
      
      // Add the active aria states
      $this.attr('aria-selected', 'true');
      $toActivate.attr('aria-hidden', 'false');
             

    });


    // run test on initial page load
    checkSize();

    // run test on resize of the window
    $(window).resize(checkSize);
    
    function checkSize(){
      if ($(window).width() <= 1160){

      }
      else {
        $('.tabs__content__itself').css('display', '');
      }
    }           
  
    $('.section--tabs--admissions-flow a.for-tabs').click(function(event){
      event.preventDefault();
      var panelCount = $(this).parents('.tabs__content').index();
      $(this).parents('.section--tabs--admissions-flow').find('.tabs__tabs__button').eq( panelCount ).click();
      $('html, body').animate({
        scrollTop: $(this).parents('.section--tabs--admissions-flow').offset().top - 120
      }, 1000);      
    });
    
    // utica - aside boxes within process tabs are accordions... no really
    
    $('.tabs__aside button').click(function(){
      $(this).toggleClass('engaged');
      $(this).parents('.tabs__aside').find('.tabs__aside__basic').slideToggle();
    });
    
    // process tabs need different styles based on how many tabs there are
    var processTabParent = $('.tabs__tabs__box')
    var processTabCount = $('.tabs__tabs__button').length;
      
    if ( processTabCount < 4 ) {
      $( processTabParent ).addClass('under-four-tabs')
    };
    if ( processTabCount == 4 ) { 
      $( processTabParent ).addClass('four-tabs')      
    }; 
    if ( processTabCount == 5 ) { 
      $( processTabParent ).addClass('five-tabs')      
    };       
    if ( processTabCount > 5 ) { 
      $( processTabParent ).addClass('six-tabs')      
    };           
  
  
 }); // for jQuery 
})(jQuery);  ;
//--------------
// Tool Tip
//--------------
(function($){
  $(document).ready(function(event){    

    $(document).mousemove(function(event) {
      var currentMousePos = { x: 0, y: 0 };
      currentMousePos.x = event.pageX;
      currentMousePos.y = event.pageY;
      if($(".xy-mouse-position").length) {
        $(".xy-mouse-position").text("Postion X:" + currentMousePos.x + " Position Y:" + currentMousePos.y);
      }
  
      $(".tooltip-box-toggle").click(function(){
        var $tooltip_box = $(this).parents(".has-tooltip-box").siblings(".tooltip-box");
        
        $(this).toggleClass("tooltip-box-toggle--active");
        $tooltip_box.toggleClass("tooltip-box--active");
  
        //Tooltip positioning
        // We get the X and Y coordinates of the mouse on click
        // and we set the values via CSS to the left and right
          $tooltip_box.css({
            "left": currentMousePos.x,
            "top": currentMousePos.y
          });
        });
      });

    $(".tooltip-box i").click(function(){
      $(this).parents(".tooltip-box").removeClass("tooltip-box--active");
      $(this).parents(".tooltip-box").siblings(".has-tooltip-box").children(".tooltip-box-toggle").removeClass("tooltip-box-toggle--active");
    });
    
  }); // End Doc Ready
})(jQuery); // End jQuery;
// ----------------------
// ACCORDION
// ----------------------
(function ($, Drupal) {

	// ------ Mobile Only jQuery Plugin
	$.fn.mobileAccordion = function(accordionButtonText, classModifier) {
		var $this = $(this),
		    attr = $this.attr('data-mobile-accordion-btn-text');

		// if there is a mobile value for text on the html we'll use that instead.
		if (typeof attr !== typeof undefined && attr !== false) {
  		var accordionButtonText = attr;
		}

		var accordionMarkup = '<button type="button" class="btn accordion-drop-down__toggle accordion-drop-down__toggle--mobile">' + accordionButtonText + '<span class="show-for-sr">Click to Open</span><svg version="1.1" class="accordion-drop-down__icon"  xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve"><path d="M27.5,17.4h-25c-1.3,0-2.4-1.1-2.4-2.4s1.1-2.4,2.4-2.4h25c1.3,0,2.4,1.1,2.4,2.4S28.8,17.4,27.5,17.4z"/><path class="accordion-drop-down__icon--rotate" d="M14.5,29.9c-1.3,0-2.4-1.1-2.4-2.4v-25c0-1.3,1.1-2.4,2.4-2.4s2.4,1.1,2.4,2.4v25C16.9,28.8,15.8,29.9,14.5,29.9z"/></svg></button>';
		$this.wrap("<div class='mobile-accordion-container'></div>");
		if(!$this.hasClass("accordion-init")) {
  		$this.addClass("accordion-init");
  		$this.parents(".mobile-accordion-container").prepend(accordionMarkup).addClass(classModifier);
    }
	};

	Drupal.behaviors.utica_accordions =  {
		attach: function(context, settings) {
      // Target Mobile Accordion Elements and add markup/classes
  		$(".mobile-accordion", context).once('mobile-accordions').mobileAccordion('See More', "mobile-accordion-container--filter");

      $(".accordion-drop-down__toggle", context).once('accordions').click(function(event) {
        event.preventDefault();
        $(this).toggleClass("accordion-drop-down__toggle--active");
        $(this).parents('.accordion-drop-down').toggleClass('engaged');
        $(this).next().slideToggle();
        $(this).find('span').text(function(i, v){
          return v === 'Click to Open' ? 'Click to Close' : 'Click to Open'
        });
        $(this).addClass("accordion-init");
      });
    }
	}
})(jQuery, Drupal)
;
(function($){
  $(document).ready(function(){
  


  $('.modal-link').each(function(){
    
    var $target = $(this).next('.modal-content');
    
    console.log( $target );
    
    $(this).on('click', function(){
      
      $.fancybox.open({
        src  : $target,
        type : 'inline',
        opts : {
          afterShow : function( instance, current ) {
            console.info('done!');
          }
        }
      });      
      
    });
    
  });
  
  
 }); // for jQuery 
})(jQuery);  ;
(function($){
  $(document).ready(function(){
    
    if ( $('.section--wysiwyg + .section--accordions').length ) {
      $('.section--accordions .row').addClass('justify-content-end');
    }
    
  
 }); // for jQuery 
})(jQuery);  ;
(function($){
  $(document).ready(function(){
        
    if ( $('.section--contact-block').length ) {

      $('.contact-box').each(function(){
        
        // if there is a photo the header behaves differently
        if ( $(this).find('img').length ) {
          $(this).children('header').addClass('has-img');
        }
        
        // if the name field is the only one filled in, we need less padding
        if ( $(this).find('.contact-box__text').length == 0 ) {
          $(this).addClass('minimal-content');
        }
        
      });
      
    }
  
 }); // for jQuery 
})(jQuery);  ;
(function($){
  $(document).ready(function(){
    
  if ( $('.featured-faculty__member').length < 9 ) {
    $('.featured-faculty__load-more').hide();
  }
      
  facultySlick($('.featured-faculty .row'));
  facultyLoadMoreAddClass($('.featured-faculty .row'));
  facultyLoadMore($('.featured-faculty .row'));
  
  
  $(window).resize(function() {
    if( !$('.featured-faculty .row').hasClass('slick-initialized') && $(window).width() < 800 )
    {
      facultySlick($('.featured-faculty .row'));
    }
    else if ( !$('.featured-faculty .row').hasClass('slick-initialized') && $(window).width() > 799 ) {
    }
  });
  
  // News & events carousel
  function facultySlick(element) {
  
    
    element.slick({
      arrows: false,
      dots: false,
      infinite: false,
      speed: 300,
      slidesToShow: 1,
      slidesToScroll: 1,
      centerMode: true,
      centerPadding: '20px',
      variableWidth: true,
      touchThreshold: 10,
      mobileFirst: true,
      responsive: [
        {
          breakpoint: 480,
          settings: {
            centerMode: false,
            slidesToShow: 2
          }
        },
        {
          breakpoint: 730,
          settings: {
            centerMode: false,
            slidesToShow: 3
          }
        },
        {
          breakpoint: 800,
          settings: 'unslick'
        }
      ]
    });
  };
  


  function facultyLoadMoreAddClass(element) {   
    $(element).find('.col').addClass('hidden');
  };  
  function facultyLoadMore(element) {
    
    var $individuals = $(element).find('.col');
    
    $individuals.slice(0, 8).each(function(){
      $(this).removeClass('hidden');
    });    
  }  
  
  
  
  $('.featured-faculty__load-more button').click(function(){
    var hiddenCount = $(this).parents('.featured-faculty').find('.hidden').length;
    var totalCount = $(this).parents('.featured-faculty').find('.col').length;
    var newCount = totalCount - hiddenCount + 8;
    
    $(this).parents('.featured-faculty').find('.col').slice(0, newCount).each(function(){
      $(this).removeClass('hidden');
    }); 
    
    if ( hiddenCount < 9 ) {
      $(this).hide();
    }
        
  });
  
 }); // for jQuery 
})(jQuery);  ;
(function($){
  $(document).ready(function(){
    

// resources on audience page
    
$('.resources').isotope({
  // options
  itemSelector: '.resource--department',
  masonry: {
    gutter: 60
  }
});    


 }); // for jQuery 
})(jQuery);  ;
/**
 * @file
 * JavaScript to trigger the story feature animations.
 */

(function($, Drupal) {

  Drupal.behaviors.story_feature = {
    attach: function(context, settings) {
      // this is meant to animate stories when they come into frame
      if ( $('.section--flexible-story-feature').length ) {
        var windowHeight = $(window).height();
        $(window).on('scroll', function () {
          $('.story--small-feature').each(function (){
            var thisTop = $(this).offset().top - $(window).scrollTop();
            if (thisTop < windowHeight) {
            	$(this).addClass('animated');
            }
          });
        });
      }
    }
  }

})(jQuery, Drupal)
;
(function($){
  $(document).ready(function(){
    
    // this bit adds a label for mobile
    $('.program--large-listing .form-type-checkbox').each(function(){
       $(this).prepend('<div class="program-listing__table-header">Compare?</div>');
    });
    
    // this bit makes the footer tall enough to allow for the compare widget
    
    if ( $('.program-listing__comparison').length ) {
      $('.site-footer').addClass('site-footer__program-listing');
    };
  
 }); // for jQuery 
})(jQuery);  ;
(function($){
  $(document).ready(function(){
  
  
  var windowHeight = $(window).height();

  $(window).on('scroll', function () {
  	$('.checkerbd').each(function (){
    
    	var thisTop = $(this).offset().top - $(window).scrollTop();
      
      if (thisTop < windowHeight) {
      	$(this).children('.checkerbd__text').addClass('animated');
      }
    });
  });
    
  
 }); // for jQuery 
})(jQuery);  ;
(function($){
  $(document).ready(function(){
  
  
  var windowHeight = $(window).height();

  $(window).on('scroll', function () {
  	$('.section--sock__bg').each(function (){
    
    	var thisTop = $(this).offset().top - $(window).scrollTop();
      
      if (thisTop < windowHeight) {
      	$(this).addClass('animated');
      }
    });
  });
    
  
 }); // for jQuery 
})(jQuery);  ;
(function($){
  $(document).ready(function(){
    
    $('.section--title__image').each(function (){
      	$(this).addClass('animated');
    });
  
 }); // for jQuery 
})(jQuery);  ;
(function($){
  $(document).ready(function(){
    
    $('.faculty-news-story__slider').slick({
      focusOnSelect: true,
      arrows: false,
      centerMode: true,
      centerPadding: 'auto',
      variableWidth: true,
      slidesToShow: 1,
      infinite: true,
      dots: false
      
    })
  
 }); // for jQuery 
})(jQuery);  ;
(function($){
  $(document).ready(function(){
    
    differentiatorSlick($('.differentiators__slider'));

    $(window).resize(function() {
      if( !$('.differentiators__slider').hasClass('slick-initialized') && $(window).width() < 1220 )
      {
        differentiatorSlick($('.differentiators__slider'));
      }
    }); 
    
    function differentiatorSlick(element) {

      element.slick({
        focusOnSelect: true,
        dots: false,
        infinite: false,
        speed: 300,
        slidesToShow: 1,
        slidesToScroll: 1,
        centerMode: false,
        centerPadding: 'auto',
        variableWidth: true,
        mobileFirst: true,
        responsive: [
          {
            breakpoint: 800,
            settings: {
              centerMode: false,
              slidesToShow: 2
            }
          },
          {
            breakpoint: 1220,
            settings: 'unslick'
          }
        ]
      });
      
    };
       
 }); // for jQuery 
})(jQuery);  ;
(function($){
  $(document).ready(function(){
       
    $('.ueuv__card__slider').slick({
      arrows: true,
      dots: false,
      infinite: false,
      slidesToShow: 1,
      slidesToScroll: 1,
      centerMode: false,
      centerPadding: 'auto',
      variableWidth: true,
      mobileFirst: true,
      responsive: [ 
          {
            breakpoint: 800,
            settings: {
              slidesToShow: 2
            }
          },   
           {
            breakpoint: 1200,
            settings: {
              slidesToShow: 3
            }
          },              
        
      ]     
    });   
       
 }); // for jQuery 
})(jQuery);  ;
(function($){
  $(document).ready(function(){
    
  // Adjustment if there are very few home-hero slides
  
  if ( $('.home-hero__slide').length < 4 ) {
    $('.home-hero__slide').each(function(){
      $(this).addClass('just-two');
    });
  };
  
  // Adjustment if there are too few home-hero slides for the more-or-less
  
  if ( $('.home-hero__slide').length < 8 ) {
    $('.more-or-less__fewer').hide();
  };
  
  // Adjustment if there are more than 7 home-hero slides

  if ( $('.home-hero__slide').length > 7 ) {
    $('.home-hero__slick').addClass('more-or-less');
    $('.home-hero__slick').append('  <div class="more-or-less__button-strip more-or-less__load-more"><button type="button" class="more-less">Show More Stories  <div class="icon-u-down-arrow"></div></button></div>');
  };  
enquire.register("screen and (max-width: 750px)", {

  match : function() {

    homeHeroSlick($('.home-hero__slick'));    
    
    function homeHeroSlick(element)  {
      
      element.slick({
        
        arrows: false,
        infinite: false,
        speed: 300,
        swipe: false,
        adaptiveHeight: true,
        fade: true
      });
    };
  },
  unmatch : function() {} 
});
    
    // figure out how many slides there are and assign that number to a variable
    
    var slideCount = $('.home-hero__slide').length;
    var i = Math.floor(Math.random()*(slideCount));
    
    $(".rand").on("click", function() {
        
        $(".home-hero__slick").slick( "slickGoTo", i );
        
        var r = Math.floor(Math.random()*slideCount);
        i = ( r === i ) ? i + 1 : r ;
        $(this).children('.show-for-sr').text("Go to slide: " + (i + 1) );
        
    });



       
 }); // for jQuery 
})(jQuery);  ;
(function($){
  $(document).ready(function() {
    


    
    $('.more-or-less__load-more button').click(function(){
      $(this).parents('.more-or-less').addClass('open');
      $(this).toggle();
    });    
    $('.more-or-less__fewer button').click(function(){
      var thisContainer = $(this).parents('.more-or-less');
      $(thisContainer).removeClass('open');
      $(thisContainer).delay(500).find('.more-or-less__load-more button').toggle();
      $('html, body').animate({
        scrollTop: $(thisContainer).offset().top
      }, 500);
    });    
    
  });
})(jQuery);;
(function($){
  $(document).ready(function(){

 // animates the teal line next to the title

  var windowHeight = $(window).height();

  $(window).on('scroll', function () {
  	$('.differentiators-row__title-area').each(function (){

    	var thisTop = $(this).offset().top - $(window).scrollTop();

      if (thisTop < windowHeight) {
      	$(this).addClass('animated');
      }
    });
  	$('.diffcard').each(function (){

    	var thisTop = $(this).offset().top - $(window).scrollTop();

      if (thisTop < windowHeight) {
      	$(this).addClass('animated');
      }
    });

  });

 // slick for the differentiator row in the narrows

    diffcardSlick($('.differentiators-row__cards')); 
    
    $(window).resize(function() {
      if( !$('.differentiators-row__cards').hasClass('slick-initialized') && $(window).width() < 900 )
      {
        diffcardSlick($('.differentiators-row__cards')); 
      }
    });    
    
    function diffcardSlick(element) {
      element.slick({
        arrows: false,
        dots: false,
        infinite: false,
        speed: 300,
        slidesToShow: 1,
        slidesToScroll: 1,
        centerMode: false,
        variableWidth: true,
        mobileFirst: true,
        responsive: [
          {
            breakpoint: 900,
            settings: 'unslick'
          }
        ]
      });
      
    };

  }); // for jQuery
})(jQuery);
;
(function($){
  $(document).ready(function(){

    // accordion action in tuition and fees chart
    $('.costs__accordion__button').click(function() {
      $(this).toggleClass('engaged');
      $(this).siblings('.costs__accordion__content').slideToggle();
      $(this).find('span').text(function(i, v){
        return v === 'show' ? 'hide' : 'show'
      });
    });

    // adds the target icons to the sidebar anchors

    $('.costs__highlight').each(function(){
      $(this).prepend('<div class="target"><svg class="button" expanded="true" height="150px" width="150px"><circle class="dot" cx="50%" cy="50%" r="10px"></circle><circle class="border" cx="50%" cy="50%" r="10px"></circle><circle class="pulse" cx="50%" cy="50%" r="10px"></circle></svg><svg class="shadowed" height="20px" width="20px"></svg></div>');
    });


 }); // for jQuery
})(jQuery);
;
(function($){
  $(document).ready(function(){
    
  var windowHeight = $(window).height();
    
  $(window).on('scroll', function () {
  	$('.welcoming__text').each(function (){
      console.log('here');
    	var thisTop = $(this).offset().top - $(window).scrollTop();
      
      if (thisTop < windowHeight) {
      	$(this).addClass('animated');
      }
    });
  });    
    
  
 }); // for jQuery 
})(jQuery);  ;
(function($){
  $(document).ready(function(){
    
    if ( $('.filters--directory__box .form-actions').children().length == 0 ) {
      $('.filters--directory__box .form-actions').addClass('empty');
    };
    
  
 }); // for jQuery 
})(jQuery);  ;
/**
 * @file
 * Generate jump nav links on faculty profile pages.
 *
 * @dependency jquery.jump-nav.js
 */
(function($, Drupal) {
  Drupal.behaviors.utica_jump_nav = {
    attach: function(context, settings) {

      $('[js-jump-nav-links]').jumpNav({
        activeClass: 'jump-nav-active',
        linkClass: 'js-no-jump-link',
        minRequired: 2,
      });

    }
  }
})(jQuery, Drupal)
;
/*! jquery.cookie v1.4.1 | MIT */
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});;
/**
 * @file eu_cookie_compliance.js
 *
 * Defines the behavior of the eu cookie compliance banner.
 */

(function ($, Drupal, drupalSettings) {

  'use strict';

  Drupal.behaviors.euCookieCompliancePopup = {
    attach: function (context) {
      $('body').once('eu-cookie-compliance').each(function () {
        // If configured, check JSON callback to determine if in EU.
        if (drupalSettings.eu_cookie_compliance.popup_eu_only_js) {
          if (Drupal.eu_cookie_compliance.showBanner()) {
            var url = drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix + 'eu-cookie-compliance-check';
            var data = {};
            $.getJSON(url, data, function (data) {
              // If in the EU, show the compliance banner.
              if (data.in_eu) {
                Drupal.eu_cookie_compliance.execute();
              }

              // If not in EU, set an agreed cookie automatically.
              else {
                Drupal.eu_cookie_compliance.setStatus(2);
              }
            });
          }
        }

        // Otherwise, fallback to standard behavior which is to render the banner.
        else {
          Drupal.eu_cookie_compliance.execute();
        }
      });
    },
  };

  Drupal.eu_cookie_compliance = {};

  Drupal.eu_cookie_compliance.execute = function () {
    try {
      if (!drupalSettings.eu_cookie_compliance.popup_enabled) {
        return;
      }

      if (!Drupal.eu_cookie_compliance.cookiesEnabled()) {
        return;
      }

      var status = Drupal.eu_cookie_compliance.getCurrentStatus();
      if ((status === 0 && drupalSettings.eu_cookie_compliance.method === 'default') || status === null) {
        if (!drupalSettings.eu_cookie_compliance.disagree_do_not_show_popup || status === null) {
          // Detect mobile here and use mobile_popup_html_info, if we have a mobile device.
          if (window.matchMedia('(max-width: ' + drupalSettings.eu_cookie_compliance.mobile_breakpoint + 'px)').matches && drupalSettings.eu_cookie_compliance.use_mobile_message) {
            Drupal.eu_cookie_compliance.createPopup(drupalSettings.eu_cookie_compliance.mobile_popup_html_info);
          } else {
            Drupal.eu_cookie_compliance.createPopup(drupalSettings.eu_cookie_compliance.popup_html_info);
          }

          Drupal.eu_cookie_compliance.attachAgreeEvents();
        }
      } else if (status === 1 && drupalSettings.eu_cookie_compliance.popup_agreed_enabled) {
        Drupal.eu_cookie_compliance.createPopup(drupalSettings.eu_cookie_compliance.popup_html_agreed);
        Drupal.eu_cookie_compliance.attachHideEvents();
      } else if (status === 2 && drupalSettings.eu_cookie_compliance.withdraw_enabled) {
        Drupal.eu_cookie_compliance.createWithdrawBanner(drupalSettings.eu_cookie_compliance.withdraw_markup);
        Drupal.eu_cookie_compliance.attachWithdrawEvents();
      }
    }
    catch (e) {
    }
  };

  Drupal.eu_cookie_compliance.createWithdrawBanner = function (html) {
    var $html = $('<div></div>').html(html);
    var $banner = $('.eu-cookie-withdraw-banner', $html);
    $html.attr('id', 'sliding-popup');
    $html.addClass('eu-cookie-withdraw-wrapper');

    if (!drupalSettings.eu_cookie_compliance.popup_use_bare_css) {
      $banner.height(drupalSettings.eu_cookie_compliance.popup_height)
          .width(drupalSettings.eu_cookie_compliance.popup_width);
    }
    $html.hide();
    var height = 0;
    if (drupalSettings.eu_cookie_compliance.popup_position) {
      $html.prependTo('body');
      height = $html.outerHeight();

      $html.show()
          .addClass('sliding-popup-top')
          .addClass('clearfix')
          .css({ top: -1 * height });
      // For some reason, the tab outerHeight is -10 if we don't use a timeout
      // function to reveal the tab.
      setTimeout(function () {
        var height = $html.outerHeight();

        $html.animate({ top: -1 * (height) }, drupalSettings.eu_cookie_compliance.popup_delay, null, function () {
          $html.trigger('eu_cookie_compliance_popup_open');
        });
      }.bind($html), 0);
    } else {
      if (drupalSettings.eu_cookie_compliance.better_support_for_screen_readers) {
        $html.prependTo('body');
      } else {
        $html.appendTo('body');
      }
      height = $html.outerHeight();
      $html.show()
          .addClass('sliding-popup-bottom')
          .css({ bottom: -1 * height });
      // For some reason, the tab outerHeight is -10 if we don't use a timeout
      // function to reveal the tab.
      setTimeout(function () {
        var height = $html.outerHeight();

        $html.animate({ bottom: -1 * (height) }, drupalSettings.eu_cookie_compliance.popup_delay, null, function () {
          $html.trigger('eu_cookie_compliance_popup_open');
        });
      }.bind($html), 0);
    }
  };

  Drupal.eu_cookie_compliance.toggleWithdrawBanner = function () {
    var $wrapper = $('#sliding-popup');
    var $tab = $('.eu-cookie-withdraw-tab');
    var $bannerIsShowing = drupalSettings.eu_cookie_compliance.popup_position ? parseInt($wrapper.css('top')) === 0 : parseInt($wrapper.css('bottom')) === 0;
    var height = $wrapper.outerHeight();
    if (drupalSettings.eu_cookie_compliance.popup_position) {
      if ($bannerIsShowing) {
        $wrapper.animate({'top' : -1 * (height)}, drupalSettings.eu_cookie_compliance.popup_delay);
      }
      else {
        $wrapper.animate({'top' : 0}, drupalSettings.eu_cookie_compliance.popup_delay);
      }
    }
    else {
      if ($bannerIsShowing) {
        $wrapper.animate({'bottom' : -1 * (height)}, drupalSettings.eu_cookie_compliance.popup_delay);
      }
      else {
        $wrapper.animate({'bottom' : 0}, drupalSettings.eu_cookie_compliance.popup_delay);
      }
    }
  };

  Drupal.eu_cookie_compliance.createPopup = function (html) {
    // This fixes a problem with jQuery 1.9.
    var popup = $('<div></div>').html(html);
    popup.attr('id', 'sliding-popup');
    if (!drupalSettings.eu_cookie_compliance.popup_use_bare_css) {
      popup.height(drupalSettings.eu_cookie_compliance.popup_height)
          .width(drupalSettings.eu_cookie_compliance.popup_width);
    }

    popup.hide();
    var height = 0;
    if (drupalSettings.eu_cookie_compliance.popup_position) {
      popup.prependTo('body');
      height = popup.outerHeight();
      popup.show()
        .addClass('sliding-popup-top clearfix')
        .css({ top: -1 * height })
        .animate({ top: 0 }, drupalSettings.eu_cookie_compliance.popup_delay, null, function () {
          popup.trigger('eu_cookie_compliance_popup_open');
        });
    } else {
      if (drupalSettings.eu_cookie_compliance.better_support_for_screen_readers) {
        popup.prependTo('body');
      } else {
        popup.appendTo('body');
      }

      height = popup.outerHeight();
      popup.show()
        .addClass('sliding-popup-bottom')
        .css({ bottom: -1 * height })
        .animate({ bottom: 0 }, drupalSettings.eu_cookie_compliance.popup_delay, null, function () {
          popup.trigger('eu_cookie_compliance_popup_open');
        });
    }
  };

  Drupal.eu_cookie_compliance.attachAgreeEvents = function () {
    var clickingConfirms = drupalSettings.eu_cookie_compliance.popup_clicking_confirmation;
    var scrollConfirms = drupalSettings.eu_cookie_compliance.popup_scrolling_confirmation;

    $('.agree-button').click(Drupal.eu_cookie_compliance.acceptAction);
    $('.decline-button').click(Drupal.eu_cookie_compliance.declineAction);

    if (clickingConfirms) {
      $('a, input[type=submit], button[type=submit]').bind('click.euCookieCompliance', Drupal.eu_cookie_compliance.acceptAction);
    }

    if (scrollConfirms) {
      var alreadyScrolled = false;
      var scrollHandler = function () {
        if (alreadyScrolled) {
          Drupal.eu_cookie_compliance.acceptAction();
          $(window).off('scroll', scrollHandler);
        } else {
          alreadyScrolled = true;
        }
      };

      $(window).bind('scroll', scrollHandler);
    }

    $('.find-more-button').not('.find-more-button-processed').addClass('find-more-button-processed').click(Drupal.eu_cookie_compliance.moreInfoAction);
  };

  Drupal.eu_cookie_compliance.attachHideEvents = function () {
    var popupHideAgreed = drupalSettings.eu_cookie_compliance.popup_hide_agreed;
    var clickingConfirms = drupalSettings.eu_cookie_compliance.popup_clicking_confirmation;
    $('.hide-popup-button').click(function () {
          Drupal.eu_cookie_compliance.changeStatus(2);
        }
    );
    if (clickingConfirms) {
      $('a, input[type=submit], button[type=submit]').unbind('click.euCookieCompliance');
    }

    if (popupHideAgreed) {
      $('a, input[type=submit], button[type=submit]').bind('click.euCookieComplianceHideAgreed', function () {
        Drupal.eu_cookie_compliance.changeStatus(2);
      });
    }

    $('.find-more-button').not('.find-more-button-processed').addClass('find-more-button-processed').click(Drupal.eu_cookie_compliance.moreInfoAction);
  };

  Drupal.eu_cookie_compliance.attachWithdrawEvents = function () {
    $('.eu-cookie-withdraw-button').click(Drupal.eu_cookie_compliance.withdrawAction);
    $('.eu-cookie-withdraw-tab').click(Drupal.eu_cookie_compliance.toggleWithdrawBanner);
  };

  Drupal.eu_cookie_compliance.acceptAction = function () {
    var agreedEnabled = drupalSettings.eu_cookie_compliance.popup_agreed_enabled;
    var nextStatus = 1;
    if (!agreedEnabled) {
      Drupal.eu_cookie_compliance.setStatus(1);
      nextStatus = 2;
    }

    if (!euCookieComplianceHasLoadedScripts) {
      euCookieComplianceLoadScripts();
    }

    if (typeof euCookieComplianceBlockCookies !== 'undefined') {
      clearInterval(euCookieComplianceBlockCookies);
    }

    Drupal.eu_cookie_compliance.changeStatus(nextStatus);
  };

  Drupal.eu_cookie_compliance.declineAction = function () {
    Drupal.eu_cookie_compliance.setStatus(0);
    let popup = $('#sliding-popup');
    if (popup.hasClass('sliding-popup-top')) {
      popup.animate({ top: popup.outerHeight() * -1 }).trigger('eu_cookie_compliance_popup_close');
    }
    else {
      popup.animate({ bottom: popup.outerHeight() * -1 }).trigger('eu_cookie_compliance_popup_close');
    }
  };

  Drupal.eu_cookie_compliance.withdrawAction = function () {
    Drupal.eu_cookie_compliance.setStatus(null);
    location.reload();
  };

  Drupal.eu_cookie_compliance.moreInfoAction = function () {
    if (drupalSettings.eu_cookie_compliance.disagree_do_not_show_popup) {
      Drupal.eu_cookie_compliance.setStatus(0);
      $('#sliding-popup').trigger('eu_cookie_compliance_popup_close').remove();
    } else {
      if (drupalSettings.eu_cookie_compliance.popup_link_new_window) {
        window.open(drupalSettings.eu_cookie_compliance.popup_link);
      } else {
        window.location.href = drupalSettings.eu_cookie_compliance.popup_link;
      }
    }
  };

  Drupal.eu_cookie_compliance.getCurrentStatus = function () {
    var cookieName = (drupalSettings.eu_cookie_compliance.cookie_name === '') ? 'cookie-agreed' : drupalSettings.eu_cookie_compliance.cookie_name;
    var value = $.cookie(cookieName);
    value = parseInt(value);
    if (isNaN(value)) {
      value = null;
    }

    return value;
  };

  Drupal.eu_cookie_compliance.changeStatus = function (value) {
    var status = Drupal.eu_cookie_compliance.getCurrentStatus();
    var reloadPage = drupalSettings.eu_cookie_compliance.reload_page;
    if (status === value) {
      return;
    }

    if (drupalSettings.eu_cookie_compliance.popup_position) {
      $('.sliding-popup-top').animate({ top: $('#sliding-popup').outerHeight() * -1 }, drupalSettings.eu_cookie_compliance.popup_delay, function () {
        if (status === null && !reloadPage) {
          $('#sliding-popup').html(drupalSettings.eu_cookie_compliance.popup_html_agreed).animate({ top: 0 }, drupalSettings.eu_cookie_compliance.popup_delay);
          Drupal.eu_cookie_compliance.attachHideEvents();
        } else if (status === 1) {
          $('#sliding-popup').trigger('eu_cookie_compliance_popup_close').remove();
        }
      });
    } else {
      $('.sliding-popup-bottom').animate({ bottom: $('#sliding-popup').outerHeight() * -1 }, drupalSettings.eu_cookie_compliance.popup_delay, function () {
        if (status === null && !reloadPage) {
          $('#sliding-popup').html(drupalSettings.eu_cookie_compliance.popup_html_agreed).animate({ bottom: 0 }, drupalSettings.eu_cookie_compliance.popup_delay);
          Drupal.eu_cookie_compliance.attachHideEvents();
        } else if (status === 1) {
          $('#sliding-popup').trigger('eu_cookie_compliance_popup_close').remove();
        }
      });
    }

    if (drupalSettings.eu_cookie_compliance.reload_page) {
      location.reload();
    }

    if (value === 2 && drupalSettings.eu_cookie_compliance.withdraw_enabled) {
      Drupal.eu_cookie_compliance.createWithdrawBanner(drupalSettings.eu_cookie_compliance.withdraw_markup);
      Drupal.eu_cookie_compliance.attachWithdrawEvents();
    }

    Drupal.eu_cookie_compliance.setStatus(value);
  };

  Drupal.eu_cookie_compliance.setStatus = function (status) {
    var date = new Date();
    var domain = drupalSettings.eu_cookie_compliance.domain ? drupalSettings.eu_cookie_compliance.domain : '';
    var path = drupalSettings.path.baseUrl;
    var cookieName = (drupalSettings.eu_cookie_compliance.cookie_name === '') ? 'cookie-agreed' : drupalSettings.eu_cookie_compliance.cookie_name;
    if (path.length > 1) {
      var pathEnd = path.length - 1;
      if (path.lastIndexOf('/') === pathEnd) {
        path = path.substring(0, pathEnd);
      }
    }

    var cookie_session = parseInt(drupalSettings.eu_cookie_compliance.cookie_session);
    if (cookie_session) {
      $.cookie(cookieName, status, { path: path, domain: domain });
    } else {
      var lifetime = parseInt(drupalSettings.eu_cookie_compliance.cookie_lifetime);
      date.setDate(date.getDate() + lifetime);
      $.cookie(cookieName, status, { expires: date, path: path, domain: domain });
    }
    $(document).trigger('eu_cookie_compliance.changeStatus', [status]);

    // Store consent if applicable.
    if (drupalSettings.eu_cookie_compliance.store_consent && ((status === 1 && drupalSettings.eu_cookie_compliance.popup_agreed_enabled) || (status === 2  && !drupalSettings.eu_cookie_compliance.popup_agreed_enabled))) {
      var url = drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix + 'eu-cookie-compliance/store_consent/banner';
      $.post(url, {}, function (data) { });
    }
  };

  Drupal.eu_cookie_compliance.hasAgreed = function () {
    var status = Drupal.eu_cookie_compliance.getCurrentStatus();
    return (status === 1 || status === 2);
  };

  Drupal.eu_cookie_compliance.showBanner = function () {
    var showBanner = false;
    var status = Drupal.eu_cookie_compliance.getCurrentStatus();
    if ((status === 0 && drupalSettings.eu_cookie_compliance.method === 'default') || status === null) {
      if (!drupalSettings.eu_cookie_compliance.disagree_do_not_show_popup || status === null) {
        showBanner = true;
      }
    } else if (status === 1 && drupalSettings.eu_cookie_compliance.popup_agreed_enabled) {
      showBanner = true;
    }

    return showBanner;
  };

  Drupal.eu_cookie_compliance.cookiesEnabled = function () {
    var cookieEnabled = (navigator.cookieEnabled);
    if (typeof navigator.cookieEnabled === 'undefined' && !cookieEnabled) {
      $.cookie('testcookie', 'testcookie', { expires: 100 });
      cookieEnabled = ($.cookie('testcookie').indexOf('testcookie') !== -1);
    }

    return (cookieEnabled);
  };

  // Load blocked scripts if the user has agreed to being tracked.
  var euCookieComplianceHasLoadedScripts = false;
  $(function () {
    if (Drupal.eu_cookie_compliance.hasAgreed()
        || (Drupal.eu_cookie_compliance.getCurrentStatus() === null && drupalSettings.eu_cookie_compliance.method !== 'opt_in')
    ) {
      euCookieComplianceLoadScripts();
      euCookieComplianceHasLoadedScripts = true;
    }
  });

  // Block cookies when the user hasn't agreed.
  if ((drupalSettings.eu_cookie_compliance.method === 'opt_in' && (Drupal.eu_cookie_compliance.getCurrentStatus() === null  || !Drupal.eu_cookie_compliance.hasAgreed()))
      || (drupalSettings.eu_cookie_compliance.method === 'opt_out' && !Drupal.eu_cookie_compliance.hasAgreed() && Drupal.eu_cookie_compliance.getCurrentStatus() !== null)
  ) {
    // Split the white-listed cookies.
    var euCookieComplianceWhitelist = drupalSettings.eu_cookie_compliance.whitelisted_cookies.split(/\r\n|\n|\r/g);

    // Add the EU Cookie Compliance cookie.
    euCookieComplianceWhitelist.push((drupalSettings.eu_cookie_compliance.cookie_name === '') ? 'cookie-agreed' : drupalSettings.eu_cookie_compliance.cookie_name);
    var euCookieComplianceBlockCookies = setInterval(function () {
      // Load all cookies from jQuery.
      var cookies = $.cookie();

      // Check each cookie and try to remove it if it's not white-listed.
      for (var i in cookies) {
        var remove = true;
        var hostname = window.location.hostname;
        var cookieRemoved = false;
        var index = 0;

        // Skip the PHP session cookie.
        if (i.indexOf('SESS') === 0 || i.indexOf('SSESS') === 0) {
          remove = false;
        }

        // Check if the cookie is white-listed.
        for (var item in euCookieComplianceWhitelist) {
          if (i === euCookieComplianceWhitelist[item]) {
            remove = false;
          }
        }

        // Remove the cookie if it's not white-listed.
        if (remove) {
          while (!cookieRemoved && hostname !== '') {
            // Attempt to remove.
            cookieRemoved = $.removeCookie(i, { domain: '.' + hostname, path: '/' });
            if (!cookieRemoved) {
              cookieRemoved = $.removeCookie(i, { domain: hostname, path: '/' });
            }

            index = hostname.indexOf('.');

            // We can be on a sub-domain, so keep checking the main domain as well.
            hostname = (index === -1) ? '' : hostname.substring(index + 1);
          }
        }
      }
    }, 5000);
  }

})(jQuery, Drupal, drupalSettings);
;
/**
 * @file
 * JavaScript to control the audience link behavior & modal.
 */

(function($, Drupal) {

  // Cookie
  var cookieName = 'uticaAudiencePage',
      cookieDuration = 365,
      cookieAudiencePageURL = getCookie(cookieName);

  // Added by Utica College to strip out index.php
  if(typeof cookieAudiencePageURL=='string')
  	cookieAudiencePageURL=cookieAudiencePageURL.replace('/index.php','');

  // Classes
  var openClass = 'audience-modal--active';

  // Selectors
  var $link = $('[js-audience-link]'),
      $open = $('[js-audience-modal-open]'),
      $close = $('[js-audience-modal-close]'),
      $modal = $('[js-audience-modal]'),
      $select = $('[js-audience-select]'),
      $submit = $('[js-audience-submit]');

  Drupal.behaviors.utica_audience = {
    attach: function(context, settings) {

      // Set the audience select to the current page on load, if selected
      if (isCookieSet(cookieAudiencePageURL)) {
        $select.val(cookieAudiencePageURL);
      }

      // Open the modal or redirect to the correct page.
      $link.click(function(event) {
        event.preventDefault();
        if (isCookieSet(cookieAudiencePageURL) && cookieAudiencePageURL) {
          goToAudiencePage(cookieAudiencePageURL);
        } else {
          $modal.addClass(openClass);
        }
      });

      // Open the modal on audience page button click.
      $open.click(function() {
        $modal.addClass(openClass);
      });

      // Close the modal by click.
      $close.click(function() {
        $modal.removeClass(openClass);
      });

      // Close the modal by escape keypress.
      $(document).keypress(function(event) {
        if (27 === event.keyCode && $modal.hasClass(openClass)) {
          $modal.removeClass(openClass);
        }
      });

      // Set the correct audience page on form submit
      $submit.click(function(event) {
        event.preventDefault();
        var audiencePageURL = $select.val();
          // Added by Utica College to strip out index.php
          if(typeof audiencePageURL=='string')
		  	audiencePageURL=audiencePageURL.toString().replace('/index.php','');
        setCookie(cookieName, audiencePageURL, cookieDuration);
        goToAudiencePage(audiencePageURL);
      });

    }
  }

  /**
   * Redirect to a URL.
   *
   * @param string url
   *    The URL to redirect to.
   */
  function goToAudiencePage(url) {
    window.location.href = window.location.origin + url;
  }

  /**
   * Get a cookie.
   *
   * @param string name
   *    The cookie name.
   *
   * @return object
   *    Cart cookie JSON data.
   */
  function getCookie(name) {
    var v = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)');
    return v ? JSON.parse(v[2]) : {};
  }

  /**
   * Save a cookie.
   *
   * @param string name
   *    The cookie name.
   * @param object data
   *   Cookie data to save, in JSON.
   * @param int days
   *    Duration to save the cookie, in days.
   */
  function setCookie(name, data, days) {
    var d = new Date;
    d.setTime(d.getTime() + (24 * 60 * 60 * 1000 * days));
    document.cookie = name + "=" + JSON.stringify(data) + ";path=/;expires=" + d.toGMTString();
  }

  /**
   * Check if a cookie is set.
   *
   * @param object cookie
   *    The cookie to check if set.
   *
   * @return boolean
   */
  function isCookieSet(cookie) {
    return Object.keys(cookie).length > 0;
  }

})(jQuery, Drupal)
;
