var sizes = ['1em','1.2em','1.33em'];
function changeSize(s,h) {
	$('#innercontentarea').css('fontSize',sizes[s]);
	$("A[id^='fontSize']").each(function() {
		$(this).removeClass('fontOn');
	})
	$('#fontSize'+s).addClass('fontOn');

	if (arguments.length==2) {
		$('#contentbg').css('height',h+'px');
		$.cookies.set('containerHeight',h,24000);
	} else {
		$.cookies.set('containerHeight',null,24000);
	}
	$.cookies.set('textSize',s,24000);
}
$(document).ready(function() {
	var sizeCookie = $.cookies.get('textSize');
	var heightCookie = $.cookies.get('containerHeight');
	if (sizeCookie != null) {
		if (heightCookie != null) {
			changeSize(sizeCookie,heightCookie);
		} else {
			changeSize(sizeCookie);
		}
	}
	$('A.confirm_exit').bind('click', function(event){
		// If the user does not accept this confirmation, nothing will happen
		//alert('clicked ext link');
		if ( ! confirm(
			'Disclaimer: By clicking on this link, you will leave the Spot on Your Lung website. We have provided this link to an external site because it has information that may be of interest to our users. Spot on Your Lung does not have official ties to any of these external links and is not responsible for their content. In addition, this link does not represent an endorsement or guarantee of the content provided on the linked site.'
		)) {
			event.preventDefault();
			return false;
		} 
	});
});