1// JavaScript Document 2 3 4// Global ---------------------------------------- 5 6const windowWidth = $(window).width(); // ã¦ã£ã³ãã¦å¹ åå¾ 7const windowSm = 768; // ãã¬ã¤ã¯ãã¤ã³ã 8 9 10// é»è©±çªå· ---------------------------------------- 11 12if (navigator.userAgent.match(/(iPhone|iPad|Android|Mobile)/)) { 13 $('.tel').each(function() { 14 const str = $(this).html(); 15 if ($(this).children().is('img')) { 16 $(this).html($('<a>').attr('href', 'tel:' + $(this).children().attr('alt').replace(/-/g, '')).append(str + '</a>')); 17 } else { 18 $(this).html($('<a>').attr('href', 'tel:' + $(this).text().replace(/-/g, '')).append(str + '</a>')); 19 } 20 }); 21} 22 23 24// ããªã¬ã¼ã§åºã¦ããè¦ç´ ---------------------------------------- 25 26$(window).on('scroll load', function(){ 27 $('.anime').each(function(){ 28 const imgPos = $(this).offset().top; 29 const scroll = $(window).scrollTop(); 30 const windowHeight = $(window).height(); 31 if (scroll > imgPos - windowHeight + windowHeight/5){ 32 $(this).addClass('trigger') 33 } 34 }); 35}); 36 37 38// Gãã ---------------------------------------- 39 40$('#nav #sp_menu').click(function() { // SPãã³ãã¼ã¬ã¼ã¢ã¼ãã« 41 $('html, body').toggleClass('spnav_modal'); 42 $(this).toggleClass('close').next('#nav .gnav_subnav').css('visibility','visible').fadeToggle(200); 43 $('#nav #sp_menu').not($(this)).removeClass('close').next('#nav .gnav_subnav').css('display','none'); 44 return false; 45}); 46$('#nav .sub').click(function() { // 診çå 容ãããããã¦ã³ã¡ãã¥ã¼ 47 $(this).toggleClass('close').next('#nav .subbox').css('visibility','visible').slideToggle(); 48 $('#nav .sub').not($(this)).removeClass('close').next('#nav .subbox').css('display','none'); 49 return false; 50}); 51$(window).click(function(e) { // ã¨ãªã¢å¤ã¿ããã§ã¢ã¼ãã«éãã 52 if ($('.spnav_modal').is(':visible')) { 53 if(!$(e.target).closest('#nav .gnav_subnav').length) { // ã¿ãã¬ããå¯¾å¿ 54 $('html, body').removeClass('spnav_modal'); 55 $('#nav #sp_menu').removeClass('close'); 56 $('#nav .gnav_subnav').fadeToggle(); 57 } 58 } 59}); 60 61// PCã®å ´å 62 if (windowWidth >= windowSm) { 63 //診çå 容å¦ç 64 $(window).click(function(e) { // ã¨ãªã¢å¤ã¿ããã§ã¢ã¼ãã«éãã 65 if ($('#nav .subbox').is(':visible')) { 66 if(!$(e.target).closest('#nav').length) { // ã¿ãã¬ããå¯¾å¿ 67 $('#nav .sub').removeClass('close'); 68 $('#nav .subbox').slideUp(150); 69 } 70 } 71 }); 72} 73 74// ã«ã¬ã³ãã¡ãã¥ã¼å¦ç ---------------------------------------- 75 76$('#nav .current').removeClass('current'); 77$('#nav a').filter(function(){ 78 return $(this).prop('href')==location.href; 79}).addClass('current'); 80 81// ãããããã¼ãã¸ã¥ã¢ã«ãslick ---------------------------------------- 82 83$('#keyvsl').slick({ 84 cssEase: 'linear', // ä¸å®é度 85 autoplay: true, // Autoplay 86 autoplaySpeed: 4000, // ã¤ã³ã¿ã¼ãã« 87 speed: 700, // åæ¿æé 88 arrows: false, // Prev/Next 89 dots: false, // ã¤ã³ã¸ã±ã¼ã¿ã¼ 90 fade: true 91}); 92$('#keyvsl').delay(50).css('visibility','visible'); 93 94// ãããããç¥ãããã¢ã³ã¼ãã£ãªã³ ---------------------------------------- 95 96$('.news_title').slice(0, 3).addClass('open'); // ææ°3åã¯å±é 97$('.news_title').click(function() { 98 $(this).toggleClass('open').next('.news_body').slideToggle(); 99}); 100$('.news_title').keydown(function(evt){ // ãã¼ãã¼ãæä½ 101 if (evt.key == 'Enter') { // Enterãã¼ã§éé 102 $(this).toggleClass('close').next('.news_body').slideToggle(); 103 } 104}); 105 106// ã¯ãªããã¯ç´¹ä»ã®ã£ã©ãªã¼ slick ---------------------------------------- 107 108$(".gallery_slider").each(function() { // ã¡ã¤ã³ç»å 109 $(this).slick({ 110 cssEase: 'linear', // ä¸å®é度 111// autoplay: true, // Autoplay 112// autoplaySpeed: 5000, // ã¤ã³ã¿ã¼ãã« 113 arrows: true, // Prev/Next 114 dots: true, // ã¤ã³ã¸ã±ã¼ã¿ã¼ 115 fade: true, 116 speed: 500, // åæ¿æé 117 adaptiveHeight: true, // å 容ã«ãã£ã¦é«ãå¯å¤ 118 asNavFor: "#" + $(this).attr("id") + "_nav" // è¤æ°ã¹ã©ã¤ãå¯¾å¿ 119 }); 120}); 121$(".gallery_thum").each(function() { // ãµã ã 122 $(this).slick({ 123 slidesToShow: 7, 124 slidesToScroll: 1, 125 centerMode: false, 126 centerPadding: 0,
127 arrows: false, // Prev/Next 128 cssEase: 'linear', // ä¸å®é度 129 focusOnSelect: true, // ã¯ãªãã¯ã§åãæ¿ã 130 asNavFor: "#" + $(this).attr("id").replace("_nav", ""), // è¤æ°ã¹ã©ã¤ãå¯¾å¿ 131 responsive: [{ 132 breakpoint: 767, // ã¹ããã®å ´å 133 settings: { 134 slidesToShow: 3, 135 },}, 136 ] 137 }); 138}); 139//$('.gallery_slider').on('beforeChange', function(event, slick, currentSlide, nextSlide){ 140// if ($('.gallery_thum > div').length < 4) { // ææ°ãå°ãªãå ´åã®å¦ç 141// $('.gallery_thum').slick('slickSetOption', 'centerMode', true, true); 142// } 143//}); 144$('.gallery').delay(50).css('visibility','visible'); 145 146// ã¹ã ã¼ãºã¹ã¯ãã¼ã« ---------------------------------------- 147 148if (windowWidth < windowSm) { // ã¹ããã®å ´å 149 $('.scr').click(function() { 150 const href= $(this).attr('href'); 151 const target = $(href == '#' || href == '' ? 'html' : href); 152 const position = target.offset().top - 20; 153 $('html, body').animate({scrollTop: position}, 500, 'swing'); 154 return false; 155 }); 156} 157if (windowWidth >= windowSm) { // PCã¹ãã£ããã¼ãããã¼ã®å ´å 158 const highTop = $('.header').height(); // ã¹ãã£ããã¼ãããã¼ã®é«ãåå¾ 159 $('.scr').click(function() { 160 const href= $(this).attr('href'); 161 const target = $(href == '#' || href == '' ? 'html' : href); 162 const position = target.offset().top - highTop + 120; 163 $('html, body').animate({scrollTop: position}, 500, 'swing'); 164 return false; 165 }); 166} 167 168// SPããã¿ã¼åºå®ãé»è©±ã»WEbäºç´ã»ãã¼ã¸ã¢ãã ---------------------------------------- 169 170$('#pageup').hide(); 171$(window).scroll(function () { 172 if ($(this).scrollTop() > 200) { 173 $('#pageup').fadeIn().css('visibility', 'visible'); 174 } else { 175 $('#pageup').fadeOut(); 176 } 177}); 178$('#pageup').click(function() { 179 $('html, body').animate({ scrollTop: 0 }, 500, 'swing'); 180 return false; 181}); 182 183// ã¢ã³ã¼ãã£ãªã³ ---------------------------------------- 184$('.js-acc_tit').click(function() { 185 $(this).toggleClass('open').next('.js-acc_body').slideToggle(); 186 }); 187 $('.js-acc_tit').keydown(function(evt){ // ãã¼ãã¼ãæä½ 188 if (evt.key == 'Enter') { // Enterãã¼ã§éé 189 $(this).toggleClass('open').next('.js-acc_body').slideToggle(); 190 }});
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.