function testimonials(elm) {
	if (!elm) {return;}
	/* Variables */
	this.delay = 5500;
	this.whatPeopleSaid = [
							{who:'Sue Haley',what:'Carol\'s customer service was excellent. The whole process was effortless because Carol made it so easy.'},
							{who:'Ann Schoelles',what:'Carol did an excellent job. When she said she would do something, she did it right away!'},
							{who:'Chad and Amanda U.',what:'Unfortunately we\'ve been through a couple of local realtors and we can honestly say we should\'ve come to Carol Park from the start. Hands down, best realtor in town - Trust us! '},
							{who:'Phil & Colette Urian',what:'Carol finds homes which meet our needs/specifications. She is the most professional person in town.'},
							{who:'Kristi Turner',what:'Carol and her staff did an excellent job keeping us up to date on our activity and feedback. I appreciated Carol\'s aggressive negotiating skills & advice during the whole process.'},
							{who:'Denise Crook',what:'Carol was great! Everything was taken care of for me, with fast & friendly service. Carol was a pleasure to work with, one of the best out there!'},
							{who:'Justin & Jennifer Stuart',what:'We thank Carol for such a great experience. Even after close, she still answers questions for us and makes sure we are organized & settled in our new home.'},
							{who:'Joe Marra',what:'Carol was great! She did everything we needed/wanted. I am appreciative of how effectively/efficiently Carol helped us complete the task of selling our home..'},
							{who:'Tim Adams',what:'Carol is extremely competent, punctual, and is always prepared.'},
							{who:'Paul Baker',what:'Carol\'s expertise & marketing professionalism is spectacular! She made everything bearable.'}
						  ];
	this.currentTestimonial = -1;
	/* Functions */
	this.format = function(record) {
		var a = ['<table border="0" cellspacing="0" cellpadding="0" width="97%" align="center">',
				 '	<tr>',
				 '		<td>',
				 '			<div style="text-align:justify;color:#23365D;font-size:11px;">'+record.what+'</div>',
				 '		</td>',
				 '	</tr>',
				 '</table><div style="position:absolute;width:190px;height:15px;text-align:right;right:20px;bottom:10px;color:#23365d;font-size:11px;font-weight:bold;">'+record.who+'</div>'];
		return a.join('');
	}
	this.play = function() { // Loads the next testimonial and sets the timeout
		if (this.currentTestimonial == -1) {
			var fadeDelay = 0;
			var appearDelay = 0;
			this.currentTestimonial = 0;
			this.elmContainer.innerHTML = this.format(this.whatPeopleSaid[this.currentTestimonial]);
			new Effect.Appear(this.elmContainer,{duration:0.5});
		} else {
			var fadeDelay = 0.5;
			var appearDelay = 0.5;
			if (this.currentTestimonial == this.whatPeopleSaid.length-1) {
				this.currentTestimonial = 0;
			} else {
				this.currentTestimonial++;
			}
			new Effect.Opacity(this.elmContainer,{duration:fadeDelay,from:1.0,to:0.01});
			setTimeout(function() {
				this.elmContainer.innerHTML = this.format(this.whatPeopleSaid[this.currentTestimonial]);
				new Effect.Opacity(this.elmContainer,{duration:appearDelay,from:0.01,to:1.0});
			}.bind(this),(fadeDelay*1000));
		}
		setTimeout(this.play,this.delay+((fadeDelay+appearDelay)*1000));
	}.bind(this);
	// Create the div element that will do the fading
	var newDiv = $(document.createElement('div'));
	newDiv.setAttribute('id','_testimonials_container');
	newDiv.setStyle({display:'none',padding:'5px 10px 8px 6px'});
	elm.appendChild(newDiv);
	this.elmContainer = $('_testimonials_container');
	// Initializes the play function timeout
	setTimeout(this.play,500);
}
// Onload events for the page
Event.observe(window,'load',function() {
	if ($('_testimonials')) {
		siteTestimonials = new testimonials($('_testimonials'));
	}
});
