var fact =  $("div.fact-block[data-fact-id=<%=@fact.id%>]");
var searchList = fact.find('.results ul');

<% if @first_page %>
  searchList.empty();
<% end %>

<% unless @facts.count > 0 %>

  <% if @first_page %>
    // No results found
    searchList.append("<li>No results found...</li>");
  <% else %>
    searchList.closest('.tab_content:visible').data('isFullyLoaded', true);
  <% end %>
  
<% else %>
	<% @facts.each do |evidence| %>
    searchList.append("<li data-evidence-id='<%= evidence.id %>' class='evidence'><span><%= evidence.data.title %></span><%= evidence.data.displaystring %></li>");
	<% end %>

	fact.factlink();
<% end %>

var fact =  $("div.fact-block[data-fact-id=<%=@fact.id%>]");
var searchList = fact.find('.evidence-search-results ul.search-term-results');

<% if @first_page %>
  searchList.empty();
<% end %>

<% unless @facts.count > 0 %>

  <% if @first_page %>
    // No results found
    searchList.append("<li>No results found...</li>");
  <% else %>
    searchList.closest('.tab_content:visible').data('isFullyLoaded', true);
  <% end %>
  
<% else %>
	<% @facts.each do |evidence| %>
    searchList.append("<li data-evidence-id='<%= evidence.id %>' class='evidence'><span><%= evidence.data.title %></span><%= evidence.data.displaystring %></li>");
	<% end %>

	fact.factlink();
<% end %>

Add results to the new search results list
Add results to the new search results list
