var mscc;!function(e){function t(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];S[e]&&S[e].forEach(function(e){e.apply(null,t)})}function n(e,t){S[e]?S[e].push(t):S[e]=[t]}function o(e){if(e)for(var t=0,n=document.cookie.split("; ");t<n.length;t++){var o=n[t],a=o.indexOf("="),i=o.substring(0,a);if(i===e)return o.substring(i.length+1)}return null}function a(e,t,n){var a=new Date;a.setDate(a.getDate()+n);var i=x.split("."),c=i.pop();if("localhost"==c)document.cookie=e+"="+t+";expires="+a.toUTCString()+";path=/";else for(;o(e)!==t&&0!==i.length;)c=i.pop()+"."+c,document.cookie=e+"="+t+";expires="+a.toUTCString()+";path=/;domain=."+c}function i(e,t){return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)}function c(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function r(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function s(e){return 13===e.which||13===e.keyCode}function u(){return void 0!=L&&i(L,A)}function m(e,t,n){if(!e&&!t)return!1;var o=e&&e.target||t;return(!o||0!==b(o))&&(o&&"A"===o.tagName?o!==D:m(null,o.parentElement,n))}function d(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent("on"+t,function(){n.call(e)})}function l(e){if(_&&!B){var t=new Image,n=L.getAttribute("data-site-name"),o=L.getAttribute("data-nver"),a=L.getAttribute("data-sver"),i=n?"&s="+n:"",c=o?"&nv="+o:"",r=a?"&sv="+a:"",s=e?"&m="+e:"";t.src=w+"?o=mscc"+i+s+c+r,B=!0}}function f(){c(L,A),t("show"),l("show")}function v(){r(L,A),t("hide")}function g(e){return Math.floor(e/1e3)}function p(){var n=e.hasConsent();L&&v(),n||(a(e.cookieName,""+g(Date.now()),390),t("consent"))}function h(){return!!o(e.cookieName)}function b(e){if(e&&e.getAttribute){var t=e.getAttribute(I);if("false"===t)return 0;if("true"===t)return 1}return-1}function k(t){var n=b(t.target),o=t.button;e.interactiveConsentEnabled&&0!==n&&(s(t)||0===o||1===o)&&(1===n||m(t,null,x))&&p()}function E(){L=document.getElementById("msccBanner"),D=document.getElementById("msccLearnMore");var t=h();!L||t||u()||f(),L&&t&&u()&&v(),t||(d(document.body,"mouseup",k),d(document.body,"keyup",k),d(document.body,"submit",p));var n=o(e.cookieName);n&&parseInt(n)<y&&d(window,"beforeunload",function(){a(e.cookieName,"0",-1)})}function C(){var t=o(e.cookieName);t&&parseInt(t)<0&&(document.cookie=e.cookieName+"=0;expires="+new Date(0).toUTCString()+";path=/;",a(e.cookieName,"0",-1))}function N(){o(e.cookieName);C(),null!=document.getElementById("msccBanner")||"complete"===document.readyState?E():document.addEventListener?document.addEventListener("DOMContentLoaded",E):document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&(E(),document.detachEvent("onreadystatechange",arguments.callee))})}e.cookieName="MSCC",e.version="0.3.6";var w="https://uhf.microsoft.com/_log",y=g(new Date("Sun, 01 Jan 2016 08:00:00 GMT").getTime());e.interactiveConsentEnabled=!0;var L,D,S={},x=window.location.hostname,A="active",I="data-mscc-ic",_=!0,B=!1;e._emit=t,e.on=n,e._getCookie=o,e._setCookieOnRootDomain=a,e.isVisible=u,e.setConsent=p,e.hasConsent=h,e._clearNegativeCookie=C,e._init=N,N()}(mscc||(mscc={}));