/*
 * Random Quote by Haoshiro
 * 2010-10-13
 * Simple jQuery plugin for random quote display
 * License: Take it, use it, love it.
 */
(function( $ ){
	// dFrame
	$.fn.extend(
	{
		randomQuote: function()
		{
			return this.each( function()
			{
				var i = 1 + (Math.floor(Math.random()*window.quotes.length));
				$( this ).html( window.quotes[i] );
			});
		}
	});
	
	// Auto-start
	$( function()
	{
		$(".randomQuote").randomQuote();
		// dFrame support
		$(".dframe,.dFrame").live("load",function()
		{
			$(".randomQuote").randomQuote();
		});
	});
})( jQuery );
