


	$(document).ready(function(){

        //熊動きごろごろ
        var gorogoro = $('.animation01').jani({
            frameWidth: 123,
            frameHeight: 92,
            speed: 65,
            totalFrames: 39
        });

        gorogoro.play();

        $('#motto').mouseover(function(){
	        gorogoro.stop();
	        $('.animation01').css('background-position', '0px bottom');
        });
        $('#motto').mouseout(function(){
	        $('.animation01').css('background-position', '0px 0px');
	        gorogoro.play();
        });
		
        //歯アニメ
		
        var $happy      = $('.happy .over1').jani({      frameWidth: 169, frameHeight:169, speed: 600,  totalFrames: 3,  loop: false });
        var $menu       = $('.menu .over1').jani({       frameWidth: 169, frameHeight:169, speed: 1000, totalFrames: 4,  loop: false });
        var $facilities = $('.facilities .over1').jani({ frameWidth: 169, frameHeight:169, speed: 100,  totalFrames: 3,  loop: true  });
        var $access     = $('.access .over1').jani({     frameWidth: 169, frameHeight:169, speed: 65,   totalFrames: 10, loop: false });
        var $inquiry    = $('.inquiry .over1').jani({    frameWidth: 169, frameHeight:169, speed: 600,  totalFrames: 3,  loop: false });
        var $blog       = $('.blog .over1').jani({       frameWidth: 169, frameHeight:169, speed: 100,  totalFrames: 2,  loop: true  });


        $('.happy .over3').mouseover(function(){      $happy.play(); });      $('.happy .over3').mouseout(function(){       $happy.stop();      });
        $('.menu .over3').mouseover(function(){       $menu.play(); });       $('.menu .over3').mouseout(function(){        $menu.stop();       });
        $('.facilities .over3').mouseover(function(){ $facilities.play(); }); $('.facilities .over3').mouseout(function(){  $facilities.stop(); });
        $('.access .over3').mouseover(function(){     $access.play(); });     $('.access .over3').mouseout(function(){      $access.stop();     });
        $('.inquiry .over3').mouseover(function(){    $inquiry.play(); });    $('.inquiry .over3').mouseout(function(){     $inquiry.stop();    });
        $('.blog .over3').mouseover(function(){       $blog.play(); });       $('.blog .over3').mouseout(function(){        $blog.stop();       });

	});


//写真

    $(document).ready(function(){
        var slider = $('#bgslider').bxSlider({
            mode: 'fade',
            auto: true,
            controls: false,
            speed: 1700,
            pause: 3300
        });
        slider.goToNextSlide();
    });


//歯のオープン (top.cssの#header_topも同じ値)

$(function() {
	$('#header_top .happy .over3').hover(
		function(){ $('#happy').animate({ top: 0 },550,"swing"); },
		function(){ $('#happy').animate({ top: 108  },550,"easeOutBounce"); }
	);
	$('#header_top .menu .over3').hover(
		function(){ $('#menu').animate({ top: -7 },550,"swing"); },
		function(){ $('#menu').animate({ top: 83  },550,"easeOutBounce"); }
	);
	$('#header_top .facilities .over3').hover(
		function(){ $('#facilities').animate({ top: 187  },550,"swing"); },
		function(){ $('#facilities').animate({ top: 287  },550,"easeOutBounce"); }
	);
	$('#header_top .access .over3').hover(
		function(){ $('#access').animate({ top: 145 },550,"swing"); },
		function(){ $('#access').animate({ top: 245 },550,"easeOutBounce"); }
	);
	$('#header_top .inquiry .over3').hover(
		function(){ $('#inquiry').animate({ top: 330  },550,"swing"); },
		function(){ $('#inquiry').animate({ top: 430  },550,"easeOutBounce"); }
	);
	$('#header_top .blog .over3').hover(
		function(){ $('#blog').animate({ top: 330  },550,"swing"); },
		function(){ $('#blog').animate({ top: 430  },550,"easeOutBounce"); }
	);
});




