1let globalSubNavActive = false; 2let globalSubNavActiveElement = null; 3let globalNavContainerHoverElement = null; 4 5/* -------------------------------------------------------------------------------- 6 ãã¼ã¸ï¼HTMLï¼èªã¿è¾¼ã¿å®äºæã®å¦ç 7-------------------------------------------------------------------------------- */ 8$(function () { 9 // åæå 10 // initSlick(); 11 initPage(); 12}); 13 14/* -------------------------------------------------------------------------------- 15 å ¨ã¦ã®ãã¡ã¤ã«èªã¿è¾¼ã¿å®äºã¤ãã³ã 16-------------------------------------------------------------------------------- */ 17$(window).on("load", function() { 18}); 19 20/* -------------------------------------------------------------------------------- 21 ã¹ã¯ãã¼ã«ã¤ãã³ã 22-------------------------------------------------------------------------------- */ 23$(window).on("scroll", scrollEvent); 24function scrollEvent() { 25 let pageTopBtn = $(".pagetop-button"); 26 if ($(window).scrollTop() > 100) { 27 pageTopBtn.addClass("show"); 28 } 29 else { 30 pageTopBtn.removeClass("show"); 31 } 32 33 // ããã¯ã¢ãããã£ã³ãã¼ã³ 34 let pickupCampaign = $(".pickup_campain"); 35 if ($(window).scrollTop() > 100 && $(window).scrollTop() + $(window).height() < $("footer").offset().top) { 36 pickupCampaign.addClass("show"); 37 } 38 else { 39 pickupCampaign.removeClass("show"); 40 } 41} 42 43/* -------------------------------------------------------------------------------- 44 ãªãµã¤ãºã¤ãã³ã 45-------------------------------------------------------------------------------- */ 46$(window).on('resize',resizeEvent); 47function resizeEvent() { 48 initColorBox(); 49}; 50 51/* -------------------------------------------------------------------------------- 52 ãã¼ã¸ããããã¿ã³ 53-------------------------------------------------------------------------------- */ 54$(document).on("click", ".pagetop-button", function(e) { 55 e.preventDefault(); 56 $("body,html").animate({ 57 scrollTop: 0 58 }, 600, "swing"); 59}); 60 61/* -------------------------------------------------------------------------------- 62 ã°ãã¼ãã«ããã²ã¼ã·ã§ã³ã®ãã¦ã¹ãªã¼ãã¼ã¤ãã³ãï¼PCåãï¼ 63-------------------------------------------------------------------------------- */ 64$(".global .global-nav-container").hover(function () { 65 if (isSP()) { return false; } 66 67 globalNavContainerHoverElement = $(this); 68 setTimeout(function () { 69 if (globalNavContainerHoverElement == null) { return; } 70 71 showGlobalSubNav(globalNavContainerHoverElement); 72 }, 100); 73}, function () { 74 if (isSP()) { return false; } 75 76 globalNavContainerHoverElement = null; 77 hideGlobalSubNav(); 78}); 79 80/* -------------------------------------------------------------------------------- 81 ã°ãã¼ãã«ããã²ã¼ã·ã§ã³ã®ã¯ãªãã¯ã¤ãã³ãï¼SPåãï¼ 82-------------------------------------------------------------------------------- */ 83$(document).on("click", ".global .global-nav-container", function(e) { 84 if (isSP()) { 85 if (e.target.closest(".global-sub_nav-wrapper") != null) { return; } 86 87 if ($(this).find(".global-sub_nav-wrapper").length) { 88 e.preventDefault(); 89 90 if (globalSubNavActive && $(this).index() == globalSubNavActiveElement.closest(".global-nav-container").index()) { 91 hideGlobalSubNav(); 92 } 93 else { 94 showGlobalSubNav($(this)); 95 } 96 } 97 } 98}); 99 100function showGlobalSubNav(element) { 101 if (element.find(".global-sub_nav-wrapper").length) { 102 $(".global-filter").addClass("show"); 103 104 if (globalSubNavActiveElement != null) { 105 globalSubNavActiveElement.removeClass("show"); 106 } 107 globalSubNavActiveElement = element.find(".global-sub_nav-wrapper"); 108 globalSubNavActiveElement.addClass("show"); 109 110 if (!$(".global-nav-button.show").length) { 111 let height = element.find(".global-sub_nav-wrapper").outerHeight(); 112 $(".global-sub_nav-bg").css("height", height); 113 globalSubNavActive = true; 114 } 115 } 116 else { 117 globalSubNavActive = false; 118 } 119 setTimeout(function () { 120 if (!globalSubNavActive) { 121 $(".global-filter").removeClass("show"); 122 $(".global-sub_nav-bg").css("height", 0); 123 if (globalSubNavActiveElement != null) { 124 globalSubNavActiveElement.removeClass("show"); 125 globalSubNavActiveElement = null; 126 } 127 } 128 }, 500); 129} 130 131function hideGlobalSubNav(delay = null) { 132 if (!$(".global-nav-button.show").length) { 133 globalSubNavActive = false;
134 if (delay == null) { delay = isSP() ? 0 : 500; } 135 136 setTimeout(function () { 137 if (!globalSubNavActive) { 138 $(".global-filter").removeClass("show"); 139 $(".global-sub_nav-bg").css("height", 0); 140 if (globalSubNavActiveElement != null) { 141 globalSubNavActiveElement.removeClass("show"); 142 globalSubNavActiveElement = null; 143 } 144 } 145 }, delay); 146 } 147} 148 149/* -------------------------------------------------------------------------------- 150 ã°ãã¼ãã«ããã²ã¼ã·ã§ã³é»ãã£ã«ã¿ã¼ã®ã¯ãªãã¯ã¤ãã³ã 151-------------------------------------------------------------------------------- */ 152$(document).on("click", ".global-filter.show", function(e) { 153 hideGlobalSubNav(); 154}); 155 156/* -------------------------------------------------------------------------------- 157 ãããã¼ãµãããã²ã¼ã·ã§ã³ã®ã¯ãªãã¯ã¤ãã³ã 158-------------------------------------------------------------------------------- */ 159$(document).on("click", ".global-sub_nav-container a", function(e) { 160 let from = location.origin + location.pathname + location.search; 161 let to = $(this).prop("href"); 162 163 // åããã¼ã¸å ã®å ´åã®ã¿å¯¾å¿ 164 if (from == to.substring(0, to.indexOf("#"))) { 165 e.preventDefault(); 166 167 // ã·ã§ã¼ãã«ããã®æå®ããã£ãããã¼ã¸ã®è¡¨ç¤ºåã«ã¹ã¯ãã¼ã«ããã¦ãã 168 let href = $(this).attr("href"); 169 let index = href.indexOf("#"); 170 let hash = href.substring(index); 171 if ($(hash).length) { 172 let offset = ($(".global-sp-header").is(':visible')) ? 0 : $(".global-scroll").outerHeight(); 173 $("body,html").animate({ 174 scrollTop: $(hash).offset().top - offset 175 }, 600, "swing"); 176 177 // ã¹ãããªãã¡ãã¥ã¼ãéãã 178 if ($(".global-nav-button.show").length) { 179 $("body > .global-nav-button").click(); 180 } 181 } 182 } 183}); 184 185/* -------------------------------------------------------------------------------- 186 ãããã¼ãµãããã²ã¼ã·ã§ã³ éãããã¿ã³ã®ã¯ãªãã¯ã¤ãã³ã 187-------------------------------------------------------------------------------- */ 188$(document).on("click", ".global-sub_nav-close", function(e) { 189 hideGlobalSubNav(0); 190}); 191 192/* -------------------------------------------------------------------------------- 193 ããã¿ã¼ããã²ã¼ã·ã§ã³ã®ã¯ãªãã¯ã¤ãã³ã 194-------------------------------------------------------------------------------- */ 195$(document).on("click", ".footer-link-container h6", function(e) { 196 $(this).next().slideToggle(); 197}); 198 199/* -------------------------------------------------------------------------------- 200 Slickããã²ã¼ã·ã§ã³ã®ã¯ãªãã¯ã¤ãã³ã 201-------------------------------------------------------------------------------- */ 202$(document).on("click", ".slick-nav button", function(e) { 203 e.preventDefault(); 204 205 let index = $(".slick-nav li").index($(this).parent()); 206 $(".slick-slider").slick("slickGoTo", index); 207}); 208 209/* -------------------------------------------------------------------------------- 210 ãã¼ã¸ã®åæå 211-------------------------------------------------------------------------------- */ 212function initPage() { 213 initColorBox(); 214 215 // ã·ã§ã¼ãã«ããã®æå®ããã£ãããã¼ã¸ã®è¡¨ç¤ºåã«ã¹ã¯ãã¼ã«ããã¦ãã 216 let href = "" + location; 217 let index = href.indexOf("#"); 218 if (index != -1) { 219 let hash = href.substring(index); 220 if ($(hash).length) { 221 let offset = ($(".global-sp-header").is(':visible')) ? 0 : $(".global-scroll").outerHeight(); 222 window.scrollTo(0, $(hash).offset().top - offset); 223 } 224 } 225} 226 227/* -------------------------------------------------------------------------------- 228 Colorboxã®åæå 229-------------------------------------------------------------------------------- */ 230function initColorBox() { 231 $(".popup-image").colorbox({ 232 maxWidth: "80%", 233 maxHeight: "80%", 234 transition: "fade", 235 speed: 400, 236 scrolling: false, 237 fixed: true, 238 opacity: 0.75, 239 overlayClose: true, 240 }); 241 242 let aspect = $(window).width() / $(window).height(); 243 let width = (aspect < 16 / 9) ? $(window).width() * 1 : $(window).height() * 0.8 * 16 / 9; 244 let height = (aspect < 16 / 9) ? $(window).width() * 1 * 9 / 16 : $(window).height() * 0.8; 245 $(".popup-movie").colorbox({ 246 iframe: true, 247 transition: "fade", 248 speed: 400, 249 scrolling: false, 250 fixed: true, 251 opacity: 0.75, 252 overlayClose: true, 253 innerWidth: width, 254 innerHeight: height, 255 }); 256} 257 258/* -------------------------------------------------------------------------------- 259 Slickã®åæå 260-------------------------------------------------------------------------------- */ 261// function initSlick() { 262// $(".slick-slider").not('.slick-initialized').slick({
263// infinite: true, 264// dots: false, 265// fade: true, 266// //centerMode: true, 267// //centerPadding: '5%', 268// autoplay: true, 269// }).on("beforeChange", function(event, slick, currentSlide, nextSlide) { 270// // $(".slick-nav").removeClass().addClass("view"+(nextSlide+1)); 271// // var navX = -178 * nextSlide; 272// $(".slick-nav li").each(function() { 273// $(this).removeClass("selected"); 274// }); 275// $(".slick-nav li").eq(nextSlide).addClass("selected"); 276// }); 277// } 278 279/* -------------------------------------------------------------------------------- 280 URLã¯ã¨ãªãã©ã¡ã¼ã¿ã®åå¾ 281-------------------------------------------------------------------------------- */ 282function getQueryParam(name, url) { 283 if (!url) { 284 url = window.location.href; 285 } 286 name = name.replace(/[\[\]]/g, "\\$&"); 287 let regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"); 288 let results = regex.exec(url); 289 if (!results) return null; 290 if (!results[2]) return ''; 291 return decodeURIComponent(results[2].replace(/\+/g, " ")); 292} 293 294/* -------------------------------------------------------------------------------- 295 ã¹ããå¤å® 296-------------------------------------------------------------------------------- */ 297function isSP() { 298 return window.matchMedia( "(max-width: 979px)" ).matches; 299}
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.