         dataType: 'json'
         crossDomain: true
         error: (jqXHR, textStatus, errorThrown) ->
-          $('#results').append($('<div/>',{class: 'alert alert-danger', role: 'alert'}).text('Error in Fusion Tables AJAX call.'))
+          $('#results').append($('<div/>',{class: 'alert alert-danger', role: 'alert'}).text("Error in Fusion Tables AJAX call."))
+          console.log jqXHR
           console.log errorThrown
           console.log "AJAX Error: #{textStatus}"
           error_callback() if error_callback?

    crossDomain: true
    error: (jqXHR, textStatus, errorThrown) ->
      $('#results').append($('<div/>',{class: 'alert alert-danger', role: 'alert'}).text("Error in Google Books AJAX call for identifier #{gb_id}"))
      console.log errorThrown
      console.log "AJAX Error: #{textStatus}"
    success: (data) ->


ht_query = (ht_id, level = 0) ->
  for table_id in HT_IA_TABLE_IDS
    fusion_tables_query "SELECT ia_identifier,score FROM #{table_id} WHERE ht_identifier = #{fusion_tables_escape(ht_id)}",
      (data) ->
        if data.rows?
          process_ia_id(row[0],(1 - level) * row[1]) for row in data.rows.reverse()
