$(function() { function news_loadmore_loadmore_index( id, id_url, index_count_i, index_count_limit, href ){ var scrolltop = $(".load_more").offset().top - 100; $("#container > div#groundbase > article[id^='news_'] > div > div.body > ul.news > li > a.load_more img").fadeOut(300).remove(); $.ajax({ url: "https://e-senmon.jp/ajax_news_load.php", data: "id=" + id + "&id_url=" + id_url + "&index_count_i=" + index_count_i + "&index_count_limit=" + index_count_limit + "&archive_year_month=", success: function(data, dataType){ $("#container > div#groundbase > article[id^='news_'] > div > div.body > ul.news > li > a.load_more").parent().remove(); var target = $("#container > div#groundbase > article[id^='news_'] > div > div.body > ul.news"); var before_height = target.outerHeight() target.css("height", before_height).append( data ); var after_height = target.css("height","auto").outerHeight(); target.css("height", before_height).css("overflow","hidden"); target.animate({"height": after_height},1000, 'swing', function() { $(this).css("overflow","visible").css("height","auto"); } ); $('html,body').animate({ scrollTop: scrolltop }, '2000', 'swing'); $("img.preload:not('.loaded')").each(function(){ $(this).imagesLoaded(function(){ $(this).addClass("loaded"); }); }); }, complete: function(XMLHttpRequest, textStatus){ }, error: function(XMLHttpRequest, textStatus, errorThrown){ } }); } $(document).on("click", "#container > div#groundbase > article[id^='news_'] > div > div.body > ul.news > li > a.load_more.ajax", function(){ var id = encodeURI($(this).attr("data-id")); var id_url = $(this).attr("data-id_url"); var index_count_i = $(this).attr("data-index_count_i"); var index_count_limit = $(this).attr("data-index_count_limit"); var href = $(this).attr("href").replace( "https://e-senmon.jp/", "" ); news_loadmore_loadmore_index( id, id_url, index_count_i, index_count_limit, href ); return false; }); function gallery_loadmore_loadmore_index( id, id_url, index_count_i, index_count_limit, href ){ $("#container > div#groundbase > article[id^='gallery_'] > div > div.body > ul.gallery > li > a.load_more img").fadeOut(300).remove(); $.ajax({ url: "https://e-senmon.jp/ajax_gallery_load.php", data: "id=" + id + "&id_url=" + id_url + "&index_count_i=" + index_count_i + "&index_count_limit=" + index_count_limit + "&archive_year_month=", success: function(data, dataType){ var scrolltop = $(".load_more").offset().top - 400; $("#container > div#groundbase > article[id^='gallery_'] > div > div.body > ul.gallery > li > a.load_more").parent().remove(); var target = $("#container > div#groundbase > article[id^='gallery_'] > div > div.body > ul.gallery"); var before_height = target.outerHeight() target.css("height", before_height).append( data ); var after_height = target.css("height","auto").outerHeight(); target.css("height", before_height).css("overflow","hidden"); target.animate({"height": after_height},1000, 'swing', function() { $(this).css("overflow","visible").css("height","auto"); } ); $('html,body').animate({ scrollTop: scrolltop }, '2000', 'swing'); $("img.preload:not('.loaded')").each(function(){ $(this).imagesLoaded(function(){ $(this).addClass("loaded"); }); }); }, complete: function(XMLHttpRequest, textStatus){ }, error: function(XMLHttpRequest, textStatus, errorThrown){ } }); } $(document).on("click", "#container > div#groundbase > article[id^='gallery_'] > div > div.body > ul.gallery > li > a.load_more.ajax", function(){ var id = $(this).attr("data-id"); var id_url = $(this).attr("data-id_url"); var index_count_i = $(this).attr("data-index_count_i"); var index_count_limit = $(this).attr("data-index_count_limit"); var href = $(this).attr("href").replace( "https://e-senmon.jp/", "" ); gallery_loadmore_loadmore_index( id, id_url, index_count_i, index_count_limit, href ); return false; }); function search_loadmore_loadmore_index( id, id_url, index_count_i, index_count_limit, href ){ var scrolltop = $(".load_more").offset().top - 100; $("#container > div#groundbase > article[id^='search_'] > div > div.body > ul.search > li > a.load_more img").fadeOut(300).remove(); $.ajax({ url: "https://e-senmon.jp/ajax_search_load.php", data: "id=" + id + "&id_url=" + id_url + "&index_count_i=" + index_count_i + "&index_count_limit=" + index_count_limit + "&archive_year_month=", success: function(data, dataType){ $("#container > div#groundbase > article[id^='search_'] > div > div.body > ul.search > li > a.load_more").parent().remove(); var target = $("#container > div#groundbase > article[id^='search_'] > div > div.body > ul.search"); var before_height = target.outerHeight() target.css("height", before_height).append( data ); var after_height = target.css("height","auto").outerHeight(); target.css("height", before_height).css("overflow","hidden"); target.animate({"height": after_height},1000, 'swing', function() { $(this).css("overflow","visible").css("height","auto"); } ); $('html,body').animate({ scrollTop: scrolltop }, '2000', 'swing'); $("img.preload:not('.loaded')").each(function(){ $(this).imagesLoaded(function(){ $(this).addClass("loaded"); }); }); }, complete: function(XMLHttpRequest, textStatus){ }, error: function(XMLHttpRequest, textStatus, errorThrown){ } }); } $(document).on("click", "#container > div#groundbase > article[id^='search_'] > div > div.body > ul.search > li > a.load_more.ajax", function(){ var id = encodeURI($(this).attr("data-id")); var id_url = $(this).attr("data-id_url"); var index_count_i = $(this).attr("data-index_count_i"); var index_count_limit = $(this).attr("data-index_count_limit"); var href = $(this).attr("href").replace( "https://e-senmon.jp/", "" ); search_loadmore_loadmore_index( id, id_url, index_count_i, index_count_limit, href ); return false; }); function virtual_modelhouse_loadmore_loadmore_index( id, id_url, index_count_i, index_count_limit, href ){ $("#container > div#groundbase > article[id^='virtual_modelhouse_'] > div > div.body > ul.virtual_modelhouse > li > a.load_more img").fadeOut(300).remove(); $.ajax({ url: "https://e-senmon.jp/ajax_virtual_modelhouse_load.php", data: "id=" + id + "&id_url=" + id_url + "&index_count_i=" + index_count_i + "&index_count_limit=" + index_count_limit + "&archive_year_month=", success: function(data, dataType){ var scrolltop = $(".load_more").offset().top - 400; $("#container > div#groundbase > article[id^='virtual_modelhouse_'] > div > div.body > ul.virtual_modelhouse > li > a.load_more").parent().remove(); var target = $("#container > div#groundbase > article[id^='virtual_modelhouse_'] > div > div.body > ul.virtual_modelhouse"); var before_height = target.outerHeight() target.css("height", before_height).append( data ); var after_height = target.css("height","auto").outerHeight(); target.css("height", before_height).css("overflow","hidden"); target.animate({"height": after_height},1000, 'swing', function() { $(this).css("overflow","visible").css("height","auto"); } ); $('html,body').animate({ scrollTop: scrolltop }, '2000', 'swing'); $("img.preload:not('.loaded')").each(function(){ $(this).imagesLoaded(function(){ $(this).addClass("loaded"); }); }); }, complete: function(XMLHttpRequest, textStatus){ }, error: function(XMLHttpRequest, textStatus, errorThrown){ } }); } $(document).on("click", "#container > div#groundbase > article[id^='virtual_modelhouse_'] > div > div.body > ul.virtual_modelhouse > li > a.load_more.ajax", function(){ var id = $(this).attr("data-id"); var id_url = $(this).attr("data-id_url"); var index_count_i = $(this).attr("data-index_count_i"); var index_count_limit = $(this).attr("data-index_count_limit"); var href = $(this).attr("href").replace( "https://e-senmon.jp/", "" ); virtual_modelhouse_loadmore_loadmore_index( id, id_url, index_count_i, index_count_limit, href ); return false; }); function htmlEncode(value){ return $('
').text(value).html(); } function htmlDecode(value){ return $('
').html(value).text(); } function create_fullcalendar(){ // Google Calender feed $('#calendar_tomii').fullCalendar({ googleCalendarApiKey: 'AIzaSyARQZH1G-VqGLNJMz21rHu1hMc9OotNgAk', eventSources:[ { googleCalendarId: 'info@lifesnap.jp', className:"event_set_1" }, { googleCalendarId:"japanese__ja@holiday.calendar.google.com", className:"event_set_2" }, { googleCalendarId:"lifesnap.jp_06ijuvifgtbq3p374gtdbjdnak@group.calendar.google.com", className:"event_set_3" } ], timeFormat: "H:mm", loading: function(bool) { if (bool) { $(this).parent().find('.cal_loading').show(); }else{ $(this).parent().find(".cal_loading").fadeOut(200); $(this).find(".fc-event-time").parent().addClass("single_day"); $(this).find(".fc-event-time").parent().parent().addClass("single_day_wrapper"); } } }); $(document).on("click", "a.fc-day-grid-event", function(){ return false; }); } $("img.preload:not('.loaded')").each(function(){ $(this).imagesLoaded(function(){ $(this).addClass("loaded"); }); }); });