//<script src="http://www.yesodei.org/js/jquery.min.js" type="text/javascript"></script>

var quotes = new Array(
	"Before attending Yesodei HaTorah, I knew that I wanted to acquire a real derech in learning. Still, I can't believe how far I've progressed after one year in the yeshiva. I have a genuine derech halimud, I am excited about learning Torah, and I have rabbeim who will always be there to guide me.'",
	"I continually ensure that my students develop a true sensitivity to every nuance of the text - whether in the Gemara, the Rishonim, or the Acharonim. It's this emphasis on truly grappling with the meanings and implications of each word that sets Yesodei HaTorah apart.",
	"Every day I strive to teach my students so that they grow in their learning abilities beyond anything they ever thought possible - and learn to love it as much as I do.",
	"After completing a full day school education, I knew that I still lacked the ability to open a Gemara and learn it on my own without a translation. Now my chavruta and I just completed Masechet Kiddushin, and we know it inside and out.",
	"Although I love learning Gemara, I wanted my year in Israel to explore a broad range of learning. Yesodei HaTorah offered me the opportunity to learn what I wanted to to learn, in shiurim and even one-on-one with rabbanim. I acquired the knowledge, tools, and desire to integrate Torah into my professional life.",
	"From my studies in university, I learned the value of obtaining a deep and broad education in the classics. I've brought that approach with me when I teach at Yesodei HaTorah.",
	"Coming from a community day school, I recognized that I needed to learn how to learn. I never anticipated, however, how compelling and stimulating the shiurim at Yesodei HaTorah would be. I looked forward to every shiur, and found myself growing intellectually and spiritually. Now I have the background to be a campus leader, both in learning and in the student community.",
	"Yesodei HaTorah's emphasis on textual nuance and deep thinking really prepared me for Columbia. Even more important was the close connection I developed with my rabbeim, which continued and developed during my time in college. It was such an amazing experience that I returned for another year after completing my sophomore year in college.",
	"I loved being part of the chevra at the yeshiva. I enjoyed playing music with my friends, and I worked on the annual Purim video. When the shiurim were over, I always knew that I would have fun hanging out with a great group of guys.",
	"At Yesodei HaTorah, I learned how to learn Gemara, and I also acquired a derech halimud how to learn b'iyun. I have continued to grow since my time in Yeshiva, building upon the derech which I was taught when I was there.",
	"I never dreamed that I would accomplish so much in one year. Between Simchat Torah and the beginning of June, I made thirteen siyumim - by myself and with chavrutot - not including the masechtot we learned in shiur.",
	"At Yesodei HaTorah I not only learned how to learn, but I also found rabbeim who have remained an important part of my life even though I'm no longer in the yeshiva. I go back to visit every chance I get, because Yesodei HaTorah has become my second family."
	);
	
var names = new Array (
	'Adam Friedmann',
	'Rav Yisrael Herczeg',
	'Rav Yaakov Arram',
	'Yedidya Gorsetman',
	'Michael Appelbaum',
	'Rav Ariel Greenberg',
	'Jacob Chatinover',
	'Avishai Gebler',
	'Benjamin Shai',
	'Mordechai Shichtman',
	'Dov Muchnick',
	'Avi Meghnagi'
);

//start with  a random quote and then loop through
var index = Math.floor(Math.random() * quotes.length);

function FadeOutQuote()
{
	$('#tdQuote').fadeTo('slow', 0, SwapQuote); 
}

function SwapQuote()
{
	//the span that holds the quote
	var objSpnQuote = document.getElementById('spnQuote');
	objSpnQuote.innerText = quotes[index];
	
	//the span that holds the name
	var objSpnQuoteName = document.getElementById('spnQuoteName');
	objSpnQuoteName.innerText = '- ' + names[index];

	$('#tdQuote').fadeTo('slow', 1); 

	//next quote
	index++;
	
	//jump back to the beginning if needed
	if (index == quotes.length)
	{
		index = 0;
	}
	
	//reset the timer to run again
	var t = setTimeout("FadeOutQuote()", 15000);
}