// sets handlers for dynamic layout
$(document).ready(function() {
	var width = $(window).width();
	if (width >= 1390) {
		makeLarger();
	}
	
	$(window).resize(function() {
		var width = $(window).width();
		if (width < 1390) {
			makeSmaller();
		} else {
			makeLarger();
		}
	});
});

// expands the layout
function makeLarger() {
	$("#wrapper").css("width", 1380);
	$("#wrapper-left").css("width", 1260);
	$("#colleft-expandable").css("width", 1242);
	$("#colmid").css("width", 420);
	$(".mod-footer").css("padding-right", 56);
	$(".mod-footer").css("padding-left", 56);
}

// retracts the layout
function makeSmaller() {
	$("#wrapper").css("width", 960);
	$("#wrapper-left").css("width", 840);
	$("#colleft-expandable").css("width", 822);
	$("#colmid").css("width", 'auto');
	$(".mod-footer").css("padding-right", 14);
	$(".mod-footer").css("padding-left", 14);
}
