11c4b5c91301beabca5d9702e81439df719119c5e2feb5b587645a243f72ad42

Source Code:

var ua = {};
ua.name = window.navigator.userAgent.toLowerCase();
ua.ver = window.navigator.appVersion.toLowerCase();

ua.browser = (function(){
    if (ua.name.indexOf('edge') !== -1) return 'edge';   // Edge
    else if (ua.name.indexOf("iemobile") !== -1)      return 'iemobile'; // ieMobile
    else if (ua.name.indexOf('android') !== -1) return 'android';    //android
    else if (ua.name.indexOf("msie") !== -1 && ua.name.indexOf('opera') === -1 || ua.name.indexOf('trident/7') !== -1) return 'ie';    //ie
    else if (ua.name.indexOf('chrome')  !== -1 && ua.name.indexOf('edge') === -1)   return 'chrome';  // chrome
    else if (ua.name.indexOf('safari')  !== -1 && ua.name.indexOf('chrome') === -1 && ua.name.indexOf('iphone') == -1) return 'macsafari'; // macsafari
    else if (ua.name.indexOf('safari')  !== -1 && ua.name.indexOf('chrome') === -1 && ua.name.indexOf('iphone') !== -1) return 'iossafari';    // iossafari
    else if (ua.name.indexOf('opera')   !== -1) return 'opera';                  // Opera
    else if (ua.name.indexOf('firefox') !== -1) return 'firefox';                // FIrefox
    else return 'unknown_browser';
})();

ua.version = (function(){
    if (ua.name.indexOf('trident/7') !== -1) return 11;  // ie11
    else if (ua.name.indexOf("msie") !== -1 && ua.name.indexOf('opera') === -1){  //ieバージョン取得
        if      (ua.ver.indexOf("msie 6.")  !== -1) return 6;    // ie6
        else if (ua.ver.indexOf("msie 7.")  !== -1) return 7;    // ie7
        else if (ua.ver.indexOf("msie 8.")  !== -1) return 8;    // ie8
        else if (ua.ver.indexOf("msie 9.")  !== -1) return 9;    // ie9
        else if (ua.ver.indexOf("msie 10.") !== -1) return 10;   // ie10
    }
    else if (ua.name.indexOf('safari')  !== -1 && ua.name.indexOf('chrome') === -1){ //safariバージョン取得
        var safariversion = ua.name.match(/version\/([\d]+)/);
        return safariversion[1]* 1;
    }
    else if (ua.name.indexOf('android') !== -1){ //androidバージョン取得
        var androidversion = parseFloat(ua.name.slice(ua.name.indexOf("android")+8)); 
        return androidversion;
    }
    else return 100;
})();

//暗号レベルアップ対応
$.ajax({
    type: "GET",
    url: "/static/responsive/data/security_attention.xml",
    dataType: "xml",
    timeout: 5000,
    error: function() { //xml読み込み失敗時
    },
    success: function(xml) {    //xml読み込み成功時
        $(xml).find("browser").each(function() {
            var name = $(this).find("name").text(); //ブラウザの名称を取得
            var version = $(this).find("version").text() * 1;   //バージョンを取得
            var message = $(this).find("message").text();   //メッセージを取得(ブラウザごとに定義する場合に使用)
            var common_message = $(xml).find("common").text();  //共通メッセージを取得
            var addHTML = '';
            
            if (name.match(ua.browser) && ua.version <= version) { //sp用のHTMLを挿入
                    
                    addHTML = '<div class="security_attention forSpBlock"><p>';
                    if (!message) {
                        addHTML += common_message;
                    } else addHTML += message;
                    addHTML += '</p></div>';
                    $('div#article').prepend(addHTML); //pc用のHTMLを挿入

                $('div.security_attention').css({
                    'clear': 'both',
                    'font-size': '14px',
                    'padding': '5px'
                });

                $('div.security_attention p').css({
                    'padding-bottom': '10px',
                    'padding-left': '10px',
                    'padding-right': '10px',
                    'color': '#d40c0c',
                    'padding-top': '10px',
                    'background': '#fcfcdd',
                    'border': '1px solid #EBEBA9'
                });
                $('div.security_attention a:link').css({
                    'color': '#0c1e89'
                });
                $('div.security_attention a:visited').css({
                    'color': '#551a8b'
                });
                $('div.security_attention a:hover').css({
                    'color': '#0c1e89'
                });
                $('div.security_attention a:active').css({
                    'color': '#551a8b'
                });
            } else return 0;
        });
    }
});

