1// JavaScript Document 2const isSP = $(window).width() < 767 ? true : false; 3$(window).on('load', function() { 4 objectFitImages('.ofi_sd, .ofi_cover, .ofi_contain'); 5 // #ã§å§ã¾ãã¢ã³ã«ã¼ãã¯ãªãã¯ããå ´åã«å¦ç 6 $('a[href^="#"]').click(function() { 7 // ã¹ã¯ãã¼ã«ã®é度 8 var speed = 600; // ããªç§ 9 // ã¢ã³ã«ã¼ã®å¤åå¾ 10 var href = $(this).attr("href"); 11 // ç§»åå ãåå¾ 12 var target = $(href === "#" || href === "" ? 'html' : href); 13 // ç§»åå ãæ°å¤ã§åå¾ 14 var position = target.offset().top; 15 // ã¹ã ã¼ã¹ã¹ã¯ãã¼ã« 16 $('body,html').animate({scrollTop: position}, speed, 'swing'); 17 return false; 18 }); 19 //ppcãã¿ã³æ 20 $('a.ppc_number').each(function() { 21 $(this).attr('href', 'tel:' + $(this).data('ppc_number')); 22 }); 23 //ãããã¼ï¼ã°ããã 24 //ã¡ã¬ããããããã¯ã¹ãªã¼ãã³ï¼ã¯ãã¼ãº 25 var scrollpos;//ã¹ã¯ãã¼ã«ä½ç½®ä¿åç¨ 26 var opened_mega_drop = ''; 27 var fade_speed = 150; 28 var open_modal_target; 29 $('.mega_drop_check').change(function() { 30 open_modal_target = $(this).data('target'); 31 open_modal(open_modal_target); 32 }); 33 function open_modal(target) { 34 var overlay_position = $('header').outerHeight() + $('.global_nav').outerHeight(); 35 $('.overlay').css('top', overlay_position); 36 overlay_height(overlay_position); 37 if (!opened_mega_drop) { //ä½ãéããã¦ããªãã¨ã 38 $('.overlay, #' + target).fadeIn(fade_speed);//ã¡ã¬ããããããã¯ã¹ã表示 39 opened_mega_drop = target; 40 $('.' + opened_mega_drop + '_tab').addClass('active');//ã¿ããã¢ã¯ãã£ãã«ãã 41 } else { //ãªã«ãéãã¦ããã¨ã 42 if (opened_mega_drop === target) { 43 $('.' + opened_mega_drop + '_tab').removeClass('active');//ã¿ããéã¢ã¯ãã£ãã«ãã 44 $('.overlay, #' + target).fadeOut(fade_speed);//ã¡ã¬ããããããã¯ã¹ãé表示 45 opened_mega_drop = ''; 46 } else { 47 $('.' + opened_mega_drop + '_tab').removeClass('active');//ã¿ããéã¢ã¯ãã£ãã«ãã 48 $('#' + opened_mega_drop).css('display', 'none'); 49 $('#' + target).fadeIn(fade_speed);//ã¡ã¬ããããããã¯ã¹ã表示 50 opened_mega_drop = target; 51 $('.' + opened_mega_drop + '_tab').addClass('active');//ã¿ããã¢ã¯ãã£ãã«ãã 52 } 53 } 54 overlay_height(overlay_position); 55 } 56 $('.overlay').click(function() { 57 $('.mega_drop_check').prop('checked', false); 58 $('.' + opened_mega_drop + '_tab').removeClass('active');//ã¿ããéã¢ã¯ãã£ãã«ãã 59 $('.overlay, #' + open_modal_target).fadeOut(fade_speed);//ã¡ã¬ããããããã¯ã¹ãé表示 60 opened_mega_drop = ''; 61 }); 62 $('.overlay .panel_body').click(function(event) { 63 event.stopPropagation(); 64 }); 65 function overlay_height(overlay_position) { 66 $('.overlay').css('height', 'auto'); 67 var overlay_height = $(document).height() - overlay_position; 68 $('.overlay').css('height', overlay_height); 69 } 70 //ã¹ã¯ãã¼ã«ã¹ããããã 71 function scroll_stop() { 72 var scrollpos; 73 var scroll_bar; 74 scroll_bar = window.innerWidth - $(window).width(); 75 scrollpos = $(window).scrollTop(); 76 $('body').addClass('fixed').css({'top': -scrollpos, 'padding-right': scroll_bar + 'px'}); 77 return scrollpos; 78 } 79 //ã¹ã¯ãã¼ã«åéãã 80 function scroll_start(scrollpos) { 81 $('body').removeClass('fixed').css({'top': 0, 'padding-right': 0}); 82 window.scrollTo(0, scrollpos); 83 } 84 //ããã¿ã¼ 85 set_box_height('footer_sitemap_box'); 86 function set_box_height(str) { 87 var box_height = []; 88 var max_height; 89 $('.' + str).each(function() { 90 box_height.push($(this).outerHeight()); 91 max_height = Math.max.apply(null, box_height); 92 }); 93 $('.' + str).css('height', max_height); 94 } 95 // ã¿ãã§è¡¨ç¤ºå 容åãæ¿ã 96 var opened_brand;//åæç¶æ 97 $('.brand_open').each(function() { 98 if ($(this).prop('checked')) { 99 opened_brand = $(this).attr('id'); 100 $('label[for="' + opened_brand + '"]').addClass('brand_opend'); 101 } 102 }); 103 //ã¿ããåãæ¿ãã£ãã¨ã 104 $('.brand_open').change(function() { 105 $('label[for="' + opened_brand + '"]').removeClass('brand_opend');//ã¿ããæ¼ããããã«ãã 106 $('#' + opened_brand).prop('checked', false); 107 opened_brand = $(this).attr('id'); 108 $('label[for="' + opened_brand + '"]').addClass('brand_opend'); 109 }); 110 $('#epark_common_groupheader').click(function() { 111 //modalåé¤ 112 if ($(this).hasClass('active')) { 113 $('#epark_common_groupmodal').stop(true, false).slideUp('fast', 114 function() { 115 $('#epark_common_groupheader').removeClass('active'); 116 }); 117 } else { 118 //modal表示 119 $('#epark_common_groupmodal').stop(true, false).slideDown('fast'); 120 $('#epark_common_groupheader').addClass('active'); 121 // æ°ãã¡ã¹ãspå ±éããã²ã¼ã·ã§ã³ã¢ã¼ãã«ã®é«ããèªåèª¿æ´ 122 (function(target_class) { 123 var modal_iframe = document.getElementsByClassName(target_class); 124 var modal_iframe_element = modal_iframe[0]; 125 // è¦ç´ ãåå¾ã§ããªãå ´åãå¦ççµäº 126 if (!modal_iframe_element) { 127 return; 128 } 129 var modal_height = modal_iframe_element.style.height; 130 if (!modal_height) { 131 // æ¢åcssã®æå®å¤è§£é¤ 132 modal_iframe_element.style.height = 0; 133 var modal_auto_height = modal_iframe_element.contentWindow.document.body.scrollHeight; 134 modal_iframe_element.style.height = modal_auto_height + 'px'; 135 } 136 })('epark_common_groupmodal_iframe'); 137 } 138 }); 139 $('.epark_common_groupheader_close').click(function() { 140 if ($('#epark_common_groupheader').hasClass('active')) { 141 $('#epark_common_groupmodal').stop(true, false).fadeOut('fast', 142 function() { 143 $('#epark_common_groupheader').removeClass('active'); 144 } 145 ); 146 } 147 }); 148 window.addEventListener('message', function(e) { 149 if (e.origin === "http://www.epark.jp/event/special/thanks_members/") { 150 document.getElementById('content-frame').height = e.data; 151 } 152 }, false); 153 var scrollTop; 154 var mypage_open = $('#mypage_open'); // ãã¤ã¡ãã¥ã¼ã¢ã¼ãã«ID 155 let inobounceScript; 156 157 // ãã¤ã¡ãã¥ã¼å±éæã«ããã¼èªè¾¼ 158 mypage_open.on('click', function() { 159 // iOS端æ«ã®ãã¦ã³ã¹å¹æããªããããinobounce.jsä½¿ç¨ 160 inobounceScript = document.createElement('script'); 161 inobounceScript.src = INOBOUNCE_SCRIPT_SOURCE; 162 document.body.appendChild(inobounceScript); 163 }); 164 $('#sp_mymenu_overlay').click(function() { // #sp_mymenu_overlay ãã¤ã¡ãã¥ã¼ã®è¦ªè¦ç´ ãã¯ãªã㯠165 $("#mypage_open").prop('checked', false); // ã¡ãã¥ã¼éé夿ç¨ã®checkboxãå¤ã 166 $('body').removeClass('fixed').css({'top': 0, 'padding-right': 0}); 167 window.scrollTo(0, scrollpos); 168 iNoBounce.disable(); // iNoBounceç¡å¹ 169 document.body.removeChild(inobounceScript); 170 });
171 $('#sp_mymenu_overlay #sp_login_info_area').click(function(event) { // #sp_mymenu_overlay ã«éãªã£ã¦ããè¦ç´ ã«ã¯ã¤ãã³ããçºçãããªã 172 event.stopPropagation(); 173 }); 174 $('#sp_mymenu_overlay').find('a').on('click', function(event) { 175 event.preventDefault(); 176 var linkUrl = $(this).attr('href'); 177 var targetWindow = $(this).attr('target'); 178 $('#mypage_open').prop('checked', false); 179 scroll_start(scrollpos); 180 action(targetWindow); 181 // ããã«ãªã³ã¯å ã¸ã®é·ç§»ç´åã«å®è¡ããå 容ãè¨è¿° 182 function action(targetWindow) { 183 if (targetWindow) { 184 window.open(linkUrl, '_blank'); 185 return false; 186 } else { 187 location.href = linkUrl; 188 } 189 } 190 }); 191 //ç·æ¥ãç¥ããæ ã®è¡¨ç¤ºå¶å¾¡ 192 $(function() { 193 setTimeout(function() { 194 var emergency_info_pc_cnt; 195 var emergency_info_sp_cnt; 196 if (navigator.userAgent.match(/(iPhone|Android)/)) { 197 for (var i = 0; i <= 5; i++) { 198 emergency_info_sp_cnt = $('.emergency_info_sp').find('p').length; 199 } 200 if (emergency_info_sp_cnt) { 201 $('.emergency_info_sp').css('display', 'block'); 202 $('.hidden_txt').css('display', 'none'); 203 } 204 } else { 205 for (var i = 0; i <= 5; i++) { 206 emergency_info_pc_cnt = $('.emergency_info_pc').find('p').length; 207 } 208 if (emergency_info_pc_cnt) { 209 $('.emergency_info_pc').css('display', 'block'); 210 $('.hidden_txt').css('display', 'none'); 211 } 212 } 213 }, 1000); 214 }); 215 //totopãã¿ã³ 216 $(window).scroll(function() { 217 if ($(this).scrollTop() > 500) { 218 $('.totop_btn').fadeIn(); 219 } else { 220 $('.totop_btn').fadeOut(); 221 } 222 }); 223 if ($('.footer_ad').find('a').length > 0) { 224 $('.footer_ad').css('display', 'block'); 225 } 226 //SP ã¬ã®ã¥ã¬ã¼ã·ã§ã³ããã¿ã¼ãé«ãæã 227 var set_ecfe = []; 228 var set_ecfe_height = []; 229 var set_ecfe_cnt = 0; 230 $('.epark_common_footer_eparklink li:not(.full) a').each(function() { 231 set_ecfe_cnt++; 232 set_ecfe.push($(this)); 233 set_ecfe_height.push($(this).outerHeight()); 234 if (set_ecfe_cnt === 2) { 235 for (var i = 0; i < set_ecfe_cnt; i++) { 236 set_ecfe[i].css('height', Math.max.apply(null, set_ecfe_height) + 'px'); 237 } 238 set_ecfe = []; 239 set_ecfe_height = []; 240 set_ecfe_cnt = 0; 241 } 242 }); 243}); 244 245/* 空æºã«ã¬ã³ãã¼ã«å¿ããCVãã¿ã³å¹ãåºã表示 */ 246function displayCalloutByOccupiedState(target) { 247 if (!_.isUndefined($('.callout', target).data('genre_id')) && 248 (_.isEqual($('.callout', target).data('genre_id'), GENRE_ID.medical) || 249 _.isEqual($('.callout', target).data('genre_id'), GENRE_ID.dentistry) || 250 _.isEqual($('.callout', target).data('genre_id'), GENRE_ID.relaxation))) { 251 if (isCanReservationToday(target)) { 252 $('.callout_today', target).css({'display': 'inline-block',}); 253 $('.callout', target).css({'width': '95px'}); 254 } 255 if (isCanReservationTomorrow(target)) { 256 $('.callout_tomorrow', target).css({'display': 'inline-block'}); 257 $('.callout', target).css({'width': '95px'}); 258 } 259 if (isCanReservationToday(target) && isCanReservationTomorrow(target)) { 260 $('.callout', target).css({'width': '160px'}); 261 } 262 } 263} 264 265/* å¹ãåºã表示å¤å® */ 266function isDisplayCallout(reservationButtonArea, occupiedStateArea) { 267 if (_.isUndefined($('.callout', reservationButtonArea).data('genre_id'))) { 268 return false; 269 } 270 271 if (_.isEqual($('.callout', reservationButtonArea).data('genre_id'), GENRE_ID.medical) 272 || _.isEqual($('.callout', reservationButtonArea).data('genre_id'), GENRE_ID.dentistry) 273 || _.isEqual($('.callout', reservationButtonArea).data('genre_id'), GENRE_ID.relaxation)) { 274 if (isCanReservationToday(occupiedStateArea)) { 275 return true; 276 } 277 if (isCanReservationTomorrow(occupiedStateArea)) { 278 return true; 279 } 280 return false; 281 } 282 return true; 283} 284 285/* 空æºã«ã¬ã³ãã¼ã®ä»æ¥ç©ºãããããã®å¤å® */ 286function isCanReservationToday(target) { 287 if ($('.dataTable', target).length === 0) { 288 return false;
289 } 290 // ã«ã¬ã³ãã¼ã®ä»æ¥ã®æ¥ç¨ã®è¦ç´ åå¾ 291 var isCanReservationToday = $('.dataTable tr:nth-child(2) td:first-child', target).data('is_can_reservation'); 292 if (_.isUndefined(isCanReservationToday)) { 293 return false; 294 } 295 return isCanReservationToday; 296} 297 298/* 空æºã«ã¬ã³ãã¼ã®ææ¥ç©ºãããããã®å¤å® */ 299function isCanReservationTomorrow(target) { 300 if ($('.dataTable', target).length === 0) { 301 return false; 302 } 303 304 // ã«ã¬ã³ãã¼ã®ææ¥ã®æ¥ç¨ã®è¦ç´ åå¾ 305 var isCanReservationTomorrow = $('.dataTable tr:nth-child(2) td:nth-child(2)', target).data('is_can_reservation'); 306 if (_.isUndefined(isCanReservationTomorrow)) { 307 return false; 308 } 309 return isCanReservationTomorrow; 310}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.