function backgroundReset(){
 var contentOffset = 22;
 var marginsAndBorders = 49;
 
 var body_wrapper = $("#body_wrapper");
 var page_content = $("#page_content");
 var left_col = $("#left_col");
 var right_col = $("#right_col");
 var footer = $("#footer");
 var image = $("#left_sidebar_image img");
 
 var maxHeight = Math.max(left_col.outerHeight(true), right_col.outerHeight(true));
 maxHeight = Math.max(maxHeight,image.outerHeight(true));
 var content_height = page_content.outerHeight(true) - marginsAndBorders - contentOffset;
 
 if(maxHeight > content_height){
  page_content.height(maxHeight);
  body_wrapper.height(maxHeight + contentOffset);
  document.getElementById("footer").style.top = page_content.outerHeight(true) + page_content.offset().top + 'px';
 }else{
  page_content.height(content_height);
  body_wrapper.height(content_height + contentOffset);
  document.getElementById("footer").style.top = page_content.outerHeight(true) + page_content.offset().top + 'px';
}
}

$(window).load(function(){
  backgroundReset();
});

