       min: 0
       max: maximum
       slide: this.slid
+      change: this.slid
       values: [0, max_reservation/60/10-1]
     )
+    initial_start = 0
+    if new_start_time?
+      initial_start = new_start_time.diff(start_time, 'minutes')/10
     this.slid(1, {values: [0, max_reservation/60/10]})
+    @slider_element.slider("values", [initial_start, max_reservation/60/10+initial_start])
     @popup.show()
   slid: (event, ui) =>
     start = ui.values[0]

      @popup.find("#update-cancel-button").html(result.cancel_string)
      @popup.find("#update-cancel-button a").text("Cancel Reservation")
    )
  build_slider: (start_time, end_time, max_reservation, available_time) ->
    @slider_element = @popup.find(".reservation-slider")
    @start_time = start_time
    @end_time = end_time

    @popup.find("#reserver_user_onid[type=text]").focus()
    $.getJSON("/availability/#{room_id}/#{end_time.toISOString()}.json", (result) =>
      availability = result.availability
      this.build_slider(start_time, end_time, max_reservation, availability, new_time)
      this.position_popup(event.pageX, event.pageY)
      @popup.show()
    )
  get_relative_start_time: (start_time, end_time, event) ->
    offset = Math.floor(event.offsetY*3/10)*10
    new_time = start_time.clone().add("minutes", offset)
    if new_time < end_time
      return new_time
    else
      return start_time
  populate_update_popup: (room_element, start_time, end_time, event) ->
    $(".popup").hide()
    this.hide_popup()
