rem: if(this.values){ var i = 0; var offset = Math.abs(this.values[0] - value); var newValue = this.values[0];  for(i=0; i < this.values.length; i++){ var currentOffset = Math.abs(this.values[i] - value); if(currentOffset < offset){ newValue = this.values[i]; 
add: if(this.allowedValues){ if(value >= this.allowedValues.max()) return(this.allowedValues.max()); if(value <= this.allowedValues.min()) return(this.allowedValues.min());  var offset = Math.abs(this.allowedValues[0] - value); var newValue = this.allowedValues[0]; this.allowedValues.each( function(v) { var currentOffset = Math.abs(v - value); if(currentOffset <= offset){ newValue = v; 
context:   getNearestValue: function(value){    if(this.values){      var i = 0;      var offset = Math.abs(this.values[0] - value);      var newValue = this.values[0];      for(i=0; i < this.values.length; i++){        var currentOffset = Math.abs(this.values[i] - value);        if(currentOffset < offset){          newValue = this.values[i];          offset = currentOffset;        }      }      return newValue;    }    return value;  },
meta: 3991	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3991/d29159eae8749c508d01bb447868321a3ba6bbfa/slider.js/clean/manager/media/script/scriptaculous/slider.js