/*
			 * jQuery shuffle
			 *
			 * Copyright (c) 2008 Ca Phun Ung <caphun at yelotofu dot com>
			 * Dual licensed under the MIT (MIT-LICENSE.txt)
			 * and GPL (GPL-LICENSE.txt) licenses.
			 *
			 * http://yelotofu.com/labs/jquery/snippets/shuffle/
			 *
			 * Shuffles an array or the children of a element container.
			 * This uses the Fisher-Yates shuffle algorithm <http://jsfromhell.com/array/shuffle [v1.0]>
			 */
   
			(function($){
   
				$.fn.shuffle = function() {
					return this.each(function(){
						var items = $(this).children();
						return (items.length) ? $(this).html($.shuffle(items)) : this;
					});
				}
   
				$.shuffle = function(arr) {
					for(var j, x, i = arr.length; i; j = parseInt(Math.random() * i), x = arr[--i], arr[i] = arr[j], arr[j] = x);
					return arr;
				}
   
			})(jQuery);

			var currentQuote = -1;
			var quotes;
			
			function showQuote()
			{
				var oldQuote = currentQuote;
				
				currentQuote++;
				if(currentQuote >= quotes.length)
					currentQuote = 0;
					
				if(oldQuote >= 0)
					quotes.eq(oldQuote).fadeOut(900);
					
				quotes.eq(currentQuote).fadeIn(900);
			}
			
			$(document).ready(function()
			{
				$(".quote_container-nojs").hide();
				$(".quote_listing_container").shuffle();
				quotes = $(".quote_container");
				showQuote();
				window.setInterval("showQuote();", 10000)
			});