           console.log data
           if callback?
             callback(data)
-
-no_results = ->
-  $('#results').prepend($('<p/>').text('No results.'))
 
 ht_biblio_query = (ht_id, score = 0) ->
   $.ajax "http://catalog.hathitrust.org/api/volumes/brief/htid/#{ht_id}.json",


GOOGLE_BOOKS_API_KEY = 'AIzaSyDkGJOl5EEBahhn1J2kS70FmiRR2uwpFIY'
GOOGLE_API_KEY = 'AIzaSyBoQNYbbHb-MEGa4_oq83_JCLt9cKfd4vg'
# Fusion Tables ID of the HT-IA index output from book-aligner.rb
HT_IA_TABLE_ID = '1ktMz3RDdYEpUu7RTzybkTNCjGg_Vxv0RV1NdC6IL'
# Fusion Tables ID of the IA-GB index output as ia-goog-index.csv
IA_GB_TABLE_ID = '1Tg0cm8gXBUwsBGx53GwGhHYiPpt_6YzG-HrR6Ywl'


  ht_query(ht_id)

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)} ORDER BY score DESC",
      (data) ->
        if data.rows?
          process_ia_id(row[0],(1 - level) * row[1]) for row in data.rows.reverse()
          if level == 0
            ia_query(row[0],1) for row in data.rows.reverse()

ht_url = (ht_id) ->
  "https://babel.hathitrust.org/cgi/pt?id=#{ht_id}"

