PageSourceSearch

https://channel-tag.com/wp-content/themes/theme286/js/common.js

js channel-tag.com collected 2026-10-07 13:40:17 UTC 27,763 bytes, 795 lines download raw bytes

1/*Swiper Banner*/
2if ($('.swiper-wrapper .swiper-slide').length < 2) { $('.swiper-pagination').hide() }
3var mySwiper = new Swiper('.slider_banner', {
4  effect: 'fade',
5  speed: 1000,
6  loop: true,
7  autoplay: {
8    delay: 3500,
9    disableOnInteraction: false,
10  },
11  pagination: {
12    el: '.slider_banner .pagination-box',
13    clickable: true,
14  },
15  navigation: {
16    nextEl: '.slider_banner .swiper-button-next',
17    prevEl: '.slider_banner .swiper-button-prev',
18  },
19  on: {
20    init: function() {
21      var _that = this;
22      setCurPage('.slider_banner', _that)
23    }
24  }
25});
26
27
28mySwiper.on('slideChange', function() {
29  setCurPage('.slider_banner', mySwiper)
30});
31
32function setCurPage(sliderWrap, ele) {
33  var curIndex = ele.realIndex + 1;
34  var total = ele.slides.length - 2;
35  var curHtml = '<i class="cur">' + curIndex + '</i>' + '<b class="line">/</b>' + '<i class="total">' + total + '</i>';
36  $(sliderWrap).find('.slide-page-box').html(curHtml);
37}
38
39
40var viewSwiper = new Swiper('.image-additional', {
41  slidesPerView: 3,
42  spaceBetween: 0,
43  pagination: {
44    el: '.product-view .swiper-pagination',
45    clickable: true,
46  },
47  navigation: {
48    nextEl: '.product-view .swiper-button-next',
49    prevEl: '.product-view .swiper-button-prev',
50  },
51  breakpoints: {
52    1366: {
53      slidesPerView: 3
54    },
55    768: {
56      slidesPerView: 3
57    },
58    480: {
59      slidesPerView: 1
60    }
61  }
62});
63var realtedSwiper = new Swiper('.goods-may-like .swiper-slider', {
64  slidesPerView: 3,
65  spaceBetween: 20,
66  speed: 400,
67  navigation: {
68    nextEl: '.goods-may-like .swiper-button-next',
69    prevEl: '.goods-may-like .swiper-button-prev',
70  },
71  breakpoints: {
72    1920: {
73      slidesPerView: 3
74    },
75    1680: {
76      slidesPerView: 3
77    },
78    1440: {
79      slidesPerView: 3,
80      spaceBetween: 15
81    },
82    1280: {
83      slidesPerView: 2
84    },
85    480: {
86      slidesPerView: 2,
87      spaceBetween: 4
88    }
89
90  }
91});
92
93$('.head_nav li').each(function() {
94  if ($(this).find('ul').length > 0) {
95    $(this).children('a').append("<b></b>");
96    $(this).addClass('has-child');
97  } else {
98    if (!$(this).siblings('li').find('ul').length) {
99      $(this).addClass('siblings-no-menu')
100    }
101  }
102})
103tabContainer('.tab-content-wrap', '.tab-title', '.tab-panel')
104
105function hideMsgPop() { $('.inquiry-pop-bd').fadeOut('fast') }
106if ($('body .inquiry-form-wrap').length > 0) {
107  var webTop = $('body .inquiry-form-wrap').offset().top - 80
108  $('.product-btn-wrap .email,.company_subscribe .button,.side_content .side_list .email').click(function() {
109    $("html, body").animate({ scrollTop: webTop }, 1000);
110    $(".ad_prompt").show().delay(3000).hide(300);
111  })
112} else {
113  $('.product-btn-wrap .email,.company_subscribe .button,.side_content .side_list .email').click(function() {
114    $('.inquiry-pop-bd').fadeIn('fast')
115  })
116}
117$('.inquiry-pop,.product-btn-wrap .email,.company_subscribe .button,.side_content .side_list .email').click(function(e) { e.stopPropagation(); })
118$(document).click(function() { hideMsgPop() })
119
120function changeuRL(link) {
121  var curUrl = document.location.href;
122  var oldUrl = window.location.host + '/';
123  var lgArr = ['fr/', 'de/', 'pt/', 'es/', 'ru/', 'ko/', 'ar/', 'ga/', 'ja/', 'el/', 'tr/', 'it/', 'da/', 'ro/', 'id/', 'cs/', 'af/', 'sv/', 'pl/', 'eu/', 'ca/', 'eo/', 'hi/', 'lo/', 'sq/', 'am/', 'hy/', 'az/', 'be/', 'bn/', 'bs/', 'bg/', 'ceb/', 'ny/', 'co/', 'hr/', 'nl/', 'et/', 'tl/', 'fi/', 'fy/', 'gl/', 'ka/', 'gu/', 'ht/', 'ha/', 'haw/', 'iw/', 'hmn/', 'hu/', 'is/', 'ig/', 'jw/', 'kn/', 'kk/', 'km/', 'ku/', 'ky/', 'la/', 'lv/', 'lt/', 'lb/', 'mk/', 'mg/', 'ms/', 'ml/', 'mt/', 'mi/', 'mr/', 'mn/', 'my/', 'ne/', 'no/', 'ps/', 'fa/', 'pa/', 'sr/', 'st/', 'si/', 'sk/', 'sl/', 'so/', 'sm/', 'gd/', 'sn/', 'sd/', 'su/', 'sw/', 'tg/', 'ta/', 'te/', 'th/', 'uk/', 'ur/', 'uz/', 'vi/', 'cy/', 'xh/', 'yi/', 'yo/', 'zu/', 'zh-CN/', 'zh-TW/'];
124  $.each(lgArr, function(i, lenItem) {
125    var lgUrl = oldUrl.toString() + lenItem;
126    if (curUrl.indexOf(lgUrl) != -1) {
127      link.each(function(i) {
128        if (!$(this).parents().hasClass('language-flag')) {
129          var iLink;
130          if ($(this).prop('href')) {
131            iLink = $(this).prop('href');
132          }
133          if (String(iLink).indexOf(oldUrl) != -1 && String(iLink).indexOf(lgUrl) == -1 && curUrl.indexOf(lgUrl) != -1) {
134            var newLink = iLink.replace(oldUrl, lgUrl);
135            $(this).attr('href', newLink);
136          }
137        }
138      })
139    }
140  });
141}
142$(function() {
143  changeuRL($('a'));
144})
145$(document).ready(function() {
146  $('.change-language .change-language-cont').append("<div class='change-empty'>Untranslated</div>")
147  $('.prisna-wp-translate-seo').append("<div class='lang-more'>More Language</div>")
148  if ($('body .prisna-wp-translate-seo').length > 0 && $('.change-language .prisna-wp-translate-seo').length < 1) {
149    $('.prisna-wp-translate-seo').appendTo('.change-language .change-language-cont')
150    if ($('.change-language .change-language-cont .prisna-wp-translate-seo li').length > 0) {
151      $('.change-language .change-language-cont .change-empty').hide()
152      $('.change-language .change-language-cont .prisna-wp-translate-seo li').each(function(index) {
153        if (index > 35) {
154          $(this).addClass('lang-item lang-item-hide')
155          $('.change-language-cont').find('.lang-more').fadeIn()
156        } else {
157          $('.change-language-cont').find('.lang-more').fadeOut()
158        }
159      })
160      if ($('.change-language-cont .lang-more').length > 0) {
161        $('.change-language-cont .lang-more').click(function() {
162          if ($(this).parents('.change-language-cont').find('.prisna-wp-translate-seo li.lang-item').hasClass('lang-item-hide')) {
163            $(this).parents('.change-language-cont').find('.prisna-wp-translate-seo li.lang-item').removeClass('lang-item-hide')
164            $(this).addClass('more-active').text('x')
165          } else {
166            $(this).parents('.change-language-cont').find('.prisna-wp-translate-seo li.lang-item').addClass('lang-item-hide')
167            $(this).removeClass('more-active').text('More Language')
168          }
169        })
170      }
171    } else {
172      $('.change-language .change-language-cont .change-empty').fadeIn()
173    }
174  }
175})
176var mHeadTop = $('.web_head').offset().top
177var $backToTopTxt = "TOP",
178  $backToTopEle = $('<span class="gotop"></span>').appendTo($("body"))
179  .html('<em>' + $backToTopTxt + '</em>').attr("title", $backToTopTxt).click(function() {
180    $("html, body").animate({ scrollTop: 0 }, 600);
181  }),
182  $backToTopFun = function() {
183    var st = $(document).scrollTop(),
184      winh = $(window).height();
185    (st > mHeadTop) ? $backToTopEle.addClass('active'): $backToTopEle.removeClass('active');
186    if (!window.XMLHttpRequest) {
187      $backToTopEle.css("top", st + winh - 210);
188    }
189  };
190$(window).bind("scroll", $backToTopFun);
191$(function() { $backToTopFun(); });
192
193
194
195// get window size
196var winWidth = 0;
197var winHeight = 0;
198
199function getWinSize() {
200  if (window.innerWidth) {
201    winWidth = window.innerWidth;
202  } else if ((document.body) && (document.body.clientWidth)) {
203    winWidth = document.body.clientWidth;
204  }
205  if (window.innerHeight) {
206    winHeight = window.innerHeight;
207  } else if ((document.body) && (document.body.clientHeight)) {
208    winHeight = document.body.clientHeight;
209  }
210  if (document.documentElement && document.documentElement.clientHeight && document.documentElement.clientWidth) {
211    if (window.innerWidth && window.innerHeight) {
212      winWidth = window.innerWidth;
213      winHeight = window.innerHeight;
214    } else {
215      winHeight = document.documentElement.clientHeight;
216      winWidth = document.documentElement.clientWidth;
217    }
218  }
219}
220getWinSize();
221
222
223var $nav = $('.web_head'),
224  navTop = $('.nav_wrap').offset().top,
225  headH = $nav.outerHeight(),
226  winTop_1 = 0,
227  // winWidth = window.innerWidth || $(window).width(),
228  // winHeight = $(window).height(),
229  spr = $('body').height() - $nav.height(),
230  holder = jQuery('<div class="head_holder">');
231
232function fixedTop() {
233  var winTop_2 = $(window).scrollTop();
234  holder.css('height', $('.nav_wrap').outerHeight());
235  if (winTop_2 > headH && winWidth >= 950) {
236    holder.show().insertAfter($nav);
237    $nav.addClass('fixed-nav');
238    $nav.parents('body').addClass('fixed-body');
239    setTimeout(function() { $nav.addClass('fixed-nav-active') });
240  } else {
241    holder.hide();
242    $nav.removeClass('fixed-nav fixed-nav-active');
243    $nav.parents('body').removeClass('fixed-body');
244  }
245  if (winTop_2 > winTop_1 && winWidth >= 950) {
246    $nav.removeClass('fixed-nav-appear');
247  } else if (winTop_2 < winTop_1) {
248    $nav.addClass('fixed-nav-appear');
249  }
250  winTop_1 = $(window).scrollTop();
251}
252fixedTop();
253$(window).on('scroll', function() {
254  fixedTop();
255})
256$(window).on('resize', function() {
257  fixedTop();
258})
259
260
261
262
263$('.faq-item').each(function(index) {
264  var _this = $(this)
265  var title = _this.find('.faq-title')
266  var cont = _this.find('.faq-cont')
267  if (index == 0) {
268    title.addClass('show-title')
269  }
270  title.on('click', function() {
271    if (cont.is(':hidden') && !$(this).hasClass('show-title')) {
272      cont.slideDown('fast')
273      $(this).addClass('show-title')
274      _this.siblings().find('.faq-title').removeClass('show-title')
275      _this.siblings().find('.faq-cont').slideUp('fast')
276    } else {
277      cont.slideUp('fast')
278      $(this).removeClass('show-title')
279    }
280  })
281})
282
283function mSizeChange() {
284  getWinSize();
285  if (winWidth <= 950) {
286    if ($('.mobile-head-items').length < 1) {
287      var mobileService = '<div class="mobile-head-items"><div class="mobile-head-item mobile-head-nav"><div class="title"></div><div class="main-content-wrap side-content-wrap"><div class="content-wrap"></div></div></div><div class="mobile-head-item mobile-head-language"><div class="title"></div><div class="main-content-wrap side-content-wrap"><div class="content-wrap"></div></div></div><div class="mobile-head-item mobile-head-search"><div class="title"></div><div class="main-content-wrap middle-content-wrap"><div class="content-wrap"></div></div></div>'
288      $('body').append(mobileService)
289      if ($('body .aside').length > 0) {
290        $('.mobile-head-items').append('<div class="mobile-head-item mobile-head-aside"><div class="title"></div><div class="main-content-wrap side-content-wrap"><div class="content-wrap"></div></div></div>')
291      }
292      $('.mobile-head-item').each(function() {
293        $(this).find('.title').click(function() {
294          if ($(this).parents('.mobile-head-item').find('.main-content-wrap').length > 0) {
295            var pItem = $(this).parents('.mobile-head-item')
296            if (!pItem.find('.main-content-wrap').hasClass('show-content-wrap')) {
297              pItem.find('.main-content-wrap').addClass('show-content-wrap')
298              pItem.find('.side-content-wrap').stop().animate({ 'left': '0' }, 300)
299              pItem.find('.middle-content-wrap').addClass('middle-show-content-wrap')
300              pItem.find('.side-content-wrap').append("<b class='mobile-ico-close'></b>")
301              pItem.siblings('.mobile-head-item').find('.main-content-wrap').removeClass('show-content-wrap')
302              pItem.siblings('.mobile-head-item').find('.side-content-wrap').stop().animate({ 'left': '-80%' }, 300)
303              pItem.siblings('.mobile-head-item').find('.middle-content-wrap').removeClass('middle-show-content-wrap')
304              pItem.siblings('.mobile-head-item').find('.side-content-wrap .mobile-ico-close').remove()
305              if ($('.mobile-head-items').find('.mobile-body-mask').length < 1) {
306                $('.mobile-head-items').append('<div class="mobile-body-mask"></div>')
307              }
308            } else {
309              pItem.find('.main-content-wrap').removeClass('show-content-wrap')
310              pItem.find('.side-content-wrap').stop().animate({ 'left': '-80%' }, 300)
311              pItem.find('.middle-content-wrap').removeClass('middle-show-content-wrap')
312              pItem.find('.side-content-wrap .mobile-ico-close').remove()
313            }
314            $('.mobile-body-mask').click(function() {
315              $('.mobile-body-mask').remove()
316              $('.mobile-head-item .main-content-wrap').removeClass('show-content-wrap')
317              $('.mobile-head-item .side-content-wrap').animate({ 'left': '-80%' }, 300)
318              $('.mobile-head-item .middle-content-wrap').removeClass('middle-show-content-wrap')
319              $('.mobile-head-item .side-content-wrap .mobile-ico-close').remove()
320            })
321            $('.mobile-ico-close').click(function() {
322              $('.mobile-body-mask').remove()
323              $('.mobile-head-item .main-content-wrap').removeClass('show-content-wrap')
324              $('.mobile-head-item .side-content-wrap').stop().animate({ 'left': '-80%' }, 300)
325              $('.mobile-head-item .middle-content-wrap').removeClass('middle-show-content-wrap')
326              $('.mobile-head-item .side-content-wrap .mobile-ico-close').remove()
327            })
328          }
329        })
330      })
331      $('.change-currency ').clone().appendTo('.mobile-head-item.mobile-head-currency .main-content-wrap .content-wrap')
332      $('.change-language .change-language-cont').clone().appendTo('.mobile-head-item.mobile-head-language .main-content-wrap .content-wrap')
333      $('.nav_wrap .head_nav').clone().appendTo('.mobile-head-item.mobile-head-nav .main-content-wrap .content-wrap')
334      $('.head-search:last').clone().appendTo('.mobile-head-item.mobile-head-search .main-content-wrap .content-wrap')
335      $('.head_sns').clone().appendTo('.mobile-head-item.mobile-head-social .main-content-wrap .content-wrap')
336      $('.aside .aside-wrap').clone().appendTo('.mobile-head-item.mobile-head-aside .main-content-wrap .content-wrap')
337    }
338  }
339  //mobile end
340  else {
341    $(document).ready(function() {
342      $('.mobile-body-mask,.mobile-head-items,.mobile-head-items,.mobile-nav-items,.mobile-cart-items,.mobile-tab-items').remove()
343    });
344  }
345}
346$(function() { mSizeChange(); })
347$(window).resize(function() { mSizeChange() });
348
349
350/*side*/
351function sideCate(cateEle,siblingsStatus){
352  $(cateEle).each(function() {
353    if ($(this).find('ul').length ) {
354      $(this).addClass('has-child');
355      $(this).append("<span class='icon-cate icon-cate-down'></span>")
356      $(this).children('.icon-cate').click(function(e) {
357        var mEle=$(this).parent('li');
358        var mList=$(this).parent('li').children('ul');
359        var msiblings=$(this).parent('li').siblings('li');
360        if(siblingsStatus==0){
361          msiblings.removeClass('li_active');
362          msiblings.children('ul').slideUp(150);
363          msiblings.children('.icon-cate').removeClass('icon-cate-up').addClass('icon-cate-down');
364        }
365        if (mList.is(':hidden')) {
366          mEle.addClass('li_active');
367          mList.slideDown(150);
368          $(this).removeClass('icon-cate-down').addClass('icon-cate-up');
369        } else {
370          mEle.removeClass('li_active');
371          mList.slideUp(150);
372          $(this).removeClass('icon-cate-up').addClass('icon-cate-down');
373        }
374        e.stopPropagation();
375      })
376    }
377  }) 
378}
379$(function() {
380  // side cate
381  sideCate('.side-cate li',0)
382  $('.side-cate,.side-cate ul').each(function(){
383    if(!$(this).find('ul').length){
384      $(this).addClass('cate-type-list');
385    }
386  })
387
388  var $currentEle=$('.side-widget .side-cate .nav-current');
389  if ($currentEle.parents('ul').length > 0 && $currentEle.find('ul').length > 0) {
390    $currentEle.parents('ul').show()
391    $currentEle.parents('li').addClass("show_li")
392    $currentEle.parents('li.show_li').children('.icon-cate').removeClass('icon-cate-down').addClass('icon-cate-up')
393    $currentEle.children('ul').show()
394    $('.side-widget .side-cate .nav-current ').children('.icon-cate').removeClass('icon-cate-down').addClass('icon-cate-up');
395  } else if ($currentEle.parents('ul').length > 0 && $currentEle.find('ul').length < 1) {
396    $currentEle.parents('ul').show()
397    $currentEle.parents('li').addClass("show_li")
398    $currentEle.parents('li.show_li').children('.icon-cate').removeClass('icon-cate-down').addClass('icon-cate-up')
399  } else if ($currentEle.parents('ul').length < 1 && $currentEle.find('ul').length > 0) {
400    $currentEle.children('ul').show()
401    $currentEle.children('.icon-cate').removeClass('icon-cate-down').addClass('icon-cate-up');
402  }
403})
404
405/*tabContainer*/
406function tabContainer(container, title, panel) {
407  $(container).each(function() {
408    $(this).find(title).each(function() {
409      if ($(this).hasClass('current')) {
410        j = $(this).index();
411        $(this).parents(container).find(panel).eq(j).removeClass('disabled')
412      }
413      $(this).click(function() {
414        i = $(this).index();
415        $(this).addClass('current').siblings().removeClass('current');
416        $(this).parents(container).find(panel).eq(i).show();
417        $(this).parents(container).find(panel).not($(this).parents(container).find(panel).eq(i)).hide();
418      })
419    })
420  })
421}
422/*search*/
423document.documentElement.className = 'js';;
424(function(window) {
425  if (document.querySelector('.web-search')) {
426    'use strict';
427    var mainContainer = document.querySelector('.container'),
428      searchContainer = document.querySelector('.web-search'),
429      openCtrl = document.getElementById('btn-search'),
430      closeCtrl = document.getElementById('btn-search-close'),
431      inputSearch = searchContainer.querySelector('.search-ipt');
432
433    function init() { initEvents() }
434
435    function initEvents() {
436      openCtrl.addEventListener('click', function() { if (!searchContainer.classList.contains("search--open")) { openSearch(); } else { closeSearch(); } });
437      closeCtrl.addEventListener('click', closeSearch);
438      document.addEventListener('keyup', function(ev) { if (ev.keyCode == 27) { closeSearch() } })
439    }
440
441    function openSearch() {
442      mainContainer.classList.add('main-wrap--move');
443      searchContainer.classList.add('search--open');
444      setTimeout(function() { inputSearch.focus() }, 600)
445    }
446
447    function closeSearch() {
448      mainContainer.classList.remove('main-wrap--move');
449      searchContainer.classList.remove('search--open');
450      inputSearch.blur();
451      inputSearch.value = ''
452    }
453    init()
454  }
455})(window);
456
457
458$(function() { $("#scrollsidebar").fix({ float: 'right', durationTime: 400 }); });
459$('.business_right .events li').on('click', function() {
460  $(this).addClass('current').siblings("li").removeClass('current')
461  var i = $(this).index()
462  $(this).parents('.index_business').find('.business_middle .tab_content').eq(i).addClass('current').siblings(".tab_content").removeClass('current')
463})
464$('table').each(function() {
465  if (!$(this).parent().hasClass('table_wrap')) {
466    $(this).wrap("<div class='table_wrap'><//div>")
467  }
468})
469
470
471
472/* -------------- public Function --------------*/
473
474
475/*!
476 * toggleClass
477*/
478function toggleClass(btn, cont, parent, cName, hName, siblingsStatus) {
479  var $btn = $(btn);
480  var $parent = $(parent);
481  var $cont = $(cont);
482  if (siblingsStatus == 0) {
483    $btn.parents(parent).siblings(parent).removeClass(cName).addClass(hName);
484  }
485  if ($btn.parents(parent).hasClass(cName)) {
486    $btn.parents(parent).removeClass(cName).addClass(hName);
487  } else {
488    $btn.parents(parent).addClass(cName).removeClass(hName);
489  }
490}
491
492// set head nav Direction
493function menuDirection(ele) {
494  var winW = $(window).innerWidth();
495  $(ele).each(function() {
496    if ($(this).find('ul').length) {
497      var linkEleW = $(this).children('a').width();
498      var offRight = winW - $(this).offset().left;
499      var childLen = $(this).find('ul').length;
500      var childrenWidth = childLen * 250 + 10;
501      if (offRight < childrenWidth) {
502        $(this).addClass('menu_left');
503      } else {
504        $(this).removeClass('menu_left');
505      }
506    }
507  })
508}
509
510// dropMenu
511function dropMenu(menuItem, menuList) {
512  var mouseover_tid = [];
513  var mouseout_tid = [];
514  $(menuItem).each(function(index) {
515    $(this).hover(
516      function() {
517        var _self = this;
518        clearTimeout(mouseout_tid[index]);
519        mouseover_tid[index] = setTimeout(function() {
520          $(_self).children(menuList).slideDown(150);
521          $(_self).addClass("active");
522        }, 150);
523      },
524      function() {
525        var _self = this;
526        clearTimeout(mouseover_tid[index]);
527        mouseout_tid[index] = setTimeout(function() {
528          $(_self).children(menuList).slideUp(50);
529          $(_self).removeClass("active");
530        }, 150);
531      }
532    );
533  })
534}
535
536
537
538
539
540
541/* -------------- header --------------*/
542
543// dropmenu direction
544$(function() {
545  menuDirection('.head_nav>li');
546  $(window).on('resize', function() {
547    menuDirection('.head_nav>li');
548  })
549})
550
551$(function() {
552  $('.nav_wrap').append('<span class="nav_btn_close"></span>');
553
554  $('body').delegate('.head_nav li b', 'click', function() {
555    var navItem = $(this).closest('li');
556    var navMenu = navItem.children('ul');
557    if (navMenu.is(':hidden')) {
558      navMenu.slideDown(150, function() {
559        navItem.addClass('active');
560      });
561    } else {
562      navItem.removeClass('active');
563      navMenu.slideUp(150);
564    }
565    return false;
566  })
567})
568
569
570
571
572
573/* -------------- index --------------*/
574
575
576// index_company_intr
577var pdSwiper = new Swiper('.company_intr_slider', {
578  slidesPerView: 1,
579  slidesPerGroup: 1,
580  loop: true,
581  speed: 400,
582  spaceBetween: 20,
583  watchOverflow: true,
584  autoplay:{
585  	delay:3000,
586  	disableOnInteraction:false,
587  },
588  pagination: {
589    el: false,
590    clickable: true,
591  },
592  navigation: {
593    nextEl: '.index_company_intr .swiper-button-next',
594    prevEl: '.index_company_intr .swiper-button-prev',
595  },
596  pagination: {
597    el: '.index_company_intr .swiper-pagination',
598    clickable: true,
599  },
600  breakpoints: {}
601})
602
603// Why Choose Us
604$('.intr_group_hd').on('click', function() {
605  toggleClass(this, '.intr_group_bd', '.intr_group_item', 'active', '', 0);
606})
607
608// index_brands
609var newsSwiper = new Swiper('.index_news .news_slider', {
610  slidesPerView: 3,
611  slidesPerGroup: 3,
612  loop: false,
613  speed: 600,
614  spaceBetween: 0,
615  watchOverflow: true,
616  autoplay:{
617  	delay:3000,
618  	disableOnInteraction:false,
619  },
620  pagination: {
621    el: false,
622    clickable: true,
623  },
624  pagination: {
625    el: '.index_news .swiper-pagination',
626    clickable: true,
627  },
628  breakpoints: {
629    768: {
630      slidesPerView: 2,
631      slidesPerGroup: 2
632    }
633  }
634})
635
636
637// index_brands
638var brandSwiper = new Swiper('.index_brands .brands_slider', {
639  slidesPerView: 4,
640  slidesPerGroup: 4,
641  loop: false,
642  speed: 600,
643  spaceBetween: 0,
644  watchOverflow: true,
645  autoplay:{
646  	delay:3000,
647  	disableOnInteraction:false,
648  },
649  pagination: {
650    el: false,
651    clickable: true,
652  },
653  pagination: {
654    el: '.index_brands .swiper-pagination',
655    clickable: true,
656  },
657  breakpoints: {
658    950: {
659      slidesPerView: 3,
660      slidesPerView: 3
661    },
662    480: {
663      slidesPerView: 2,
664      slidesPerView: 2
665    }
666  }
667})
668
669
670$(function() {
671  // count
672  if ($('.count-title').length) {
673    if (!$.support.leadingWhitespace) {
674      $('.couner_items').find('.timer').each(function() {
675        $(this).html($(this).data('to'))
676      })
677    } else {
678      $('.count-title').data('', {
679        formatter: function(value, options) {
680          return value.toFixed(options.decimals).replace(/\B(?=(?:\d{3})+(?!\d))/g, ' ')
681        }
682      });
683      $(window).scroll(function() {
684        if ($(window).scrollTop() > 700) {
685          $('.timer').each(count);
686          $('.count-title').removeClass('timer')
687        }
688      });
689
690      function count(options) {
691        var $this = $(this);
692        options = $.extend({}, options || {}, $this.data('countToOptions') || {});
693        $this.countTo(options)
694      }
695    }
696  }
697})
698
699
700
701
702
703
704
705/* -------------- subpage --------------*/
706
707var sideProduct = new Swiper('.side_slider', {
708  slidesPerView: 5,
709  slidesPerGroup: 1,
710  spaceBetween: 0,
711  direction: 'vertical',
712  navigation: {
713    nextEl: '.side-product-items .btn-next',
714    prevEl: '.side-product-items .btn-prev',
715  },
716  pagination: {
717    el: '.side-product-items .swiper-pagination',
718    clickable: true,
719  },
720});
721
722
723var mSwiper = new Swiper('.main_banner_slider', {
724  effect: 'fade',
725  speed: 1000,
726  loop: false,
727  watchOverflow: true,
728  spaceBetween: 0,
729  autoplay: {
730    delay: 3500,
731    disableOnInteraction: false,
732  },
733  pagination: {
734    el: '.main_banner_slider .swiper-pagination',
735    clickable: true,
736  }
737});
738
739
740// search
741$(function() {
742  $(document).on('click', function() {
743    $('.container').removeClass('main-wrap--move');
744    $('.web-search').removeClass('search--open');
745  })
746  $('.btn--search,.web-search').on('click', function(e) {
747    e.stopPropagation();
748  })
749})
750
751
752
753
754// button animation
755$(".sys_btn_wave").mouseenter(function(e) {
756  var parentOffset = $(this).offset();
757  var relX = e.pageX - parentOffset.left;
758  var relY = e.pageY - parentOffset.top;
759  $(this).find(".btn_wave_circle").css({ "left": relX, "top": relY });
760  $(this).find(".btn_wave_circle").removeClass("desplode-circle");
761  $(this).find(".btn_wave_circle").addClass("explode-circle");
762});
763$(".sys_btn_wave").mouseleave(function(e) {
764  var parentOffset = $(this).offset();
765  var relX = e.pageX - parentOffset.left;
766  var relY = e.pageY - parentOffset.top;
767  $(this).find(".btn_wave_circle").css({ "left": relX, "top": relY });
768  $(this).find(".btn_wave_circle").removeClass("explode-circle");
769  $(this).find(".btn_wave_circle").addClass("desplode-circle");
770});
771
772
773/*
774 * count
775 */
776$.fn.countTo = function(options) { options = options || {}; return $(this).each(function() { var settings = $.extend({}, $.fn.countTo.defaults, { from: $(this).data('from'), to: $(this).data('to'), speed: $(this).data('speed'), refreshInterval: $(this).data('refresh-interval'), decimals: $(this).data('decimals') }, options); var loops = Math.ceil(settings.speed / settings.refreshInterval),
777      increment = (settings.to - settings.from) / loops; var self = this,
778      $self = $(this),
779      loopCount = 0,
780      value = settings.from,
781      data = $self.data('countTo') || {};
782    $self.data('countTo', data); if (data.interval) { clearInterval(data.interval) } data.interval = setInterval(updateTimer, settings.refreshInterval);
783    render(value);
784
785    function updateTimer() { value += increment;
786      loopCount++;
787      render(value);
787 if (typeof(settings.onUpdate) == 'function') { settings.onUpdate.call(self, value) } if (loopCount >= loops) { $self.removeData('countTo');
788        clearInterval(data.interval);
789        value = settings.to; if (typeof(settings.onComplete) == 'function') { settings.onComplete.call(self, value) } } }
790
791    function render(value) { var formattedValue = settings.formatter.call(self, value, settings);
792      $self.html(formattedValue) } }) };
793$.fn.countTo.defaults = { from: 0, to: 0, speed: 1, refreshInterval: 0.5, decimals: 0, formatter: formatter, onUpdate: null, onComplete: null };
794
795function formatter(value, settings) { return value.toFixed(settings.decimals) }

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.