$(document).ready(function() {
	// See which font size the user wants
	//$("a#text_default").click(function() { setFontSize(68.8); return false });
	//$("a#text_large").click(function() { setFontSize(95); return false });
	$("a#header_text_default").click(function() { 
		setFontSize(75, 48); 
		return false 
	});
	
	$("a#header_text_large").click(function() { 
		setFontSize(95, 42);
		return false 
	});

	// Set the font size and set a cookie
	function setFontSize(size, entry) {
		$("body").animate({fontSize: size+"%"}, 500).fadeIn("slow");
		$("#header .entry").animate({top: entry + "px"}, 500);
			createCookie(size);
		}

	function createCookie(value) {
		var date = new Date();
		date.setTime(date.getTime()+(30*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
		document.cookie = "font_size="+value+expires+"; path=/";
		}
	var font_size = $.cookie('font_size');
	if (font_size == '75') {
		$('body').css("font-size","75%");
		$('#header .entry').css({'top': '48px'}); 
	}
	if (font_size == '95') {
		$('body').css("font-size","95%");
		$('#header .entry').css({'top': '42px'}); 
	}

	
});