add_action('wp_footer', 'custom_hide_header_script');
function custom_hide_header_script() {
?>
<script type="text/javascript">
  (function() {
    var prevScrollpos = window.pageYOffset;
    window.onscroll = function() {
      var currentScrollPos = window.pageYOffset;
      if (prevScrollpos > currentScrollPos) {
          document.getElementById("scrolling-header").style.top = "0";
		  document.getElementById("scrolling-header").style.backgroundColor = "transparent !important";
        } else {
          document.getElementById("scrolling-header").style.top = "-600px";
		  document.getElementById("scrolling-header").style.backgroundColor = "#fff !important";
      }
      prevScrollpos = currentScrollPos;
    }
  })();
</script>
<?php
}
