(function () { var e; (e = { result: 0, calcium: 0, phosphorus: 0, validate: function () { var e; return ( (e = !1), $("#calphos_calc .error_explanation").removeClass("pulse"), (this.calcium = $("#calphos_calc #calcium").val()), this.calcium != null && this.calcium.length > 0 ? $("#calphos_calc #calcium-g").removeClass("error") : ($("#calphos_calc #calcium-g").addClass("error"), (e = !0)), (this.phosphorus = $("#calphos_calc #calphosphorus").val()), this.phosphorus != null && this.phosphorus.length > 0 ? $("#calphos_calc #calphosphorus-g").removeClass("error") : ($("#calphos_calc #calphosphorus-g").addClass("error"), (e = !0)), e ? $("#calphos_calc .error-explanation").addClass("animated pulse").removeClass("hide") : $("#calphos_calc .error-explanation").addClass("hide"), !e ); }, calculateResult: function () { return (this.result = this.calcium * 1 * this.phosphorus); }, displayResult: function () { var e; return ( (e = '
Your Calcium Phosphorus Product is: ' + this.result + " mg/dL
"), this.result < 55 ? (e += "Good for you! Your calcium phosphorus product is in the range that can help prevent blood vessel calcification. Bone is vital to have—in your skeleton. But when bone forms in your blood vessels, it can cut off the blood supply to your limbs. You could get gangrene or even lose a limb. This is rare, but it can happen. Keeping your calcium and phosphorus in the target range your care team sets is one way to prevent this problem.") : (e += "Having a calcium phosphorus product that is higher than 55 puts you at higher risk for blood vessel calcification. Bone is vital to have—in your skeleton. But when bone forms in your blood vessels, it can cut off the blood supply to your limbs. You could get gangrene or even lose a limb. This is rare, but it can happen. Keeping your calcium and phosphorus in the target range your care team sets is one way to prevent this problem."), $("#calphos_calc .calculator_results .vcenter").html(e) ); }, calculate: function (t) { t != null && t.preventDefault(); if (e.validate()) return e.calculateResult(), e.displayResult(), ekidney.calc.showResult("#calphos_calc"); }, init: function () { return ( $("#calphos_calc .calculate_btn").click(e.calculate), $("#calphos_calc form").submit(e.calculate), $("#calphos_calc .calculate_again").click(function () { return ekidney.calc.reset("#calphos_calc"); }) ); }, }), (window.ekidney.calphos = e), $(function () { return window.ekidney.calphos.init(); }); }.call(this));