(function(){!function(a){var b;return b=function(a,b){return b?a.removeClass("fa-star-o").addClass("fa-star"):a.removeClass("fa-star").addClass("fa-star-o")},a.fn.awesomeStarRating=function(c){var d,e,f,g,h,i,j,k,l,m;for(null==c&&(c=[]),e=this,h=c.name||e.attr("data-name")||"rating_score",j=parseInt(c.score||e.attr("data-score")||0),i=c.onChange,d=a("<input />",{type:"hidden",value:j,name:h}),e.append(d),k=[],m=[],g=l=1;l<=5;g=++l)f=a('<i class="fa"></i>'),b(f,g<=j),e.append(f),k[g]=f,m.push(f.on("click",{idx:g},function(a){var c,f,g;for(c=a.data.idx,d.val(c),f=g=1;g<=5;f=++g)b(k[f],f<=c);if(i)return i.call(e,c)}));return m}}(jQuery)}).call(this);