// JavaScript Document

$(function() {
	html = '<ul class="article-list">';
	$.get("../news/news-articles.xml", {}, function(xml) {
		$('article',xml).each(function(i) {
			title = $(this).find("title").text();
			date = $(this).find("date").text();
			url = $(this).find("url").text();
			
			html += '<li><h2 style="margin-bottom: .1em"><a href="/news.aspx/'+url+'">'+title+'</a></h2>';
			html += '<p class="date">'+date+'</p></li>';
		})
		//alert(html);
		html += '</ul>';
		$("#news-results").append(html);
	})
});