PageSourceSearch

https://www.hauman.com.tw/js_v4/script.js?v=1791267612

js hauman.com.tw collected 2026-10-06 06:20:53 UTC 168,454 bytes, 6,268 lines download raw bytes

1//setPoint
2//if has mbPanel.js then setPoint=mbPanel.js config, else set here
3var setPoint = setPoint == undefined ? 786 : setPoint;
4
5var mobileType = mobileViewPoint(setPoint);
6function mobileViewPoint(viewPoint) {
7	viewPoint = viewPoint > 0 ? viewPoint : 768;
8	viewPoint = '(max-width: ' + viewPoint + 'px)';
9	viewPoint = window.matchMedia(viewPoint).matches;
10	return viewPoint;
11}
12
13$(function () {
14	// cowboy 20220407 cowboyBlock_8 模組新增
15	if ($('.cb8').length) {
16		$('.cb8').slick({
17			slidesToShow: 1,
18			slidesToScroll: 1,
19			centerMode: true,
20			centerPadding: '400px',
21			prevArrow:
22				'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
23			nextArrow:
24				'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>',
25			autoplay: false,
26			autoplaySpeed: 3000,
27			responsive: [
28				{
29					breakpoint: 1500,
30					settings: {
31						centerPadding: '350px',
32					},
33				},
34				{
35					breakpoint: 1200,
36					settings: {
37						centerPadding: '275px',
38					},
39				},
40				{
41					breakpoint: 992,
42					settings: {
43						centerPadding: '200px',
44					},
45				},
46				{
47					breakpoint: 769,
48					settings: {
49						centerPadding: '26.5%',
50					},
51				},
52				{
53					breakpoint: 681,
54					settings: {
55						centerMode: false,
56					},
57				},
58			],
59		});
60	}
61	// cowboy 20220407 cowboyBlock_8 模組新增 end
62
63	// cowboy 20220324 fix 影音專區 #43894
64	if ($('.video').length) {
65		$('a[data-url]').click(function (event) {
66			var url = $(this).attr('data-url');
67			var id = url.split('?v=');
68			url = decodeURIComponent(id[1]);
69
70			$('.videoLightboxFix .videoIframe').prepend(
71				'<iframe width="560" height="315" src="https://www.youtube.com/embed/' +
72					url +
73					'" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'
74			);
75			$('.videoLightboxFix').addClass('show');
76		});
77
78		$('.videoLightboxFix .videoClose').click(function (event) {
79			$('.videoLightboxFix .videoIframe').empty();
80			$('.videoLightboxFix').removeClass('show');
81		});
82	}
83	// cowboy 20220324 fix 影音專區 #43894 end
84
85	// cowboy 20220107 cowboyBlock_5 模組新增
86	if ($('.cowboyBlock_5').length) {
87		$('.cb5_slick').slick({
88			slidesToShow: 4,
89			slidesToScroll: 4,
90			prevArrow:
91				'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
92			nextArrow:
93				'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>',
94			autoplay: false,
95			autoplaySpeed: 3000,
96			arrows: false,
97			dots: true,
98			responsive: [
99				{
100					breakpoint: 768,
101					settings: {
102						slidesToShow: 3,
103						slidesToScroll: 3,
104					},
105				},
106				{
107					breakpoint: 576,
108					settings: {
109						slidesToShow: 2,
110						slidesToScroll: 2,
111					},
112				},
113				{
114					breakpoint: 481,
115					settings: {
116						slidesToShow: 1,
117						slidesToScroll: 1,
118					},
119				},
120			],
121		});
122	}
123	// cowboy 20220107 cowboyBlock_5 模組新增 end
124
125	// cowboy 20211209 cowboyBlock_1 模組新增
126	if ($('#flat').length) {
127		var flat = $('#flat').flipster({
128			style: 'flat',
129			spacing: -0.25,
130			scrollwheel: false, //使滾輪無法翻轉
131			loop: true,
132		});
133
134		$('.flip-prev').click(function (event) {
135			var length = $('.flipster__item').length;
136			var index = $('.flipster__item--current').index();
137
138			if (index == 0) {
139				$('.flipster__item:nth-child(' + length + ')').click();
140			} else {
141				$('.flipster__item:nth-child(' + index + ')').click();
142			}
143		});
144
145		$('.flip-next').click(function (event) {
146			var length = $('.flipster__item').length;
147			var index = $('.flipster__item--current').index();
148
149			if (index == length - 1) {
150				$('.flipster__item:nth-child(1)').click();
151			} else {
152				index = index + 2;
153				$('.flipster__item:nth-child(' + index + ')').click();
154			}
155		});
156	}
157	// cowboy 20211209 cowboyBlock_1 模組新增 end
158
159	// cowboy 20211209 cowboyBlock_2 模組新增
160	if ($('.year_select').length) {
161		$('.year_result table:not(:first-child)').hide();
162
163		$('.year_select select').change(function (event) {
164			var year = $(this).val();
165
166			$(this)
167				.parent('.year_select')
168				.siblings('.year_result')
169				.children('table[data-year="' + year + '"]')
170				.show();
171			$(this)
172				.parent('.year_select')
173				.siblings('.year_result')
174				.children('table:not([data-year="' + year + '"])')
175				.hide();
176		});
177	}
178	// cowboy 20211209 cowboyBlock_2 模組新增 end
179
180	//cowboy 購物站產品列表切換
181	if ($('.colChange').length) {
182		$('.colChange a').click(function (event) {
183			var changeto = $(this).data('grid');
184
185			$(this).addClass('active');
186			$(this).siblings('a').removeClass('active');
187
188			if (changeto == '3') {
189				$('.colChange').siblings('div').removeAttr('class');
190				$('.colChange').siblings('div').attr('class', 'col-6 col-sm-4');
191				$('.shop_detail').css('display', 'none');
192			} else if (changeto == '4') {
193				$('.colChange').siblings('div').removeAttr('class');
194				$('.colChange')
195					.siblings('div')
196					.attr('class', 'col-6 col-sm-4 col-md-3');
197				$('.shop_detail').css('display', 'none');
198			} else {
199				$('.colChange').siblings('div').removeAttr('class');
200				$('.colChange')
201					.siblings('div')
202					.attr('class', 'horizontal col-12');
203				$('.shop_detail').css('display', '-webkit-box');
204			}
205		});
206	}
207	//cowboy 購物站產品列表切換 end
208
209	//cowboy 20210309 productdetail tabs 重製修復版 #38948
210	if ($('.productdetail, .shopdetail').length) {
211		$(window).on('load', function () {
212			if ($('.cowboy_tabList > a').hasClass('active')) {
213				var content = $('.cowboy_tabList > a.active').attr(
214					'data-content'
215				);
216
217				$('.cowboy_theContent[data-content="' + content + '"]').show();
218				$(
219					'.cowboy_theContent:not([data-content="' + content + '"])'
220				).hide();
221			} else {
222				$('.cowboy_theContent:not([data-content="1"])').hide();
223			}
224		});
225
226		$('.cowboy_tabList > a').click(function (event) {
227			var content = $(this).attr('data-content');
228
229			$(this).addClass('active');
230			$(this).siblings('a').removeClass('active');
231
232			$('.cowboy_theContent[data-content="' + content + '"]').show();
233			$(
234				'.cowboy_theContent:not([data-content="' + content + '"])'
235			).hide();
236		});
237	}
238	//cowboy 20210309 productdetail tabs 重製修復版 #38948 end
239
240	//cowboy 20210125 fix classification_menu
241	if ($('.classification_menu').length) {
242		var search = window.location.search;
243		var pathname = window.location.pathname;
244
245		if (pathname.indexOf('about_') > -1) {
246			var str = pathname.split('/');
247			pathname = decodeURIComponent(str[1]);
248		}
249
250		var targetpage = pathname + search;
251
252		$('.classification_menu')
253			.find('a[href*="' + targetpage + '"]')
254			.parent('li')
255			.addClass('active');
256	}
257	//cowboy 20210125 fix classification_menu end
258
259	// 2024-01-25 #1313 .topSideMenuStyle05 S
260	if ($('.topSideMenuStyle05').length) {
261		if (window.innerWidth <= 991) {
262			var backNum = 2;
263			$('.topSideMenuStyle05 .slideArea').slick({
264				slidesToShow: backNum,
265				slidesToScroll: 1,
266				prevArrow:
267					'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
268				nextArrow:
269					'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
270				infinite: false,
271			});
272			// 設定點選後對應點選位置
273			var activeCate = $(
274				'.topSideMenuStyle05 .slideArea .slick-slide.active'
275			).index();
276			var thisGoto = 0;
277			var cateTotal = $(
278				'.topSideMenuStyle05 .slideArea .slick-slide'
279			).length;
280			if (activeCate + 1 > cateTotal - backNum) {
281				thisGoto = cateTotal - backNum;
282			} else {
283				thisGoto = activeCate;
284			}
285			$('.topSideMenuStyle05 .slideArea').slick('slickGoTo', thisGoto);
286			console.log(backNum);
287			let thisH = $('.topSideMenuStyle05').outerHeight();
288			$('.XXXContent').css('padding-top', thisH);
289		}
290	}
291	// 2024-01-25 #1313 .topSideMenuStyle05 E
292
293	//cowboy 20210115 fix sidemenu
294	if ($('.menuListStyle_1').length) {
295		$('.menuListStyle_1 > li')
296			.find('li.active')
297			// .parent('ul')
298			// .css('display', 'block')
299			.parentsUntil('.menuListStyle_1')
300			.css('display', 'block');
301	}
302
303	// if ($('.menuListStyle_1-revise').length) {
304	// 	$('.menuListStyle_1-revise ')
305	// 		.find('li.active')
306	// 		// .parent('ul')
307	// 		// .css('display', 'block')
308	// 		.parentsUntil('.invest-second-menu')
309	// 		.css('display', 'block');
310	// }
311	//cowboy 20210115 fix sidemenu end
312
313	// 230713 - 以下設置同.menuListStyle_1 有.active展開ul。
314	if ($('.menuListStyle_5').length) {
315		$('.menuListStyle_5 > li')
316			.find('li.active')
317			// .parent('ul')
318			// .css('display', 'block')
319			.parentsUntil('.menuListStyle_5')
320			.css('display', 'block');
321	}
322
323	if ($('.menuListStyle_6').length) {
324		$('.menuListStyle_6 > li')
325			.find('li.active')
326			// .parent('ul')
327			// .css('display', 'block')
328			.parentsUntil('.menuListStyle_6')
329			.css('display', 'block');
330	}
331
332	//cowboy 20200805 new video plugin
333	if ($('.video').length) {
334		$('.html5-videos').each(function () {
335			var galleryID = $(this).attr('id');
336			var ary = galleryID.split('html5-videos');
337			lightGallery(document.getElementById(galleryID), {
338				galleryId: ary[1],
339			});
340		});
341
342		$('.video-gallery').each(function () {
343			var galleryID = $(this).attr('id');
344			var ary = galleryID.split('video-gallery');
345			lightGallery(document.getElementById(galleryID), {
346				galleryId: ary[1],
347			});
348		});
349	}
350	//cowboy 20200805 new video plugin end
351
352	// header
353	if ($('header').length) {
354		if (window.innerWidth > 1024) { //2024-05-16 修改 Yin
355			var hdTop = $('header').outerHeight();
356			$('body').css('padding-top', hdTop + 'px');
357			$('.bannerStyle02_1 img.pc').css('height', `calc(100vh - ${hdTop}px)`);
358
359			var NavTop = $('header').outerHeight();
360			$(window).scroll(function () {
361				if ($(window).scrollTop() > NavTop) {
362					/*20210416開會說header4不要捲動了*/
363					$('header:not(".headerStyle04")').addClass('scroll');
364				} else {
365					$('header').removeClass('scroll');
366				}
367			});
368			if (
369				$(
370					'.headerTop0,.headerStyle09,.headerStyle10,.headerStyle07,.headerStyle02_01,.headerStyle02_02,.headerStyle03_4,.headerStyle03_5,.headerStyle04-1'
371				).length
372			) {
373				$('body').css('padding-top', 0);
374				$('.bannerStyle02_1 img.pc').css('height', '100vh');
375			}
376			if ($('.headerStyle03_02, .headerStyle03_03, .headerStyle19').length) {
377				$('.bannerStyle02_1 img.pc').css('height', '100vh');
378			}
379		}
380
381		if ($('.headerStyle02_02').length) {
382			//選取選單function
383			function nav_bg_active() {
384				$('.js-nav-mouseover a').css({ color: 'inherit' });
385				$('.js-nav-mouseHover a').css({ color: 'inherit' });
386				const s_i = $(
387					'.header-main-nav .js-nav-mouseover'
388				)[0].getBoundingClientRect();
389				const nav_main = $('.header-main-nav');
390
391				const startWidthNewAnimHeight = $(
392					'.header-main-nav .js-nav-mouseover'
393				).innerHeight();
394
395				const startWidthNewAnimWidth = $(
396					'.header-main-nav .js-nav-mouseover'
397				).innerWidth();
398				const nav_main_padding =
399					nav_main.innerWidth() - nav_main.width();
400				const itemPosNewAnimTop = $(
401					'.header-main-nav .js-nav-mouseover'
402				).position();
403				const itemPosNewAnimLeft = $(
404					'.header-main-nav .js-nav-mouseover'
405				).position();
406				$('.header-main-nav-current').css({
407					top: 50 + '%',
408					left: itemPosNewAnimLeft.left + nav_main_padding / 2 + 'px',
409					height: startWidthNewAnimHeight * 2 + 'px',
410					width: startWidthNewAnimWidth + 'px',
411					opacity: 1,
412				});
413				$('.js-nav-mouseover a').css({ color: '#fff' });
414			}
415
416			//選取選單function
417			function nav_bg_aaply(e) {
418				$('.js-nav-mouseover a').css({ color: 'inherit' });
419				$('.js-nav-mouseHover a').css({ color: 'inherit' });
420				$('.header-main-nav ul li').removeClass('js-nav-mouseHover');
421				$(this).addClass('js-nav-mouseHover');
422				// console.log($(this)[0]);
423				const i = $(this)[0].getBoundingClientRect();
424				const nav_main = $('.header-main-nav');
425
426				// console.log(nav_main[0]);
427				const activeWidthNewAnimHeight = $(this).innerHeight();
428				// console.log(activeWidthNewAnimHeight);
429				const activeWidthNewAnimWidth = $(this).innerWidth();
430				const nav_main_padding =
431					nav_main.innerWidth() - nav_main.width();
432				const itemPosNewAnimTop = $(this).position();
433				const itemPosNewAnimLeft = $(this).position();
434				$('.header-main-nav-current').css({
435					top: 50 + '%',
436					left: itemPosNewAnimLeft.left + nav_main_padding / 2 + 'px',
437					height: activeWidthNewAnimHeight * 2 + 'px',
438					width: activeWidthNewAnimWidth + 'px',
439					opacity: 1,
440				});
441				$('.js-nav-mouseHover a').css({ color: '#fff' });
442			}
443
444			// 觸發mobile-menu-btn 按鈕 & 選單
445			const mobileMenuBtnControl = function () {
446				$('html').toggleClass('open_menu');
447				if ($('html').find('.mobile-menu-btn').hasClass('active')) {
448					$('.mobile-menu-btn').removeClass('active');
449				} else {
450					$('.mobile-menu-btn').addClass('active');
451				}
452			};
453
454			nav_bg_active();
455			$('.header-main-nav').on(' click', 'li', function () {
456				$('.header-main-nav li').removeClass('js-nav-mouseover');
457				$(this).addClass('js-nav-mouseover');
458				nav_bg_active();
459			});
460
461			$('.header-main-nav li').hover(nav_bg_aaply, nav_bg_active);
462
463			// 手機選單的點擊伸展
464			if ($('.full-list-box').length) {
465				$('.nav_full-list-box').on('click', function () {
466					const e = $(this).parents('.nav_full-list-item'),
467						i = e.find('ul');
468					if (e.hasClass('js-open'))
469						e.removeClass('js-open'),
470							i.css({
471								height: '',
472							});
473					else {
474						console.log(Number($(e).outerHeight(!0)));
475						var s = 0;
476						e.find('ul li').each(function (t, e) {
477							s = Number($(e).outerHeight(!0));
478						}),
479							e.addClass('js-open'),
480							i.css({
481								height: s + 'px',
482							});
483					}
484				});
485			}
486
487			// 不同方式增加不同的class
488			$('.search-menu-control').on('click', function () {
489				// console.log('gogo');
490				mobileMenuBtnControl();
491				$('.fullMenu_nav2').removeClass('js-menu-open');
492				$('.fullMenu_nav2').addClass('js-search-open');
493				$('.closedBtn').addClass('close');
494			});
495
496			$('.main-menu-control').on('click', function () {
497				mobileMenuBtnControl();
498				$('.fullMenu_nav2').removeClass('js-search-open');
499				$('.fullMenu_nav2').addClass('js-menu-open');
500				$('.closedBtn').addClass('close');
501			});
502		}
503
504		// 2023-12-20 #610 判斷有.overEdgeMenu,自動判斷-選單超過螢幕出現y軸。相關說明放置文件:https://docs.google.com/document/d/1P0unPB-0xSdYLm0fALvnAyJsVpd_8OlArxRi8bdDtMY/edit#heading=h.kxozzitvl957
505		if ($('.navMenu:not(.overEdgeMenu)').length) {
506			// 內層超出寬換邊
507			$('body').on(
508				'mouseover',
509				'.navMenu .moreMenu:not(.multiMenu)',
510				function () {
511					var $subMenu = $(this).children('ul');
512					var subMenuWidth = $subMenu.width();
513
514					var menuPosL = $subMenu.offset().left + subMenuWidth;
515					var menuPosL2 = $subMenu.offset().left + subMenuWidth * 2;
516					// var menuPosL3 = $subMenu.offset().left + subMenuWidth * 3;
517					var menuPosL3 = $subMenu.offset().left + subMenuWidth * 2;
518
519					if (menuPosL > $(window).width()) {
520						$subMenu.css({
521							transition: 'none',
522							left: 'auto',
523							right: '0',
524						});
525					}
526					if (menuPosL2 > $(window).width()) {
527						$('.moreMenu > ul ul').css({
528							transition: 'none',
529							left: 'auto',
530							right: '100%',
531						});
532					}
533					if (menuPosL3 > $(window).width()) {
534						$('.moreMenu > ul ul').css({
535							transition: 'none',
536							left: 'auto',
537							right: '100%',
538							// color: 'red',
539						});
540					} else {
541						$('.moreMenu > ul ul').css({
542							left: '100%',
543							right: 'auto',
544						});
545					}
546				}
547			);
548		} else {
549			// !!!fix Header navMenu subMenu pos (項目過多 or 超過螢幕時次選單位置)
550			$('body').on(
551				'mouseover',
552				'.navMenu .moreMenu:not(.multiMenu)',
553				function () {
554					var menuViewSpace = 40; //不貼邊	add
555
556					var $subMenu = $(this).children('ul');
557					var subMenuHeight = $subMenu.height(); //add
558					var subMenuWidth = $subMenu.width();
559
560					var headerHeight = $('header').height(); //add
561
562					var menuView =
563						$(window).height() - headerHeight - menuViewSpace; //add
564					var subMenuPosT = $(this).position().top; //add
565					var subMenuPosL =
566						$(this).parent().offset().left +
567						$(this).parent().width(); //add
568
569					//選單顯示超過螢幕換左邊 (normal)
570					var menuPosL = $subMenu.offset().left + subMenuWidth * 2;
571					// var menuPosL = $subMenu.offset().left + subMenuWidth * 1;
572					if (menuPosL > $(window).width()) {
573						$subMenu.css({
574							transition: 'none',
575							left: '-100%',
576							right: 'auto',
577						});
578					}
579
580					//超過螢幕高
581					if (subMenuHeight > menuView) {
582						$subMenu.addClass('overEdge');
583						$subMenu.css({
584							'max-height': menuView,
585						});
586					}
587
588					//上層超過螢幕高
589					if ($(this).parent('.overEdge').length) {
590						// subMenuPosT=$(this).position().top+$(this).parents(".navMenu").height();
591						subMenuPosT =
592							$(this).position().top + $('header').height();
593						// subMenuPosL -= 20;		//add 2023-10-30 M經理說次次選單不要疊字。
594						subMenuPosL -= 0;
595						subMenuPosB = 'auto';
596
597						//次層選單顯示超過螢幕換左邊
598						if (
599							subMenuPosL + subMenuWidth * 2 >
600							$(window).width()
601							// subMenuPosL + subMenuWidth * 1 >
602							// 	$(window).width()
603						) {
604							subMenuPosL =
605								$(this).parent().offset().left - subMenuWidth;
606						}
607
608						//次層選單顯示超過螢幕高
609						if (subMenuPosT + subMenuHeight > $(window).height()) {
610							subMenuPosT = 'auto';
611							subMenuPosB = menuViewSpace;
612						}
613
614						$subMenu.css({
615							position: 'fixed',
616							top: subMenuPosT,
617							bottom: subMenuPosB,
618							left: subMenuPosL,
619							right: 'auto',
620							width: subMenuWidth,
621							transition: 'none',
622							'z-index': '20',
623						});
624					}
625
626					//次選單位置超過螢幕高 (上層沒有超過螢幕高)
627					if (
628						$(this).parents('.moreMenu').length &&
629						$(this).parent().hasClass('overEdge') == false
630					) {
631						if (subMenuPosT + subMenuHeight > menuView) {
632							//次層選單顯示超過螢幕換左邊
633							if (
634								// subMenuPosL + subMenuWidth * 2 >
635								// $(window).width()
636								subMenuPosL + subMenuWidth * 1 >
637									$(window).width()
638							) {
639								subMenuPosL =
640									$(this).parent().offset().left -
641									subMenuWidth;
642							}
643
644							$subMenu.css({
645								position: 'fixed',
646								top: 'auto',
647								bottom: menuViewSpace,
648								left: subMenuPosL,
649								right: 'auto',
650								transition: 'none',
651								'z-index': '20',
652							});
653						}
654					}
655				}
656			);
657			$('body').on(
658				'mouseleave',
659				'.navMenu .moreMenu:not(.multiMenu)',
660				function () {
661					// console.log("hoverout");
662					var $subMenu = $(this).children('ul');
663					$subMenu.removeClass('overEdge');
664					$subMenu.attr('style', '');
665				}
666			);
667
668			//only for safrai or have slick block
669			function dofixMenuAction() {
670				var fixMenuAction = false;
671				if (
672					navigator.userAgent.indexOf('Safari') != -1 &&
673					navigator.userAgent.indexOf('Chrome') == -1
674				) {
675					fixMenuAction = true;
676				}
677				if ($('.slick-slider').length) {
678					fixMenuAction = true;
679				}
680				return fixMenuAction;
681			}
682
683			var fixMenu = dofixMenuAction();
684			if (fixMenu) {
685				$('body').on(
686					'mouseenter',
687					'.navMenu .moreMenu:not(.multiMenu)',
688					function () {
689						if ($(this).parent('.overEdge').length) {
690							var $subMenu = $(this).children('ul');
691							$subMenu
692								.clone()
693								.appendTo($(this).parent('.overEdge').parent())
694								.addClass('NavMenuCloneItem');
695							$subMenu.hide();
696							return false;
697						}
698					}
699				);
700				$('body').on(
701					'mouseleave',
702					'.navMenu .moreMenu:not(.multiMenu)',
703					function () {
704						var $subMenu = $(this).children('ul');
705						if ($(this).parent('.overEdge').length) {
706							$subMenu.show();
707							return false;
708						}
709					}
710				);
711				$('body').on('mouseenter', '.NavMenuCloneItem', function () {
712					$(this).addClass('over');
713					$('.NavMenuCloneItem:not(.over)').remove();
714				});
715				$('body').on(
716					'mouseleave',
717					'.NavMenuCloneItem.over',
718					function () {
719						$(this).remove();
720					}
721				);
722				$('body').on('mouseenter', '.navMenu>li', function () {
723					$('.NavMenuCloneItem').remove();
724				});
725			}
726			// end  safrai or have slick block
727		}
728	} // header End
729
730	//headerStyle09捲動後的導覽列
731	if ($('.headerStyle09').length) {
732		//取得banner高度
733		var bannerHeight = $('.headerStyle09 .banner_result').height();
734		//捲動大於banner高度
735		$(window).scroll(function () {
736			if ($(window).scrollTop() >= bannerHeight) {
737				$('.headerStyle09').addClass('sticky');
738			} else {
739				$('.headerStyle09').removeClass('sticky');
740			}
741		});
742	}
743
744	//headerStyle07捲動後的導覽列
745	if ($('.headerStyle07').length) {
746		//取得banner高度
747		var bannerHeight = $('.headerStyle07 .banner_result').height();
748		//捲動大於banner高度
749		$(window).scroll(function () {
750			if ($(window).scrollTop() >= bannerHeight) {
751				$('.headerStyle07').addClass('sticky');
752			} else {
753				$('.headerStyle07').removeClass('sticky');
754			}
755		});
756	}
757
758	// ***2024-05-16 Yin 更改1024px以下有及沒有.cmpTop做的設定。***
759	// if ($('.headerStyle02, .headerStyle03').length) {
760	// 	if ($(window).width() < 1024) {
761	// 		var hdCTop = $('header').outerHeight();
762	// 		$('body').css('padding-top', hdCTop + 'px');
763	// 	}
764
765	// 	// if ($('.headerStyle03_4,.headerStyle03_5').length) {
766	// 	// 	$('body').css('padding-top', 0);
767	// 	// }
768	// }
769	if (window.innerWidth <= 1024) {
770		if ($('.headerStyle02, .headerStyle03').length) {
771			if ( $('body .headerStyle02, body .headerStyle03').length && $('body .cmpTop').length) {
772				} else {
773					var hdCTop = $('header').outerHeight();
774					$('body').css('padding-top', hdCTop + 'px');
775				}
776		}
777	}
778
779	// 2024-05-17 Yin .headerStyle03_02 & .headerStyle03_03 捲動後的導覽列
780	if ($('.headerStyle03_02, .headerStyle03_03').length) {
781		let NavTopH = $('header').outerHeight();
782		$(window).scroll(function () {
783			if ($(window).scrollTop() > NavTopH) {
784				$('header').addClass('scroll');
785			} else {
786				$('header').removeClass('scroll');
787			}
788		});
789	}
790
791	//navMenu5第一層選單加入三角形icon(如果不需要,刪除此段)
792	if ($('.navMenu5').length) {
793		$('.navMenu5 > li.moreMenu > a > span').append(
794			'<i class="fa fa-angle-down" aria-hidden="true"></i>'
795		);
796	}
797
798	// mobile_btn
799	if (
800		$('.headerStyle02, .headerStyle03, .headerStyle07').length ||
801		// 當含有headerStyle02_02此function 失效
802		$('.headerStyle02').not('.headerStyle02_02').length
803	) {
804		$('.btn-list').on('click', function () {
805			$('html').toggleClass('open_menu');
806			if ($(this).find('.mobile-menu-btn').hasClass('active')) {
807				$('.mobile-menu-btn').removeClass('active');
808			} else {
809				$('.mobile-menu-btn').addClass('active');
810			}
811		});
812	}
813
814	// banner
815	if ($('.bgVideo').length) {
816		$('.bgVideo').each(function () {
817			$(this).find('#bgVideo').YTPlayer();
818			$loading = $('.bannerBlock').find('.loading');
819			$('.bannerBlock')
820				.find('#bgVideo')
821				.on('YTPStart', function (e) {
822					$loading.fadeOut();
823				});
824		});
825	}
826
827	// scrollDown
828	if ($('.scrollDown').length) {
829		$('.scrollDown').click(function () {
830			$('html, body').animate(
831				{
832					scrollTop: $('#scroll').offset().top,
833				},
834				3000
835			);
836		});
837	}
838
839	//圖片浮動特效,在img上套用.scrollMove即可使圖片產生浮動
840	if ($('.scrollMove').length) {
841		if (!mobileType) {
842			$('.scrollMove').each(function () {
843				$(this).scrollAnimate({ animate: 'scrollMove' });
844			});
845		}
846	}
847
848	//首頁蓋版廣告
849	if ($('.coverAd').length) {
850		$('.coverAd .adBg').click(function () {
851			$(this).parents('.coverAd').fadeOut(500);
852		});
853		$('.coverAd .closeBtn').click(function () {
854			$(this).parents('.coverAd').fadeOut(500);
855		});
856	}
857	
858
859	// 2023-09-15 #49734 add coverCommercialContent 彈跳廣告,分兩種功能,以下js程式只能擇一喔!! S---
860	// 以下js是內容一開始是開啟的用
861	if ($('.coverCommercialContent').length) {
862		$('.coverCommercial').hide();
863		coverCommercialSlide();
864		$('.coverCommercialContent .bg').click(function () {
865			// 關閉slick
866			setTimeout(() => {
867				$('.coverCommercialSlide').slick('unslick');
868			}, 550);
869			$(this).parents('.coverCommercialContent').fadeOut(500);
870			$('.coverCommercial').fadeIn(500);
871		});
872		$('.coverCommercialContent .closeBtn').click(function () {
873			// 關閉slick
874			setTimeout(() => {
875				$('.coverCommercialSlide').slick('unslick');
876			}, 550);
877			$(this).parents('.coverCommercialContent').fadeOut(500);
878			$('.coverCommercial').fadeIn(500);
879		});
880
881		$('.coverCommercial').click(function () {
882			$('.coverCommercialSlide').slick('unslick');
883			$('.coverCommercialContent').fadeIn(500);
884			$(this).fadeOut(100);
885				coverCommercialSlide();
886		});
887		
888		function coverCommercialSlide() {
889			$('.coverCommercialSlide').slick({
890				slidesToShow: 1,
891				slidesToScroll: 1,
892				prevArrow:
893					'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left" aria-hidden="true"></i></button>',
894				nextArrow:
895					'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right" aria-hidden="true"></i></button>',
896				autoplay: false,
897				// autoplaySpeed: 3000,
898				dots: true,
899			});
900		}
901
902		if ($('.coverCommercialContent').hasClass('close')) {
903			$('.coverCommercialContent').hide();
904			$('.coverCommercial').show();
905		}
906	}
907
908	// 以下js是內容一開始是隱藏的用(Ex:水陸、漢傳佛教青年學者論壇)
909	// if ($('.coverCommercialContent').length) {
910	// 	$('.coverCommercialContent').hide();
911	// 	$('.coverCommercialContent .bg').click(function () {
912	// 		// 關閉slick
913	// 		setTimeout(() => {
914	// 			$('.coverCommercialSlide').slick('unslick');
915	// 		}, 550);
916	// 		$(this).parents('.coverCommercialContent').fadeOut(500);
917	// 		$('.coverCommercial').fadeIn(500);
918	// 	});
919
920	// 	$('.coverCommercialContent .closeBtn').click(function () {
921	// 		// 關閉slick
922	// 		setTimeout(() => {
923	// 			$('.coverCommercialSlide').slick('unslick');
924	// 		}, 550);
925	// 		$(this).parents('.coverCommercialContent').fadeOut(500);
926	// 		$('.coverCommercial').fadeIn(500);
927	// 	});
928
929	// 	$('.coverCommercial').click(function () {
930	// 		$('.coverCommercialContent').fadeIn(500);
931	// 		$(this).fadeOut(500);
932
933	// 			$('.coverCommercialSlide').slick({
934	// 				slidesToShow: 1,
935	// 				slidesToScroll: 1,
936	// 				// fade: true,
937	// 				// cssEase: 'ease-in-out',
938	// 				prevArrow:
939	// 					'<button class="slick-prev slick-arrow"><i class="fa fa-chevron-left" aria-hidden="true"></i></button>',
940	// 				nextArrow:
941	// 					'<button class="slick-next slick-arrow"><i class="fa fa-chevron-right" aria-hidden="true"></i></button>',
942	// 				autoplay: false,
943	// 				// autoplaySpeed: 3000,
944	// 				dots: true,
945	// 			});
946	// 	});
947	// }
948
949	// 2023-09-15 #49734 add coverCommercialContent 彈跳廣告,分兩種功能 E---
950
951
952	// slidBlock
953	if ($('.slidBlock').length) {
954		$('.slidBlock').slick({
955			prevArrow:
956				'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
957			nextArrow:
958				'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>',
959			autoplay: true,
960			autoplaySpeed: 3000,
961
962			responsive: [
963				{
964					breakpoint: 1200,
965					settings: {
966						slidesToShow: 2,
967					},
968				},
969				{
970					breakpoint: 768,
971					settings: {
972						slidesToShow: 1,
973						dots: true,
974						focusOnSelect: false,
975					},
976				},
977			],
978		});
979	}
980
981	if ($('.slidBlock2').length) {
982		$('.slidBlock2').slick({
983			slidesToShow: 4,
984			slidesToScroll: 1,
985			prevArrow:
986				'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
987			nextArrow:
988				'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>',
989			autoplay: true,
990			autoplaySpeed: 3000,
991			responsive: [
992				{
993					breakpoint: 1200,
994					settings: {
995						slidesToShow: 3,
996					},
997				},
998				{
999					breakpoint: 992,
1000					settings: {
1001						slidesToShow: 2,
1002						arrows: false,
1003						dots: true,
1004					},
1005				},
1006				{
1007					breakpoint: 768,
1008					settings: {
1009						slidesToShow: 1,
1010						focusOnSelect: false,
1011					},
1012				},
1013			],
1014		});
1015	}
1016
1017	if ($('.slidBlock3').length) {
1018		$('.slidBlock3').slick({
1019			slidesToShow: 4,
1020			slidesToScroll: 1,
1021			prevArrow:
1022				'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
1023			nextArrow:
1024				'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>',
1025			autoplay: true,
1026			autoplaySpeed: 3000,
1027			responsive: [
1028				{
1029					breakpoint: 1200,
1030					settings: {
1031						slidesToShow: 3,
1032					},
1033				},
1034				{
1035					breakpoint: 992,
1036					settings: {
1037						slidesToShow: 2,
1038						arrows: false,
1039					},
1040				},
1041				{
1042					breakpoint: 768,
1043					settings: {
1044						slidesToShow: 1,
1045						focusOnSelect: false,
1046					},
1047				},
1048			],
1049		});
1050	}
1051
1052	if ($('.slidBlock_tech').length) {
1053		$('.slidBlock_tech').slick({
1054			slidesToShow: 6,
1055			slidesToScroll: 1,
1056			prevArrow:
1057				'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
1058			nextArrow:
1059				'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>',
1060			autoplay: true,
1061			autoplaySpeed: 3000,
1062			responsive: [
1063				{
1064					breakpoint: 1200,
1065					settings: {
1066						slidesToShow: 4,
1067					},
1068				},
1069				{
1070					breakpoint: 992,
1071					settings: {
1072						slidesToShow: 4,
1073						arrows: false,
1074					},
1075				},
1076				{
1077					breakpoint: 768,
1078					settings: {
1079						slidesToShow: 2,
1080						focusOnSelect: false,
1081					},
1082				},
1083			],
1084		});
1085	}
1086
1087	if ($('.slideBlock4').length) {
1088		$('.slideBlock4').slick({
1089			slidesToShow: 1,
1090			slidesToScroll: 1,
1091			prevArrow:
1092				'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
1093			nextArrow:
1094				'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>',
1095			autoplay: true,
1096			autoplaySpeed: 3000,
1097			dots: true,
1098		});
1099	}
1100
1101	if ($('.slideBlock5').length) {
1102		var mySwiper = new Swiper('.slideBlock5', {
1103			loop: true,
1104			autoplay: {
1105				delay: 5000,
1106				disableOnInteraction: false,
1107			},
1108			// 如果需要分页器
1109			pagination: {
1110				el: '.slideBlock5 .swiper-pagination',
1111				type: 'fraction',
1112			},
1113			// 如果需要前进后退按钮
1114			navigation: {
1115				nextEl: '.slideBlock5 .swiper-button-next',
1116				prevEl: '.slideBlock5 .swiper-button-prev',
1117			},
1118		});
1119	}
1120
1121	//相關產品
1122	if ($('#relateProSlid').length) {
1123		$('#relateProSlid').slick({
1124			slidesToShow: 4,
1125			slidesToScroll: 1,
1126			prevArrow:
1127				'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
1128			nextArrow:
1129				'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>',
1130			autoplay: true,
1131			autoplaySpeed: 3000,
1132			responsive: [
1133				{
1134					breakpoint: 992,
1135					settings: {
1136						slidesToShow: 3,
1137					},
1138				},
1139				{
1140					breakpoint: 576,
1141					settings: {
1142						slidesToShow: 2,
1143						focusOnSelect: false,
1144					},
1145				},
1146			],
1147		});
1148
1149		//在手機板去限制高度,避免跑版
1150		if ($(window).innerWidth() < 576) {
1151			const relPro = $('.relatedPro .itemTitle').height();
1152			$('.relatedPro .itemTitle').css('height', `${relPro}px`);
1153		}
1154	}
1155
1156	if ($('#relateProSlid02').length) {
1157		$('#relateProSlid02').slick({
1158			slidesToShow: 4,
1159			slidesToScroll: 1,
1160			prevArrow:
1161				'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
1162			nextArrow:
1163				'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>',
1164			autoplay: true,
1165			autoplaySpeed: 3000,
1166			responsive: [
1167				{
1168					breakpoint: 992,
1169					settings: {
1170						slidesToShow: 3,
1171					},
1172				},
1173				{
1174					breakpoint: 576,
1175					settings: {
1176						slidesToShow: 2,
1177						focusOnSelect: false,
1178					},
1179				},
1180			],
1181		});
1182	}
1183
1184	if ($('.likeshopSlide1').length) {
1185		$('.likeshopSlide1').slick({
1186			slidesToShow: 1,
1187			slidesToScroll: 1,
1188			arrows: false,
1189			prevArrow:
1190				'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
1191			nextArrow:
1192				'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>',
1193			autoplay: true,
1194			autoplaySpeed: 3000,
1195		});
1196	}
1197
1198	if ($('.likeshopSlide2').length) {
1199		$('.likeshopSlide2').slick({
1200			slidesToShow: 2,
1201			slidesToScroll: 1,
1202			arrows: false,
1203			prevArrow:
1204				'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
1205			nextArrow:
1206				'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>',
1207			autoplay: true,
1208			autoplaySpeed: 3000,
1209		});
1210	}
1211
1212	if ($('.likeshopSlide3').length) {
1213		$('.likeshopSlide3').slick({
1214			slidesToShow: 3,
1215			slidesToScroll: 1,
1216			arrows: false,
1217			prevArrow:
1218				'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
1219			nextArrow:
1220				'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>',
1221			autoplay: true,
1222			autoplaySpeed: 3000,
1223		});
1224	}
1225
1226	if ($('.likeshopSlide4').length) {
1227		$('.likeshopSlide4').slick({
1228			slidesToShow: 4,
1229			slidesToScroll: 1,
1230			arrows: false,
1231			prevArrow:
1232				'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
1233			nextArrow:
1234				'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>',
1235			autoplay: true,
1236			autoplaySpeed: 3000,
1237		});
1238	}
1239
1240	if ($('.overlapSlide').length) {
1241		$('.overlapSlide').slick({
1242			slidesToShow: 1,
1243			slidesToScroll: 1,
1244			arrows: false,
1245			prevArrow:
1246				'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
1247			nextArrow:
1248				'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>',
1249			dots: true,
1250			autoplay: false,
1251			autoplaySpeed: 3000,
1252		});
1253	}
1254
1255	if ($('.newsListSlide').length) {
1256		$('.newsListSlide').slick({
1257			slidesToShow: 4,
1258			slidesToScroll: 1,
1259			prevArrow:
1260				'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
1261			nextArrow:
1262				'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>',
1263			autoplay: true,
1264			autoplaySpeed: 3000,
1265			responsive: [
1266				{
1267					breakpoint: 1200,
1268					settings: {
1269						slidesToShow: 3,
1270					},
1271				},
1272				{
1273					breakpoint: 992,
1274					settings: {
1275						slidesToShow: 2,
1276					},
1277				},
1278				{
1279					breakpoint: 340,
1280					settings: {
1281						slidesToShow: 1,
1282						focusOnSelect: false,
1283					},
1284				},
1285			],
1286		});
1287	}
1288
1289	if ($('.historyType1').length) {
1290		$('.historyType1 .historySlick').slick({
1291			asNavFor: '.historyType1 .timeLineSlick',
1292			infinite: false,
1293			fade: true,
1294			arrows: false,
1295		});
1296		$('.historyType1 .timeLineSlick').slick({
1297			asNavFor: '.historyType1 .historySlick',
1298			slidesToShow: 3,
1299			focusOnSelect: true,
1300			centerMode: true,
1301			infinite: false,
1302			dots: false,
1303			swipeToSlide: true,
1304			vertical: true,
1305			verticalSwiping: true,
1306			prevArrow:
1307				'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
1308			nextArrow:
1309				'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
1310			responsive: [
1311				{
1312					breakpoint: 992,
1313					settings: {
1314						vertical: false,
1315						verticalSwiping: false,
1316						variableWidth: true,
1317					},
1318				},
1319			],
1320		});
1321	}
1322
1323	if ($('.historyType2').length) {
1324		$('.historySlick').slick({
1325			slidesToShow: 1,
1326			slidesToScroll: 1,
1327			infinite: false,
1328			fade: true,
1329			arrows: false,
1330			asNavFor: '.timeLineSlick',
1331		});
1332		$('.timeLineSlick').slick({
1333			asNavFor: '.historySlick',
1334			focusOnSelect: true,
1335			infinite: false,
1336			centerMode: true,
1337			dots: false,
1338			variableWidth: true,
1339			adaptiveHeight: true,
1340			swipeToSlide: true,
1341			touchThreshold: 3,
1342			prevArrow:
1343				'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
1344			nextArrow:
1345				'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
1346		});
1347	}
1348
1349	//計數器
1350	if ($('.countup').length) {
1351		$('.countup').countUp();
1352	}
1353
1354	if ($('.prod_num').length) {
1355		var numberSpinner = (function () {
1356			$('.number-spinner>.ns-btn>a').click(function () {
1357				var btn = $(this),
1358					oldValue = btn
1359						.closest('.number-spinner')
1360						.find('input')
1361						.val()
1362						.trim(),
1363					newVal = 0;
1364
1365				if (btn.attr('data-dir') === 'up') {
1366					newVal = parseInt(oldValue) + 1;
1367				} else {
1368					if (oldValue > 1) {
1369						newVal = parseInt(oldValue) - 1;
1370					} else {
1371						newVal = 1;
1372					}
1373				}
1374				btn.closest('.number-spinner').find('input').val(newVal);
1375			});
1376			$('.number-spinner>input').keypress(function (evt) {
1377				evt = evt ? evt : window.event;
1378				var charCode = evt.which ? evt.which : evt.keyCode;
1379				if (charCode > 31 && (charCode < 48 || charCode > 57)) {
1380					return false;
1381				}
1382				return true;
1383			});
1384		})();
1385	}
1386
1387	//產品比較for ProductListStyle14
1388	if ($('.productListStyle14').length) {
1389		var compareSum = 4; //最多只能比較4個項目
1390		//以checkbox進行比較
1391		$('.productListStyle14 .item .angleBox input').click(function () {
1392			//checkBox選取功能
1393			if (!$(this).parents('.item').hasClass('checked')) {
1394				var itemChecked = $('.productListStyle14 .item.checked').length; //已被選取的個數
1395				//目前尚未有任何項目被選取
1396				if (itemChecked == 0) {
1397					//隱藏其他系列產品
1398					$(this)
1399						.parents('.rowList')
1400						.siblings('.rowList')
1401						.fadeOut(500);
1402					$(this).parents('.item').addClass('checked');
1403					//顯示比較工具列
1404					$('.compareBarBox').fadeIn(500);
1405				}
1406				//目前被選取的個數不超過4個
1407				else if (itemChecked > 0 && itemChecked < compareSum) {
1408					$(this).parents('.item').addClass('checked');
1409					//第4個被選取
1410					if (itemChecked == compareSum - 1) {
1411						//隱藏其他未被選取項目的比較按鈕和checkbox
1412						$(this).parents('.rowList').addClass('fullChecked');
1413					} else {
1414						$(this).parents('.rowList').removeClass('fullChecked');
1415					}
1416				}
1417				//更新比較工具列數字
1418				$('.compareBar')
1419					.find('.numerator')
1420					.text(itemChecked + 1);
1421			}
1422			//checkBox取消功能
1423			else {
1424				$(this).parents('.checked').removeClass('checked');
1425				$(this).parents('.rowList').removeClass('fullChecked');
1426				var itemChecked = $('.productListStyle14 .item.checked').length; //已被選取的個數
1427				if (itemChecked == 0) {
1428					//隱藏比較工具列
1429					$('.compareBarBox').fadeOut(500);
1430					//所有的項目都被取消,顯示其他系列產品
1431					$(this)
1432						.parents('.rowList')
1433						.siblings('.rowList')
1434						.fadeIn(500);
1435				}
1436				//更新比較工具列數字
1437				$('.compareBar').find('.numerator').text(itemChecked);
1438			}
1439		});
1440		//以比較按鈕進行比較
1441		$('.productListStyle14 .item .compareBtn').click(function () {
1442			var itemChecked = $('.productListStyle14 .item.checked').length; //已被選取的個數
1443			//目前尚未有任何項目被選取
1444			if (itemChecked == 0) {
1445				//隱藏其他系列產品
1446				$(this).parents('.rowList').siblings('.rowList').fadeOut(500);
1447				$(this).parents('.item').addClass('checked');
1448				//將checkBox狀態改為被選取
1449				$(this)
1450					.parents('.item')
1451					.find('input[type=checkbox]')
1452					.prop('checked', true);
1453				//顯示比較工具列
1454				$('.compareBarBox').fadeIn(500);
1455			}
1456			//目前被選取的個數不超過4個
1457			else if (itemChecked > 0 && itemChecked < compareSum) {
1458				$(this).parents('.item').addClass('checked');
1459				//將checkbox狀態改為已選取
1460				$(this)
1461					.parents('.item')
1462					.find('input[type=checkbox]')
1463					.prop('checked', true);
1464				//第4個被選取
1465				if (itemChecked == compareSum - 1) {
1466					//隱藏其他未被選取項目的比較按鈕和checkbox
1467					$(this).parents('.rowList').addClass('fullChecked');
1468				} else {
1469					$(this).parents('.rowList').removeClass('fullChecked');
1470				}
1471			}
1472			//更新比較工具列數字
1473			$('.compareBar')
1474				.find('.numerator')
1475				.text(itemChecked + 1);
1476			return false;
1477		});
1478		//取消比較按鈕
1479		$('.productListStyle14 .item .cancelBtn').click(function () {
1480			//取消checkbox被選取狀態
1481			$(this)
1482				.parents('.item')
1483				.find('input[type=checkbox]')
1484				.prop('checked', false);
1485			$(this).parents('.checked').removeClass('checked');
1486			$(this).parents('.rowList').removeClass('fullChecked');
1487			var itemChecked = $('.productListStyle14 .item.checked').length; //已被選取的個數
1488			//所有的項目都被取消,顯示其他系列產品
1489			if (itemChecked == 0) {
1490				//隱藏比較工具列
1491				$('.compareBarBox').fadeOut(500);
1492				$(this).parents('.rowList').siblings('.rowList').fadeIn(500);
1493			}
1494			//更新比較工具列數字
1495			$('.compareBar').find('.numerator').text(itemChecked);
1496			return false;
1497		});
1498		//比較工具列
1499		$('.compareBar').find('.numerator').text('0');
1500		$('.compareBar').find('.denominator').text(compareSum);
1501		$('.compareBar .cancel').click(function () {
1502			$('.productListStyle14 .rowList').removeClass('fullChecked');
1503			$('.productListStyle14 .item').removeClass('checked');
1504			//取消所有checkbox被選取狀態
1505			$('.productListStyle14 .item')
1506				.find('input[type=checkbox]')
1507				.prop('checked', false);
1508			//顯示所有系列產品
1509			$('.productListStyle14 .rowList').fadeIn(500);
1510			//更新數字為0
1511			$('.compareBar').find('.numerator').text('0');
1512			//隱藏比較工具列
1513			$('.compareBarBox').fadeOut(500);
1514		});
1515	}
1516
1517	//歷史沿革9
1518	if ($('.historyType9').length) {
1519		var headerH = $('header').height();
1520		var historyTitlePos =
1521			$('.historyType9 .titleBg').offset().top - headerH;
1522		var historyEndPos =
1523			$('.historyType9 .historyEnd').offset().top - headerH;
1524		var historyTitleH = $('.historyType9 .titleBg').outerHeight();
1525		var timeLineH = $('.historyType9 .timeLine').outerHeight();
1526		var stateChangePos = historyEndPos - historyTitleH - timeLineH;
1527		$(window).on('load scroll resize', function () {
1528			//特效僅限PC版
1529			if ($(window).width() > 1200) {
1530				var scroll = $(window).scrollTop();
1531				if (scroll >= historyTitlePos && scroll <= stateChangePos) {
1532					$('.historyType9 .titleBg').removeClass('ended');
1533					$('.historyType9 .timeLine').removeClass('ended');
1534					$('.historyType9 .titleBg').addClass('fixed');
1535					$('.historyType9 .timeLine').addClass('fixed');
1536				}
1537				if (scroll < historyTitlePos) {
1538					$('.historyType9 .titleBg').removeClass('ended');
1539					$('.historyType9 .timeLine').removeClass('ended');
1540					$('.historyType9 .titleBg').removeClass('fixed');
1541					$('.historyType9 .timeLine').removeClass('fixed');
1542				}
1543				if (scroll > stateChangePos) {
1544					$('.historyType9 .titleBg').removeClass('fixed');
1545					$('.historyType9 .timeLine').removeClass('fixed');
1546					$('.historyType9 .titleBg').addClass('ended');
1547					$('.historyType9 .timeLine').addClass('ended');
1548				}
1549			}
1550		});
1551		//時間軸
1552		$('.historyType9 .timeLine .point').click(function () {
1553			$(this).siblings('.point').removeClass('active');
1554			$(this).addClass('active');
1555			var year = $(this).text();
1556			var yearPos =
1557				$('.historyType9 .item[data-year="' + year + '"]').offset()
1558					.top - 203;
1559			$('html, body').animate({ scrollTop: yearPos }, 'slow');
1560		});
1561
1562		var yearItems = $('.historyType9 .item').length;
1563		var yearAry = Array();
1564		for (var x = 1, y = 0; x <= yearItems; x++, y++) {
1565			var yearDis =
1566				$('.historyType9 .item:nth-child(' + x + ')').offset().top -
1567				349;
1568			yearAry[y] = yearDis;
1569		}
1570		$(window).on('scroll', function () {
1571			var scroll = $(window).scrollTop();
1572			for (var i = 1, z = 0; z < yearItems; i++, z++) {
1573				if (z == yearItems - 1) {
1574					if (scroll >= yearAry[z]) {
1575						$(
1576							'.historyType9 .timeLine .point[data-child="' +
1577								i +
1578								'"]'
1579						).addClass('active');
1580						$(
1581							'.historyType9 .timeLine .point[data-child="' +
1582								i +
1583								'"]'
1584						)
1585							.siblings()
1586							.removeClass('active');
1587					}
1588				} else {
1589					if (scroll >= yearAry[z] && scroll < yearAry[z + 1]) {
1590						$(
1591							'.historyType9 .timeLine .point[data-child="' +
1592								i +
1593								'"]'
1594						).addClass('active');
1595						$(
1596							'.historyType9 .timeLine .point[data-child="' +
1597								i +
1598								'"]'
1599						)
1600							.siblings()
1601							.removeClass('active');
1602					}
1603				}
1604			}
1605		});
1606	}
1607
1608	/*Slide左右排列======================================*/
1609	if ($('.prod_blk').length) {
1610		$('.slider-for').slick({
1611			slidesToShow: 1,
1612			slidesToScroll: 1,
1613			arrows: false,
1614			fade: true,
1615			asNavFor: '.slider-nav',
1616			responsive: [
1617				{
1618					breakpoint: 992,
1619					settings: {
1620						prevArrow:
1621							'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
1622						nextArrow:
1623							'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
1624						arrows: true,
1625					},
1626				},
1627			],
1628		});
1629		$('.slider-nav').slick({
1630			prevArrow:
1631				'<button class="slick-prev slick-arrow"><i class="fa fa-angle-up"></i></button>',
1632			nextArrow:
1633				'<button class="slick-next slick-arrow"><i class="fa fa-angle-down"></i></button>',
1634			slidesToShow: 5,
1635			slidesToScroll: 1,
1636			focusOnSelect: true,
1637			vertical: true,
1638			asNavFor: '.slider-for',
1639		});
1640		//slickLightbox是以slick為基礎的lightbox插件
1641		$('.slider-for').slickLightbox({
1642			src: 'src',
1643			itemSelector: '.item-image img', //指向图片的锚链接选择器
1644			background: 'rgba(0, 0, 0, .9)', //lightbox背景色
1645			//設定slick的參數
1646			slick: {
1647				prevArrow:
1648					'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
1649				nextArrow:
1650					'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
1651				arrows: true,
1652			},
1653		});
1654	}
1655
1656	if ($('.prod_blk2').length) {
1657		$('.slider-for').slick({
1658			slidesToShow: 1,
1659			slidesToScroll: 1,
1660			arrows: false,
1661			fade: true,
1662			asNavFor: '.slider-nav',
1663			responsive: [
1664				{
1665					breakpoint: 992,
1666					settings: {
1667						prevArrow:
1668							'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
1669						nextArrow:
1670							'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
1671						arrows: true,
1672					},
1673				},
1674			],
1675		});
1676		$('.slider-nav').slick({
1677			prevArrow:
1678				'<button class="slick-prev slick-arrow"><i class="fa fa-angle-up"></i></button>',
1679			nextArrow:
1680				'<button class="slick-next slick-arrow"><i class="fa fa-angle-down"></i></button>',
1681			slidesToShow: 5,
1682			slidesToScroll: 1,
1683			focusOnSelect: true,
1684			asNavFor: '.slider-for',
1685			responsive: [
1686				{
1687					breakpoint: 769,
1688					settings: {
1689						slidesToShow: 4,
1690					},
1691				},
1692				{
1693					breakpoint: 501,
1694					settings: {
1695						slidesToShow: 3,
1696					},
1697				},
1698			],
1699		});
1700
1701		$('.slider-for').slickLightbox({
1702			src: 'src',
1703			itemSelector: '.item-image img', //指向图片的锚链接选择器
1704			background: 'rgba(0, 0, 0, .9)', //lightbox背景色
1705			//設定slick的參數
1706			slick: {
1707				prevArrow:
1708					'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
1709				nextArrow:
1710					'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
1711				arrows: true,
1712			},
1713		});
1714	}
1715
1716	// detail11
1717	if ($('.prod_blk11').length) {
1718		$('.slider-for').on(
1719			'init reInit afterChange',
1720			function (event, slick, currentSlide, nextSlide) {
1721				var i = (currentSlide ? currentSlide : 0) + 1;
1722				let currentNum = ('0' + i).slice(-2);
1723				let totalNum = ('0' + slick.slideCount).slice(-2);
1724				$('.slider-count .current').text(currentNum);
1725				$('.slider-count .total').text(totalNum);
1726			}
1727		);
1728		$('.slider-for').slick({
1729			slidesToShow: 1,
1730			slidesToScroll: 1,
1731			arrows: false,
1732			fade: true,
1733			dots: true,
1734			asNavFor: '.slider-nav',
1735			responsive: [
1736				{
1737					breakpoint: 576,
1738					settings: {
1739						dots: false,
1740					},
1741				},
1742			],
1743		});
1744
1745		$('.slider-nav').slick({
1746			prevArrow:
1747				'<button class="slick-prev slick-arrow"><i class="fa fa-angle-up"></i></button>',
1748			nextArrow:
1749				'<button class="slick-next slick-arrow"><i class="fa fa-angle-down"></i></button>',
1750			slidesToShow: 6,
1751			slidesToScroll: 1,
1752			focusOnSelect: true,
1753			arrows: false,
1754			asNavFor: '.slider-for',
1755			responsive: [
1756				{
1757					breakpoint: 576,
1758					settings: {
1759						slidesToShow: 5,
1760					},
1761				},
1762			],
1763		});
1764		//slickLightbox是以slick為基礎的lightbox插件
1765		$('.slider-for').slickLightbox({
1766			src: 'src',
1767			itemSelector: '.item-image img', //指向图片的锚链接选择器
1768			background: 'rgba(0, 0, 0, .9)', //lightbox背景色
1769			//設定slick的參數
1770			slick: {
1771				prevArrow:
1772					'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
1773				nextArrow:
1774					'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
1775				arrows: true,
1776			},
1777		});
1778	}
1779
1780	/*slide上下排列===============================*/
1781	if ($('.prod_blk4').length) {
1782		$('.slider-for').slick({
1783			slidesToShow: 1,
1784			slidesToScroll: 1,
1785			arrows: false,
1786			fade: true,
1787			asNavFor: '.slider-nav',
1788			responsive: [
1789				{
1790					breakpoint: 992,
1791					settings: {
1792						prevArrow:
1793							'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
1794						nextArrow:
1795							'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
1796						arrows: true,
1797					},
1798				},
1799			],
1800		});
1801		$('.slider-nav').slick({
1802			prevArrow:
1803				'<button class="slick-prev slick-arrow"><i class="fa fa-angle-up"></i></button>',
1804			nextArrow:
1805				'<button class="slick-next slick-arrow"><i class="fa fa-angle-down"></i></button>',
1806			slidesToShow: 5,
1807			slidesToScroll: 1,
1808			focusOnSelect: true,
1809			asNavFor: '.slider-for',
1810			responsive: [
1811				{
1812					breakpoint: 769,
1813					settings: {
1814						slidesToShow: 4,
1815					},
1816				},
1817				{
1818					breakpoint: 501,
1819					settings: {
1820						slidesToShow: 3,
1821					},
1822				},
1823			],
1824		});
1825		//slickLightbox是以slick為基礎的lightbox插件
1826		$('.slider-for').slickLightbox({
1827			src: 'src',
1828			itemSelector: '.item-image img', //指向图片的锚链接选择器
1829			background: 'rgba(0, 0, 0, .9)', //lightbox背景色
1830			//設定slick的參數
1831			slick: {
1832				prevArrow:
1833					'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
1834				nextArrow:
1835					'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
1836				arrows: true,
1837			},
1838		});
1839	}
1840
1841	/*.prod_blk6 ===============================*/
1842	if ($('.prod_blk6').length) {
1843		$('.slider-for').slick({
1844			slidesToShow: 1,
1845			slidesToScroll: 1,
1846			arrows: false,
1847			fade: true,
1848			asNavFor: '.slider-nav',
1849			responsive: [{
1850				breakpoint: 992,
1851				settings: {
1852					prevArrow: '<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
1853					nextArrow: '<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
1854					arrows: true,
1855				},
1856			}, ],
1857		});
1858		$('.slider-nav').slick({
1859			prevArrow: '<button class="slick-prev slick-arrow"><i class="fa fa-angle-up"></i></button>',
1860			nextArrow: '<button class="slick-next slick-arrow"><i class="fa fa-angle-down"></i></button>',
1861			slidesToShow: 5,
1862			slidesToScroll: 1,
1863			focusOnSelect: true,
1864			vertical: true,
1865			asNavFor: '.slider-for',
1866			responsive: [{
1867					breakpoint: 992,
1868					settings: {
1869						vertical: false,
1870					},
1871				},
1872				{
1873					breakpoint: 769,
1874					settings: {
1875						slidesToShow: 4,
1876						vertical: false,
1877					},
1878				},
1879				{
1880					breakpoint: 501,
1881					settings: {
1882						slidesToShow: 3,
1883						vertical: false,
1884					},
1885				},
1886			],
1887		});
1888		//slickLightbox是以slick為基礎的lightbox插件
1889		$('.slider-for').slickLightbox({
1890			src: 'src',
1891			itemSelector: '.item-image img', //指向图片的锚链接选择器
1892			background: 'rgba(0, 0, 0, .9)', //lightbox背景色
1893			//設定slick的參數
1894			slick: {
1895				prevArrow: '<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
1896				nextArrow: '<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
1897				arrows: true,
1898			},
1899		});
1900	}
1901
1902	/*有.prod_blk9 的 slide ===============================*/
1903	if ($('.prod_blk9').length) {
1904		$('.slider-for').slick({
1905			slidesToShow: 1,
1906			slidesToScroll: 1,
1907			arrows: false,
1908			dots: true,
1909			fade: true,
1910			autoplay: true,
1911			autoplaySpeed: 4000,
1912			speed: 800,
1913			responsive: [
1914				{
1915					breakpoint: 992,
1916					settings: {
1917						prevArrow:
1918							'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
1919						nextArrow:
1920							'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
1921						arrows: true,
1922					},
1923				},
1924			],
1925		});
1926		//slickLightbox是以slick為基礎的lightbox插件
1927		$('.slider-for').slickLightbox({
1928			src: 'src',
1929			itemSelector: '.item-image img', //指向图片的锚链接选择器
1930			background: 'rgba(0, 0, 0, .9)', //lightbox背景色
1931			//設定slick的參數
1932			slick: {
1933				prevArrow:
1934					'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
1935				nextArrow:
1936					'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
1937				arrows: true,
1938			},
1939		});
1940	}
1941
1942	if ($('.responsive_tbl').length) {
1943		$('.dataTable').DataTable({
1944			columnDefs: [
1945				{
1946					targets: [3],
1947					orderable: false,
1948				},
1949			],
1950			bPaginate: true, // 顯示換頁
1951			bDestroy: true,
1952			searching: false, // 顯示搜尋
1953			lengthMenu: [5, 10, 15], //選單數量
1954			info: false, // 顯示資訊
1955			fixedHeader: true, // 標題置頂
1956			// scrollY: 450,
1957			scrollX: '100%',
1958		});
1959	}
1960
1961	if ($('.faqContent').length) {
1962		// $('.faqItem_main > .faqItem:eq(0)').addClass('faqItem_current');
1963		/*$(".faqItem_main").find('.faqItem:nth-child(1)').addClass('faqItem_current');
1964		$(".faqItem_head").click(function(){
1965			if($(this).parents('.faqItem').hasClass('faqItem_current')){
1966				$(this).parents('.faqItem').removeClass('faqItem_current');
1967			}else{
1968				$('.faqItem').removeClass('faqItem_current');
1969			$(this).parents('.faqItem').toggleClass('faqItem_current');
1970				$('html,body').animate({
1971			scrollTop: $(this).parents('.faqItem').offset().top
1972				},'slow');
1973		  }
1974		});*/
1975		$('.faqItem:nth-child(1) .faqItem_body').show();
1976		$('.faqItem:nth-child(1)').addClass('faqItem_current');
1977		// 20240509 .noDefaultLight 不要有預設效果。
1978		if ($('.faqContent').hasClass('noDefaultLight')) {
1979			$('.faqItem:nth-child(1) .faqItem_body').hide();
1980			$('.faqItem:nth-child(1)').removeClass('faqItem_current');
1981		}
1982
1983		$('.faqItem_head').click(function () {
1984			if ($(this).parents('.faqItem').hasClass('faqItem_current')) {
1985				$(this).parents('.faqItem').removeClass('faqItem_current');
1986				$(this).siblings('.faqItem_body').slideUp(800);
1987			} else {
1988				$(this)
1989					.parents('.faqItem')
1990					.siblings('.faqItem')
1991					.find('.faqItem_body')
1992					.slideUp(800);
1993				$(this)
1994					.parents('.faqItem')
1995					.siblings('.faqItem')
1996					.removeClass('faqItem_current');
1997				$(this).parents('.faqItem').addClass('faqItem_current');
1998				$(this).siblings('.faqItem_body').slideDown(800);
1999			}
2000		});
2001	}
2002
2003	$(function () {
2004		if ($('.faqItemStyle-1-productdetail').length) {
2005			// console.log('detail run!!');
2006			$('.faqItemStyle-1-productdetail .faqItem').addClass(
2007				'faqItem_current'
2008			);
2009			$('.faqItemStyle-1-productdetail .faqItem .faqItem_body').show();
2010
2011			$('.faqItem_head').click(function () {
2012				if ($(this).parents('.faqItem').hasClass('faqItem_current')) {
2013					$(this).parents('.faqItem').removeClass('faqItem_current');
2014					$(this).siblings('.faqItem_body').slideUp(800);
2015				} else {
2016					// 點擊另一個收合的功能
2017					// $(this)
2018					// 	.parents('.faqItem')
2019					// 	.siblings('.faqItem')
2020					// 	.find('.faqItem_body')
2021					// 	.slideUp(800);
2022					// $(this)
2023					// 	.parents('.faqItem')
2024					// 	.siblings('.faqItem')
2025					// 	.removeClass('faqItem_current');
2026					$(this).parents('.faqItem').addClass('faqItem_current');
2027					$(this).siblings('.faqItem_body').slideDown(800);
2028				}
2029			});
2030		}
2031	});
2032
2033	/*editTab區塊 Tab + lightBox*/
2034	// if ($('.editTab').length) {
2035	// 	$('.editTab .tabList a:first-child').addClass('active');
2036	// 	$('.editTab div.tabBox:first-child').addClass('active');
2037	// 	$('.editTab .tabList a').click(function () {
2038	// 		$('.editTab .tabList a').removeClass('active');
2039	// 		$(this).addClass('active');
2040	// 		$('.editTab div.tabBox').removeClass('active');
2041	// 		$($(this).attr('href')).addClass('active');
2042	// 		$('html,body').animate(
2043	// 			{ scrollTop: $('.editTab').offset().top - 100 },
2044	// 			900
2045	// 		);
2046	// 	});
2047	// }
2048
2049	if ($('.editTab_6-7').length) {
2050		$('.editTab_6-7 .tabList a:first-child').addClass('active');
2051		$('.editTab_6-7 div.tabBox:first-child').addClass('active');
2052		$('.editTab_6-7 .tabList a').click(function () {
2053			$('.editTab_6-7 .tabList a').removeClass('active');
2054			$(this).addClass('active');
2055			$('.editTab_6-7 div.tabBox').removeClass('active');
2056			$($(this).attr('href')).addClass('active');
2057			$('html,body').animate(
2058				{ scrollTop: $('.editTab_6-7').offset().top - 100 },
2059				400
2060			);
2061		});
2062	}
2063
2064	if ($('.editTab_6-8').length) {
2065		$('.editTab_6-8 .tabList a:first-child').addClass('active');
2066		$('.editTab_6-8 div.tabBox:first-child').addClass('active');
2067		$('.editTab_6-8 .tabList a').click(function () {
2068			$('.editTab_6-8 .tabList a').removeClass('active');
2069			$(this).addClass('active');
2070			$('.editTab_6-8 div.tabBox').removeClass('active');
2071			$($(this).attr('href')).addClass('active');
2072			$('html,body').animate(
2073				{ scrollTop: $('.editTab_6-8').offset().top - 100 },
2074				400
2075			);
2076		});
2077	}
2078
2079	if ($('.editTab63-1').length) {
2080		$('.editTab63-1 .tabList a:first-child').addClass('active');
2081		$('.editTab63-1 div.tabBox:first-child').addClass('active');
2082		$('.editTab63-1 .tabList a').click(function () {
2083			$('.editTab63-1 .tabList a').removeClass('active');
2084			$(this).addClass('active');
2085			$('.editTab63-1 div.tabBox').removeClass('active');
2086			$($(this).attr('href')).addClass('active');
2087			$('html,body').animate(
2088				{ scrollTop: $('.editTab63-1').offset().top - 100 },
2089				400
2090			);
2091		});
2092	}
2093
2094	if ($('.editTab63-2').length) {
2095		$('.editTab63-2 .tabList a:first-child').addClass('active');
2096		$('.editTab63-2 div.tabBox:first-child').addClass('active');
2097		$('.editTab63-2 .tabList a').click(function () {
2098			$('.editTab63-2 .tabList a').removeClass('active');
2099			$(this).addClass('active');
2100			$('.editTab63-2 div.tabBox').removeClass('active');
2101			$($(this).attr('href')).addClass('active');
2102			$('html,body').animate(
2103				{ scrollTop: $('.editTab63-2').offset().top - 100 },
2104				400
2105			);
2106		});
2107	}
2108
2109	/*tab Slide*/
2110	if ($('.tabSlide').length) {
2111		$('.tabSlide').slick({
2112			slidesToShow: 4,
2113			slidesToScroll: 1,
2114			prevArrow:
2115				'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
2116			nextArrow:
2117				'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>',
2118			autoplay: true,
2119			autoplaySpeed: 3000,
2120			responsive: [
2121				{
2122					breakpoint: 1200,
2123					settings: {
2124						slidesToShow: 3,
2125					},
2126				},
2127				{
2128					breakpoint: 576,
2129					settings: {
2130						slidesToShow: 2,
2131					},
2132				},
2133				{
2134					breakpoint: 520,
2135					settings: {
2136						slidesToShow: 1,
2137						focusOnSelect: false,
2138					},
2139				},
2140			],
2141		});
2142	}
2143
2144	//===================================================================
2145	//預設圖
2146	//===================================================================
2147	$(window).on('load', function () {
2148		$('img').each(function () {
2149			if (
2150				!this.complete ||
2151				typeof this.naturalWidth == 'undefined' ||
2152				this.naturalWidth == 0
2153			) {
2154				this.src = 'images_v4/default.png';
2155			}
2156		});
2157	});
2158
2159	//===================================================================
2160	//限字數
2161	//===================================================================
2162	$('[data-txtlen]:not([data-txtlen=""])').each(function () {
2163		$(this).text(txtlen($(this).text(), $(this).data('txtlen')));
2164	});
2165	function txtlen(txt, len) {
2166		if (txt.length > len) {
2167			return txt.substr(0, len) + '...';
2168		}
2169	}
2170
2171	//===================================================================
2172	//GDPR
2173	//===================================================================
2174	if ($('.gdprBlock').length) {
2175		var gdprBlock = $('.gdprBlock');
2176		var gdprBtn = $('.gdpr__Btn');
2177		var gdprClosure = $('.gdpr__Closure');
2178		setTimeout(function () {
2179			gdprBlock.addClass('show');
2180		}, 1000);
2181		gdprClosure.on('click', function () {
2182			gdprBlock.removeClass('show');
2183			setTimeout(function () {
2184				gdprBlock.remove();
2185			}, 1000);
2186		});
2187		gdprBtn.on('click', function () {
2188			$.get('gdprcookie.php', function () {
2189				gdprBlock.removeClass('show');
2190				setTimeout(function () {
2191					gdprBlock.remove();
2192				}, 1000);
2193			});
2194		});
2195	}
2196	
2197
2198	// pageLoading
2199	if ($('.pageLoading').length) {
2200		$(document).ready(function () {
2201			if ($('.pageLoading .logo').length) {
2202				// $('.pageLoading .logo').addClass('in');
2203				$('.pageLoading .logo').css({
2204					opacity: '1',
2205					transform: 'translate(-50%, -50%)',
2206				});
2207				$('.pageLoading .logo').delay(200).fadeOut(400);
2208			}
2209			$('.pageLoading').delay(500).fadeOut(500);
2210		});
2211	}
2212
2213	// .pageLoadingStyle02
2214	if ($('.pageLoadingStyle02').length) {
2215		$(document).ready(function () {
2216			$('.pageLoadingStyle02').addClass('loadingEnd');
2217			$('.pageLoadingStyle02').delay(100).fadeOut(700);
2218		});
2219	}
2220
2221
2222	// show/hide password
2223	if ($('.memberContent').length) {
2224		$('.toggle-password').click(function () {
2225			$(this).children('i').toggleClass('fa-eye fa-eye-slash');
2226			var input = $('#password-field');
2227			if (input.attr('type') == 'password') {
2228				input.attr('type', 'text');
2229				$('.toggleText').text('隱藏密碼');
2230			} else {
2231				input.attr('type', 'password');
2232				$('.toggleText').text('顯示密碼');
2233			}
2234		});
2235	}
2236
2237
2238	//gotop
2239	if ($('#goTop').length) {
2240		$('#goTop').click(function () {
2241			jQuery('html,body').animate(
2242				{
2243					scrollTop: 0,
2244				},
2245				1000
2246			);
2247		});
2248		$(window).scroll(function () {
2249			if ($(this).scrollTop() > 300) {
2250				$('#goTop').fadeIn('fast');
2251			} else {
2252				$('#goTop').stop().fadeOut('fast');
2253			}
2254		});
2255	}
2256
2257	// .gotopStyle-2
2258	if ($('.gotopStyle-2').length) {
2259
2260		var before = $(window).scrollTop();
2261		var swallowWaitTimer = false;
2262
2263		$(window).scroll(function () {
2264			var after = $(window).scrollTop();
2265			if (before > after + 3) {
2266				$('.gotopStyle-2').addClass('up');
2267			} else if (before + 3 < after) {
2268				$('.gotopStyle-2').removeClass('up upTop');
2269			}
2270			before = after;
2271
2272			var docHeight = $(document).innerHeight(),
2273				windowHeight = $(window).innerHeight(),
2274				pageBottom = docHeight - windowHeight;
2275			if (pageBottom <= $(window).scrollTop()) {
2276				$('.gotopStyle-2').removeClass('up upTop');
2277			}
2278
2279			if (swallowWaitTimer) {
2280				clearTimeout(swallowWaitTimer);
2281				$('.gotopStyle-2').removeClass('wait');
2282			}
2283			if ($(window).scrollTop() > 100) {
2284				clearTimeout(swallowWaitTimer);
2285				swallowWaitTimer = setTimeout(function () {
2286					$('.gotopStyle-2').addClass('wait');
2287				}, 200)
2288			}
2289
2290			if (setT_ok) {
2291				if ($(window).scrollTop() > 100) {
2292					if (!$('.gotopStyle-2').hasClass('show')) {
2293						$('.gotopStyle-2').removeClass('up upTop');
2294						$('.gotopStyle-2').addClass('down');
2295						clearTimeout(pagetopBtn_setTime);
2296						pagetopBtn_setTime = setTimeout(function () {
2297							$('.gotopStyle-2').removeClass('down');
2298						}, 1200);
2299					}
2300					$('.gotopStyle-2').addClass('show');
2301					$('.gotopStyle-2').css({
2302						'bottom': '44px'
2303					});
2304				} else {
2305					$('.gotopStyle-2').removeClass('show');
2306					$('.gotopStyle-2').css({
2307						'bottom': $(window).height() * 1.2 + 'px'
2308					});
2309					$('.gotopStyle-2').addClass('up');
2310				}
2311			}
2312		});
2313
2314		var pagetopBtn_setTime;
2315		var setT_ok = false;
2316		$('.gotopStyle-2').css({
2317			'bottom': $(window).height() * 1.2 + 'px'
2318		});
2319		setTimeout(function () {
2320			setT_ok = true;
2321			$('.gotopStyle-2').click(function () {
2322				$('.gotopStyle-2').addClass('upTop');
2323				$('html,body').animate({
2324					scrollTop: 0
2325				}, 400);
2326			});
2327		}, 1500);
2328
2329	}
2330	// .gotopStyle-2 - End
2331
2332
2333	// .fixedIcons-2
2334	if ($('.fixedIcons-2').length) {
2335		$('.fixedIcons-2 .toggle-btn').click(function () {
2336			// close class切換
2337			$('.fixedIcons-2').toggleClass('close');
2338
2339			// 文字替換
2340			if ($('.fixedIcons-2').hasClass('close')) {
2341				$('.fixedIcons-2 .toggle .text').text('open');
2342			} else {
2343				$('.fixedIcons-2 .toggle .text').text('close');
2344			}
2345		});
2346	}
2347
2348	// .fixedIcons-3
2349	if ($('.fixedIcons-3').length) {
2350		$('.fixedIcons-3 .toggle-btn').click(function () {
2351			$('.fixedIcons-3-menu').css('display', 'flex');
2352			$('.fixedIcons-3 .toggle-btn').css('display', 'none');
2353		});
2354
2355		$('.fixedIcons-3 .close-btn').click(function () {
2356			$('.fixedIcons-3-menu').css('display', 'none');
2357			$('.fixedIcons-3 .toggle-btn').css('display', 'block');
2358		});
2359	}
2360
2361	// // 2022/10/27 kuei新增 for news/list31.php
2362	if ($('.newsListType26 ul').length) {
2363		var childLength = $('.newsListType26 ul').children().length;
2364		var slidesToShowNum = childLength < 3 ? childLength : 3;
2365		console.log('slidesToShowNum', slidesToShowNum);
2366		$('.newsListType26 .row').slick({
2367			autoplay: false,
2368			arrows: false,
2369			infinite: true,
2370			speed: 300,
2371			autoplay: true,
2372			autoplaySpeed: 3000,
2373			slidesToShow: slidesToShowNum,
2374			slidesToScroll: 1,
2375			responsive: [
2376				{
2377					breakpoint: 992,
2378					settings: {
2379						slidesToShow: 2,
2380						arrows: false,
2381					},
2382				},
2383				{
2384					breakpoint: 768,
2385					settings: {
2386						slidesToShow: 1,
2387						focusOnSelect: false,
2388					},
2389				},
2390			],
2391		});
2392	}
2393
2394	// // 2022/10/25 kuei新增 for index/.sectionBlock_71
2395	if ($('.sectionBlock_71 .products-lists').length) {
2396		$('.products-lists').slick({
2397			arrows: true,
2398			autoplay: true,
2399			autoplaySpeed: 3000,
2400			cssEase: 'ease-in-out',
2401			dots: false,
2402			fade: false,
2403			infinite: true,
2404			speed: 300,
2405			slidesToShow: 4,
2406			slidesToScroll: 1,
2407			nextArrow: $('.goodsnext'),
2408			prevArrow: $('.goodsprev'),
2409			responsive: [
2410				{
2411					breakpoint: 1580,
2412					settings: {
2413						slidesToShow: 3,
2414					},
2415				},
2416				{
2417					breakpoint: 992,
2418					settings: {
2419						slidesToShow: 2,
2420						arrows: false,
2421					},
2422				},
2423				{
2424					breakpoint: 768,
2425					settings: {
2426						slidesToShow: 1,
2427						focusOnSelect: false,
2428					},
2429				},
2430			],
2431		});
2432	}
2433
2434	// // 2022/10/26 kuei新增 for home/index_content_ADinfo.php
2435	if ($('.container-fluid .item-list-info .item-lists').length) {
2436		$('.container-fluid .item-list-info .item-lists').slick({
2437			autoplay: true,
2438			arrows: false,
2439			infinite: true,
2440			speed: 800,
2441			slidesToShow: 4,
2442			slidesToScroll: 1,
2443			responsive: [
2444				{
2445					breakpoint: 992,
2446					settings: { slidesToShow: 2 },
2447				},
2448				{
2449					breakpoint: 768,
2450					settings: { slidesToShow: 1 },
2451				},
2452			],
2453		});
2454	}
2455
2456	// 2022/10/26 kuei新增 for news/list33.php
2457	if ($('.container .info_ADbot .info_ADbot_list').length) {
2458		$('.container .info_ADbot .info_ADbot_list').slick({
2459			autoplay: true,
2460			mobileFirst: true, //add this one
2461			arrows: false,
2462			infinite: true,
2463			speed: 1200,
2464			slidesToShow: 1,
2465			slidesToScroll: 1,
2466			variableWidth: true,
2467			responsive: [
2468				{
2469					breakpoint: 992,
2470					settings: { slidesToShow: 4 },
2471				},
2472				{
2473					breakpoint: 768,
2474					settings: { slidesToShow: 2 },
2475				},
2476			],
2477		});
2478	}
2479
2480	// 2022/10/31 kuei新增 for news/list35.php
2481
2482	if ($('.sectionBlock_73-subBox-left .lists').length) {
2483		$('.sectionBlock_73-subBox-left .lists').slick({
2484			slidesToShow: 2,
2485			slidesToScroll: 1,
2486			autoplay: true,
2487			arrows: false,
2488			speed: 1800,
2489			responsive: [
2490				{
2491					breakpoint: 641,
2492					settings: { slidesToShow: 1, slidesToScroll: 1 },
2493				},
2494			],
2495		});
2496	}
2497
2498	// 2022/11/15 kuei新增 for about/sectionBlock_aboutUs23_container.php
2499	if ($('.sectionBlock_aboutUs23_container').length) {
2500		$('.box').waypoint(
2501			function () {
2502				this.element.classList.add('active');
2503				this.element.classList.add('hhh');
2504			},
2505			{ offset: '70%' }
2506		);
2507	}
2508
2509	// 2022/11/01 kuei新增 for home/index_content_exqualityArea.php
2510	if ($('.sectionBlock_74-container .main-lists-bg').length) {
2511		$('.main-lists-bg')
2512			.on('init', function (event, slick, currentSlide, nextSlide) {
2513				$(".main-lists-bg li[data-slick-index='0']").addClass('view');
2514				$(".main-lists-nav li[data-slick-index='0']").addClass('view');
2515			})
2516			.on(
2517				'beforeChange',
2518				function (event, slick, currentSlide, nextSlide) {
2519					$(
2520						'.main-lists-bg li[data-slick-index=' +
2521							currentSlide +
2522							']'
2523					).removeClass('view');
2524					$(
2525						'.main-lists-nav li[data-slick-index=' +
2526							currentSlide +
2527							']'
2528					).removeClass('view');
2529				}
2530			)
2531			.on('afterChange', function (event, slick, currentSlide) {
2532				$(
2533					'.main-lists-bg li[data-slick-index=' + currentSlide + ']'
2534				).addClass('view');
2535				$(
2536					'.main-lists-nav li[data-slick-index=' + currentSlide + ']'
2537				).addClass('view');
2538			})
2539			.slick({
2540				arrows: false,
2541				autoplay: true,
2542				autoplaySpeed: 2000,
2543				cssEase: 'ease-in-out',
2544				dots: false,
2545				fade: true,
2546				infinite: true,
2547				speed: 600,
2548				slidesToShow: 1,
2549				slidesToScroll: 1,
2550				asNavFor: '.main-lists-nav',
2551				responsive: [
2552					{
2553						breakpoint: 767,
2554						settings: 'unslick',
2555					},
2556				],
2557			});
2558
2559		$('.main-lists-nav')
2560			.on('init', function (event, slick, currentSlide, nextSlide) {
2561				$(".main-lists-nav li[data-slick-index='0']").addClass('view');
2562			})
2563			.on(
2564				'beforeChange',
2565				function (event, slick, currentSlide, nextSlide) {
2566					$(
2567						'.main-lists-nav li[data-slick-index=' +
2568							currentSlide +
2569							']'
2570					).removeClass('view');
2571				}
2572			)
2573			.on('afterChange', function (event, slick, currentSlide) {
2574				$(
2575					'.main-lists-nav li[data-slick-index=' + currentSlide + ']'
2576				).addClass('view');
2577			})
2578			.slick({
2579				arrows: false,
2580				cssEase: 'ease-in-out',
2581				infinite: true,
2582				speed: 0,
2583				slidesToShow: 4,
2584				slidesToScroll: 1,
2585				asNavFor: '.main-lists-bg',
2586				focusOnSelect: true,
2587			});
2588	}
2589
2590	// 2022/11/11 kuei新增 for home/index_content_sectionBlock_76.php
2591	if ($('.sectionBlock_76_productArea').length) {
2592		$('.sectionBlock_76_productArea').waypoint(
2593			function () {
2594				this.element.classList.add('active');
2595			},
2596			{
2597				offset: '70%',
2598			}
2599		);
2600
2601		$('.productList').slick({
2602			infinite: true,
2603			slidesToShow: 3,
2604			slidesToScroll: 1,
2605			arrows: false,
2606			autoplay: true,
2607			autoplaySpeed: 3000,
2608			cssEase: 'ease-in-out',
2609			responsive: [
2610				{
2611					breakpoint: 9999,
2612					settings: 'unslick',
2613				},
2614				{
2615					breakpoint: 861,
2616					settings: {
2617						slidesToShow: 2,
2618					},
2619				},
2620				{
2621					breakpoint: 576,
2622					settings: {
2623						slidesToShow: 1,
2624					},
2625				},
2626			],
2627		});
2628	}
2629
2630	//2022/12/16/ sectionBlock_77的 function
2631	if ($('.sectionBlock_77 ').length) {
2632		$('.sectionBlock_77').waypoint(
2633			function () {
2634				this.element.classList.add('show'); // 一次只能放一個 class 名稱
2635			},
2636			{
2637				offset: '60%', //距離視窗高度
2638			}
2639		);
2640
2641		const len = $('.sectionBlock_77 .menu ul li').length;
2642		const slot = 0.3;
2643		let time = 0;
2644		for (var i = 0; i < len; i++) {
2645			$('.sectionBlock_77 .menu ul li')
2646				.eq(i)
2647				.css({ 'transition-delay': time + 's' });
2648			time += slot;
2649		}
2650	}
2651
2652	//2022/12/16/ sectionBlock_77-5的 function
2653	if ($('.sectionBlock_77-5 ').length) {
2654		$('.sectionBlock_77-5').waypoint(
2655			function () {
2656				this.element.classList.add('show'); // 一次只能放一個 class 名稱
2657			},
2658			{
2659				offset: '60%', //距離視窗高度
2660			}
2661		);
2662
2663		const len = $('.sectionBlock_77-5 .menu ul li').length;
2664		const slot = 0.3;
2665		let time = 0;
2666		for (var i = 0; i < len; i++) {
2667			$('.sectionBlock_77-5 .menu ul li')
2668				.eq(i)
2669				.css({ 'transition-delay': time + 's' });
2670			time += slot;
2671		}
2672	}
2673
2674	// 2022/11/23 kuei新增 for home/index_content_sectionBlock_78
2675	if ($('.sectionBlock_78_swiper-container').length) {
2676		let mySwiper = new Swiper('.sectionBlock_78_swiper-container', {
2677			speed: 1e3,
2678			autoplay: {
2679				delay: 6e3,
2680				waitForTransition: false,
2681				disableOnInteraction: true,
2682			},
2683			loop: true,
2684			pagination: {
2685				el: '.page-application',
2686				type: 'bullets',
2687				clickable: true,
2688			},
2689			slidesPerView: 3,
2690			navigation: {
2691				nextEl: '.idx-a-next',
2692				prevEl: '.idx-a-prev',
2693			},
2694			breakpoints: {
2695				0: {
2696					slidesPerView: 1,
2697					initialSlide: 1,
2698				},
2699				576: {
2700					spaceBetween: 40,
2701					slidesPerView: 'auto',
2702					initialSlide: 4,
2703				},
2704				980: {
2705					slidesPerView: 'auto',
2706					spaceBetween: 40,
2707					initialSlide: 4,
2708					slidesOffsetBefore: 200,
2709				},
2710			},
2711		});
2712	}
2713
2714	//2023/01/03/ sectionBlock_80-7的 function
2715
2716	if ($('.sectionBlock_80-7').length) {
2717		if ($(window).width() <= 576) {
2718			$('.sectionBlock_80-7 .honeycomb')
2719				.find('.honeycomb__placeholder')
2720				.remove();
2721
2722			$('.sectionBlock_80-7 .honeycomb').slick({
2723				infinite: true,
2724				slidesToShow: 2,
2725				slidesToScroll: 1,
2726				arrows: false,
2727				autoplay: false,
2728				autoplaySpeed: 3000,
2729				cssEase: 'ease-in-out',
2730				responsive: [
2731					{
2732						breakpoint: 9999,
2733						settings: 'unslick',
2734					},
2735
2736					{
2737						breakpoint: 576,
2738						settings: {
2739							slidesToShow: 1,
2740						},
2741					},
2742				],
2743			});
2744		}
2745	}
2746
2747	//2022/12/05/ sectionBlock_82的 function
2748	if ($('.sectionBlock_82').length) {
2749		$('.sectionBlock_82').waypoint(
2750			function () {
2751				this.element.classList.add('show'); // 一次只能放一個 class 名稱
2752			},
2753			{
2754				offset: '60%', //距離視窗高度
2755			}
2756		);
2757
2758		const len = $('.sectionBlock_82 .processList li').length;
2759		const slot = 0.3;
2760		let time = 0;
2761		for (var i = 0; i < len; i++) {
2762			$('.sectionBlock_82 .processList li')
2763				.eq(i)
2764				.css({ 'transition-delay': time + 's' });
2765			time += slot;
2766		}
2767	}
2768
2769	//2022/12/05/ sectionBlock_83的 function
2770	if ($('.sectionBlock_83').length) {
2771		$('.product-lists-content >div').eq(0).show();
2772		$('.product-lists a').eq(0).addClass('current');
2773		$('.product-lists')
2774			.find('a')
2775			.click(function () {
2776				let obj = $(this).attr('href');
2777				$(this).addClass('current').siblings().removeClass('current');
2778				$(obj).fadeIn().siblings().hide();
2779				if ($(obj).children('.item2-album li').length > 1) {
2780					$(obj).children('.item2-album').slick({
2781						infinite: true,
2782						fade: true,
2783						slidesToShow: 1,
2784						slidesToScroll: 1,
2785						dots: true,
2786						dotsClass: 'slick-dots-vertical',
2787						autoplay: true,
2788						autoplaySpeed: 3000,
2789						cssEase: 'linear',
2790					});
2791				}
2792				$('body,html').animate(
2793					{ scrollTop: $('.productsArea').offset().top - 80 },
2794					300
2795				);
2796
2797				return false;
2798			});
2799	}
2800
2801	//2022/12/05/ sectionBlock_84的 function
2802
2803	if ($('.sectionBlock_84').length) {
2804		$('.product-list-bg').slick({
2805			infinite: false,
2806			slidesToShow: 1,
2807			slidesToScroll: 1,
2808			fade: true,
2809			dots: false,
2810			arrows: false,
2811			autoplay: false,
2812			// autoplaySpeed: 3000,
2813			speed: 200,
2814			swipe: false,
2815			cssEase: 'ease-in-out',
2816			responsive: [
2817				{
2818					breakpoint: 1025,
2819					settings: {
2820						infinite: true,
2821						asNavFor: '.product-list-btn, .product-list-txt',
2822					},
2823				},
2824			],
2825		});
2826		$('.product-list-txt').slick({
2827			infinite: false,
2828			slidesToShow: 1,
2829			slidesToScroll: 1,
2830			fade: true,
2831			dots: false,
2832			arrows: false,
2833			autoplay: false,
2834			// autoplaySpeed: 3000,
2835			speed: 200,
2836			swipe: false,
2837			cssEase: 'ease-in-out',
2838			responsive: [
2839				{
2840					breakpoint: 1025,
2841					settings: {
2842						infinite: true,
2843						asNavFor: '.product-list-btn, .product-list-bg',
2844					},
2845				},
2846			],
2847		});
2848		$('.product-list-btn').slick({
2849			infinite: false,
2850			slidesToShow: 3,
2851			slidesToScroll: 1,
2852			arrows: false,
2853			autoplay: false,
2854			// autoplaySpeed: 3000,
2855			speed: 200,
2856			responsive: [
2857				{
2858					breakpoint: 1025,
2859					settings: {
2860						infinite: true,
2861						focusOnSelect: true,
2862						dots: true,
2863						dotsClass: 'slick-dots-bottom',
2864						autoplay: true,
2865						autoplaySpeed: 3000,
2866						asNavFor: '.product-list-bg, .product-list-txt',
2867					},
2868				},
2869				{
2870					breakpoint: 441,
2871					settings: {
2872						focusOnSelect: true,
2873						infinite: true,
2874						slidesToShow: 2,
2875						dots: true,
2876						dotsClass: 'slick-dots-bottom',
2877						autoplay: false,
2878						autoplaySpeed: 3000,
2879						asNavFor: '.product-list-bg, .product-list-txt',
2880					},
2881				},
2882			],
2883		});
2884
2885		var hoverBusiness;
2886		if ($(window).innerWidth() > 1024) {
2887			$('.product-list-btn li').eq(0).addClass('current');
2888		}
2889		$('.product-list-btn li .item')
2890			.mouseenter(function () {
2891				let this_item = $(this).parents('li');
2892				if ($(window).innerWidth() > 1024) {
2893					hoverBusiness = setTimeout(function () {
2894						$('.product-list-btn li').removeClass('current');
2895						let item_index = this_item.data('index');
2896						this_item.addClass('current');
2897
2898						$('.product-list-btn').slick('slickGoTo', item_index);
2899						$('.product-list-bg').slick('slickGoTo', item_index);
2900						$('.product-list-txt').slick('slickGoTo', item_index);
2901					}, 300);
2902				}
2903			})
2904			.mouseleave(function () {
2905				if ($(window).innerWidth() > 1024) {
2906					clearTimeout(hoverBusiness);
2907					let org_item = $('.product-list-btn li.current');
2908					let org_index = $('.product-list-btn li.current').data(
2909						'index'
2910					);
2911					$('.product-list-btn').slick('slickGoTo', org_index);
2912					$('.product-list-bg').slick('slickGoTo', org_index);
2913					$('.product-list-txt').slick('slickGoTo', org_index);
2914				}
2915			});
2916	}
2917
2918	//2022/12/09/ sectionBlock_85的 function
2919
2920	if ($('.sectionBlock_85').length) {
2921		$('.sectionBlock_85 .news-list').slick({
2922			infinite: true,
2923			slidesToShow: 2,
2924			slidesToScroll: 1,
2925			arrows: false,
2926			dots: true,
2927			dotsClass: 'slick-dots-bottom',
2928			// customPaging: function (slider, i) {
2929			// 	return
2930			// },
2931			autoplay: true,
2932			autoplaySpeed: 3000,
2933			vertical: true,
2934			verticalSwiping: true,
2935			cssEase: 'cubic-bezier(0.645, 0.045, 0.355, 1)',
2936			responsive: [
2937				{
2938					breakpoint: 1181,
2939					settings: {
2940						vertical: false,
2941						verticalSwiping: false,
2942					},
2943				},
2944				{
2945					breakpoint: 841,
2946					settings: {
2947						slidesToShow: 1,
2948						vertical: false,
2949						verticalSwiping: false,
2950					},
2951				},
2952			],
2953		});
2954	}
2955
2956	//2022/12/05/ sectionBlock_89的 function
2957	if ($('.sectionBlock_89').length) {
2958		$('.sectionBlock_89').waypoint(
2959			function () {
2960				this.element.classList.add('show'); // 一次只能放一個 class 名稱
2961			},
2962			{
2963				offset: '60%', //距離視窗高度
2964			}
2965		);
2966
2967		const len = $('.sectionBlock_89 .mainContent .processList li').length;
2968		const slot = 0.3;
2969		let time = 0;
2970		for (var i = 0; i < len; i++) {
2971			$('.sectionBlock_89 .processList li')
2972				.eq(i)
2973				.css({ 'transition-delay': time + 's' });
2974			time += slot;
2975		}
2976	}
2977
2978	//2023/01/03/ sectionBlock_90的 function
2979	if ($('.sectionBlock_90 .marketList .marketList__item').length) {
2980		var runMarketNumber = false;
2981		function runNumber(ele, nowNumber, maxNumber) {
2982			if (nowNumber + 1 <= maxNumber) {
2983				ele.children('.number').text(nowNumber + 1 + '%');
2984				ele.find('.bar-active').css({
2985					width: nowNumber + 1 + '%',
2986				});
2987			}
2988			if (nowNumber + 2 <= maxNumber) {
2989				setTimeout(function () {
2990					runNumber(ele, nowNumber + 1, maxNumber);
2991				}, 30);
2992			}
2993		}
2994		if (
2995			$(window).scrollTop() + $(window).height() * 0.7 >
2996			$('.marketList').offset().top
2997		) {
2998			$('.sectionBlock_90 .marketList .marketList__item').each(
2999				function () {
3000					var percentNumber = $(this).data('number');
3001					var nowNumber = 0;
3002					runNumber($(this), nowNumber, percentNumber);
3003					runMarketNumber = true;
3004				}
3005			);
3006		}
3007
3008		$(window).scroll(function () {
3009			if (runMarketNumber == false) {
3010				if (
3011					$(window).scrollTop() + $(window).height() * 0.7 >
3012					$('.marketList').offset().top
3013				) {
3014					$('.marketList .marketList__item').each(function () {
3015						var percentNumber = $(this).data('number');
3016						var nowNumber = 0;
3017						runNumber($(this), nowNumber, percentNumber);
3018						runMarketNumber = true;
3019					});
3020				}
3021			}
3022		});
3023	}
3024
3025	//2022/12/05/ sectionBlock_91的 function
3026	if ($('.sectionBlock_91').length) {
3027		$('.sectionBlock_91 .cb12_mb .items').slick({
3028			infinite: true,
3029			slidesToShow: 1,
3030			slidesToScroll: 1,
3031			arrows: false,
3032			dots: true,
3033			dotsClass: 'slick-dots-bottom',
3034			// customPaging: function (slider, i) {
3035			// 	return
3036			// },
3037			autoplay: true,
3038			autoplaySpeed: 3000,
3039			vertical: true,
3040			verticalSwiping: true,
3041			cssEase: 'cubic-bezier(0.645, 0.045, 0.355, 1)',
3042			responsive: [
3043				{
3044					breakpoint: 841,
3045					settings: {
3046						slidesToShow: 1,
3047						vertical: false,
3048						verticalSwiping: false,
3049					},
3050				},
3051			],
3052		});
3053	}
3054
3055	// sectionBlock_93的 function
3056	if ($('.sectionBlock_93').length) {
3057		$('.sectionBlock_93 .pic_swiper').waypoint(
3058			function () {
3059				$('.sectionBlock_93 .imgs').css(
3060					'transform',
3061					'scale(0.9) translateY(-50px)'
3062				);
3063			},
3064			{
3065				offset: '60%',
3066			}
3067		);
3068	}
3069
3070	// sectionBlock_98的 function
3071
3072	if ($('.sectionBlock_98').length) {
3073		$('.sectionBlock_98 ').waypoint(
3074			function () {
3075				$('.sectionBlock_98 .top').css({
3076					transform: 'skew(-10deg)',
3077					opacity: '1',
3078					animationName: 'leftMove',
3079				});
3080
3081				$('.sectionBlock_98 .top .box').css({
3082					opacity: '1',
3083					animationName: 'leftmovein',
3084					animationDelay: '500ms',
3085				});
3086
3087				$('.sectionBlock_98 .bottom').css({
3088					transform: 'skew(-10deg)',
3089					opacity: '1',
3090					animationName: 'leftMove',
3091				});
3092
3093				$('.sectionBlock_98 .bottom .box').css({
3094					opacity: '1',
3095					animationName: 'leftmovein',
3096					animationDelay: '500ms',
3097				});
3098			},
3099			{
3100				offset: '60%',
3101			}
3102		);
3103	}
3104
3105	// sectionBlock_99的 function
3106	if ($('.sectionBlock_99').length) {
3107		$(' #sectionBlock_99_slider').on('input change', e => {
3108			console.log('test input changed');
3109			const sliderPos = Number(e.target.value);
3110			$('.foreground-img').css('width', `${sliderPos}%`);
3111			$('.slider-button').css('left', `calc(${sliderPos}% - 24px)`);
3112			$('.sectionBlock_99 .after-txt').css('left', `${sliderPos + 25}%`);
3113		});
3114
3115		const foregroundImgWidth = $(
3116			'.sectionBlock_99 .image-slider-box'
3117		).outerWidth();
3118		$('.img-box').css('background-size', `${foregroundImgWidth}px 100%`);
3119	}
3120
3121	// sectionBlock_6-7;
3122	/*editTab區塊 Tab + lightBox*/
3123	if ($('.editTab_6-7').length) {
3124		$('.editTab_6-7 .tabList a:first-child').addClass('active');
3125		$('.editTab_6-7 div.tabBox:first-child').addClass('active');
3126		$('.editTab_6-7 .tabList a').click(function () {
3127			$('.editTab_6-7 .tabList a').removeClass('active');
3128			$(this).addClass('active');
3129			$('.editTab_6-7 div.tabBox').removeClass('active');
3130			$($(this).attr('href')).addClass('active');
3131			$('html,body').animate(
3132				{ scrollTop: $('.editTab_6-7').offset().top - 100 },
3133				400
3134			);
3135		});
3136	}
3137
3138	// sectionBlock_6-7;
3139	/*輪播區域*/
3140
3141	//
3142
3143	// 2022/11/18 location / list2
3144
3145	$(function () {
3146		if ($('.locationContent_2 .dist-item').length) {
3147			$('.locationContent_2 .dist-item').on('click', function (e) {
3148				// e.stopPropagation();
3149				e.currentTarget.classList.toggle('active');
3150			});
3151		}
3152	});
3153
3154	// 2022/11/16 kuei新增 for product/detail7.php
3155	if ($('.prd-detail-detail7 .swiper_container ').length) {
3156		let mySwiper = new Swiper('.prd-detail-detail7 .swiper_container ', {
3157			effect: 'fade',
3158			fadeEffect: {
3159				crossFade: true,
3160			},
3161			pagination: {
3162				el: '.swiper-pagination',
3163				clickable: true,
3164			},
3165		});
3166	}
3167
3168	//  for contact/b2b-2.php
3169	$('.form_b2b_2 input,.form_b2b_2 textarea,.form_b2b_2 select').blur(
3170		function () {
3171			'' === $(this).val()
3172				? $(this).removeClass('valid')
3173				: $(this).addClass('valid');
3174		}
3175	);
3176
3177	// 監聽是否有滑到footer ,滑到添加class
3178
3179	if ($('footer').length) {
3180		$(window).on('load scroll resize', function () {
3181			var targetPos =
3182				$('footer').offset().top - $(window).innerHeight() * 0.75;
3183			var scroll = $(window).scrollTop();
3184
3185			if (scroll >= targetPos) {
3186				$('footer').addClass('in');
3187			} else {
3188				$('footer').removeClass('in');
3189			}
3190		});
3191	}
3192});
3193
3194// sectionBlock_92;
3195
3196if ($('.sectionBlock_92').length) {
3197	let toggles = document.querySelectorAll('.faq');
3198	let togglesContent = document.querySelectorAll('.faq-content');
3199
3200	let contactFormContainerH = $('.contact-form-container').outerHeight();
3201	let faq = $('.faq_demo');
3202	// console.log(faq);
3203	let faqTitleActiveNum = $('.faq.active .faq-title .num');
3204	let calcFaqContentH =
3205		contactFormContainerH - 4 * faq.outerHeight(true) - faq.outerHeight();
3206
3207	for (let i = 0; i < toggles.length; i++) {
3208		toggles[i].onclick = function () {
3209			if (this.classList.contains('active')) {
3210				console.log(this.classList.contains('active'));
3211			} else {
3212				showToggle(this);
3213			}
3214		};
3215	}
3216
3217	// Function to Show a Panel顯示面板的功能
3218	function showToggle(elem) {
3219		hideToggles();
3220		elem.classList.toggle('active');
3221		// console.log(faq);
3222		$('.faq.active .faq-title .num').css(
3223			'height',
3224			`calc( 100% - ${calcFaqContentH}px)`
3225		);
3226	}
3227
3228	// Function to Hide all shown Panels隱藏所有顯示面板的功能
3229	function hideToggles() {
3230		for (let i = 0; i < toggles.length; i++) {
3231			toggles[i].classList.remove('active');
3232		}
3233		$('.faq .faq-title .num').css('height', `100%`);
3234	}
3235
3236	$('.accordion-container').css('max-height', `${contactFormContainerH}px`);
3237
3238	$('.faq-content').css('height', `${calcFaqContentH}`);
3239
3240	faqTitleActiveNum.css('height', `calc( 100% - ${calcFaqContentH}px)`);
3241}
3242
3243if ($('.sectionBlock_94').length) {
3244	var slide_img_box_all = $('.sectionBlock_94 .swiper-slide').length;
3245	if ($('.sectionBlock_94 .swiper-slide ').length < 9) {
3246		slide_img_box_all = '0' + slide_img_box_all;
3247	}
3248	$('.sectionBlock_94 .num_box .all').html(slide_img_box_all);
3249
3250	var sectionBlock_94_swiper = new Swiper('.sectionBlock_94__swiper', {
3251		slidesPerView: 'auto',
3252		effect: 'fade',
3253		spaceBetween: 0,
3254		loop: false,
3255		speed: 600,
3256		autoHeight: true,
3257		navigation: {
3258			nextEl: '.sectionBlock_94 .fa-angle-right',
3259			prevEl: '.sectionBlock_94 .fa-angle-left',
3260		},
3261		on: {
3262			slideChangeTransitionStart: function () {
3263				var swiper_now = sectionBlock_94_swiper.realIndex + 1;
3264				if (sectionBlock_94_swiper.realIndex + 1 < 9) {
3265					swiper_now = '0' + swiper_now;
3266				}
3267				$('.sectionBlock_94 .num_box .now').html(swiper_now);
3268			},
3269		},
3270	});
3271
3272	if ($(window).innerWidth() > 576) {
3273		var sectionBlock_94_swiper = new Swiper('.sectionBlock_94__swiper', {
3274			slidesPerView: 'auto',
3275			effect: 'fade',
3276			spaceBetween: 0,
3277			loop: false,
3278			speed: 600,
3279			autoHeight: true,
3280			navigation: {
3281				nextEl: '.sectionBlock_94__swiper-bottom .fa-angle-right',
3282				prevEl: '.sectionBlock_94__swiper-bottom .fa-angle-left',
3283			},
3284			on: {
3285				slideChangeTransitionStart: function () {
3286					var swiper_now = sectionBlock_94_swiper.realIndex + 1;
3287					if (sectionBlock_94_swiper.realIndex + 1 < 9) {
3288						swiper_now = '0' + swiper_now;
3289					}
3290					$('.sectionBlock_94 .num_box .now').html(swiper_now);
3291				},
3292			},
3293		});
3294	}
3295	if ($('.sectionBlock_94__swiper .swiper-slide').length < 2) {
3296		$('.sectionBlock_94__swiper-bottom').hide();
3297	}
3298	sectionBlock_94_swiper.on('slideChangeTransitionStart', function () {
3299		var swiper_now = sectionBlock_94_swiper.realIndex + 1;
3300		if (sectionBlock_94_swiper.realIndex + 1 < 9) {
3301			swiper_now = '0' + swiper_now;
3302		}
3303		$('.sectionBlock_94 .num_box .now').html(swiper_now);
3304	});
3305}
3306
3307// .sectionBlock_106
3308$(function () {
3309	if ($('.sectionBlock_106').length) {
3310		$(window).scroll(function () {
3311			var window_w = $(window).width();
3312			var window_h = $(window).height();
3313			offsetTop = $(window).scrollTop();
3314
3315			if ($(window).innerWidth() > 1024) {
3316				var bgss = $('.sectionBlock_106 .pic-bg');
3317				var this_b1 = (offsetTop - bgss.offset().top) / 10;
3318				TweenLite.to(bgss, 1, {
3319					backgroundPosition: '50% ' + this_b1 + 'px',
3320				});
3321			}
3322		});
3323	}
3324});
3325
3326//===================================================================
3327// tabList (頁籤切換)
3328//===================================================================
3329$('.tabLabel').click(function () {
3330	$(this).siblings('.tabLabel.active').removeClass('active');
3331	$(this).addClass('active');
3332	// jQuery("html,body").animate({
3333	//     scrollTop: $(this).offset().top-$(this).height()*2
3334	// }, 300);
3335});
3336//end tabList
3337
3338//===================================================================
3339//收合選單
3340// 1.可無限階層,如有子選單則收合,若無則link(轉頁)
3341// 2.active複選:凡是href=url的項目皆會active,並展開
3342// 3.如html無設定active,預設展開第一筆
3343//class=togglearea
3344//data-item  每筆資料
3345//data-title 標題(點擊展開內容)
3346//data-content 收合的內容 (預設隱藏,第一筆展開,或在html加active展開)
3347//data-nodefault="true" 取消預設展開第一筆
3348//SAMPLE CODE <div class="faqlist togglearea" data-item=".faq_item" data-title=".faq_title" data-content=".faq_content">
3349//用在收合選單(有子選單):
3350//data-item="li" data-title="li>a" data-content="ul" data-nodefault="true"
3351//----同層選單縮合data-content="ul"
3352//----同層選單不縮合 data-content="li>ul"
3353//===================================================================
3354
3355togglearea('.togglearea');
3356
3357function togglearea(target) {
3358	items = $(target).data('item');
3359	title = $(target).data('title');
3360	content = $(target).data('content');
3361	nodefault = $(target).data('nodefault');
3362	//$(target).addClass("no_css_transition");               //移除css animation
3363	$(target + ' ' + content).hide(); //隱藏所有選單內容
3364	if ($(target).find(items).hasClass('active')) {
3365		$(target + ' ' + items + '.active')
3366			.siblings()
3367			.find(content)
3368			.hide(); //隱藏同層的其他內容
3369		$(target + ' ' + items + '.active')
3370			.children(content)
3371			.show(); //如有active則展開該項
3372	} else if (!nodefault) {
3373		$(target + ' ' + items + ':first-child')
3374			.children(content)
3375			.show(); //若無active展開第一項內容
3376		$(target + ' ' + items + ':first-child')
3377			.children(content)
3378			.parent()
3379			.addClass('active');
3380	} //並加active
3381	$(target + ' ' + title)
3382		.unbind()
3383		.click(function () {
3384			if ($(this).closest(items).hasClass('active')) {
3385				$(items).removeClass('active');
3386			} else {
3387				$(items).removeClass('active');
3388				$(this).closest(items).addClass('active');
3389			}
3390
3391			if ($(this).next(content).length > 0) {
3392				$(this).parent().siblings().find(content).slideUp(300); //同層的收合
3393				$(this).next(content).stop().slideToggle(300);
3394				return false;
3395			}
3396		});
3397} //END function togglearea
3398
3399// headerStyle02_01;
3400/*hover 時增添 class*/
3401
3402$('.globalnav_main .globalnav_col').hover(
3403	function () {
3404		if ($(this).children('.dropdown-menu').length) {
3405			$('.popup-bg-cover').addClass('open');
3406			$('.headerStyle02_01 nav').addClass('open');
3407		}
3408	},
3409
3410	function () {
3411		$('.popup-bg-cover').removeClass('open');
3412		$('.headerStyle02_01 nav').removeClass('open');
3413	}
3414);
3415
3416//===================================================================
3417//文字垂直輪播 ( class=.marquee)  (需搭配css)
3418//===================================================================
3419
3420var marqueeTarget = '.marqueeBlock .marquee';
3421
3422if ($(marqueeTarget).length) {
3423	if (!mobileType) {
3424		var $marqueeBlock = $(marqueeTarget + ' ul'),
3425			$marqueeItem = $marqueeBlock
3426				.append($marqueeBlock.html())
3427				.children(),
3428			marqueeHeight = $('.marquee').height() * -1,
3429			scrollSpeed = 600,
3430			timer,
3431			speed = 3000 + scrollSpeed;
3432
3433		$marqueeItem.hover(
3434			function () {
3435				clearTimeout(timer);
3436			},
3437			function () {
3438				timer = setTimeout(marqueeAD, speed);
3439			}
3440		);
3441
3442		$('a').focus(function () {
3443			this.blur();
3444		});
3445
3446		function marqueeAD() {
3447			var nowPos = $marqueeBlock.position().top / marqueeHeight;
3448			nowPos = (nowPos + 1) % $marqueeItem.length;
3449			$marqueeBlock.animate(
3450				{
3451					top: nowPos * marqueeHeight,
3452				},
3453				scrollSpeed,
3454				function () {
3455					if (nowPos == $marqueeItem.length / 2) {
3456						$marqueeBlock.css('top', 0);
3457					}
3458				}
3459			);
3460			timer = setTimeout(marqueeAD, speed);
3461		}
3462		timer = setTimeout(marqueeAD, speed);
3463	}
3464} //end marquee
3465
3466//2022/12/02/ sectionBlock_aboutUs25 的 function
3467
3468function changeStep(event) {
3469	$(event.target)
3470		.parents('.item')
3471		.addClass('active')
3472		.siblings()
3473		.removeClass('active');
3474}
3475
3476//v4_animate cowboy 20220125
3477if ($('.v4_animate').length) {
3478	$(window).on('load scroll resize', function () {
3479		$('.v4_animate').each(function () {
3480			var targetPos =
3481				$(this).offset().top - $(window).innerHeight() * 0.85;
3482			var scroll = $(window).scrollTop();
3483			if (scroll >= targetPos) {
3484				$(this).addClass('in');
3485			}
3486		});
3487	});
3488}
3489//v4_animate cowboy 20220125 end
3490
3491function openList(event) {
3492	$(event.target).parents('.mediaCard_share').toggleClass('openSocial');
3493}
3494
3495// 觸發AOS動畫
3496
3497AOS.init({
3498	duration: 1000, //動畫時間
3499	easing: 'ease-in-out', //動畫模式
3500});
3501
3502// 2023-04-13 -> header/layout16.php用#searchform 搜尋框
3503//範例網站-田義:http://www.tenii-pro.com/index_tw.php
3504function search_btn() {
3505	if ($('#searchtext').val() == '') {
3506		alert('請輸入搜尋文字');
3507	} else {
3508		$('#searchform').submit();
3509	}
3510	// document.getElementById('searchform').submit();//20221012 lin 註解替換上方程式
3511}
3512
3513// 2023-04-13 -> mbpanel/cowboy4.php用#searchform_mb 搜尋框
3514//範例網站-田義:http://www.tenii-pro.com/index_tw.php
3515function search_btn_mb() {
3516	if ($('#searchtext_mb').val() == '') {
3517		alert('請輸入搜尋文字');
3518	} else {
3519		$('#searchform_mb').submit();
3520	}
3521}
3522
3523// 2023-04-13 -> header/layout3_2.php、layout3_3.php用#search_id 搜尋框
3524//範例網站-盟英:https://www.maindrive.com.tw/index_en.php
3525if ($('#search_id').length) {
3526	const body = document.querySelector('body');
3527	const navBarContent_03 = document.querySelector('.navBarContent_03');
3528	const search_id = document.querySelector('#search_id');
3529	const search_area = document.querySelector('.search_area');
3530	const inputText = document.querySelector('.input-text');
3531	const searchIcon = document.querySelector('.search-icon');
3532	const arrowIcon = document.querySelector('.arrow-icon');
3533
3534	search_id.addEventListener('click', e => {
3535		e.stopPropagation();
3536		//start
3537		$('.navBarContent_01').hide();
3538		$('.navBarContent_02').hide();
3539		$('.search_small').hide();
3540		$('.search_area').css('display', 'flex');
3541		navBarContent_03.classList.add('open');
3542		search_id.classList.add('open');
3543
3544		inputText.classList.add('input--expand');
3545		searchIcon.classList.add('search--expand');
3546		inputText.focus();
3547	});
3548
3549	body.addEventListener('click', e => {
3550		inputText.value = '';
3551		// start
3552		$('.navBarContent_01').show();
3553		$('.navBarContent_02').show();
3554		$('.search_small').show();
3555		$('.search_area').hide();
3556		navBarContent_03.classList.remove('open');
3557		search_id.classList.remove('open');
3558
3559		inputText.classList.remove('input--expand');
3560		searchIcon.classList.remove('search--expand');
3561		searchIcon.classList.remove('search--ontype');
3562	});
3563
3564	inputText.addEventListener('input', e => {
3565		if (inputText.value === '') {
3566			searchIcon.classList.remove('search--ontype');
3567		} else {
3568			searchIcon.classList.add('search--ontype');
3569		}
3570	});
3571}
3572
3573// 2023-04-13 -> header/layout3_2.php、layout3_3.php用.nav-item 展開的收合選單
3574//範例網站-盟英:https://www.maindrive.com.tw/index_en.php
3575if ($('.nav-item').length) {
3576	// nav收缩展開
3577	$('.nav-item>a').on('click', function () {
3578		if ($(this).next().css('display') == 'none') {
3579			//展開未展開
3580			$('.nav-item').children('ul').slideUp(300);
3581			$(this).next('ul').slideDown(300);
3582			$(this)
3583				.parent('li')
3584				.addClass('nav-show')
3585				.siblings('li')
3586				.removeClass('nav-show');
3587		} else {
3588			//收缩已展開
3589			$(this).next('ul').slideUp(300);
3590			$('.nav-item.nav-show').removeClass('nav-show');
3591		}
3592	});
3593}
3594
3595// investor.scss
3596$('.investor_split').each(function () {
3597	var text = $(this).text().split('');
3598	var len = text.length;
3599	var html = '';
3600	for (var i = 0; i < len; i++) {
3601		html += '<span>' + text[i] + '</span>';
3602	}
3603	$(this).html(html);
3604
3605	$('a.item').hover(
3606		function () {
3607			var investor_len = $('.investor_split').text().length;
3608			for (var j = 1; j < investor_len + 1; j++) {
3609				$('.investor_split span:nth-child(' + j + ')').css(
3610					'transition-delay',
3611					0.1 * j + 's'
3612				);
3613			}
3614		},
3615		function () {
3616			$('.investor_split span').css('transition-delay', '0s');
3617		}
3618	);
3619});
3620
3621//   investor_download
3622if ($('.investor_download').length) {
3623	$('.investor_download a')
3624		.has('.download_btn')
3625		.attr('target', '_blank')
3626		.css('cursor', 'pointer');
3627}
3628
3629$(function () {
3630	// index .sectionBlock_97
3631	if ($('.sectionBlock_97').length) {
3632		$('.sectionBlock_97 .slider').slick({
3633			slidesToShow: 3,
3634			slidesToScroll: 1,
3635			dots: false,
3636			infinite: false,
3637			draggable: false,
3638			// autoplay: true,
3639			// autoplaySpeed: 3000,
3640			// infinite: true,
3641			prevArrow:
3642				'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left" aria-hidden="true"></i></button>',
3643			nextArrow:
3644				'<button class="slick-next slick-arrow"><i class="fa fa-angle-right" aria-hidden="true"></i></button>',
3645			responsive: [
3646				{
3647					breakpoint: 1200,
3648					settings: {
3649						slidesToShow: 2,
3650					},
3651				},
3652				{
3653					breakpoint: 768,
3654					infinite: true,
3655					speed: 800,
3656					settings: {
3657						slidesToShow: 1,
3658					},
3659				},
3660			],
3661		});
3662	}
3663
3664	// .photo-list4  photo/list4.php
3665	if ($('.photo-list4').length) {
3666		$('.item1').css('display', 'block');
3667		let num = 2;
3668		$(window).scroll(function () {
3669			//最後一頁scrollTop=body-window,-100是預留空間
3670			let last = $('body').height() - $(window).height() - 100;
3671			if ($(window).scrollTop() >= last) {
3672				$(`.item${num}`).css('display', 'block');
3673				num++;
3674			}
3675		});
3676	}
3677
3678	// about/html_3.php .sectionBlock_aboutUs32
3679	if ($('.sectionBlock_aboutUs32').length) {
3680		$('.sectionBlock_aboutUs32 .dist-item').on('click', function (e) {
3681			// e.stopPropagation();
3682
3683			e.currentTarget.classList.toggle('active');
3684			$(this).find('ul').toggle(300);
3685		});
3686	}
3687	// about/html_3.php .sectionBlock_aboutUs34
3688	if ($('.sectionBlock_aboutUs34').length) {
3689		$('.sectionBlock_aboutUs34 .tabList a:first-child').addClass('active');
3690		$('.sectionBlock_aboutUs34 .imgBox div.tabBox:first-child').addClass(
3691			'active'
3692		);
3693		$('.sectionBlock_aboutUs34 .tabList a').click(function () {
3694			$('.sectionBlock_aboutUs34 .tabList a').removeClass('active');
3695			$(this).addClass('active');
3696			$('.sectionBlock_aboutUs34 .imgBox div.tabBox').removeClass(
3697				'active'
3698			);
3699			$($(this).attr('href')).addClass('active');
3700
3701			if (window.innerWidth > 768) {
3702				$('html,body').animate(
3703					{
3704						scrollTop:
3705							$('.sectionBlock_aboutUs34').offset().top - 100,
3706					},
3707					500
3708				);
3709			} else {
3710				$('html,body').animate(
3711					{
3712						scrollTop:
3713							$('.sectionBlock_aboutUs34 .tabList').offset().top -
3714							80,
3715					},
3716					500
3717				);
3718			}
3719			// console.log('click');
3720		});
3721	}
3722
3723	// about/html_3.php .sectionBlock_aboutUs35
3724	if ($('.sectionBlock_aboutUs35').length) {
3725		$('.text-box .aboutUs35-list').slick({
3726			slidesToShow: 1,
3727			slidesToScroll: 1,
3728			fade: true,
3729			arrows: false,
3730			// adaptiveHeight: true,
3731			asNavFor: '.slider-nav',
3732		});
3733		$('.aboutUs35-nav').slick({
3734			slidesToShow: 2,
3735			slidesToScroll: 1,
3736			asNavFor: '.text-box .slider-list',
3737			dots: true,
3738			arrows: true,
3739			focusOnSelect: true,
3740			prevArrow:
3741				"<div class='slick-arrow slick-prev'><i class='fa fa-angle-left' aria-hidden='true'></i></div>",
3742			nextArrow:
3743				"<div class='slick-arrow slick-next'><i class='fa fa-angle-right' aria-hidden='true'></i></div>",
3744			responsive: [
3745				{
3746					breakpoint: 577,
3747					settings: {
3748						slidesToShow: 1,
3749					},
3750				},
3751			],
3752		});
3753	}
3754
3755	// about/html_3.php .sectionBlock_aboutUs37
3756	if ($('.sectionBlock_aboutUs37').length) {
3757		$('.sectionBlock_aboutUs37 .qa-list-title').click(function () {
3758			$(this).toggleClass('active');
3759			// $(this).siblings().toggleClass('active');
3760			$(this).siblings().toggle(200);
3761		});
3762	}
3763
3764	// about/html_3.php .sectionBlock_aboutUs41
3765	if ($('.sectionBlock_aboutUs41').length) {
3766		$('.sectionBlock_aboutUs41 .pic-box').slick({
3767			slidesToShow: 1,
3768			slidesToScroll: 1,
3769			arrows: false,
3770			autoplay: true,
3771		});
3772
3773		const pageBox = $('.page-box');
3774		const $slick_aboutUs41 = $('.sectionBlock_aboutUs41 .pic-box');
3775
3776		$slick_aboutUs41.on(
3777			'init',
3778			function (event, slick, currentSlide, nextSlide) {
3779				var i = (currentSlide ? currentSlide : 0) + 1;
3780				if (i < 10) {
3781					i = '0' + i;
3782				}
3783
3784				let totalNum = slick.slideCount;
3785
3786				if (totalNum < 10) {
3787					totalNum = '0' + totalNum;
3788				}
3789				$('.sectionBlock_aboutUs41 .page-box .current').html(i);
3790				$('.sectionBlock_aboutUs41 .page-box .all').text(totalNum);
3791			}
3792		);
3793
3794		$slick_aboutUs41.on(
3795			'init reInit afterChange',
3796			function (event, slick, currentSlide, nextSlide) {
3797				var i = (currentSlide ? currentSlide : 0) + 1;
3798				if (i < 10) {
3799					i = '0' + i;
3800				}
3801
3802				let totalNum = slick.slideCount;
3803
3804				if (totalNum < 10) {
3805					totalNum = '0' + totalNum;
3806				}
3807				$('.sectionBlock_aboutUs41 .page-box .current').html(i);
3808				$('.sectionBlock_aboutUs41 .page-box .all').text(totalNum);
3809			}
3810		);
3811	}
3812
3813	if ($('.newsMarquee').length) {
3814		// index data-block="0" .newsMarquee	跑馬燈 S
3815		var run;
3816		var before_w = window.innerWidth;
3817		var before_device = '';
3818		if (before_w >= 1200) {
3819			before_device = 'pc';
3820		} else {
3821			before_device = 'tb';
3822		}
3823
3824		function newsMarquee() {
3825			var w = 0;
3826
3827			$('.newsMarquee .newsMarquee_item').map(function () {
3828				var this_w = parseInt($(this).innerWidth(), 10);
3829				w += parseInt(this_w, 10);
3830			});
3831
3832			var left = 0;
3833			run = setInterval(function () {
3834				left -= 1;
3835				$('.newsMarquee .swiper-wrapper').css('left', left + 'px');
3836				if (left + w <= 0) {
3837					left = 0;
3838				}
3839			}, 20); //控制跑馬燈往左推速度
3840		}
3841		newsMarquee();
3842
3843		function clearRun() {
3844			clearInterval(run);
3845		}
3846
3847		$(window).resize(function () {
3848			var current_w = window.innerWidth;
3849			var current_device = '';
3850
3851			if (current_w >= 1200) {
3852				current_device = 'pc';
3853			} else {
3854				current_device = 'tb';
3855			}
3856
3857			// alert("current_w" + current_w + "before_w" + before_w);
3858			if (current_device != before_device) {
3859				clearRun();
3860				newsMarquee();
3861			}
3862			before_w = current_w;
3863			before_device = current_device;
3864		});
3865	}
3866	// index data-block="0" .newsMarquee	跑馬燈 E
3867
3868	// index .sectionBlock_100 S
3869	if ($('.sectionBlock_100').length) {
3870		letter_run();
3871
3872		// ul_list
3873		li_1 = $(' .ul_list li:nth-child(1)');
3874		li_2 = $(' .ul_list li:nth-child(2)');
3875		li_3 = $(' .ul_list li:nth-child(3)');
3876
3877		scroll_top = $(window).scrollTop();
3878		$(window).scroll(function () {
3879			letter_run();
3880
3881			// ul_list
3882			scroll_top = $(window).scrollTop();
3883			// 當下可視網頁最高點到網頁頂端的距離。
3884			var flag = $('.ul_list').offset().top - $(window).innerHeight();
3885			var end = $('.ul_list').offset().top + $('.ul_list').outerHeight();
3886
3887			// 在ul_list範圍內=>ul_list+.in
3888			// ul_list範圍外=>ul_list移除.in
3889			if (scroll_top > flag && scroll_top < end) {
3890				$('.ul_list').addClass('in');
3891			} else {
3892				$('.ul_list').removeClass('in');
3893			}
3894		});
3895
3896		// ul_list
3897		setAppScroll();
3898		n = 0;
3899		moving = 0;
3900		count_down = 200;
3901
3902		if (scroll_top < li_1.offset().top) {
3903			n = 0;
3904		} else if (
3905			li_1.offset().top <= scroll_top &&
3906			scroll_top < li_2.offset().top
3907		) {
3908			n = 1;
3909		} else if (scroll_top <= li_2.offset().top) {
3910			n = 2;
3911		} else {
3912			n = 3;
3913		}
3914
3915		// ul_list PC一次滑一屏
3916		function setAppScroll() {
3917			count_down = 200;
3918			$(window).mousewheel(function (e) {
3919				// 取得高度
3920				// 230630 - 針對特別header做高度判斷,如:headerStyle04、headerStyle07、headerStyle09。
3921				if ($('header').length) {
3922					if ($('header').hasClass('headerStyle04')) {
3923						var headerScrollH = $(
3924							'header.headerStyle04'
3925						).outerHeight();
3926					} else if ($('header').hasClass('headerStyle07')) {
3927						var headerScrollH = $('.scrollNav').outerHeight();
3928					} else if ($('header').hasClass('headerStyle09')) {
3929						var headerScrollH = $('.scrollNav').outerHeight();
3930					} else {
3931						var headerScrollH = $('header.scroll').outerHeight();
3932					}
3933				}
3934				var headerScrollH_1 = headerScrollH - 1;
3935
3936				if (window.innerWidth > 1199) {
3937					// ul_list li
3938					var appLiH = headerScrollH + 'px';
3939					$('.ul_list li').css('height', `calc(100vh - ${appLiH})`);
3940				}
3941
3942				if (scroll_top < li_1.offset().top && e.deltaY == 1) {
3943					n = 0;
3944				}
3945				// console.log("一開始" + n)
3946
3947				// 判斷啟用3個或2個
3948				if ($('.ul_list li').length == 2) {
3949					// 在ul_list範圍內才執行
3950					if ($('.ul_list').hasClass('in')) {
3951						$('html,body').stop();
3952
3953						if (moving == 0) {
3954							moving = 1;
3955
3956							if (e.deltaY == -1) {
3957								if (n < 2) {
3958									n++;
3959								}
3960							} else {
3961								if (n > 1) {
3962									n--;
3963								}
3964							}
3965						}
3966						var x = window.innerWidth;
3967						if (
3968							n == 2 &&
3969							scroll_top + headerScrollH >= li_2.offset().top &&
3970							e.deltaY == -1
3971						) {
3972							$('.ul_list').removeClass('in');
3973							// console.log(1);
3974
3975							moving = 0;
3976						} else if (
3977							n == 1 &&
3978							scroll_top - headerScrollH <= li_1.offset().top &&
3979							e.deltaY == 1
3980						) {
3981							$('.ul_list').removeClass('in');
3982							// console.log(2)
3983							moving = 0;
3984						} else if (x > 1199 && e.deltaY == -1 && n > 0) {
3985							// settimeout=>避免scroll太敏感
3986							$('html,body').animate(
3987								{
3988									scrollTop:
3989										$(
3990											'.ul_list li:nth-child(' + n + ')'
3991										).offset().top - headerScrollH_1,
3992								},
3993								function () {
3994									moving = 0;
3995									count_down = 200;
3996								}
3997							);
3998						} else if (x > 1199 && e.deltaY == 1) {
3999							moving = 0;
4000						}
4001					}
4002				} else {
4003					// 在ul_list範圍內才執行
4004					if ($('.ul_list').hasClass('in')) {
4005						$('html,body').stop();
4006
4007						if (moving == 0) {
4008							// console.log("moving=0")
4009							moving = 1;
4010
4011							if (e.deltaY == -1) {
4012								if (n < 3) {
4013									n++;
4014									// console.log("n++")
4015								}
4016							} else {
4017								if (n > 1) {
4018									n--;
4019								}
4020							}
4021						}
4022						var x = window.innerWidth;
4023						if (
4024							n == 3 &&
4025							scroll_top + headerScrollH >= li_3.offset().top &&
4026							e.deltaY == -1
4027						) {
4028							$('.ul_list').removeClass('in');
4029							// console.log(1);
4030
4031							moving = 0;
4032						} else if (
4033							n == 1 &&
4034							scroll_top - headerScrollH <= li_1.offset().top &&
4035							e.deltaY == 1
4036						) {
4037							$('.ul_list').removeClass('in');
4038							// console.log(2)
4039							moving = 0;
4040						} else if (x > 1199 && e.deltaY == -1 && n > 0) {
4041							// settimeout=>避免scroll太敏感
4042							// setTimeout(function () {
4043							// if (count_down <= 0) {
4044							$('html,body').animate(
4045								{
4046									scrollTop:
4047										$(
4048											'.ul_list li:nth-child(' + n + ')'
4049										).offset().top - headerScrollH_1,
4050								},
4051								function () {
4052									moving = 0;
4053									count_down = 200;
4054									// console.log("moving")
4055								}
4056							);
4057
4058							// console.log("真正作棟")
4059						} else if (x > 1199 && e.deltaY == 1) {
4060							moving = 0;
4061						}
4062						// console.log(n)
4063						// console.log(moving);
4064						// console.log(e.deltaY + "e.deltaY");
4065						// console.log(n + "n ")
4066						// moving = 0;
4067					}
4068				}
4069			});
4070		}
4071
4072		// 英數字動態
4073		function letter_run() {
4074			$('.ul_list li').map(function () {
4075				var appTop = $(this).offset().top;
4076				var mintar = window.innerHeight * 0.5;
4077				var top = $(window).scrollTop();
4078
4079				if (top + mintar > appTop && !$(this).hasClass('show')) {
4080					var this_li = $(this);
4081
4082					setTimeout(function () {
4083						this_li.addClass('show');
4084					}, 300);
4085
4086					$(this)
4087						.find('.word')
4088						.each(function () {
4089							var this_word = $(this);
4090							var passwords = $(this).data('content');
4091							var characters = [];
4092
4093							var counter = 0;
4094							// 每幾秒換字母
4095							var interval = setInterval(function () {
4096								this_li.addClass('show');
4097								for (i = 0; i < counter; i++) {
4098									characters[i] = passwords.charAt(i);
4099								}
4100								this_word.text(characters.join(''));
4101							}, 200);
4102							var interval_2 = setInterval(function () {
4103								for (i = counter; i < passwords.length; i++) {
4104									characters[i] = Math.random()
4105										.toString(36)
4106										.charAt(2);
4107								}
4108								this_word.text(characters.join(''));
4109							}, 100);
4110
4111							// 動畫跑多久
4112							setTimeout(function () {
4113								setInterval(function () {
4114									counter++;
4115									if (counter > passwords.length + 1) {
4116										clearInterval(interval);
4117										clearInterval(interval_2);
4118									}
4119								}, 300);
4120							}, 500);
4121						});
4122				}
4123			});
4124		}
4125	}
4126	// index .sectionBlock_100 E
4127
4128	// .nav_menu10 下拉單 S
4129	if ($('.nav_menu10').length) {
4130		$('.nav_menu10>li')
4131			.mouseenter(function () {
4132				$('header').addClass('show');
4133				$(this).children('.menu10Inner').addClass('show');
4134			})
4135			.mouseleave(function () {
4136				$('header').removeClass('show');
4137				$(this).children('.menu10Inner').removeClass('show');
4138			});
4139
4140		// 一展開選單的時候,出現第一筆資料
4141		$('header .rightClass').each(function () {
4142			$(this).find('li').eq(0).addClass('rightShow');
4143		});
4144
4145		// (如果有雙層)下拉選單 hover主分類顯示次分類,並收起原本展開的次分類
4146		$('header .listClass > li').on('mouseenter', function () {
4147			$(this).siblings().removeClass('current'); //先移除
4148			$(this).addClass('current'); //再新增
4149			$(this).siblings().children('ul.m2LinkList').removeClass('m2show');
4150			$(this).children('ul.m2LinkList').addClass('m2show');
4151		});
4152		// .mouseleave(function(){
4153		// 				$(this).children('ul.m2LinkList li').removeClass('current');
4154		// });
4155		// 下拉選單 hover次分類顯示右側次分類廣告
4156		$('header .listClass>li .m2LinkList>li').on('mouseenter', function () {
4157			$(this).siblings().removeClass('current');
4158			$(this).addClass('current');
4159			let rightClassId_m1 = $(this).children('a').data('m1id');
4160			let rightClassId_m2 = $(this).children('a').data('m2id');
4161			$(this)
4162				.parents('.listClass')
4163				.siblings('.rightClass')
4164				.find('li')
4165				.removeClass('rightShow');
4166			$(this)
4167				.parents('.listClass')
4168				.siblings('.rightClass')
4169				.find(
4170					'li[data-m1id=' +
4171						rightClassId_m1 +
4172						'][data-m2id=' +
4173						rightClassId_m2 +
4174						']'
4175				)
4176				.addClass('rightShow');
4177		});
4178
4179		// (單層)下拉選單 沒有次分類的時候 hover主分類顯示右側主分類廣告
4180		$('header .listClass.nom2List > li >a').on('mouseenter', function () {
4181			$(this).parent('li').siblings().removeClass('current');
4182			$(this).parent('li').addClass('current');
4183			let rightClassId_m1 = $(this).data('m1id');
4184			$(this)
4185				.parents('.listClass')
4186				.siblings('.rightClass')
4187				.find('li')
4188				.removeClass('rightShow');
4189			$('header .rightClass')
4190				.find('li[data-m1id=' + rightClassId_m1 + ']')
4191				.addClass('rightShow');
4192		});
4193	}
4194	// .nav_menu10 下拉單 E
4195
4196	// sectionBlock_104
4197
4198	if ($('.sectionBlock_104').length) {
4199		$('.sectionBlock_104 .swiper-wrapper').slick({
4200			slidesToShow: 1,
4201			slidesToScroll: 1,
4202			dots: true,
4203			autoplay: true,
4204			autoplaySpeed: 5000,
4205			arrows: false,
4206			focusOnSelect: true,
4207			appendDots: '.sectionBlock_104 .swiper-bar-box',
4208			dotsClass: 'swiper-bar',
4209		});
4210
4211		const windowWidth = window.innerWidth;
4212		let headerHight = 0;
4213
4214		// 抓取 headerHight 高度 & 設置
4215		$(document).ready(function () {
4216			if ($('header').length) {
4217				if ($('header').hasClass('scroll')) {
4218					headerHight = $('header').outerHeight();
4219					// console.log(headerHight);
4220					if (windowWidth > 1199) {
4221						$('.sectionBlock_104').css(
4222							'height',
4223							window.innerHeight - headerHight
4224						);
4225					}
4226				}
4227			}
4228		});
4229
4230		let lastScrollTop = 0,
4231			delta = 5,
4232			animationStart = false;
4233
4234		$(window).scroll(function (e) {
4235			if ($('header').length) {
4236				if ($('header').hasClass('scroll')) {
4237					headerHight = $('header').outerHeight();
4238					// console.log(headerHight);
4239					if (windowWidth > 1199) {
4240						$('.sectionBlock_104').css(
4241							'height',
4242							window.innerHeight - headerHight
4243						);
4244					}
4245				}
4246			}
4247			// console.log('scroll on')
4248			let nowScrollTop = $(window).scrollTop();
4249			let sectionBlock_104_top =
4250				$('.sectionBlock_104').offset().top - headerHight * 1.5;
4251			let sectionBlock_104_overall =
4252				$('.sectionBlock_104').offset().top +
4253				$('.sectionBlock_104').outerHeight();
4254
4255			let distance =
4256				$('.sectionBlock_104').offset().top - $(window).scrollTop();
4257			// console.log('distamce', distamce);
4258
4259			if (
4260				nowScrollTop >= sectionBlock_104_top &&
4261				nowScrollTop <= sectionBlock_104_overall
4262			) {
4263				$('.sectionBlock_104').addClass('inside');
4264			} else {
4265				$('.sectionBlock_104').removeClass('inside');
4266				animationStart = false;
4267			}
4268
4269			if (animationStart) {
4270				$('html,body').stop();
4271			}
4272
4273			if (Math.abs(lastScrollTop - nowScrollTop) >= delta) {
4274				if (nowScrollTop > lastScrollTop) {
4275					// ACTION ON
4276					// SCROLLING DOWN
4277
4278					if ($('.sectionBlock_104').hasClass('inside')) {
4279						$('html,body').stop();
4280					} else {
4281						if (
4282							!animationStart &&
4283							windowWidth > 1199 &&
4284							distance < 450 &&
4285							distance > headerHight
4286						) {
4287							const sectionBlock_104_topSite =
4288								$('.sectionBlock_104').offset().top -
4289								headerHight;
4290							// console.log('animationStart 觸發之前', animationStart)
4291							if (!animationStart) {
4292								// console.log('animationStart 觸發之後', animationStart)
4293								$('html,body').animate(
4294									{
4295										scrollTop: sectionBlock_104_topSite,
4296									},
4297									function () {
4298										console.log('animate Run');
4299										animationStart = true;
4300										$('html,body').stop();
4301
4302										sectionBlock_104_top =
4303											$('.sectionBlock_104').offset()
4304												.top - $(window).innerHeight();
4305									}
4306								);
4307								// console.log('animationStart 執行動畫之後', animationStart)
4308							}
4309						}
4310					}
4311				} else {
4312					// ACTION ON
4313					// SCROLLING UP
4314				}
4315			}
4316			lastScrollTop = nowScrollTop; //更新lastScrollTop 的位置
4317		});
4318	}
4319
4320	// sectionBlock_105
4321	if ($('.sectionBlock_105').length) {
4322		$('.sectionBlock_105 .item-slick-box').slick({
4323			slidesToShow: 1, //預設 1 幻燈片顯示幾張
4324			slidesToScroll: 1, //預設 1 幻灯片每次滑動幾張
4325			arrows: false, // 預設 true 左右箭頭是否顯示
4326			fade: true, // 預設 false 淡入淡出
4327			asNavFor: '.sectionBlock_105 .slick-content',
4328		});
4329
4330		$('.sectionBlock_105 .slick-content').slick({
4331			slidesToShow: 1,
4332			slidesToScroll: 1,
4333			adaptiveHeight: true, //为单个滑动水平转盘启用自适应高度。
4334			asNavFor: '#sectionBlock_105_slick_box',
4335			dots: false, // 預設 false 指示点
4336			arrows: true, // 預設 true 左右箭頭是否顯示
4337			appendArrows: '.sectionBlock_105 .item-box',
4338			prevArrow:
4339				'<div class="item-nav-prev "><span class="arrow"><i class="fa fa-angle-left" aria-hidden="true"></i></span></div>',
4340			nextArrow:
4341				'<div class="item-nav-next "><span class="arrow"><i class="fa fa-angle-right" aria-hidden="true"></i></span></div>',
4342			focusOnSelect: true, // 預設 false
4343		});
4344
4345		const checkSlickCount = function (
4346			event,
4347			slick,
4348			currentSlide,
4349			nextSlide
4350		) {
4351			//currentSlide is undefined on init -- set it to 0 in this case (currentSlide is 0 based)
4352
4353			let i = (currentSlide ? currentSlide : 0) + 1;
4354			$('.sectionBlock_105 .item-information .crrent-page').text(
4355				i.toString().padStart(2, '0')
4356			);
4357			$('.sectionBlock_105 .item-information .total-page').text(
4358				slick.slideCount.toString().padStart(2, '0')
4359			);
4360			// $('.pagingInfo').text(i.toString().padStart(2, "0") + '/' + slick.slideCount).css('color', '#fff');
4361		};
4362
4363		$(document).ready(function () {
4364			$('.sectionBlock_105 .item-slick-box').on(
4365				'init reInit afterChange',
4366				checkSlickCount
4367			);
4368		});
4369	}
4370
4371	// sectionBlock_107
4372	if ($('.sectionBlock_107').length) {
4373		$('.sectionBlock_107 .content-box').slick({
4374			slidesToShow: 2,
4375			slidesToScroll: 1,
4376			adaptiveHeight: true, //为单个滑动水平转盘启用自适应高度。
4377			dots: false, // 預設 false 指示点
4378			arrows: true, // 預設 true 左右箭頭是否顯示
4379			appendArrows: '.button-controls',
4380			prevArrow:
4381				'<div class="item-nav-prev "><i class="fa fa-angle-left" aria-hidden="true"></i></div>',
4382			nextArrow:
4383				'<div class="item-nav-next "><i class="fa fa-angle-right" aria-hidden="true"></i></div>',
4384			focusOnSelect: true, // 預設 false,
4385			responsive: [
4386				{
4387					//add 2024-02-22
4388					breakpoint: 993,
4389					settings: {
4390						appendArrows: '.sectionBlock_107 .content-box',
4391					},
4392				},
4393				{
4394					breakpoint: 576,
4395					settings: {
4396						slidesToShow: 1,
4397						appendArrows: '.sectionBlock_107 .content-box', //add 2024-02-22
4398					},
4399				},
4400			],
4401		});
4402		//add 2024-02-22
4403		let sectionBlock_107picH = $(
4404			'.sectionBlock_107 .content-box img'
4405		).height();
4406		$('.sectionBlock_107 .slick-slider .slick-arrow').css(
4407			'top',
4408			sectionBlock_107picH / 2
4409		);
4410	}
4411
4412	// index .sectionBlock_109 S
4413	if ($('.sectionBlock_109').length) {
4414		$('.sectionBlock_109 .content').each(function () {
4415			var _this = $(this);
4416
4417			var mainImg = new Swiper('.imgSwiper', {
4418				effect: 'fade',
4419				slidesPerView: 1,
4420				spaceBetween: 0,
4421				speed: 600,
4422			});
4423
4424			var mainImg_num;
4425			_this.find('.txtBox .list').hover(
4426				function () {
4427					$(this).addClass('light');
4428					_this.addClass('hover');
4429					mainImg_num = _this.find($('.list')).index($(this));
4430					mainImg.slideTo(mainImg_num);
4431				},
4432				function () {
4433					_this.removeClass('hover');
4434					$(this).removeClass('light');
4435					mainImg.slideTo(0);
4436				}
4437			);
4438		});
4439	}
4440	// index .sectionBlock_109 E
4441
4442	if ($('.sectionBlock_112').length) {
4443		const carouselAreaSwiper = new Swiper('.carousel-area-countainer', {
4444			loop: true, // 循环模式选项
4445			slidesPerView: 4, //设置slider容器能够同时显示的slides数量(carousel模式)
4446			spaceBetween: 40,
4447			// width: 280,
4448
4449			// 如果需要前进后退按钮
4450			navigation: {
4451				nextEl: '.swiper-button-next',
4452				prevEl: '.swiper-button-prev',
4453			},
4454
4455			on: {
4456				beforeInit: function () {
4457					let numOfSlides =
4458						this.wrapperEl.querySelectorAll('.swiper-slide').length;
4459					// console.log(numOfSlides); //總數
4460
4461					$('.count-title .num .num-total').text(numOfSlides);
4462				},
4463			},
4464
4465			// RWD
4466			breakpoints: {
4467				992: {
4468					slidesPerView: 4,
4469					spaceBetween: 100,
4470				},
4471
4472				767: {
4473					width: 540,
4474					slidesPerView: 1,
4475					spaceBetween: 40,
4476				},
4477
4478				576: {
4479					width: 320,
4480					slidesPerView: 1,
4481					spaceBetween: 40,
4482				},
4483			},
4484		});
4485		const carouselTextSwiper = new Swiper('.carousel-text-area-lists', {
4486			loop: true,
4487			noSwiping: true,
4488		});
4489		// console.log(carouselAreaSwiper);
4490
4491		carouselAreaSwiper.on('slideChangeTransitionEnd', function () {
4492			let index_currentSlide = carouselAreaSwiper.realIndex + 1;
4493			let currentSlide = carouselAreaSwiper.slides[index_currentSlide];
4494			// console.log('carouselAreaSwiper', carouselAreaSwiper)
4495			$('.count-title .num .num-current').text(index_currentSlide);
4496			carouselTextSwiper.slideTo(index_currentSlide, 200, false);
4497		});
4498	}
4499	// index .sectionBlock_112 E
4500
4501	if ($('.sectionBlock_115').length) {
4502		const leftBoxList = new Swiper('.left-box-list', {
4503			loop: true, // 循环模式选项
4504			slidesPerView: 1,
4505			autoplay: false,
4506		});
4507	}
4508
4509	// index .sectionBlock_115 E
4510
4511	if ($('.sectionBlock_117').length) {
4512		function sectionBlock_117_onYouTubeIframeAPIReady() {
4513			// console.log('YtPlayer')
4514			var player;
4515			player = new YT.Player('itemsBoxYt', {
4516				videoId: 'a0AyNzV3yk8', // YouTube 影片ID
4517				width: '100%', // 播放器寬度 (px)
4518				height: '100%', // 播放器高度 (px)
4519				playerVars: {
4520					autoplay: 1, // 自動播放影片
4521					controls: 0, // 顯示播放器
4522					showinfo: 0, // 隱藏影片標題
4523					modestbranding: 0, // 隱藏YouTube Logo
4524					loop: 1, // 重覆播放
4525					playlist: 'a0AyNzV3yk8', // 當使用影片要重覆播放時,需再輸入YouTube 影片ID
4526					fs: 0, // 隱藏全螢幕按鈕
4527					cc_load_policty: 0, // 隱藏字幕
4528					iv_load_policy: 3, // 隱藏影片註解
4529					autohide: 0, // 影片播放時,隱藏影片控制列
4530					modestbranding: 1,
4531					showinfo: 0,
4532				},
4533				events: {
4534					onReady: function (e) {
4535						e.target.mute(); //播放時靜音
4536						e.target.playVideo(); //強制播放(手機才會自動播放,但僅限於Android)
4537					},
4538				},
4539				fs: 0,
4540			});
4541		}
4542
4543		$(document).ready(function () {
4544			sectionBlock_117_onYouTubeIframeAPIReady();
4545		});
4546	}
4547	// index .sectionBlock_117 E
4548
4549	if ($('.sectionBlock_118').length) {
4550		if ($(window).innerWidth() < 576) {
4551			$('.sectionBlock_118 .imgs-list').slick({
4552				centerMode: true,
4553				centerPadding: '40px',
4554				arrows: false,
4555				slidesToShow: 1,
4556				slidesToScroll: 1,
4557				dots: true,
4558				swipeToSlide: true,
4559				touchMove: true,
4560				autopaly: true,
4561			});
4562		}
4563	}
4564
4565	if ($('.oneBox-9').length) {
4566		function oneBox_9_onYouTubeIframeAPIReady() {
4567			// console.log('YtPlayer')
4568			var player;
4569			player = new YT.Player('itemsBoxYt', {
4570				videoId: 'ntfEECcZvbU', // YouTube 影片ID
4571				width: '100%', // 播放器寬度 (px)
4572				height: '100%', // 播放器高度 (px)
4573				playerVars: {
4574					autoplay: 1, // 自動播放影片
4575					controls: 0, // 顯示播放器
4576					showinfo: 0, // 隱藏影片標題
4577					modestbranding: 0, // 隱藏YouTube Logo
4578					loop: 1, // 重覆播放
4579					playlist: 'ntfEECcZvbU', // 當使用影片要重覆播放時,需再輸入YouTube 影片ID
4580					fs: 0, // 隱藏全螢幕按鈕
4581					cc_load_policty: 0, // 隱藏字幕
4582					iv_load_policy: 3, // 隱藏影片註解
4583					autohide: 0, // 影片播放時,隱藏影片控制列
4584					modestbranding: 1,
4585					showinfo: 0,
4586				},
4587				events: {
4588					onReady: function (e) {
4589						e.target.mute(); //播放時靜音
4590						e.target.playVideo(); //強制播放(手機才會自動播放,但僅限於Android)
4591					},
4592				},
4593				fs: 0,
4594			});
4595		}
4596
4597		$(document).ready(function () {
4598			oneBox_9_onYouTubeIframeAPIReady();
4599		});
4600	}
4601
4602	// index .sectionBlock_118 E
4603
4604	if ($('.sectionBlock_119').length) {
4605		var swiperBox = new Swiper('.sectionBlock_119 .swiperBox', {
4606			effect: 'coverflow',
4607			loop: true,
4608			grabCursor: true,
4609			centeredSlides: true,
4610			slidesPerView: 'auto',
4611			coverflowEffect: {
4612				rotate: 50,
4613				stretch: 0,
4614				depth: 100,
4615				modifier: 1,
4616				slideShadows: true,
4617			},
4618			navigation: {
4619				nextEl: '.swiper-button-next',
4620				prevEl: '.swiper-button-prev',
4621			},
4622		});
4623
4624		$('.button-prev').click(function () {
4625			$('.swiper-button-prev').click();
4626		});
4627
4628		$('.button-next').click(function () {
4629			$('.swiper-button-next').click();
4630		});
4631	}
4632	// index .sectionBlock_119 E
4633
4634	if ($('.sectionBlock_123').length) {
4635		$('.sectionBlock_123 .rightBlock .list').slick({
4636			slidesToShow: 4,
4637			slidesToScroll: 1,
4638			arrows: false,
4639			autoplay: true,
4640			autoplaySpeed: 2000,
4641			responsive: [
4642				{
4643					breakpoint: 992,
4644					settings: {
4645						slidesToShow: 4,
4646						arrows: false,
4647						dots: false,
4648					},
4649				},
4650				{
4651					breakpoint: 768,
4652					settings: {
4653						slidesToShow: 2,
4654						slidesToScroll: 2,
4655						focusOnSelect: false,
4656						dots: true,
4657					},
4658				},
4659			],
4660		});
4661	}
4662	// index .sectionBlock_123 E
4663
4664	if ($('.bannerStyle13').length) {
4665		// const headerHight = $('header').outerHeight();
4666		// console.log('headerHight', headerHight)
4667		// $('.bannerStyle13').css({
4668		// 	'height': `calc(100vh - ${headerHight})`
4669		// })
4670	}
4671
4672	// .nav_menu14 下拉單 S
4673	if ($('.nav_menu14 .multiMenu').length) {
4674		$('a.menuTitle').on('click', function () {
4675			$(this).siblings('ul').slideToggle(500);
4676		});
4677		$('.multiMenu li.moreMenu a').on('click', function () {
4678			$(this).siblings('ul').slideToggle(500);
4679		});
4680	}
4681	// .nav_menu14 下拉單 S
4682
4683	// fourBox-27-5
4684
4685	if ($('.fourBox-27-5').length) {
4686		var mySwiper = new Swiper('.fourBox-27-5-swiper-container', {
4687			loop: true,
4688			// autoplay: {
4689			// 	delay: 5000,
4690			// 	disableOnInteraction: false,
4691			// },
4692			slidesPerView: 3, // 指定每次滑動顯示的幻燈片數量
4693			spaceBetween: 30, // 幻燈片之間的間距(可選)
4694			autoplay: true,
4695			centeredSlides: true,
4696			// 如果需要前进后退按钮
4697			navigation: {
4698				nextEl: '.fourBox-27-5 .swiper-button-next',
4699				prevEl: '.fourBox-27-5 .swiper-button-prev',
4700			},
4701			breakpoints: {
4702				992: {
4703					slidesPerView: 3,
4704					spaceBetween: 30,
4705				},
4706				576: {
4707					slidesPerView: 1,
4708					initialSlide: 1,
4709				},
4710			},
4711		});
4712	}
4713
4714	// twoBox_2-17-7
4715
4716	if ($('.twoBox_2-17-7').length) {
4717		lightGallery(document.getElementById('twoBox_2_17_7_box'), {
4718			plugins: [lgZoom, lgThumbnail],
4719			thumbnail: true,
4720			download: false,
4721			licenseKey: 'C5624219-A911-4F28-8B7A-7E1B3D07A814',
4722		});
4723	}
4724
4725	// twoBox_2-17-8
4726
4727	if ($('.twoBox_2-17-8').length) {
4728		lightGallery(document.getElementById('twoBox_2_17_8_box'), {
4729			plugins: [lgZoom, lgThumbnail],
4730			thumbnail: true,
4731			download: false,
4732			licenseKey: 'C5624219-A911-4F28-8B7A-7E1B3D07A814',
4733		});
4734	}
4735
4736	if ($('.carouselBox-1').length) {
4737		$('.carouselBox-1 .image-slider').slick({
4738			slidesToShow: 1, //預設 1 幻燈片顯示幾張
4739			slidesToScroll: 1, //預設 1 幻灯片每次滑動幾張
4740			arrows: true, // 預設 true 左右箭頭是否顯示
4741			fade: true, // 預設 false 淡入淡出
4742			asNavFor: '.carouselBox-1 .text-slider',
4743			prevArrow:
4744				'<div class="item-nav-prev "><span class="arrow"><i class="fa fa-angle-left" aria-hidden="true"></i></span></div>',
4745			nextArrow:
4746				'<div class="item-nav-next "><span class="arrow"><i class="fa fa-angle-right" aria-hidden="true"></i></span></div>',
4747		});
4748
4749		$('.carouselBox-1 .text-slider').slick({
4750			slidesToShow: 1,
4751			slidesToScroll: 1,
4752			adaptiveHeight: true, //为单个滑动水平转盘启用自适应高度。
4753			asNavFor: '.carouselBox-1 .image-slider',
4754			dots: false, // 預設 false 指示点
4755			arrows: true, // 預設 true 左右箭頭是否顯示
4756			appendArrows: '.carouselBox-1 .control-box',
4757			prevArrow:
4758				'<div class="item-nav-prev "><span class="arrow"><i class="fa fa-angle-left" aria-hidden="true"></i></span></div>',
4759			nextArrow:
4760				'<div class="item-nav-next "><span class="arrow"><i class="fa fa-angle-right" aria-hidden="true"></i></span></div>',
4761			focusOnSelect: true, // 預設 false
4762		});
4763
4764		const checkSlickCount = function (
4765			event,
4766			slick,
4767			currentSlide,
4768			nextSlide
4769		) {
4770			//currentSlide is undefined on init -- set it to 0 in this case (currentSlide is 0 based)
4771
4772			let i = (currentSlide ? currentSlide : 0) + 1;
4773			$('.carouselBox-1 .item-information .crrent-item').text(
4774				i.toString()
4775			);
4776			$('.carouselBox-1 .item-information .total-item').text(
4777				slick.slideCount.toString()
4778			);
4779			// $('.pagingInfo').text(i.toString().padStart(2, "0") + '/' + slick.slideCount).css('color', '#fff');
4780		};
4781
4782		$(document).ready(function () {
4783			$('.carouselBox-1 .image-slider').on(
4784				'init reInit afterChange',
4785				checkSlickCount
4786			);
4787		});
4788	}
4789
4790	if ($('.carouselBox-1-5').length) {
4791		$('.carouselBox-1-5 .image-slider').slick({
4792			slidesToShow: 1, //預設 1 幻燈片顯示幾張
4793			slidesToScroll: 1, //預設 1 幻灯片每次滑動幾張
4794			arrows: true, // 預設 true 左右箭頭是否顯示
4795			fade: false, // 預設 false 淡入淡出
4796			adaptiveHeight: false,
4797			asNavFor:
4798				'.carouselBox-1-5 .text-slider,.carouselBox-1-5 .items-list',
4799			prevArrow:
4800				'<div class="item-nav-prev "><span class="arrow"><i class="fa fa-angle-left" aria-hidden="true"></i></span></div>',
4801			nextArrow:
4802				'<div class="item-nav-next "><span class="arrow"><i class="fa fa-angle-right" aria-hidden="true"></i></span></div>',
4803		});
4804
4805		$('.carouselBox-1-5 .text-slider').slick({
4806			slidesToShow: 1,
4807			slidesToScroll: 1,
4808			adaptiveHeight: false, //为单个滑动水平转盘启用自适应高度。
4809			asNavFor:
4810				'.carouselBox-1-5 .image-slider,.carouselBox-1-5 .items-list',
4811			dots: false, // 預設 false 指示点
4812			arrows: false, // 預設 true 左右箭頭是否顯示
4813			focusOnSelect: true, // 預設 false
4814
4815			responsive: [
4816				{
4817					breakpoint: 576,
4818					settings: {
4819						adaptiveHeight: true,
4820					},
4821				},
4822			],
4823		});
4824
4825		$('.carouselBox-1-5 .items-list').slick({
4826			slidesToShow: 3,
4827			slidesToScroll: 1,
4828			adaptiveHeight: true, //为单个滑动水平转盘启用自适应高度。
4829			asNavFor:
4830				'.carouselBox-1-5 .image-slider,.carouselBox-1-5 .text-slider',
4831			dots: false, // 預設 false 指示点
4832			arrows: false, // 預設 true 左右箭頭是否顯示
4833			focusOnSelect: true, // 預設 false
4834			variableWidth: true,
4835		});
4836
4837		const checkSlickCount = function (
4838			event,
4839			slick,
4840			currentSlide,
4841			nextSlide
4842		) {
4843			//currentSlide is undefined on init -- set it to 0 in this case (currentSlide is 0 based)
4844
4845			let i = (currentSlide ? currentSlide : 0) + 1;
4846			$('.carouselBox-1-5 .item-information .crrent-item').text(
4847				i.toString()
4848			);
4849			$('.carouselBox-1-5 .item-information .total-item').text(
4850				slick.slideCount.toString()
4851			);
4852			// $('.pagingInfo').text(i.toString().padStart(2, "0") + '/' + slick.slideCount).css('color', '#fff');
4853		};
4854
4855		$(document).ready(function () {
4856			$('.carouselBox-1-5 .image-slider').on(
4857				'init reInit afterChange',
4858				checkSlickCount
4859			);
4860		});
4861	}
4862
4863	// hoverEffect8 翻動特效	S
4864	if ($('.hoverEffect8').length) {
4865		$('.hoverEffect8').on('mouseover', '.imgBox', function () {
4866			$('.hoverEffect8').removeClass('show');
4867			$(this).parents('.hoverEffect8').addClass('show');
4868		});
4869
4870		$('.hoverEffect8').on('mouseover', '.cardAfter', function () {
4871			$(this).parents('.hoverEffect8').addClass('show');
4872		});
4873
4874		$('.hoverEffect8').on('mouseout', '.cardAfter', function () {
4875			$('.hoverEffect8').removeClass('show');
4876		});
4877	}
4878	// hoverEffect8 翻動特效	E
4879
4880	// 2023-11-27 #474 日期不可選後面日期	S
4881	if ($('#datepicker').length) {
4882		var i18n = {
4883			// 中文化
4884			previousMonth: '上個月',
4885			nextMonth: '下個月',
4886			months: [
4887				'一月',
4888				'二月',
4889				'三月',
4890				'四月',
4891				'五月',
4892				'六月',
4893				'七月',
4894				'八月',
4895				'九月',
4896				'十月',
4897				'十一月',
4898				'十二月',
4899			],
4900			weekdays: ['週日', '週一', '週二', '週三', '週四', '週五', '週六'],
4901			weekdaysShort: ['日', '一', '二', '三', '四', '五', '六'],
4902		};
4903		var today = new Date();
4904		var datepicker = new Pikaday({
4905			field: jQuery('#datepicker')[0],
4906			yearRange: 80,  //年份範圍
4907			maxDate: today,
4908			i18n: i18n,
4909			toString: function (date) {
4910				var parts = [
4911					date.getFullYear(),
4912					('0' + (date.getMonth() + 1)).slice(-2),
4913					('0' + date.getDate()).slice(-2),
4914				];
4915				return parts.join('/');
4916			},
4917		});
4918	}
4919	// 2023-11-27 #474 日期不可選後面日期	E
4920
4921	// 2023-11-28 #484 表格提示	S
4922	if ($('.js-scrollable').length) {
4923		new ScrollHint('.js-scrollable', {
4924			scrollHintIconAppendClass: 'scroll-hint-icon-white',
4925			i18n: {
4926				scrollable: '可滾動的',
4927			},
4928		});
4929	}
4930	// 2023-11-28 #484 表格提示	E
4931
4932	// 2023-12-18 #518 .anm	S
4933	// enable the plugin
4934	anm.on();
4935
4936	if ($('.anmBox').length) {
4937		$('.anmBox').mouseenter(function () {
4938			$(this).find('.anm.mouse-out').removeClass('mouse-out');
4939		});
4940		$('.anmBox').mouseleave(function () {
4941			$(this).find('.anm').addClass('mouse-out');
4942		});
4943	}
4944	// 2023-12-18 #518 .anm	E
4945
4946	// 2023-12-18 #518 .fourBox-27-6	S
4947	$('.fourBox-27-6 .areaSlide').slick({
4948		slidesToShow: 2,
4949		autoplay: true,
4950		autoplaySpeed: 3000, //輪播秒數設定
4951		infinite: true,
4952		speed: 800,
4953		prevArrow:
4954			'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
4955		nextArrow: false,
4956		responsive: [
4957			{
4958				breakpoint: 1200,
4959				settings: {
4960					slidesToShow: 1,
4961				},
4962			},
4963		],
4964	});
4965	// 2023-12-18 #518 .fourBox-27-6	E
4966
4967	// .carouselBox-2	S
4968	if ($('.carouselBox-2').length) {
4969		$('.carouselBox-2 .listSlide').slick({
4970			slidesToShow: 3,
4971			slidesToScroll: 1,
4972			asNavFor: '.carouselBox-2 .imgSlide,.carouselBox-2 .textSlide',
4973			arrows: false,
4974			focusOnSelect: true, // 預設 false
4975			verticalSwiping: true, //垂直
4976			vertical: true, //垂直滑動
4977		});
4978
4979		$('.carouselBox-2 .textSlide').slick({
4980			slidesToShow: 1,
4981			slidesToScroll: 1,
4982			asNavFor: '.carouselBox-2 .imgSlide,.carouselBox-2 .listSlide',
4983			arrows: false,
4984			verticalSwiping: true, //垂直
4985			vertical: true, //垂直滑動
4986			adaptiveHeight: true,
4987			swipe: false,
4988		});
4989		let textSlideH = $('.carouselBox-2 .textSlide .slick-list').height();
4990		$('.carouselBox-2 .textSlide .slick-slide').css('height', textSlideH);
4991
4992		$('.carouselBox-2 .imgSlide').slick({
4993			slidesToShow: 1,
4994			slidesToScroll: 1,
4995			asNavFor: '.carouselBox-2 .textSlide,.carouselBox-2 .listSlide',
4996			arrows: false,
4997			verticalSwiping: true, //垂直
4998			vertical: true, //垂直滑動
4999			swipe: false,
5000		});
5001	}
5002	// .carouselBox-2	E
5003
5004	// .carouselBox-3	S
5005	if ($('.carouselBox-3').length) {
5006		$('.carouselBox-3 .navbarSlide').slick({
5007			slidesToShow: 6,
5008			slidesToScroll: 1,
5009			asNavFor: '.carouselBox-3 .contentSlide',
5010			arrows: false,
5011			focusOnSelect: true, // 預設 false
5012			responsive: [
5013				{
5014					breakpoint: 992,
5015					settings: {
5016						slidesToShow: 4,
5017						slidesToScroll: 1,
5018					},
5019				},
5020				{
5021					breakpoint: 521,
5022					settings: {
5023						slidesToShow: 2,
5024						slidesToScroll: 1,
5025					},
5026				},
5027			],
5028		});
5029
5030		$('.carouselBox-3 .contentSlide').slick({
5031			slidesToShow: 1,
5032			slidesToScroll: 1,
5033			speed: 1000,
5034			asNavFor: '.carouselBox-3 .navbarSlide',
5035			prevArrow:
5036				'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
5037			nextArrow:
5038				'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
5039		});
5040
5041		if (window.innerWidth <= 991) {
5042			let picH = $('.carouselBox-3 .pic').height();
5043			$('.carouselBox-3 .slick-slider .slick-arrow').css('top', picH / 2);
5044		}
5045	}
5046	// .carouselBox-3	E
5047
5048	// .carouselBox-4	S
5049	if ($('.carouselBox-4').length) {
5050		$('.carouselBox-4 .navbarSlide').slick({
5051			slidesToShow: 4,
5052			slidesToScroll: 1,
5053			asNavFor: '.carouselBox-4 .contentSlide',
5054			arrows: false,
5055			focusOnSelect: true, // 預設 false
5056		});
5057
5058		$('.carouselBox-4 .contentSlide').slick({
5059			slidesToShow: 1,
5060			slidesToScroll: 1,
5061			asNavFor: '.carouselBox-4 .navbarSlide',
5062			prevArrow: '<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
5063			nextArrow: '<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
5064			infinite: false,
5065			fade: true,
5066		});
5067
5068		let picH = $('.carouselBox-4 .pic').height();
5069		$('.carouselBox-4 .slick-slider .slick-arrow')
5070			.css('top', picH / 2)
5071	}
5072	// .carouselBox-4	E
5073
5074	// .carouselBox-5	S
5075	if ($('.carouselBox-5').length) {
5076		$('.carouselBox-5 .slideBox').slick({
5077			slidesToShow: 2,
5078			slidesToScroll: 1,
5079			centerMode: true,
5080			centerPadding: '17.7%',
5081			dots: true,
5082			prevArrow:
5083				'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
5084			nextArrow:
5085				'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
5086			responsive: [
5087				{
5088					breakpoint: 992,
5089					settings: {
5090						slidesToShow: 1,
5091					},
5092				},
5093				{
5094					breakpoint: 769,
5095					settings: {
5096						slidesToShow: 1,
5097						arrows: false,
5098					},
5099				},
5100			],
5101		});
5102
5103		let picH = $('.carouselBox-5 .pic').height();
5104		$('.carouselBox-5 .slick-slider .slick-arrow').css('top', picH / 2);
5105	}
5106	// .carouselBox-5	E
5107
5108	if ($('.carouselBox-6').length) {
5109		$('.carouselBox-6 .image-slider').slick({
5110			slidesToShow: 1, //預設 1 幻燈片顯示幾張
5111			slidesToScroll: 1, //預設 1 幻灯片每次滑動幾張
5112			arrows: false, // 預設 true 左右箭頭是否顯示
5113			fade: true, // 預設 false 淡入淡出
5114			adaptiveHeight: false,
5115			asNavFor: '.carouselBox-6 .items-list',
5116			prevArrow:
5117				'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
5118			nextArrow:
5119				'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
5120			responsive: [
5121				{
5122					breakpoint: 576,
5123					settings: {
5124						arrows: true,
5125						// variableWidth:true,
5126						adaptiveHeight: true,
5127					},
5128				},
5129			],
5130		});
5131
5132		$('.carouselBox-6 .items-list').slick({
5133			slidesToShow: 5,
5134			slidesToScroll: 1,
5135			adaptiveHeight: true, //为单个滑动水平转盘启用自适应高度。
5136			asNavFor: '.carouselBox-6 .image-slider',
5137			dots: false, // 預設 false 指示点
5138			arrows: false, // 預設 true 左右箭頭是否顯示
5139			focusOnSelect: true, // 預設 false
5140			variableWidth: false,
5141			vertical: true,
5142			
5143		});
5144	}
5145
5146	// .carouselBox-6	E
5147
5148	if ($('.carouselBox-7').length) {
5149		$('.carouselBox-7 .tab-control .tab-content-item').eq(0).show();
5150		$('.carouselBox-7 .tab').find('a').eq(0).addClass('active');
5151
5152		$('.carouselBox-7 .tab')
5153			.find('a')
5154			.on('click', function () {
5155				var obj = $(this).attr('href');
5156				// console.log(obj);
5157				$(this).addClass('active').siblings().removeClass('active');
5158				$(`#${obj}`).fadeIn().siblings().hide();
5159				return false;
5160			});
5161
5162		// mtab open
5163		$('.mTabBox > .main').on('click', function () {
5164			$('.carouselBox-7 .mTabBox').toggleClass('open');
5165		});
5166
5167		$('.carouselBox-7 .mTabBox')
5168			.find('a')
5169			.on('click', function () {
5170				var obj = $(this).attr('href');
5171				var txt = $(this).text();
5172				$(this).addClass('active').siblings().removeClass('active');
5173				$(`#${obj}`).fadeIn().siblings().hide();
5174				$('.mTabBox').toggleClass('open');
5175				$('.mTabBox > .main').text(txt);
5176				return false;
5177			});
5178	}
5179	// .carouselBox-7	E
5180
5181	// .blockTitleStyle07 S 改用aos.js滾動方式
5182	// if ($('.blockTitleStyle07').length) {
5183	// 	$(window).scroll(function () {
5184	// 		var titRH = $('.blockTitleStyle07').offset().top;
5185	// 		var titH = $('.blockTitleStyle07').outerHeight();
5186	// 		if ($(window).scrollTop() > titRH - titH * 6) {
5187	// 			$('.blockTitleStyle07').addClass('in');
5188	// 		} else {
5189	// 			$('.blockTitleStyle07').removeClass('in');
5190	// 		}
5191	// 	});
5192	// }
5193	// .blockTitleStyle07 E
5194
5195	// .twoBox_1-5_1	S
5196	if ($('.twoBox_1-5_1').length) {
5197		$('.twoBox_1-5_1 .slideBox').slick({
5198			slidesToShow: 1,
5199			slidesToScroll: 1,
5200			prevArrow:
5201				'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
5202			nextArrow:
5203				'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
5204			appendArrows: '.twoBox_1-5_1 .arrowBox',
5205			autoplay: true,
5206			autoplaySpeed: 4000,
5207			dots: true,
5208		});
5209	}
5210	// .twoBox_1-5_1	E
5211
5212	if ($('.twoBox_1-42-5').length) {
5213		$('.twoBox_1-42-5 .top-menu li').each(function () {
5214			$(this).hover(function () {
5215				$(this).parent().find('a').removeClass('active');
5216				$(this).children('a').addClass('active');
5217				const showNew = $(this).children('a').attr('data-news');
5218				$('.main-news .item').each(function () {
5219					$(this).css('display', 'none');
5220				});
5221				$(`.${showNew}`).css('display', 'block');
5222			});
5223		});
5224	}
5225
5226	// .twoBox_1-42-5	E
5227
5228	// .threeBox-28	S
5229	if ($('.threeBox-28').length) {
5230		$('.threeBox-28 .slideBox').slick({
5231			slidesToShow: 3,
5232			slidesToScroll: 3,
5233			prevArrow:
5234				'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
5235			nextArrow:
5236				'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
5237			responsive: [
5238				{
5239					breakpoint: 993,
5240					settings: {
5241						slidesToShow: 2,
5242						slidesToScroll: 2,
5243					},
5244				},
5245				{
5246					breakpoint: 577,
5247					settings: {
5248						slidesToShow: 1,
5249						slidesToScroll: 1,
5250					},
5251				},
5252			],
5253		});
5254	}
5255	// .threeBox-28	E
5256
5257	// .threeBox-29	S
5258	if ($('.threeBox-29').length) {
5259		$('.threeBox-29 .slideBox').slick({
5260			slidesToShow: 3,
5261			slidesToScroll: 3,
5262			prevArrow:
5263				'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
5264			nextArrow:
5265				'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
5266			appendArrows: '.threeBox-29 .arrowBox',
5267			// autoplay: true,
5268			// autoplaySpeed: 4000,
5269			dots: true,
5270			infinite: false,
5271			responsive: [
5272				{
5273					breakpoint: 992,
5274					settings: {
5275						slidesToShow: 2,
5276						slidesToScroll: 2,
5277					},
5278				},
5279				{
5280					breakpoint: 577,
5281					settings: {
5282						slidesToShow: 1,
5283						slidesToScroll: 1,
5284						infinite: true,
5285					},
5286				},
5287			],
5288		});
5289	}
5290	// .threeBox-29	E
5291
5292	// .threeBox-30	S
5293
5294	if ($('.threeBox-30').length) {
5295		$('.threeBox-30-box').slick({
5296			slidesToShow: 3,
5297			slidesToScroll: 1,
5298			prevArrow:
5299				'<button class="slick-prev slick-arrow"><i class="fa fa-arrow-left"></i></button>',
5300			nextArrow:
5301				'<button class="slick-next slick-arrow"><i class="fa fa-arrow-right"></i></button>',
5302			autoplay: false,
5303			autoplaySpeed: 3000,
5304			responsive: [
5305				{
5306					breakpoint: 992,
5307					settings: {
5308						slidesToShow: 2,
5309						button: true,
5310					},
5311				},
5312
5313				{
5314					breakpoint: 576,
5315					settings: {
5316						slidesToShow: 1,
5317						button: true,
5318					},
5319				},
5320			],
5321		});
5322
5323		// 螢幕寬度大於992
5324		if ($(window).innerWidth() > 992) {
5325			$('.threeBox-30-box a').each(function () {
5326				$(this).hover(function () {
5327					$('.threeBox-30-box a').each(function () {
5328						$(this).removeClass('active');
5329					});
5330					$(this).addClass('active');
5331				});
5332			});
5333		}
5334
5335		if ($(window).innerWidth() < 992) {
5336			$('.threeBox-30-box a').each(function () {
5337				$(this).removeClass('active');
5338			});
5339		}
5340
5341		// 按鈕控制
5342		const leftBtn = $('.threeBox-30 .slick-prev');
5343		const rightBtn = $('.threeBox-30 .slick-next');
5344
5345		if (leftBtn.length) {
5346			$('.threeBox-30 .arrow-box .left-box').click(function () {
5347				leftBtn.trigger('click');
5348			});
5349		}
5350
5351		if (rightBtn.length) {
5352			$('.threeBox-30 .arrow-box .right-box').click(function () {
5353				rightBtn.trigger('click');
5354			});
5355		}
5356	}
5357
5358	// .threeBox-30	E
5359
5360	if ($('.threeBox-31').length) {
5361		if ($(window).innerWidth() <= 992 && $(window).innerWidth() > 576) {
5362			$('.threeBox-31 .content-box .carousel-box').slick({
5363				slidesToShow: 3,
5364				slidesToScroll: 1,
5365				arrows: false,
5366				dots: false,
5367				autoplay: false,
5368				autoplaySpeed: 3000,
5369				adaptiveHeight: true,
5370				responsive: [
5371					{
5372						breakpoint: 992,
5373						settings: {
5374							slidesToShow: 2,
5375							arrows: false,
5376							dots: false,
5377							adaptiveHeight: true,
5378						},
5379					},
5380				],
5381			});
5382		}
5383	}
5384
5385	// .threeBox-31	E
5386
5387	// .special-17	S
5388	if ($('.special-17').length) {
5389		lightGallery(document.getElementById('photoArea'), {
5390			plugins: [lgZoom, lgThumbnail],
5391			thumbnail: true,
5392			download: false,
5393		});
5394	}
5395	// .special-17	E
5396
5397	// .twoBox_2-41	S
5398	if ($('.twoBox_2-41').length) {
5399		$('.twoBox_2-41 .slideBox').on(
5400			'init reInit afterChange',
5401			function (event, slick, currentSlide) {
5402				var i = (currentSlide ? currentSlide : 0) + 1;
5403				var num = '';
5404				if (i < 10) {
5405					num = '0' + i;
5406				} else {
5407					num = i;
5408				}
5409				$('.twoBox_2-41 .currentNum').text(num);
5410				$('.twoBox_2-41 .totalNum').text(
5411					slick.slideCount < 10
5412						? '0' + slick.slideCount
5413						: slick.slideCount
5414				);
5415			}
5416		);
5417
5418		$('.twoBox_2-41 .slideBox').slick({
5419			slidesToShow: 3,
5420			slidesToScroll: 1,
5421			vertical: true,
5422			verticalSwiping: true,
5423			cssEase: 'ease-in-out',
5424			prevArrow:
5425				'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
5426			nextArrow:
5427				'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
5428			appendArrows: '.twoBox_2-41 .arrowBox',
5429			responsive: [
5430				{
5431					breakpoint: 992,
5432					settings: {
5433						slidesToShow: 2,
5434					},
5435				},
5436			],
5437		});
5438	}
5439	// .twoBox_2-41	E
5440
5441	if ($('.twoBox_2-42').length) {
5442		$('.twoBox_2-42 .carousel-list').slick({
5443			centerMode: true,
5444			infinite: true,
5445			slidesToShow: 1,
5446			slidesToScroll: 1,
5447			variableWidth: true,
5448			arrows: true,
5449			autopaly: true,
5450			autoplaySpeed: 5000,
5451			dots: false,
5452			dotsClass: 'slick-dots-bottom',
5453			// customPaging: function (slider, i) {
5454			// 	return
5455			// },
5456			prevArrow:
5457				'<button class="slick-prev slick-btn"><i class="fa fa-angle-left" aria-hidden="true"></i></button>',
5458			nextArrow:
5459				'<button class="slick-next slick-btn"><i class="fa fa-angle-right" aria-hidden="true"></i></button>',
5460			autoplay: false,
5461
5462			cssEase: 'cubic-bezier(0.645, 0.045, 0.355, 1)',
5463		});
5464	}
5465
5466	// .twoBox_2-42	E
5467
5468	if ($('.twoBox_2-47').length) {
5469		$('.twoBox_2-47 .lists-box li').each(function () {
5470			$(this).hover(function () {
5471				// 去除css
5472				$('.img-boxs-lists .imgBox').each(function () {
5473					$(this).removeClass('active');
5474				});
5475
5476				const showImg = $(this).children('a').attr('data-img');
5477				console.log(showImg);
5478
5479				$(`.twoBox_2-47 .img-boxs-lists .${showImg}`).addClass(
5480					'active'
5481				);
5482			});
5483		});
5484	}
5485
5486	// .twoBox_2-47	E
5487
5488	// 2024-01-22 #1233 輸入密碼處增加眼睛功能 S
5489	if ($('.passwordEyeBox').length) {
5490		$('.passwordEyeBox .passwordEye').click(function () {
5491			$(this).toggleClass('fa-eye');
5492			$(this).toggleClass('fa-eye-slash');
5493
5494			let i = $('.passwordEyeBox input');
5495			if (i.attr('type') == 'password') {
5496				i.attr('type', 'text');
5497			} else {
5498				i.attr('type', 'password');
5499			}
5500		});
5501	}
5502
5503	if ($('.passwordEyeAgainBox').length) {
5504		$('.passwordEyeAgainBox .passwordEye').click(function () {
5505			$(this).toggleClass('fa-eye');
5506			$(this).toggleClass('fa-eye-slash');
5507
5508			let i = $('.passwordEyeAgainBox input');
5509			if (i.attr('type') == 'password') {
5510				i.attr('type', 'text');
5511			} else {
5512				i.attr('type', 'password');
5513			}
5514		});
5515	}
5516	// 2024-01-22 #1233 輸入密碼處增加眼睛功能 E
5517
5518	// 2024-01-23 #1263 .sideBtn S
5519	if ($('.sideBtn').length) {
5520		$('.sideBtn label').each(function () {
5521			var $sideTarget = $($(this).attr('data-target'));
5522			var $this = $(this);
5523			// console.log($sideTarget.offset().top);
5524
5525			$(window).on('scroll', function () {
5526				var activeRule =
5527					$sideTarget.offset().top -
5528					$(window).scrollTop() -
5529					$(window).height() * 0.7;
5530				if (activeRule < 0) {
5531					$('.sideBtn label').removeClass('current');
5532					$this.addClass('current');
5533				}
5534			});
5535		});
5536
5537		$('.sideBtn label').click(function () {
5538			var gotoTarget = $($(this).attr('data-target')).offset().top - 120;
5539			$('html,body').animate(
5540				{
5541					scrollTop: gotoTarget,
5542				},
5543				500
5544			);
5545		});
5546	}
5547	// 2024-01-23 #1263 .sideBtn E
5548
5549
5550	// .twoBox_2-49-1 S
5551	if ($('.twoBox_2-49-1').length) {
5552		$('.twoBox_2-49-1 .slideBox').slick({
5553			slidesToShow: 6,
5554			slidesToScroll: 1,
5555			dots: false,
5556			arrows: false, 
5557			infinite: true,
5558			autoplay: true,
5559			autoplaySpeed: 0,
5560			speed: 12000,
5561			cssEase: 'linear',
5562			draggable: false,
5563   responsive: [
5564    {
5565     breakpoint: 1500,
5566     settings: {
5567      slidesToShow: 5,
5568     },
5569    },
5570    {
5571     breakpoint: 1200,
5572     settings: {
5573      slidesToShow: 4,
5574     },
5575    },
5576    {
5577     breakpoint: 576,
5578     settings: {
5579      slidesToShow: 3,
5580     },
5581    },
5582   ],
5583		});
5584	}
5585	// .twoBox_2-49-1 E
5586	
5587
5588	// .carouselBox-8	S
5589	if ($('.carouselBox-8').length) {
5590		$('.carouselBox-8 .navbarSlide').slick({
5591			slidesToShow: 4,
5592			slidesToScroll: 1,
5593			asNavFor:	'.carouselBox-8 .contentSlide',
5594			arrows: false, 
5595			focusOnSelect: true, // 預設 false
5596		});
5597		
5598		$('.carouselBox-8 .contentSlide').slick({
5599			slidesToShow: 1,
5600			slidesToScroll: 1,
5601			asNavFor: '.carouselBox-8 .navbarSlide',
5602			arrows: false, 
5603			speed: 300,
5604			fade: true,
5605			autoplay: true,
5606			autoplaySpeed: 5000,
5607   responsive: [
5608    {
5609     breakpoint: 1025,
5610     settings: {
5611						dots: true,
5612     },
5613    },
5614   ],
5615		});
5616	}
5617	// .carouselBox-8	E
5618	
5619
5620	// .fourBox-2-2	S
5621	if ($('.fourBox-2-2').length) {
5622		$('.fourBox-2-2 .navbarSlide').slick({
5623			slidesToShow: 4,
5624			slidesToScroll: 1,
5625			asNavFor:	'.fourBox-2-2 .contentSlide',
5626			arrows: false, 
5627			focusOnSelect: true, // 預設 false
5628		});
5629		
5630		$('.fourBox-2-2 .contentSlide').slick({
5631			slidesToShow: 1,
5632			slidesToScroll: 1,
5633			asNavFor: '.fourBox-2-2 .navbarSlide',
5634			arrows: false, 
5635			speed: 1000,
5636			autoplay: true,
5637			autoplaySpeed: 3000,
5638   responsive: [
5639    {
5640     breakpoint: 601,
5641     settings: 'unslick',
5642    },
5643   ],
5644		});
5645	}
5646	// .fourBox-2-2	E
5647
5648
5649	// .special-18 S
5650	if ($('.special-18').length) {
5651		let move = 0;
5652		if (window.innerWidth >= 1200) {
5653			move = -178+'px';
5654		} else {
5655			move = -380+'px';
5656		}
5657
5658		$('.special-18 .leftBtn').hide();
5659		// 按rightBtn後滑動設定
5660		$('.special-18 .rightBtn').on('click',function () {
5661			$('.special-18_pc .left').css('transform',`translateX(${move})`);
5662			$('.special-18_pc .right').css('transform',`translateX(${move})`);
5663			$('.special-18_pc .line').css('transform',`translateX(${move})`);
5664			$('.special-18_pc .leftBottomImg').css('transform',`translateX(${move})`);
5665			$(this).hide();
5666			$('.special-18 .leftBtn').show();
5667		});
5668
5669		// 按leftBtn後滑動設定
5670		$('.special-18 .leftBtn').on('click',function () {
5671			$('.special-18_pc .left').css('transform',`translateX(0px)`);
5672			$('.special-18_pc .right').css('transform',`translateX(0px)`);
5673			$('.special-18_pc .line').css('transform',`translateX(0px)`);
5674			$('.special-18_pc .leftBottomImg').css('transform',`translateX(0px)`);
5675			$(this).hide();
5676			$('.special-18 .rightBtn').show();
5677		});
5678
5679		// .special-18_mb
5680		$('.special-18_mb .areaSlide').on('init reInit afterChange', function (event, slick, currentSlide) {
5681						var i = (currentSlide ? currentSlide : 0) + 1;
5682						var num="";
5683						if(i<10) {
5684									num = '0'+i;
5685						}else{
5686									num = i;
5687						}
5688						$('.special-18_mb .currentNum').text(num);
5689						$('.special-18_mb .totalNum').text(
5690							(slick.slideCount < 10 ? '0'+slick.slideCount : slick.slideCount)
5691						);
5692		});
5693		$('.special-18_mb .areaSlide').slick({
5694			slidesToShow: 1,
5695			infinite: false,
5696			speed: 1000,
5697			variableWidth: true,
5698			cssEase: 'ease-in-out',
5699			prevArrow:
5700				'<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
5701			nextArrow:
5702				'<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
5703			appendArrows: '.special-18_mb .controlBox',
5704		});
5705
5706	}
5707	// .special-18 E
5708
5709
5710	// .special-19 S
5711	if ($('.special-19').length) {
5712		let topTxtH = $('.special-19 .topCenterBox .text').outerHeight();
5713		$('.special-19 .topCenterBox img').css('height', `calc(100% - ${topTxtH}px)`);
5714	}
5715	// .special-19 E
5716
5717
5718	// .twoBox_3-4 S
5719	if ($('.twoBox_3-4').length) {
5720		function rightSlide() {
5721			if (window.innerWidth <= 768) {
5722				$('.twoBox_3-4 .right').not('.slick-initialized').slick({
5723					slidesToShow: 1,
5724					infinite: true,
5725					speed: 800,
5726					cssEase: 'ease-in-out',
5727					prevArrow: '<button class="slick-prev slick-arrow"><i class="fa fa-angle-left"></i></button>',
5728					nextArrow: '<button class="slick-next slick-arrow"><i class="fa fa-angle-right"></i></button>',
5729				});
5730
5731				let imgH = $('.twoBox_3-4 .slick-slide img').outerHeight();
5732				$('.twoBox_3-4 .slick-arrow').css('top', imgH / 2);
5733			} else {
5734				$('.twoBox_3-4 .right.slick-initialized').slick('unslick');
5735			}
5736		}
5737
5738		rightSlide();
5739		$(window).resize(function () {
5740			rightSlide();
5741		});
5742	}
5743	// .twoBox_3-4 E
5744
5745
5746	// .carouselBox-9	S
5747	if ($('.carouselBox-9').length) {
5748		$('.carouselBox-9 .navbarSlide').slick({
5749			slidesToShow: 3,
5750			slidesToScroll: 1,
5751			asNavFor: '.carouselBox-9 .contentSlide',
5752			arrows: false,
5753			focusOnSelect: true, // 預設 false
5754			verticalSwiping: true, //垂直
5755			vertical: true, //垂直滑動
5756			adaptiveHeight: true, //為單一滑動水平轉盤啟用自適應高度
5757		});
5758
5759		$('.carouselBox-9 .contentSlide').slick({
5760			slidesToShow: 1,
5761			slidesToScroll: 1,
5762			speed: 800,
5763			asNavFor: '.carouselBox-9 .navbarSlide',
5764			arrows: false,
5765			variableWidth: true,
5766		});
5767	}
5768	// .carouselBox-9	E
5769
5770
5771	// .carouselBox-10	S
5772	if ($('.carouselBox-10').length) {
5773		$('.carouselBox-10 .slideShowOne').slick({
5774			slidesToShow: 1,
5775			slidesToScroll: 1,
5776			asNavFor: '.carouselBox-10 .slideShowFour',
5777			autoplay: true,
5778			arrows: false,
5779			fade: true,
5780		});
5781
5782		$('.carouselBox-10 .slideShowFour').slick({
5783			slidesToShow: 4,
5784			slidesToScroll: 1,
5785			autoplay: true,
5786			autoplaySpeed: 2000,
5787			arrows: false,
5788			focusOnSelect: true,
5789			infinite: true,
5790			responsive: [{
5791					breakpoint: 1200,
5792					settings: {
5793						slidesToShow: 3,
5794					},
5795				},
5796				{
5797					breakpoint: 769,
5798					settings: {
5799						slidesToShow: 4,
5800					},
5801				},
5802			],
5803		});
5804
5805		if (window.innerWidth > 768) {
5806			$('.carouselBox-10 .sameH').matchHeight();
5807		}
5808	}
5809	// .carouselBox-10	E
5810
5811
5812	// .carouselBox-11 S
5813	if ($('.carouselBox-11').length) {
5814		$('.carouselBox-11 .slideBox').slick({
5815			slidesToShow: 6,
5816			slidesToScroll: 1,
5817			dots: false,
5818			arrows: false,
5819			infinite: true,
5820			autoplay: true,
5821			autoplaySpeed: 0,
5822			speed: 12000,
5823			cssEase: 'linear',
5824			draggable: false,
5825			responsive: [{
5826					breakpoint: 1500,
5827					settings: {
5828						slidesToShow: 5,
5829					},
5830				},
5831				{
5832					breakpoint: 1200,
5833					settings: {
5834						slidesToShow: 4,
5835					},
5836				},
5837				{
5838					breakpoint: 992,
5839					settings: {
5840						slidesToShow: 3,
5841					},
5842				},
5843				{
5844					breakpoint: 701,
5845					settings: {
5846						slidesToShow: 2,
5847					},
5848				},
5849				{
5850					breakpoint: 481,
5851					settings: {
5852						slidesToShow: 1.5,
5853					},
5854				},
5855			],
5856		});
5857
5858		$('.carouselBox-11 .slideBox_reverse').slick({
5859			slidesToShow: 6,
5860			slidesToScroll: 1,
5861			dots: false,
5862			arrows: false,
5863			infinite: true,
5864			autoplay: true,
5865			autoplaySpeed: 0,
5866			speed: 12000,
5867			cssEase: 'linear',
5868			draggable: false,
5869			rtl: true,
5870			responsive: [{
5871					breakpoint: 1500,
5872					settings: {
5873						slidesToShow: 5,
5874					},
5875				},
5876				{
5877					breakpoint: 1200,
5878					settings: {
5879						slidesToShow: 4,
5880					},
5881				},
5882				{
5883					breakpoint: 992,
5884					settings: {
5885						slidesToShow: 3,
5886					},
5887				},
5888				{
5889					breakpoint: 701,
5890					settings: {
5891						slidesToShow: 2,
5892					},
5893				},
5894				{
5895					breakpoint: 481,
5896					settings: {
5897						slidesToShow: 1.5,
5898					},
5899				},
5900			],
5901		});
5902	}
5903	// .carouselBox-11 E
5904
5905
5906	// 2024-07-02 #3174 歷史沿革收合
5907	if ($('.historyType7_1').length ) {
5908		$('.historyType7_1 .col-sm-12 .historyItem:first-child').addClass('current');
5909		$('.historyType7_1 .col-sm-12 .historyItem:first-child').find('.eventList').show();
5910		$('.historyType7_1 .historyItem .year').on('click', function () {
5911			if ($(this).parents('.historyItem').hasClass('current')) {
5912				// 可以原地收合。
5913				$(this).parents('.historyItem').removeClass('current');
5914				$(this).siblings('.eventList').slideUp(500);
5915			} else {
5916				$(this).parents('.historyItem').siblings('.historyItem').removeClass('current');
5917				$(this).parents('.historyItem').siblings('.historyItem').find('.eventList').slideUp(500);
5918				$(this).parents('.historyItem').addClass('current');
5919				$(this).siblings('.eventList').slideDown(500);
5920			}
5921		});
5922	}
5923
5924
5925	// .twoBox_3-16 S
5926	if ($('.twoBox_3-16').length) {
5927		function twoB316() {
5928			if (window.innerWidth < 992) {
5929				$('.twoBox_3-16 .cardBox').not('.slick-initialized').slick({
5930					centerMode: true,
5931					centerPadding: '7vw',
5932					slidesToShow: 1,
5933					slidesToScroll: 1,
5934					dots: true,
5935					arrows: false,
5936					infinite: true,
5937					autoplay: true,
5938					autoplaySpeed: 5000,
5939					speed: 500,
5940					cssEase: 'linear',
5941				});
5942			}
5943		}
5944
5945		twoB316();
5946		$(window).resize(function () {
5947			twoB316();
5948		});
5949	}
5950	// .twoBox_3-16 E
5951
5952
5953	// .footerStyle23 S
5954	if ($('.footerStyle23').length) {
5955		if (window.innerWidth <= 1024) {
5956			let infoTit = $('.footerStyle23 .infoList .tit');
5957
5958			$('.footerStyle23 .infoList .item:first-child').find('ul').show();
5959			infoTit.on('click', function () {
5960				if ($(this).parents('.item').hasClass('current')) {
5961					// 可以原地收合,但.cmpBottom會有空白問題。
5962					// $(this).parents('.item').removeClass('current');
5963					// $(this).siblings('ul').slideUp(500);
5964				} else {
5965					$(this).parents('.item').siblings('.item').removeClass('current');
5966					$(this).parents('.item').siblings('.item').find('ul').slideUp(500);
5967					$(this).parents('.item').addClass('current');
5968					$(this).siblings('ul').slideDown(500);
5969				}
5970			});
5971		}
5972	}
5973	// .footerStyle23 E
5974
5975
5976	// .twoBox_3-17 S
5977	if ($('.twoBox_3-17').length) {
5978		$('.twoBox_3-17 .item01').hover(function () {
5979			$(this).addClass('current');
5980			$(this).siblings('.item').removeClass('current');
5981		});
5982		$('.twoBox_3-17 .item02').hover(function () {
5983			$(this).addClass('current');
5984			$(this).siblings('.item').removeClass('current');
5985		});
5986	}
5987	// .twoBox_3-17 E
5988
5989
5990	// .twoBox_1-44 S
5991	if ($('.twoBox_1-44').length) {
5992		$('.twoBox_1-44 .slideArea').slick({
5993			slidesToShow: 4,
5994			slidesToScroll: 4,
5995			arrows: false,
5996			autoplay: true,
5997			autoplaySpeed: 3000,
5998			dots: true,
5999			responsive: [{
6000				breakpoint: 768,
6001				settings: {
6002					slidesToShow: 3,
6003					slidesToScroll: 3,
6004				},
6005			}, ],
6006		});
6007	}
6008	// .twoBox_1-44 E
6009
6010
6011	// .twoBox_3-18 S
6012	if ($('.twoBox_3-18').length) {
6013		$('.twoBox_3-18 .list .item').matchHeight({
6014			byRow: false,
6015		});
6016	}
6017	// .twoBox_3-18 E
6018
6019
6020	// .productOverview-5 S
6021	if ($('.productOverview-5').length) {
6022		$('.productOverview-5 .slideBox').not('.slick-initialized').slick({
6023			slidesToShow: 2,
6024			infinite: false,
6025			speed: 500,
6026			cssEase: 'ease-in-out',
6027			dots: false,
6028			arrows: true,
6029			prevArrow: '<button class="slick-prev slick-arrow"><i class="fa fa-long-arrow-left" aria-hidden="true"></i></button>',
6030			nextArrow: '<button class="slick-next slick-arrow"><i class="fa fa-long-arrow-right" aria-hidden="true"></i></button>',
6031			responsive: [{
6032				breakpoint: 901,
6033				settings: 'unslick',
6034			}, ],
6035		});
6036
6037		$('.productOverview-5 .slideBox .item').matchHeight();
6038	}
6039	// .productOverview-5 E
6040
6041
6042	// .threeBox-35 S
6043	if ($('.threeBox-35').length) {
6044		$('.threeBox-35 .slideShowOne').slick({
6045			slidesToShow: 1,
6046			slidesToScroll: 1,
6047			asNavFor: '.threeBox-35 .slideShowTwo',
6048			autoplay: false,
6049			autoplaySpeed: 5000,
6050			arrows: false,
6051			dots: true,
6052			appendDots: '.dotsBox',
6053			infinite: true,
6054			cssEase: 'ease-in-out',
6055			responsive: [{
6056					breakpoint: 992,
6057					settings: {
6058						slidesToShow: 2,
6059					},
6060				},
6061				{
6062					breakpoint: 577,
6063					settings: {
6064						slidesToShow: 1,
6065					},
6066				},
6067			],
6068		});
6069
6070		$('.threeBox-35 .slideShowTwo').slick({
6071			slidesToShow: 2,
6072			slidesToScroll: 1,
6073			asNavFor: '.threeBox-35 .slideShowOne',
6074			autoplay: false,
6075			autoplaySpeed: 5000,
6076			arrows: false,
6077			infinite: true,
6078			cssEase: 'ease-in-out',
6079		});
6080	}
6081	// .threeBox-35 E
6082
6083
6084	// .oneBox-32 S
6085	if ($('.oneBox-32').length) {
6086		$('.oneBox-32 .tabMenu a:first-child').addClass('active');
6087		$('.oneBox-32 .tabInner .tabBox:first-child').addClass('active');
6088		$('.oneBox-32 .tabMenu a').click(function () {
6089			$('.oneBox-32 .tabMenu a').removeClass('active');
6090			$(this).addClass('active');
6091			$('.oneBox-32 .tabBox').removeClass('active');
6092			$($(this).attr('href')).addClass('active');
6093			$('html,body').animate({
6094					scrollTop: $('.oneBox-32').offset().top - 100
6095				},
6096				400
6097			);
6098		});
6099	}
6100	// .oneBox-32 E
6101	
6102
6103
6104
6105}); // function () -END
6106
6107
6108// 步驟提示範例
6109$(function () {
6110	const driver = window.driver.js.driver;
6111
6112	// 設置 cookie
6113	function setCookie(cname, cvalue, exdays) {
6114		const d = new Date();
6115		d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);
6116		let expires = 'expires=' + d.toUTCString();
6117		document.cookie = cname + '=' + cvalue + ';' + expires + ';path=/';
6118	}
6119
6120	// 取 coolie 的值
6121	function getCookie(cname) {
6122		let name = cname + '=';
6123		let ca = document.cookie.split(';');
6124		// console.log(ca);
6125		for (let i = 0; i < ca.length; i++) {
6126			let c = ca[i];
6127			while (c.charAt(0) == ' ') {
6128				c = c.substring(1);
6129			}
6130			if (c.indexOf(name) == 0) {
6131				// console.log(c);
6132				return c.substring(name.length, c.length);
6133			}
6134		}
6135		return '';
6136	}
6137
6138	let navigationCheck = getCookie('navigation');
6139	// console.log('navigationCheck', navigationCheck);
6140
6141	// 設置css
6142	if (navigationCheck) {
6143		$('.navigation-button').css('display', 'none');
6144	}
6145
6146	$('.navigation-button').on('click', function () {
6147		const driverIndex = driver({
6148			// popoverClass: 'scoped-class', //要用的class
6149			popoverClass: 'test-Class', //要用的class
6150			animate: true, //動畫
6151			showProgress: true, //來顯示遊覽的進度
6152			doneBtnText: '完成', //最後一步的完成按鈕 按鍵名稱
6153			nextBtnText: '下一步', //下一步按鈕 按鍵名稱
6154			prevBtnText: '上一步', //上一步按鈕 按鍵名稱
6155			onNextClick: () => {
6156				// 設置下一步的function
6157				console.log('onNextClick');
6158				setCookie('navigation', true, 1);
6159				$('.navigation-button').css('display', 'none');
6160				driverIndex.moveNext(); //前往下一步
6161			},
6162			// 下一步發生事情的設定
6163			onCloseClick: e => {
6164				console.log(e);
6165				console.log('Close Button Clicked');
6166				// Implement your own functionality here
6167				// driverObj.destroy();
6168				this.destroy();
6169			},
6170			steps: [
6171				{
6172					element: '.indexTable-1',
6173					popover: {
6174						title: '瀏覽',
6175						description: '此處可以瀏覽你要的網頁',
6176						popoverClass: 'scoped-class-1',
6177					},
6178					side: 'left',
6179				},
6180				{
6181					element: '.indexTable-1 .filterTable',
6182					popover: {
6183						title: '搜尋',
6184						description:
6185							'此處可以查看你的年份<img src="https://picsum.photos/250/250?random=1"  alt="">',
6186					},
6187					side: 'left',
6188				},
6189
6190				{
6191					element: '.indexTable-1-download',
6192					popover: {
6193						title: '下載',
6194						description: '可以選擇你感興趣的資料下載',
6195					},
6196					side: 'left',
6197				},
6198				{
6199					popover: {
6200						title: 'Happy Coding',
6201						description:
6202							'And that is all, go ahead and start adding tours to your applications.',
6203					},
6204				},
6205			], //步驟
6206		});
6207		driverIndex.drive(); //啟動
6208	});
6209});
6210
6211
6212$(function () {
6213	if ($('.footerStyle16').length) {
6214		$('.footerStyle16 .images-slick').slick({
6215			slidesToShow: 5,
6216			slidesToScroll: 1,
6217			autoplay: true,
6218			dots: false, // 預設 false 指示点
6219			arrows: false, // 預設 true 左右箭頭是否顯示
6220			// focusOnSelect: true, // 預設 false
6221			prevArrow:
6222				'<div class="item-nav-prev "><span class="arrow"><i class="fa fa-angle-left" aria-hidden="true"></i></span></div>',
6223			nextArrow:
6224				'<div class="item-nav-next "><span class="arrow"><i class="fa fa-angle-right" aria-hidden="true"></i></span></div>',
6225			responsive: [
6226				{
6227					breakpoint: 768,
6228					speed: 800,
6229					settings: {
6230						slidesToShow: 4,
6231						arrows: true,
6232						autoplay: true,
6233						autoplaySpeed: 2000,
6234						pauseOnFocus: false,
6235						pauseOnHover: false,
6236					},
6237				},
6238				{
6239					breakpoint: 576,
6240					settings: {
6241						slidesToShow: 3,
6242						arrows: true,
6243						autoplay: true,
6244						autoplaySpeed: 2000,
6245						pauseOnFocus: false,
6246						pauseOnHover: false,
6247					},
6248				},
6249			],
6250		});
6251	}
6252})
6253
6254$(function () {
6255	if ($('.oneBox-26 #particlesJS').length) {
6256		particlesJS.load(
6257			//選定JS名稱
6258			'particlesJS',
6259			//參考 JSON 值 或是 位置
6260			'js_v4/particles.js/assets/particlesjs-config.json',
6261			function () {
6262				// 要執行的function
6263				
6264				// console.log('callback - particles.js config loaded');
6265			}
6266		);
6267	}
6268})

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.