var windowResizer = function(){
  var screenHeight = screen.availHeight;
  var screenWidth = screen.availWidth;
  var maxWidth = 1800;
  var maxHeight = 1309;
  var ratio = maxWidth/maxHeight;

	if(screenWidth < maxWidth) {
	  this.windowWidth = screenWidth;
	  this.windowHeight = Math.round((this.windowWidth/ratio));
	  if(this.windowHeight > screenHeight){
	    this.windowHeight = screenHeight;
	    this.windowWidth = Math.round(this.windowHeight * ratio);
	  }
		
	} else {
	  this.windowWidth = maxWidth;
	  this.windowHeight = maxHeight;
	  if(this.windowHeight > screenHeight){
	    this.windowHeight = screenHeight;
	    this.windowWidth = Math.round(this.windowHeight * ratio);
	  }
	}
}


