 
     @visible = visible
     if visible
-      Fade.in @sticky[0]
+      Fade.in @pinnedSticky[0]
     else
-      Fade.out @sticky[0]
+      Fade.out @pinnedSticky[0]
 
     $(document).trigger 'sticky-header:sticking', [visible]
 

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




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

    markerTop < headerBottom

