         $(function(){
            var $el, leftPos, newWidth,
            $mainNav2 = $("#example-two");

            $mainNav2.append("<li id='magic-line-two'></li>");
            var $magicLineTwo = $("#magic-line-two");
            $magicLineTwo
               .width($(".current_page_item_two").width())
               .height($mainNav2.height())
               .css("left", $(".current_page_item_two a").position().left)
               .data("origLeft", $(".current_page_item_two a").position().left)
               .data("origWidth", $magicLineTwo.width())
               .data("origColor", $(".current_page_item_two a").attr("rel"));

            /* example2 */
            $("#example-two li").find("a").hover(function() {
               $el = $(this);
                  leftPos = $el.position().left;
                  newWidth = $el.parent().width();
                  $magicLineTwo.stop().animate({
                  left: leftPos,
                  width: newWidth,
                  backgroundColor: $el.attr("rel")
               })
            }, function() {
               $magicLineTwo.stop().animate({
                  left: $magicLineTwo.data("origLeft"),
                  width: $magicLineTwo.data("origWidth"),
                  backgroundColor: $magicLineTwo.data("origColor")
               });
            });
         });


            $(function() {
                var d=1000;
                $('#menu span').each(function(){
                    $(this).stop().animate({
                        'top':'0px'
                    },d+=250);
                });

                $('#menu > li').hover(
                function () {
                    var $this = $(this);
                    $('a',$this).addClass('hover');
                    $('span',$this).stop().animate({'top':'-30px'},200).css({'zIndex':'999'});
                },
                function () {
                    var $this = $(this);
                    $('a',$this).removeClass('hover');
                    $('span',$this).stop().animate({'top':'0px'},600).css({'zIndex':'999'});
                }
            );
            });


// 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;
            }
        }
    });
 
});
