egg.method.donateSlider=function(e){var b,c;egg(this).each(function(d){egg(d).mouseover(function(){d===c&&egg(".sponsor-GP").size()||(egg(".sponsor-GP").size()&&b.destroy(),b=new donateSlider(d,e),c=d)}).click(function(){e.donate.call(b)})})};
(function(){window.donateSlider=function(e,b){var b=b||{},c=egg.body(),d=b.step||1,k=b.speci_left||0,r=b.speci_top||0,f,h;b.displayValue?(f=0,h=b.displayValue.length-1):(f=b.min||0,h=b.max||100);var l=b.value||f,i=l,n=egg(e).pos(),o=document.createElement("div");egg(o).attr({className:"sponsor-GP",unselectable:"on"}).css({left:n.x+k+"px",top:n.y-174+r+"px"}).appendTo(document.body).mousedown(function(a){a=a||window.event;egg.event.preventDefault(a);var b=egg(g).pos(),a=parseInt((a.clientY-(b.y-(egg.browser.webkit?
document.body.scrollTop:c.scrollTop)))/d,10);p(a)});var g=document.createElement("div");egg(g).attr({className:"sponsor-btn",unselectable:"on"}).appendTo(o);var m=!1,q=document.createElement("a");egg(q).css("top",l*d+"px").attr({href:"#",unselectable:"on"}).appendTo(g).mousedown(function(a){a=a||window.event;egg.event.preventDefault(a);var a=c.clientWidth>c.scrollWidth?c.clientWidth:c.scrollWidth,b=c.clientHeight>c.scrollHeight?c.clientHeight:c.scrollHeight,e=egg.browser.webkit?document.body.scrollTop:
c.scrollTop;m=!0;egg(document.createElement("div")).attr({id:"donateSliderHoverDiv",unselectable:"on"}).css({position:"absolute","z-index":101,width:a+"px",height:b+"px",left:"0px",top:"0px"}).mousemove(function(a){if(m){a=a||window.event;egg.event.preventDefault(a);var b=egg(g).pos(),a=parseInt((a.clientY-(b.y-e))/d,10);p(a)}}).mouseup(function(){m=!1;egg("#donateSliderHoverDiv").removeFrom(document.body)}).appendTo(document.body)});var j=document.createElement("span");egg(j).appendTo(g);if(b.displayValue){for(var s in b.displayValue)egg(document.createElement("p")).html(b.displayValue[s]).css("visibility",
"hidden").appendTo(j);egg(j).find("p:eq("+l+")").css("visibility","visible")}var t=this.destroy=function(){egg("#eggFocusNode").removeFrom(document.body);egg(".sponsor-GP").removeFrom(document.body)},p=this.value=function(a){if(void 0===a)return i;a!=i&&(a<f&&(a=f),a>h&&(a=h),egg(j).find("p").css("visibility","hidden").filter(":eq("+a+")").css("visibility","visible"),egg(q).css("top",a*d+"px"),i=a,egg(e).attr("data-slider-value",i))},k=egg.browser.webkit?document.body.scrollTop:c.scrollTop;egg(document.createElement("input")).attr("id",
"eggFocusNode").css({position:"absolute",left:"-1000px",top:k+"px"}).blur(function(a){a=a||window.event;a=a.target||a.srcElement;t();egg(a).removeFrom(document.body)}).appendTo(document.body).get(0).focus()}})();

