   
   closePanel: ->
     @bodyClickVisible = false
-    @$joinButtonWrap.hide()
-    @$joinButton.show()
     @$loginButton.show()
-    @$joinToggle.hide()
     
     @$loginPanel.slideUp()
-    @$joinPanel.slideUp()
   
   showLogin: ->
     if !@bodyClickVisible

      @displayBodyClick()
      @$loginPanel.slideDown()
    else
      @$loginPanel.show()
    
    @$joinPanel.hide()
    @$joinButtonWrap.hide()
    @$joinToggle.show()
    @$joinButton.hide()
    
  
    @$loginButton.hide()
  
    @$joinButtonWrap.unbind()
    @$joinButtonWrap.click => @showJoin()
  
  showJoin: ->
    if !@bodyClickVisible
      @bodyClickVisible = true
      @displayBodyClick()
      @$joinPanel.slideDown()
    else
      @$joinPanel.show()
    
    @$joinToggle.hide()
    @$loginButton.show()
    @$joinButtonWrap.show()
  
    @$joinButton.hide()
    @$loginPanel.hide()
  
  displayBodyClick: ->
    @bodyClickVisible = true
    $('#bodyClick').remove()

  constructor: (containerSelector)->
    @$container = $(containerSelector)
    @$loginButton = @$container.find('.login')

    @$loginPanel = @$container.find('.loginPanel') #submits
    
    @$loginButton.unbind()
    @$loginButton.click => @showLogin()
    
    @bodyClickVisible = false
    
