/*
========================================
======= RANDOM TESTIMONIAL ENGINE ======
========================================
*/
// colating information into arrays
var clientQuote = ["HypnoBirthing® has been featured on 'Richard & Judy' (Channel 4), and within Pregnancy & Birth, Practical Parenting, Prima Baby, Mother & Baby, Image, Closer, Daily Express, The Times and more...",
									 "HypnoBirthing® gave me the most priceless gift, a fearless birth.",
									 "HypnoBirthing® is not only invaluable in increasing the likelihood of having a natural birth, but also supporting women through antenatal discomfort and when births do not go according to plan.", "I had gone through my labour without any form of pain relief. Exactly how I wanted things to go. HypnoBirthing® really did work for us!", "I would have to say that HypnoBirthing® is the most amazing phenomenon to observe in action. Women seem to sail through the birthing of their babies, working as a team with their birth partner who is the essential anchor for her.", "Using the breathing and relaxation techniques we were taught, I was able to get through twelve hours of contractions with absolutely no pain at all. All I could feel was pressure."]
var clientName = ["<!-- No Name -->",
									"<!-- No Name -->",
									"<!-- No Name -->", "<!-- No Name -->", "<!-- No Name -->", "<!-- No Name -->",];
var links = ["testimonials.html",
						 "testimonials.html", "testimonials.html", "testimonials.html", "testimonials.html",
						 "testimonials.html"];

// select a testimonial
var r = Math.round(Math.random()*(clientQuote.length-1));

// write the variables into HTML format
var cq = '"'+clientQuote[r]+'"';
var cqc = '<br /><span class="client">'+clientName[r]+'</span>';
var theLink = links[r];
if (r == 0) pt = "";
else pt = '<span class="testimonials">Testimonials:</span><br />';

// target the html and get the shiz in there when everything's loaded
var loadTestimonial = function() {
	document.getElementById("theQuote").innerHTML = pt+'<a href="testimonials.html">'+cq+cqc+'</a>';
}
