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_bg_holder").before('<div id="sticky-footer-push"></div>');
      }
      jQuery("#sticky-footer-push").height(diff);
    }
  }
});

