function GetScore(n){return n!=parseInt(n)?n>parseInt(n)+.5?parseInt(n)+1:parseInt(n)+.5:n}jQuery.fn.rater=function(n,t,i){var r={url:n,start:1,step:1,maxvalue:3,curvalue:0,spaceWidth:0,enabled:!0},f,o,c,l,h,u;t&&jQuery.extend(r,t),jQuery.extend(r,{cancel:r.maxvalue>1?!0:!1}),f=jQuery(this),jQuery.extend(f,{averageRating:r.curvalue,url:r.url});var s=r.starWidth?r.starWidth:25,a=(r.maxvalue-r.start+r.step)/r.step*s,v=(r.curvalue-r.start+r.step)/r.step*(s-r.spaceWidth)+parseInt((r.curvalue-r.start+r.step)/r.step)*r.spaceWidth,e="";typeof r.title=="object"&&typeof r.title[r.curvalue]=="string"&&(e=r.title[r.curvalue]),o=r.ratingClass?r.ratingClass:"rating",c='
',r.allowHidden&&(c+=r.hiddenContent),f.html(c),l='';if(r.enabled)for(h=0,u=r.start;u<=r.maxvalue;u=u+r.step)h++,e=typeof r.title=="object"&&typeof r.title[u]=="string"?r.title[u]:u,l+='';f.find("."+o).html(l),f.find("."+o).find(".star").hover(function(){$(this).parent().find(".current").hide(),this.className="star_hover"},function(){$(this).parent().find(".current").show(),this.className="star"}),f.find("."+o).find(".star").click(function(){var t=r.maxvalue-($(this).css("z-index")-1)*r.step;r.allowHidden&&$(this).parent().siblings("input").val(t),$(this).parent().find(".current").width((t-r.start+r.step)/r.step*s);if(n){$.post(n,{value:t},function(n){typeof i=="function"&&i($(this),t,n)});return}if(typeof i=="function"){i($(this),t);return}})};