// Random Quote Generator.
// These quotes need to be written in their own section on this file.
// Only 1 Sentence allowed per quote, unless said sentence is too short.
// This will pick a number at random at display. Some MAY Repeat.
// Variables to clear the Interval
	var clearIntervalID = 0;
	
// Function
function randomQuote() {
	//Random Quote Generator.
		//Variables
		var image = new Array(); 
		var quote = new Array();
		var author = new Array();
		var authorTitle = new Array();
		var linkPage = new Array();
		var randomNumber = Math.floor(Math.random() * (17))
		
		// Quotes
		// Only The first sentence of the quote
		quote[0] = "Since 2004, Mahmoud Khalifah Ali has managed the Doping Control Department at the Olympic Council of Asia (OCA).";
		quote[1] = "Thierry Boghosian is a member of WADA&rsquo;s Science Department where his main responsibilities include the accreditation programs and assessments of the accredited laboratories, as well as compliance issues related to the International Standard for Laboratories.";
		quote[2] = "Meike Evers is a former Olympic rower having attended the 1996, 2000 and 2004 Olympic Games.";
		quote[3] = "Rob Koehler has been an integral member of WADA&rsquo;s staff since 2002, first serving as Deputy Director of Standards and Harmonization.";
		quote[4] = "Tom May is a member of WADA&rsquo;s Education and Program Development Department where his main responsibility is the development of Regional Anti-Doping Organizations throughout the world.";
		quote[5] = "Nicole Sapstead became Director of Operations of UK Anti-Doping in December 2009, with a team covering testing, intelligence, and science and medicine.";
		quote[6] = "Natalie Grenier is currently responsible for the implementation of WADA&rsquo;s out-of-competition testing program for 14 International Federations and is involved with monitoring compliance with the World Anti-Doping Code.";
		quote[7] = "In addition to serving as chairman of the Caribbean Regional Anti-Doping Organization, Dr Adrian Lorde is a Family Physician and Associate Lecturer in Family Medicine at the University of the West Indies.";
		quote[8] = "Kate Mittelstadt serves as the Director of Doping Control for the Association of National Anti-Doping Organizations (ANADO).";
		quote[9] = "Marija Andjelkovic is employed by Serbia&rsquo;s Anti-Doping Agency (ADAS) where she works as the Athlete Whereabouts and Therapeutic Use Exemption Coordinator and as a doping control officer.";
		quote[10] = "Dr Federica Fagnani is a Ph.D. in Biomedical Aspects of Adapted Physical Activities and holds a master&rsquo;s degree in Sport and Exercise Science.";
		quote[11] = "After graduating from Liverpool John Moores University with a B.Sc. (Hons) in Exercise, Sport and Health Sciences, Jude Ford spent three years working for British Triathlon as the South East Regional Development Manager.";
		quote[12] = "Erin Hannan joined the United States Anti-Doping Agency (USADA) in June 2008 to oversee the Agency&rsquo;s communications and outreach education initiatives.";
		quote[13] = "David Julien joined WADA in 2007, where he serves as Education Manager in the Education and Program Development Department.";
		quote[14] = "Snejezana Karlo graduated from the University of Zagreb&rsquo;s department of economics & business in 1995 with a degree in marketing.";
		quote[15] = "Jen Sclater is a member of WADA&rsquo;s Education and Program Development Department where her primary responsibility includes the management and development of WADA&rsquo;s youth education programs.";
		quote[16] = "Susanna Sokka works for the Finnish Anti-Doping Agency (FINADA) overseeing their Clean Win Program, which honours clean athletes and the values of fair play. The Program also includes active outreach work.";
		
		// Images of Quotes. 
		// The Number inside the quote Array corresponds to the image of that person
		image[0] = "PageFiles/105/ali.png";
		image[1] = "PageFiles/105/boghosian.png";
		image[2] = "PageFiles/105/evers.png";
		image[3] = "PageFiles/105/koehler.png";
		image[4] = "PageFiles/105/may.png";
		image[5] = "PageFiles/105/sapstead.png";
		image[6] = "PageFiles/105/grenier.png";
		image[7] = "PageFiles/105/lorde.png";
		image[8] = "PageFiles/105/Mittelstadt.png";
		image[9] = "PageFiles/107/andjelkovic.png";
		image[10] = "PageFiles/107/fagnani.png";
		image[11] = "PageFiles/107/ford.png";
		image[12] = "PageFiles/107/hannan.png";
		image[13] = "PageFiles/107/julien.png";
		image[14] = "PageFiles/107/snejezana.png";
		image[15] = "PageFiles/107/sclater.png";
		image[16] = "PageFiles/107/sokka.png";
		
		// Quote Authors Name
		// ONLY The Name
		// The Number inside the Quote Array corresponds to the author's name
		// Independent Observers
		author[0] = "Mahmoud Khalifah ALI";
		author[1] = "Thierry BOGHOSIAN";
		author[2] = "Meike EVERS";
		author[3] = "Rob KOEHLER";
		author[4] = "Tom MAY";
		author[5] = "Nicole SAPSTEAD";
		author[6] = "Natalie GRENIER";
		author[7] = "Adrian LORDE";
		author[8] = "Kate MITTELSTADT";
		//Athletic Outreach
		author[9] = "Marija ANDJELKOVIC";
		author[10] = "Federica FAGNANI";
		author[11] = "Jude FORD";
		author[12] = "Erin HANNAN";
		author[13] = "David JULIEN";
		author[14] = "Snejezana KARLO";
		author[15] = "Jen SCLATER";
		author[16] = "Susanna SOKKA";
		
		//Author's Title
		// ONLY The Title of the person
		// The Number inside the Quote Array corresponds to the author's title.
		authorTitle[0]= "Manager, Doping Control Department, Kuwait";
		authorTitle[1]= "Manager, Science, USA";
		authorTitle[2]= "Olympic Champion, Rowing, Germany";
		authorTitle[3]= "Director, Education and Program Development, Canada";
		authorTitle[4]= "Senior Manager, Program Development, Canada";
		authorTitle[5]= "Director of Operations, UK";
		authorTitle[6]= "Coordinator, Testing, Canada";
		authorTitle[7]= "Chairman, Barbados";
		authorTitle[8]= "Director of Doping Control, USA";
		authorTitle[9]= "Whereabouts and TUE Coordinator, Serbia";
		authorTitle[10]= "Head of Communication and Public Affairs, Italy";
		authorTitle[11]= "Education Project Officer, UK";
		authorTitle[12]= "Director, Communications and Outreach, USA";
		authorTitle[13]= "Manager, Education, Canada";
		authorTitle[14]= "Head of International Department, Croatia";
		authorTitle[15]= "Manager, Education, Canada";
		authorTitle[16]= "Information Manager, Doping Control Officer, Finland";
		
		//Link to Specific Testimony Pages
		// The Number inside the Quote Array corresponds to the link for the testimony page.
		linkPage[0] = "Vancouver-2010/Independent-Observer-Program/";
		linkPage[1] = "Vancouver-2010/Independent-Observer-Program/";
		linkPage[2] = "Vancouver-2010/Independent-Observer-Program/";
		linkPage[3] = "Vancouver-2010/Independent-Observer-Program/";
		linkPage[4] = "Vancouver-2010/Independent-Observer-Program/";
		linkPage[5] = "Vancouver-2010/Independent-Observer-Program/";
		linkPage[6] = "Vancouver-2010/Independent-Observer-Program/";
		linkPage[7] = "Vancouver-2010/Independent-Observer-Program/";
		linkPage[8] = "Vancouver-2010/Independent-Observer-Program/";
		linkPage[9] = "Vancover-2010/Athlete-Outreach-Program/";
		linkPage[10] = "Vancover-2010/Athlete-Outreach-Program/";
		linkPage[11] = "Vancover-2010/Athlete-Outreach-Program/";
		linkPage[12] = "Vancover-2010/Athlete-Outreach-Program/";
		linkPage[13] = "Vancover-2010/Athlete-Outreach-Program/";
		linkPage[14] = "Vancover-2010/Athlete-Outreach-Program/";
		linkPage[15] = "Vancover-2010/Athlete-Outreach-Program/";
		linkPage[16] = "Vancover-2010/Athlete-Outreach-Program/";
			
		/*
		image[0] = "images/john.png";
		quote[0] = "&ldquo;Safeguarding clean sport is one way of working towards safeguarding the moral fabric and wellbeing of society at large.&rdquo;";
		author[0] = "The Hon. John Fahey, A.C.";
		authorTitle[0] = "WADA President";
		linkPage[0] = "editorial/jtb.html";
		
		image[1] = "images/testimonials/random/cb.png";
		quote[1] = "&ldquo;Everybody should have the opportunity to play true, and I believe that everybody can play true[...]&rdquo;";
		author[1] = "Claudia Bokel";
		authorTitle[1] = "Olympic Medalist and World Champion in Fencing, Germany";
		linkPage[1] = "testimonials.html";
		console.log(quote[0].length);*/
		
		//console.log(quote.length);
		//console.log(randomNumber);

		$(".testimonialList").replaceWith('<div class="testimonialList"><div class="testimonyImage"><a href="' + linkPage[randomNumber] + '"><img src="../../../' + image[randomNumber] + '" width="98" border="0" style="border: 0" /></a></div><p class="name">' + author[randomNumber] + '</p><p class="title">' + authorTitle[randomNumber] + '</p><p>' + quote[randomNumber] + '[...]</p></div>');
		clearInterval(clearIntervalID);
}
$(document).ready(function() {
		setInterval("randomQuote()", 10000);
});