(function($) {
    //path設定
    var XML_PATH = '/static/responsive/data/news_json_sogo.xml';
    
    $(function(){
        //xmlの呼び出し
        $.get(XML_PATH, function( data, textStatus) {
            //呼び出したxmlの配列化
            var GET_XML = $(data).find( 'record' );
           //news別のカウンタFLG
            var informationFlg = 0;
            var serviceFlg = 0;
            var maintenanceFlg = 0;
            var securityFlg = 0;
            var otherFlg = 0;
            var inportantFlg = 0;
            //news別の配列
            var informationArray = new Array();
            var serviceArray = new Array();
            var maintenanceArray = new Array();
            var inportantArray = new Array();
            var securityArray = new Array();
            var otherArray = new Array();
            //表示件数
            var information02Cnt = 4;
            var inportantCnt = 2;
            
            //newsType別に配列に分け入れる
            GET_XML.each( function(e) {
                var newsType = $(this).find('NewsType').text();
                var this_array = $(this);
                switch (newsType) {
                    case "gtop_important":
                        inportantArray.unshift (this_array);
                        break;
                    case "gtop_information":
                        informationArray.unshift (this_array);
                        break;
                    case "gtop_newsrelease":
                        informationArray.unshift (this_array);
                        break;
                    default:
                        break;
                }
            });
            
            //重要なお知らせ
            if ( inportantArray.length > 0 ) {
                $.each(inportantArray, function(e) {
                    var newsType = $(this).find('NewsType').text();
                    var releaseDate = $(this).find('ReleaseDate').text();
                    var newsTitle = $(this).find('NewsTitle').text();
                    var newsDescription = $(this).find('NewsDescription').text();
                    var newsLink = $(this).find('NewsLink').text();
                    var linkTarget = $(this).find("LinkTarget").text();
                    var availability = $(this).find('availability').text();
                    var setHTML = $("<li>");
                    var category = "重要なお知らせ";
                    var setHTML01 = "<span>(" + releaseDate + ")</span>";
                    var setHTML02 = "";
                    //linkのチェック
                    if ( newsLink.length > 0 ) {
                        if ( linkTarget.length > 0 && linkTarget == "blank" ) {
                                setHTML02 = "<p><a href='" + newsLink + "' class='link' target='_blank'>" + newsTitle + "</a></p>";
                            } else if ( linkTarget.length > 0 && linkTarget == "winpopup" ){
                                setHTML02 = "<p><a href='" + newsLink + "' class='link winPopup' target='_blank'>" + newsTitle + "</a></p>";
                            } else {
                                setHTML02 = "<p><a href='" + newsLink + "' class='link'>" + newsTitle + "</a></p>";
                            }
                    } else {
                        setHTML02 = "<p>" + newsTitle + "</p>";
                    }
                    var setHTML03 = "";
                    //Descriptionのチェック
                    if ( newsDescription.length > 0 ) {
                        setHTML03 = "<p class='text'>" + newsDescription + "</p>";
                    } else {
                        setHTML03 = "";
                    }
                    setHTML.append(setHTML02 + setHTML03);
                    setHTML.find("p:last-child").append(setHTML01);
                    //内容の表示
                    if (availability != "Invalid" && inportantFlg < inportantCnt) {
                        $("#gtop_important").append(setHTML);
                        inportantFlg++;
                    }
                });
            } else {
                $(".gtop_importantAreaWrap").hide();
            }
            
            //インフォメーション
            if ( informationArray.length > 0 ) {
                $.each(informationArray, function(e) {
                    var newsType = $(this).find('NewsType').text();
                    var releaseDate = $(this).find('ReleaseDate').text();
                    var newsTitle = $(this).find('NewsTitle').text();
                    var newsDescription = $(this).find('NewsDescription').text();
                    var newsLink = $(this).find('NewsLink').text();
                    var linkTarget = $(this).find("LinkTarget").text();
                    var availability = $(this).find('availability').text();
                    var setHTMLType02 = "";
                    if (newsType == "gtop_information") {
                        var category = "総合インフォメーション";
                        var setHTML01 = "<div class='class'><span class='time'>" + releaseDate + "</span><span class='category'>" + category + "</span></div>";
                    } else {
                        var category = "ニュースリリース";
                        var setHTML01 = "<div class='class'><span class='time'>" + releaseDate + "</span><span class='category news'>" + category + "</span></div>";
                    }
                    var setHTML02 = "";
                    //linkのチェック
                    if ( newsLink.length > 0 ) {
                        if ( linkTarget.length > 0 && linkTarget == "blank" ) {
                                setHTML02 = "<p><a href='" + newsLink + "' class='link' target='_blank'>" + newsTitle + "</a></p>";
                            } else if ( linkTarget.length > 0 && linkTarget == "winpopup" ){
                                setHTML02 = "<p><a href='" + newsLink + "' class='link winPopup' target='_blank'>" + newsTitle + "</a></p>";
                            } else {
                                setHTML02 = "<p><a href='" + newsLink + "' class='link'>" + newsTitle + "</a></p>";
                            }
                    } else {
                        setHTML02 = "<p>" + newsTitle + "</p>";
                    }
                    var setHTML03 = "";
                    //Descriptionのチェック
                    if ( newsDescription.length > 0 ) {
                        setHTML03 = "<p class='text'>" + newsDescription + "</p>";
                    } else {
                        setHTML03 = "";
                    }
                    setHTMLType02 = "<div class='information_item'>\
                                        " + setHTML01 + "\
                                        <div class='label'>" + setHTML02 + setHTML03 +"</div>\
                                    </div>";
                    //内容の表示
                    if (availability != "Invalid") {
                        $("#gtop_information").each(function(){
                            if ( $(this).is(".infoType") && informationFlg < information02Cnt ) {
                                $(this).append(setHTMLType02);
                            }
                        });
                        informationFlg++;
                    }
                });
            } else {
                $("#gtop_information").each(function(){
                    $(this).append("<p>新着情報はありません。</p>");
                });
            }
            
        });
        
    });
    
})(jQuery);