(function () { var e; (e = { hemoglobin: 0, validate: function () { var e; return ( (e = !1), $("#hemoglobin_calc .error_explanation").removeClass("pulse"), (this.hemoglobin = $("#hemoglobin_calc #hemoglobin").val()), this.hemoglobin != null && this.hemoglobin.length > 0 ? $("#hemoglobin_calc #hemoglobin-g").removeClass("error") : ($("#hemoglobin_calc #hemoglobin-g").addClass("error"), (e = !0)), e ? $("#hemoglobin_calc .error-explanation").addClass("animated pulse").removeClass("hide") : $("#hemoglobin_calc .error-explanation").addClass("hide"), !e ); }, calcResult: function () { return (this.result = Math.round(this.hemoglobin * 35.6 - 77.3)); }, displayResult: function () { var e; return (e = '

Your mean plasma glucose level is: ' + this.result + " mg/dL

"), $("#hemoglobin_calc .calculator_results .vcenter").html(e); }, calculate: function (t) { t.preventDefault(); if (e.validate()) return e.calcResult(), e.displayResult(), ekidney.calc.showResult("#hemoglobin_calc"); }, init: function () { return ( $("#hemoglobin_calc .calculate_btn").click(e.calculate), $("#hemoglobin_calc form").submit(e.calculate), $("#hemoglobin_calc .calculate_again").click(function () { return ekidney.calc.reset("#hemoglobin_calc"); }) ); }, }), (window.ekidney.hemoglobin = e), $(function () { return window.ekidney.hemoglobin.init(); }); }.call(this));