﻿$(document).ready(function() {
	$("#ix-nav li").hover(
		function() { $("ul", this).fadeIn("fast"); }, 
		function() { } 
	);
	$(".nav_stick").hover(
		function () {$(this).children("A").attr("class","on");},
		function () {$(this).children("A").attr("class","off");}
	);
	if (document.all) {
		$("#ix-nav li").hoverClass("sfHover");
	}
});
$.fn.hoverClass = function(c) {
	return this.each(function(){
		$(this).hover( 
			function() { $(this).addClass(c);  },
			function() { $(this).removeClass(c); }
		);
	});
};
function txtHover(id,className) {
	document.getElementById(id).className=className;
}

map = {
	showCover : function() {
		document.getElementById("map_cover").style.display = "inline";
	},
	hideCover : function() {
		document.getElementById("map_cover").style.display = "none";
	},
	showInfo : function() {
		map.showCover();
		document.getElementById("map_info").style.display = "inline";
	},
	hideInfo : function() {
		map.hideCover();
		document.getElementById("map_info").style.display = "none";
	},
	showPoint : function(idx,box) {
		//map.showCover();
		document.getElementById("detail_img").src = "/docs/images/road/" + document.getElementById("map_"+idx).getAttribute("src");
		document.getElementById("detail_title").innerHTML = document.getElementById("map_"+idx).getAttribute("title");
		document.getElementById("detail_num").innerHTML = idx;
		document.getElementById("detail_summary").innerHTML = document.getElementById("map_"+idx).innerHTML;
		
		if (document.getElementById("map_"+idx).getAttribute("cone") == "yes") {
			document.getElementById("detail_cone").src = "/docs/images/cone.jpg";
		} else {
			document.getElementById("detail_cone").src = "/docs/images/trans.gif";
		}
		var top = parseInt(box,10);
		if (top > (701-163)) {
			top = top - 27 - 163;
		}
		document.getElementById("map_detail").style.top = top + "px";
		document.getElementById("map_detail").style.display = "inline";
	},
	hidePoint : function(box) {
		//map.hideCover();
		document.getElementById("map_detail").style.display = "none";
	}
}
