// 
//  getTestimonial.js
//  Get Bunch
//  
//  Created by Jesse Bunch on 2009-12-28.
//  Copyright 2009 Pixelated Technologies (www.pixelatedtech.com). All rights reserved.
// 

// function to set testimonial rotator

var testimonials = [
					'I still remember buying my first computer, a Leading Edge 8088, in 1986 and installing REA on MS-DOS.  I was absolutely amazed to see the “form” scroll across the screen line by line!  I hooked it up to an IBM daisy wheel printer, calibrated the print head to the three boxes in the upper left corner of the form, and I stepped into the computer age!  Amazing!  This latest REA version is a significant step up and the learning curve gets flatter each year.  Thanks for helping me not to be “road kill” on the information super-highway.  I look forward to another 25 years with WCA, if I live that long.  I appreciate you all and especially your patience!',
					'We just loaded the new software for appraisals and photos. Most of the time, I use the phrase “new and improved” in a very sarcastic way but this time, I really think it is improved. I have not had the chance to work with it much yet, but I like what I see. The Scan, screen capture and toggle between pages without leaving the program should be a real time saver. I know your business is a lot like mine in the fact that you don’t always get the accolades but you sure get the grief. I just wanted to say thanks. This one really seems to be improved dramatically. Please give who ever put this together an “attaboy” from me.',
					'I have used WCA’s RealEasy Appraisals software to produce residential form appraisal reports since 1996 and have been very satisfied with its performance. RealEasy Photos Plus is an especially good tool, because it is so easy to use and works well with all types of photo sources.  This program was the reason I chose WCA many years ago and it continues to be a superior product. In 2007-2008 I went work for a large financial institution and was forced to use another vendor’s software.  This software allowed me to do everything I needed to do, but did not have the shortcuts and features that I came to expect with WCA.  As soon as I left the bank, I returned to WCA software and it was like coming home.',
					'I have been a client of WCA for more than 25 years. Our industry has changed dramatically during that time and WCA has provided the technology to keep up with the changes. I have found Phil and Mark Wilson to be on the cutting edge of software development for real estate appraisers and they listen to the needs of their clients and provide products that meet the needs of today\'s real estate appraisers.<br /<br />I have never had a problem with my soft wear that WCA did not fix. The technical staff is always cordial, knowledgeable and I find them very timely in their response to my service needs.  I have recommended them in the past and will continue to do so.'
					];
					
var testimonialHeaders = [
						'Will Granger. Charlotte, NC',
						'Phil Duncan. Tyrone, GA',
						'Wendell Hahn. Columbia, SC',
						'Torrens Miller. Charlotte, NC'
						];
						
						
						
						
// Get the length of the arrays
var numTestimonials = testimonials.length;
// Start with a random testimonial
var curTestimonial = Math.floor(Math.random()*numTestimonials);

function setNextTestimonial() {
	$('#TestimonialsContentContainer').fadeOut("normal", function() {
			curTestimonial += 1;
	
	if (curTestimonial > numTestimonials) {
		curTestimonial = 1;
	}
	
	var testText = "<p>\""+testimonials[curTestimonial -1 ]+"\"</p><p>-" + testimonialHeaders[curTestimonial -1 ]+ "</p>";
	
	$("#TestimonialsContentContainer").html(testText);
	$("#TestimonialsContentContainer").fadeIn("normal");
	});

	
}

$(document).ready(function() {
	setNextTestimonial();
	setInterval(setNextTestimonial, 15000);
	
	// Begin unobtrusive JS Coding here
	$("#twitterText").tweet({
		username: ['WCAINC'],
        avatar_size: 32,
        count: 1,
        page: 1,
        type: "normal"
    });
});
