$(function(){
	$.ajax({
		url: "/news/index.xml" ,
		async:	true ,
		cache:	false ,
		dataType:	"xml" ,
		timeout:	10000000,
		success:	function(xml){
			$(xml).find('item').each(function(i){
			if(i > 10){
				return false;
			}
			var title=$(this).find('title').text();
			var link=$(this).find('link').text();
			var day=dateparse($(this).find('pubDate').text());
			var category=$(this).find('category').text(); 
			 $('.news').append('<li><span>' + day + '&nbsp;：&nbsp;</span><a href="'+ link +'">'+ title +'</a></li>');
				});
		}
	});
});
function dateparse(str){
	var objDate = new Date(str);
	str= objDate.toLocaleDateString();
	 var year = objDate.getFullYear();
    var month = objDate.getMonth() + 1;
    var date = objDate.getDate();
    if ( month < 10 ) { month = "0" + month; }
    if ( date < 10 ) { date = "0" + date; }
    str = year + '/' + month + '/' + date;
    rtnValue =  str;
    return rtnValue;
}