(function () { var e; (e = { result: 0, validate: function () { var e; return ( (e = !1), $("#phosphorus_calc .error_explanation").removeClass("pulse"), (this.result = $("#phosphorus_calc #phosphorus").val()), this.result != null && this.result.length > 0 ? $("#phosphorus_calc #ptlevel-g").removeClass("error") : ($("#phosphorus_calc #ptlevel-g").addClass("error"), (e = !0)), (this.result = this.result * 1), e ? $("#phosphorus_calc .error-explanation").addClass("animated pulse").removeClass("hide") : $("#phosphorus_calc .error-explanation").addClass("hide"), !e ); }, displayResult: function () { var e; return ( (e = '
Phosphorus value: ' + this.result + " mg/dL
"), this.result > 5.5 ? (e += "Too high! Your phosphorus level is above the target range. You might have severe itching—or you might not feel any different. But, in the long run, phosphorus levels that are too high can lead to bone and other health problems if your calcium level is high, too. If you are taking active vitamin D, your doctor may lower your dose.") : this.result < 3.5 ? (e += "Too low! Your phosphorus level is below the target range. Talk to your care team to see if this needs treatment.") : (e += "Just right. Good for you—your phosphorus level is in the target range, right where your care team likes to see it. Keep up the good work."), $("#phosphorus_calc .calculator_results .vcenter").html(e) ); }, calculate: function (t) { t.preventDefault(); if (e.validate()) return e.displayResult(), ekidney.calc.showResult("#phosphorus_calc"); }, init: function () { return ( $("#phosphorus_calc .calculate_btn").click(e.calculate), $("#phosphorus_calc form").submit(e.calculate), $("#phosphorus_calc .calculate_again").click(function () { return ekidney.calc.reset("#phosphorus_calc"); }) ); }, }), (window.ekidney.phosphorus = e), $(function () { return window.ekidney.phosphorus.init(); }); }.call(this));