$(function(){

    //ページ読み込み完了後に実行する処理
    $(window).load(function(){
        $("div#fixedFooter").slideDown(300);
    });

    //IE旧バージョン用アラート
    if ($.browser.msie && $.browser.version <= 7){
        $('body').prepend('<div id="ieAlert">あなたは古いバージョンのInternet Explorerをご利用中です。当Webサイトを快適に閲覧するにはInternet Explorer 8以上のバージョンにアップデートすることを推奨します。</div>');
    }

    //外部ウィンドウ
    $("a[rel='external']").click(function(){
        window.open($(this).attr("href"));
        return false;
    });

    //ポップアップウィンドウ
    $("a[rel='popup']").click(function(){
        window.open($(this).attr("href"), 'popup', 'width=800, height=480, menubar=no, toolbar=no, scrollbars=yes');
        return false;
    });

    //ライトボックスウィンドウ
    $("a.innerWindow").fancybox({
        'hideOnContentClick': false,
        'overlayShow': true
    });

    //ページトップスクロール
    $(".innerPageLink a").click(function(){
        $('html,body').animate({scrollTop: $($(this).attr("href")).offset().top}, 100, 'linear');
        return false;
    });

    //プリントアウト
    $("#printout").click(function(){
        window.print();
        return false;
    });

    //コマンドヒント
    $("div#commands ul li a").hover(
        function(){
            $(this).parents("ul").after('<p id="commandsHint">'+$(this).attr("title")+'</p>');
            $("p#commandsHint").css("opacity",0).animate({"opacity":1,"bottom":"0"}, 100, 'linear');
        },
        function(){
            $("p#commandsHint").animate({"opacity":0,"bottom": "-36px"}, 100, 'linear', function(){$(this).remove();});
        }
    );

});

