var RIS;(function(n){"use strict";var t=function(){function t(n){this.calcName=n}return t.prototype.sendButtonEvent=function(n){typeof ga!="undefined"&&ga("send","event",this.calcName,"button",n,1)},t.prototype.sendNumberButtonEvent=function(t,i){var r=t+" "+n.Formatting.digitToString(i);this.sendButtonEvent(r)},t.prototype.sendBooleanButtonEvent=function(t,i){var r=t+" "+n.Formatting.booleanToOnOff(i);this.sendButtonEvent(r)},t.prototype.sendInputPanelEvent=function(n){typeof ga!="undefined"&&ga("send","event",this.calcName,"input panel",n,1)},t.sendPageView=function(){typeof ga!="undefined"&&(ga("set",{page:window.location.pathname+window.location.hash,title:document.title}),ga("send","pageview"))},t.prototype.sendAnchorEvent=function(n,t){if(typeof ga!="undefined"&&ga.loaded){var i=t.target,r=$(i).closest("a"),u=r.attr("href");ga("send","event",this.calcName,"button",n,{hitCallback:function(){window.location.href=u}});t.preventDefault()}},t}();n.Analytics=t})(RIS||(RIS={})),function(n){var t;(function(n){n[n.xxs=1]="xxs";n[n.xs=2]="xs";n[n.sm=3]="sm";n[n.md=4]="md";n[n.lg=5]="lg"})(t=n.EnumScreenSize||(n.EnumScreenSize={}))}(RIS||(RIS={})),function(n){"use strict";var t=function(){function t(){this.ScreenSize=ko.observable(n.EnumScreenSize.lg)}return t}();n.ScreenViewModel=t}(RIS||(RIS={})),function(n){"use strict";var t=function(){function t(){}return t.setupFastClick=function(){typeof FastClick!="undefined"&&FastClick.attach(document.body)},t.setupSmallScreen=function(){var i=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;i>1199?t.ViewModel.ScreenSize(n.EnumScreenSize.lg):i<1200&&i>991?t.ViewModel.ScreenSize(n.EnumScreenSize.md):i<992&&i>767?t.ViewModel.ScreenSize(n.EnumScreenSize.sm):i<768&&i>416?t.ViewModel.ScreenSize(n.EnumScreenSize.xs):t.ViewModel.ScreenSize(n.EnumScreenSize.xxs);$("body").removeClass("collapsedNavBarBodyPadding");t.ViewModel.ScreenSize()===n.EnumScreenSize.xxs&&t.showingNavBar&&$("body").addClass("collapsedNavBarBodyPadding")},t.showOrHideDbText=function(){Mercer.RIS.ViewModel.DbData?$(".VisibleAccumulation").hide():$(".VisibleDefinedBenefit").hide()},t.setupTooltips=function(){$(".mytooltip.appeartop").popover({placement:"top"});$(".mytooltip.appearbottom").popover({placement:"bottom"});$(".mytooltip.appearleft").popover({placement:"left"});$(".mytooltip.appearright").popover({placement:"right"});$("body").on("click",function(n){$(".mytooltip").each(function(){$(this).is(n.target)||$(this).has(n.target).length!==0||$(this).popover("hide")})})},t.preventBounceScroll=function(){$(window).on("touchstart",function(n){this.lastY=n.originalEvent.pageY});$(window).on("touchmove",function(n){var f=n.originalEvent.targetTouches[0].pageY>this.lastY,e=!f,i,r,u,t;this.lastY=n.originalEvent.targetTouches[0].pageY;u=$(n.target).closest(".AllowScroll");u.length?(t=u[0],i=t.scrollTop>0,r=t.scrollHeight-t.offsetHeight>t.scrollTop):(t=$("body")[0],i=t.scrollTop>0,r=t.scrollTop+window.innerHeight<t.scrollHeight);(f&&!i||e&&!r)&&n.originalEvent.preventDefault()})},t.addScreenResizeHandler=function(n){var i=new Date;$(window).resize(function(){t.waitForFinalResizeEvent(function(){t.setupSmallScreen();n&&n()},500,i.getTime())})},t.ViewModel=new n.ScreenViewModel,t.showingNavBar=!0,t.isIE8OrLess=!document.addEventListener,t.isTouchDevice=/(Mobile|Android|Windows Phone)/.test(navigator.userAgent),t.waitForFinalResizeEvent=function(){var n={};return function(t,i,r){r=r||(r="timeout");n[r]&&clearTimeout(n[r]);n[r]=setTimeout(t,i)}}(),t}();n.Screen=t}(RIS||(RIS={})),function(n){"use strict";var t=function(){function t(t){this.risAnalytics=new n.Analytics(t)}return t.prototype.init=function(){var t=this;this.setupEventHandlers();$("#FooterDiv").hide();$("body").removeClass("bodyWithFooter");$("html").removeClass("htmlWithFooter");$("html").addClass("htmlFullScreen");n.Screen.showingNavBar=!1;n.Screen.setupSmallScreen();t.setupMenuBar();t.resizeWelcomeBackground();n.Screen.setupFastClick();n.WebClip.preventLinksFromOpeningInBrowser()},t.prototype.setupEventHandlers=function(){var t=this;$("#WelcomeImportantInformationLinkText").click(function(){$("#WelcomeImportantInformationLink").toggleClass("Closed");$("#WelcomeImportantInformationText").toggleClass("Closed")});$(".CollapseContainer > .CollapseHandle").click(function(n){$(n.currentTarget).parent().toggleClass("expanded")});n.Screen.addScreenResizeHandler(function(){t.resizeWelcomeBackground();t.setupMenuBar()})},t.prototype.resizeWelcomeBackground=function(){var t,i,r;($("#WelcomeBackground").length||n.Screen.ViewModel.ScreenSize()===n.EnumScreenSize.xs||n.Screen.ViewModel.ScreenSize()===n.EnumScreenSize.xxs)&&(t=$(window).height(),showBanner&&(i=$(".banner").outerHeight(),t-=i),r=$("#WelcomeContent").outerHeight(),$("#WelcomeBackground").height(Math.max(t,r)))},t.prototype.setupMenuBar=function(){showBanner&&(n.Screen.ViewModel.ScreenSize()===n.EnumScreenSize.xs||n.Screen.ViewModel.ScreenSize()===n.EnumScreenSize.xxs?$("#MainNavDiv").show():$("#MainNavDiv").hide())},t}();n.WelcomeScreen=t}(RIS||(RIS={}));$(document).ready(function(){var n=new RIS.WelcomeScreen(configName);n.init()})