Refactored to only start pin after window scroll has reached top top offset of the pinned element