// 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 quote = new Array();
		var randomNumber = Math.floor(Math.random() * (2))
		
		// Quotes
		// Only The first sentence of the quote
		quote[0] = "Tougher Faster Stronger";
		quote[1] = "Integrity Courage Discipline";
			
		/*
		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);
		$(".ticker").fadeOut(500, function() {
									  $(".ticker").replaceWith('<div class="ticker"><p>'+quote[randomNumber]+'</p></div>');
									  $('.ticker').css('display', 'none');
										  $(".ticker").fadeIn(500);
										});
		

		
		//clearInterval(clearIntervalID);
}
$(document).ready(function() {
		$(".ticker").replaceWith('<div class="ticker"><p>Tougher Faster Stronger</p></div>');
		setInterval("randomQuote()", 4500);
		//randomQuote();
		
});