jQuery.fn.sexyVote=function(c){c=c||{};var d={activeImageSrc:"images/active_star.gif",passiveImageSrc:"images/passive_star.gif",maxScore:5,fn:new Function(),messages:["您已经做出了评价","非常差","差","一般","好","非常好"]};c=jQuery.extend(d,c);return this.each(function(){var b=jQuery(this);for(var i=0,num=c.maxScore*2;i<num;++i){jQuery("<img />").appendTo(b)}jQuery("<span />").appendTo(b);b.find("img:even").attr("src",c.passiveImageSrc).css({display:"inline"}).bind("mouseover",function(e){var a=b.find("img:even").index(e.target)+1;b.find("img:even").slice(0,a).css({display:"none"});b.find("img:odd").slice(0,a).css({display:"inline"});b.find("span").text(c.messages[a])}).end().find("img:odd").attr("src",c.activeImageSrc).css({display:"none"}).bind("mouseout",function(e){var a=b.find("img:odd").index(e.target)+1;b.find("img:odd").slice(0,a).css({display:"none"});b.find("img:even").slice(0,a).css({display:"inline"});b.find("span").text("")}).bind("click",function(e){b.find("img").unbind("mouseover").unbind("mouseout").unbind("click");b.find("span").text(c.messages[0]);c.fn.call(this,e,b.find("img:odd").index(e.target)+1)})})};