// JavaScript Document
$(document).ready(function(){

// var url='testimonials.json';
// 	$.getJSON(url, function(testimonials) {
// 		$.each(testimonials.testimonials,function(i,testimonial){
// 		$('<div class="testimonial"></div>').fadeIn()
// 		.append('<p>'+testimonial.quote+'</p>'+
// 		'<p class="quoted">&mdash; '+testimonial.person+'</p>')
// 		.appendTo('#testimonials');
// 		});
// 	});
// });

$.ajax({
type: "GET",
url: "testimonials.xml",		
dataType: "xml",		
success: function(xml) {			
$(xml).find('testimonial').each(function(){				
var quote = $(this).find('quote').text();				
var person = $(this).find('person').text();				

$('<div class="testimonial"></div>')
.append('<p>'+quote+'</p>')				
.append('<p class="quoted">&mdash; '+person+'</p>')				
.appendTo('#testimonials')				
.fadeIn('slow');		
});		

$('#testimonials').cycle({fx:'fade', speed:'800', timeout:9000, sync:0, random:1, slideExpr: 'div.testimonial', cleartypeNoBg:true});
}	
});
});

