$(function() { 
	$('<div id="hidden-quotes"></div>').insertAfter("div.wrapper").hide();

	var quotes = [];
	quotes[0] = '&ldquo;Zoe told us that she wanted a play-date with another girl her age who had a daddy with cancer. No organisation existed. It took us several months until we found an appropriate play-date.&rdquo;<span class="quote-ref">Pamela Becker</span>';
	quotes[1] = '&ldquo;Most of these children are the only ones amongst the children they know that have had cancer in their family. That&lsquo;s not the way they want to be special.&rdquo;<span class="quote-ref">Pamela Becker</span>';
	quotes[2] = '&ldquo;We want to show the kids that there are other kids like them that also have a sick mum or brother and its okay to have fun and be happy anyway.&rdquo;<span class="quote-ref">Pamela Becker</span>';
	quotes[3] = '&ldquo;We don’t know how big this project is going to be but we just want to make sure that people who need it know about it, and those who are drawn to it, are able to support us.&rdquo;<span class="quote-ref">Naomi Coleman</span>';
	quotes[4] = '&ldquo;What is so wonderful for us is that Jeremy was part of this – it was his dream too. He saw how tough it was for the children and it hurt him to see his family suffer.&rdquo;<span class="quote-ref">Naomi Coleman</span>';	
	quotes[5] = '&ldquo;Something positive is following a sad and tragic experience and if we can help other families who are experiencing the trauma of living with cancer, then it will be worthwhile.&rdquo;<span class="quote-ref">Juliette Coleman</span>';

	$.each(quotes, function(i, quote) {
		$("#hidden-quotes").append('<span class="hidden-quote' + (i+1) + '">' + quote + '</span>');	
	});
	
	if($("#hidden-quotes").length) {
		$("#quote p").everyTime(8000, function() {
			// make sure we don't pick the same quote as currently showing
			currentQuoteId = $(this).children(":first").attr("class");
			currentQuoteId = currentQuoteId.substring(12);
			
			do {
				var randomquote = (Math.floor(Math.random()*quotes.length))+1;						
			}
			while(randomquote == currentQuoteId);
			var quote = $(".hidden-quote" + randomquote).clone();
			$(this).fadeOut(800, function() {
				$(this).html(quote);
				$(this).fadeIn(800);
			});
		}, 10);
	}	
});
                                                              