document.write ("<script type='text/javascript' src='/common/script/ecl.js'></script>");
document.write ("<script type='text/javascript' src='/common/script/jquery-cookie.js'></script>");
document.write ("<script type='text/javascript' src='/common/script/jquery-gatracker.js'></script>");

$ (function () {
	if (!/desktop/.test (location.hostname)) {
		$.gaTracker ("UA-1264243-2");
	}

	if ($.browser.msie) {
		// $ ("div#content :last-child").addClass ("last-child");
		$ ("div#content :last-child:not(pre)").addClass ("last-child");
	}

	$ ("div#content ul.link li a").live ("mouseover", function () {
		$ (this).parent ().addClass ("hover");
	});
	$ ("div#content ul.link li a").live ("mouseout", function () {
		$ (this).parent ().removeClass ("hover");
	});

	$ ("div#content a.button + a.button").each (function () {
		if ($ (this).get (0).previousSibling == $ (this).prev ().get (0)) {
			$ (this).addClass ("continuous");
		}
	});

	$ ("img.rollover").each (function () {
		$ ("<img />").attr ("src", this.src.replace (/\.([^.]+)$/, "-hover." + "$1")).appendTo ("body").hide ();
	});
	$ ("a:has(img.rollover)").hover (function () {
		$ ("img.rollover", this).each (function () {
			this.src = this.src.replace (/\.([^.]+)$/, "-hover." + "$1");
		});
	}, function () {
		$ ("img.rollover", this).each (function () {
			this.src = this.src.replace (/-hover\.([^.]+)$/, "." + "$1");
		});
	});

	if ($.browser.mozilla) {
		$ ("html:lang(ja)").attr ("lang", "");
	}
});

function getSearchQuery (referrer) {
	if (/[?&](kw|MT|name|p|q|qt|query|search|word)=([^&]+)/.test (referrer || document.referrer)) {
		var query = RegExp.$2;
		return eval ("Unescape" + GetEscapeCodeType (query) + "('" + query.replace (/\+/g, " ") + "')").replace (/^\s+|\s+$/g, "");
	}
	return null;
}