function DoSomething(n){n.Message!==undefined&&n.Message.length>0&&$.sticky(n.Message,{classList:"error"});n.Data.Refresh===!0&&(window.location=n.Data.RedirectUrl!==undefined?n.Data.RedirectUrl:window.location)}$(document).ready(function(){var n=$('input[name="__RequestVerificationToken"]').val();$(".tabs-holder").on("click","#create-account",function(){if($("#login-form-create").valid()){let t=$("#login-form-create").serialize();t+="&__RequestVerificationToken="+n;$.ajax({url:"/my-account/create-account",data:t,type:"POST",success:function(n){DoSomething(n)}})}});$(".tabs-holder").on("click","#login-account",function(){if($("#login-form-order").valid()){let t=$("#login-form-order").serialize();t+="&__RequestVerificationToken="+n;$.ajax({url:"/my-account/my-orders-login",data:t,type:"POST",success:function(n){n.Message!==undefined&&n.Message.length>0&&$.sticky(n.Message,{classList:"error"});n.Data.Refresh===!0&&(window.location=n.Data.RedirectUrl!==undefined?n.Data.RedirectUrl:window.location)}})}});$("#login-password").on("click",function(){if($("#login-form-password").valid()){let t=$("#login-form-password").serialize();t+="&__RequestVerificationToken="+n;$.ajax({url:"/my-account/member-login",data:t,type:"POST",success:function(n){DoSomething(n)}})}});$(".tabs-holder").on("click","#reset-account",function(){if($("#login-form-reset").valid()){let t="forgot-email="+$("#reset-email").val();t+="&__RequestVerificationToken="+n;$.ajax({url:"/my-account/reset",data:t,type:"POST",success:function(n){DoSomething(n)}})}});$("#login-form-member").validate({ignore:"",rules:{"member-email":{required:!0,email:!0},"member-password":{required:!0}},messages:{"member-email":{required:"You must enter a valid email",email:"You must enter a valid email"},"member-password":{required:"You must enter a password"}}});$("#login-form-password").validate({ignore:"",rules:{"member-email":{required:!0,email:!0},"member-password":{required:!0}},messages:{"member-email":{required:"You must enter a valid email",email:"You must enter a valid email"},"member-password":{required:"You must enter a password"}}});$("#login-form-order").validate({ignore:"",rules:{orderEmail:{required:!0,email:!0},orderNumber:{required:!0,digits:!0}},messages:{orderEmail:{required:"You must enter a valid email",email:"You must enter a valid email"},orderNumber:{required:"You must enter a order number",digits:"Order number must be digits"}}});$("#login-form-create").validate({ignore:"",rules:{"create-email":{required:!0,email:!0},"create-password":{required:!0},"create-password-confirm":{required:!0,equalTo:"#create-password"}},messages:{"create-email":{required:"You must enter a valid email",email:"You must enter a valid email"},"create-password":{required:"You must enter a password"},"create-password-confirm":{required:"You must confirm your password",equalTo:"Passwords must match"}}});$("#login-form-forgot").validate({ignore:"",rules:{"forgot-email":{required:!0,email:!0}},messages:{"forgot-email":{required:"You must enter a valid email",email:"You must enter a valid email"}}})})