// jquery.pngFix.js
//-----------------------------------------------------------------------------
$(document).ready(function(){
	$(document).pngFix(); 
});


// jquery.rollover.js
//-----------------------------------------------------------------------------
$(document).ready(function(){
	$('.rollover img').rollover();
	$('#global-nav a img').rollover();
	$('#sub-reserve a img').rollover();
});


// rollover (input type="image")
//-----------------------------------------------------------------------------
$(document).ready(function(){
	$("input[type='image']").mouseover(function(){
		$(this).attr('src', $(this).attr("src").replace(/\.gif/ig, "_on.gif"));
	});
	$("input[type='image']").mouseout(function(){
		$(this).attr('src',  $(this).attr("src").replace(/_on\.gif/ig, ".gif"));
	});
});


// smooth scroller
//-----------------------------------------------------------------------------
$(document).ready(function(){
	$("a[href^=#]").click(function() {
		$(this).blur();
		$("html,body").animate({scrollTop: $($(this).attr("href")).offset().top},300,'swing');
		return false;
	});
});


// css styling
//-----------------------------------------------------------------------------
$(document).ready(function(){
	$("body#room div.room-list dl:nth-child(3n)").addClass('right');
	$("body#company #main > dl:last").addClass('last');
	$("body#contact #main form > dl:last").addClass('last');
	$("body#spotmap #main #spot-list > dl:nth-child(4n+1)").addClass('left');
	$("body#spotmap #main #spot-list > dl:nth-child(4n)").addClass('right');
	$("body#infomation #main div.archive:last").addClass('last');
	$("body#access #contents #main #ac_train dl dd ol li:odd").addClass('even');
//	$("#global-nav > li:last").addClass('last');
});


// lightbox
//-----------------------------------------------------------------------------
$(document).ready(function(){
	$('a.lightbox').lightBox({fixedNavigation:true});
});


