/* globals document */ (function (global) { var fullUrl = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : ''); var iframeHtml = ''; var injectedStylesheet = ".globa-nav__iframe-element {\n display: block;\n}\n\n.global-nav-container {\n transition: 500ms ease-in-out;\n position: relative;\n top:-60px;\n\n}\n\n\n.global-nav-container.global-nav-container--in-view {\n top:0;\n}\n\n.global-nav-container:before {\n content: \u0027\u0027;\n position: absolute;\n top:0;\n right:0;\n height: 2px;\n left:0;\n width: 100%;\n background: #ffc627;\n z-index: 110;\n}\n\n\n\n\n.global-nav-button-wrapper__button {\n position:fixed;\n}\n \n\n#global-nav-iframe {\n transition: opacity 0.2s ease;\n position: fixed;\n width: 100%;\n top:0;\n height: 0%;\n z-index: 100;\n opacity: 0;\n -webkit-overflow-scrolling: touch;\n}\n\n\n\n.global-nav-iframe.menu--open {\n position: fixed;\n right: 0; \n bottom: 0; \n left: 0;\n top: 0;\n}\n\n.ios-safari #global-nav-iframe {\n overflow-y: scroll;\n}\n\n#global-nav-iframe.menu--open {\n height: 100%; \n opacity: 1;\n}\n\n.global-nav-button-wrapper {\n max-width: 970px;\n height: 0;\n overflow: visible;\n margin: 0 auto;\n position: relative;\n z-index: 109;\n}\n\n.global-nav-button-wrapper span {\n display: inline-block;\n}\n.global-nav-button-wrapper__button {\n display: inline-block;\n position: absolute;\n padding: 13px 11px 5px 11px;\n border-bottom-right-radius: 5px;\n border-bottom-left-radius: 5px;\n text-align: right;\n right:15px;\n background: #ffc627;\n color: #000;\n text-decoration: none;\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.global-nav-button-wrapper__button:hover,\n.global-nav-button-wrapper__button.menu--open {\n background: #ffda72;\n}\n\n.global-nav-button-wrapper__button svg {\n pointer-events: none;\n cursor: pointer;\n}\n\n.body--global-nav-open {\n width: 100%;\n}\n\n@media only screen and (max-width: 767px){\n .global-nav-button-wrapper__button {\n left: 50%;\n margin-left: -77px;\n right: auto;\n padding: 6px 11px 3px 11px;\n }\n\n .global-nav-button-wrapper span {\n top: 1px;\n position: relative;\n }\n\n .ios-safari.body--global-nav-open .global-nav-button-wrapper {\n width: 100%;\n margin: 0;\n }\n\n .ios-safari.body--global-nav-open .global-nav-button-wrapper__button {\n position: fixed;\n }\n \n}\n\n\n\n}\n\n.global-nav-button-wrapper__button:hover {\n color: #000;\n text-decoration: none;\n}\n\n.svg-global-nav {\n width: 15px;\n height: 15px;\n display: inline-block;\n margin-right: 3px;\n}\n.svg-global-nav--close {\n display: none;\n}\n\n.menu--open .svg-global-nav--dots {\n display: none;\n}\n.menu--open .svg-global-nav--close {\n display: inline-block;\n}\n\n.svg-global-nav-title {\n width: 85px;\n display: inline-block;\n height: 14px;\n}\n\u003cstyle\u003e\n /* eSmart override - This will be appended after the gnav.css */\n\u003c/style\u003e"; var closeSvg = "\u003csvg class=\"svg-global-nav svg-global-nav--close\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 500 500\" style=\"pointer-events: none\"\u003e\n \u003ctitle\u003eAMF_Icons\u003c/title\u003e\n \u003cpolygon points=\"463.981 68.389 433.888 38.296 252.283 219.906 70.679 38.296 40.586 68.389 222.191 250 40.586 431.611 70.679 461.704 252.283 280.094 433.888 461.704 463.981 431.611 282.376 250 463.981 68.389\"/\u003e\n\u003c/svg\u003e\n"; var dotsSvg = "\u003csvg class=\"svg-global-nav svg-global-nav--dots\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 500 500\"\n style=\"pointer-events: none\"\u003e\n \u003ccircle cx=\"85.8129\" cy=\"87.43978\" r=\"43.94129\"/\u003e\n \u003ccircle cx=\"85.8129\" cy=\"249.89075\" r=\"43.94129\"/\u003e\n \u003ccircle cx=\"85.8129\" cy=\"412.34171\" r=\"43.94129\"/\u003e\n \u003ccircle cx=\"251.47158\" cy=\"87.43978\" r=\"43.94129\"/\u003e\n \u003ccircle cx=\"251.47158\" cy=\"249.89075\" r=\"43.94129\"/\u003e\n \u003ccircle cx=\"251.47158\" cy=\"412.34171\" r=\"43.94129\"/\u003e\n \u003ccircle cx=\"417.13026\" cy=\"87.43978\" r=\"43.94129\"/\u003e\n \u003ccircle cx=\"417.13026\" cy=\"249.89075\" r=\"43.94129\"/\u003e\n \u003ccircle cx=\"417.13026\" cy=\"412.34171\" r=\"43.94129\"/\u003e\n\u003c/svg\u003e\n"; var amfProgramsSvg = "\u003csvg class=\"svg-global-nav-title\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t viewBox=\"0 0 92.12 14.84\" enable-background=\"new 0 0 92.12 14.84\" xml:space=\"preserve\"\n style=\"pointer-events: none\"\u003e\n\u003cg\u003e\n\t\u003cg\u003e\n\t\t\u003cpath d=\"M5.43,2.35C5.34,2.03,5.12,1.87,4.78,1.87H3.89c-0.33,0-0.55,0.16-0.66,0.48l-3.08,8.79c-0.03,0.1-0.05,0.18-0.05,0.25\n\t\t\tc0,0.09,0.02,0.17,0.07,0.23c0.09,0.12,0.24,0.18,0.45,0.18h0.65c0.34,0,0.56-0.16,0.65-0.49l0.68-2.06h3.46l0.7,2.07\n\t\t\tc0.09,0.32,0.31,0.48,0.65,0.48h0.64c0.22,0,0.37-0.06,0.45-0.18c0.05-0.06,0.07-0.14,0.07-0.23c0-0.07-0.02-0.16-0.05-0.25\n\t\t\tL5.43,2.35z M3.04,7.79l0.89-2.66c0.11-0.37,0.24-0.89,0.39-1.54h0.03l0.39,1.54l0.88,2.66H3.04z M19.1,2.43\n\t\t\tc-0.03-0.37-0.23-0.56-0.6-0.56h-0.87c-0.34,0-0.56,0.16-0.67,0.48l-1.77,4.44c-0.15,0.39-0.31,0.88-0.48,1.46h-0.03l-0.5-1.46\n\t\t\tl-1.77-4.44c-0.11-0.32-0.33-0.48-0.66-0.48h-0.88c-0.35,0-0.55,0.19-0.6,0.56l-0.71,8.78c0,0.03,0,0.05-0.01,0.07\n\t\t\tc0,0.35,0.19,0.53,0.56,0.53h0.63c0.37,0,0.57-0.19,0.6-0.56l0.37-5c0.02-0.26,0.03-0.56,0.03-0.88c0-0.21,0-0.44-0.01-0.68h0.03\n\t\t\tl0.54,1.55l1.42,3.39c0.11,0.31,0.33,0.46,0.67,0.46h0.59c0.32,0,0.54-0.15,0.65-0.46l1.43-3.39c0.15-0.38,0.33-0.9,0.53-1.54\n\t\t\th0.03C17.6,4.95,17.6,5.17,17.6,5.38c0,0.31,0.01,0.6,0.03,0.87l0.37,5c0.03,0.37,0.23,0.56,0.61,0.56h0.63\n\t\t\tc0.38,0,0.57-0.18,0.57-0.53c0-0.02-0.01-0.05-0.01-0.07L19.1,2.43z M26.83,1.87H22.3c-0.38,0-0.57,0.2-0.57,0.59v8.76\n\t\t\tc0,0.39,0.19,0.59,0.57,0.59h0.64c0.38,0,0.57-0.2,0.57-0.59V7.79h2.7c0.39,0,0.58-0.2,0.58-0.59V6.81c0-0.38-0.19-0.57-0.58-0.57\n\t\t\th-2.7V3.42h3.31c0.39,0,0.58-0.19,0.58-0.57V2.46C27.41,2.07,27.22,1.87,26.83,1.87z M36.14,1.87H32.9c-0.38,0-0.57,0.2-0.57,0.59\n\t\t\tv8.76c0,0.39,0.19,0.59,0.57,0.59h0.64c0.38,0,0.57-0.2,0.57-0.59V8.36h2.03c0.93,0,1.69-0.3,2.28-0.91\n\t\t\tC39,6.85,39.29,6.07,39.29,5.1c0-0.96-0.29-1.74-0.88-2.34C37.83,2.17,37.07,1.87,36.14,1.87z M37.01,6.35\n\t\t\tc-0.29,0.31-0.7,0.46-1.22,0.46h-1.68V3.42h1.71c0.51,0,0.91,0.15,1.2,0.45c0.29,0.3,0.43,0.71,0.43,1.23\n\t\t\tC37.45,5.63,37.3,6.04,37.01,6.35z M44.15,4.61c-0.46,0-0.88,0.18-1.26,0.55c-0.38,0.37-0.64,0.79-0.8,1.26h-0.03l0.04-0.49V5.26\n\t\t\tc0-0.39-0.2-0.59-0.59-0.59h-0.55c-0.39,0-0.58,0.2-0.58,0.59v5.96c0,0.39,0.19,0.59,0.58,0.59h0.62c0.39,0,0.58-0.2,0.58-0.59\n\t\t\tv-2.3c0-0.71,0.17-1.32,0.5-1.83c0.33-0.51,0.81-0.76,1.42-0.76c0.4,0,0.6-0.2,0.6-0.59V5.2C44.68,4.81,44.51,4.61,44.15,4.61z\n\t\t\t M48.77,4.5c-1.1,0-2.02,0.35-2.76,1.05c-0.74,0.7-1.12,1.6-1.12,2.69c0,1.09,0.37,1.99,1.12,2.69c0.74,0.7,1.67,1.05,2.76,1.05\n\t\t\tc1.1,0,2.02-0.35,2.77-1.06c0.75-0.7,1.12-1.6,1.12-2.68c0-1.08-0.37-1.97-1.12-2.68C50.79,4.86,49.87,4.5,48.77,4.5z M50.27,9.86\n\t\t\tc-0.41,0.42-0.91,0.63-1.5,0.63c-0.59,0-1.09-0.21-1.5-0.63c-0.4-0.42-0.61-0.96-0.61-1.61c0-0.65,0.2-1.18,0.61-1.61\n\t\t\tC47.69,6.21,48.18,6,48.77,6c0.58,0,1.08,0.21,1.5,0.64c0.41,0.42,0.62,0.96,0.62,1.61C50.88,8.9,50.68,9.44,50.27,9.86z\n\t\t\t M59.93,4.67h-0.48c-0.19,0-0.33,0.04-0.43,0.13c-0.1,0.09-0.15,0.2-0.15,0.34V5.4c0,0.08,0,0.14,0.01,0.18h-0.03L58.8,5.47\n\t\t\tC58.77,5.4,58.7,5.31,58.59,5.2c-0.1-0.11-0.23-0.21-0.37-0.32c-0.15-0.11-0.35-0.2-0.6-0.27c-0.26-0.07-0.54-0.11-0.84-0.11\n\t\t\tc-1.02,0-1.81,0.33-2.37,1c-0.55,0.67-0.83,1.51-0.83,2.54c0,1.04,0.29,1.9,0.86,2.59c0.57,0.69,1.36,1.04,2.36,1.04\n\t\t\tc0.89,0,1.53-0.35,1.94-1.06h0.03l-0.03,0.36v0.54c0,0.6-0.18,1.04-0.55,1.32c-0.37,0.28-0.85,0.42-1.44,0.42\n\t\t\tc-0.48,0-0.96-0.09-1.43-0.27c-0.09-0.03-0.17-0.04-0.24-0.04c-0.22,0-0.39,0.12-0.49,0.36l-0.11,0.32\n\t\t\tc-0.05,0.1-0.07,0.2-0.07,0.28c0,0.2,0.12,0.36,0.37,0.46c0.58,0.26,1.27,0.39,2.07,0.39c0.99,0,1.85-0.28,2.58-0.84\n\t\t\tc0.73-0.56,1.09-1.4,1.09-2.53V5.26C60.51,4.87,60.32,4.67,59.93,4.67z M58.31,9.68c-0.31,0.33-0.7,0.49-1.17,0.49\n\t\t\tc-0.56,0-0.99-0.2-1.31-0.6c-0.31-0.4-0.47-0.94-0.47-1.6c0-0.6,0.15-1.08,0.44-1.44C56.1,6.18,56.52,6,57.05,6\n\t\t\tc1.15,0,1.72,0.69,1.72,2.08C58.78,8.82,58.62,9.36,58.31,9.68z M66.02,4.61c-0.46,0-0.88,0.18-1.26,0.55\n\t\t\tc-0.38,0.37-0.64,0.79-0.8,1.26h-0.03l0.04-0.49V5.26c0-0.39-0.2-0.59-0.59-0.59h-0.55c-0.39,0-0.58,0.2-0.58,0.59v5.96\n\t\t\tc0,0.39,0.19,0.59,0.58,0.59h0.62c0.39,0,0.58-0.2,0.58-0.59v-2.3c0-0.71,0.17-1.32,0.5-1.83c0.33-0.51,0.81-0.76,1.42-0.76\n\t\t\tc0.4,0,0.6-0.2,0.6-0.59V5.2C66.55,4.81,66.37,4.61,66.02,4.61z M70.14,4.5c-0.78,0-1.55,0.2-2.3,0.59\n\t\t\tc-0.21,0.11-0.31,0.26-0.31,0.45c0,0.1,0.03,0.21,0.09,0.33l0.13,0.27c0.11,0.21,0.25,0.31,0.45,0.31c0.09,0,0.2-0.03,0.32-0.08\n\t\t\tc0.5-0.27,0.99-0.4,1.47-0.4c0.88,0,1.31,0.42,1.31,1.26V7.4h-0.29c-0.46,0-0.91,0.03-1.34,0.1c-0.43,0.07-0.87,0.18-1.32,0.33\n\t\t\tc-0.45,0.16-0.82,0.41-1.09,0.75c-0.28,0.34-0.41,0.76-0.41,1.25c0,0.63,0.23,1.15,0.69,1.55c0.46,0.4,1.02,0.6,1.69,0.6\n\t\t\tc0.29,0,0.57-0.05,0.83-0.15c0.26-0.1,0.47-0.21,0.63-0.32c0.16-0.12,0.3-0.25,0.43-0.41c0.13-0.15,0.21-0.26,0.25-0.32\n\t\t\tc0.04-0.06,0.07-0.11,0.09-0.15h0.03l-0.03,0.31v0.28c0,0.39,0.19,0.59,0.58,0.59h0.48c0.39,0,0.59-0.2,0.59-0.59V7.35\n\t\t\tc0-0.9-0.26-1.6-0.79-2.1C71.79,4.75,71.07,4.5,70.14,4.5z M71.33,8.74c0,0.47-0.15,0.9-0.46,1.29c-0.31,0.39-0.7,0.59-1.16,0.59\n\t\t\tc-0.33,0-0.6-0.09-0.79-0.28c-0.19-0.19-0.28-0.41-0.28-0.66c0-0.8,0.8-1.2,2.4-1.2h0.29V8.74z M83.24,4.5\n\t\t\tc-0.52,0-1.01,0.15-1.45,0.44C81.36,5.24,81.03,5.59,80.83,6H80.8c-0.3-1-0.99-1.49-2.08-1.49c-0.51,0-0.98,0.15-1.4,0.46\n\t\t\tc-0.42,0.31-0.73,0.67-0.92,1.07h-0.03l0.03-0.33l0-0.44c0-0.4-0.19-0.6-0.58-0.6h-0.55c-0.39,0-0.58,0.2-0.58,0.59v5.96\n\t\t\tc0,0.39,0.19,0.59,0.58,0.59h0.62c0.39,0,0.58-0.2,0.58-0.59V8.62c0-0.66,0.16-1.23,0.48-1.72c0.32-0.49,0.77-0.74,1.35-0.74\n\t\t\tc0.38,0,0.63,0.12,0.76,0.37c0.13,0.24,0.19,0.59,0.19,1.05v3.65c0,0.39,0.2,0.59,0.59,0.59h0.62c0.38,0,0.57-0.2,0.57-0.59V8.62\n\t\t\tc0-0.67,0.16-1.24,0.48-1.73c0.32-0.49,0.76-0.73,1.32-0.73c0.38,0,0.64,0.12,0.77,0.36c0.13,0.24,0.2,0.59,0.2,1.05v3.65\n\t\t\tc0,0.39,0.2,0.59,0.59,0.59h0.6c0.39,0,0.59-0.2,0.59-0.59V7.22C85.58,5.41,84.8,4.5,83.24,4.5z M91.67,8.64\n\t\t\tc-0.24-0.31-0.53-0.55-0.87-0.7c-0.34-0.15-0.68-0.28-1.03-0.4c-0.35-0.11-0.64-0.24-0.88-0.39c-0.24-0.15-0.36-0.33-0.36-0.54\n\t\t\tc0-0.47,0.32-0.7,0.97-0.7c0.39,0,0.85,0.12,1.36,0.36c0.12,0.06,0.24,0.08,0.34,0.08c0.19,0,0.34-0.1,0.44-0.31l0.14-0.25\n\t\t\tc0.06-0.12,0.09-0.24,0.09-0.34c0-0.19-0.1-0.33-0.3-0.44C90.95,4.68,90.3,4.5,89.6,4.5c-0.78,0-1.42,0.19-1.94,0.56\n\t\t\tc-0.51,0.38-0.77,0.9-0.77,1.57c0,0.46,0.12,0.85,0.36,1.17c0.24,0.31,0.53,0.55,0.86,0.7c0.34,0.15,0.68,0.29,1.03,0.4\n\t\t\tc0.35,0.11,0.65,0.25,0.89,0.4c0.24,0.15,0.36,0.33,0.36,0.53c0,0.22-0.09,0.4-0.26,0.54c-0.18,0.13-0.42,0.2-0.73,0.2\n\t\t\tc-0.45,0-0.98-0.16-1.58-0.49c-0.13-0.07-0.25-0.1-0.36-0.1c-0.17,0-0.31,0.07-0.43,0.24l-0.17,0.25\n\t\t\tc-0.1,0.15-0.14,0.27-0.14,0.39c0,0.16,0.09,0.3,0.28,0.41c0.72,0.49,1.51,0.73,2.36,0.73c0.8,0,1.44-0.21,1.94-0.62\n\t\t\tc0.49-0.42,0.74-0.94,0.74-1.57C92.03,9.34,91.91,8.96,91.67,8.64z\"/\u003e\n\t\u003c/g\u003e\n\u003c/g\u003e\n\u003c/svg\u003e\n"; var inlineButton = ''; // Add styles var head = document.querySelector("head"); var customStyle = document.createElement('style'); customStyle.appendChild(document.createTextNode(injectedStylesheet)); head.appendChild(customStyle); // Nicely Append new elements instead to keep bound js Events var globalContainerDiv = document.createElement('div'); globalContainerDiv.classList.add("global-nav-container"); globalContainerDiv.innerHTML = inlineButton + iframeHtml; document.body.insertBefore(globalContainerDiv, document.body.firstChild); // Add animation to bar setTimeout(function(){ var globalContainerDivList = document.getElementsByClassName("global-nav-container"); globalContainerDivList[0].classList.add("global-nav-container--in-view"); }, 100); // Prevent scrolling of page behind iframe var bodyStyle = getComputedStyle(document.body, null); var defaultBodyOverflow = bodyStyle.overflow; var defaultBodyPosition = bodyStyle.position; // Append body class for ios to allow scrolling of iframe if( navigator.vendor != null && navigator.vendor.match(/Apple Computer, Inc./) && navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.match(/iPhone/i) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i)) ){ document.getElementsByTagName('body')[0].className+=' ios-safari'; } var button = document.getElementById("global-nav-button"); button.addEventListener('click', function (e) { e.preventDefault(); var iframeElement = document.getElementById("global-nav-iframe"); var menuStatus = button.getAttribute('data-menu-status'); if (menuStatus === 'open') { button.classList.remove("menu--open"); iframeElement.classList.remove("menu--open"); button.setAttribute('data-menu-status', ''); document.body.style.overflow = defaultBodyOverflow; document.body.style.position = defaultBodyPosition; document.body.classList.remove("body--global-nav-open"); } else { button.classList.add("menu--open"); iframeElement.classList.add("menu--open"); button.setAttribute('data-menu-status', 'open'); document.body.style.overflow = 'hidden'; document.body.style.position = 'fixed'; document.body.classList.add("body--global-nav-open"); } }); function insertBefore(el, referenceNode) { referenceNode.parentNode.insertBefore(el, referenceNode); } }());