var resetPassword=function(){function f(){$("#ResetPasswordWindow").data("kendoWindow").close();modal.onClose()}function n(){window.DefaultSpinner.stop();$("body").fadeTo("fast",1);$("body").css("pointer-events","")}function e(){resetPassword.container.fadeTo("fast",.5);resetPassword.container.css("pointer-events","none");window.DefaultSpinner.spin(resetPassword.container[0]);reportThisError=!0}function o(){$.validator.defaults.resetForm()}function s(n){resetPassword.container.fadeTo("fast",1);resetPassword.container.css("pointer-events","");window.DefaultSpinner.stop();var t=n.responseJSON;t?t.Success?r():t.Message&&i(n):(resetPassword.errorText&&notification.showError(resetPassword.errorText),$.validator.defaults.resetForm(),$("#ResetPasswordWindow").data("kendoWindow").close())}function t(n){i(n)}function i(n){reportThisError&&n&&n.responseJSON&&n.responseJSON.Message&&(notification.showError(n.responseJSON.Message),reportThisError=!1)}function r(){$("#ResetPassword").hide();$("#ResetPasswordClose").show()}function h(n){resetPassword.container=n.jquery?n:$(n)}function c(i){$.ajax({url:"/Account/Login/ResetPassword?reset="+i,beforeSend:u()}).done(function(n){$("#ResetPasswordWindow").html(n);$.validator.unobtrusive.parse($("#ResetPasswordForm"));var t=$("#ResetPasswordWindow").data("kendoWindow");t.center();t.open()}).fail(function(n){t(n)}).always(function(){n()})}function u(){window.DefaultSpinner.spin($("body").get(0));$("body").fadeTo("fast",.5);$("body").css("pointer-events","none")}function l(){$("#ResetPasswordForm").submit()}return container=null,reportThisError=!0,{closePopup:f,hideSpinner:n,onBeginRequest:e,onCloseRequest:o,onCompleteRequest:s,onFailureRequest:t,resetPasswordCompleted:r,setContainer:h,showPopup:c,showSpinner:u,submitForm:l}}()