jQuery.fn.extend({slider:function(i,u,f){var h=0;var r=0;var w=0;var p="";var m=0;var t=100;var c="percent";var j="Accept";var b=function(z){h=z;var A=$("#bar_"+p).offset();var y=A.left;var B=z/t;var C=Math.ceil(m*B);r=y+C;$("#bar_"+p).trigger("click")};var k=function(A){if(A.which==13){var B=$("#value_"+p).val();h=B;w=B/t;var z=$("#bar_"+p).offset();var y=z.left;var C=m*w;r=y+C;$("#bar_"+p).trigger("click")}};var x=function(y){r=y.pageX;if(g){v(y)}return false};var d=function(){e("accept",h)};var o=function(y){v(y);if(s){s=false}else{e("click",h)}};var v=function(B){var A=$("#bar_"+p).offset();var y=A.left;var F=Math.min(r-y,m);var C=$("#cursor_"+p).width();$("#leftbar_"+p).width(F);var E=$("#cursor_"+p).position();E.left=F-C;$("#cursor_"+p).css(E);var z=$("#rightbar_"+p).position();$("#rightbar_"+p).css(z);var D=m-$("#leftbar_"+p).width();$("#rightbar_"+p).width(D);w=F/m;h=Math.floor(w*t);$("#value_"+p).val(h);return true};var l=function(){var y=h+increment;if(y>t){y=t}b(y)};var a=function(){var y=h-increment;if(y<0){y=0}b(y)};var n=this;p=this.attr("ID");var g=false;var s=true;h=this.attr("VALUE")|0;u>0?increment=u:increment=10;var e=function(y,z){if(i){i(y,z)}};this.attr("MAX")>0?t=this.attr("MAX"):t=100;this.attr("TYPE")>""?c=this.attr("TYPE"):c="percent";if(c=="percent"){t=100}if(h>t){h=t}if(f!=""){j=f}var q="";q+="<div class='sliderbar' id='"+p+"' value='"+h+"' max= '"+t+"' type='"+c+"' >\n";q+="  <span class='bar' id='bar_"+p+"' >\n";q+="    <span class='leftbar'  id='leftbar_"+p+"' ></span>\n";q+="    <span class='cursor'   id='cursor_"+p+"' ></span>\n";q+="    <span class='rightbar' id='rightbar_"+p+"' ></span>\n";q+="  </span>\n";q+="</div>\n";this.replaceWith(q);m=$("#bar_"+p).width()-$("#cursor_"+p).width();$("#bar_"+p).mousemove(x);$("#bar_"+p).bind("click",o);$("#lt_"+p).bind("click",a);$("#gt_"+p).bind("click",l);$("#accept_"+p).bind("click",d);$().mouseup(function(){g=false;return false});$("#cursor_"+p).mousedown(function(){g=true;return false});$("#cursor_"+p).mouseup(function(){g=false;return false});$("#value_"+p).bind("keyup",k);b(h)}});jQuery.fn.slider.version=function(){return"jQuery.slider 1.2.0"};