$(document).ready(function(){ 
    $("#gNav li").hover(
        function(){ $("ul",this).show(); },
		function(){ $("ul",this).css("display","none"); }
	);						   
	$("#footer li").after("&nbsp;&nbsp;&#124;&nbsp;");
	$("table tr:nth-child(even)").addClass("evenTr");
	$("table li:last-child").css("border-bottom" , "none");
	//$("#main h2:gt(0)").addClass("mt_35");
});

//Pagetopへ戻る

$(function () { 
var scroll_timer;
var displayed = false;
var $message = $('#message');
var $window = $(window);
var top = $(document.body).children(0).position().top;

$window.scroll(function () {
window.clearTimeout(scroll_timer);
scroll_timer = window.setTimeout(function () { 
if($window.scrollTop() <= top) 
{
displayed = false;
$message.fadeOut(500);
}
else if(displayed == false) 
{
displayed = true;
$message.stop(true, true).fadeIn(500).click(function () { $message.fadeOut(500); });
}
}, 100);
});
$('#top-link').click(function(e) {
e.preventDefault();
$.scrollTo(0,300);
});
});

//左カラム現在のページハイライト

$(function(){
$('#side ul li a[href]').each(function(){
var a = $(this);
var href = a.attr('href');
if (absolutePath(href) === location.href)
{ 
a.addClass("current");
}
});
function absolutePath(path){
var e = document.createElement('span');
e.innerHTML = '<a href="' + path + '" />';
return e.firstChild.href;
}
});
