$(document).ready(function(){

	$("#menu li a").click(function(event){

		var val =  $(this).attr("rel");
		if ( val == 'blog' ){
		}else{
			event.preventDefault();
			move(val);
		}
	});

	$("a#top_news").click(function(event){
		var val =  $(this).attr("rel");
		event.preventDefault();
		move(val);
	});


	$("#trailer").animate({ "left" : "-780px"}, 1000);

	$("a.map").fancybox(		
		{
			'type'  : 'iframe',
			'width' : 800,
			'height': 600
		}
	);
	
	$("a.reservation").fancybox(		
		{
			'type'  : 'iframe',
			'width' : 650,
			'height': 600
		}
	);
	

});


function move(mv_id){

	var target_id = '#' + mv_id;

	//親
	var parent_left = $("#trailer").offset().left;
	//alert( $(target_id).offset().left - parent_left );

	var destination = parent_left - $(target_id).offset().left + 'px';

	$("#trailer").animate({
	    "left" : destination
	}, 1000);

	return;
	
}


function sc_top(){
	jQuery.easing.quart = function (x, t, b, c, d) {
	    return -c * ((t=t/d-1)*t*t*t - 1) + b;
	};  

    $('#gotoTop').bind("click",function (event) {
		event.preventDefault();
        $('html,body').animate({ scrollTop: 0 }, 500, 'swing');
    });
}


if (typeof document.documentElement.style.maxHeight != "undefined") {
// IE 7.0 以上 または Gecko などモダンブラウザー
}
else {
	DD_belatedPNG.fix('.transparency');
	DD_belatedPNG.fix('.msg_board');
}

