
$(document).ready(function(){

	/* create a section in the document for the testimonials list */
	$("#content").append('<div id="caregiver-testimonials" class="section"><h2>What Caregivers Are Saying</h2><dl></dl></div>');
	
	
	/* Grab RSS testimonials and add them to the definition list. */
	$.get("/common/caregiver-testimonials.xml", function(xml){

		/* append the items */
		$("item", xml).each(function(i){
			var item = "<blockquote>" +
						"<p>" + $("description", this).text() + "</p>" +
						"<p><cite>" + $("title", this).text() + "</cite></p>" +
						"</blockquote>";
						
			/* random chance of appending */
			if(Math.random() > .5)
				$("#caregiver-testimonials").append(item);
		});
	});

});