PageSourceSearch

https://k-reborn.com/theme/h1mewh01/js/common.js

js k-reborn.com collected 2026-10-05 05:39:44 UTC 38,961 bytes, 1,490 lines download raw bytes

1$(document).ready(function () {
2
3  /**
4   * -------------------
5   * スクロールが100に達したらボタン表示
6   * -------------------
7   */
8  var showFlag = false;
9  var topBtn = $('#pagetop');
10  topBtn.css('opacity', '0');
11  var showFlag = false;
12  $(window).scroll(function () {
13    if ($(this).scrollTop() > 100) {
14      if (showFlag == false) {
15        showFlag = true;
16        topBtn.stop().animate({ 'opacity': '1' }, 500);
17      }
18    } else {
19      if (showFlag) {
20        showFlag = false;
21        topBtn.stop().animate({ 'opacity': '0' }, 500);
22      }
23    }
24  });
25
26  /**
27 * -------------------
28 * スクロールしてトップ
29 * -------------------
30 */
31  topBtn.click(function () {
32    $('body,html').animate({
33      scrollTop: 0
34    }, 500);
35    return false;
36  });
37  $('a[href*="#top"]').click(function () {
38    $('html,body').animate({
39      scrollTop: 0
40    }, 400);
41    return false;
42  });
43
44  /**
45* -------------------
46* プロフィール画像切り替え
47* -------------------
48*/
49  $('#profile_img_thumb div img').click(function () {
50    var imgs = $(this).attr('src');
51    $('#profile_img_big >img').fadeOut("normal", function () {
52      $('#profile_img_big >img').attr("src", imgs);
53      $('#profile_img_big >img').fadeIn();
54    });
55    return false;
56  });
57
58  // 自動切り替え
59  $(function () {
60    var imgNum = 3;
61    var imgSize = 800;
62    var time = 1000;
63    var current = 0;
64
65    setInterval(function () {
66      if (current < imgNum - 1) {
67        current++;
68        $("#profile_img_thumb p img").animate({
69          marginLeft: parseInt($("#profile_img_thumb p img").css("margin-left")) - imgSize + "px"
70        }, "fast");
71      } else {
72        $("#profile_img_thumb p img").animate({
73          marginLeft: parseInt($("#profile_img_thumb p img").css("margin-left")) + (imgSize * (imgNum - 1)) + "px"
74        }, "fast");
75        current = 0;
76      }
77    }, time);
78  });
79
80/**
81* -------------------
82* 特大スライド
83* -------------------
84*/
85
86  if ($(".bigbanner-slider").length && $(".bigbanner-slider .swiper-slide").length > 1) {
87    swiper = new Swiper('.bigbanner-slider', {
88      loop: true,
89      effect: "fade",
90      autoplay: {
91        delay: 4000,
92        disableOnInteraction: false,
93      },
94      pagination: {
95        el: '.swiper-pagination-bigbanner',
96        clickable: true,
97        type: 'bullets',
98        dynamicBullets: true,
99      },
100      speed: 4500,
101    });
102  }
103
104
105/**
106* -------------------
107* TOPスライド
108* -------------------
109*/
110// $(window).on("load", function () {
111  if ($(".topslide").length && $(".topslide .swiper-slide").length > 1) {
112    var swiper = new Swiper('.topslide', {
113      slidesPerView: 2,
114      spaceBetween: 5,
115      centeredSlides: true,
116      loop: true,
117      speed: 1500,
118      autoplay: {
119        delay: 3000,
120        disableOnInteraction: true
121      },
122      pagination: {
123        el: '.swiper-pagination',
124        //clickable: true,
125        type: 'bullets',
126        dynamicBullets: true,
127      },
128      breakpoints: {
129        1200: {
130          slidesPerView: 1,
131          spaceBetween: 0,
132        }
133      }
134    });
135  }
136//});
137
138/**
139* -------------------
140* ギャラリースライド
141* -------------------
142*/
143$(window).on("load", function () {
144if ($(".galleryslide").length && $(".galleryslide .swiper-slide").length > 0) {
145const $caption = $(".gallery_inner .caption");
146const $title = $(".gallery_inner .title");
147const slideCount = $(".galleryslide .swiper-slide").not(".swiper-slide-duplicate").length;
148
149function updateCaption(swiper) {
150  const $currentSlide = $(swiper.slides[swiper.activeIndex]);
151  const $link = $currentSlide.find("a[data-caption]");
152  const captionText = $link.data("caption") || ""; // キャプション取得(なければ空)
153  $caption.html(captionText);
154}
155
156function updateTitle(swiper) {
157  const $currentSlide = $(swiper.slides[swiper.activeIndex]);
158  const $link = $currentSlide.find("a[data-title]");
159  const captionText = $link.data("title") || ""; // タイトル取得(なければ空)
160  $title.html(captionText);
161}
162
163  const swiperOptions = {
164    loop: slideCount > 1, // スライドが1枚のみの場合はループを無効化
165    slidesPerView: slideCount > 1 ? 2 : 1, // スライド数が1枚の場合は1
166    centeredSlides: true,
167    autoplay: {
168      delay: 3000,
169      disableOnInteraction: true
170    },
171    on: {
172      init: function () {
173        updateCaption(this); // 初期化時にキャプションを更新
174        updateTitle(this);
175      },
176      slideChange: function () {
177        updateCaption(this); // スライド変更時にキャプションを更新
178        updateTitle(this);
179      },
180    },
181    breakpoints: {
182      1200: slideCount > 1 
183        ? { // スライドが2枚以上の時
184            slidesPerView: 1.5,
185            coverflowEffect: {
186              rotate: 10,
187              depth: 250,
188              stretch: 15,
189              modifier: 1,
190              scale: 1,
191              slideShadows: false,
192            },
193          }
194        : { // スライドが1枚の時
195            slidesPerView: 1.5, // `coverflowEffect`は設定しない
196          },
197    },
198  };
199
200  // スライドが2枚以上ある場合のみ effect と pagination を追加
201  if (slideCount > 1) {
202    swiperOptions.effect = "coverflow";
203    swiperOptions.coverflowEffect = {
204      rotate: 10,
205      depth: 250,
206      stretch: 15,
207      modifier: 1,
208      scale: 1,
209      slideShadows: false,
210    };
211    swiperOptions.pagination = {
212      el: ".swiper-pagination-insta",
213      //clickable: true,
214      type: "bullets",
215      dynamicBullets: true,
216    };
217  }
218
219  // Swiper初期化
220  const swiper = new Swiper(".galleryslide", swiperOptions);
221
222    // data-lightbox属性を追加
223    swiper.slides.each(function(index, slide) {
224      if (!$(slide).hasClass('swiper-slide-duplicate')) {
225        $(slide).find('a').attr('data-lightbox', 'roadtrip');
226      }
227    });
228}
229});
230
231$(document).on("click", "[data-lightbox]", function (event) {
232  event.preventDefault();
233
234  // クリックされた画像と同じアルバムに属する画像をすべて取得
235  const $albumLinks = $("[data-lightbox]").filter(function () {
236    return $(this).attr("data-lightbox") === $(event.currentTarget).attr("data-lightbox");
237  });
238
239  // Lightboxアルバムをリセット
240  Lightbox.prototype.album = [];
241  $albumLinks.each(function () {
242    Lightbox.prototype.album.push({
243      link: $(this).attr("href"),
244      title: $(this).attr("data-title") || "",
245      caption: $(this).attr("data-caption") || ""
246    });
247  });
248
249  // 現在クリックされた画像のインデックスを取得
250  const index = $albumLinks.index(event.currentTarget);
251
252  // Lightboxを開く
253  const lightbox = new Lightbox();
254  lightbox.start($(event.currentTarget), index);
255});
256
257
258
259  /*フルサイズ画像*/
260  $(function () {
261    var slideOffset = 0;
262    if($('.fullImg').length) slideOffset = 750;
263  
264    var $body = $('body'),
265      $navTypeA = $('.nav--typeA'),
266      navTypeAOffsetTop = $navTypeA.offset().top + slideOffset;
267  
268    $(window).on('scroll', function () {
269      if ($(this).scrollTop() > navTypeAOffsetTop) {
270        $body.addClass('is-fixed');
271      } else {
272        $body.removeClass('is-fixed');
273      }
274    });
275  });
276
277  $(function () {
278
279    /**
280    * ----------------
281    * スクロールが20に達したらボタン表示
282    * ----------------
283    */
284    var showFlag = false;
285    var topBtn = $('#following');
286    topBtn.css('bottom', '-150px');
287    var showFlag = false;
288    $(window).scroll(function () {
289      if ($(this).scrollTop() > 20) {
290        if (showFlag == false) {
291          showFlag = true;
292          topBtn.stop().animate({ 'bottom': '0' }, 200);
293        }
294      } else {
295        if (showFlag) {
296          showFlag = false;
297          topBtn.stop().animate({ 'bottom': '-150px' }, 200);
298        }
299      }
300    });
301
302      /**
303  * ----------------
304  * スクロールしてトップ
305  * ----------------
306  */
307  $('a[href^="#top"]').click(function () {
308    $('body,  html').animate({
309      scrollTop: 0
310    }, 500);
311    return false;
312  });
313
314});
315
316});
317
318/**
319* -------------------
320* 新人スライド番号
321* -------------------
322*/
323$(window).on("load", function () {
324  function formatNumber(num, length = 2) {
325    return num >= 10 ? String(num) : String(num).padStart(length, '0');
326  }
327  
328  $(function () {
329    $('.js-slide_num').each(function () {
330        let num = $(this).text().trim();
331        if (!isNaN(num)) $(this).text(formatNumber(Number(num)));
332    });
333  });
334  
335  /**
336  * -------------------
337  * 新人スライド
338  * -------------------
339  */
340  $(function () {
341    if ($(".topNewface_list").length) {
342      // 元のスライド数を保存(この値をページネーションなどに使用)
343      const originalSlideCount = $(".topNewface_list .swiper-slide").length;
344      let actualSlideCount = originalSlideCount;
345      
346      // スタイル調整
347      if(originalSlideCount < 4){
348        $('.topNewface .newface_inner .swiper-container .swiper-wrapper').css('justify-content', 'flex-start');
349      }
350
351      // スライドが3枚以下ならループ用に複製(実際のスライド数が変わる)
352      if (originalSlideCount <= 3 && originalSlideCount > 1) {
353        const swiperWrapper = $(".topNewface_list .swiper-wrapper");
354        // 既存のスライドを複製
355        for (let i = 0; i < originalSlideCount; i++) {
356          const clonedSlide = $(`.topNewface_list .swiper-slide:eq(${i})`).clone();
357          swiperWrapper.append(clonedSlide);
358        }
359        // 実際のスライド数を更新
360        actualSlideCount = originalSlideCount * 2;
361      }
362
363      const swiperWrapper = document.querySelector(".swiper-wrapper");
364      const lastSwiperSlide = document.querySelector(".swiper-slide:last-of-type");
365
366      var swiper = new Swiper('.topNewface_list', {
367        loop: originalSlideCount > 1, // 2枚以上ならループ可能
368        slidesPerView: 'auto',
369        centeredSlides: false,
370        spaceBetween: 20,
371        //slidesOffsetAfter: swiperWrapper.clientWidth - lastSwiperSlide.clientWidth,
372        slidesOffsetAfter: originalSlideCount > 1 ?
373        swiperWrapper.clientWidth - lastSwiperSlide.clientWidth : 0,
374        autoplay: originalSlideCount > 1 ? {
375          delay: 3000,
376          disableOnInteraction: true,
377        } : false,
378        pagination: {
379          el: ".swiper-pagination-number",
380          type: "fraction",
381          formatFractionCurrent: function (number) {
382            // 複製されたスライドの場合、元のスライド数の範囲内に収める
383            const adjustedNumber = originalSlideCount <= 3 ? 
384              ((number - 1) % originalSlideCount) + 1 : number;
385            return formatNumber(adjustedNumber);
386          },
387          formatFractionTotal: function () {
388            // 常に元のスライド数を表示
389            return formatNumber(originalSlideCount);
390          },
391        },
392        on: {
393          init: function() {
394            $('.newface_info_inner .c-panel__profile').removeClass('active');
395            // realIndexの代わりに、元のスライド数で調整したインデックスを使用
396            const profileIndex = originalSlideCount <= 3 ? 
397              this.realIndex % originalSlideCount : this.realIndex;
398            $('.newface_info_inner .c-panel__profile').eq(profileIndex).addClass('active');
399          },
400          slideChangeTransitionEnd: function() {
401            $('.newface_info_inner .c-panel__profile').removeClass('active');
402            // 同様に調整したインデックスを使用
403            const profileIndex = originalSlideCount <= 3 ? 
404              this.realIndex % originalSlideCount : this.realIndex;
405            $('.newface_info_inner .c-panel__profile').eq(profileIndex).addClass('active');
406          }
407        }
408      });
409    }
410  });
411});
412
413/**
414 * ----------
415 * ピックアップスライド
416 * ----------
417 */
418$(window).on("load", function () {
419$(function () {
420  const slideCount = $(".js-pickupSlide .pickup_inner .swiper-slide").length;
421  if (slideCount === 1) {
422    $('.pickup_frame .swiper-button-prev').addClass('nondisplay');
423    $('.pickup_frame .swiper-button-next').addClass('nondisplay');
424  }
425  if (slideCount > 1) {
426    options = {
427      slidesPerView: 1,
428      spaceBetween: 0,
429      centeredSlides: true,
430      loop: true, // スライドが2枚以上の場合はループ有効
431      speed: 700,
432      autoplay: {
433        delay: 3000,
434        disableOnInteraction: true,
435      },
436      navigation: {
437        nextEl: '.swiper-button-next',
438        prevEl: '.swiper-button-prev',
439      },
440    };
441  } else {
442    options = {
443      slidesPerView: 1,
444      spaceBetween: 0,
445      centeredSlides: true,
446      loop: false, // スライドが1枚以下の場合はループ無効
447    };
448  }
449  
450  new Swiper('.js-pickupSlide .pickup_inner', options);
451
452});
453});
454
455$(document).ready(function () {
456  /**
457  * -------------------
458  * バリデート
459  * -------------------
460  */
461  if ($("#reserveForm").length) {
462    $("#reserveForm").validationEngine('attach', { autoPositionUpdate: true, autoHidePrompt: true, autoHideDelay: "8000" });
463  }
464});
465
466
467/**
468* -------------------
469* ticker
470* -------------------
471*/
472$(function () {
473  if ($("#ticker").length) {
474    $("#ticker li").newsTicker({
475      type: "normal",
476      speed: 50,
477      speed1: 1000,
478      speed2: 100,
479    });
480  }
481});
482
483
484/**
485* -------------------
486* グローバルメニューヘッダー固定
487* -------------------
488*/
489$(function () {
490
491  var navPos = $('#js_nav_fixed').offset().top;
492  var navHeight = $('#js_nav_fixed').outerHeight();
493  $(window).on('scroll', function () {
494    if ($(this).scrollTop() > navPos) {
495      $('body').css('padding-top', navHeight);
496      $('#js_nav_fixed').addClass('m_fixed');
497    } else {
498      $('body').css('padding-top', 0);
499      $('#js_nav_fixed').removeClass('m_fixed');
500    }
501  });
502
503});
504
505/**
506* -------------------
507* メニュー切り替え
508* -------------------
509*/
510document.addEventListener("DOMContentLoaded", () => {
511  const menu = document.querySelector("#h_menu"); // メニュー全体
512  const button = document.querySelector("#h_menu_btn"); // トリガーボタン
513  const overlay = document.querySelector("#h_menu_overlay"); // オーバーレイ
514
515  // 初期設定
516  gsap.set(menu, {
517    clipPath: "polygon(100% 0%, 100% 0%, 100% 100%, 100% 100%)", // メニューを非表示状態に
518  });
519
520  // メニューを開く・閉じる関数
521  const openMenu = () => {
522    // メニューを開くアニメーション
523    gsap.to(menu, {
524      clipPath: "polygon(-50% 0%, 110% 0%, 100% 100%, 0% 100%)",
525      duration: 1.3,
526      ease: "power1.inOut",
527    });
528
529    // クラスを追加
530    button.classList.add("active");
531    menu.classList.add("active");
532    overlay.classList.add("active");
533
534    // メニューアイテムのアニメーション
535    const menuItems = document.querySelectorAll("#h_menu.active #h_menu_list li");
536    gsap.set(menuItems, {
537      y: "50%",
538      opacity: 0,
539    });
540
541    menuItems.forEach((item, index) => {
542      gsap.to(item, {
543        y: 10,
544        opacity: 1,
545        delay: 0.1 * index,
546        duration: 0.6,
547        ease: "power1.out",
548      });
549    });
550  };
551
552  const closeMenu = () => {
553    // メニューアイテムを閉じるアニメーション
554    const menuItems = document.querySelectorAll("#h_menu.active #h_menu_list li");
555    const timeline = gsap.timeline();
556    timeline.to(menuItems, {
557      y: "100%",
558      opacity: 0,
559      duration: 0.25,
560      ease: "power1.in",
561    });
562
563    // メニューを閉じるアニメーション
564    timeline.to(menu, {
565      clipPath: "polygon(100% 0%, 100% 0%, 100% 100%, 100% 100%)",
566      duration: 1,
567      ease: "power2.inOut",
568    });
569
570    // クラスを削除(アニメーション終了後に実行)
571    timeline.add(() => {
572      button.classList.remove("active");
573      menu.classList.remove("active");
574      overlay.classList.remove("active");
575    });
576  };
577
578  // ボタンのクリックイベント
579  button.addEventListener("click", () => {
580    if (!button.classList.contains("active")) {
581      openMenu();
582    } else {
583      closeMenu();
584    }
585  });
586
587  // オーバーレイのクリックイベント
588  overlay.addEventListener("click", () => {
589    if (button.classList.contains("active")) {
590      closeMenu();
591    }
592  });
593});
594
595//ローディングアニメーション
596
597
598
599//GSAPコンテンツアニメーション
600window.addEventListener("DOMContentLoaded", async () => {
601  gsap.registerPlugin(ScrollTrigger);
602  const stagger = 0.05;
603  const mm = gsap.matchMedia();//画面サイズ
604
605    // ローディング要素の存在確認
606    const loader = document.getElementById("loader");
607  
608    if (loader) {
609      // ローディング画面がある場合の処理
610      const fadeComplete = new Promise(resolve => {
611        $("#loader").fadeOut("slow", function() {
612          // ローディング終了後にScrollTriggerを更新
613          ScrollTrigger.refresh();
614          resolve();
615        });
616      });
617      
618      // ローディング完了を待ってから残りの処理を実行
619      await fadeComplete;
620    }
621
622  //コンセプト(PC)
623  mm.add("(min-width: 769px)", () => {
624  gsap.utils.toArray("#concept").forEach((el) => {
625    const q = gsap.utils.selector(el);
626    gsap.timeline({
627        scrollTrigger: {
628          trigger: el,
629          // trigger: '#concept',
630          //start: "top<-=200%",
631          start: 'top 100%',
632          end: 'bottom 50%',
633          toggleActions: "play none none none", //一回だけの時最後をnoneにする
634          //once: true,
635          //markers: true,
636          //fastScrollEnd: true,
637        },
638      })
639      .fromTo(
640        el,
641        {
642          x: "-100%", // 左からスライドイン
643        },
644        {
645          x: "0%", // 最終位置
646          duration: 1.2,
647          ease: "power3.out",
648        },
649        //"-=0.1",
650        //"<",
651      )
652      .fromTo(
653        // 縦書きタイトル
654        q(".tatekaki_title"),
655        {
656          y: "120%",
657        },
658        {
659          y: "0%",
660          duration: 0.75,
661          delay: 0.01,
662          stagger,
663          ease: "power3.out",
664        },
665        "-=0.65",
666        //"<",
667      )
668      .fromTo(
669        q("#concept h4"),
670        {
671          alpha: 0,
672        },
673        {
674          alpha: 1,
675          duration: 0.3,
676          //delay: 0.01,
677          stagger,
678        },
679        //"<",
680        "-=0.45",
681      )
682      .fromTo(
683        q("#concept p"),
684        {
685          alpha: 0,
686          y: 32,
687        },
688        {
689          alpha: 1,
690          y: 0,
691          duration: 0.75,
692          //delay: 0.01,
693          stagger,
694          ease: "power3.out",
695        },
696        "-=0.45",
697        //"<",
698      );
699  });
700});
701
702//コンセプト(SP)
703mm.add("(max-width: 768px)", () => {
704  gsap.utils.toArray("#concept").forEach((el) => {
705    const q = gsap.utils.selector(el);
706    gsap
707      .timeline({
708        scrollTrigger: {
709          trigger: el,
710          start: "top 100%",
711          end: "bottom 50%",
712          toggleActions: "play none none none",
713          //once: true,
714          //markers: true,
715        },
716      })
717      .fromTo(
718        el,
719        {
720          x: "-100%", // 左からスライドイン
721        },
722        {
723          x: "0%", // 最終位置
724          duration: 1.2,
725          ease: "power3.out",
726        }
727      )
728      .fromTo(
729        // 縦書きタイトル
730        q(".tatekaki_title"),
731        {
732          alpha: 0,
733        },
734        {
735          alpha: 1,
736          duration: 1,
737          //delay: 0.05,
738          stagger,
739          ease: "power3.out",
740        },
741        "-=0.65",
742      )
743      .fromTo(
744        q("#concept h4"),
745        {
746          y: "30%",
747          alpha: 0,
748        },
749        {
750          y: "0%",
751          alpha: 1,
752          duration: 0.3,
753          //delay: 0.2,
754          //delay: 0.15,
755          stagger,
756        },
757        //"<",
758        "-=0.45",
759      )
760      .fromTo(
761        q("#concept p"),
762        {
763          alpha: 0,
764          y: 32,
765          },
766        {
767          alpha: 1,
768          y: 0,
769          duration: 0.75,
770          //delay: 0.3,
771          //delay: 0.2,
772          stagger,
773          ease: "power3.out",
774        },
775        //"<",
776        "-=0.45",
777      );
778  });
779});
780
781//出勤
782gsap.utils.toArray("#topschedule").forEach((el) => {
783    const q = gsap.utils.selector(el);
784    gsap
785      .timeline({
786        scrollTrigger: {
787          trigger: el,
788          //start: "top<-=60%",
789          start: 'top 100%',
790          end: 'bottom 50%',
791          toggleActions: "play none none none",
792          //once: true,
793          //markers: true,
794        },
795      })
796      .fromTo(
797        //日付の帯
798        q(".today"),
799        {
800          x: "-100%",
801        },
802        {
803          x: "0%",
804          duration: 0.1,
805          stagger,
806          ease: "power3.inout",
807        },
808      )
809      .fromTo(
810        q(".today p, .today span"),
811        {
812          alpha: 0,
813          y: 32,
814          force3D: false,
815        },
816        {
817          alpha: 1,
818          y: 0,
819          duration: 0.6,
820          delay: 0.1,
821          stagger,
822          ease: "power3.out",
823        },
824      )
825      .fromTo(
826        q(".c-panel"),
827        {
828          alpha: 0,
829          y: 32,
830        },
831        {
832          alpha: 1,
833          y: 0,
834          duration: 1,
835          //delay: 0.3,
836          ease: "power3.out",
837          stagger: {
838            each: .15,// amount: 1 // 処理する個数 / amountの値
839            from: "start"
840          }
841        },
842      );
843});
844
845
846//コンテンツをふわっと
847gsap.utils.toArray(".js-box").forEach((el) => {
848  gsap.from(el, {
849    opacity: 0,
850    filter: "blur(10px)",
851    duration: 2.5,
852    ease: "power4.out",
853    // スクロールトリガーの設定
854    scrollTrigger: {
855      trigger: el, // 対象物
856      start: "top 100%",
857      end: "bottom 50%",
858      toggleActions: "play none none none",
859      //once: true,
860      //markers: true,
861    },
862  });
863});
864
865//ランキング
866gsap.utils.toArray("#top_ranking .ranking_box_inner").forEach((el) => {
867  gsap.from(el, {
868    opacity: 0,
869    filter: "blur(10px)",
870    duration: 2.5,
871    ease: "power4.out",
872    // スクロールトリガーの設定
873    scrollTrigger: {
874      trigger: el, // 対象物
875      start: "top center",
876      toggleActions: "play none none none",
877      //once: true,
878      //markers: true,
879    },
880  });
881});
882
883//パネル
884gsap.utils.toArray("#girls_inner").forEach((el) => {
885  const q = gsap.utils.selector(el);
886  gsap
887    .timeline({
888      scrollTrigger: {
889        trigger: el,
890        //start: "top<-=65%",
891        start: "top 100%",
892        end: "bottom 50%",
893        toggleActions: "play none none none",
894        //once: true,
895        //markers: true,
896      },
897    })
898    .fromTo(
899      q(".c-panel"),
900      {
901        alpha: 0,
902        y: 32,
903      },
904      {
905        alpha: 1,
906        y: 0,
907        duration: 1,
908        delay: 0.1,
909        ease: "power3.out",
910        stagger: {
911          each: .15,// amount: 1 // 処理する個数 / amountの値
912          from: "start"
913        }
914      },
915    );
916});
917
918//料金表
919gsap.utils.toArray("#system_inner").forEach((el) => {
920  const q = gsap.utils.selector(el);
921  gsap
922    .timeline({
923      scrollTrigger: {
924        trigger: el,
925        //start: "top<-=110%",
926        start: "top 100%",
927        end: "bottom 50%",
928        toggleActions: "play none none none",
929        //once: true,
930        //markers: true,
931      },
932    })
933    .fromTo(
934      q(".articleWrap"),
935      {
936        alpha: 0,
937        y: 32,
938      },
939      {
940        alpha: 1,
941        y: 0,
942        duration: 1,
943        delay: 0.1,
944        ease: "power3.out",
945        stagger: {
946          each: .15,// amount: 1 // 処理する個数 / amountの値
947          from: "start"
948        }
949      },
950    );
951});
952
953//リンク
954gsap.utils.toArray(".banner_area").forEach((el) => {
955  const q = gsap.utils.selector(el);
956  gsap
957    .timeline({
958      scrollTrigger: {
959        trigger: el,
960        start: 'top 100%',
961        end: 'bottom 50%',
962        toggleActions: "play none none none",
963        //once: true,
964        //markers: true,
965      },
966    })
967    .fromTo(
968      q("ul li"),
969      {
970        alpha: 0,
971        y: 32,
972      },
973      {
974        alpha: 1,
975        y: 0,
976        duration: 1,
977        delay: 0.1,
978        ease: "power3.out",
979        stagger: {
980          each: .15,// amount: 1 // 処理する個数 / amountの値
981          from: "start"
982        }
983      },
984    );
985});
986
987//ニュース、ピックアップ
988gsap.utils.toArray("#topnews,.pickup_frame,#topevent, .news_frame, .campaign_frame").forEach((el) => {
989  const q = gsap.utils.selector(el);
990  gsap
991    .timeline({
992      scrollTrigger: {
993        trigger: el,
994        start: "top 100%",
995        end: "bottom 50%",
996        toggleActions: "play none none none",
997        //once: true,
998        //markers: true,
999      },
1000    })
1001    .fromTo(
1002      q(".news_border"),
1003      {
1004        alpha: 0,
1005        y: 32,
1006      },
1007      {
1008        alpha: 1,
1009        y: 0,
1010        duration: 1,
1011        delay: 0.1,
1012        ease: "power3.out",
1013        stagger: {
1014          each: .15,// amount: 1 // 処理する個数 / amountの値
1015          from: "start"
1016        }
1017      },
1018    );
1019});
1020
1021//イベント
1022gsap.utils.toArray("#topevent").forEach((el) => {
1023  const q = gsap.utils.selector(el);
1024  gsap
1025    .timeline({
1026      scrollTrigger: {
1027        trigger: el,
1028        start: "top 100%",
1029        end: "bottom 50%",
1030        toggleActions: "play none none none",
1031        //once: true,
1032        //markers: true,
1033      },
1034    })
1035    .fromTo(
1036      q(".topevent_in"),
1037      {
1038        alpha: 0,
1039        y: 32,
1040      },
1041      {
1042        alpha: 1,
1043        y: 0,
1044        duration: 1,
1045        delay: 0.1,
1046        ease: "power3.out",
1047        stagger: {
1048          each: .15,// amount: 1 // 処理する個数 / amountの値
1049          from: "start"
1050        }
1051      },
1052    );
1053});
1054
1055
1056//新人スライダー
1057gsap.utils.toArray(".topNewface").forEach((el) => {
1058  const q = gsap.utils.selector(el);
1059  gsap
1060    .timeline({
1061      scrollTrigger: {
1062        trigger: el,
1063        start: "top 100%",
1064        end: "bottom 50%",
1065        toggleActions: "play none none none", //一回だけの時最後をnoneにする
1066        //once: true,
1067        //markers: true,
1068      },
1069    })
1070    .fromTo(
1071      el,
1072      {
1073        x: "100%", // 左からスライドイン
1074      },
1075      {
1076        x: "0%", // 最終位置
1077        duration: 1.2,
1078        ease: "power3.out",
1079      }
1080    )
1081    .fromTo(
1082      // 新人
1083      q(".newface_info"),
1084      {
1085        alpha: 0,
1086        y: 32,
1087      },
1088      {
1089        alpha: 1,
1090        y: 0,
1091        duration: 0.75,
1092        delay: 0.1,
1093        stagger,
1094        ease: "power3.out",
1095      },
1096      "-=0.45",
1097    )
1098    .fromTo(
1099      q(".newface_inner"),
1100      {
1101        alpha: 0,
1102        y: 32,
1103      },
1104      {
1105        alpha: 1,
1106        y: 0,
1107        duration: 0.75,
1108        delay: 0.1,
1109        stagger,
1110        ease: "power3.out",
1111      },
1112      //"<",
1113      "-=0.45",
1114    );
1115});
1116//});
1117  });
1118//タイトル
1119
1120
1121
1122
1123
1124
1125$(function () {
1126  var $body = $('body'),
1127    $navTypeA = $('.nav--typeA'),
1128    navTypeAOffsetTop = $navTypeA.offset().top;
1129
1130  $(window).on('scroll', function () {
1131    if ($(this).scrollTop() > navTypeAOffsetTop) {
1132      $body.addClass('is-fixed');
1133    } else {
1134      $body.removeClass('is-fixed');
1135    }
1136  });
1137});
1138
1139
1140/**
1141* -------------------
1142* ハンバーガーメニュー現在地を表示する
1143* -------------------
1144*/
1145$(function () {
1146  var currentPath = window.location.pathname;
1147  
1148  // 特殊パスマッピング
1149  var pathMapping = {
1150    '/profile': '/girl',
1151    '/ndetail': '/newslist', 
1152    '/edetail': '/campaign'
1153  };
1154  
1155  // パスから言語部分を除去
1156  function stripLang(path) {
1157    return path.replace(/^\/lang\/[^\/]+/, '') || '/';
1158  }
1159  
1160  // TOPページ判定
1161  function isTopPage(path) {
1162    var stripped = stripLang(path);
1163    return ['/', '/top', '/index.html', '/top.html'].includes(stripped) || 
1164           stripped.endsWith('/') && stripped.split('/').length <= 2;
1165  }
1166  
1167  // 特殊パス判定
1168  function getTargetPath(path) {
1169    var stripped = stripLang(path);
1170    for (var source in pathMapping) {
1171      if (stripped.startsWith(source) || stripped.startsWith(pathMapping[source])) {
1172        return pathMapping[source];
1173      }
1174    }
1175    return null;
1176  }
1177  
1178  var specialPath = getTargetPath(currentPath);
1179  
1180  $('#h_menu_list li a').not('[href*="#"]').each(function() {
1181  var linkHost = new URL(this.href).host;
1182  var currentHost = window.location.host;
1183
1184  // 外部リンクは除外
1185  if (linkHost !== currentHost) {
1186    return; // 何もしない
1187  }
1188
1189  var linkPath = new URL(this.href).pathname.replace(/\/$/, '');
1190  var isTopLink = linkPath.includes('/top') || linkPath === '';
1191  var $li = $(this).parent();
1192
1193  if (isTopLink && isTopPage(currentPath)) {
1194    $li.addClass('active');
1195  } else if (specialPath && stripLang(linkPath) === specialPath) {
1196    $li.addClass('active');
1197  } else if (!isTopLink && !specialPath && 
1198             (currentPath === linkPath || 
1199              (linkPath && currentPath.startsWith(linkPath)))) {
1200    $li.addClass('active');
1201  } else {
1202    $li.removeClass('active');
1203  }
1204  });
1205});
1206
1207/**
1208* -------------------
1209* pagetopは下まで行くと消える
1210* -------------------
1211*/
1212$(window).scroll(function () {
1213  var check = window.pageYOffset; //現在のスクロール位置を取得
1214  var docHeight = $(document).height(); //ページ全体の高さを取得
1215  var dispHeight = $(window).height(); //表示されている高さを取得
1216
1217  hsize = $('footer').height();//フッターの高さを取得
1218
1219  if (check > docHeight - dispHeight - hsize + 90) {
1220    $('.pagetop').addClass('active');
1221  } else {
1222    $('.pagetop').removeClass('active');
1223  }
1224});
1225
1226/**
1227* -------------------
1228* ルーム切り替え
1229* -------------------
1230*/
1231$(function () {
1232  if ($(".js-mixit").length) {
1233    var containerEl = document.querySelector('.js-mixit');
1234    var mixer = mixitup(containerEl);
1235  }
1236});
1237
1238
1239/**
1240* -------------------
1241* selectdayに応じたスクロール
1242* -------------------
1243*/
1244$(function () {
1245
1246  var $btns = $("#day_btns");
1247  var $selectDay = getParam('day');
1248
1249  if ($selectDay >= 4) {
1250    $sc = 100 * ($selectDay - 3);
1251    var x = $btns.scrollLeft($sc);
1252  }
1253
1254  function getParam(name, url) {
1255    if (!url) url = window.location.href;
1256    name = name.replace(/[\[\]]/g, "\\$&");
1257    var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
1258      results = regex.exec(url);
1259    if (!results) return null;
1260    if (!results[2]) return '';
1261    return decodeURIComponent(results[2].replace(/\+/g, " "));
1262  }
1263});
1264
1265/**
1266* --------------
1267* Twitter遅延
1268* --------------
1269*/
1270$(function () {
1271  const settw = document.querySelector(".js-setTwitterOp");
1272  if (settw) {
1273    const setUser = settw.dataset.set_user;
1274    const setLang = settw.dataset.set_lang ? 'data-lang="' + settw.dataset.set_lang + '"' : '';
1275    const setHeight = settw.dataset.set_height ? ' data-height="' + settw.dataset.set_height + '"' : '';
1276    const setWidth = settw.dataset.set_width ? ' data-width="' + settw.dataset.set_width + '"' : '';
1277    const setTheme = settw.dataset.set_theme ? ' data-theme="' + settw.dataset.set_theme + '"' : '';
1278    const setOp = setLang + setHeight + setWidth + setTheme;
1279
1280    const twHTML = '<a class="twitter-timeline" ' + setOp + ' href="https://twitter.com/' + setUser + '?ref_src=twsrc%5Etfw">Tweets by ' + setUser + '</a>';
1281
1282    const twJs = document.createElement('script');
1283    twJs.src = "https://platform.twitter.com/widgets.js";
1284    twJs.charset = "utf-8";
1285
1286    const tw = document.querySelector(".js-loadTwitter");
1287
1288    let loaded = false;
1289
1290
1291    const loadTarget = document.querySelector(".js-setTwitter");
1292    const loadOption = {
1293      root: null,
1294      rootMargin: "0px",
1295      threshold: 0
1296    };
1297    const targets = (entries) => {
1298      entries.forEach(entry => {
1299        if (entry.isIntersecting) {
1300          if (!loaded) {
1301            tw.insertAdjacentHTML("beforebegin", twHTML);
1302            tw.appendChild(twJs);
1303            loaded = true;
1304          }
1305        }
1306      });
1307    };
1308    const loadObserver = new IntersectionObserver(targets, loadOption);
1309    loadObserver.observe(loadTarget);
1310    //}
1311  };
1312});
1313
1314/**
1315 * ----------------
1316 * インバウンド 言語切り替えボタン 
1317 * ----------------
1318 */
1319$(function () {
1320  $langBtn = $('.js-language .btn');
1321
1322  if ($langBtn.length) {
1323    $('h1').addClass('havelan');
1324    $('#h_menu_btn').addClass('havelan');
1325    $langArea = $('.js-language .btn, .js-language .list');
1326    langList = '.js-language .list';
1327    selected = 'selected';
1328    over_flg = false;
1329
1330    $langBtn.click(function () {
1331      $(this).toggleClass(selected).next(langList).slideToggle('fast');
1332    });
1333
1334    // マウスカーソルがメニュー上/メニュー外
1335    $langArea.hover(function () {
1336      over_flg = true;
1337    }, function () {
1338      over_flg = false;
1339    });
1340
1341    // メニュー領域外をクリックしたらメニューを閉じる
1342    $('body').click(function () {
1343      if (over_flg == false) {
1344        $langBtn.removeClass(selected);
1345        $(langList).slideUp('fast');
1346      }
1347    });
1348  };
1349});
1350
1351// モーダル表示
1352$(document).ready(function () {
1353  // モーダルを開く処理
1354  $('.open-modal').on('click', function (e) {
1355    e.preventDefault(); // デフォルトのリンク動作を無効化
1356    var target = $(this).data('target'); // data-targetの値を取得
1357    $(target).fadeIn(); // 対象のモーダルを表示
1358    $('#overlay').fadeIn(); // 背景のオーバーレイを表示
1359  });
1360
1361  // モーダルを閉じる処理
1362  $('.modal, #overlay').on('click', function (e) {
1363    e.preventDefault(); // デフォルト動作を無効化
1364    $('.modal').fadeOut(); // すべてのモーダルを非表示
1365    $('#overlay').fadeOut(); // 背景のオーバーレイを非表示
1366  });
1367});
1368
1369
1370//本日出勤のmoreボタンの判定
1371$(document).ready(function() {
1372  if ($('#waiting').length > 0) {
1373      $('#topschedule .and_more').css('display', 'none');
1374  }
1375});
1376
1377//プロフィール出勤のh3
1378$(document).ready(function () {
1379  const $profTable = $(".prof_table");
1380  const $profTableH3 = $("h3.prof_table_h3");
1381  const $profileDataList = $(".profile_data_list");
1382
1383  if ($profTable.length > 0) {
1384    const hasNondisplay = $profTable.find("tr").hasClass("nondisplay");
1385
1386    if (hasNondisplay) {
1387      $profTableH3.addClass("nondisplay");
1388      $profileDataList.css("margin-bottom", "0");
1389    }
1390  }
1391});
1392
1393
1394//スマホのアニメーション対策
1395$(function() {
1396  const width = $(window).width();
1397  var $touch = $("#enter");
1398
1399  if (width <= 1200) {
1400    $touch.click(function(event) {
1401      event.preventDefault();
1402
1403      const $this = $(this);
1404      $touch.addClass('active');
1405
1406      // アニメーション完了後に元のリンク動作を実行
1407      setTimeout(function() {
1408        const targetUrl = $this.find('a').attr('href');
1409        console.log(targetUrl);
1410
1411        // href が undefined でない場合に遷移
1412        if (targetUrl) {
1413          window.location.href = targetUrl;
1414        }
1415      }, 700);
1416    });
1417
1418    $(".news_border").click(function(event) {
1419      event.preventDefault(); // デフォルトのリンク動作を防ぐ
1420
1421      const $this = $(this); // .news_border (aタグ)自体
1422      $this.addClass('active');
1423
1424      // アニメーション完了後に元のリンク動作を実行
1425      setTimeout(function() {
1426        // .news_border は既に a タグなので href を直接取得
1427        const targetUrl = $this.attr('href');
1428
1429        console.log(targetUrl);
1430
1431        if (targetUrl) {
1432          window.location.href = targetUrl;
1433        }
1434      }, 700); // アニメーションの時間
1435    });
1436  }
1437});
1438
1439//画面サイズ取得
1440document.addEventListener('DOMContentLoaded', function() {
1441  function updateDisplay() {
1442    const isPC = window.matchMedia("(min-width: 1200px)").matches;
1443    const hasCommon_bg = document.querySelector('[data-target="3"]') !== null;
1444
1445    if (hasCommon_bg) {
1446      $('[data-target="1"]').hide();
1447      $('[data-target="2"]').hide();
1448      $('[data-target="3"]').show();
1449    } else {
1450      $('[data-target="1"]').toggle(isPC);
1451      $('[data-target="2"]').toggle(!isPC);
1452      $('[data-target="3"]').hide();
1453    }
1454
1455  }
1456
1457  updateDisplay();
1458  $(window).resize(updateDisplay);
1459});
1460
1461//求人テーブル
1462$(document).ready(function () {
1463    // 各親要素のtbodyをループでチェック
1464    $("#recruit_inner table tbody").each(function () {
1465        var $tbody = $(this); // 現在のtbody要素
1466
1467        if ($tbody.children().length === 0) { // tbodyが空かどうか確認
1468            $tbody.addClass("nondisplay"); // 空ならクラスを追加
1469        } else {
1470            $tbody.removeClass("nondisplay"); // 子要素があるならクラスを削除
1471        }
1472    });
1473});
1474
1475//プロフィールの出勤テーブル
1476$(document).ready(function() {
1477    // 全ての .prof_table tbody td を取得
1478    var allCells = $(".prof_table tbody td");
1479
1480    // 全てのセルが "-" の場合をチェック
1481    var allDash = allCells.length > 0 && allCells.filter(function() {
1482        return $(this).text().trim() !== "-";
1483    }).length === 0;
1484
1485    if (allDash) {
1486        $(".prof_table, .prof_table_h3").addClass("nondisplay");
1487    } else {
1488        console.log("スケジュールがあります");
1489    }
1490});

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.