     @profileLogoView = new KDView
       lazyDomId: 'profile-koding-logo'
       click :=>
-        profilePersonalWrapperView.setClass 'slide-down'
-        profileContentWrapperView.setClass 'slide-down'
+        @profilePersonalWrapperView.setClass 'slide-down'
+        @profileContentWrapperView.setClass 'slide-down'
         @profileLogoView.setClass 'top'
 
         @profileLandingView.setClass 'profile-fading'

    @profileLandingView.listenWindowResize()
    @profileLandingView._windowDidResize = =>
      @profileLandingView.setHeight window.innerHeight
      @profileContentView.setHeight window.innerHeight-profileTitleView.getHeight()
      @repositionLogoView()

    profileTitleView = new KDView
      lazyDomId : 'profile-title'

    @profileShowMoreView = new KDView

        cssClass        : 'static-content activity-related'
      showHeader        : no

    # this is the JAccount object of the static profile
    @profileUser  = null

    @navLinks     = {}
    @lockSidebar  = no

    @registerSingleton 'staticProfileController', @, no

    @reviveViewsOnPageLoad()
    @addEventListeners()

    # KD.remote.cacheable KD.config.profileEntryPoint, (err, user, name)=>
    # FIXME - we want to use cacheable, not a JAccount call
    KD.remote.api.JAccount.one
      "profile.nickname" : KD.config.profileEntryPoint
    , (err, user, name)=>
      if err then log err,user,name
      unless err
        @reviveViewsOnUserLoad user

  addEventListeners:->

    @on 'HomeLinkClicked', =>
      @lockSidebar = no
      @utils.wait 250, =>
        @profileContentLinks.setClass 'links-hidden'
        @profileContentList.unsetClass 'has-links'

      # HERE is the place to implement custom profile splash screens, reveal.js and such

      @emit 'StaticProfileNavLinkClicked', 'CBlogPostActivity', yes

    @on 'ActivityLinkClicked', (path)=>
      @lockSidebar = yes
      @emit 'StaticProfileNavLinkClicked', 'CBlogPostActivity'
      @utils.wait 250, =>
        @profileContentList.setClass 'has-links'
        @profileContentLinks.unsetClass 'links-hidden'

    @on 'CustomizeLinkClicked',=>
      return if @customizeViewsAttached or KD.whoami().getId() isnt @profileUser.getId()
      @customizeViewsAttached = yes

      @avatarAreaIconMenu.emit 'CustomizeLinkClicked'

      # reviving customization

      types = @getAllowedTypes @profileUser

      for type in CONTENT_TYPES
        @navLinks[type].addSubView new StaticNavCheckBox
          activityType : type
          defaultValue : type in types
          delegate     : @
        , @profileUser

    @on 'ShowMoreButtonClicked', =>
      @emit 'StaticProfileNavLinkClicked', 'CBlogPostActivity'

    @on 'StaticProfileNavLinkClicked', (facets,isStatic=no)=>
      @profileLoadingBar.setClass 'active'
      @profileLoaderView.show()
      facets = [facets] if 'string' is typeof facets

      if @profileUser
        allowedTypes = @getAllowedTypes @profileUser

        blockedTypes = facets.reduce (acc, facet)->
          acc.push facet unless facet in allowedTypes
          return acc
        , []

        @emit 'DecorateStaticNavLinks', allowedTypes

        if blockedTypes.length is 0
          @currentFacets = facets
          appManager.tell 'Activity', 'fetchActivity',
            originId : @profileUser.getId()
            facets : facets
            bypass : yes
          , (err, activities)=>
            @refreshActivities err, activities, isStatic
        else @emit 'BlockedTypesRequested', blockedTypes

    @controller.on 'LazyLoadThresholdReached', =>
      appManager.tell 'Activity', 'fetchActivity',
        originId  : @profileUser.getId()
        facets    : @currentFacets
        to        : @controller.itemsOrdered.last.getData().meta.createdAt
        bypass    : yes
      , @bound "appendActivities"

  reviveViewsOnPageLoad:->

    console.time 'reviving page elements on pageload.'

    allowedTypes  = ['CBlogPostActivity']
    blockedTypes  = []
    @currentFacets = []
    # reviving the content view. this encapsulates the listitem feed after
    # user input (type selection, more-button)
    @profileContentView = new KDListView
