//ロールオーバー
$(function(){
	rollover();
});

function rollover(){
    $("a.over img").mouseover(function(){
        $(this).attr("src",$(this).attr("src").replace(/^(.+)_off(\.[a-z]+)$/, "$1_on$2"))
    }).mouseout(function(){
        $(this).attr("src",$(this).attr("src").replace(/^(.+)_on(\.[a-z]+)$/, "$1_off$2"));
    }).each(function(){
        $("<img>").attr("src",$(this).attr("src").replace(/^(.+)_off(\.[a-z]+)$/, "$1_on$2"))
    })
}

//フロアガイドクリッカブルマップ
function changeMapImage(imgPath) {
  document.getElementById('map').src = imgPath;
}

// グーグルマップ
$(function(){
if ( $('body').hasClass('outline') ) {
		var osuLat = 35.158824;
		var osuLng = 136.905329;
		var mapBox = 'map_canvas';
		var osuTitle = 'OSU301';
		var mapdiv = document.getElementById(mapBox);
		var myOptions = {
			zoom: 14,
			center: new google.maps.LatLng(osuLat, osuLng),
			mapTypeId: google.maps.MapTypeId.ROADMAP,
			mapTypeControl: true,
			mapTypeControlOptions: {style:google.maps.MapTypeControlStyle.DEFAULT},
			navigationControl: true,
			navigationControlOptions: {style:google.maps.NavigationControlStyle.SMALL},
			panControl: true,
			scaleControl: false,
			streetViewControl: true,
			overviewMapControl: true,
			overviewMapControlOptions: {opened: false}
		};
		var map = new google.maps.Map(mapdiv, myOptions);
		var marker = new google.maps.Marker({
			position: new google.maps.LatLng(osuLat, osuLng),
			map: map,
			title: osuTitle
		});
	}
});
