$().ready(->
  $(window).resize( ->
    App.UI.setAutoHeight()
  ).trigger('resize')

  Backbone.Events.on('resizeWorkspace', -> App.UI.setAutoHeight())

  $('#js-search-contacts').keyup( ->
    searchTerm = $(this).val()
    App.UI.filterContacts(searchTerm)
  )

  $('#add-contact').click((e) ->
    e.preventDefault()
    $('#js-popup .close').click()
    popup = new Xmpp.Views.Popup.AddContactView()
    popup.render()
  )
)