1let In2Common = {}; 2 3// remodalã®è¤æ°éãã®å¯¾å¿ 4let g_arrStackModal = []; 5 6jQuery(document).ready(function(){ 7 /** 8 * 管çç»é¢ã®ãããã¼ãã¼ãããå ´åã®èª¿æ´ 9 */ 10 if(document.getElementById("wpadminbar")) { 11 let contents_padding = parseInt(jQuery("#contents").css("padding-top").replace("px", "")); 12 13 // 管çç»é¢ã®ãã¼ã®é«ãåãã©ã¹ãã 14 contents_padding += 32; 15 16 // paddingãå ¥ãã 17 jQuery("header").css("top", 32); 18 jQuery("#contents").css("padding-top", contents_padding); 19 jQuery("#header_submenu").css("padding-top", contents_padding); 20 } 21 22 // ç»åé å»¶èªè¾¼ã¿ 23 in2cart_lazy(); 24 25 //ãã¼ã¸TOPã¸æ»ã 26 //topBtnã¯10è¡ç®ãããä¸ã®ã$(window).on('scroll', function()ãã§ä½¿ç¨ãã¦ãã 27 var topBtn = $('p.pagetop'); 28 topBtn.hide(); 29 jQuery('p.pagetop a').click(function(){ 30 jQuery('html,body').animate({ 31 scrollTop: 0 32 }, 300); 33 return false; 34 }); 35 36 //-------------------------------------------------------- 37 //ãããã¹ã¯ãã¼ã«fix 38 //-------------------------------------------------------- 39 $header = $('header'); 40 jQuery(window).on('scroll load', function() { 41 let scrollTop = $(this).scrollTop(); 42 if (scrollTop > 100) { 43 $header.addClass('fixed'); 44 } else { 45 $header.removeClass('fixed'); 46 } 47 48 // TOPã¸ãæ»ããã¿ã³ 49 if ($(this).scrollTop() > 100) { 50 topBtn.fadeIn(); 51 } else { 52 topBtn.fadeOut(); 53 } 54 }); 55 56 // éµä¾¿çªå·ã®èªåä¿ç®¡ 57 try { 58 jQuery('#zip').jpostal({ 59 postcode : [ 60 '#zip' 61 ], 62 address : { 63 '#pref' : '%3', 64 '#address1' : '%4%5', 65 } 66 }); 67 jQuery('#delivery_zip').jpostal({ 68 postcode : [ 69 '#delivery_zip' 70 ], 71 address : { 72 '#delivery_pref' : '%3', 73 '#delivery_address1' : '%4%5', 74 } 75 }); 76 jQuery('#shipper_zip').jpostal({ 77 postcode : [ 78 '#shipper_zip' 79 ], 80 address : { 81 '#shipper_pref' : '%3', 82 '#shipper_address1' : '%4%5', 83 } 84 }); 85 } catch(e) {} 86 87 //MW WP Formã®ã»ã¯ã¬ã¯ãã®ã鏿ãã¦ãã ãããã®ã¨ã©ã¼ 88 jQuery('div[id^=mw_wp_form_mw-wp-form-] select option[value=""]').html('鏿ãã¦ãã ãã'); 89 90 //ã¢ã³ã«ã¼ç§»åã®èª¿æ´ 91 try { 92 var headerHight = (g_is_pc) ? 130 : 170; 93 jQuery('a[href^="#"]').click(function(){ 94 // Smart Sliderã¯é¤å¤ 95 if($(this).hasClass("n2-ow")) return false; 96 var href= $(this).attr("href"); 97 var target = $(href == "#" || href == "" ? 'html' : href); 98 var position = target.offset().top - headerHight; 99 $("html, body").animate({scrollTop:position}, 550, "swing"); 100 return false; 101 }); 102 } catch(e){} 103 104 //ç»åã®hover 105 $("a img").not('.online_design_list .thumbnail img').hover(function(){ 106 $(this).fadeTo(200, 0.6); 107 },function(){ 108 $(this).fadeTo(200, 1.0); 109 }); 110 111 //ã©ã¤ãããã¯ã¹ 112 $(".boxer").boxer(); 113 114 // æãããã¿ 115 jQuery("dl.toggle dt").click(function() { 116 jQuery(this).next().slideToggle(); 117 if(jQuery(this).hasClass("open")) { 118 jQuery(this).removeClass("open"); 119 } else { 120 jQuery(this).addClass("open"); 121 } 122 }); 123 124 /** 125 * ãããã¼ã¡ãã¥ã¼ã®å¶å¾¡ 126 */ 127 if(!g_is_step_page) { 128 // ãµãã¡ãã¥ã¼ãç§»å 129 jQuery("#menu-header nav.children").each(function() { 130 jQuery("#header_submenu").append(jQuery(this).clone(true).hide()); 131 jQuery(this).remove(); 132 }); 133 134 // ã¯ãªã㯠135 jQuery("#menu-header li").click(function() { 136 let $li = jQuery(this); 137 138 // ãããã¼ã«è£ 飾 139 jQuery("header").removeClass("menu_click"); 140 141 // ãªã¼ãã¼ã¬ã¤åé¤ 142 jQuery("#header_overlay_id").remove(); 143 144 // ã¡ãã¥ã¼ã®è¡¨ç¤ºä½ç½®ãåå¾ 145 let menu_order = jQuery($li).data("menu_order"); 146 147 // è¦ç´ ãåå¾ 148 let $window = jQuery(window), 149 $html = jQuery('html'), 150 $body = jQuery('body'), 151 $header = jQuery('header'), 152 scrollbar_width = window.innerWidth - document.body.scrollWidth, 153 touch_start_y; 154 155 // 表示å¤å® 156 if(jQuery("#menu_panel_" + menu_order).is(":hidden")) { 157 158 // 䏿¦å ¨ã¦é表示 159 jQuery("#header_submenu nav.children").hide(); 160 jQuery("#menu-header li").removeClass("active"); 161 162 // 表示 163 jQuery("#menu_panel_" + menu_order).show(); 164 165 // ãªã¼ãã¼ã¬ã¤ 166 jQuery("body").append('<div id="header_overlay_i
166d" class="header_overlay"></div>'); 167 168 // ãããã¼ã«è£ 飾 169 jQuery("header").addClass("menu_click"); 170 171 // ã¡ãã¥ã¼è¡¨ç¤º 172 jQuery("#header_submenu").slideDown("normal", function() { 173 jQuery("#header_submenu").scrollTop(0); 174 175 // header_submenuã®é«ããè¨å®ãã 176 // è¨å®ããäºã«ããé«ããçãå ´åã¯ãå¾ãã®bodyãè¦ããããã«ãªã 177 let panel_height = jQuery("#menu_panel_" + menu_order).outerHeight(true); 178 let header_height = jQuery("header").height(); 179 let window_height = jQuery(window).height(); 180 if(window_height < (header_height + panel_height)) { 181 jQuery("#header_submenu").css("height", "auto"); 182 jQuery("#header_submenu").css("bottom", 0); 183 184 } else { 185 jQuery("#header_submenu").css("height", header_height + panel_height); 186 jQuery("#header_submenu").css("bottom", ""); 187 } 188 }); 189 190 // ãããã¼ã¡ãã¥ã¼ã®ãã¿ã³ã®ãã¶ã¤ã³ã¯ã©ã¹ 191 $li.addClass("active"); 192 193 // å¾ãã®bodyãã¹ã¯ãã¼ã«ããªãããã«å¶å¾¡ 194 jQuery('html, body').css('overflow', 'hidden'); 195 $html.css('padding-right', scrollbar_width); 196 $header.css('padding-right', scrollbar_width); 197 } else { 198 // ã¡ãã¥ã¼é表示 199 jQuery("#menu_panel_" + menu_order).hide(); 200 jQuery("#header_submenu").slideUp(); 201 jQuery("#menu-header li").removeClass("active"); 202 203 // å¾ãã®bodyãã¹ã¯ãã¼ã«ããªãããã«å¶å¾¡ 204 $html.removeAttr('style'); 205 $header.css('padding-right', 0); 206 $body.removeAttr('style'); 207 } 208 }); 209 } 210 211 // Modaal(ã·ã¹ãã ç¨ãèæ¯ã¯ãªãã¯ã®ããã¯å) 212 jQuery(".modaal_trigger_lock").each(function(index, element) { 213 let id = jQuery(element).attr("id"); 214 jQuery("#" + id).modaal({ 215 hide_close: true, 216 is_locked: true 217 }); 218 }); 219}); 220 221/** 222 * ã¢ã¼ãã«ãéãã 223 * @param {element} self 224 */ 225In2Common.closeModal = function(self) { 226 // let that = this; 227 let id = jQuery(self).closest(".modaal-wrapper").attr("id"); 228 jQuery('[data-modaal-scope="' + id + '"]').modaal("close"); 229} 230 231// remodaã®éããã¤ãã³ã 232jQuery(document).on('closed', '.remodal', function (e) { 233 // è¤æ°ã¢ã¼ãã«ã®éããæã®éããã¢ã¼ãã«ã®å¦ç 234 if(0 < g_arrStackModal.length) { 235 jQuery("#" + g_arrStackModal[g_arrStackModal.length - 1]).remodal().open(); 236 g_arrStackModal.pop(); 237 } 238}); 239 240/** 241 * ãµãã¡ãã¥ã¼ã®éãããã¿ã³ 242 * 243 * @param {element} self 244 */ 245function in2cart_submenu_close(self) { 246 let arrId = jQuery(self).closest("nav.children").attr("id").split("_"); 247 if(arrId.length == 3) { 248 let menu_order = arrId[2]; 249 250 jQuery("#menu-header li").each(function() { 251 if(jQuery(this).data("menu_order") == menu_order) { 252 jQuery(this).click(); 253 return false; 254 } 255 }); 256 } 257} 258 259/** 260 * ãã©ã¤ãã·ã¼ã®åæ 261 * 262 * @param {string} key 263 */ 264function in2cart_privacy(self) { 265 jQuery(self).closest(".cookie_privacy").fadeOut("normal", function() { 266 jQuery("footer").removeClass("privacy_doui_not"); 267 }); 268 jQuery.cookie("privacy_doui", 1, {expires: 365, path: "/"}); 269} 270 271/** 272 * éè¦ãªãç¥ããã®éãããã¿ã³ 273 * 274 * @param {string} str_now_time 275 */ 276function in2cart_news_important(str_now_time) { 277 jQuery.cookie("news_notice", str_now_time, {expires: 365, path: "/"}); 278 jQuery("#notice_box").fadeOut("normal", function() { 279 jQuery("body").removeClass("notice"); 280 }); 281} 282 283/** 284 * ãã©ã¼ã ã®ã¨ã©ã¼åºå 285 * 286 * @param {array} hshError 287 * @param {boolean} IsError 288 */ 289function in2FormError(hshError, IsError) { 290 if(IsError) { 291 for(var key in hshError) { 292 jQuery("#" + key).addClass("in2form_input_error"); 293 var span = "<span class=\"in2form_input_error_message\">
293" + hshError[key] + "</span>"; 294 jQuery("#" + key).before(span); 295 } 296 } else { 297 jQuery(".in2form_input_error").removeClass("in2form_input_error"); 298 jQuery(".in2form_input_error_message").remove(); 299 } 300} 301 302/** 303 * æé表ãã«ã¼ããªã©ã§ä½¿ç¨ãããªã¼ãã¼ã¬ã¤ 304 * 305 * @param {string} type 306 */ 307function in2cart_create_overlay(type) { 308 if(type == "close") { 309 jQuery("#overlay").remove(); 310 } else { 311 var arrHtml = new Array(); 312 arrHtml.push('<div id="overlay"><img src="' + g_template_directory + '/images/loading_big.png"></div>'); 313 jQuery("body").append(arrHtml.join("")); 314 } 315} 316 317/** 318 * ã¢ã¼ãã«éãã 319 * 320 * @param {element} self 321 */ 322function in2cart_close_modal(self) { 323 var id = jQuery(self).closest(".remodal").attr("id"); 324 var modal = jQuery("#" + id).remodal(); 325 modal.close(); 326} 327 328/** 329 * ã¢ã¼ãã«ã®è¡¨ç¤º 330 * 331 * @param {string} id 332 */ 333function in2cart_open_modal(id) { 334 var modal = jQuery("#" + id).remodal(); 335 modal.open(); 336} 337 338/** 339 * URLã®ãã©ã¡ã¼ã¿ã¼åå¾ 340 * 341 * @param name {string} ãã©ã¡ã¼ã¿ã®ãã¼æåå 342 * @return url {url} 対象ã®URLæååï¼ä»»æï¼ 343 */ 344function in2cart_get_param(name, url) { 345 if (!url) url = window.location.href; 346 name = name.replace(/[\[\]]/g, "\\$&"); 347 var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), 348 results = regex.exec(url); 349 if (!results) return null; 350 if (!results[2]) return ''; 351 return decodeURIComponent(results[2].replace(/\+/g, " ")); 352} 353 354/** 355 * ãã¤ãã¼ã¸ãªã©ã®ãã¼ã¸ã³ã°ã®ã¯ãªã㯠356 * 357 * @param {string} page 358 */ 359function in2cart_pageing_click(page) { 360 jQuery('input[name=tpage]').val(page); 361 document.forms["form_search"].submit(); 362} 363 364/** 365 * æ¹è¡ã³ã¼ããbrã«å¤æ 366 * 367 * @param {string} val 368 * @returns 369 */ 370function in2cart_convert_br(val) { 371 val = val.replace(/\r\n/g, '\n'); 372 val = val.replace(/\r/g, '\n'); 373 val = val.replace(/\n/g, '<br>'); 374 return val; 375} 376 377/** 378 * æç¨¿/ãç¥ããã®singleãã¼ã¸ã§ã®æã®é¸æã®ãã§ã³ã¸ã¤ãã³ã 379 * @param {element} self 380 * @param {integer} term_id 381 */ 382function in2cart_change_archive_month(self, term_id) { 383 let url = jQuery(self).val(); 384 385 // ã«ãã´ãªã¼æ å ±ãä»å 386 let cat = ""; 387 if(0 < term_id) cat = "?cat=" + term_id; 388 document.location.href = url + cat; 389} 390 391/** 392 * ç»åã®é å»¶èªè¾¼ã¿ 393 * 394 */ 395function in2cart_lazy() { 396 var lazyImages = [].slice.call(document.querySelectorAll("img.lazy")); 397 398 if ("IntersectionObserver" in window) { 399 let lazyImageObserver = new IntersectionObserver(function(entries, observer) { 400 entries.forEach(function(entry) { 401 if (entry.isIntersecting) { 402 let lazyImage = entry.target; 403 lazyImage.src = lazyImage.dataset.src; 404 // lazyImage.srcset = lazyImage.dataset.srcset; 405 lazyImage.classList.remove("lazy"); 406 lazyImageObserver.unobserve(lazyImage); 407 // jQuery(lazyImage).hide().fadeIn(); 408 409 jQuery(lazyImage).css('opacity','1'); 410 jQuery(lazyImage).css('transform','translateY(0)'); 411 } 412 }); 413 }); 414 415 lazyImages.forEach(function(lazyImage) { 416 lazyImage.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"; 417 lazyImage.classList.add("fadein"); 418 lazyImageObserver.observe(lazyImage); 419 }); 420 } else { 421 // Possibly fall back to a more compatible method here 422 } 423} 424 425/** 426 * ã¦ã¼ã¶ã¼ã¨ã¼ã¸ã§ã³ããåå¾ 427 */ 428function in2cart_get_useragent() { 429 let userAgent = window.navigator.userAgent.toLowerCase(); 430 let result = "none"; 431 if(userAgent.indexOf('msie') != -1 || userAgent.indexOf('trident') != -1) { 432 result = "ie"; 433 } else if(userAgent.indexOf('edge') != -1) { 434 result = "edge"; 435 } else if(userAgent.indexOf('chrome') != -1) { 436 result = "chrome"; 437 } else if(userAgent.indexOf('safari') != -1) { 438 result = "safari"; 439 } else if(userAgent.indexOf('firefox') != -1) { 440 result = "firefox"; 441 } else if(userAgent.indexOf('opera') != -1) { 442 result = "opera"; 443 } 444 445 return result; 446} 447 448/** 449 * ãã©ã¦ã¶å¤å®ãsafariã 450 */ 451function in2cart_browser_is_safari() { 452 return (in2cart_get_useragent() == "safari") ? true : false;
vendor: 1 bytes, line 453
453}
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.