//client stuff

function addTextSizer()
{
	var imgPath = '/imgs/icons/';
	var theHref = 'href="#"';
	$("#Col2 #Content").before("<div id=\"TextSizer\" class=\"ClearFix\"><div>" +
			"<h2>Text Size</h2>" +
			"<ul>" +
				"<li>" +
					"<a class=\"Normal\"" + theHref + "><img src=\"" + imgPath + "small_font.gif\" alt=\"Small Font Size\" /></a>" +
				"</li>" +
				"<li>" +
					"<a class=\"Large\"" + theHref + "><img src=\"" + imgPath + "medium_font.gif\" alt=\"Medium Font Size\" /></a>" +
				"</li>" +
				"<li>" +
					"<a class=\"X-Large\"" + theHref + "><img src=\"" + imgPath + "large_font.gif\" alt=\"Large Font Size\" /></a>" +
				"</li>" +
			"</ul>" +
		"</div></div>");
	$("a.Normal").click(function() { setFontSize('normal'); return false; });
	$("a.Large").click(function() { setFontSize('large'); return false; });
	$("a.X-Large").click(function() { setFontSize('x-large'); return false; });
}
function addPageTools()
{
	$("#PageToolsWrapper").append("<div id=\"PageTools\">" +
		"<h2 class=\"Hide\">Page Tools</h2>" +
		"<ul>" +
			"<li class=\"Email\">" +
				"<a href=\"#\">Email Page</a>" +
			"</li>" +
			"<li class=\"Print\">" +
				"<a href=\"#\">Printer Friendly</a>" +
			"</li>" +
		"</ul>" +
	"</div>");
	var clientDomainName = 'Bromenn.org';
	var clientSiteName = 'Bromenn';
	var titleEl = document.getElementsByTagName('title')[0];
	var currentPageTitle = "";
	if (titleEl.text)
	{
		currentPageTitle = escape(titleEl.text);
	}
	else
	{
		currentPageTitle = escape(title.data);
	}
	var currentPageUrl = document.location;
	var emailSubject = clientDomainName + ": " + currentPageTitle;
	var emailHref = "mailto:?subject=" + emailSubject + "&body=I thought you would be interested in a page on the " + clientSiteName + " Web site: " + currentPageTitle + " - " + currentPageUrl;
	$("li.Email a").attr({ href: emailHref});
	$("li.Print a").click(function() { print(); return false; });
}

function addStyles() {
	//Adding div wrapped inside heart cmspanels
	$('#FeaturedServices .cmspanel').wrapInner('<div></div>');
	//Add ClearVis for tabs
	$('.Tab').addClass('ClearVis');
	$('.Tab').addClass('ClearFix');
}

//$(document).ready(function(){addTextSizer();});
$(document).ready(function(){addPageTools();});
$(document).ready(function(){addStyles();});