function favorite(c,b,a){yapi({method:"content.favorite",data:{content_type:b,content_id:a,favorite:c},success:function(e){t.fav=(e.result["favorite"]=="add")?{a:"none",r:""}:{a:"",r:"none"};d.getElementById("fav_add").style.display=t.fav.a;d.getElementById("fav_remove").style.display=t.fav.r}})}function rating_star(f,e,c,b,a){if(typeof(t.rate_voted)=="undefined"){for(i=1;i<=5;i++){d.getElementById(e+"_"+c+"_"+i).src=cdn("ic/rate/"+((f=="over")?((i>a)?"f":"t"):((((i-1)<b)&&(i>b))?"h":((i<=b)?"t":"f")))+".png")}}}function rating_vote(c,b,a){if(typeof(t.rate_voted)=="undefined"){yapi({method:"content.rating.vote",data:{content_type:c,content_id:b,vote:a},success:function(e){rating_star("out",c,b,a,a);t.rate_voted=true}})}};
