jQuery(document).ready(function()
	{
	if (document.body.id == 'home')
		{
		jQuery('#threeCentre').innerfade({
			speed: 1500,
			timeout: 12500,
			type: 'random',
			containerheight: '240px'
			});

		jQuery('#homeSlideShow').innerfade({
			animationtype: 'fade',
			speed: 2250,
			timeout: 14500,
			type: 'random',
			containerheight: '460px'
			});
		}
		
	jQuery("a[rel^='prettyPhoto']").prettyPhoto();
	});
	
jQuery(document).ready(function()
	{
	var els, i, nodes, j, spanEl;
	
	els = document.body.getElementsByTagName('*');
	for (i=0; i<els.length; ++i)
		{
		// Following check avoids infinite loop but perhaps cloning els may be better.
		if (els[i].className != 'superscript-processed-text' && els[i].tagName.toLowerCase() != 'sup')
			{
			nodes = els[i].childNodes;
			for (j=0; j<nodes.length; ++j)
				{
				if (nodes[j].nodeType == 3 && nodes[j].nodeValue.match('®'))
					{
					// Text Node
					spanEl = document.createElement('span');
					spanEl.className = 'superscript-processed-text';
					spanEl.innerHTML = nodes[j].nodeValue.replace(/®/g, '<sup>®</sup>');
					els[i].replaceChild(spanEl, nodes[j]);
					}
				}
			}
		}
	});

