$(document).ready( function() {
		var quotes = [
			[ 'I love you just the way I am.', 'Megan Edge' ],
			[ 'When you start following <em>my</em> way it will lead you to <em>me</em> and <em>you</em> will get lost. The only way to follow is yours.', 'Leo Buscaglia' ],
			[ 'You make the decision, you take the paint brush, you choose the colours, you paint your paradise and then you live in it. Or paint hell if you want to but don&rsquo;t blame me for it...You don&rsquo;t like where you are? Then change it!.', 'Leo Buscaglia' ],
			[ 'Life is like a great river, and it will flow, no matter what you do or don&rsquo;t do...We can decide to flow with the river and live in peace and joy and love or we can decide to battle it and live in agony and despair. But the river doesn&rsquo;t care. Life doesn&rsquo;t care. In either case, all of our streams run into the same sea. It is up to <em>you</em>.', 'Leo Buscaglia' ],
			[ 'You\'ve got to be real. Don\'t be a phony. Come on as yourself. The hardest thing in the world is to be something you\'re not. As you get closer and closer and closer to what you are, be that, and come on all the time that way. You\'ll find it\'s an easier way to live. The easiest thing in the world to be is you', 'Leo Buscaglia' ],
			[ 'A person who never made a mistake never tried anything new.', 'Leo Buscaglia' ],
			[ 'Change and growth take place when a person risked themselves and dares to become involved with experimenting with their own life.', 'Herbert Otto' ],
			[ 'Happiness comes only when we push our brains and hearts to the farthest reaches of which we are capable...The purpose of life is to matter, to count, to stand for something, to have it make some difference that we lived at all.', 'Leo Buscaglia' ],
			[ 'You are all you have. Therefore, make yourself the most beautiful, tender, wonderful, fantastic person in the world. And then you will always survive.', 'Leo Buscaglia' ],
			[ '...if you don\'t like you, you can always learn again to like you. You can create a new you. You can do it. If you don\'t like the set your involved with, strike it and put up a new one. If you don\'t like the cast of characters you\'re involved with, get rid of them and start a new bunch. But you\'ve got to do it. It\'s all yours.', 'Leo Buscaglia' ],
			[ 'Perhaps love is the process of my leading you gently back to yourself.', 'Saint-Exupery' ],
			[ 'Because we are human, we do have magic. Get in touch with it...Don\'t satisfy yourself with anything less then offering the Universe the perfect gift that you are. And have a blast doing it..', 'Leo Buscaglia' ]
		];
		$('#quote-content').loadQuote( quotes, 10000000 ); // ( array, interval )
	});
	// custom jquery plugin loadQuote()
	$.fn.loadQuote = function( quotes, interval ) {
		return this.each( function() {
			var obj = $(this);
			var quote = random_array( quotes );
			var quote_text = quote[[0],[0]] + '<div id="quote-author">&mdash; ' + quote[[0],[1]] + '</div>';

			obj.fadeOut( 'slow', function() {
				$( this ).html( quote_text );
				obj.fadeIn( 'slow' );
			});
			timeOut = setTimeout( function(){ obj.loadQuote( quotes, interval )}, interval );
			// reload random quote (if not animated) -- entirely optional, can be removed, along with the reload link above (<a href="javascript:;" id="quote-reload"><em>randomize</em></a>)
			$("#quote-reload").click( function(){
				if( !obj.is( ":animated" ) ){ clearTimeout( timeOut ); obj.loadQuote( quotes, interval ); }
			});
		});
	}
	//public function
	function random_array( aArray ) {
		var rand = Math.floor( Math.random() * aArray.length + aArray.length );
		var randArray = aArray[ rand - aArray.length ];
		return randArray;
	}
