     @profileLandingView.listenWindowResize()
     @profileLandingView._windowDidResize = =>
       @profileLandingView.setHeight window.innerHeight
-      @profileContentView.setHeight window.innerHeight-profileTitleView.getHeight()
+      @profileContentView.setHeight window.innerHeight-@profileTitleView.getHeight()
       @repositionLogoView()
 
-    profileTitleView = new KDView
+    @profileTitleView = new KDView
       lazyDomId : 'profile-title'
 
     @profileShowMoreView = new KDView

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

        @profileLandingView.setClass 'profile-fading'


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

    console.timeEnd 'reviving page elements on pageload.'

  reviveViewsOnUserLoad:(user)->

    console.time 'reviving page elements on userload.'

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

    console.timeEnd 'reviving page elements on userload.'

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