       <hr class="space" />
     </div>'
 
+# Extend draggable to elements added to the DOM after page load. 
 jQuery.fn.liveDraggable = (opts) ->
   @live "mouseover", ->
     $(this).data("init", true).draggable opts  unless $(this).data("init")
     
-
+# Insert `value` at the cursor position of the currently focused textarea or input field.
 jQuery.fn.insertAtCaret = (value) ->
   @each (i) ->
     if document.selection

          @toggle() unless @modal_active
      e.stopPropagation();
    
    $(document).keydown (e) =>
      return unless @keys_enabled
      if @active_panel

      $(this).fadeIn()
    ).attr src: src
  
  # Generates the next URL for paginated record sets.
  next_page_url: (i) ->
    @options.pages[i]['pages_loaded'] = 0 unless @options.pages[i]['pages_loaded']
    @options.pages[i]['pages_loaded'] += 1
    "#{@options.pages[i]['url']}?page=#{@options.pages[i]['pages_loaded']}"
  
  # By touching asset records, we update the timestamp value which ensures our recently
  # viewed tab contains accurate results. Called from `modal_open()`
  touch: (el) ->
    @log "touch()"
    touch_url = Mustache.to_html @options.touch_url, { id: el.id }
    $.post "#{@options.base_url}#{touch_url}"
  
  # Instantiate an amplePanels instance within page `i` if `@options.pages[i]['panels']` is true.
  panels: (i) ->
    ref = this
    if @options.pages[i]['panels']
