/*

This is a very handy function written by Simon Willison:
http://simon.incutio.com/archive/2004/05/26/addLoadEvent

It allows you to queue up a whole series of events to be triggered when the document loads.


/* The following is used to comply with XHTML Strict ruels of now Target attributes for anchor elements */
function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "external")
anchor.target = "_blank";
}
}

/*
-- quoteList Array
 The quoteList array consists of three dimensions: x,  y, and quote.
 x: is the left coordinate used in the style background image setting
 y: is the top coordinate used in the style background image setting
 quote: is the text that populates the blockquote element. This is then subsituted via css for the sprite image of the quote.
*/

var quoteList = new Array();

quoteList[0] = new Array("0", "0", "I am so grateful to you for the work that you did with my team. I can't tell you how many of our associates have approached me to share their overwhelmingly positive thoughts on your course. - Executive Vice President");
quoteList[1] = new Array("0", "-165", "After (my presentation today), one consultant said he thinks that I am among the best presenters he has seen, pointing out techniques I have practiced diligently since my sessions with Amy. - Plant Manager");
quoteList[2] = new Array("0", "-330", "Our training is what it is, in part, because of the excellence of our trainers. I've said it before, but I thank you for always making us look good!  - Director of Professional Development and Education");
quoteList[3] = new Array("0", "-495", "I can tell that you are passionate about your craft and it must be a joy to know that you are doing what you love and living on purpose every day… you've made a difference in someone's life.  - Media Supervisor");
quoteList[4] = new Array("0", "-660", "No foolin' Hohulin rocks it! - Account Executive");
quoteList[5] = new Array("0", "-825", "Amy is by far the best instructor in any classes I have taken.- Senior Art Director");
quoteList[6] = new Array("0", "-990", "Thanks for the excellent workshop … there is a buzz around the office that you have generated by proving that we can all do with retooling and learning.  - Chief Operating Officer");
quoteList[7] = new Array("0", "-1155", "Outstanding! High energy, focused, definitely tailored our discussion to what interested us most. Would love to have another session with her.  - Vice President, Business Development");
quoteList[8] = new Array("0", "-1320", "Amy is fantastic – offers constructive criticism and leaves you feeling great about your progress.  - Account Supervisor");
quoteList[9] = new Array("0", "-1485", "Amy is awesome. Professional and encouraging. She knows her stuff. Kept the pace and energy up consistently throughout the day. A true wealth of knowledge. - Public Relations Manager");
quoteList[10] = new Array("0", "-1650", "Amy was amazing! She is honest, smart, engaging. I hope she comes back to give more workshops on this topic and others! - Participant");
quoteList[11] = new Array("0", "-1815", "Amy was a great teacher and presenter. Very funny. I found myself excited to go back to class. I also found myself watching her skills as she spoke to us and using that as an example. - Designer");
quoteList[12] = new Array("0", "-1980", "Amy was a rock star! Her feedback coupled with solutions was very effective. - Participant");
quoteList[13] = new Array("0", "-2145", "Amy really had such great energy and made this a wonderful experience. I feel much more confident and have a better understanding on how to present and what to work on. - Participant");
quoteList[14] = new Array("0", "-2310", "Amy is amazing. I wish I had her as a constant resource.  - Participant");
quoteList[15] = new Array("0", "-2475", "Amy was fantastic. Her approach to feedback was motivating and not disheartening. She provided good examples of her techniques and created a comfortable environment. - Participant");
quoteList[16] = new Array("0", "-2640", "Amy was excellent!! She made me feel very confident and motivated throughout the whole process. Two thumbs up!! - Participant ");
quoteList[17] = new Array("0", "-2805", "Best instructor ever! Amy is a great teacher, and the participants learn a lot and genuinely enjoy the sessions. - Participant");
quoteList[18] = new Array("0", "-2970", "Awesome with a capital A!!!  - Participant");
quoteList[19] = new Array("0", "-3135", "Dude, my people worship you. Do you want to work here full-time? - Chief Operating Officer");

/*
-- getQuoteList:
Iterates over the array quoteList and writes them as blockquote elements into the page.
*/
function getQuoteList(){
	for (x in quoteList)
	{
		$("#quote_slide").append("<blockquote style='background-position: 0 "+quoteList[x][1]+"px;'>"+quoteList[x][2]+"</blockquote>");
	}
}



function pageLoadFunctions(){			
	externalLinks();
	getQuoteList();
	
	$('#quote_slide').cycle({ 
	    fx:      'scrollUp', 
	    speed:    1000, 
	    timeout:  10000,
	    random:  1,
	    next: '#nextQuote'
	});
}						


