       $("#project-tile-#{p_id} abbr.timeago").timeago();
       $("#project-tile-#{p_id}").hover ->   # TODO: do with CSS only
         $(@).toggleClass( 'project-tile-active' )
-      add_action_to_project_tiles()
+      add_click_to_project_tiles()
       )
 
 
 update_project_page = (p_id) ->
-  return if $("#project-page-#{p_id}").length == 0
+  return if ! element_exists("#project-page-#{p_id}")
   console.debug("Updating project page #{p_id}...")
   prefix   = $('#path-prefix').data('path-prefix')
   tile_url = prefix + '/ajax/' + "project_page?project_id=#{p_id}"

        # based on the difference in timestamps
        for p_id, proj of data.projects
          if proj.queued == 'false' and project_is_updated(p_id, proj.tested_at)
            # Update whichever works:
            update_project_tile(p_id)
            update_project_page(p_id)

        add_action_to_project_tiles()
        )

      .fail( ->



ready = ->
    add_click_to_project_tiles()
    add_click_action_to_test_button()

    $('.project-tile').hover ->
