// The Quotator
// http://thejavascriptblog.com/the-quotator-the-json-driven-html-rotator/
// Slightly modified by CRH 12-2011
(function(c){c.fn.quotator=function(d){var e=this,d=c.extend({speed:5E3,json:"quotes.json"},d);c.getJSON(d.json,function(c){var a=eval(c.quotes),b=Math.floor(Math.random()*a.length);setInterval(function(){e.fadeOut(function(){e.html('<div class="row"> <div class="ten columns offset-by-one"> <h1> <blockquote><span id="quote">'+a[b].quote+"</span></blockquote> </h1> <h4> <cite>\u2014 "+a[b].author+"</cite> </h4> </div> </div>").fadeIn()});b==a.length-1?b=Math.floor(Math.random()*a.length):b++},d.speed);
e.html('<div class="row"> <div class="ten columns offset-by-one"> <h1> <blockquote><span id="quote">'+a[b].quote+"</span></blockquote> </h1> <h4> <cite>\u2014 "+a[b].author+"</cite> </h4> </div> </div>")});return e}})(jQuery);
