var _basefont = 16; 
var _ratio = 15 / 10.5; 
var _defaultwidth = 800; 
var _basefontBigger = 32; 

$(document).ready(function() {
						   
    function changeWindowSizeEvent() {
		var width, height;
		height = $('body').height();
		width = height * _ratio;

		if (width > $('body').width()) {
			width = $('body').width();
			height = width / _ratio;
		}

		$('#smallContainer').width(width);
		$('#smallContainer').height(height);
		$('#startPage .title').css('font-size', _basefontBigger * width / _defaultwidth + 'px');
		$('body').css('font-size', _basefont * width / _defaultwidth + 'px');
    }
	
    $(window).resize(changeWindowSizeEvent);	
    changeWindowSizeEvent();
});

/**
 * Development purposes
 */
function debug(msg, alert){
    alert = typeof alert !== 'undefined' ? alert : false;
    
    if(alert)
        alert(msg);
    else
        console.log(msg);
}