   s = 8
   t = $('#protein-table')
   c = t.find('tr').size() - 1
+  show_popover = false
 
   # Auxiliary methods.
   isFootableNeeded = () ->

      nextText: "Next →",
      lastText: "Last ⇒"
    }).bind({'footable_sorting': (e) ->
      $('[data-toggle="popover"]').each(() ->
        if (!$(this).is(e.target) && $(this).has(e.target).length == 0 && $('.popover').has(e.target).length == 0)
          $(this).popover('hide')
    )
    })


          title: 'Cluster ' + cls,
          html: true,
          content: cont.html()
        }).on("show.bs.popover", ->
          $(this).data("bs.popover").tip().css(maxWidth: "600px")
          show_popover = true
        )

  # Disable multiple popovers.
  $('html').on('click', (e) ->
    if show_popover == true
      $('[data-toggle="popover"]').each(() ->
        if (!$(this).is(e.target) && $(this).has(e.target).length == 0 && $('.popover').has(e.target).length == 0)
          $(this).popover('hide')
      )
  )

  # Disable popovers on scroll.
  $('.table-container').scroll( ->
    if show_popover == true
      show_popover = false
      $('[data-toggle="popover"]').each(() ->
        $(this).popover('hide')
      )
  )

  # Enable header tooltips.
