(function(n){var t=!1,r,i;typeof define=="function"&&define.amd&&(define(n),t=!0);typeof exports=="object"&&(module.exports=n(),t=!0);t||(r=window.Cookies,i=window.Cookies=n(),i.noConflict=function(){return window.Cookies=r,i})})(function(){function n(){for(var n=0,r={},t,i;n<arguments.length;n++){t=arguments[n];for(i in t)r[i]=t[i]}return r}function t(i){function r(t,u,f){var o,h,l,e,s;if(typeof document!="undefined"){if(arguments.length>1){f=n({path:"/"},r.defaults,f);typeof f.expires=="number"&&(h=new Date,h.setMilliseconds(h.getMilliseconds()+f.expires*864e5),f.expires=h);try{o=JSON.stringify(u);/^[\{\[]/.test(o)&&(u=o)}catch(y){}return u=i.write?i.write(u,t):encodeURIComponent(String(u)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[\(\)]/g,escape),document.cookie=[t,"=",u,f.expires?"; expires="+f.expires.toUTCString():"",f.path?"; path="+f.path:"",f.domain?"; domain="+f.domain:"",f.secure?"; secure":""].join("")}t||(o={});for(var a=document.cookie?document.cookie.split("; "):[],v=/(%[0-9A-Z]{2})+/g,c=0;c<a.length;c++){l=a[c].split("=");e=l.slice(1).join("=");e.charAt(0)==='"'&&(e=e.slice(1,-1));try{if(s=l[0].replace(v,decodeURIComponent),e=i.read?i.read(e,s):i(e,s)||e.replace(v,decodeURIComponent),this.json)try{e=JSON.parse(e)}catch(y){}if(t===s){o=e;break}t||(o[s]=e)}catch(y){}}return o}}return r.set=r,r.get=function(n){return r.call(r,n)},r.getJSON=function(){return r.apply({json:!0},[].slice.call(arguments))},r.defaults={},r.remove=function(t,i){r(t,"",n(i,{expires:-1}))},r.withConverter=t,r}return t(function(){})}),function(n,t,i,r){var u=n(t),f=n(i);f.ready(function(){var f,e,o;if(n(".fullsize-image").each(function(){var t=n(this),i=t.find("img").attr("src");t.css("background-image",'url("'+i+'")')}),!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))n(".nav .dropdown").on("mouseover",function(){n(this).addClass("open")}).on("mouseleave",function(){n(this).removeClass("open")});n(".nav-secondary > ul > li > a").each(function(){n(this).siblings("ul").length&&n(this).parent().addClass("has-dropdown")});n(".nav-secondary > ul > .has-dropdown > a").on("click",function(t){t.preventDefault();n(this).next().slideToggle().parent().toggleClass("current")});n.fn.equalizeHeight=function(i){for(var f=0,e,o=n(t).width(),s=i===r?!1:!0,h=o<992,u=0;u<this.length;u++)n(this[u]).css("height","auto"),e=n(this[u]).outerHeight(),f<e&&(f=e);return s?this.height(f):h?n(this[u]).css("height","auto"):this.height(f)};u.on("load resize",function(){n(".news-item").equalizeHeight()});n("#searchIcon").on("click",function(){n("#siteSearch").animate({height:"show"},"normal");n("#searchTerm").focus();n("#siteSearch").is(":visible")||n("#searchTerm").val("")});f=function(){i.location="/Search/"+n("#searchTerm").val()};e=function(){n("#siteSearch").animate({height:"hide"},"normal")};n("#searchButton").on("click",function(){f()});n("#searchTerm").bind("enterKey",function(){f()});n("#searchTerm").keyup(function(t){t.stopPropagation();t.keyCode==13?n(this).trigger("enterKey"):t.keyCode==27&&e()});n(i).mouseup(function(t){var i=n("#siteSearch");i.is(t.target)||i.has(t.target).length!==0||e()});o=Cookies.get("gwic-modal-dismissed");(o==r||o!=1)&&n("#GWICModal").modal("show");n("#GWICModal").on("hide.bs.modal",function(){Cookies.set("gwic-modal-dismissed","1",{expires:9999})})})}(jQuery,window,document)