	var initLogoSWF;
	initLogoSWF = true;
	
	$(document).ready(function() {
		var navigation = document.getElementById("nav");
		if (navigation != false) {
			var ieVersion = getInternetExplorerVersion();
			if ( ieVersion == 6) {
				$(function() {
					// Pre rebrand
					// $("#nav li.midlarge a span").hover(function () {$(this).css({backgroundPosition:'-239px 0px'});},function () {$(this).css({backgroundPosition:'0px 0px'});});
					// $("#nav li.extralarge a span").hover(function () {$(this).css({backgroundPosition:'-239px 0px'});},function () {$(this).css({backgroundPosition:'0px 0px'});});
					// $("#nav li.large a span").hover(function () {$(this).css({backgroundPosition:'-239px 0px'});},function () {$(this).css({backgroundPosition:'0px 0px'});});
					// $("#nav li.small a span").hover(function () {$(this).css({backgroundPosition:'-239px 0px'});},function () {$(this).css({backgroundPosition:'0px 0px'});});
					
					// England rebrand
					$("#nav li.size01 a span").hover(function () {$(this).css({backgroundPosition:'-186px 0px'});},function () {$(this).css({backgroundPosition:'0px 0px'});});
					$("#nav li.size02 a span").hover(function () {$(this).css({backgroundPosition:'-186px 0px'});},function () {$(this).css({backgroundPosition:'0px 0px'});});
					$("#nav li.size03 a span").hover(function () {$(this).css({backgroundPosition:'-186px 0px'});},function () {$(this).css({backgroundPosition:'0px 0px'});});
					$("#nav li.size04 a span").hover(function () {$(this).css({backgroundPosition:'-186px 0px'});},function () {$(this).css({backgroundPosition:'0px 0px'});});
				});
			}
		}
		//England rebrand - hide
		//$("#navigation *").css("opacity","0"); // Set all elements within #navigation to 0%
	});

	function switchClass(passTarget,passClass) {
		if (passTarget === undefined) {
		
		} else {
			document.getElementById(passTarget).className = passClass;
		};
	}
	
	function switchmultipleState(targetType,targetID, switchID){
		var itemCollection = document.getElementsByTagName(targetType);
		for (var i=0; i<itemCollection.length; i++) {
			if(itemCollection[i].className === targetID) {
				document.getElementById(itemCollection[i]).className = passClass;
			}
		}
	}
	
	function addLoadEvent(func) {
		var oldonload = window.onload;
		if (typeof window.onload != 'function') {
			window.onload = func;
		} else {
			window.onload = function() {
				if (oldonload) {oldonload();}
				func();
			}
		}
	}
	
	var tabsReady = true;
	
	function renderTabs(targetID,actionID,focusID){
		// Switch CSS back to match JQuery style
        switchClass(targetID, "tab-show");
        switchClass(actionID, "js-show");

        $('#' + targetID + ' div.contenttab').hide();
        if (focusID == 0) {
            $('#' + targetID + ' div.contenttab:first').show();
            $('#' + targetID + ' ul li:first').addClass('active');
			$('#' + targetID + ' ul li:first a').addClass('active');
        } else {
            $('#' + targetID + ' div.contenttab#' + focusID).show();
            $('#' + targetID + ' ul li.' + focusID).addClass('active');
			$('#' + targetID + ' ul li.' + focusID + ' a').addClass('active');
        };
        $('#' + targetID + ' ul li a').click(function() {
            if (tabsReady) {
                tabsReady = false;
                setTimeout('tabsWait()', 500);
                $('#' + targetID + ' ul li').removeClass('active');
				$('#' + targetID + ' ul li a').removeClass('active');
                $(this).parent().addClass('active');
				$(this).addClass('active');
				var currentTab = $(this).attr('href');
				if (currentTab.length >= 2) {
					$('#' + targetID + ' div.contenttab:visible').fadeOut("slow", 
	                    function() {
	                        $(currentTab).fadeIn("slow");
							initSIFR("h1.smoothfont-small","bold","left","#fff2bf","#FFFFFF","#FFFFFF","none");
							initSIFR("h2.smoothfont-small","bold","left","#FFFFFF","#FFFFFF","#FFFFFF","none");
							var windowHeight = $(window).height();
							var tabHeight = $(currentTab).height() + 62;
							var targetHeight = tabHeight + 306;
							if (tabHeight >= windowHeight) {
								$("#layout").css('height',targetHeight);
							} else {
								$("#layout").css('height',windowHeight);
							}
	                    }
	                );
				}
                return false;
                }
            }
        );
	}

	function tabsWait() {
		tabsReady = true;
	}
	
	function initVideo(targetID,videoID,flashvars,params,attribute) {
		var flashvars = {};
		var params = {bgcolor:"#000000",wmode:"transparent",base:"/swf/england/", allowFullScreen:"true"};
		var attributes = {};
		swfobject.embedSWF("/swf/england/" + videoID, targetID,"404","255","9.0.0","/swf/expressInstall.swf",flashvars,params,attributes);	
	}
	
	function removeVideo(targetID) {
		swfobject.removeSWF(targetID);
	}
	
	function switchCopy(targetID,contextData) {
		$('#' + targetID + '').css("opacity","0");
		$('#' + targetID).html(contextData);
		$('#' + targetID + '').stop().animate({opacity:1.0},1000);
	}
	
	function switchHeading(targetID,contextData) {
		$('#' + targetID).html(contextData);
	}
	
	function initCopy(targetID) {
		$('#' + targetID + '').css("opacity","0");
		$('#' + targetID + '').stop().animate({opacity:1.0},1000);
	}
	
	function initSIFR(targetElement, sifrWeight, sifrAlign, sifrColour, sifrLinkColour, sifrHoverColour, sifrTextcase, sifrSRC){
		var flashSRC = "";
		if (targetElement === undefined) {var targetElement = "h1";};
		if (sifrWeight === undefined) {var sifrWeight = "normal";};
		if (sifrAlign === undefined) {var sifrAlign = "left";};
		if (sifrColour === undefined) {var sifrColour = "#FFFFFF";};
		if (sifrLinkColour === undefined) {var sifrLinkColour = "#FFFFFF";};
		if (sifrHoverColour === undefined) {var sifrHoverColour = "#FFFFFF";};
		if (sifrTextcase === undefined) {var sifrTextcase = "none";};
		if (sifrSRC === undefined) {var flashSRC = "sifr.swf";} else {var flashSRC = sifrSRC;};
		
		var smoothfont = {src: '/swf/sifr/' + flashSRC};
		
		sIFR.delayCSS  = false;
		sIFR.domains = ['*'];
		sIFR.activate(smoothfont);
		sIFR.replace(smoothfont, {selector:targetElement,css:['.sIFR-root {width:100%;text-align:' + sifrAlign + ';font-weight:' + sifrWeight + ';color:' + sifrColour + ';letter-spacing:-0.5;text-transform:' + sifrTextcase + ';}','a {color:' + sifrLinkColour + ';text-decoration:none;}','a:link {color:' + sifrLinkColour + ';}','a:hover {color:' + sifrHoverColour + ';}'],wmode:'transparent'});
	}

	function initMultiFade(targetID){
		$('' + targetID + '').fadeTo("slow", 0.45);
		$('' + targetID + '').hover(function(){$(this).fadeTo('' + targetID + '', 1.0);},function(){$(this).fadeTo('' + targetID + '', 0.3);});
	}
	
	function initFadeIn(targetID){
		$('' + targetID + '').css("opacity","0");
		$('' + targetID + '').stop().animate({opacity:1.0},1000);
	}
	
	function initFadeInDelay(targetID,delayLength){
		$('' + targetID + '').css("opacity","0");
		$('' + targetID + '').stop().delay(delayLength).animate({opacity:1.0},1000);
	}
	
	function preloadData(){
		var i,newData;
		var preData = new Array(
			'/images/spacer.gif',
			'/images/background/background-img04.jpg.gif',
			'/images-rebrand/background/flag.jpg',
			'/swf/england-rebrand/Anim.swf'
			);
		for (i=0;i<preData.length;i++){
			newData = new Image();
			newData.src = preData[i];
		}
	}
	
	function getInternetExplorerVersion(){
		var rv = -1;
		if (navigator.appName == 'Microsoft Internet Explorer') {
			var ua = navigator.userAgent;
			var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
			if (re.exec(ua) != null) rv = parseFloat( RegExp.$1 );
		}
		return rv;
	}