// Wordpress Olivia Theme Javascript
$(document).ready(function(){
	
	if($.cookie('style') == "simple")
	{
		$("link[rel='stylesheet']").attr("href","wp-content/themes/olivia/textOnly.css");
		$("#textOnly").text("Reset Style");
	}
	
	$("#textOnly").click(function() {
		if($.cookie('style') == "simple")
		{
			$("link[rel='stylesheet']").attr("href","wp-content/themes/olivia/style.css");
			$.cookie('style', 'normal');
			$("#textOnly").text("Basic Style");
			alert("You are now viewing the original theme.");
		}
		else
		{
			$("link[rel='stylesheet']").attr("href","wp-content/themes/olivia/textOnly.css");
			$.cookie('style', 'simple');
			$("#textOnly").text("Reset Style");
			alert("You are now viewing the basic version of this web page. In order to view the full design you will need to click the same button again.");
		}
	});	
	$("#larger").click(function() {
			$(".lipsum").animate({
			fontSize: "2em"
		}, 900);			
	});	
	$("#smaller").click(function() {
			$(".lipsum").animate({
			fontSize: "1em"
		}, 900);			
	});	
	
	//deprecated but may make a return
//	if ($.browser.msie) {
//		$("#high").attr("title","We have to block IE as your browser isn't good enough! Get Firefox!");
//		$("#high").attr("class","strike");
//		$("#high").attr("id","none");
//	}

	//deprecated but may make a return
	//this is how we change the document into high contrast mode! using jquery
//	var timeShift = 2000;
//	var highColour = "#000000";
//	var midColour = "#666666";
//	var lowColour = "#FFFFFF";
	
	//deprecated but may make a return
//	$("#high").click(function() {
//			$("a").animate({color: "#FF0000"}, timeShift, function(){$("#container, #rightColumn, #leftColumn, .widget, #footer, .newsItem p").animate({backgroundColor: highColour, color: lowColour}, timeShift, function(){$("body").animate({backgroundColor: lowColour}, timeShift);});});
//			$("#leftColumn, .newsItem").animate({width: "608px", fontSize: "1.3em"}, timeShift);
//			$("#rightColumn").animate({width: "270px"}, timeShift);
//			$(".widget").animate({width: "240px"}, timeShift);
//	});
	
	
});