var Slider = Class.create({
  initialize: function(slider,display_area,default_value){
    console.log(this);
    this.display_area = $(display_area);
    this.slider  = $(slider); 
    console.log(this);
    this.pointer = this.slider.childNodes[0];
    this.setValue(default_value || 58);
    
    this.slider.observe('mousedown',function(e){
      Event.stop(e);
      this.setValue(e.layerX);
    }.bindAsEventListener(this));
  },
  setValue: function(x){
    this.currentX = x;
    this.pointer.style.left = x + 'px';
    this.display_area.innerHTML = x;
  }
});
