function hatena_hotentry() {
	var siteurl = 'http://blog.webspace.jp/';
	var id = 'hotEntry';
	jQuery.ajax({
		dataType: "jsonp",
		data: {'sort':'count', 'url':siteurl},
		cache: true,
		url: "http://b.hatena.ne.jp/entrylist/json",
		success: function (data)
		{
			var hotEntry = document.getElementById(id);
			var content = '';
			jQuery.each(data, function(i,item)
				{
					if(item.link != siteurl) {
						content += '<li>';
						content += '<a href="http://b.hatena.ne.jp/entry/' + item.link + '" class="resentHatebu">';
						content += '<img src="http://b.hatena.ne.jp/entry/image/small/' + item.link + '"></a>';
						content += '<a href="' + item.link + '">' + item.title + '</a>';
						content += '</li>';
					}
				}
			);
			hotEntry.innerHTML = '<ul>' + content + '</ul>';
		}
	});
}

try {
	if(window.addEventListener) {
		window.addEventListener("load", hatena_hotentry, false);
	} else {
		window.attachEvent("onload", hatena_hotentry);
	}
} catch(e) { }

