var text_size = 0;

$(function() {
	$("#meta a.inc").click(function() {
		resize_text(1);
		return false;
	});
	
	$("#meta a.dec").click(function() {
		resize_text(-1);
		return false;
	});
});

function resize_text(fact) {
	var font_size_p 	= 13;
	var font_size_h2 	= 24;
	var line_height_p 	= 20;
	var line_height_h2 	= 30;
	
	//the text size
	text_size += fact;
	
	//limit
	if (text_size > 4) 			text_size = 4;
	else if (text_size < -2) 	text_size = -2;
	
	//change font sizes
	font_size_p 	= (font_size_p + (text_size * 2)) + "px";
	font_size_h2 	= (font_size_h2 + (text_size * 2)) + "px";
	line_height_p 	= (line_height_p + (text_size * 2)) + "px";
	line_height_h2 	= (line_height_h2 + (text_size * 2)) + "px";
	
	$("#main p").css("fontSize", 	font_size_p);
	$("#main p").css("lineHeight", 	line_height_p);
	$("#main h2").css("fontSize", 	font_size_h2);
	$("#main h2").css("lineHeight", line_height_h2);
	$("#sidebar p").css("fontSize", 	font_size_p);
	$("#sidebar p").css("lineHeight", 	line_height_p);
	
} //end resize_text()