/*
 * 
 * Détection de la grandeur de la fenêtre et changement des CSS.
 *
 */

$(document).ready(function() {
	$(window).resize(function() { updateStyleSheet(); });
	updateStyleSheet();
});

function updateStyleSheet() {
	if ($(window).width() >= 1344) {
		//$("#language").text($(window).width() + " - normal");
		$("#adaptive-style-sheet").attr({href: ""});
	}
	else if ($(window).width() >= 1010) {
		//$("#language").text($(window).width() + " - 3 cols");
		$("#adaptive-style-sheet").attr({href: "_css/styles-3cols.css"});
	}
	else if ($(window).width() >= 675) {
		//$("#language").text($(window).width() + " - 2 cols");
		$("#adaptive-style-sheet").attr({href: "_css/styles-2cols.css"});
	} else {
		//$("#language").text($(window).width() + " - 1 cols");
		$("#adaptive-style-sheet").attr({href: "_css/styles-1col.css"});
	}
}

