var testimonials = [
	{
	text:"\"<em>The new \'structured scenarios\' capability in EA 8 promises to radically improve the process of use case driven development (especially scenario-based testing) across the industry.</em>\"",
	name:"Doug Rosenberg",
	position:"Chief Executive Officer",
	company:"ICONIX"
	},
	{
	text:"\"<em>Sparx Systems just created another terrific release, especially the use case scenario editor ... the editor allows me to keep track of the various steps, along with the interconnected elements like screens, domain elements, and other requirements ... they delivered another stunning added value.</em>\"",
	name:"Philippe Back",
	position:"President",
	company:"High Octane"
	},
	{
	text:"\"We are thrilled to introduce our clients to this latest version of Sparx Systems’ powerful Enterprise Architect modeling tool, especially considering the many enhancements addressing the needs of the more business oriented User community.\"",
	name:"Frank Truyen",
	position:"President",
	company:"Cephas Consulting"
	},
	{
	text:"\"The continued advances not only in performance and scalability, but also in the quality of the User Interface can only broaden the appeal of Enterprise Architect and help us grow its market share.\"",
	name:"Frank Truyen",
	position:"President",
	company:"Cephas Consulting"
	},
	{
	text:"\"<em>Enterprise Architect 8 from Sparx Systems brings the entire Requirements development and management process together in one place, accessible from anywhere...</em>\"",
	name:"Ramsay Millar",
	position:"Practice Leader",
	company:"integrate IT architects"
	},
	{
	text:"\"<em>With Enterprise Architect 8 we rapidly model and write structured use cases, business rules, quality of service requirements, generate test scripts and trace to database and object-oriented software using agile or more rigorous methods ...</em>\"",
	name:"Ramsay Millar",
	position:"Practice Leader",
	company:"integrate IT architects"
	},
	{
	text:"\"<em>Enterprise Architect is without any doubt the tool of choice for advanced Business Analysts and Project Managers team players who have done their research.</em>\"",
	name:"Ramsay Millar",
	position:"Practice Leader",
	company:"integrate IT architects"
	},
	/*
	{
	text:"\"<em>We have clearly proven a four week project saving on our second Enterprise Architect project to our team of Business Analysts at a Fortune 15 US Health Care Systems client recently...</em>\"",
	name:"Ramsay Millar",
	position:"Practice Leader",
	company:"integrate IT architects"
	},
	*/
	{
	text:"\"<em>Enterprise Architect V8 supercharges the UML modeling environment with a number of productivity enhancing features including structured use cases, the automatic generation of process models, workflow and the list goes on.</em>\"",
	name:"Bryce Day",
	position:"Chief Executive Officer",
	company:"Catch Limited"
	}
];
var counter=0;
shuffle = function(o){ //v1.0
	for(var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
	return o;
};
testimonials = shuffle(testimonials);

$(function() {
	var container = $("DIV#quoteContainer");
	var defaultHTML = $(container).html();
	
	container.getTestimonial = function () {
		if (testimonial=testimonials.pop()) {
			$(this).fadeOut(1400,function() {	
				$(this).html(testimonial.text+'<br />'+testimonial.name+'<br/>'+testimonial.position+', '+testimonial.company);
			});
			$(this).fadeIn(1400);
		} else {
			clearInterval(intervalId);
			return;
		}
	};
	container.getDefault = function() {
		$(this).fadeOut(1400,function() {
			$(this).html(defaultHTML);
		});
		$(this).fadeIn(1400);
	};
	var intervalId = setInterval(function() {
		if (counter%2 == 0) {
			container.getTestimonial();
		} else {
			container.getDefault();
		}
		counter++;
	},12000);
});
