1function HH(){ 2 $('header#pattern2').css({minHeight: $('header#pattern2 .logo img').height() + parseInt($('header#pattern2 .logo').css('padding-top'), 10) + parseInt($('header#pattern2 .logo').css('padding-bottom'), 10)}); 3 $('header#pattern2 nav ul.nav_1st').css({minHeight: $('header#pattern2').height()*0.8 - $('header#pattern2 .wraper').height()*0.8}); 4 if(window.innerWidth > 900){ 5 $('header#pattern2 .logo').css({minHeight: $('header#pattern2').height()}); 6 } else { 7 $('header#pattern2 .logo').css({minHeight: "inherit"}); 8 } 9}; 10 11window.ResizeHead = function(){ 12 // ResizeNavs(); 13 HH(); 14 15 if(window.innerWidth <= 900) { 16 $('header.header_class:not(#pattern4)>#menu_head').appendTo('header.header_class .header_contents .inner'); 17 $('header.header_class:not(#pattern4) .header_contents').css({height: window.innerHeight - $('header').height()}); 18 if($('.translate').length){ 19 $('#google_translate_element').appendTo('.burger .sp_translate'); 20 } 21 } else { 22 $('header.header_class:not(#pattern4) .header_contents .inner #menu_head').appendTo('header.header_class'); 23 $('#menu_head').show(); 24 $('header.header_class:not(#pattern4) .header_contents').css({height: 'auto'}); 25 if($('.translate').length){ 26 $('#google_translate_element').appendTo('.header_col1 .translate'); 27 } 28 } 29 $('header#pattern4>#menu_head').appendTo('header.header_class .header_contents .inner'); 30 $('header#pattern4 .header_contents').css({height: window.innerHeight - $('header').height()}); 31 $('header#pattern4 #google_translate_element').appendTo('.burger .sp_translate'); 32 $('body').removeClass('scrolled'); 33 $('body').removeClass('scrolledHide'); 34 hh = find_header_height(); 35 36 $('header.header_class:not(.over)~#mv_outer, header.header_class:not(.over)~#lv_outer, header.header_class+#main, header.header_class+#pan').css({borderTop: 'transparent solid', borderTopWidth: hh}); 37 $('header.over~#mv_outer #mv .mv_text').css({paddingTop: hh}); 38 $('header.over~#lv_outer #lv').css({paddingTop: hh}); 39 $('header.over~#mv_outer #lv').css({paddingTop: hh}); 40 41 if ($('body#comparison_setting_page').length > 0) { 42 var lvContentHeight = $('body#comparison_setting_page header.over~#lv_outer #lv p').height(); 43 $('body#comparison_setting_page header.over~#lv_outer #lv').css({height: hh + lvContentHeight}); 44 } 45 46 if(window.innerWidth > 900 && $('header .header_contents .header_col1').css('flex-direction') == 'row'){ 47 $('body.scrolled header .header_col1 .tel').css({display: 'block'}); 48 } 49} 50 51$(function(){ 52 $('nav').css({overflow: 'hidden'}); 53 54 $( ".block_comparison_4 .inner_item .after" ).each(function(){ 55 let h = $(this).siblings('.before').height(); 56 $(this).css('min-height', h); 57 }) 58 59 /*---pagelink---*/ 60 61 var hash = location.hash; 62 if(hash){ 63 $('body,html').stop().scrollTop(0); 64 $(window).on('load', function(){ 65 pageScroll(hash); 66 }); 67 } 68 // $('a[href*=#][href!=#]:not(.no):not([target="_blank"])').click(function(){ 69 // var url = location.pathname; 70 // var href = $(this).attr("href"); 71 // var path = href.split('#');//path[0] 72 // //if(url.indexOf(path[0]) != -1){ 73 // if(url == path[0] || path[0] == ''){ 74 // pageScroll('#'+path[1]); 75 // return false; 76 // } 77 // }); 78 function pageScroll(i){ 79 var target = $(i === "#" || i === "" ? 'html' : i); 80 var position = target.offset().top; 81 if(position == 0){ 82 var offset = 0; 83 if($('#mv').length){ 84 offset = parseInt($('#mv').css('margin-top'), 10); 85 }else if($('#lv').length){ 86 offset = parseInt($('#lv').css('margin-top'), 10); 87 } 88 position = position - offset; 89 }else if(window.innerWidth < 900){ 90 position = position - find_header_height(); 91 } 92 $('body,html').animate({scrollTop: position}, 1000, 'easeInOutCubic'); 93 } 94 95 /*---delay---*/ 96 97 $('.delay').on('inview', function(event, isInView, visiblePartX, visiblePartY) { 98 if(isInView){ 99 $(this).stop().addClass('delayActive'); 100 } 101 }); 102 $('.delay1').on('inview', function(event, isInView, visiblePartX, visiblePartY) { 103 if(isInView){ 104 $(this).stop().addClass('delay1Active'); 105 } 106 }); 107 $('.delay2').on('inview', function(event, isInView, visiblePartX, visiblePartY) { 108 if(isInView){ 109 $(this).stop().addClass('delay2Active'); 110 } 111 }); 112 $('.delay3').on('inview', function(event, isInView, visiblePartX, visiblePartY) { 113 if(isInView){ 114 $(this).stop().addClass('delay3Active'); 115 } 116 }); 117 $('.delay4').on('inview', function(event, isInView, visiblePartX, visiblePartY) { 118 if(isInView){ 119 $(this).stop().addClass('delay4Active'); 120 } 121 }); 122 $(window).on('load', function(){ 123 $('.delay5 .content_wrapper>*').append('<i class="dl5"></i>'); 124 $('.delay5').on('inview', function(event, isInView, visiblePartX, visiblePartY) { 125 if(isInView){ 126 $(this).stop().addClass('delay5Active'); 127 } 128 }); 129 }); 130 131 /*----spnav----*/ 132 133 var sp_nav = 0; 134 $('.header_inner #menu').on( 135 'click', function(){ 136 if(sp_nav === 0){ 137 sp_nav = 1; 138 $('.header_inner nav').addClass('open'); 139 }else{ 140 sp_nav = 0; 141 $('.header_inner nav').removeClass('open'); 142 } 143 return false; 144 } 145 ); 146 147 /*----custom popup----*/ 148 149 var selectorLink = ''; 150 var dataS3Url = $('body').data('s3-url'); 151 152 if(dataS3Url !== undefined && dataS3Url !== '') { 153 selectorLink = dataS3Url 154 } 155 156 var parentSectionClass = "aaaa"; 157 var $parent; 158 var popCount; 159 var popIndex; 160 var popTxt; 161 var popTxt0; 162 163 var $popA = `a[href^="${selectorLink}"], a[href^="http://"][href*="no_image"][href$=".jpg"], a[href^="https://"][href*="no_image"][href$=".jpg"]`; 164 var $popB = `a[href^="http://"][href*="no_image"][href$=".jpg"], a[href^="https://"][href*="no_image"][href$=".jpg"], a[href^="${selectorLink}"]`; 165 166 setTimeout(function() { 167 $('body:not(.nopop) .pop').find($popA).on( 168 'click', function(){ 169 if ($(this).attr('target') == '_blank' || $(this).parent().is('p')) { 170 window.open($(this).attr("href"), '_blank'); 171 return; 172 } 173 174 var img = new Image(); 175 img.src = $(this).attr("href"); 176 if($(this).find(".infotxt").length){ 177 popTxt = $(this).find(".infotxt").html(); 178 } 179 parentSectionClass = $(this).parents('#main>*, #common_footer>*').attr('class'); 180 $parent = $(this).parents('.pop'); 181 popCount = $parent.find($popA).length; 182 popIndex = $parent.find($popA).index(this); 183 if(parentSectionClass.indexOf('gallery_archive') !== -1){ 184 if(parentSectionClass.indexOf('add_design2') == -1 && parentSectionClass.indexOf('add_design3') == -1 && $(this).find(".infotxt").length){ 185 $('body').append('<div class="popup"><div class="popimg"><div><div class="popimgwrap"><img src="'+img.src+'" alt=""><div class="poptxt">'+popTxt+'</div></div><div class="loader"></div></div></div><div class="popclose">Ã</div><ul class="popnav"><li class="popprev"></li><li class="popnext"></li></ul></div>'); 186 }else{ 187 $('body').append('<div class="popup"><div class="popimg"><div><div class="popimgwrap"><img src="'+img.src+'" alt=""></div><div class="loader"></div></div></div><div class="popclose">Ã</div><ul class="popnav"><li class="popprev"></li><li class="popnext"></li></ul></div>'); 188 } 189 }else{ 190 if($(this).find(".infotxt").length){ 191 $('body').append('<div class="popup"><div class="popimg"><div><div class="popimgwrap"><img src="'+img.src+'" alt=""><div class="poptxt">'+popTxt+'</div></div><div class="loader"></div></div></div><div class="popclose">Ã</div><ul class="popnav"><li class="popprev"></li><li class="popnext"></li></ul></div>'); 192 }else{ 193 $('body').append('<div class="popup"><div class="popimg"><div><div class="popimgwrap"><img src="'+img.src+'" alt=""></div><div class="loader"></div></div></div><div class="popclose">Ã</div><ul class="popnav"><li class="popprev"></li><li class="popnext"></li></ul></div>'); 194 } 195 } 196 if(popCount === 1){ 197 $('.popnext').css({marginRight: -50}); 198 $('.popprev').css({marginLeft: -50}); 199 }else{ 200 if(popIndex === 0){ 201 $('.popnext').stop().animate({marginRight: 10}, 200, 'easeOutCubic'); 202 $('.popprev').css({marginLeft: -50}); 203 }else if(popIndex === popCount - 1){ 204 $('.popnext').css({marginRight: -50}); 205 $('.popprev').stop().animate({marginLeft: 10}, 200, 'easeOutCubic'); 206 } 207 } 208 $('.popup').css({opacity: 0}).stop().animate({opacity: 1}, 400, 'easeInOutCubic'); 209 img.onload = function(){ 210 $('.popimgwrap').stop().animate({opacity: 1}, 400, 'easeInOutCubic'); 211 } 212 img.onerror = function(){ 213 $('.popup').remove(); 214 window.open(img.src, '_blank'); 215 } 216 $('.poptxt').stop().animate({bottom: 0}, 5000, 'easeInOutCubic', function(){ 217 $('.poptxt').addClass("timelimit"); 218 }); 219 return false; 220 } 221 ); 222 }, 2000); 223 224 //var myhost = location.host; 225 //$('a[href^="/common/"][href$=".jpeg"], a[href^="/common/"][href$=".jpg"], a[href^="/common/"][href$=".gif"], a[href^="/common/"][href$=".png"], a[href^="/common/"][href$=".JPEG"], a[href^="/common/"][href$=".JPG"], a[href^="/common/"][href$=".GIF"], a[href^="/common/"][href$=".PNG"], a[href*="'+myhost+'"][href$=".jpeg"], a[href*="'+myhost+'"][href$=".jpg"], a[href*="'+myhost+'"][href$=".gif"], a[href*="'+myhost+'"][href$=".png"], a[href*="'+myhost+'"][href$=".JPEG"], a[href*="'+myhost+'"][href$=".JPG"], a[href*="'+myhost+'"][href$=".GIF"], a[href*="'+myhost+'"][href$=".PNG"]').on( 226 setTimeout(function() { 227 $(`body:not(.nopop) a[href^="http://"][href*="no_image"][href$=".jpg"], body:not(.nopop) a[href^="https://"][href*="no_image"][href$=".jpg"], body:not(.nopop) a[href^="${selectorLink}"]`).on( 228 'click', function(e) { 229 e.preventDefault(); 230 var self = this; 231 if ($(self).closest('.pop').length === 1) return; 232 233 if ($(self).data('is-image')) { 234 var img = new Image(); 235 img.src = $(self).attr("href"); 236 if($(self).next('.heading').find('p').length){ 237 popTxt0 = $(self).next('.heading').find('.h').text(); 238 popTxt = $(self).next('.heading').find('p').text(); 239 } 240 parentSectionClass = $(self).parents('#main>*, #common_footer>*').attr('class'); 241 $parent = $(self).parents('.content_wrapper'); 242 popCount = $parent.find($popB).length; 243 popIndex = $parent.find($popB).index(self); 244 if($(self).next('.heading').find('p').length){ 245 $('body').append('<div class="popup"><div class="popimg"><div><div class="popimgwrap"><img src="'+img.src+'" alt=""><div class="poptxt"><p><strong>'+popTxt0+'</strong><br>'+popTxt+'</p></div></div><div class="loader"></div></div></div><div class="popclose">Ã</div><ul class="popnav"><li class="popprev"></li><li class="popnext"></li></ul></div>'); 246 }else{ 247 $('body').append('<div class="popup"><div class="popimg"><div><div class="popimgwrap"><img src="'+img.src+'" alt=""></div><div class="loader"></div></div></div><div class="popclose">Ã</div><ul class="popnav"><li class="popprev"></li><li class="popnext"></li></ul></div>'); 248 } 249 if(popCount === 1){ 250 $('.popnext').css({marginRight: -50}); 251 $('.popprev').css({marginLeft: -50}); 252 }else{ 253 if(popIndex === 0){ 254 $('.popnext').stop().animate({marginRight: 10}, 200, 'easeOutCubic'); 255 $('.popprev').css({marginLeft: -50}); 256 }else if(popIndex === popCount - 1){ 257 $('.popnext').css({marginRight: -50}); 258 $('.popprev').stop().animate({marginLeft: 10}, 200, 'easeOutCubic'); 259 } 260 } 261 $('.popup').css({opacity: 0}).stop().animate({opacity: 1}, 400, 'easeInOutCubic'); 262 img.onload = function(){ 263 $('.popimgwrap').stop().animate({opacity: 1}, 400, 'easeInOutCubic'); 264 } 265 $('.poptxt').stop().animate({bottom: 0}, 5000, 'easeInOutCubic', function(){ 266 $('.poptxt').addClass("timelimit"); 267 });
268 return false; 269 } else { 270 setTimeout(function() { 271 window.open($(self).attr("href"), '_blank'); 272 }); 273 } 274 }); 275 }, 2000); 276 277 $(document).on("click", ".popimg, .popclose, .poppayclose", function(){ 278 $('.popup').stop().animate({opacity: 0}, 400, 'easeInOutCubic', function(){ 279 $('.popup').remove(); 280 popTxt = ''; 281 }); 282 }); 283 $(document).on("click", ".popup img:not(.no)", function(){ 284 return false; 285 }); 286 function popNav(){ 287 $('.popimgwrap').stop().animate({opacity: 0}, 400, 'easeInOutCubic', function(){ 288 $('.poptxt').removeClass("timelimit"); 289 $('.popup img').remove(); 290 popTxt = ''; 291 var img = new Image(); 292 img.src = $parent.find($popA).eq(popIndex).attr("href"); 293 popTxt = $parent.find($popA).eq(popIndex).find(".infotxt").html(); 294 $('.popimgwrap').prepend('<img src="'+img.src+'" alt="">'); 295 $('.poptxt').html(popTxt); 296 img.onload = function(){ 297 $('.popimgwrap').stop().animate({opacity: 1}, 400, 'easeInOutCubic'); 298 } 299 }); 300 $('.poptxt').stop().animate({bottom: 0}, 5000, 'easeInOutCubic', function(){ 301 $('.poptxt').addClass("timelimit"); 302 }); 303 } 304 $(document).on("click", ".popnext", function(){ 305 popIndex ++; 306 if(popIndex == popCount - 1){ 307 $('.popnext').stop().animate({marginRight: -50}, 200, 'easeInCubic'); 308 $('.popprev').stop().animate({marginLeft: 10}, 200, 'easeOutCubic'); 309 }else{ 310 $('.popprev').stop().animate({marginLeft: 10}, 200, 'easeOutCubic'); 311 } 312 popNav(); 313 return false; 314 }); 315 $(document).on("click", ".popprev", function(){ 316 popIndex --; 317 if(popIndex == 0){ 318 $('.popprev').stop().animate({marginLeft: -50}, 200, 'easeInCubic'); 319 $('.popnext').stop().animate({marginRight: 10}, 200, 'easeOutCubic'); 320 }else{ 321 $('.popnext').stop().animate({marginRight: 10}, 200, 'easeOutCubic'); 322 } 323 popNav(); 324 return false; 325 }); 326 327 $(`body.nopop a[href^="http://"][href*="no_image"][href$=".jpg"], body.nopop a[href^="https://"][href*="no_image"][href$=".jpg"], body.nopop a[href^="${selectorLink}"]`).each(function(){ 328 $(this).css({pointerEvents: 'none'}); 329 }); 330 $(`body.nopop a[href^="http://"][href*="no_image"][href$=".jpg"], body.nopop a[href^="https://"][href*="no_image"][href$=".jpg"], body.nopop a[href^="${selectorLink}"]`).on( 331 'click', function(){ 332 return false; 333 } 334 ); 335 336 /*----payment pop----*/ 337 338 $('a[href="#mypayment"]').on( 339 'click', function(){ 340 $('body').append('<div class="popup"><div class="poppay"><span class="poppayclose"></span><div class="tgt"><div class="loader"></div></div></div><div class="popclose">Ã</div></div>'); 341 $('.mypayment').clone().prependTo('.poppay .tgt'); 342 $('.poppay .mypayment').css({display: 'block'}); 343 $('.popup').css({opacity: 0}).stop().animate({opacity: 1}, 400, 'easeInOutCubic'); 344 return false; 345 } 346 ); 347 if(navigator.userAgent.indexOf('iPhone') > 0){//iphone 348 $('#pay_paypay a').attr('href', 'https://apps.apple.com/jp/app/paypay-%E3%83%9A%E3%82%A4%E3%83%9A%E3%82%A4-%E7%B0%A1%E5%8D%98-%E3%81%8A%E5%BE%97%E3%81%AA%E3%82%B9%E3%83%9E%E3%83%9B%E6%B1%BA%E6%B8%88%E3%82%A2%E3%83%97%E3%83%AA/id1435783608?mt=8'); 349 $('#pay_aupay a').attr('href', 'https://apps.apple.com/jp/app/au-wallet-au-pay%E3%82%82%E4%BD%BF%E3%81%88%E3%82%8B%E3%82%B9%E3%83%9E%E3%83%9B%E6%B1%BA%E6%B8%88%E3%82%A2%E3%83%97%E3%83%AA/id862800897?mt=8') 350 $('#pay_merpay a').attr('href', 'https://apps.apple.com/jp/app/%E3%83%A1%E3%83%AB%E3%82%AB%E3%83%AA-%E3%83%95%E3%83%AA%E3%83%9E%E3%82%A2%E3%83%97%E3%83%AA-%E3%82%B9%E3%83%9E%E3%83%9B%E6%B1%BA%E6%B8%88%E3%83%A1%E3%83%AB%E3%83%9A%E3%82%A4/id667861049?mt=8') 351 $('#pay_dpay a').attr('href', 'https://apps.apple.com/jp/app/d%E6%89%95%E3%81%84-%E3%82%B9%E3%83%9E%E3%83%9B%E6%B1%BA%E6%B8%88%E3%82%A2%E3%83%97%E3%83%AA-%E3%82%AD%E3%83%A3%E3%83%83%E3%82%B7%E3%83%A5%E3%83%AC%E3%82%B9%E3%81%A7%E3%81%8A%E6%94%AF%E6%89%95%E3%81%84/id1328132872?mt=8') 352 }else if(navigator.userAgent.indexOf('Android') > 0){//Android 353 $('#pay_paypay a').attr('href', 'https://play.google.com/store/apps/details?id=jp.ne.paypay.android.app&hl=ja'); 354 $('#pay_aupay a').attr('href', 'https://play.google.com/store/apps/details?id=jp.auone.wallet&hl=ja') 355 $('#pay_merpay a').attr('href', 'https://play.google.com/store/apps/details?id=com.kouzoh.mercari&hl=ja') 356 $('#pay_dpay a').attr('href', 'https://play.google.com/store/apps/details?id=com.nttdocomo.keitai.payment') 357 }else{ 358 $('.sp_payment, .mypayment').remove(); 359 } 360 361 /*----text > a-----*/ 362 363 $('main a').each(function(){ 364 var color = $(this).css('color'); 365 color = 'rgba(' + color.slice(4,-1) + ' ,0.3)'; 366 $(this).css({textDecorationColor: color}); 367 }); 368 369 /*---gallery 2column---*/ 370 371 function lay_column2(){ 372 $('.gallery_archive.lay_column2 .content_wrapper>.wrapper_item').wrap('<div id="primary"></div>'); 373 374 //ã«ãã´ãªã¼ä¸ 375 $('.gallery_archive.lay_column2 ul.category1:first-child').wrap('<div id="sidebar" class="align-left"><section></section></div>').removeClass('category1').addClass('sidebar_list pos_top'); 376 //ã«ãã´ãªã¼ä¸ 377 $('.gallery_archive.lay_column2~ul.category1').insertAfter('#primary').wrap('<div id="sidebar" class="align-left"><section></section></div>').removeClass('category1').addClass('sidebar_list pos_bottom'); 378 379 $('.gallery_archive.lay_column2 #sidebar section .sidebar_list:first-child').before('<div class="heading block_header_5"><h4 class="h">ã«ãã´ãªã¼</h4><p>Categories</p></div>'); 380 $('.gallery_archive.lay_column2+.pager').appendTo('#primary'); 381 } 382 lay_column2(); 383 $(window).on('resize', lay_column2); 384 385 /*----composite_box01-----*/ 386 387 $('.composite_box01.block_images_3 .heading, .composite_box01.block_images_6 .heading').each(function(){ 388 var $tt = $(this).parents('.inner_item'); 389 $(this).prependTo($tt); 390 }); 391 $('.composite_box01:not(.block_images_8):not(.block_images_10)').each(function(){ 392 $(this).find('.inner_item_img img').each(function(){ 393 var src = $(this).attr('src'); 394 if(src.indexOf('no_image') !== -1){ 395 $(this).parents('.inner_item_img').remove(); 396 } 397 }); 398 }); 399 $('.composite_box01.block_images_9 .inner_item a').each(function(){ 400 if ($(this).children().length === 1 && $(this).children().first().hasClass("inner_item_txt")) { 401 $(this).prepend("<div class='inner_item_img'></div>"); 402 } 403 }); 404 $('.composite_box01 .inner_item').each(function(){ 405 if(!($(this).find('.inner_item_img').length) || $(this).find('.inner_item_img img').attr('src').indexOf('no_image') !== -1){ 406 if(!($(this).find('.inner_item_txt heading').length)){ 407 var str = $(this).find('.inner_item_txt').text(); 408 if(str.trim() == ''){ 409 $(this).addClass('empty') 410 } 411 } 412 } 413 }); 414 $('.composite_box01.block_images_13 .empty').remove(); 415 416 /*----header-----*/ 417 if (window.innerWidth < 900) { 418 $("#menu_head").hide(); 419 $("#header_contents > .inner").append($("ul.nav_1st").parent("nav")); 420 } else { 421 $("#menu_head").show(); 422 } 423 $("ul.nav_1st").parent("nav").show(); 424 425 $(document).on('click', 'header .sp_menu a', function(e) { 426 e.preventDefault(); 427 $("#menu_head").show(); 428 $('header').toggleClass('open'); 429 }); 430}) 431 432$(function(){ 433 434 //admin_edit_window 435 436 $('.admin_edit_window .desktop_windows').on('click', function(event){ 437 admin_edit_window(); 438 $(this).addClass('selected'); 439 $('body').addClass('desktop_windows'); 440 }); 441 $('.admin_edit_window .tablet_android').on('click', function(event){ 442 admin_edit_window(); 443 $(this).addClass('selected'); 444 $('body').addClass('tablet_android'); 445 }); 446 $('.admin_edit_window .phone_android').on('click', function(event){ 447 admin_edit_window(); 448 $(this).addClass('selected'); 449 $('body').addClass('phone_android'); 450 }); 451 function admin_edit_window(){ 452 $('.admin_edit_window i').each(function(){ 453 $(this).removeClass('selected'); 454 }); 455 $('body').removeClass('desktop_windows'); 456 $('body').removeClass('tablet_android'); 457 $('body').removeClass('phone_android'); 458 } 459 460 //menutoggle 461 462 $('#menutoggle').on('click', function(event){ 463 $('body').toggleClass('open'); 464 }); 465 466 //save 467 468 $('.admin_edit_window .save').on('click', function(event){ 469 $('#save_modal').addClass('active'); 470 }); 471 $('#save_modal .ok').on('click', function(event){ 472 // 473 var display_flag = $('#save_modal').find('input[name="Newpages[display_flag]"]:checked').val(); 474 var template_flag = $('#save_modal').find('input[name="TmpPages[template_flag]"]:checked').val(); 475 var release_date = $('#save_modal').find('input[name="Newpages[release_date]"]').val(); 476 var facebook_flag = $('#save_modal').find('input[name="TmpPages[facebook_flag]"]:checked').val(); 477 var ameblo_flag = $('#save_modal').find('input[name="TmpPages[ameblo_flag]"]:checked').val(); 478 var twitter_flag = $('#save_modal').find('input[name="TmpPages[twitter_flag]"]:checked').val(); 479 var blog_category = $('#save_modal').find('input[name="newpages_blog_categories"]:checked').map(function(){ 480 return $(this).val(); 481 }).get(); 482 var news_category = $('#save_modal').find('input[name="newpages_news_categories"]:checked').map(function(){ 483 return $(this).val(); 484 }).get(); 485 // 486 const elem = document.getElementById('add_edit_area'); 487 const blockarea = elem.contentWindow.document.querySelectorAll('.blockarea'); 488 var newblock_id_array = []; 489 for(var i=0;i<blockarea.length;i++){ 490 newblock_id_array[i] = blockarea[i].id; 491 } 492 if(newblock_id_array != ''){ 493 $.ajax({
494 type: 'POST', 495 url: '/newpages/save/', 496 data: { 497 newpage_id: newpage_id, 498 pagetype: pagetype, 499 pagetype_kind: pagetype_kind, 500 newblock_id_array: newblock_id_array, 501 display_flag: display_flag, 502 template_flag: template_flag, 503 release_date: release_date, 504 facebook_flag: facebook_flag, 505 ameblo_flag: ameblo_flag, 506 twitter_flag: twitter_flag, 507 blog_category: blog_category, 508 news_category: news_category, 509 edit_mode: edit_mode, 510 }, 511 cache: false, 512 beforeSend: function(xhr){ 513 xhr.setRequestHeader('X-CSRF-Token', csrf); 514 }, 515 success: function(data){ 516 var sns_parameter = ''; 517 if(facebook_flag == 1){ 518 sns_parameter += 'facebook_post=true&'; 519 }else{ 520 sns_parameter += 'facebook_post=&'; 521 } 522 if(twitter_flag == 1){ 523 sns_parameter += 'twitter_post=true'; 524 }else{ 525 sns_parameter += 'twitter_post='; 526 } 527 //ããããããã°ã®å ´å 528 if(edit_mode == 'simple_blog'){ 529 location.href = '/newpages/simple-edit/'+data.id+'/?'+sns_parameter; 530 // 531 }else if(pagetype && pagetype != '' && pagetype != 'template'){ 532 // 533 if(pagetype == 'blog_template'){ 534 pagetype = 'blog'; 535 } 536 // 537 if(pagetype_kind && pagetype_kind != ''){ 538 location.href = '/newpages/edit/'+data.id+'/'+pagetype+'/'+pagetype_kind+'/?'+sns_parameter; 539 }else{ 540 location.href = '/newpages/edit/'+data.id+'/'+pagetype+'/?'+sns_parameter; 541 } 542 }else{ 543 location.href = '/newpages/edit/'+data.id+'/?'+sns_parameter; 544 } 545 } 546 }); 547 }else{ 548 alert('ã³ã³ãã³ããæªä½æã§ã'); 549 } 550 // 551 $('#save_modal').removeClass('active'); 552 }); 553 $('#save_modal .cancel').on('click', function(event){ 554 $('#save_modal').removeClass('active'); 555 }); 556 $('input[name="Newpages[display_flag]"]').on('change', function(){ 557 display_flag(); 558 }); 559 function display_flag(){ 560 if($('input#display_flag0').is(':checked')){ 561 $('.snsselect .caution').css({display: 'block'}); 562 $('.snsselect label').css({display: 'none'}); 563 } 564 if($('input#display_flag1').is(':checked')){ 565 $('.snsselect .caution').css({display: 'none'}); 566 $('.snsselect label').css({display: 'inline-block'}); 567 } 568 } 569 $(window).on('load', function(){ 570 display_flag(); 571 }) 572}) 573 574$(window).on('load', function(){ 575 $(document).on('click', '#setting_modal .bm', function(){ 576 $(this).prev().slideToggle(400, 'easeInOutCubic'); 577 return false; 578 }); 579 580 $(document).on('click', '.admin_edit_menu .bm', function(event){ 581 if($(this).parent().attr('class').indexOf('active') != -1){ 582 $(this).parent().removeClass('active'); 583 }else{ 584 $('.admin_edit_menu').each(function(){ 585 $(this).removeClass('active'); 586 }); 587 $(this).parent().addClass('active'); 588 } 589 }); 590 591 $(window).on('scroll', function(){ 592 $('.admin_edit_menu.active').removeClass('active'); 593 }); 594 /*---ini---*/ 595 // var objectFitImages = (function () { 596 // 'use strict'; 597 // 598 // var OFI = 'bfred-it:object-fit-images'; 599 // var propRegex = /(object-fit|object-position)\s*:\s*([-\w\s%]+)/g; 600 // var testImg = typeof Image === 'undefined' ? {style: {'object-position': 1}} : new Image(); 601 // var supportsObjectFit = 'object-fit' in testImg.style; 602 // var supportsObjectPosition = 'object-position' in testImg.style; 603 // var supportsOFI = 'background-size' in testImg.style; 604 // var supportsCurrentSrc = typeof testImg.currentSrc === 'string'; 605 // var nativeGetAttribute = testImg.getAttribute; 606 // var nativeSetAttribute = testImg.setAttribute; 607 // var autoModeEnabled = false; 608 // 609 // function createPlaceholder(w, h) { 610 // return ("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='" + w + "' height='" + h + "'%3E%3C/svg%3E"); 611 // } 612 // 613 // function polyfillCurrentSrc(el) { 614 // if (el.srcset && !supportsCurrentSrc && window.picturefill) { 615 // var pf = window.picturefill._; 616 // // parse srcset with picturefill where currentSrc isn't available 617 // if (!el[pf.ns] || !el[pf.ns].evaled) { 618 // // force synchronous srcset parsing 619 // pf.fillImg(el, {reselect: true}); 620 // } 621 // 622 // if (!el[pf.ns].curSrc) { 623 // // force picturefill to parse srcset 624 // el[pf.ns].supported = false; 625 // pf.fillImg(el, {reselect: true}); 626 // } 627 // 628 // // retrieve parsed currentSrc, if any 629 // el.currentSrc = el[pf.ns].curSrc || el.src; 630 // } 631 // } 632 // 633 // function getStyle(el) { 634 // var style = getComputedStyle(el).fontFamily; 635 // var parsed; 636 // var props = {}; 637 // while ((parsed = propRegex.exec(style)) !== null) { 638 // props[parsed[1]] = parsed[2]; 639 // } 640 // return props; 641 // } 642 // 643 // function setPlaceholder(img, width, height) { 644 // // Default: fill width, no height 645 // var placeholder = createPlaceholder(width || 1, height || 0
645); 646 // 647 // // Only set placeholder if it's different 648 // if (nativeGetAttribute.call(img, 'src') !== placeholder) { 649 // nativeSetAttribute.call(img, 'src', placeholder); 650 // } 651 // } 652 // 653 // function onImageReady(img, callback) { 654 // // naturalWidth is only available when the image headers are loaded, 655 // // this loop will poll it every 100ms. 656 // if (img.naturalWidth) { 657 // callback(img); 658 // } else { 659 // setTimeout(onImageReady, 100, img, callback); 660 // } 661 // } 662 // 663 // function fixOne(el) { 664 // var style = getStyle(el); 665 // var ofi = el[OFI]; 666 // style['object-fit'] = style['object-fit'] || 'fill'; // default value 667 // 668 // // Avoid running where unnecessary, unless OFI had already done its deed 669 // if (!ofi.img) { 670 // // fill is the default behavior so no action is necessary 671 // if (style['object-fit'] === 'fill') { 672 // return; 673 // } 674 // 675 // // Where object-fit is supported and object-position isn't (Safari < 10) 676 // if ( 677 // !ofi.skipTest && // unless user wants to apply regardless of browser support 678 // supportsObjectFit && // if browser already supports object-fit 679 // !style['object-position'] // unless object-position is used 680 // ) { 681 // return; 682 // } 683 // } 684 // 685 // // keep a clone in memory while resetting the original to a blank 686 // if (!ofi.img) { 687 // ofi.img = new Image(el.width, el.height); 688 // ofi.img.srcset = nativeGetAttribute.call(el, "data-ofi-srcset") || el.srcset; 689 // ofi.img.src = nativeGetAttribute.call(el, "data-ofi-src") || el.src; 690 // 691 // // preserve for any future cloneNode calls 692 // // https://github.com/bfred-it/object-fit-images/issues/53 693 // nativeSetAttribute.call(el, "data-ofi-src", el.src); 694 // if (el.srcset) { 695 // nativeSetAttribute.call(el, "data-ofi-srcset", el.srcset); 696 // } 697 // 698 // setPlaceholder(el, el.naturalWidth || el.width, el.naturalHeight || el.height); 699 // 700 // // remove srcset because it overrides src 701 // if (el.srcset) { 702 // el.srcset = ''; 703 // } 704 // try { 705 // keepSrcUsable(el); 706 // } catch (err) { 707 // if (window.console) { 708 // console.warn('https://bit.ly/ofi-old-browser'); 709 // } 710 // } 711 // } 712 // 713 // polyfillCurrentSrc(ofi.img); 714 // 715 // el.style.backgroundImage = "url(\"" + ((ofi.img.currentSrc || ofi.img.src).replace(/"/g, '\\"')) + "\")"; 716 // el.style.backgroundPosition = style['object-position'] || 'center'; 717 // el.style.backgroundRepeat = 'no-repeat'; 718 // el.style.backgroundOrigin = 'content-box'; 719 // 720 // if (/scale-down/.test(style['object-fit'])) { 721 // onImageReady(ofi.img, function () { 722 // if (ofi.img.naturalWidth > el.width || ofi.img.naturalHeight > el.height) { 723 // el.style.backgroundSize = 'contain'; 724 // } else { 725 // el.style.backgroundSize = 'auto'; 726 // } 727 // }); 728 // } else { 729 // el.style.backgroundSize = style['object-fit'].replace('none', 'auto').replace('fill', '100% 100%'); 730 // } 731 // 732 // onImageReady(ofi.img, function (img) { 733 // setPlaceholder(el, img.naturalWidth, img.naturalHeight); 734 // }); 735 // } 736 // 737 // function keepSrcUsable(el) { 738 // var descriptors = { 739 // get: function get(prop) { 740 // return el[OFI].img[prop ? prop : 'src']; 741 // }, 742 // set: function set(value, prop) { 743 // el[OFI].img[prop ? prop : 'src'] = value; 744 // nativeSetAttribute.call(el, ("data-ofi-" + prop), value); // preserve for any future cloneNode 745 // fixOne(el); 746 // return value; 747 // } 748 // }; 749 // Object.defineProperty(el, 'src', descriptors); 750 // Object.defineProperty(el, 'currentSrc', { 751 // get: function () { return descriptors.get('currentSrc'); } 752 // }); 753 // Object.defineProperty(el, 'srcset', { 754 // get: function () { return descriptors.get('srcset'); }, 755 // set: function (ss) { return descriptors.set(ss, 'srcset'); } 756 // }); 757 // } 758 // 759 // function hijackAttributes() { 760 // function getOfiImageMaybe(el, name) { 761 // return el[OFI] && el[OFI].img && (name === 'src' || name === 'srcset') ? el[OFI].img : el; 762 // } 763 // if (!supportsObjectPosition) { 764 // HTMLImageElement.prototype.getAttribute = function (name) {
765 // return nativeGetAttribute.call(getOfiImageMaybe(this, name), name); 766 // }; 767 // 768 // HTMLImageElement.prototype.setAttribute = function (name, value) { 769 // return nativeSetAttribute.call(getOfiImageMaybe(this, name), name, String(value)); 770 // }; 771 // } 772 // } 773 // 774 // function fix(imgs, opts) { 775 // var startAutoMode = !autoModeEnabled && !imgs; 776 // opts = opts || {}; 777 // imgs = imgs || 'img'; 778 // 779 // if ((supportsObjectPosition && !opts.skipTest) || !supportsOFI) { 780 // return false; 781 // } 782 // 783 // // use imgs as a selector or just select all images 784 // if (imgs === 'img') { 785 // imgs = document.getElementsByTagName('img'); 786 // } else if (typeof imgs === 'string') { 787 // imgs = document.querySelectorAll(imgs); 788 // } else if (!('length' in imgs)) { 789 // imgs = [imgs]; 790 // } 791 // 792 // // apply fix to all 793 // for (var i = 0; i < imgs.length; i++) { 794 // imgs[i][OFI] = imgs[i][OFI] || { 795 // skipTest: opts.skipTest 796 // }; 797 // fixOne(imgs[i]); 798 // } 799 // 800 // if (startAutoMode) { 801 // document.body.addEventListener('load', function (e) { 802 // if (e.target.tagName === 'IMG') { 803 // fix(e.target, { 804 // skipTest: opts.skipTest 805 // }); 806 // } 807 // }, true); 808 // autoModeEnabled = true; 809 // imgs = 'img'; // reset to a generic selector for watchMQ 810 // } 811 // 812 // // if requested, watch media queries for object-fit change 813 // if (opts.watchMQ) { 814 // window.addEventListener('resize', fix.bind(null, imgs, { 815 // skipTest: opts.skipTest 816 // })); 817 // } 818 // } 819 // 820 // fix.supportsObjectFit = supportsObjectFit; 821 // fix.supportsObjectPosition = supportsObjectPosition; 822 // 823 // hijackAttributes(); 824 // 825 // return fix; 826 // 827 // }()); 828 // 829 // objectFitImages(); 830 831 $('body:not(.edit_view) p:empty').remove(); 832 833 var myVer = 3;//ç¡å°ã®verã¯3 834 if($('body').data('ver')){ 835 myVer = $('body').data('ver'); 836 } 837 var myVerRes = new String(myVer).split('.'); 838 function verChekck(v){ 839 var ver = new String(v); 840 var res = ver.split('.'); 841 var lim = res.length; 842 if(lim < myVerRes.length){ 843 lim = myVerRes.length; 844 } 845 for(var i = 0; i < lim; i++){ 846 if(!myVerRes[i]){ 847 myVerRes.push('0'); 848 } 849 if(!res[i]){ 850 res.push('0'); 851 } 852 if(myVerRes[i] > res[i]){ 853 return true; 854 break; 855 } 856 if(myVerRes[i] < res[i]){ 857 return false; 858 break; 859 } 860 } 861 return true; 862 } 863 //verChekck('*.*.*.*')//弿°ã¨æ¯è¼ãã¦å¯¾è±¡ã®verãæ°ããã¾ãã¯åããªãtrueãå¤ããã°false 864 //if(!verChekck('3.1.2')){}//対象ã®verã3.1.2ããå¤ãå ´å 865 866 /*---loading---*/ 867 868 if($('#load').length){ 869 $("#load .loader").stop().animate({opacity: 0}, 300, 'easeInOutCubic'); 870 $("#load").addClass('complete').stop().animate({opacity: 0}, 800, 'easeInOutCubic', function(){ 871 $("#load").css({display: "none"}); 872 $('nav').css({overflow: 'visible'}); 873 }); 874 }else{ 875 $('nav').css({overflow: 'visible'}); 876 } 877 878 /*----pcnav-----*/ 879 880 function ResizeNav(){ 881 $('.nav_2nd').each(function(){ 882 var pos = $(this).parents('li').offset().left + $(this).width(); 883 if(pos > $(window).width()){ 884 $(this).css({left: $(window).width() - pos - 20}); 885 }else{ 886 $(this).css({left: 0}); 887 } 888 }); 889 } 890 891 setTimeout(function() { 892 // $(window).on('resize', ResizeNav); 893 // ResizeNav(); 894 $('.nav_1st>li:has(li)>a').after('<i></i>'); 895 $('.nav_1st>li i').on('click', function(){ 896 $(this).next().slideToggle(); 897 $(this).toggleClass('open'); 898 }); 899 }, 2000); 900 901 /*----fixbtn-----*/ 902 if(($('footer').length)) { 903 if (!($('#fixbtn .fixbtntel').length) && !($('#fixbtn .contents_btn01').length)) { 904 $('#fixbtn').addClass('no'); 905 } 906 907 function funcFixFooter() { 908 $('#fixbtn').css({height: $('#fixbtn .fixbtnwrap').height()}); 909 if ($('#fixbtn').offset() && $('#fixbtn').offset().top > window.innerHeight * 2) { 910 var page_scroll = $(this).scrollTop(); 911 912 //â¼100vh以ä¸ã¹ã¯ãã¼ã«ããã¨ä¸ããåºã¦ãã 913 if (page_scroll >= window.innerHeight) { 914 $('#fixbtn').addClass("scrolled"); 915 //â¼#fixbtnã®ä½ç½®ã¾ã§ã¹ã¯ãã¼ã«ããã¨ãã¿ã³ãåºå®ããã 916 if (page_scroll + window.innerHeight >= $('#fixbtn').offset().top + $('#fixbtn').height()) { 917 $('#fixbtn').css({position: 'relative'}); 918 $('#fixbtn .fixbtnwrap').css({position: 'relative'}); 919 } else { 920 $('#fixbtn').css({position: 'inherit'}); 921 $('#fixbtn .fixbtnwrap').css({position: 'fixed', bottom: 0, top: 'auto'}); 922 } 923 } else { 924 $('#fixbtn').removeClass("scrolled"); 925 $('#fixbtn .fixbtnwrap').css({bottom: $('#fixbtn .fixbtnwrap').height() * -1}); 926 } 927 } else { 928 $('#fixbtn').css({position: 'relative'}); 929 $('#fixbtn .fixbtnwrap').css({position: 'absolute', bottom: 'auto', top: 0}); 930 } 931 }; 932 funcFixFooter(); 933 $(window).on('scroll', function () { 934 funcFixFooter(); 935 }); 936 937 function ResizeFixbtn() { 938 if (window.innerWidth < 700) { 939 if ($('.fixbtntel span').length || $('.fixbtntel a').length) { 940 } else { 941 $('#fixbtn .fixbtntel').css({display: "none"}); 942 } 943 } else { 944 $('#fixbtn .fixbtntel').css({display: "inherit"}); 945 } 946 } 947 948 ResizeFixbtn(); 949 $(window).on('resize', ResizeFixbtn); 950 } 951 /*----parallax----*/ 952 953 var parallax_spd = 2.5;//ã¹ãã¼ãè¨å®ï¼1=ã¹ã¯ãã¼ã«çéï¼ 954 function parallaxScroll(){ 955 var parallax_scroll = $(this).scrollTop(); 956 $('.parallax').each(function(){ 957 var parallax_pos = $(this).offset().top; 958 var parallax_h = $(this).height() + parseInt($(this).css('padding-top'), 10) + parseInt($(this).css('padding-bottom'), 10); 959 var parallax_ratio = (parallax_pos - parallax_scroll + parallax_h) / ($(window).height() + parallax_h); 960 var parallax_A1 = parallax_h * parallax_spd; 961 var parallax_A2 = parallax_A1 * parallax_ratio * -1 + parallax_h * parallax_ratio; 962 $(this).find('.parallax_img').css({ 963 height: parallax_A1, 964 transform: 'translateY(' + parallax_A2 + 'px)', 965 }); 966 }); 967 } 968 if((navigator.userAgent.indexOf('iPhone') == -1 && navigator.userAgent.indexOf('iPad') == -1) && navigator.userAgent.indexOf('iPod') == -1 && navigator.userAgent.indexOf('Android') == -1){ 969 $(window).on('scroll', function(){ 970 parallaxScroll(); 971 }); 972 }else{ 973 $('.parallax').each(function(){ 974 var parallax_h = $(this).height() + parseInt($(this).css('padding-top'), 10) + parseInt($(this).css('padding-bottom'), 10); 975 $(this).find('.parallax_img').addClass('sp').css({ 976 height: parallax_h, 977 top: 0, 978 }); 979 }); 980 } 981 982 /*----contents_box01-----*/ 983 984 function ResizeContentsBox(){ 985 if(window.innerWidth <= 900){ 986 var ContentsBoxM; 987 ContentsBoxM = parseInt($('#main>section.mb .content_wrapper>*:last-child').css('margin-bottom'), 10); 988 $('.contents_box01 .content_wrapper>*:last-child').each(function(){ 989 if(parseInt($(this).css('margin-bottom'), 10) == 0){ 990 $(this).css({paddingBottom: ContentsBoxM}); 991 } 992 }); 993 }else{ 994 $('.contents_box01 .content_wrapper>*:last-child').each(function(){ 995 $(this).css({paddingBottom: 0}); 996 }); 997 } 998 } 999 ResizeContentsBox(); 1000 $(window).on('resize', ResizeContentsBox); 1001 1002 /*---tooltip---*/ 1003 1004 var tip_num = 0; 1005 $('main a[data-tooltip]').on('hover', function(e){
1006 if((navigator.userAgent.indexOf('iPhone') === -1 && navigator.userAgent.indexOf('iPad') === -1) && navigator.userAgent.indexOf('iPod') === -1 && navigator.userAgent.indexOf('Android') === -1){ 1007 var wrd = $(this).text(); 1008 var rel = $(this).attr('data-tooltip'); 1009 var n = tip_num; 1010 if(!rel){ 1011 rel = $(this).attr('title'); 1012 } 1013 $('body').append('<div class="tip tipnum'+tip_num+'"><p>'+wrd+'</p><p>'+rel+'</p><span></span></div>'); 1014 var a_y = $(this).offset().top; 1015 var a_h = $(this).height(); 1016 var a_w = $(this).width(); 1017 var a_lh = parseInt($(this).css('line-height'), 10); 1018 var tip_w = $('.tipnum'+tip_num).width(); 1019 var tip_h = $('.tipnum'+tip_num).height(); 1020 var tip_x = e.pageX; 1021 var tip_y = a_y - tip_h; 1022 if(e.pageY - a_y >= a_lh){ 1023 tip_y += a_lh; 1024 } 1025 var spanOff = 0; 1026 if(tip_x >= window.innerWidth - tip_w){ 1027 spanOff = tip_x + tip_w - window.innerWidth + 20; 1028 tip_x = window.innerWidth - tip_w - 20; 1029 }else if(tip_x < 40){ 1030 tip_x = 30; 1031 } 1032 $('.tipnum'+tip_num).find('span').css({left: parseInt($('.tipnum'+tip_num).find('span').css('left'), 10) + spanOff}); 1033 $('.tipnum'+tip_num).css({top: tip_y - 20, left: tip_x - 20}).delay(10).queue(function(){ 1034 if(n === tip_num){ 1035 $(this).css({transform: 'translate(0,0)', opacity: 1}).dequeue(); 1036 } 1037 }); 1038 } 1039 }, function(){ 1040 tip_num ++; 1041 $('.tip:nth-last-of-type(1)').css({transform: 'translate(0,-20px)', opacity: 0}); 1042 $('.tip:nth-last-of-type(n+3)').remove(); 1043 }); 1044 function ResizeTip(){ 1045 $('.tip').remove(); 1046 } 1047 $(window).on('resize', ResizeTip); 1048 ResizeTip(); 1049 1050 /*----tel link-----*/ 1051 1052 if((navigator.userAgent.indexOf('iPhone') > 0 || navigator.userAgent.indexOf('iPad') > 0) || navigator.userAgent.indexOf('iPod') > 0 || navigator.userAgent.indexOf('Android') > 0){ 1053 $('span[data-tel^=tel]').each(function(){ 1054 var html = $(this).html(); 1055 var tel = $(this).attr('data-tel'); 1056 $(this).replaceWith('<a href="'+ tel +'">'+ html +'</a>'); 1057 }); 1058 }else{ 1059 $('span[data-tel^=tel]').each(function(){ 1060 if($(this).closest('.contents_btn01').length > 0){ 1061 var html = $(this).html(); 1062 var tel = $(this).attr('data-tel'); 1063 $(this).replaceWith('<a href="'+ tel +'">'+ html +'</a>'); 1064 } 1065 }); 1066 $('header a[href^=tel], footer a[href^=tel]').each(function(){ 1067 var html = $(this).html(); 1068 var tel = $(this).attr('href'); 1069 $(this).replaceWith('<span data-tel="'+ tel +'">'+ html +'</span>'); 1070 }); 1071 } 1072 1073 /*----composite_box01-----*/ 1074 1075 ResizeComposite(); 1076 $(window).on('resize', ResizeComposite()); 1077 1078 1079 if($('body:not(.edit_view) .composite_box01.block_images_13').length){ 1080 $('body:not(.edit_view) .composite_box01.block_images_13 .wrapper_item:not(.slick-slider)').each(function(){ 1081 $('source').remove(); 1082 $(this).slick({ 1083 accessibility: false, 1084 autoplay: true, 1085 autoplaySpeed: 4000, 1086 speed: 700, 1087 slidesToShow: 2, 1088 slidesToScroll: 1, 1089 arrows: true, 1090 cssEase: 'ease-in-out', 1091 centerMode: false, 1092 centerPadding: '0', 1093 draggable: false, 1094 pauseOnHover: true, 1095 draggable: true, 1096 swipe: true, 1097 infinite: true, 1098 responsive:[ 1099 { 1100 breakpoint: 600, 1101 settings:{ 1102 slidesToShow: 1, 1103 } 1104 }, 1105 ] 1106 }); 1107 }); 1108 } 1109 1110 /*----staff-----*/ 1111 1112 if('.widget_staff01'){ 1113 function staffResizeS1(){ 1114 var hArray = []; 1115 var maxH = 0; 1116 $('.widget_staff01 .inner_item').each(function(){ 1117 hArray.push($(this).find('.inner_item_img img').height()); 1118 }); 1119 maxH = Math.max.apply(null, hArray); 1120 $('.widget_staff01 .inner_item_img').each(function(){ 1121 $(this).css({height: maxH}); 1122 }); 1123 } 1124 staffResizeS1(); 1125 $(window).on('resize', staffResizeS1); 1126 } 1127 1128 /*----gallery-----*/ 1129 1130 /* 1131 $('.widget_gallery01.add_design1:not(.block_slider), .gallery_archive.add_design1:not(.block_slider)').each(function(){//æªä½¿ç¨ 1132 var portrait = 0; 1133 var landscape = 0; 1134 $(this).find('.inner_item img').each(function(){ 1135 var img = new Image(); 1136 img.src = $(this).attr('src'); 1137 var width = img.width;
1138 var height = img.height; 1139 if(height/width > 1){ 1140 portrait ++; 1141 }else{ 1142 landscape ++; 1143 } 1144 }); 1145 if(portrait > landscape){ 1146 $(this).addClass("view_portrait"); 1147 }else if(portrait < landscape){ 1148 $(this).addClass("view_landscape"); 1149 }else{ 1150 $(this).addClass("view_square"); 1151 } 1152 }); 1153 */ 1154 1155 $('.gallery_archive.add_design3 .inner_item img').each(function(){ 1156 var img = new Image(); 1157 img.src = $(this).attr('src'); 1158 var h = img.height; 1159 if(window.innerHeight*0.5 < h){ 1160 h = window.innerHeight*0.5; 1161 } 1162 $(this).css({maxHeight: h}); 1163 }); 1164 1165 /*----news-----*/ 1166 1167 $('.news_archive.add_design3 article .entry_header').each(function(){ 1168 $(this).insertAfter($(this).parent('article').find('.entry_body .inner_item_img')); 1169 }); 1170 1171 $('#sidebar ul.sidebar_list.archive>li>a.open').next('ul').slideToggle(500, 'easeInOutCubic'); 1172 $('#sidebar ul.sidebar_list.archive>li>a').on('click', function(){ 1173 $(this).toggleClass('open').next('ul').slideToggle(500, 'easeInOutCubic'); 1174 $('#sidebar ul.sidebar_list.archive>li>a').not($(this)).removeClass('open').next().slideUp(500, 'easeInOutCubic'); 1175 return false; 1176 }); 1177 1178 $('#sidebar ul.sidebar_list:not(.archive)>li').has('ul').addClass('open acco'); 1179 $('#sidebar ul.sidebar_list:not(.archive)>li').has('ul').children('a').append('<span class="toggle">-</span>'); 1180 $('#sidebar ul.sidebar_list:not(.archive) .toggle').on('click', function(){ 1181 $(this).parents('.acco').toggleClass('open').children('ul').slideToggle(500, 'easeInOutCubic'); 1182 $('#sidebar ul.sidebar_list:not(.archive) .acco').not($(this).parents('.acco')).removeClass('open').children('ul').slideUp(500, 'easeInOutCubic'); 1183 $('#sidebar ul.sidebar_list:not(.archive) .acco .toggle').html('+'); 1184 $('#sidebar ul.sidebar_list:not(.archive) .acco.open .toggle').html('-'); 1185 return false; 1186 }); 1187 1188 if($('body:not(.edit_view) .block_news_1.add_design12').length){ 1189 $('body:not(.edit_view) .block_news_1.add_design12').each(function(){ 1190 $(this).find('.content_wrapper>ul, .content_wrapper>div:not(".heading")').wrapAll('<div class="inner">'); 1191 }); 1192 $('body:not(.edit_view) .block_news_1.add_design12 ul:not(.slick-slider)').slick({ 1193 accessibility: false, 1194 autoplay: true, 1195 autoplaySpeed: 2500, 1196 speed: 500, 1197 arrows: false, 1198 cssEase: 'ease-in-out', 1199 draggable: false, 1200 pauseOnHover: true, 1201 swipe: false, 1202 vertical: true, 1203 }); 1204 } 1205 1206 /*----block_header fontsize-----*/ 1207 1208 function Resizeheading(){ 1209 $('#lv p span, .block_header_1 .h, .block_header_1 p, .block_header_2 .h, .block_header_3 .h, .block_header_4 .h, .block_header_6 .h, .block_header_6 p, .contents_btn01 a span').each(function(){ 1210 var h_default = ''; 1211 var h_dis; 1212 var h_ls; 1213 var h_w; 1214 var h_w2; 1215 var h_num; 1216 var h_fs; 1217 var h_ov; 1218 var h_ls2; 1219 function HF1st(j){ 1220 var d = new $.Deferred; 1221 if(j.attr('style') != undefined){ 1222 h_default = j.attr('style'); 1223 } 1224 h_dis = j.css('display'); 1225 h_ls = parseInt(j.css('letter-spacing'), 10); 1226 d.resolve(); 1227 return d.promise(); 1228 } 1229 function HF2nd(j){ 1230 j.css({'cssText': 'display: block !important;'}); 1231 h_w = parseInt(j.css('width'), 10); 1232 } 1233 function HF3rd(j){ 1234 j.css({'cssText': 'display: inline-block !important; white-space: nowrap; !important'}); 1235 h_w2 = parseInt(j.css('width'), 10); 1236 } 1237 function HF4th(j){ 1238 j.removeAttr('style').css({'cssText': h_default}); 1239 } 1240 function HF5th(j){ 1241 h_num = j.text().replace(/^\s+|\s+$/g, "").length;
1242 h_fs = h_w2 / h_num - 0.0001; 1243 } 1244 function HF6th(j){ 1245 h_ov = (h_w2 - h_w)/h_fs; 1246 h_ov = Math.ceil(h_ov); 1247 } 1248 function HF7th(j){ 1249 h_ls2 = (h_fs*h_ov)/(h_num)*-1 + Number(h_ls); 1250 if(0 < h_ov && h_ov < 3){//1-2æåè½ã¡é²æ¢ 1251 if(h_ls2 > 0){ 1252 h_ls2 = 0; 1253 } 1254 j.css({'cssText': h_default + 'letter-spacing: '+h_ls2+'px !important;'}); 1255 } 1256 } 1257 HF1st($(this)).then(HF2nd($(this))).then(HF3rd($(this))).then(HF4th($(this))).then(HF5th($(this))).then(HF6th($(this))).then(HF7th($(this))); 1258 }); 1259 } 1260 //$(window).on('resize', Resizeheading); 1261 Resizeheading(); 1262 1263 /*----body resize-----*/ 1264 1265 // var userAgent = window.navigator.userAgent.toLowerCase(); 1266 // if(userAgent.indexOf('msie') != -1 || userAgent.indexOf('trident') != -1){ 1267 // }else if(userAgent.indexOf('edge') != -1){ 1268 // }else if(userAgent.indexOf('chrome') != -1){ 1269 // $('body').css({width: "calc(100% - 100px)"}).delay(100).queue(function() { 1270 // $(this).css({width: "100%"}); 1271 // }); 1272 // }else if(userAgent.indexOf('safari') != -1){ 1273 // }else if(userAgent.indexOf('firefox') != -1){ 1274 // }else if(userAgent.indexOf('opera') != -1){ 1275 // }else{ 1276 // } 1277 1278 /*----main min-height-----*/ 1279 1280 // function mainHeightResize(){ 1281 // var fh = $('footer').height(); 1282 // var mp = $('main').offset().top; 1283 // } 1284 // mainHeightResize(); 1285 // $(window).on('resize', mainHeightResize); 1286 1287 /*---sp_payment color---*/ 1288 1289 var sp_menuColor = $('header .sp_menu a div span').css('background-color'); 1290 var sp_menuColor2 = $('header .burger li.sp_payment a svg').css('fill'); 1291 var sp_menuColor3 = $('header .burger li.sp_translate a svg').css('fill'); 1292 if(sp_menuColor2 == 'rgb(0, 0, 0)' || sp_menuColor2 == 'rgb(0,0,0)' || sp_menuColor2 == 'black'){ 1293 $('header .burger li.sp_payment a svg').css({'fill': sp_menuColor}); 1294 } 1295 1296 /*---youtube iframe---*/ 1297 1298 // $('*:not(.youtube_block)>iframe[src^="https://www.youtube.com/"]').each(function(){ 1299 // $(this).wrap("<div class='youtube_block'></div>"); 1300 // }); 1301 1302 /*---cotents_hide---*/ 1303 1304 $('body').on('click', '.hidetgl a, .hidetgl span', function(){ 1305 $(this).parent().parent().toggleClass('c_show'); 1306 contentsHIde(); 1307 return false; 1308 }); 1309 1310 if($('.widget_menu01.cotents_hide, .widget_menu01.cotents_hide_sp').length){ 1311 $('.widget_menu01.cotents_hide .mbx, .widget_menu01.cotents_hide_sp .mbx').each(function(){ 1312 $(this).wrapInner('<span></span>').append('<p class="hidetgl"><span>ãã£ã¨è¦ã</span></p>'); 1313 }); 1314 } 1315 function contentsMenuHIdeResize(){ 1316 $('.widget_menu01.cotents_hide .mbx>span, .widget_menu01.cotents_hide_sp .mbx>span').each(function(){ 1317 if($(this).width() < $(this).parent('.mbx').width() - 95 && $(this).height() <= $(this).parent('.mbx').height()){ 1318 $(this).next('.hidetgl').hide(); 1319 }else{ 1320 $(this).next('.hidetgl').show(); 1321 } 1322 }); 1323 } 1324 $(window).on('resize', contentsMenuHIdeResize); 1325 contentsMenuHIdeResize(); 1326 1327 if($('.beforeafter_archive.cotents_hide, .beforeafter_archive.cotents_hide_sp').length){ 1328 $('.beforeafter_archive.cotents_hide .inner_item_txt p:not(.title), .beforeafter_archive.cotents_hide_sp .inner_item_txt p:not(.title)').each(function(){ 1329 $(this).wrapInner('<span></span>').append('<p class="hidetgl"><span>ãã£ã¨è¦ã</span></p>'); 1330 }); 1331 } 1332 function contentsBAHIdeResize(){ 1333 $('.beforeafter_archive.cotents_hide .inner_item_txt p:not(.title)>span, .beforeafter_archive.cotents_hide_sp .inner_item_txt p:not(.title)>span').each(function(){ 1334 if($(this).width() < $(this).parent('p').width() - 74 && $(this).height() < $(this).parent('p').height()){ 1335 $(this).next('.hidetgl').hide(); 1336 }else{ 1337 $(this).next('.hidetgl').show(); 1338 } 1339 }); 1340 } 1341 $(window).on('resize', contentsBAHIdeResize); 1342 contentsBAHIdeResize(); 1343 1344 function contentsHIde(){ 1345 $('.hidetgl a, .hidetgl span').text('ãã£ã¨è¦ã'); 1346 $('.c_show .hidetgl a, .c_show .hidetgl span').text('éãã'); 1347 } 1348 contentsHIde(); 1349 1350 /*---header---*/ 1351 $('.nav_1st').css({flexWrap: 'no-wrap'}); 1352 $('.nav_1st>li').css({flexGrow: '1'}); 1353 $('.nav_1st>li>a').css({paddingLeft: 0, paddingRight: 0}); 1354 1355 var hh = find_header_height() 1356 var liw = 0; 1357 $('.nav_1st>li>a>span').each(function(){ 1358 liw += $(this).width(); 1359 }); 1360 function ResizeNavs() { 1361 if($('header nav').width() > liw - 10){ 1362 $('.nav_1st').css({flexWrap: 'no-wrap'}); 1363 $('.nav_1st>li').css({flexGrow: '1'}); 1364 $('.nav_1st>li>a').css({paddingLeft: 0, paddingRight: 0}); 1365 } else { 1366 $('.nav_1st').css({flexWrap: 'wrap'}); 1367 $('.nav_1st>li').css({flexGrow: '0'}); 1368 $('.nav_1st>li>a').css({paddingLeft: '1vw', paddingRight: '1vw'}); 1369 } 1370 hh = find_header_height() 1371 } 1372 // $(window).on('resize', ResizeNavs); 1373 1374 var anchor = window.location.hash; 1375 window.location.hash = ''; 1376 setTimeout(function() { 1377 $(window).on('resize', ResizeHead); 1378 ResizeHead() 1379 $('body').children('header, main, footer, #mv_outer, #pan, #lv_outer').css('visibility', 'visible'); 1380 hide_loading(); 1381 if (anchor !== '') window.location.hash = anchor; 1382 }, 1000); 1383 1384 function ResizeHeadTel(){ 1385 if(window.innerWidth > 900 && $('header .header_contents .header_col1').css('flex-direction') == 'row'){ 1386 $('body.scrolled header .header_col1 .tel').css({display: 'block'});
1387 } 1388 } 1389 $(window).on('resize', ResizeHeadTel); 1390 $(window).on('scroll', function(){ 1391 ResizeHeadTel(); 1392 }); 1393 ResizeHeadTel(); 1394 1395 if(!$('body').hasClass('edit_view')){ 1396 if(!($('header#pattern4>.wraper>.inner>.btn').length)){ 1397 $('header#pattern4 .header_contents .btn').clone().insertBefore('.burger'); 1398 } 1399 if(!($('header#pattern4>.wraper>.inner>.header_sns').length)){ 1400 $('header#pattern4 .header_contents .header_sns').clone().insertBefore('.burger'); 1401 } 1402 } 1403 $('header#pattern4 .header_contents a').on( 1404 'click', function(){ 1405 $('header#pattern4').removeClass('open'); 1406 }); 1407 1408 /*---scroll---*/ 1409 1410 var start_pos = 0; 1411 var main_pos; 1412 if($('main').length > 0) { 1413 main_pos = $('main').offset().top; 1414 } else { 1415 main_pos = 0; 1416 } 1417 $('body').removeClass('scrolled'); 1418 $('body').removeClass('scrolledHide'); 1419 $(window).on('scroll', function(e){ 1420 if(!($('header.header_class.nofixed').length)){ 1421 var current_pos = $(this).scrollTop(); 1422 if(current_pos >= hh){ 1423 $('body').addClass('scrolled'); 1424 }else{ 1425 $('body').removeClass('scrolled'); 1426 } 1427 start_pos = current_pos; 1428 } 1429 $('header#pattern4 .header_contents').css({height: window.innerHeight - $('header').height()}); 1430 HH(); 1431 }); 1432 1433}); 1434 1435/*----cmnFunc-----*/ 1436 1437function ResizeComposite(){ 1438 $('.composite_box01:not(.on_favorite_page)').each(function(){ 1439 var $tgtBox = $(this); 1440 var rate = 1.6; 1441 var wwidth = $(this).find('.inner_item').width(); 1442 $(this).find('.inner_item_img source').each(function(){ 1443 var source = new Image(); 1444 source.src = $(this).attr('srcset'); 1445 source.onload = function(){ 1446 var width = source.width; 1447 var height = source.height; 1448 var thisrate = height/width; 1449 if(rate > thisrate && width > 0 && height > 0){ 1450 rate = thisrate; 1451 } 1452 $tgtBox.find('.inner_item_img img').each(function(){ 1453 $(this).css({width: '100%'}); 1454 $(this).css({height: wwidth*rate}); 1455 }); 1456 } 1457 }); 1458 $(this).find('.inner_item_img img').each(function(){ 1459 var img = new Image(); 1460 img.src = $(this).attr('src'); 1461 img.onload = function(){ 1462 var width = img.width; 1463 var height = img.height; 1464 var thisrate = height/width; 1465 if(rate > thisrate && width > 0 && height > 0){ 1466 rate = thisrate; 1467 } 1468 $tgtBox.find('.inner_item_img img').each(function(){ 1469 $(this).css({width: '100%'}); 1470 $(this).css({height: wwidth*rate}); 1471 }); 1472 } 1473 }); 1474 }); 1475} 1476 1477function find_header_height() { 1478 return $('header').last().height(); 1479} 1480 1481$(function(){ 1482 1483 /*--block_table_2 çµã¿æã---*/ 1484 1485 function tableResize02(){ 1486 $('.block_table_2 table').each(function(){ 1487 var itemContent2 = '<tbody class="block_table_2_item">'; 1488 var array2 =[]; 1489 var cols2 = $(this).find('thead tr th, thead tr td').size(); 1490 var rows2 = $(this).find('tr').size(); 1491 for(var i = 0; i < cols2; i++){ 1492 itemContent2 += '<tr>'; 1493 array2[i] = []; 1494 for(var j = 0; j < rows2; j++){ 1495 array2[i][j] = $(this).find('tr:eq('+j+') > *:eq('+i+')').html(); 1496 if(j == 0){ 1497 itemContent2 += '<th>'+array2[i][j]+'</th>'; 1498 }else{ 1499 itemContent2 += '<td>'+array2[i][j]+'</td>'; 1500 } 1501 } 1502 itemContent2 += '</tr>'; 1503 } 1504 itemContent2 += '</tbody>'; 1505 if(window.innerWidth < 500){ 1506 if(!$(this).children().is('tbody.block_table_2_item')){ 1507 $(this).find('tbody').after(itemContent2); 1508 } 1509 }else{ 1510 if($(this).children().is('tbody.block_table_2_item')){ 1511 $(this).find('tbody.block_table_2_item').remove(); 1512 } 1513 } 1514 }); 1515 } 1516 tableResize02(); 1517 $(window).on('resize', tableResize02); 1518}); 1519 1520$(document).on("click", ".inner_item_txt a", function(e) { 1521 e.stopPropagation(); 1522}); 1523 1524$(document).on("click", ".inner_item_container", function(e) { 1525 var link_tag = $(this).find("a.target_link"); 1526 if (link_tag.attr("target") === "_blank") { 1527 window.open(link_tag.attr("href"), '_blank').focus(); 1528 } else if (link_tag.attr("target") === "_self") { 1529 window.location.href = link_tag.attr("href"); 1530 } else { 1531 link_tag.trigger("click"); 1532 } 1533}); 1534 1535/*! 1536 * @copyright Copyright (c) 2017 IcoMoon.io 1537 * @license Licensed under MIT license 1538 * See https://github.com/Keyamoon/svgxuse 1539 * @version 1.2.6 1540 */ 1541(function(){if("undefined"!==typeof window&&window.addEventListener){var e=Object.create(null),l,d=function(){clearTimeout(l);l=setTimeout(n,100)},m=function(){},t=function(){window.addEventListener("resize",d,!1);window.addEventListener("orientationchange",d,!1);if(window.MutationObserver){var k=new MutationObserver(d);k.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0});m=function(){try{k.disconnect(),window.removeEventListener("resize",d,!1),window.removeEventListener("orientationchange", 1542d,!1)}catch(v){}}}else document.documentElement.addEventListener("DOMSubtreeModified",d,!1),m=function(){document.documentElement.removeEventListener("DOMSubtreeModified",d,!1);window.removeEventListener("resize",d,!1);window.removeEventListener("orientationchange",d,!1)}},u=function(k){function e(a){if(void 0!==a.protocol)var b=a;else b=document.createElement("a"),b.href=a;return b.protocol.replace(/:/g,"")+b.host}if(window.XMLHttpRequest){var d=new XMLHttpRequest;var m=e(location);k=e(k);d=void 0=== 1543d.withCredentials&&""!==k&&k!==m?XDomainRequest||void 0:XMLHttpRequest}return d};var n=function(){function d(){--q;0===q&&(m(),t())}function l(a){return function(){!0!==e[a.base]&&(a.useEl.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#"+a.hash),a.useEl.hasAttribute("href")&&a.useEl.setAttribute("href","#"+a.hash))}}function p(a){return function(){var c=document.body,b=document.createElement("x");a.onload=null;b.innerHTML=a.responseText;if(b=b.getElementsByTagName("svg")[0])b.setAttribute("aria-hidden", 1544"true"),b.style.position="absolute",b.style.width=0,b.style.height=0,b.style.overflow="hidden",c.insertBefore(b,c.firstChild);d()}}function n(a){return function(){a.onerror=null;a.ontimeout=null;d()}}var a,b,q=0;m();var f=document.getElementsByTagName("use");for(b=0;b<f.length;b+=1){try{var h=f[b].getBoundingClientRect()}catch(w){h=!1}var g=(a=f[b].getAttribute("href")||f[b].getAttributeNS("http://www.w3.org/1999/xlink","href")||f[b].getAttribute("xlink:href"))&&a.split?a.split("#"):["",""];var c= 1545g[0];g=g[1];var r=h&&0===h.left&&0===h.right&&0===h.top&&0===h.bottom;h&&0===h.width&&0===h.height&&!r?(c.length||!g||document.getElementById(g)||(c=""),f[b].hasAttribute("href")&&f[b].setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a),c.length&&(a=e[c],!0!==a&&setTimeout(l({useEl:f[b],base:c,hash:g}),0),void 0===a&&(g=u(c),void 0!==g&&(a=new g,e[c]=a,a.onload=p(a),a.onerror=n(a),a.ontimeout=n(a),a.open("GET",c),a.send(),q+=1)))):r?c.length&&e[c]&&setTimeout(l({useEl:f[b],base:c, 1546hash:g}),0):void 0===e[c]?e[c]=!0:e[c].onload&&(e[c].abort(),delete e[c].onload,e[c]=!0)}f="";q+=1;d()};var p=function(){window.removeEventListener("load",p,!1);l=setTimeout(n,0)};"complete"!==document.readyState?window.addEventListener("load",p,!1):p()}})();
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.