     request_urn = passage[0]
     head = urn_to_head(request_urn)
     set_cts_text(request_urn, head, passage[2])
-    # call set_cts_text(request_urn, head, body)
     
 show_all = ->
   $('#toggle_group button').removeClass('active')

    valid_urns = (urn[0] for urn in fusion_tables_result.rows)
    # console.log(valid_urns)
    callback() if callback?
  
check_table_access = (table_id, callback) ->
  # test table access
  if get_cookie 'access_token'
    $.ajax "#{FUSION_TABLES_URI}/tables/#{table_id}?access_token=#{get_cookie 'access_token'}",
      type: 'GET'
      dataType: 'json'
      crossDomain: true
      error: (jqXHR, textStatus, errorThrown) ->
        console.log "AJAX Error: #{textStatus}"
        # $('.container > h1').after $('<div>').attr('class','alert alert-error').attr('id','collection_access_error').append('You do not have permission to access this collection.')
        # disable_collection_form()
      success: (data) ->
        # console.log data
      complete: (jqXHR, textStatus) ->
        callback() if callback?

# wrap values in single quotes and backslash-escape single-quotes
fusion_tables_escape = (value) ->


default_cts_cite_collection_driver_config =
  google_api_key: 'AIzaSyACO-ZANrYxHFG44v8kqsfGb6taylh2aDk'
  cts_endpoint: '1_DFxPLkDrZt2JTgFo04nI6zQ9AsnnqMNRlUBb2Sq'
  cts_urn: 'urn:cts:greekLit:tlg1389.tlg001.dc3'
  cite_table_id: '1YOwprxInXb03cho6DQ20jVefAHF6a3fqhj3SGIxk'
  cite_collection_editor_url: "http://#{window.location.hostname}/harpokration-cite/src/index.html"

urn_to_id = (urn) ->
  urn.replace(/[:.'-]/g,'_')
