var I = new (function(){
	var t = this;
	var dim = {
		'w' : 0,
		'h' : 0
	};
	function screen(){
		dim.w = $(window).width();
		dim.h = $(window).height();
		var h = $('#head').height();
		var f = $('#foot').height();
		var c = $('#content').height();
		var n = dim.h - h - f - 30;
		console.log(c+' - '+n);
		if(c < n){
			$('#content').css('height', n+'px');
		}else{
			console.log('fix');
			$('#content .box:eq(0)').css('height', (c-15)+'px');
			$('#wrapper').css('height', (c+h+f)+'px');
		}
	}
	
	this.init = function(){
		screen();
		$(window).bind('resize', function(){ screen(); });
		
	};
	
	return this;
})();
$(document).ready(function(){
	I.init();
});

