         $(this).parent().find('.loginPanel').slideDown()
       else
         $(this).parent().find('.loginPanel').slideUp()
-    
-    # $('.joinWrap a').click (event) ->
-    #       event.preventDefault()
-    #       
-    #       $(this).parent().find('.join').hide()
-    #       $(this).parent().find('.joinButton').show()
-    #       $(this).parent().parent().find('.intro').slideUp()
-    #       $(this).parent().parent().find('.joinForm').slideDown()
-    #       
-    #       $('.haveSeedcode').click =>
-    #         $('.haveSeedcode').slideUp('fast')
-    #         $('.seedcodeExpander').slideDown('fast')
     
     # Check for cookie "welcome" if found, do nothing
     # if not found, display the welcomeWrap

      @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
    
