           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",

    when 'SELECT'
      $.ajax "#{FUSION_TABLES_URI}/query?sql=#{query}&key=#{GOOGLE_API_KEY}",
        type: 'GET'
        cache: false
        dataType: 'json'
        crossDomain: true
        error: (jqXHR, textStatus, errorThrown) ->

  ia_query(ia_id)

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

ia_url = (ia_id) ->
  "https://archive.org/details/#{ia_id}"
