var theme = {
  resizeDelay : 75,
  resizeTimeout : null,
  prepare : function () {
    this.orientFooter();
  },
  orientFooter : function () {
    if (this.resizeTimeout) {
      window.clearTimeout(this.resizeTimeout);
      this.resizeTimeout = null;
    }
    function resize () {
      var header = $("header"), body = $("body"), footer = $("footer");
      body.style.height = "";
      var delta = Position.pageDimensions().height - (body.offsetHeight + header.offsetHeight + footer.offsetHeight);
      if (delta) { body.style.height = body.offsetHeight - 30 /* #body padding-bottom */ -  3   /* #footer border-top */ + delta + "px"; }
    }
    this.resizeTimeout = window.setTimeout(resize, this.resizeDelay);
  }
};