/*  Starbox 1.3 - 01-07-2011
 *  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/',         // 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(){P.1c(o,{2q:"1.7",2r:"1.8.3",1Q:9(){5.1p("12");5.Q.1R=1;13(/^(2s?:\\/\\/|\\/)/.2t(5.6.1q)){5.1r=5.6.1q}1S{l b=/14(?:-[\\w\\d.]+)?\\.2u(.*)/;5.1r=(($$("2v[B]").1T(9(c){x c.B.2w(b)})||{}).B||"").1U(b,"")+5.6.1q}},1p:9(b){13(2x 15[b]=="2y"||5.1s(15[b].2z)<5.1s(5["1V"+b])){2A"1W 2B "+b+" >= "+5["1V"+b]}},1s:9(d){l c=d.1U(/1t.*|\\./g,""),c=1u(c+"0".1v(4-c.2C));x d.2D("1t")>-1?c-1:c},1X:9(b){x(b=/2E ([\\d.]+)/.2F(b))?2G(b[1])<7:!1}(2H.2I),Q:9(e){l e=$(e),d=e.2J("1Y"),f=2K.2L;13(d){x d}2M{d="2N"+f.1R++}2O($(d));e.2P("1Y",d);x d},1w:[],2Q:9(b){5.1x(b.B)||5.1w.1d(b);x b},1x:9(b){x 5.1w.1T(9(c){x c.B==b})},G:[],1Z:9(b){5.G.1d(b)},1e:9(){5.G[0]?5.20(5.G[0]):5.2R=!1},20:9(f){l e=[],h=f.6.21,f=5.1x(h);5.G.H(9(b){b.6.21==h&&(e.1d(b),5.G=5.G.2S(b))}.C(5));13(f){5.1y(e,f)}1S{l g=m 2T;g.2U=9(){5.1y(e,{B:h,I:g.I,J:g.J,22:g.B})}.C(5);g.B=o.1r+h}},1y:9(d,c){d.H(9(b){b.1f=c;b.23()});5.1e()},1z:{1g:"1g",R:"R",K:12.1h.1i?"2V":"K"},24:9(b){12.1h.1i||(b=b.2W(9(f,i){l h=P.2X(5)?5:5.q,g=i.2Y;g!=h&&!$A(h.2Z("*")).30(g)&&f(i)}));x b}});o.1Q();(9(b){1A.25?b.31(1A):1A.26("32:25",b)})(9(){o.1e()});l a=33.34({35:9(e,d,f){5.q=$(e);5.n=d;5.6=P.1c(P.36(o.6),f||{});$w("L k D s").H(9(b){5[b]=5.6[b]}.C(5));5.S=5.6.S||5.k&&!5.6.1B;5.L||(5.L=o.Q(5.q));5.6.t&&(5.6.t.R||5.6.t.K)&&o.1p("37");o.1Z(5);o.1e()},27:9(){$w("K R 1g").H(9(e){l d=e.28(),f=5["1j"+d].38(5);5["1j"+d+"1C"]=e=="K"&&!12.1h.1i?o.24(f):f;5.16.26(o.1z[e],5["1j"+d+"1C"])}.C(5));5.M.29("j",{2a:"39"})},2b:9(){$w("R K 1g").H(9(b){5.16.3a(o.1z[b],5["1j"+b.28()+"1C"])}.C(5));5.M.29("j",{2a:"3b"})},23:9(){5.17=5.1f.J;5.18=5.1f.I;5.1D=5.1f.22;5.T=5.17*5.6.1E;5.19=5.T/5.6.M;5.1k=5.6.D/5.6.M;5.6.t&&(5.2c=5.1a(0),5.2d=5.1a(5.6.D));l b={N:{U:"N",1l:0,y:0,J:5.T+"p",I:5.18+"p"},1F:{U:"2e",J:5.T+"p",I:5.18+"p"},2f:{U:"N",1l:0,y:0,J:5.17+"p",I:5.18+"p"}};5.q.V("14");5.2g=(m r("u",{W:5.6.W||""})).j({U:"2e"}).v(5.1b=(m r("u")).v(5.1m=(m r("u")).v(5.1G=(m r("u",{W:"1E"})).j(P.1c({3c:"2h"},b.1F)))));5.k&&5.1b.V("k");5.S&&5.1b.V("S");5.6.2i&&(5.1G.v(5.O=(m r("u",{W:"O"})).j(b.N)),5.6.2j&&5.O.j({X:5.6.2j}),5.6.t&&(5.O.E=5.O.Q()),5.Y(5.O,5.n,15.Z&&Z.1H));5.1G.v(5.z=(m r("u",{W:"z"})).j(b.N)).v((m r("u")).j(b.N).v(5.16=(m r("u")).j(b.1F)));5.6.1I&&5.z.j({X:5.6.1I});5.6.t&&(5.z.E=5.z.Q());5.6.1E.1v(9(d){l e;5.16.v(e=(m r("u")).j(P.1c({X:"3d("+5.1D+") 1l y 3e-3f",y:5.17*d+"p"},b.2f)));e.j({y:5.17*d+"p"});o.1X&&e.j({X:"3g",3h:"3i:3j.3k.3l(B=\'"+5.1D+"\'\', 3m=\'3n\')"})}.C(5));5.M=[];5.6.M.1v(9(d){l e;e=5.6.2k?5.T-5.19*(d+1):5.19*d;5.16.v(e=(m r("u")).j({U:"N",1l:0,y:e+"p",J:5.19+(12.1h.1i?1:0)+"p",I:5.18+"p"}));e.F=5.1k*d+5.1k;5.M.1d(e)}.C(5));5.Y(5.z,5.n);5.q.2l(5.2g);5.1J={};$w("n D k 1n s").H(9(c){5.q.v(5.1J[c]=m r("3o",{3p:"2h",3q:5.L+"1t"+c,2m:""+(c=="1n"?!!5[c]:5[c])}))}.C(5));5.6.11&&(5.1m.v(5.11=m r("u",{W:"11"})),5.1K());5.S||5.27()},2n:9(d){5.k&&5.6.1B&&(5.n=(5.s*5.n-5.k)/(5.s-1||1));l c=5.k?5.s:5.s++;5.n=5.n==0?d:(5.n*(5.k?c-1:c)+d)/(5.k?c:c+1)},1K:9(){5.11.2l((m 3r(5.6.11)).3s({D:5.6.D,s:5.s,n:(5.n*10).3t()/10}))},1a:9(b){b=5.T-b/5.1k*5.19;x 1u(5.6.2k?b.3u():-1*b.3v())},Y:9(f,e,h){5.6.t&&5["1L"+f.E]&&Z.3w.3x(f.E).3y(5["1L"+f.E]);l g=5.1a(e);h?(h=1u(f.3z("y")),e=5.1a(e),h!=e&&(e=((5.2d-(h-e).1M()).1M()/5.2c.1M()).3A(2),5["1L"+f.E]=m Z.1H(f,{3B:{y:g+"p"},3C:{U:"3D",3E:1,E:f.E},2o:5.6.2o*e}))):f.j({y:g+"p"})},3F:9(e){l d=e.q();13(d.F){5.2n(d.F);5.6.11&&5.1K();5.6.2i&&5.Y(5.O,5.n,15.Z&&Z.1H);5.k||5.1b.V("k");5.1n=!!5.k;5.k=d.F;5.6.1B||(5.2b(),5.1b.V("S"),5.2p(e));l f={};$w("n L D k 1n s").H(9(b){b!="L"&&(5.1J[b].2m=5[b]);f[b]=5[b]}.C(5));5.6.3G(5.q,f);5.q.1N("14:k",f)}},2p:9(){5.Y(5.z,5.n,5.6.t&&5.6.t.K);5.1O=!1;5.6.1o&&5.1m.3H(5.6.1o);5.6.1P&&5.z.j({X:5.6.1I});5.q.1N("14:y")},3I:9(b){b=b.q();!b.F||(5.Y(5.z,b.F,5.6.t&&5.6.t.R),!5.1O&&5.6.1o&&5.1m.V(5.6.1o),5.1O=!0,5.6.1P&&5.z.j({X:5.6.1P}),5.q.1N("14:3J",{Q:5.6.L,D:5.6.D,F:b.F,s:5.s}))}});15.1W=a})();',62,232,'|||||this|options|||function||||||||||setStyle|rated|var|new|average|Starboxes|px|element|Element|total|effect|div|insert||return|left|colorbar||src|bind|max|scope|rating|buildQueue|each|height|width|mouseout|identity|buttons|absolute|ghost|Object|identify|mouseover|locked|boxWidth|position|addClassName|className|background|setBarPosition|Effect||indicator|Prototype|if|starbox|window|starbar|starWidth|starHeight|buttonWidth|getBarPosition|status|extend|push|processBuildQueue|imageInfo|click|Browser|IE|on|buttonRating|top|hover|rerated|hoverClass|require|overlayImages|imageSource|convertVersionString|_|parseInt|times|imagecache|getCachedImage|buildBatch|useEvent|document|rerate|_cached|starSrc|stars|base|wrapper|Morph|color|inputs|updateIndicator|activeEffect_|abs|fire|hovered|hoverColor|load|counter|else|find|replace|REQUIRED_|Starbox|fixIE|id|queueBuild|cacheBuildBatch|overlay|fullsrc|build|capture|loaded|observe|enable|capitalize|invoke|cursor|disable|zeroPosition|maxPosition|relative|star|container|hidden|ghosting|ghostColor|inverse|update|value|updateAverage|duration|onMouseout|REQUIRED_Prototype|REQUIRED_Scriptaculous|https|test|js|script|match|typeof|undefined|Version|throw|requires|length|indexOf|MSIE|exec|parseFloat|navigator|userAgent|readAttribute|arguments|callee|do|starbox_|while|writeAttribute|cacheImage|batchLoading|without|Image|onload|mouseleave|wrap|isElement|relatedTarget|select|member|call|dom|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,{}));
