
/*-------------------------------------------------------------------

スムース  スクロール

-------------------------------------------------------------------*/

$(function() {
	$('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
			var target = $(this.hash);
			target = target.length && target;
			if (target.length) {
				var sclpos = 30;
				var scldurat = 1500;
				var targetOffset = target.offset().top - sclpos;
				$('html,body')
					.animate({scrollTop: targetOffset}, {duration: scldurat, easing: "easeOutExpo"});
				return false;
			}
		}
	});
	$('area[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
			var target = $(this.hash);
			target = target.length && target;
			if (target.length) {
				var sclpos = 30;
				var scldurat = 1500;
				var targetOffset = target.offset().top - sclpos;
				$('html,body')
					.animate({scrollTop: targetOffset}, {duration: scldurat, easing: "easeOutExpo"});
				return false;
			}
		}
	});
});




/* ----------------------------------------------------------------------------------- */
$(function() {

	/* for IE6 background image flicker */
	if (jQuery.browser.msie && jQuery.browser.version == 6) {
		try {
			document.execCommand("BackgroundImageCache", false, true);
		} catch(err) {}
	}

});




/*---------------------------------------------------------------------------*/
/**
 * Fontsize Selector
 * @version  0.0.1_2009-06-29
 * @requires jquery.js, styleswitcher.js, rollover.js
 */

FONTSIZE_SELECTOR_ENABLED = true;
FONTSIZE_SELECTOR         = null;


if (FONTSIZE_SELECTOR_ENABLED) {

	$(function() {
		var config = {
			className      : "fontsize",
			blockId        : "fontsize-selector",
			buttonsSetting : {
					"medium" : {
								styleId       : "fontsize-medium",
								buttonId      : "fsbutton-medium",
								title         : "文字サイズを「中」に変更します",
								titleSelected : "現在選択中の文字サイズは「中」です"
					},
					"large" : {
								styleId       : "fontsize-large",
								buttonId      : "fsbutton-large",
								title         : "文字サイズを「大」に変更します",
								titleSelected : "現在選択中の文字サイズは「大」です"
					}
			}
			,rollover : new RolloverImages("rollover-fsbutton", "on", "on")
		};

		FONTSIZE_SELECTOR = new FontSizeSelector(config);
	});

	// 
	document.write(''
	+ '<style  type="text/css" media="screen,print">'
	+ '#fontsize-selector {display: block !important;}'
	+ '</style>');
}

/*-------------------------------------------------------------------

google maps api
-------------------------------------------------------------------*/

function mapData(){
        var html = '<div style="width:270px;"><p style="font-size:12px">'+ "財団法人日本ゲートボール連合" +'</p><p style="font-size:12px">'+ "〒105-0001<br />東京都港区虎ノ門1丁目15番16号　海洋船舶ビル2階" +'</p><p style="font-size:12px; margin:0;">'+ "TEL：03-3580-9397（代）" +'</p></div>'
        google.maps.event.addDomListener(window, 'load', function() {
            var mapdiv = document.getElementById("map_area");
            var myOptions = {
                zoom: 17,
                center: new google.maps.LatLng(35.669936, 139.749171),
                mapTypeId: google.maps.MapTypeId.ROADMAP,
                scaleControl: true
            };
            var map = new google.maps.Map(mapdiv, myOptions);
            var marker = new google.maps.Marker({
                position: new google.maps.LatLng(35.669436, 139.749171),
                map: map
            });
            var infowindow = new google.maps.InfoWindow({
                content: html
            });
            
            infowindow.open(map,marker);
            google.maps.event.addListener(marker, 'click', function() {
                infowindow.open(map,marker);
            });
        });
}

