/**
*	@purpose:	Global JS Document
*	@author:	KK
*   @version:	1.0
*	@copyright	2011 All Rights Reserved
*	@requires	jQuery 1.4.2
*/

(function($){//function to create private scope with $ param
			 //private scope & using $ w/out conflict
})(jQuery)   //invoke nameless function and pass it jQuery obj;


$(window).resize(function() {
 	resetHeights();
});

function resetHeights()
{
	
	var offset = 25;
			
	if( $(window).height() < ($('#header').height()+$('#content').height()+$('#footer').height()+offset) )
	{
			
		var ht = $('#header').height()+$('#content').height()+$('#footer').height()+offset;
		$('#main').css('height', ht+'px');
		$('#main').css('min-height', ht+'px');		
	}
	else
	{
		$('#main').css('height', '100%');
		$('#main').css('min-height', '100%');
	}
	
}

resetHeights();
