 
 T.def 'tournament-type', (type) ->
   [
-    "div.toggleable.tournament-type.#{type}"
+    ".toggleable.tournament-type.#{type}"
     click: ->
       if config.activeTypes.indexOf(type) >= 0
         config.activeTypes.splice(config.activeTypes.indexOf(type), 1)

    else if game.result is 'L'
      class: 'lose'

    game.opponent
    " (#{game.rank})"
  ]

T.def 'tournaments-by-year', (year, tournaments) ->
  if not tournaments then return
  [ 'div.tournaments-by-year'
    ['div.year', year]
    T.each('tournament', tournaments)
  ]


    $.each config.activeOpponents, ->
      cls = playerToClass this
      $(".opponents .#{cls}").removeClass('inactive')
      $("#games-chart .tournament.#{cls} .game").show().css('opacity', '0.15')
      $("#games-chart .tournament.#{cls} .game.#{cls}").css('opacity', '')

  $('#games-chart .tournament').each ->
    if $('.game', this).filter(':visible').length > 0
