(function(){
    //この処理はテキスト解析中に処理されるので、処理中に対象のオブジェクトをコンテナ配置してしまう。
    var container = $("script:last").parents("div:first");

    $(function() {
        ajaxRequest(getHost() + "/parts/informationparts/index",null,information_disp_callback);
    })

    function information_disp_callback(data) {
        var strHtml = '';

        if (data != null && data != "") {
            strHtml += '<h2>' + data.title + '</h2>';
            strHtml += '<ul>';

            if (data.content != null && data.content != "") {
                for (i = 0; i < data.content.length; i++) {
                    strHtml += '<li><span>' + data.content[i] + '</span></li>';
                }
            }

            strHtml += '</ul>'
        }

        $(container).find(".information_d01").html(strHtml);

        if (data != null && data != "") {
            $(container).find(".information_d01").children("ul").css("height", "80px");
            $(container).find(".information_d01").children("ul").jScrollPane();
            $(container).find(".jspScrollable").css("width", "100%");
            $(container).find(".jspContainer").css("width", "99%");
            $(container).find(".jspPane").css("width", "97%");
            $(container).find(".jspContainer").css("height", "100%");
            $(container).find(".jspTrack").css("height", "100%");
            $(container).find(".information_d01").children("ul").find("li").css("width", "99%");
            $(container).find(".information_d01").children("ul").find("li:last").css("background-image", "none");
        }
    }
})();
