jQuery(document).ready(function() {
        positionFooter();
        
        jQuery(window)
          .scroll(positionFooter)
          .resize(positionFooter);
        
        function positionFooter() {
          var docHeight = jQuery(document.body).height() - jQuery("#sticky-footer-push").height();
          if(docHeight < jQuery(window).height()){
            var diff = jQuery(window).height() - docHeight;
            if (!jQuery("#sticky-footer-push").length > 0) {
              jQuery("#footer").before('<div id="sticky-footer-push"></div>');
            }
            jQuery("#sticky-footer-push").height(diff);
          } 
        }
      })
