//イージング関数
jQuery.easing.quart = function (x, t, b, c, d) {
    return -c * ((t=t/d-1)*t*t*t - 1) + b;
};  

$(document).ready(function(){
    $('a[href^=#header],a[href^=#IdxHeader],a.scrl').click(function(){
	//タブ切り替え処理とセレクタがかぶるので、#headerへのリンクのみに限定（ページの先頭以外でスムージングさせる場合は、他のクラスを追加）
        var target;
        target = $( $(this).attr('href') );
        if (target.length == 0) {
            return;
        }
        $($.browser.opera ? document.compatMode == 'BackCompat' ? 'body' : 'html' :'html,body').animate({scrollTop: target.offset().top}, 800, 'quart');
        return false;
    });
});

