$(document).ready(
  function(){
	  
	  
	$("a img, #gnavi li a, #btn-classroom a, .btn-scene a, #btn-afterschool a, #btn-preschool a, .page-home a, .page-top a, #list-btn li a, .btn a, .alphabtn").hover(function(){
		$(this).stop();
		$(this).fadeTo("fast", 0.7);
	},function(){
		$(this).stop();
		$(this).fadeTo("fast", 1.0);
	});
	
	$("#gnavi04").qtip({
		position: { 
			corner: { 
				target: 'bottomMiddle',
				tooltip: 'topMiddle'
			} 
		},
		content: '<div id="tooltip"><div id="jpn"><a href="http://www.tact-net.jp/kidsduo/feature/index.html">日本語</a></div><div id="eng"><a href="http://www.tact-net.jp/kidsduo/feature/index-en.html">English</a></div></div>',
		style: { width: { width: 177 }, border: { width: 0 }, background: 'none' },
		show: 'mouseover',
		hide: { when: 'inactive', delay: 1500 }
	});
	
	$('a[href*=#]').click(function() {
	if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
	&& location.hostname == this.hostname) {
	  var $target = $(this.hash);
	  $target = $target.length && $target
	  || $('[name=' + this.hash.slice(1) +']');
	  if ($target.length) {
		var targetOffset = $target.offset().top;
		$('html,body')
		.animate({scrollTop: targetOffset}, 500);
	   return false;
	  }
	}
  });
});
