added functionality for hiding and showing header/footer on scroll