     @headerHeight() + offset
 
 
-  @shouldPin: (offset = window.pageYOffset) ->
-    offset > window._styles.header.height
-
-
   constructor: ->
     @stickMarker = document.getElementsByClassName('js-sticky-header')
 

      Fade.out sticky[0]


  stickOrUnstick: =>
    return unless @stickMarker.length > 0 && sticky[0]?
    markerTop = @stickMarker[0].getBoundingClientRect().top
    headerBottom = StickyHeader.offsetForScrollTo(sticky[0].getBoundingClientRect().height)

    @setVisible markerTop < headerBottom

    $(document).on 'turbolinks:load osu:page:change', @stickOrUnstick


  applyCss: =>
    return unless header[0]?

    if @shouldPin()
      document.body.classList.add 'js-header-is-pinned'
    else
      document.body.classList.remove 'js-header-is-pinned'
