/**
 * Slideshow script written by David Long for Body Stress Release Henley
 * support/info: david@littledesignplanet.co.uk
 * You may reuse and modify this script but please include a credit in the comments.
 */
// Arrays of text to be rotated
			
			// H1 array
			var bigHeading = new Array();
			bigHeading[0] = "Effective relief from pain and discomfort.";
			bigHeading[1] = "Suitable for all ages, even from newborn.";
			bigHeading[2] = "Stress is released by light directed pressure.";
			
			//H2 overlay array
			var overlayHeading = new Array();
			overlayHeading[0] = "Natural Healing";
			overlayHeading[1] = "Message 2";
			overlayHeading[2] = "Heading 3";
			
			//overlay text array			
			var overlayText = new Array();
			overlayText[0] = "The body has an amazing ability to heal itself. Body Stress Release taps into your body’s natural healing processes, bringing relief from pain, stiffness, numbness or postural distortion caused by stress.";
			overlayText[1] = "This message could say anything but don't make it too long as it needs to be read before the slide changes to the next one. We can of course change slide duration.";
			overlayText[2] = "You can have as many slides as you want but for this example/demonstation I have used three which seems about right.";
			
// When all images have loaded run animation
			window.onload=featured(1);
			
// animation function
			function featured(slide){
			$('#carousel #graphic, h1').animate({opacity: 0}, 1);
			$("#carousel #graphic").css('background-image','url(i/carousel/featbg' + slide + '.jpg)');
			
			$("#carousel #graphic, h1").animate({opacity: 1}, 2000).animate({opacity: 1}, 6000).animate({opacity: 0}, 1000);
			$("#overlay h2").html(overlayHeading[slide-1]);
			$("#overlay p").html(overlayText[slide-1]);
			$("h1").html(bigHeading[slide-1]);
			
			if (slide < 3) {
			    slide++;
			    
			}
			else {
			    slide = 1;
			}
			
			setTimeout("featured(" + slide + ")", 10001);
			}