/*
 * function enforce_full_window({
 * 		emh: 0,
 * 		nsh: 0
 * })
 *      This function is designed to force the HTML document to extend the entire 
 *      height of the browser window by forcing the min-height attribute on the 
 *      html element that is responsible for holding content on the page.
 * 
 * var emh = Existing Minimum Height as specified in the primary CSS document.
 *            There is no need to extend the min-height attribute in cases where 
 *            the min height is already greater than the window height.
 * var nsh = Non-Scaling Height is the combined height of elements not to be 
 *           included in the calculation of the new min height
 */
(function($){
	$.fn.enforce_full_window = function(options) {
		var defaults = {
			emh: 0,
			nsh: 0
		};
		var options = $.extend(defaults, options);
		
		return this.each(function() {
			var obj = $(this);
			
			var wh  = $(window).height();
			if ( ( wh - options.nsh ) > options.emh ) {
				obj.css('min-height',(wh-options.nsh)+'px');
			}
		});
	};
})(jQuery);




