$(function(){
	//現在居るファイル名	   
	var currentFile = location.href.split('/').pop();
	
	//ua取得
	var ua = navigator.userAgent;
	
	//rollover
	$('a img').each(function(){
		var imgSrc = $(this).attr('src');
		//smartRollover
		if(imgSrc.match(/(.*)_off(\..*)/)){
			var repSrc = RegExp.$1+'_on'+RegExp.$2;
			$('<img/>').attr('src',repSrc);
			$(this).hover(function(){
				$(this).attr('src',repSrc);
				$(this).css({opacity: '1',filter: 'alpha(opacity=100)'});
			},function(){
				$(this).attr('src',imgSrc);
			});
		//ロールオーバーが無い場合は、透明度80%
		}else if(!$(this).hasClass('not')){
			$(this).hover(function(){
					$(this).css({
						opacity: '0.8',
						filter: 'alpha(opacity=80)'
					});
			},function(){
					$(this).css({
						opacity: '1',
						filter: 'alpha(opacity=100)'
					});
			}
			
			);
		}
	});
	
});

function initialize() {
	if($('div').is('#feed')){
		var feed = new google.feeds.Feed("http://pipes.yahoo.com/pipes/pipe.run?_id=1e1c7b427e89c2e8217ab496b45703d0&_render=rss");
		feed.setNumEntries(50);
		feed.load(function(result) {
		if (!result.error) {
		var container = document.getElementById("feed");
		for (var i = 0; i < result.feed.entries.length; i++) {
		var entry = result.feed.entries[i];
		var dd = new Date(entry.publishedDate); // now
		var yearNum = dd.getYear();
		if (yearNum < 2000) yearNum += 1900;
		var date = '<ul>' + '<li><span>' + yearNum + "."+(dd.getMonth()+1)+"."+dd.getDate()+ '</span>';
		
		container.innerHTML += "　" + date +"<a target='_blank' href='" + entry.link + "' title='" + entry.title + "'>" + entry.title + "</a></li></ul>";
		}
		}
		});
	}
}

google.setOnLoadCallback(initialize);
