var Inyo_HowToRating;(function(n){function f(n,f){var e=function(r,u,f){try{f.status===200?(r.NewVote===!1?(Inyo_StarRating.ResetRatingDisplay(n.currentTarget),i.text("You've already voted. Thanks for your previous vote!").css("color","Green")):r.NewVote===!0&&(Inyo_StarRating.UpdateRatingDisplay(jQuery("#StarWithScript span"),r.Rating),Inyo_StarRating.UpdateRatingDisplay(jQuery("#StarWithOutScript span"),r.Rating),jQuery("#RatingsScore").text(r.Rating),jQuery("#RatingsCount").text(r.Count),i.text("Thanks for voting!").css("color","Green")),jQuery("#StarWithScript").hide(),jQuery("#StarWithOutScript").show()):(Inyo_StarRating.ResetRatingDisplay(n.currentTarget),alert("Processing Error: Sorry for the inconvenience, but we are unable to complete your request.  Please try again."))}finally{t=!1}},o=function(){try{Inyo_StarRating.ResetRatingDisplay(n.currentTarget)}finally{alert("Receive Error: Sorry for the inconvenience, but we are unable to complete your request.  Please try again.");t=!1}};r!==undefined?t||(t=!0,jQuery.ajax({type:"POST",url:r+"?PageId="+u+"&Rating="+f,contentType:"application/json; charset=utf-8",crossDomain:!0,success:e,error:o})):alert("Send Error: Sorry for the inconvenience, but we are unable to complete your request.  Please try again.")}var i=jQuery("#VotingMessage"),t=!1,u=jQuery("#PageID").val(),r=jQuery("#HowToRatingServiceUrl").val();n.UpdateStarRating=f})(Inyo_HowToRating||(Inyo_HowToRating={}))