/*  Starbox 1.2.2 - 11-01-2010
 *  Copyright (c) 2008-2011 Nick Stakenburg (http://www.nickstakenburg.com)
 *
 *  Licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License
 *  http://creativecommons.org/licenses/by-nc-nd/3.0/
 *
 *  More information on this project:
 *  http://www.nickstakenburg.com/projects/starbox
 */

var Starboxes = {
  options: {
    buttons: 5,                                  // amount of clickable areas
    className : 'default',                       // default class
    color: false,                                // would overwrite the css style to set color on the stars
    duration: 0.6,                               // the duration of the revert effect, when effects are used
    effect: {
      mouseover: false,                          // use effects on mouseover, default false
      mouseout: (window.Effect && Effect.Morph)  // use effects on mouseout, default when available
    },
    hoverColor: false,                           // overwrites the css hover color
    hoverClass: 'hover',                         // the css hover class color
    ghostColor: false,                           // the color of the ghost stars, if used
    ghosting: false,                             // ghosts the previous vote
    identity: false,                             // a unique value you can give each starbox
    indicator: false,                            // use an indicator, default false
    inverse: false,                              // inverse the stars, right to left
    locked: false,                               // lock the starbox to prevent voting
    max: 5,                                      // the maximum rating of the starbox
    onRate: Prototype.emptyFunction,             // default onRate, function(element, memo) {}
    rated: false,                                // or a rating to indicate a vote has been cast
    ratedClass: 'rated',                         // class when rated
    rerate: false,                               // allow rerating
    overlay: 'default.png',                      // default star overlay image
    overlayImages: '../images/starbox/',         // directory of images relative to this file
    stars: 5,                                    // the amount of stars
    total: 0                                     // amount of votes cast
  }
};

eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(9(){9 d(b){1s.1V?b.2v(1s):1s.1W("2w:1V",b)}T.1f(q,{2x:"1.7",2y:"1.8.3",1X:9(){5.1t("16"),5.U.1Y=1;J(/^(2z?:\\/\\/|\\/)/.2A(5.6.1u)){5.1v=5.6.1u}1w{m b=/17(?:-[\\w\\d.]+)?\\.2B(.*)/;5.1v=(($$("2C[E]").1Z(9(a){t a.E.2D(b)})||{}).E||"").20(b,"")+5.6.1u}},1t:9(b){J(2E 18[b]=="2F"||5.1x(18[b].2G)<5.1x(5["21"+b])){2H"22 2I "+b+" >= "+5["21"+b]}},1x:9(f){m e=f.20(/1y.*|\\./g,"");e=1z(e+"0".1A(4-e.2J));t f.2K("1y")>-1?e-1:e},23:9(f){m e=(o 2L("2M ([\\\\d.]+)")).2N(f);t e?2O(e[1])<7:!1}(2P.2Q),U:9(f){f=$(f);m e=f.2R("24"),g=1B.2S;J(e){t e}2T{e="2U"+g.1Y++}2V($(e));f.2W("24",e);t e},1C:[],2X:9(b){5.1D(b.E)||5.1C.1g(b);t b},1D:9(b){t 5.1C.1Z(9(a){t a.E==b})},K:[],25:9(b){5.K.1g(b)},1h:9(){5.K[0]?5.26(5.K[0]):5.27=!1},26:9(g){m f=[],j=g.6.28,i=5.1D(j);5.K.L(9(b){b.6.28==j&&(f.1g(b),5.K=5.K.2Y(b))}.F(5));J(i){5.1E(f,i)}1w{m h=o 2Z;h.30=9(){5.1E(f,{E:j,M:h.M,N:h.N,29:h.E})}.F(5),h.E=q.1v+j}},1E:9(f,e){f.L(9(b){b.1i=e,b.2a()}),5.1h()},1F:9(b){t{1j:"1j",V:"V",O:b?"31":"O"}}(16.1k.1l),2b:9(b){16.1k.1l||(b=b.32(9(f,e){m h=T.33(5)?5:5.u,g=e.34;g!=h&&!$A(h.35("*")).36(g)&&f(e)}));t b}}),q.1X(),d(9(){q.1h()});m c=37.38({39:9(f,e){5.u=$(f),5.r=e,5.6=T.1f(T.3a(q.6),1B[2]||{}),$w("P p G x").L(9(b){5[b]=5.6[b]}.F(5)),5.W=5.6.W||5.p&&!5.6.1G,5.P||(5.P=q.U(5.u)),5.6.y&&(5.6.y.V||5.6.y.O)&&q.1t("3b"),q.25(5),q.27&&q.1h()},2c:9(){$w("O V 1j").L(9(f){m e=f.2d(),g=5["1m"+e].3c(5);5["1m"+e+"1H"]=f=="O"&&!16.1k.1l?q.2b(g):g,5.19.1W(q.1F[f],5["1m"+e+"1H"])}.F(5)),5.Q.2e("n",{2f:"3d"})},2g:9(){$w("V O 1j").L(9(b){5.19.3e(q.1F[b],5["1m"+b.2d()+"1H"])}.F(5)),5.Q.2e("n",{2f:"3f"})},2a:9(){5.1a=5.1i.N,5.1b=5.1i.M,5.1I=5.1i.29,5.X=5.1a*5.6.1J,5.1c=5.X/5.6.Q,5.1n=5.6.G/5.6.Q,5.6.y&&(5.2h=5.1d(0),5.2i=5.1d(5.6.G));m b={R:{Y:"R",1o:0,C:0,N:5.X+"s",M:5.1b+"s"},1K:{Y:"2j",N:5.X+"s",M:5.1b+"s"},2k:{Y:"R",1o:0,C:0,N:5.1a+"s",M:5.1b+"s"}};5.u.Z("17"),5.2l=(o v("z",{11:5.6.11||""})).n({Y:"2j"}).B(5.1e=(o v("z")).B(5.1p=(o v("z")).B(5.1L=(o v("z",{11:"1J"})).n(T.1f({3g:"2m"},b.1K))))),5.p&&5.1e.Z("p"),5.W&&5.1e.Z("W"),5.6.2n&&(5.1L.B(5.S=(o v("z",{11:"S"})).n(b.R)),5.6.2o&&5.S.n({12:5.6.2o}),5.6.y&&(5.S.H=5.S.U()),5.13(5.S,5.r,18.14&&14.1M)),5.1L.B(5.D=(o v("z",{11:"D"})).n(b.R)).B((o v("z")).n(b.R).B(5.19=(o v("z")).n(b.1K))),5.6.1N&&5.D.n({12:5.6.1N}),5.6.y&&(5.D.H=5.D.U()),5.6.1J.1A(9(a){m e;5.19.B(e=(o v("z")).n(T.1f({12:"3h("+5.1I+") 1o C 3i-3j",C:5.1a*a+"s"},b.2k))),e.n({C:5.1a*a+"s"}),q.23&&e.n({12:"3k",3l:"3m:3n.3o.3p(E=\'"+5.1I+"\'\', 3q=\'3r\')"})}.F(5)),5.Q=[],5.6.Q.1A(9(f){m e,g=5.6.2p?5.X-5.1c*(f+1):5.1c*f;5.19.B(e=(o v("z")).n({Y:"R",1o:0,C:g+"s",N:5.1c+(16.1k.1l?1:0)+"s",M:5.1b+"s"})),e.I=5.1n*f+5.1n,5.Q.1g(e)}.F(5)),5.13(5.D,5.r),5.u.2q(5.2l),5.1O={},$w("r G p 1q x").L(9(e){5.u.B(5.1O[e]=o v("3s",{3t:"2m",3u:5.P+"1y"+e,2r:""+(e=="1q"?!!5[e]:5[e])}))}.F(5)),5.6.15&&(5.1p.B(5.15=o v("z",{11:"15"})),5.1P()),5.W||5.2c()},2s:9(f){5.p&&5.6.1G&&(5.r=(5.x*5.r-5.p)/(5.x-1||1));m e=5.p?5.x:5.x++;5.r=5.r==0?f:(5.r*(5.p?e-1:e)+f)/(5.p?e:e+1)},1P:9(){5.15.2q((o 3v(5.6.15)).3w({G:5.6.G,x:5.x,r:(5.r*10).3x()/10}))},1d:9(f){m e=5.X-f/5.1n*5.1c;t 1z(5.6.2p?e.3y():-1*e.3z())},13:9(h,g){5.6.y&&5["1Q"+h.H]&&14.3A.3B(h.H).3C(5["1Q"+h.H]);m l=5.1d(g);J(1B[2]){m k=1z(h.3D("C")),j=5.1d(g);J(k==j){t}m i=((5.2i-(k-j).1R()).1R()/5.2h.1R()).3E(2);5["1Q"+h.H]=o 14.1M(h,{3F:{C:l+"s"},3G:{Y:"3H",3I:1,H:h.H},2t:5.6.2t*i})}1w{h.n({C:l+"s"})}},3J:9(f){m e=f.u();J(e.I){5.2s(e.I),5.6.15&&5.1P(),5.6.2n&&5.13(5.S,5.r,18.14&&14.1M),5.p||5.1e.Z("p"),5.1q=!!5.p,5.p=e.I,5.6.1G||(5.2g(),5.1e.Z("W"),5.2u(f));m g={};$w("r P G p 1q x").L(9(b){b!="P"&&(5.1O[b].2r=5[b]),g[b]=5[b]}.F(5)),5.6.3K(5.u,g),5.u.1S("17:p",g)}},2u:9(b){5.13(5.D,5.r,5.6.y&&5.6.y.O),5.1T=!1,5.6.1r&&5.1p.3L(5.6.1r),5.6.1U&&5.D.n({12:5.6.1N}),5.u.1S("17:C")},3M:9(f){m e=f.u();e.I&&(5.13(5.D,e.I,5.6.y&&5.6.y.V),!5.1T&&5.6.1r&&5.1p.Z(5.6.1r),5.1T=!0,5.6.1U&&5.D.n({12:5.6.1U}),5.u.1S("17:3N",{U:5.6.P,G:5.6.G,I:e.I,x:5.x}))}});18.22=c})();',62,236,'|||||this|options|||function|||||||||||||var|setStyle|new|rated|Starboxes|average|px|return|element|Element||total|effect|div||insert|left|colorbar|src|bind|max|scope|rating|if|buildQueue|each|height|width|mouseout|identity|buttons|absolute|ghost|Object|identify|mouseover|locked|boxWidth|position|addClassName||className|background|setBarPosition|Effect|indicator|Prototype|starbox|window|starbar|starWidth|starHeight|buttonWidth|getBarPosition|status|extend|push|processBuildQueue|imageInfo|click|Browser|IE|on|buttonRating|top|hover|rerated|hoverClass|document|require|overlayImages|imageSource|else|convertVersionString|_|parseInt|times|arguments|imagecache|getCachedImage|buildBatch|useEvent|rerate|_cached|starSrc|stars|base|wrapper|Morph|color|inputs|updateIndicator|activeEffect_|abs|fire|hovered|hoverColor|loaded|observe|load|counter|find|replace|REQUIRED_|Starbox|fixIE|id|queueBuild|cacheBuildBatch|batchLoading|overlay|fullsrc|build|capture|enable|capitalize|invoke|cursor|disable|zeroPosition|maxPosition|relative|star|container|hidden|ghosting|ghostColor|inverse|update|value|updateAverage|duration|onMouseout|call|dom|REQUIRED_Prototype|REQUIRED_Scriptaculous|https|test|js|script|match|typeof|undefined|Version|throw|requires|length|indexOf|RegExp|MSIE|exec|parseFloat|navigator|userAgent|readAttribute|callee|do|starbox_|while|writeAttribute|cacheImage|without|Image|onload|mouseleave|wrap|isElement|relatedTarget|select|member|Class|create|initialize|clone|Scriptaculous|bindAsEventListener|pointer|stopObserving|auto|overflow|url|no|repeat|none|filter|progid|DXImageTransform|Microsoft|AlphaImageLoader|sizingMethod|scale|input|type|name|Template|evaluate|round|ceil|floor|Queues|get|remove|getStyle|toFixed|style|queue|end|limit|onClick|onRate|removeClassName|onMouseover|changed'.split('|'),0,{}));
