(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;5>=l;g=++l)f=a('<i class="fa"></i>'),b(f,j>=g),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;5>=g;f=++g)b(k[f],c>=f);return i?i.call(e,c):void 0}));return m}}(jQuery)}).call(this);