         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


    @utils.wait => @profileLogoView.setClass 'animate'


    # KD.remote.cacheable KD.config.profileEntryPoint, (err, user, name)=>


    KD.remote.api.JAccount.one
      "profile.nickname" : KD.config.profileEntryPoint
    , (err, user, name)=>
      if err then log err,user,name
      unless err

        profileUser = user
        @emit 'DecorateStaticNavLinks', @getAllowedTypes profileUser

        @avatarAreaIconMenu = new StaticAvatarAreaIconMenu
          lazyDomId    : 'profile-buttons'
          delegate     : @
        , profileUser

        @avatarAreaIconMenu.$('.static-profile-button').remove()

        if user.getId() is KD.whoami().getId()

          # reviving admin stuff

          profileAdminCustomizeView = new KDView
            lazyDomId : 'profile-admin-customize'

          profileAdminCustomizeView.addSubView staticPageSettingsButton = new CustomLinkView
            title : 'Customize'
            cssClass : 'static-page-settings-button clean-gray'
            click :(event)=>
              @emit 'CustomizeLinkClicked'
              event.stopPropagation()
              event.preventDefault()

          profileAdminCustomizeView.show()

          profileAdminMessageView = new KDView
            lazyDomId : 'profile-admin-message'

          showPage = user.profile.staticPage?.show

          profileAdminMessageView.addSubView disableLink = new CustomLinkView
            title     : "#{if showPage is yes then 'Disable' else 'Enable'}"
            cssClass  : 'message-disable'
            click     : (event)=>
              event?.stopPropagation()
              event?.preventDefault()

              if user.profile.staticPage?.show is yes
                modal           = new KDModalView
                  cssClass      : 'disable-static-page-modal'
                  title         : 'Do you really want to disable your Public Page?'
                  content       : """
                    <div class="modalformline">
                      <p>Disabling this feature will disable other people
                      from publicly viewing your profile. You will still be
                      able to access the page yourself.</p>
                      <p>Do you want to continue?</p>
                    </div>
                    """
                  buttons       :
                    "Disable the Public Page" :
                      cssClass  : 'modal-clean-red'
                      callback  : =>
                        modal.destroy()
                        user.setStaticPageVisibility no, (err,res)=>
                          if err then log err
                          disableLink.updatePartial 'Enable this Public Page'
                    Cancel      :
                      cssClass  : 'modal-cancel'
                      callback  : =>
                        modal.destroy()
              else
                user.setStaticPageVisibility yes, (err,res)=>
                  if err then log err
                  disableLink.updatePartial 'Disable this Public Page'


    @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"

  repositionLogoView:->
    @profileLogoView.$().css

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

        @profileLandingView.setClass 'profile-fading'
