 
   $('.container').append form
 
+  # update various inputs after we've actually put the form in the DOM
   set_author_name()
   construct_latest_urn (urn) ->
     $('#URN').attr('value',urn)
   update_timestamp_inputs()
 
+  # create the Markdown/Pagedown preview after we've put the form in the DOM
   converter = new Markdown.Converter()
   for suffix in $(".pagedown_suffix")
     console.log "Running Markdown editor for: #{$(suffix).val()}"
     editor = new Markdown.Editor(converter,"-#{$(suffix).val()}")
     editor.run()
 
+  # if we have Flash, put clippy helpers on all the inputs
   if swfobject.hasFlashPlayerVersion('9')
     for property in properties
       if $(property).attr('type') == 'markdown'

      $('#submit_success').delay(1800).fadeOut 1800, ->
        $(this).remove()

load_collection_form = ->
  collection = $('#collection_select').val()
  for child in $('#collection_form').children()

scroll_to_bottom = ->
  $('html, body').animate({scrollTop: $(document).height()-$(window).height()},600,'linear')

# save collection form values to localStorage
save_collection_form = ->
  collection = $('#collection_select').val()
  localStorage[collection] = true
