var ONEHAT = ONEHAT || {
	browser: {},
	util: {},
	widget: {}
};


ONEHAT.widget.testimonials = (function() {
	var obj = {
		init: function() {
			var oThis = this;
			
			this.container = document.getElementById('testimonials');
			this.testimonials = [
				'&ldquo;I was very satisfied with all aspects... Brian was very accessible and easy to work with. He explained all my options with no pressure. The work was done on time with professionalism and attention to detail. I was also impressed with the cleanup when the job was done.&rdquo;<br />&mdash;R. Onken, Washington, IL',
				'&ldquo;Professional, courteous and cooperative people who did a quality job at a competitive price. They have done three roofs for us and if I need any more done I will definitely contact them.<br />&mdash;Bob Miller, Peoria, IL'
			];
			this.current = -1;
			this.next();
			setInterval(function() {
				oThis.next();
			}, 12000);
		},
		
		next: function() {
			this.current = (this.current >= this.testimonials.length -1) ? 0 : this.current +1;
			this.container.innerHTML = this.testimonials[this.current];
		}
		
	};
	obj.init();
	return obj;
})();



