jQuery(document).ready(function(r){r(document).delegate(".ratings:not(.rated) a","click",function(e){e.preventDefault();var t=r(this).parents(".ratings");return r.ajax({url:"undefined"!=typeof atom_config?atom_config.blog_url:post_ratings.blog_url,type:"GET",dataType:"json",context:this,data:{post_id:t.data("post"),rate:r(this).parents("li").index()},beforeSend:function(){t.removeClass("error").addClass("loading")},error:function(){t.addClass("error")},success:function(e){return e.error?(t.addClass("error").find(".meta").html(e.error),void r("a",t).remove()):(t.replaceWith(r(e.html)),void t.trigger("rated_post",e))}}),!0})});