﻿jQuery(function() {
	jQuery.getFeed({
		url: 'proxy.php?url=http://feedblog.ameba.jp/rss/ameblo/olivean/rss20.xml',
		success: function(feed) {
			var html = '';
			var item = feed.items[0];
			html += '<p>' + changeDate(item.updated) + '更新</p>';
			html += '<p>' + '<a href="' + feed.link + '" target="_blank" title="' + feed.title + ' [外部Link]">『' + item.title + '』</a>' + '</p>';
			jQuery('#blog1').append(html);
		}
	});
	jQuery.getFeed({
		url: 'proxy.php?url=http://feedblog.ameba.jp/rss/ameblo/olivean-photoclub/rss20.xml',
		success: function(feed) {
			var html = '';
			var item = feed.items[0];
			html += '<p>' + changeDate(item.updated) + '更新</p>';
			html += '<p>' + '<a href="' + feed.link + '" target="_blank" title="' + feed.title + ' [外部Link]">『' + item.title + '』</a>' + '</p>';
			jQuery('#blog2').append(html);
		}
	});
	jQuery.getFeed({
		url: 'proxy.php?url=http://feedblog.ameba.jp/rss/ameblo/olivean-tanbo/rss20.xml',
		success: function(feed) {
			var html = '';
			var item = feed.items[0];
			html += '<p>' + changeDate(item.updated) + '更新</p>';
			html += '<p>' + '<a href="' + feed.link + '" target="_blank" title="' + feed.title + ' [外部Link]">『' + item.title + '』</a>' + '</p>';
			jQuery('#blog3').append(html);
		}
	});
	jQuery.getFeed({
		url: 'proxy.php?url=http://feedblog.ameba.jp/rss/ameblo/olivean-mitsubachi/rss20.xml',
		success: function(feed) {
			var html = '';
			var item = feed.items[0];
			html += '<p>' + changeDate(item.updated) + '更新</p>';
			html += '<p>' + '<a href="' + feed.link + '" target="_blank" title="' + feed.title + ' [外部Link]">『' + item.title + '』</a>' + '</p>';
			jQuery('#blog4').append(html);
		}
	});
	jQuery.getFeed({
		url: 'proxy.php?url=http://feedblog.ameba.jp/rss/ameblo/olivean-wedding/rss20.xml',
		success: function(feed) {
			var html = '';
			var item = feed.items[0];
			html += '<p>' + changeDate(item.updated) + '更新</p>';
			html += '<p>' + '<a href="' + feed.link + '" target="_blank" title="' + feed.title + ' [外部Link]">『' + item.title + '』</a>' + '</p>';
			jQuery('#blog5').append(html);
		}
	});
	jQuery.getFeed({
		url: 'proxy.php?url=http://feedblog.ameba.jp/rss/ameblo/olivian-nail/rss20.xml',
		success: function(feed) {
			var html = '';
			var item = feed.items[0];
			html += '<p>' + changeDate(item.updated) + '更新</p>';
			html += '<p>' + '<a href="' + feed.link + '" target="_blank" title="' + feed.title + ' [外部Link]">『' + item.title + '』</a>' + '</p>';
			jQuery('#blog7').append(html);
		}
	});
	jQuery.getFeed({
		url: 'proxy.php?url=http://feedblog.ameba.jp/rss/ameblo/oliveanwedding/rss20.xml',
		success: function(feed) {
			var html = '';
			var item = feed.items[0];
			html += '<p>' + changeDate(item.updated) + '更新</p>';
			html += '<p>' + '<a href="' + feed.link + '" target="_blank" title="' + feed.title + ' [外部Link]">『' + item.title + '』</a>' + '</p>';
			jQuery('#blog8').append(html);
		}
	});
});

//日付表記を変換
function changeDate(str){
	var myDate=new Date(str);
	var YYYY=myDate.getFullYear();
	var MM=myDate.getMonth()+1;
	if(MM<10){MM="0"+MM;}
	var DD=myDate.getDate();
	if(DD<10){DD="0"+DD;}
	var date=YYYY+"年"+MM+"月"+DD+"日";
	return date;
}
