/**
 * sitewide.js
 *
 * Common Scripts that apply to all pages of site.
 *
 */
var zoom = 'zoomOut()';

$(document).ready(function () {

	// Accessibility
	$('A.biFocal').click(function (event) {
		zoom = (zoom == 'zoomIn()') ? 'zoomOut()' : 'zoomIn()';
		eval(zoom);
	});
});

function zoomIn() {
	$('.accessible').each(function () {
		var nFontSize = $(this).attr('increaseTo');
		$(this).animate({fontSize : nFontSize}, 500);
	});
}

function zoomOut() {
	$('.accessible').each(function () {
		var oFontSize = $(this).attr('oFontSize');
		$(this).animate({fontSize : oFontSize}, 500);
	});
}

function addToFavorite() {
	var url = location.href;
	var title = $('TITLE').text();
	
	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} else if ( window.external ) { // IE Favorite
		window.external.AddFavorite(url, title);
	} else { // Opera Hotlist
		alert ("Sorry! Your Browser does not allow this operation to occur automatically.\n\nPlease add your favorite manually.");
		return true;
	}
}

