	jQuery.noConflict();
	/* Setup global variables */
	var $ = jQuery;
	var isIE6 = false; var isSafari = false;
	$(document).ready(function() {
		/* apply IE background flicker bug fix */
		if (typeof document.body.style.maxHeight == 'undefined') { isIE6 = true; try { document.execCommand('BackgroundImageCache', false, true); } catch(e) { } }
		/* add safari selector */
		if($.browser.safari) { isSafari = true; $('body').addClass('safari'); }
		/* Opacity fix for Mac Mozilla */
		if($.browser.mozilla) { $('body').css('opacity', '.9999'); }
	
		/* Fire global initialize methods */
	 	formLegendsInit();
		/* Fire local page initialize methods */
		if (typeof initPage == 'function'){ initPage(); }
		/* Fire External Links last so any fired during local page initialization will be activated */
		externalLinksInit();
	});

	function formLegendsInit() {
		$('legend.accessibility').hide();
		$('legend.replace').each(function(){
			var cssClassesStr = new String($(this).attr('class'));
			var cssClasses = cssClassesStr.split('replace replace-');
			$(this).after('<'+ cssClasses[1] + ' class=\'legend\'>'+ $(this).html() +'</'+ cssClasses[1] +'>').remove();
		});
	}

	function externalLinksInit() {
		$('a.external').each(function(){
			$(this).click(function(){return !window.open($(this).attr('href'));});
		});
	}

	function archivesPage() {

		$('h3').css({
			cursor : 'pointer'
		}).next('ul').hide().end().click(function(){
			$(this).next('ul').slideToggle(700);
		});
	}

	/* Functions to run on page-ready */
	function initPage() {
		/* jQuery Objects */
		var jObjectCommentContainer = $('div#commentFormContainer');
		var jObjectCommentForm = $('div#commentForm');
		var jObjectLink = $('<p id="openLink"><a href="#commentForm">P.s. Please write back!</a></p>');
		var jObjectCloseLink = $('<p id="closeLink"><a href="#">close</a></p>');
		var jObjectComments = $('div.comment blockquote');
		/* Initialise Account Recommends Tabs and bind Events */
		/* Adds show comment form link to end of letter */
		$(jObjectCommentContainer).prepend(jObjectLink);
		/* Hide Comment form */
		$(jObjectCommentForm).hide();
		/* Sets up click events for open a */
		$('a', jObjectLink).click(function(){
			$(jObjectCommentForm).css( {position:"absolute", top:"-150px"});
			$(jObjectComments).css("overflow","hidden");
			$(jObjectCommentForm).fadeIn("slow");
			$('textarea', jObjectCommentForm).focus();
			return false;
		});
		/* Puts in the close link */
		$('.formPair-action', jObjectCommentForm).prepend(jObjectCloseLink);
		/* Sets up click events for close a */
		$('a', jObjectCommentForm).click(function(){
			$(jObjectCommentForm).fadeOut("slow");
			$(jObjectComments).css("overflow","auto");
			return false;
		});
		
		function resetActiveFormFields(){
			$('form fieldset .formPair').removeClass('formPair-active');
			$('form fieldset fieldset').removeClass('formPair-active');
		}
		$('form .formPair select, form .formPair input,form .formPair textarea').focus(function() { resetActiveFormFields(); $(this).parent().parent().parent().addClass('formPair-active'); });
		$('form .formPair select, form .formPair input,form .formPair textarea').blur(function() { resetActiveFormFields(); });
		$('form fieldset fieldset .formPair select, form fieldset fieldset .formPair input,form fieldset fieldset .formPair textarea').focus(function() { resetActiveFormFields(); $(this).parent().parent().parent().parent().addClass('formPair-active'); });
		$('form fieldset fieldset .formPair select, form fieldset fieldset .formPair input,form fieldset fieldset .formPair textarea').blur(function() { resetActiveFormFields(); });
		$('form fieldset fieldset h3.legend').click(function() { $(this).parent().addClass('formPair-active').children('.formPair:first').children('label').focus(); });

		if($('div#byDate h3').length){ archivesPage(); }
	}
