// JavaScript Document
/* Resize  */
var browserHeight = 0;
var minBrowserHeight = 600;
var maxBrowserHeight = 1500;

function onResizeHandler(){
	if(typeof(window.innerWidth) == 'number'){
		//Non-IE
		browserHeight = window.innerHeight - 36;
	}else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)){
		//IE 6+ in 'standards compliant mode'
		browserHeight = document.documentElement.clientHeight - 36;
	}else if(document.body && (document.body.clientWidth || document.body.clientHeight)){
		//IE 4 compatible
		browserHeight = document.body.clientHeight - 36;
	}
	// update measures 
	$('html').css({'overflow-y':(browserHeight<minBrowserHeight ? "auto" : "hidden")});
	$('html').css({'height':(browserHeight<minBrowserHeight ? minBrowserHeight : '100%')});
};

/* Init */
(function($){
	window.onresize = onResizeHandler;
	onResizeHandler();
})(window.jQuery)
