!function(){
try {
window.addEventListener("load", func, false);
} catch (e) {
// IE用
window.attachEvent("onload", func);
}
function func(){
if(typeof jQuery != "function"){
var count = document.getElementsByTagName("script").length;
var script = document.createElement("script");
script.src = "https://www.choinori.jp/tie-up/js/jquery-1.8.3.min.js";
var head = document.getElementsByTagName("head");
head[0].appendChild(script);
setTimeout(function() {
if(document.getElementsByTagName("script").length == count) {
setTimeout(arguments.callee, 100);
}else{
get_list();
}
}, 100)
}else{
get_list();
}
function get_list(){
$('#chonori_tieup_wrap__').css({background:'url(https://www.choinori.jp/tie-up/img/loading.gif) no-repeat center',height:'400px'});
var style='';
$('head link:last').after(style);
var script='';
$('body').append(script);
$.ajaxSetup({xhrFields:{withCredentials:true}});
$.ajax({
url:'https://www.choinori.jp/tie-up/',
data:{category:1001,lang:'ja'}
}).done(function(json){
$('#chonori_tieup_wrap__').css({background:'none',height:'auto'}).html(json.html);
}).fail(function(){
$('#chonori_tieup_wrap__').html('通信エラーが発生しました。
');
});
}
}
}();