	/* Type the number of seconds you want the images to rotate */
	var imagerotatespeed = 30;
	
	/* Type the number of seconds you want the testimonials to rotate */
	var quoterotatespeed = 7;
	
	var myquotes = new Array()
	/* Change the text in between the "" marks. 
	 * Do not use "" marks within the text anywhere else though.
	 * If you need to use a ", instead use two ' (apostrophe) marks instead.
	 * To add or remove a quote, copy or delete a line just make sure the the numbers
	 * inside the myquotes[] brackets start at 0 and have no gaps between
	 * numbers (ie. good = 0,1,2,3  bad = 0,2,3,4)
	 *
	 * Do not use any carriage returns within the quote. Leave everything on one line.
	 */
		myquotes[0] = "I don't buy made in USA because somebody said I am supposed to. I do because I nearly always get my money's worth.!";
		myquotes[1] = "Use discount coupon code 'USA' and get $4.00 off your purchase!";
                myquotes[2] = "I feel like I found a hidden gem or something. I found your website by accident and gave it a try. It was the best coffee I have ever had! I'll never buy the imported coffee again.";
		myquotes[3] = "That is why I am requesting permission to copy your privacy statement. Because it is one of the most honoring to customers I have ever read.";
		myquotes[4] = "We were in Hawaii on vacation last winter. The coffee fields there were beautiful. It is the kind of agriculture I certainly want to support.";
		myquotes[5] = "I hate it when they jack up the shipping. It feels like a bait-and-switch scam. Shipping should mean shipping! I am glad to see at least one honest website out there.";
		myquotes[6] = "I will be doing business with you guys. I read your article about who gets how much. I like to see the farmers get their fair share. Just thought I would let you know.";
		myquotes[7] = "Two of my neighbors work for Authorize.net. They were telling me about how it works. Now I look for websites like yours that use it.";
		myquotes[8] = "My husband calls me a gourmet coffee snob, so maybe I am a little bit. I do like good coffee and yours is my favorite. That is why you see me re-ordering.";
		myquotes[9] = "Yours is the only coffee I can drink with a clear conscience.";
		myquotes[10] = "It's been a long time since I've had some fresh Kona coffee - you shipped it out to the East Coast faster than I was expecting.  The dark roast is great! Wonderful bouquet that sits just right on my palette. Looking forward to my next order.";
		myquotes[11] = "Just made my first pot and now I am sitting here thinking is this a great country or what? We can even beat them in growing coffee!";
		myquotes[12] = "I feel good about doing my little part to keep jobs and stuff from leaving the country and I don't doubt that our coffee is better.";
		myquotes[13] = "I love what you wrote about fair wages. That is something important to me. I don't want to be a part of any kind of worker rip-off.";
		myquotes[14] = "I did a farm tour when I was there. I was impressed with the whole operation. The supply I brought back ran out so I am ordering more.";
		myquotes[15] = "I have always liked the principles of fair trade products, but the money still goes overseas somewhere. Your coffee is above and beyond fair trade plus my money stays in the USA. I like that.";


function theRotator() {
	/*Set the opacity of all images to 0*/
	$('div#rotator ul li').css({opacity: 0.0});
	
	/*Get the first image and display it (gets set to full opacity)*/
	$('div#rotator ul li:first').css({opacity: 1.0});
		
	/*Call the rotator function to run the slideshow, 6000 = change to next image after X number of seconds */
	setInterval('rotate()',(imagerotatespeed * 1000));
	
}

function rotate() {	
	/*Get the first image*/
	var current = ($('div#rotator ul li.show')?  $('div#rotator ul li.show') : $('div#rotator ul li:first'));

	/*Get next image, when it reaches the end, rotate it back to the first image*/
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div#rotator ul li:first') :current.next()) : $('div#rotator ul li:first'));	
	
	/*Set the fade in effect for the next image, the show class has higher z-index*/
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	/*Hide the current image*/
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};

$(document).ready(function() {		
	/*Load the slideshow*/
	theRotator();
});

function rotatequote() {
	/* if you want to show them in order*/

	thequote = myquotes.shift();
	myquotes.push(thequote); 
	document.getElementById('quotetext').innerHTML = thequote;
		
	/* if you want them to rotate randomly 	var which = Math.round(Math.random()*(myquotes.length - 1));
	document.getElementById('quotetext').innerHTML = myquotes[which];*/

	
	/* This rotates the quote every x seconds */
	t=setTimeout("rotatequote()",(quoterotatespeed*1000));
}
