﻿function accessMap(){
	document.write('<iframe width="600" height="450" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.jp/maps?f=q&amp;source=s_q&amp;hl=ja&amp;geocode=&amp;q=%E9%AB%98%E7%9F%A5%E7%9C%8C%E9%AB%98%E7%9F%A5%E5%B8%82%E4%B9%9D%E5%8F%8D%E7%94%B08-17&amp;aq=&amp;sll=36.5626,136.362305&amp;sspn=37.254212,60.908203&amp;brcurrent=3,0x354e1f3322084dd7:0x2f175a433fde642a,0&amp;ie=UTF8&amp;hq=&amp;hnear=%E9%AB%98%E7%9F%A5%E7%9C%8C%E9%AB%98%E7%9F%A5%E5%B8%82%E4%B9%9D%E5%8F%8D%E7%94%B0%EF%BC%98%E2%88%92%EF%BC%91%EF%BC%97&amp;ll=33.557582,133.548369&amp;spn=0.009512,0.023046&amp;z=14&amp;output=embed"></iframe>');
}

$(document).ready(function(){
	$('#footer ul li:first-child').addClass('firstChild'); 
});

$(document).ready(function(){
	$('.catSection .item:first-child').addClass('firstChild');
	$('.clinic #main ul li:first-child').addClass('firstChild');
});


// Easingの追加
jQuery.easing.quart = function (x, t, b, c, d) {
	return -c * ((t=t/d-1)*t*t*t - 1) + b;
};

/*-------------------------------------
 ページ読み込み中
-------------------------------------*/
jQuery(document).ready(function(){

	//
	// <a href="#***">の場合、スクロール処理を追加
	//
	jQuery('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
			var $target = jQuery(this.hash);
			$target = $target.length && $target || jQuery('[name=' + this.hash.slice(1) +']');
			if ($target.length) {
				var targetOffset = $target.offset().top;
				jQuery('html,body').animate({ scrollTop: targetOffset }, 1200, 'quart');
				return false;
			}
		}
	});

});


function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");

		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_off."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off."));
				}
			}
		}
	}
}

if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}
