//<![CDATA[
	var disclaimerText = "<p>The instructions and advice presented in this article is designed for people who are in good health and do not constitute medical advice.</p>" 
			+ "<p>Consult your doctor before undertaking any new physical routine. Never force or strain. Start any new programme slowly, discontinue and seek medical advice if you experience any discomfort, distress or other symptoms.</p>"
			+ "<p>In undertaking any activity based on the instructions or advice in this article you assume the risk of injury resulting from performing the movements or utilizing any suggested equipment.</p>"
			+ "<p>The Company disclaims any liability in connection with any instructions and advice in this blog post. This does not include or limit in any way the Company's liability for death or personal injury caused by the Company's negligence; or for any matter for which it would be illegal for the Company to exclude, or attempt to exclude, its liability.</p>";
			
	var tabBoxText = "<div class=\"Top\"></div>"
			+ "<div class=\"Bottom\"></div";

	jQuery(document).ready(function(){
		// Override WP Thickbox image locations with absolute paths.
		tb_pathToImage = "/wordpress/wp-includes/js/thickbox/loadingAnimation.gif";
		tb_closeImage = "/wordpress/wp-includes/js/thickbox/tb-close.png";
		imgLoader.src = tb_pathToImage;		

		jQuery(".Disclaimer").each(function(){
			jQuery(this).addClass("DisclaimerJS");
			jQuery(this).removeClass("Disclaimer");
			
			if (jQuery(this).attr("id") == "standardDisclaimer")
			{
				content = disclaimerText;
			}
			else
			{
				content = jQuery(this).html();
				jQuery(this).html("");
			}
		
			if (jQuery(this).find(".DisclaimerToggle").length == 0)
			{
				jQuery(this).append("<a class=\"DisclaimerToggle\" href=\"\" title=\"Show disclaimer\">Disclaimer&nbsp;&darr;</a>");
			}
			else
			{
				jQuery("a.DisclaimerToggle").html("Disclaimer&nbsp;&darr;");
			}
		
			jQuery(this).append("<div class=\"DisclaimerContent\">" + content + "</div>");
		}),

		jQuery(".DisclaimerToggle").toggle(function(){
			// Has WordPress wrapped a p around the a?
			if (jQuery(this).parent().is("p"))
			{
				jQuery(this).parent().next(".DisclaimerContent").slideDown("fast");
			}
			else
			{
				jQuery(this).next(".DisclaimerContent").slideDown("fast");
			}
			jQuery(this).html("Disclaimer&nbsp;&uarr;");
			return false;
		},function(){
			if (jQuery(this).parent().is("p"))
			{
				jQuery(this).parent().next(".DisclaimerContent").slideUp("fast");
			}
			else
			{
				jQuery(this).next(".DisclaimerContent").slideUp("fast");
			}
			jQuery(this).html("Disclaimer&nbsp;&darr;");
			return false;
		});
		
		// IE6?  No tabs for you!
		if (!(jQuery.browser.msie && jQuery.browser.version < 7))
		{
			jQuery(".TabContainer").addClass("JQueryTab");
					
			// Make tab box pretty
			jQuery(".TabPages").each(function()
			{
				jQuery(this).prepend(tabBoxText);
			});

			// Hide all but first tab content
			jQuery(".DvdSwitcher").each(function()
			{ 
				jQuery(this).addClass("JQuery").find(".TabPages > .TabPage:gt(0)").hide();
				jQuery(this).find(".Tabs > li").eq(0).addClass("Active");
			});
			
			// Tab switcher - tab pages must have id tab.id + "Page"
			jQuery(".Tabs li").mouseover(function()
			{
				jQuery(".DvdSwitcher.Active .Tabs .Active").removeClass("Active");
				jQuery(this).addClass("Active");
				jQuery(".DvdSwitcher.Active .TabPages > .TabPage").hide();
				jQuery(".DvdSwitcher.Active .TabPages > #" + this.id + "Page").show();
			});
			
			jQuery(".DvdSwitcherButtons").addClass("JQuery");
			
			jQuery(".DvdSwitcherButton").eq(0).addClass("Active").end().slice(1).children("img").hide();
			
			jQuery(".DvdSwitcher").eq(0).addClass("Active").end().slice(1).hide();
			
			jQuery(".DvdSwitcherButton").click(function()
			{
				if (!jQuery(this).hasClass("Active"))
				{
					var id = this.id;
					
					jQuery(".DvdSwitcherButton.Active").removeClass("Active").children("img").fadeOut();
					jQuery(this).addClass("Active").children("img").fadeIn();
					jQuery(".DvdSwitcher.Active").removeClass("Active").fadeOut("fast", function() { jQuery(".DvdSwitcher#" + id + "Content").addClass("Active").fadeIn("fast"); });
				}
			});
		}
		
		/*jQuery("a.Faq").each(function(index)
		{
			this.id = "faq-" + index;
			this.href = "#faq-" + index + "-A";
		}),*/
		
		jQuery(".FaqBox").each(function()
		{
			var faqList = jQuery(this).prepend("<div class=\"FaqListBox\"<div><a class=\"ShowFaqList\" href=\"#\">Show questions list</a></div><ul class=\"FaqList\" style=\"display: none;\"></ul>").find(".FaqList");
			//var newLi;
			//var newA;
			
			jQuery("div.Faq").each(function(index)
			{
				this.id = "faq" + index + "Target";
				//alert("<li><a class=\"Faq\" id=\"faq-" + index + "\" href=\"#faq-" + index + "-A\">" + jQuery(this).children("p.Question:first").text() + "</a></li>");
				faqList.append("<li><a class=\"Faq\" id=\"faq" + index + "\" href=\"#faq" + index + "Target\">" + jQuery(this).children("p.Question:first").text() + "</a></li>");
				/*newLi = document.createElement("li");
				faqList.get(0).appendChild(newLi);
				newA = document.createElement("a");
				newA.id = "faq-" + index;
				newA.href = "#faq-" + index + "-A";
				newLi.appendChild(newA);*/
			});
		}),
		
		jQuery(".ShowFaqList").click(function()
		{
			jQuery(this).hide();
			
			// IE borks the fade.
			if (jQuery.browser.msie && jQuery.browser.version < 8)
			{
				jQuery(".FaqList").show();
			}
			else
			{
				jQuery(".FaqList").fadeIn("slow");
			}

			return false;
		}),
		
		jQuery("a.Faq, a.MovesCat, a.BuyLink").click(function()
		{
			// On the FAQ or buy page?
			//var target = jQuery(this).is("a.Faq") ? "div.Faq#" + this.id + "-target" : "#outside-uk";
			var target = "div." + this.className + "#" + this.id + "Target";
			jQuery("html, body").animate({ scrollTop: jQuery(target).addFade().offset().top - 100 }, 200);
		}),

		jQuery(".Sidebar .SearchInput").each(function()
		{
			var searchTxt = jQuery(this).val();
			
			if (searchTxt == "")
			{
				jQuery(this).val("Search").addClass("Blank");
			}
			else if (searchTxt == "Search")
			{
				jQuery(this).addClass("Blank");
			}
		}),
		
		jQuery(".Sidebar .SearchForm").hover(function()
		{
			if (!jQuery(this).hasClass("Focus"))
			{
				jQuery(this).addClass("Hover");
			}
		},
		function()
		{
			jQuery(this).removeClass("Hover");
		}),
		
		jQuery(".SearchForm").submit(function()
		{
			var searchTxt = jQuery(this).children(".SearchInput, .TextInput").val();
			return !(searchTxt == "Search" || searchTxt == "");
		}),	
		
		jQuery(".Sidebar .SearchInput").focus(function()
		{
			jQuery(this).parent().removeClass("Hover").addClass("Focus");
			
			if (this.value == "Search")
			{
				this.value = "";
			}
			else
			{
				selectAll(this);
			}
			
			jQuery(this).removeClass("Blank");
		}),
		
		jQuery(".TextInput:text").focus(function()
		{
			selectAll(this);
		}),
		
		jQuery(".Sidebar .SearchInput").blur(function()
		{
			jQuery(this).parent().removeClass("Focus");
			
			if (this.value == "" || this.value == "Search")
			{
				this.value = "Search";
				jQuery(this).addClass("Blank");
			}
		}),
		
		jQuery(".BuyForm").submit(function()
		{
			if (jQuery("#chkAccept").get(0).checked)
			{
				return true;
			}
			else
			{
				if (jQuery(".TermsAndConds .TermsError").length == 0)
				{
					jQuery(".TermsAndConds").append("<div class=\"TermsError\" style=\"display: none; \"><p><strong>You missed a bit&hellip;</strong></p><p>Please select the terms and conditions checkbox.  Unfortunately we cannot process your order otherwise.</p></div>");
					jQuery(".TermsAndConds .TermsError").animate({ opacity: "toggle", height: "toggle" }, 500);
					jQuery("#lblAccept").css("color", "#e4292c");
				}
				else
				{
					jQuery(".TermsAndConds .TermsError").animate({left:"+=2px"}, 50);
					jQuery(".TermsAndConds .TermsError").animate({left:"-=4px"}, 70);
					jQuery(".TermsAndConds .TermsError").animate({left:"+=4px"}, 70);
					jQuery(".TermsAndConds .TermsError").animate({left:"-=2px"}, 50);
				}
				return false;
			}
		}),
		
		// Remove "Buy Now" from buttons with background images in Opera, IE
		jQuery(".BuyForm .BuyButton").attr("value", ""),
		
		jQuery.fn.extend({
			addFade : function()
			{
				return this.each(function() { doBGFade(this, [212, 248, 253], [255, 255, 255], "transparent", 50, 10, 2); });
			}
		});
	});
	
	// Fade code from http://www.codylindley.com/blogstuff/js/jquery/
	function easeInOut(minValue,maxValue,totalSteps,actualStep,powr)
	{
		var delta = maxValue - minValue;
		var stepp = minValue+(Math.pow(((1 / totalSteps)*actualStep),powr)*delta);
		return Math.ceil(stepp);
	}

	/*function addFade()
	{
		doBGFade(this,[255,255,100],[255,255,255],'transparent',75,20,4);
	}*/
	
	function doBGFade(elem,startRGB,endRGB,finalColor,steps,intervals,powr) 
	{
		if (elem.bgFadeInt) window.clearInterval(elem.bgFadeInt);
		var actStep = 0;
		elem.bgFadeInt = window.setInterval(
			function() {
				elem.style.backgroundColor = "rgb("+
					easeInOut(startRGB[0],endRGB[0],steps,actStep,powr)+","+
					easeInOut(startRGB[1],endRGB[1],steps,actStep,powr)+","+
					easeInOut(startRGB[2],endRGB[2],steps,actStep,powr)+")";
				actStep++;
				if (actStep > steps) {
				elem.style.backgroundColor = finalColor;
				window.clearInterval(elem.bgFadeInt);
				}
			}
			,intervals)
	}

	
	/*var searchForms = new Array();
	var searchInputs = new Array();

	function searchOnLoad(searchFormNames, searchInputNames)
	{
		var i;
		
		for (i = 0; i < searchFormNames.length; i++)
		{
			searchForms[i] = document.getElementById(searchFormNames[i]);
			searchInputs[i] = document.getElementById(searchInputNames[i]);
			
			// The hover & focus JS below gets terribly confused in IE & Opera if 2 elements have the same name (despite different IDs).
			// WordPress expects an element with name s to contain the search value.  So change it & then back again on search.
			// Yarg.
			/*if (searchInputs[i].id == "sBig" && searchInputs[i].name == "s")
			{
				searchInputs[i].name = "sBig";
			}* /
		}

		for (i = 0; i < searchForms.length; i++)
		{
			if (searchInputs[i] != null && searchForms[i] != null)
			{
				if (searchInputs[i].value != "Search")
				{
					searchInputs[i].className = "SearchInput Focus2";
				}
				
				searchInputs[i].focusState = false;
				searchForms[i].hoverState = false;
			}
		}
	}

	function searchOnFocus(idx)
	{
		searchInputs[idx].focusState = true;
		searchInputs[idx].className = "SearchInput Focus2";
		searchForms[idx].className = "SearchForm Focus";

		if (searchInputs[idx].value == "Search") 
		{
			searchInputs[idx].value = "";
		}
		else
		{
			selectAll(searchInputs[idx]);
		}
	}

	function searchOnBlur(idx)
	{
		if (searchInputs[idx].value == "" || searchInputs[idx].value == "Search")
		{
			searchInputs[idx].value = "Search";
			searchInputs[idx].className = "SearchInput None2";
		}
		
		searchInputs[idx].focusState = false;
		searchForms[idx].className = searchForms[idx].hoverState ? "SearchForm Hover" : "SearchForm None";
	}

	function searchOnMouseOver(idx)
	{
		if (searchForms[idx].className == "SearchForm None")
		{
			searchForms[idx].className = "SearchForm Hover";
		}
		searchForms[idx].hoverState = true;
	}

	function searchOnMouseOut(idx)
	{
		if (!searchInputs[idx].focusState)
		{
			searchForms[idx].className = "SearchForm None";
		}
		searchForms[idx].hoverState = false;
	}

	function searchOnSubmit(idx)
	{
		var searchTxt = searchInputs[idx].value;
		
		if (searchTxt == "Search" || searchTxt == "")
		{
			return false;
		}
		else
		{
			// This isn't hacky!
			/*if (searchInputs[idx].name == "sBig")
			{
				searchInputs[idx].name = "s";
			}* /
			return true;
		}
	}*/
	
	function selectAll(ctl)
	{
		ctl.focus();
		ctl.select();
	}

	// MySpace copy code
	
	function copyToClipboard(copyName) 
	{
		var copyEl = document.getElementById(copyName);
		var copied;
		//var holdText = document.createElement("textarea");
		
		//holdText.innerText = copyText.innerText;
		copied = copyEl.createTextRange();
		copied.execCommand("Copy");
	}

	// Tabs
	/*
	var activeTab;
	var activePage;
	
	function setupTabs(tabName, pageName)
	{
		activeTab = document.getElementById(tabName);
		activePage = document.getElementById(pageName);
	}
	
	function setActiveTab(tabName, pageName)
	{
		var tab = document.getElementById(tabName);
		var page = document.getElementById(pageName);

		activeTab.className = "Tab";
		activePage.className = "TabPage";
		activeTab = tab;
		activePage = page;
		activeTab.className = "TabActive";
		activePage.className = "TabPageActive";
		return true;
	}*/
	
	// Gallery

	var activeImage = null;
	var shownImage;
	var cache = new Image();
	var lDiv;
	var lImage;
	var lAnchor;
	var caption;
	var navLeft = null;
	var navRight;
	var navZoom;
	
	function setupGallery(lDivName, lImageName, lAnchorName, captionName, shownImageName)
	{
		lDiv = document.getElementById(lDivName);
		lImage = document.getElementById(lImageName);
		lAnchor = document.getElementById(lAnchorName);
		caption = document.getElementById(captionName);
		shownImage = document.getElementById(shownImageName);
		shownImage.className = "ActiveImage";
	}

	function growGalleryImage(activeImageName, lUrl)
	{
		shrinkGalleryImage();
		activeImage = document.getElementById(activeImageName);
		activeImage.style.height = "100px";
		cache.src = lUrl;
	}

	function shrinkGalleryImage()
	{
		if (activeImage != null)
		{
			activeImage.style.height = "75px";
		}
	}
	
	function showGalleryImage(shownImageName, lUrl, fullUrl, text)
	{
		shownImage.className = "";
		shownImage = document.getElementById(shownImageName);
		shownImage.className = "ActiveImage";
		lImage.src = lUrl;
		lImage.alt = text;
		lAnchor.href = fullUrl;
		caption.innerHTML = text;
	}
	
	// Buy
	
	function checkTerms()
	{
		if (document.getElementById("chkAccept").checked)
		{
			return true;
		}
		else
		{
			//alert("Yo, click the accept terms checkbox dude!");
			//alert("Fo shizzle ma wizzle.");
			alert("Please select the terms and conditions checkbox.  Unfortunately we cannot process your order otherwise.");
			return false;
		}
	}
//]]>