
/*
     * footer management methods
     * -- management method to make sure the footer
     * -- is dropped to the bottom of the window viewable
     * -- are on page load and if the window is resized.
*/

var originalHeight = $("#ubercontainer").height();

$(window).bind("load", function(){
  positionfooter();
});
$(window).resize(function(){
  positionfooter();
});

function positionfooter() {
  
  var windowHeight = $(window).height();
  var element = $("#ubercontainer");
  
  if (element.css("height").replace('px','') < windowHeight || element.css("height").replace('px','') > originalHeight) {
    element.css("height", (windowHeight-1)+"px");
  }
  
};
