function init() {
	//initBlogLink();
	initInnovation();
	hideCommentary();
}

// ブログへのリンク
function initBlogLink() {
	var link = $("sub_blog").firstChild;
	link.onmouseover = function () {
		this.firstChild.style.display = "none";
	};
	link.onmouseout = function () {
		this.firstChild.style.display = "block";
	}
}

// 6つのイノベーションの発生分野と方向性
function initInnovation() {
	$("item1").onmouseover = function () { showCommentary("ex1","-250"); };
	$("item1").onmouseout = function () { hideCommentary(); };
	$("item1").onfocus = function () { showCommentary("ex1","-250"); };
	$("item1").onblur = function () { hideCommentary(); };
	$("item2").onmouseover = function () { showCommentary("ex2","-500"); };
	$("item2").onmouseout = function () { hideCommentary(); };
	$("item2").onfocus = function () { showCommentary("ex2","-500"); };
	$("item2").onblur = function () { hideCommentary(); };
	$("item3").onmouseover = function () { showCommentary("ex3","-750"); };
	$("item3").onmouseout = function () { hideCommentary(); };
	$("item3").onfocus = function () { showCommentary("ex3","-750"); };
	$("item3").onblur = function () { hideCommentary(); };
	$("item4").onmouseover = function () { showCommentary("ex4","-1000"); };
	$("item4").onmouseout = function () { hideCommentary(); };
	$("item4").onfocus = function () { showCommentary("ex4","-1000"); };
	$("item4").onblur = function () { hideCommentary(); };
	$("item5").onmouseover = function () { showCommentary("ex5","-1250"); };
	$("item5").onmouseout = function () { hideCommentary(); };
	$("item5").onfocus = function () { showCommentary("ex5","-1250"); };
	$("item5").onblur = function () { hideCommentary(); };
	$("item6").onmouseover = function () { showCommentary("ex6","-1500"); };
	$("item6").onmouseout = function () { hideCommentary(); };
	$("item6").onfocus = function () { showCommentary("ex6","-1500"); };
	$("item6").onblur = function () { hideCommentary(); };
}

function showCommentary(id,posY) {
	$("innovation").style.backgroundPosition = "0 " + posY + "px";
	$(id).style.display = "block";
	$(id).style.position = "absolute";
	$(id).style.top = "49px";
}

function hideCommentary() {
	$("innovation").style.backgroundPosition = "0 0";
	for (i=1; i<=6; i++) {
		var trg = "ex"+i;
		$(trg).style.display = "none";
		$(trg).style.visiblity = "hidden";
	}
}

function $(id) {
	return document.getElementById(id);
}

(function () {
	var path_trigger = '/focus/';
	var href = location.href;
	var hostname = location.hostname;
	var path = href.substr(href.indexOf(hostname) + hostname.length);
	if (path == path_trigger) {
		window.onload = init;
	}
})();
