$(document).ready( function() {
	
	// Changing font size
	$('#fontsize a').click( function () {
		changeFont(this.getAttribute("rel"));
		createCookie('font-size', this.getAttribute("rel"), 365);
		return false;
	});
	function changeFont (fontSize) {
		$('body').removeClass().addClass(fontSize);
	}
	
	// Reseting all styles
	$('#reset a').click(function() {
		$('body').removeClass();
		eraseCookie('font-size');
		return false;
	});
	
	// Reading the cookies and setting off functions
	var d = readCookie('font-size');
	if (d) changeFont(d);
	
});