$(function() {
	$("#newsRelease .topicsBlock").each(function(){
		var rssUrl = $(this).children(".rss").children("a").attr('href');
		var output = $(this).children("dl");
		getRss(rssUrl, output);
	});

	function getRss (rssUrl, output)
	{
		$.ajax({
			url: rssUrl,
			async: true,
			cache: false,
			dataType: "xml",
			success: function(xml){
				$(xml).find('item').each(function(i){
					if (i == 3) {
						return false;
					}
					var title = $(this).find('title').text();
					var url = $(this).find('link').text();
					var date = new Date($(this).find('pubDate').text());
					date = DateFormatter.format(date, "Y年n月j日");
					output.append('<dt>' + date + '<\/dt><dd>' + (url ? '<a href="' + url + '">' : '') + title + (url ? '<\/a>' : '') + '<\/dd>\n');
				 });
			},
			error: function(xml){
			}
		});
	}
});


