var $sa=$sa||{};$sa.gigya=$sa.gigya||{};$sa.convio=$sa.convio||{};$sa.currentDomain=window.location.host.toLowerCase();$sa.gigya.sameOriginFix=function(){return window.open("http://www.gigya.com"),setTimeout(window.close,5e3),!1};$sa.getParameterByName=function(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(location.search);return t===null?"":decodeURIComponent(t[1].replace(/\+/g," "))};$sa.isValidEmailAddress=function(n){var t=new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);return t.test(n)};$sa.showFAQ=function(){var n=$(window).width(),t=n*.6,i=$(window).height(),r=i*.6;return n<=480&&(t=n*.95,r=i*.95),$("#faq").dialog({modal:!0,draggable:!1,resizable:!1,width:t,height:r,closeOnEscape:!0,dialogClass:"faq"}).scrollTop(0).find("a.button").click(function(){$("#faq").dialog("close")}),$("#accordion").accordion({heightStyle:"content",active:0}),!1};$sa.readCookie=function(n){for(var t,e,i,r,u=n+"=",o=document.cookie.split(";"),f=0;f<o.length;f++)for(t=o[f];t.charAt(0)==" ";)if(t=t.substring(1,t.length),t.indexOf(u)>-1)for(e=t.split("&"),i=0;i<e.length;i++)if(r=e[i],r.indexOf(u)>-1)return r.substring(u.length,r.length);return null};$sa.createCookie=function(n,t,i){var u="",r;i&&(r=new Date,r.setTime(r.getTime()+i*6e4),u="; expires="+r.toGMTString());document.cookie=n+"="+t+u+"; path=/"};$sa.throbber={};$sa.throbber.visible=!1;$sa.throbber.show=function(){$sa.throbber.visible||($("body").append('<div id="loading"><div class="gigya-screen-dimmer"><\/div><div class="gigya-screen-loader"><\/div><\/div>'),$sa.throbber.visible=!0)};$sa.throbber.hide=function(){$("#loading").remove();$sa.throbber.visible=!1};$sa.observeDomChange=function(n,t){var u=function(){for(var t=["WebKit","Moz","O","Ms",""],n=0;n<t.length;n++)if(t[n]+"MutationObserver"in window)return window[t[n]+"MutationObserver"];return!1}(),i,r,f;return u?(i=document.querySelector(n),!i)?null:(r=new u(function(n){n.forEach(function(n){t(n.type)})}),f={attributes:!1,childList:!0,characterData:!1,subtree:!0},r.observe(i,f),r):null};$sa.addTabIndexToSocialControls=function(n,t){var i=$(n),r=function(){var n=0;$(i).find("div[gigid]").each(function(){var i=$(this).attr("gigid"),r;(i==="facebook"||i==="googleplus"||i==="apple")&&(r=$(this).parent(),$(r).attr("tabindex",n+t).keyup(function(n){if(n.keyCode==13)return $(r).click(),!1}),n++)})};$(i).length>0&&r()};$sa.showDialog=function(n,t){var i=$(window).width(),r=i>420?"400px":i-20+"px";$(n).dialog({autoOpen:!0,modal:!1,width:r,resizable:!1,position:{my:"center top",at:"center top",of:$(t),collision:"fit"},clickOutside:!0,clickOutsideTrigger:n}).find("a.button").click(function(){$(n).dialog("close")})};$sa=$sa||{};$sa.locale=$sa.locale||{};$sa.forgotPassword=$sa.forgotPassword||{};$("#divPasswordStrengthStatement").hide();$sa.forgotPassword.showError=function(n,t,i){var u=i||$(n).html(),r=$(t);r.html(u);r.hasClass("gigya-error-msg")&&r.addClass("gigya-error-msg-active");r.hasClass("gigya-error-display")&&r.addClass("gigya-error-display-active");r.show()};$sa.forgotPassword.hideError=function(n){var t=$(n);t.html("");t.hasClass("gigya-error-msg")&&t.removeClass("gigya-error-msg-active");t.hasClass("gigya-error-display")&&t.removeClass("gigya-error-display-active");t.hide()};$sa.forgotPassword.init=function(n,t){$sa.throbber.show();var r={forgotPassword:"forgot-password-target-form-screen",forgotPasswordCodeEntry:"forgot-password-enter-data-screen",forgotPasswordSuccess:"forgot-password-update-success-screen"},u,i,f,e=function(){var e,o;window.dataLayer!==undefined&&window.dataLayer.push({event:"registrationStepEncountered",stepName:"forgotPassword",stepHostname:"accounts.cancer.org"});$("#forgotPasswordTargetForm").submit(function(){if($sa.throbber.show(),$sa.forgotPassword.hideError("#targetFormGeneralError"),i=$("#ACSRecoveryCodeDestinationAddress").val(),f=(document.getElementById("targetFormEmail").value||"").trim(),!i)return $sa.forgotPassword.showError("#targetFormInvalidEmailError","#targetFormGeneralError"),$sa.throbber.hide(),!1;var e="SearchValue="+encodeURIComponent(i);return e+="&Email="+encodeURIComponent(f),$.ajax({url:"/api/account/SendPasswordRecoveryCode?"+e,dataType:"json",success:function(f){var e,o;f&&($sa.forgotPassword.hideError("#targetFormGeneralError"),f.dataType=="email"&&($("#targetFormEmailInput").hide(),$("#targetFormEmail").val("")),f.Successful?(u=f.DataType,i=f.DataValue,f.RecoveryLinkEmailSent?(gigya.accounts.switchScreen({screenSet:n,containerID:t,screen:r.forgotPasswordSuccess}),$("#successInstructions").text($("#successAlternateInstructions").text())):(gigya.accounts.switchScreen({screenSet:n,containerID:t,screen:r.forgotPasswordCodeEntry}),u=="email"?(e=i.slice(0,i.indexOf("@"))+"********",$("#enterDataInstructions").text($("#enterDataEmailInstructions").text()+e)):(e="******"+i.substr(i.length-4),$("#enterDataInstructions").text($("#enterDataTXTInstructions").text()+e)))):(o=(f.ErrorCode||"").trim().toLowerCase(),o=="foundmultiple"?(u=f.DataType,i=f.DataValue,$("#ACSRecoveryCodeDestinationAddress").val(i),$("#targetFormEmailInput").show(),$sa.forgotPassword.showError("#targetFormFoundMultipleError","#targetFormGeneralError")):o=="invalidphone"?$sa.forgotPassword.showError("#targetFormInvalidPhoneError","#targetFormGeneralError"):$sa.forgotPassword.showError("#targetFormInvalidEmailError","#targetFormGeneralError")));$sa.throbber.hide()}}),!1});e=$sa.getParameterByName("email")||"";e=="undefined"&&(e="");$("#ACSRecoveryCodeDestinationAddress").val(e);o=$sa.getParameterByName("returnUrl")||"/login";$("a.cancelLink").attr("href",o)},o=function(){window.dataLayer!==undefined&&window.dataLayer.push({event:"registrationStepEncountered",stepName:"enterYourCode",stepHostname:"accounts.cancer.org"});$("#enterDataCodeTryAgainButton").click(function(){gigya.accounts.switchScreen({screenSet:n,containerID:t,screen:r.forgotPassword})});$("#forgotPasswordEnterDataForm").submit(function(){var s;$sa.throbber.show();$sa.forgotPassword.hideError("#enterDataGeneralError");var e=(document.getElementById("ACSRecoveryCode").value||"").trim(),u=(document.getElementById("ACSNewPassword").value||"").trim(),o=(document.getElementById("ACSRetypePassword").value||"").trim();return e==""||e.length<6?($sa.throbber.hide(),$sa.forgotPassword.showError("#enterDataInvalidCodeError","#enterDataGeneralError"),!1):u==""?($sa.throbber.hide(),$sa.forgotPassword.showError("#enterDataInvalidNewPasswordError","#enterDataGeneralError"),!1):u!==o?($sa.throbber.hide(),$sa.forgotPassword.showError("#enterDataInvalidPasswordNotMatchError","#enterDataGeneralError"),!1):u.length<7?($sa.throbber.hide(),$("#enterDataGeneralError").text($sa.locale.PasswordComplexityFailure).addClass("gigya-error-msg-active").show(),!1):(s="Code="+encodeURIComponent(e)+"&NewPassword="+encodeURIComponent(u)+"&SearchValue="+encodeURIComponent(i)+"&Email="+encodeURIComponent(f),$.ajax({url:"/api/account/RecoverPassword?"+s,dataType:"json",success:function(i){if($sa.forgotPassword.hideError("#enterDataGeneralError"),i)if(i.Successful)gigya.accounts.switchScreen({screenSet:n,containerID:t,screen:r.forgotPasswordSuccess});else{var u=(i.ErrorCode||"").trim().toLowerCase();switch(u){case"invalidcode":$("#enterDataGeneralError").addClass("gigya-error-msg-active").text($sa.locale.ForgotPasswordEnterDataInvalidCodeMsg).show();$sa.forgotPassword.showError("#enterDataInvalidCodeError","#enterDataGeneralError");break;case"codeexpired":$sa.forgotPassword.showError("#enterDataCodeExpiredError","#enterDataGeneralError");break;case"invalidpassword":$sa.forgotPassword.showError("#enterDataInvalidNewPasswordError","#enterDataGeneralError");break;case"passwordmismatch":$("#enterDataGeneralError").addClass("gigya-error-msg-active").text($sa.locale.ForgotPasswordEnterDataPasswordNotMatch).show();$sa.forgotPassword.showError("#enterDataInvalidPasswordNotMatchError","#enterDataGeneralError");break;case"weakpassword":$("#enterDataGeneralError").text($sa.locale.PasswordComplexityFailure).addClass("gigya-error-msg-active").show();break;default:$("#enterDataGeneralError").text($sa.locale.UnexpectedError).addClass("gigya-error-msg-active").show()}}$sa.throbber.hide()}}),e="",u="",o="",!1)})},s=function(){window.dataLayer!==undefined&&window.dataLayer.push({event:"registrationStepEncountered",stepName:"forgotPasswordSuccess",stepHostname:"accounts.cancer.org"});$("#forgotPasswordSuccessDone").attr("href",$sa.getParameterByName("redirectURL")||"/login")},h=function(n){switch(n.currentScreen){case r.forgotPassword:e(n);break;case r.forgotPasswordCodeEntry:o(n);break;case r.forgotPasswordSuccess:s(n)}$sa.throbber.hide()};gigya.accounts.showScreenSet({containerID:t,screenSet:n,startScreen:r.forgotPassword,onAfterScreenLoad:h})};$sa=$sa||{};$sa.locale=$sa.locale||{};$sa.addPhoneNumber=$sa.addPhoneNumber||{};$sa.addPhoneNumber.init=function(n,t){$sa.throbber.show();var i={addPhoneNumber:"add-phone-number-screen",addPhoneNumberSuccess:"add-phone-number-success-screen"},r,u=function(){window.dataLayer!==undefined&&window.dataLayer.push({event:"registrationStepEncountered",stepName:"addPhoneNumber",stepHostname:"accounts.cancer.org"});$("#ACSAddPhoneDecline").click(function(){$sa.throbber.show();$("#addPhoneNumberInvalidError").removeClass("gigya-error-msg-active").removeClass("gigya-error-display-active").hide();$("#addPhoneNumberDeclineError").removeClass("gigya-error-msg-active").removeClass("gigya-error-display-active").hide();$("#addPhoneNumberError").removeClass("gigya-error-msg-active").removeClass("gigya-error-display-active").hide();$.ajax({url:"/api/account/DeclineRecoveryPhoneNumberSetup",dataType:"json",success:function(n){$("#addPhoneNumberInvalidError").removeClass("gigya-error-msg-active").removeClass("gigya-error-display-active").hide();$("#addPhoneNumberDeclineError").removeClass("gigya-error-msg-active").removeClass("gigya-error-display-active").hide();$("#addPhoneNumberError").removeClass("gigya-error-msg-active").removeClass("gigya-error-display-active").hide();n&&(n.Successful?($sa.throbber.hide(),window.location.href=$sa.getParameterByName("redirectURL")||"/Login"):$("#addPhoneNumberDeclineError").addClass("gigya-error-msg-active").addClass("gigya-error-display-active").show());$sa.throbber.hide()}})});$("#addPhoneNumberForm").submit(function(){return $sa.throbber.show(),r=document.getElementById("ACSAddPhoneNumberValue").value,r?$.ajax({url:"/api/account/UpdateRecoveryPhoneNumber?value="+encodeURIComponent(r),dataType:"json",success:function(r){$("#addPhoneNumberInvalidError").removeClass("gigya-error-msg-active").removeClass("gigya-error-display-active").hide();$("#addPhoneNumberDeclineError").removeClass("gigya-error-msg-active").removeClass("gigya-error-display-active").hide();$("#addPhoneNumberError").removeClass("gigya-error-msg-active").removeClass("gigya-error-display-active").hide();r&&(r.Successful?(gigya.accounts.switchScreen({screenSet:n,containerID:t,screen:i.addPhoneNumberSuccess}),$("#addPhoneNumberInvalidError").removeClass("gigya-error-msg-active").removeClass("gigya-error-display-active").hide(),$("#addPhoneNumberDeclineError").removeClass("gigya-error-msg-active").removeClass("gigya-error-display-active").hide(),$("#addPhoneNumberError").removeClass("gigya-error-msg-active").removeClass("gigya-error-display-active").hide(),$sa.throbber.hide()):($("#addPhoneNumberInvalidError").removeClass("gigya-error-msg-active").removeClass("gigya-error-display-active").hide(),$("#addPhoneNumberDeclineError").removeClass("gigya-error-msg-active").removeClass("gigya-error-display-active").hide(),$("#addPhoneNumberError").addClass("gigya-error-msg-active").addClass("gigya-error-display-active").show(),$sa.throbber.hide()))}}):($("#addPhoneNumberInvalidError").addClass("gigya-error-msg-active").addClass("gigya-error-display-active").show(),$sa.throbber.hide()),!1});var u=$sa.getParameterByName("redirectURL")||"/Login";$("a.cancelLink").attr("href",u)},f=function(){window.dataLayer!==undefined&&window.dataLayer.push({event:"registrationStepEncountered",stepName:"addPhoneNumberSuccess",stepHostname:"accounts.cancer.org"});$("#addPhoneNumberSuccessDone").attr("href",$sa.getParameterByName("redirectURL")||"/Login")},e=function(n){switch(n.currentScreen){case i.addPhoneNumber:u(n);break;case i.addPhoneNumberSuccess:f(n)}$sa.throbber.hide()};gigya.accounts.showScreenSet({containerID:t,screenSet:n,startScreen:i.addPhoneNumber,onAfterScreenLoad:e})};$sa=$sa||{};$sa.login=$sa.login||{};$sa.login.init=function(n,t){$sa.throbber.show();var i={login:"gigya-login-screen",completeRegistration:"gigya-complete-registiration-screen",linkAccount:"gigya-link-account-screen",postMigrationReminder:"PostMigrationReminder"},u=i.login,f=$("a.forgotPassword").attr("href"),r={enabled:!0,enabledDefaultValue:!0,timeoutValue:15e3,handler:function(n,t){$sa.throbber.show();$("#AccountStatus").val(n.AccountStatus);$("#Migration").val(n.Migration);$("#UniqueIdentifier").val(n.UniqueIdentifier);$("#Login").val(n.Login);$("#Password").val(t);$("#Email").val(n.Email);$("#FirstName").val(n.FirstName);$("#LastName").val(n.LastName);$("#Requirements").val(n.Requirements);$("#migrateForm").submit()},checker:function(){if(r.enabled){var f=$("#ACSLoginID").val(),u=$("#ACSPassword").val(),e=setTimeout(function(){r.enabled=!1;$("#loginButton").click()},r.timeoutValue);return $.ajax({type:"POST",dataType:"json",success:function(f){clearTimeout(e);switch(f.AccountStatus){case"Migrated":case 0:gigya.accounts.switchScreen({screenSet:n,containerID:t,screen:i.postMigrationReminder});$sa.throbber.hide();break;case"NeedsMigration":case 1:case"NeedsLinking":case 2:r.handler(f,u);break;default:r.enabled=!1;$("#loginButton").click()}},url:"/api/account/getmigrationdetails",data:"loginID="+encodeURIComponent(f)+"&password="+encodeURIComponent(u)}),!0}return r.enabled=r.enabledDefaultValue,!1}},e=function(n){$sa.throbber.hide();switch(n.screen){case i.login:$("#ACSLoginID, #ACSPassword").addClass("gigya-error");r.enabled=r.enabledDefaultValue;break;case i.LinkAccount:document.getElementById("linkAccountStatus").style.display="block";document.getElementById("linkAccountStatus").style.color="red";document.getElementById("linkAccountStatus").innerHTML=n.errorMessage}},o=function(n){$sa.throbber.show();$("#UID").val(n.UID);$("#UIDSignature").val(n.UIDSignature);$("#SignatureTimestamp").val(n.signatureTimestamp);$("#loginForm").submit()},s=function(n){switch(n.currentScreen){case i.login:u=i.login;window.dataLayer!==undefined&&window.dataLayer.push({event:"registrationStepEncountered",stepName:"loginPage",stepHostname:"accounts.cancer.org"});$sa.observeDomChange("#socialLoginBox",function(){$sa.addTabIndexToSocialControls("#socialLoginBox",5)});break;case i.linkAccount:u=i.linkAccount}var t=f+"?returnUrl=/login"+encodeURIComponent("#"+u)+"&email=";$("a.forgotPassword").attr("href",t).click(function(){$(this).attr("href",t+encodeURIComponent($("#ACSLoginID").val()))});$("a.faq").click($sa.showFAQ);$("#questionsAboutLoginWithSocial").click(function(){return $sa.showDialog("#questionsAboutSocialDialog","#socialLoginBox"),!1});$sa.throbber.hide()},h=function(n){return($sa.throbber.show(),n.screen==i.login&&r.checker())?!1:!0};switch(window.location.hash){case i.login:u=i.login;break;case i.linkAccount:u=i.linkAccount}gigya.accounts.showScreenSet({containerID:t,screenSet:n,startScreen:u,onError:e,onAfterScreenLoad:s,onBeforeSubmit:h});gigya.accounts.addEventHandlers({onLogin:o})};$sa=$sa||{};$sa.locale=$sa.locale||{};$sa.migrate=$sa.migrate||{};$sa.migrate.init=function(n,t,i){$sa.throbber.show();var u=i,r={preLoginMigration:"pre-login-migration-screen",preLoginMigrationSuccess:"pre-login-migration-success-screen",postLoginMigration:"post-login-migration-screen",postLoginMigrationSuccess:"post-login-migration-success-screen"},f=function(){return $sa.throbber.show(),$("#loginForm").submit(),!1},e=function(n){$("#generalError").addClass("gigya-error-msg-active").text(n.errorMessage).show()},s=function(n){$("#generalError").removeClass("gigya-error-msg-active").hide();$("#UID").val(n.UID);$("#UIDSignature").val(n.UIDSignature);$("#SignatureTimestamp").val(n.signatureTimestamp);$("#migratingEmail").text(n.profile.email)},h=function(n){switch(n.screen){case r.preLoginMigration:var i=n.context.Email,t=$("#email").val(),u=$("#retypeEmail").val();if(t!=i&&t!=u)return!1}return!0},c=function(){$("#doubleCheckEmail").hide();$("#email").on("change input blur",function(n){$("#data\\.Preferred_contact_email").val($("#email").val());$("#email").val()!=u.Email?$("#doubleCheckEmail").show(function(){n.type=="blur"&&$("#retypeEmail").focus();$("#email, #retypeEmail").blur(function(){var n=$("#email").val(),t=$("#retypeEmail").val();$.trim(n)!=$.trim(t)?$("#confirmEmailMessage").addClass("gigya-error-msg-active").text($sa.locale.EmailMismatch):$("#confirmEmailMessage").removeClass("gigya-error-msg-active").text("")})}):($("#email, #retypeEmail").off("blur"),$("#doubleCheckEmail").hide(),$("#password").focus())})},l=function(){$("#migrationSuccessContinue").click(function(){return f(),!1});var i=function(i){i.errorCode===0?($("#UID").val(i.UID),$("#UIDSignature").val(i.UIDSignature),$("#SignatureTimestamp").val(i.signatureTimestamp),gigya.accounts.switchScreen({screenSet:n,containerID:t,screen:r.postLoginMigrationSuccess})):e(i);$sa.throbber.hide()};$("#facebookLink").click(function(){return $sa.throbber.show(),gigya.socialize.addConnection({callback:i,provider:"facebook"}),!1});$("#googleLink").click(function(){return $sa.throbber.show(),gigya.socialize.addConnection({callback:i,provider:"google"}),!1});$("#appleLink").click(function(){return $sa.throbber.show(),gigya.socialize.addConnection({callback:i,provider:"apple"}),!1})},a=function(){$("a.forgotPassword").click(function(){var n=$("#migratingLoginID").val(),t=$("a.forgotPassword").attr("href");return $("a.forgotPassword").attr("href",t+"?returnUrl=/login&email="+encodeURIComponent(n)+"&type="+encodeURIComponent(u.Migration)),!0});$("#migrationForm").submit(function(){$sa.throbber.show();var i=$("#migratingLoginID").val(),f=$("#migratingPassword").val();return $.ajax({type:"POST",dataType:"json",success:function(i){switch(i.AccountStatus){case"Migrated":case 0:case"Linked":case 6:gigya.accounts.switchScreen({screenSet:n,containerID:t,screen:r.postLoginMigrationSuccess});$("#generalError").removeClass("gigya-error-msg-active").text("");break;default:$("#generalError").addClass("gigya-error-msg-active").text($sa.locale.ValidationFailure)}$sa.throbber.hide()},error:function(){$("#generalError").addClass("gigya-error-msg-active").text($sa.locale.UnexpectedError);$sa.throbber.hide()},url:"/api/account/migrateuser",data:"loginID="+encodeURIComponent(i)+"&password="+encodeURIComponent(f)+"&type="+encodeURIComponent(u.Migration)}),!1});$("#newUser").click(function(){return $sa.throbber.show(),$.ajax({type:"GET",dataType:"json",success:function(n){n===!0?(window.location.href="/login",$("#generalError").removeClass("gigya-error-msg-active").text("")):($("#generalError").addClass("gigya-error-msg-active").text($sa.locale.UnexpectedError),$sa.throbber.hide())},error:function(){$("#generalError").addClass("gigya-error-msg-active").text($sa.locale.UnexpectedError);$sa.throbber.hide()},url:"/api/account/provisionuser?type="+encodeURIComponent(u.Migration)}),!1})},v=function(){$("#UID").val()!=""&&$("#socialMigrationSuccessContinue").click(function(){return f(),!1})},o=function(n){switch(n.currentScreen){case r.preLoginMigration:c(n);break;case r.preLoginMigrationSuccess:l(n);break;case r.postLoginMigration:a(n);break;case r.postLoginMigrationSuccess:v(n)}$("a.faq").click($sa.showFAQ);$sa.throbber.hide()},y=function(){gigya.accounts.showScreenSet({screenSet:n,containerID:t,startScreen:r.preLoginMigrationSuccess,onAfterScreenLoad:o})},p=u.AccountStatus==2||u.AccountStatus=="NeedsLinking"?r.postLoginMigration:r.preLoginMigration;gigya.accounts.showScreenSet({screenSet:n,containerID:t,startScreen:p,onError:e,onAfterScreenLoad:o,onBeforeSubmit:h,onHide:y});gigya.accounts.addEventHandlers({onLogin:s})};$sa=$sa||{};$sa.locale=$sa.locale||{};$sa.convio=$sa.convio||{};$sa.passwordReset=$sa.passwordReset||{};$sa.passwordReset.init=function(n,t){var r={resetPassword:"reset_password",resetPasswordSuccess:"reset_password_complete"},i=function(n){$sa.throbber.hide();$("#message").html(n);$("#message").addClass("gigya-error-msg-active");$("#message").show()},u=function(n){i(n.errorMessage)},f=function(u){if(u.Successful===!0)gigya.accounts.switchScreen({screenSet:n,containerID:t,screen:r.resetPasswordSuccess});else switch(u.ExtendedMessages.ErrorCode){case"400009":i($sa.locale.PasswordComplexityFailure);break;case"400006":i($sa.locale.InvalidResetTokenError);break;default:i($sa.locale.JavascriptPasswordFailure)}$sa.throbber.hide()},e=function(){i($sa.locale.UnexpectedError)},o=function(){$sa.throbber.show();var n=$sa.getParameterByName("pwrt"),t=$("#newPassword").val();return n?($sa.throbber.show(),$.ajax({type:"POST",dataType:"json",success:f,error:e,url:"/api/account/resetpassword",data:"password="+encodeURIComponent(t)+"&token="+encodeURIComponent(n)})):i($sa.locale.InvalidResetTokenError),!1};gigya.accounts.showScreenSet({screenSet:n,containerID:t,startScreen:r.resetPassword,onError:u,onBeforeSubmit:o})};$sa=$sa||{};$sa.locale=$sa.locale||{};$sa.convio=$sa.convio||{};$sa.register=$sa.register||{};$sa.register.init=function(n,t){$sa.throbber.show();var i={register:"gigya-registration-screen",completeRegistration:"gigya-complete-registiration-screen",registrationSuccess:"gigya-thank-you-screen"},u=i.register,f=function(n){$sa.throbber.show();$("#UID").val(n.UID);$("#UIDSignature").val(n.UIDSignature);$("#SignatureTimestamp").val(n.signatureTimestamp);$("#registerForm").submit()},r=function(){var n=$("#retypeEmail").val(),t=$("#originalEmail").val();return($("#confirmEmailMessage").removeClass("gigya-error-msg-active").text(""),$("#confirmEmailRequiredMessage").removeClass("gigya-error-msg-active").text(""),n!=t&&n!=""&&t!="")?($("#confirmEmailMessage").addClass("gigya-error-msg-active").text($sa.locale.EmailMismatch),!1):n==""&&t!=""?($("#confirmEmailRequiredMessage").addClass("gigya-error-msg-active").text($sa.locale.RequiredField),!1):!0},e=function(n){switch(n.currentScreen){case i.register:window.dataLayer!==undefined&&window.dataLayer.push({event:"registrationStepEncountered",stepName:"createAccount",stepHostname:"accounts.cancer.org"});var t="#registerSocialLoginBox";$sa.observeDomChange(t,function(){$sa.addTabIndexToSocialControls(t,7)})}$("#originalEmail").blur(r);$("#retypeEmail").blur(r);$("a.faq").click($sa.showFAQ);$("#questionsAboutRegisterWithSocial").click(function(){return $sa.showDialog("#questionsAboutSocialDialog","#registerSocialLoginBox"),!1});$sa.throbber.hide()},o=function(n){return n.screen==i.register&&!r()?!1:!0};gigya.accounts.showScreenSet({screenSet:n,containerID:t,startScreen:u,onAfterScreenLoad:e,onBeforeSubmit:o});gigya.socialize.addEventHandlers({onLogin:f})},function(n,t,i,r,u,f,e){n.GoogleAnalyticsObject=u;n[u]=n[u]||function(){(n[u].q=n[u].q||[]).push(arguments)};n[u].l=1*new Date;f=t.createElement(i);e=t.getElementsByTagName(i)[0];f.async=1;f.src=r;e.parentNode.insertBefore(f,e)}(window,document,"script","https://www.google-analytics.com/analytics.js","ga");ga("create","UA-34078900-50","auto",{name:"registrationTracker"})