 
 
   shouldStick: =>
-    return unless @marker.length > 0 && @sticky[0]?
+    return unless @marker.length > 0 && @pinnedSticky[0]?
     markerTop = @marker[0].getBoundingClientRect().top
-    headerBottom = @headerHeight() + @sticky[0].getBoundingClientRect().height
+    headerBottom = @headerHeight() + @pinnedSticky[0].getBoundingClientRect().height
 
     markerTop < headerBottom
 

  constructor: ->
    @header = document.getElementsByClassName('js-pinned-header')
    @marker = document.getElementsByClassName('js-sticky-header')
    @sticky = document.getElementsByClassName('js-pinned-header-sticky')
    @stickyBreadcrumbs = document.getElementsByClassName('js-sticky-header-breadcrumbs')
    @stickyContent = document.getElementsByClassName('js-sticky-header-content')



    @visible = visible
    if visible
      Fade.in @pinnedSticky[0]
    else
      Fade.out @pinnedSticky[0]

    $(document).trigger 'sticky-header:sticking', [visible]

