PageSourceSearch

https://innosyncweb.netlify.app/assets/js/main.js

js innosyncweb.netlify.app collected 2026-10-03 10:55:00 UTC 30,212 bytes, 1,004 lines download raw bytes

1(function ($) {
2  'use strict';
3
4  /*--------------------------------------------------------------
5    Scripts initialization
6  --------------------------------------------------------------*/
7  
8  $.exists = function (selector) {
9    return $(selector).length > 0;
10  };
11
12  $(window).on('load', function () {
13    $(window).trigger('scroll');
14    $(window).trigger('resize');
15    preloader();
16    isotopInit();
17  });
18
19  $(function () {
20    $(window).trigger('resize');
21    mainNav();
22    stickyHeader();
23    dynamicBackground();
24    slickInit();
25    isotopInit();
26    review();
27    modalVideo();
28    tabs();
29    accordian();
30    counterInit();
31    rippleInit();
32    parallaxEffect();
33    hobbleEffect();
34    hoverTab();
35    lightGalleryInit();
36    scrollUp();
37    portfolioSection();
38    parallaxSwiperSlider();
39    fullScreenSwiperSlider();
40    ecommerce();
41    if ($.exists('.wow')) {
42      new WOW().init();
43    }
44  });
45
46  $(window).on('scroll', function () {
47    counterInit();
48    parallaxEffect();
49    showScrollUp();
50  });
51
52  /*--------------------------------------------------------------
53    1. Preloader
54  --------------------------------------------------------------*/
55  function preloader() {
56    $('.cs-preloader_in').fadeOut();
57    $('.cs-preloader').delay(150).fadeOut('slow');
58  }
59
60  /*--------------------------------------------------------------
61    2. Mobile Menu
62  --------------------------------------------------------------*/
63  function mainNav() {
64    $('.cs-nav').append('<span class="cs-munu_toggle"><span></span></span>');
65    $('.menu-item-has-children').append(
66      '<span class="cs-munu_dropdown_toggle"></span>',
67    );
68    $('.cs-munu_toggle').on('click', function () {
69      $(this)
70        .toggleClass('cs-toggle_active')
71        .siblings('.cs-nav_list')
72        .slideToggle();
73    });
74    $('.cs-munu_dropdown_toggle').on('click', function () {
75      $(this).toggleClass('active').siblings('ul').slideToggle();
76      $(this).parent().toggleClass('active');
77    });
78    // Mega Menu
79    // $('.cs-mega_wrapper>li>a').removeAttr('href');
80    // Modal Btn
81    $('.cs-mode_btn').on('click', function () {
82      $(this).toggleClass('active');
83      $('body').toggleClass('cs-dark');
84    });
85    // Side Nav
86    $('.cs-icon_btn').on('click', function () {
87      $('.cs-side_header').addClass('active');
88    });
89    $('.cs-close, .cs-side_header_overlay').on('click', function () {
90      $('.cs-side_header').removeClass('active');
91    });
92  }
93
94  /*--------------------------------------------------------------
95    3. Sticky Header
96  --------------------------------------------------------------*/
97  function stickyHeader() {
98    var $window = $(window);
99    var lastScrollTop = 0;
100    var $header = $('.cs-sticky_header');
101    var headerHeight = $header.outerHeight() + 30;
102
103    $window.scroll(function () {
104      var windowTop = $window.scrollTop();
105
106      if (windowTop >= headerHeight) {
107        $header.addClass('cs-gescout_sticky');
108      } else {
109        $header.removeClass('cs-gescout_sticky');
110        $header.removeClass('cs-gescout_show');
111      }
112
113      if ($header.hasClass('cs-gescout_sticky')) {
114        if (windowTop < lastScrollTop) {
115          $header.addClass('cs-gescout_show');
116        } else {
117          $header.removeClass('cs-gescout_show');
118        }
119      }
120
121      lastScrollTop = windowTop;
122    });
123  }
124
125  /*--------------------------------------------------------------
126    4. Dynamic Background
127  --------------------------------------------------------------*/
128  function dynamicBackground() {
129    $('[data-src]').each(function () {
130      var src = $(this).attr('data-src');
131      $(this).css({
132        'background-image': 'url(' + src + ')',
133      });
134    });
135  }
136
137  /*--------------------------------------------------------------
138    5. Slick Slider
139  --------------------------------------------------------------*/
140  function slickInit() {
141    if ($.exists('.cs-slider')) {
142      $('.cs-slider').each(function () {
143        // Slick Variable
144        var $ts = $(this).find('.cs-slider_container');
145        var $slickActive = $(this).find('.cs-slider_wrapper');
146
147        // Auto Play
148        var autoPlayVar = parseInt($ts.attr('data-autoplay'), 10);
149        // Auto Play Time Out
150        var autoplaySpdVar = 3000;
151        if (autoPlayVar > 1) {
152          autoplaySpdVar = autoPlayVar;
153          autoPlayVar = 1;
154        }
155        // Slide Change Speed
156        var speedVar = parseInt($ts.attr('data-speed'), 10);
157        // Slider Loop
158        var loopVar = Boolean(parseInt($ts.attr('data-loop'), 10));
159        // Slider Center
160        var centerVar = Boolean(parseInt($ts.attr('data-center'), 10));
161        // Variable Width
162        var variableWidthVar = Boolean(
163          parseInt($ts.attr('data-variable-width'), 10),
164        );
165        // Pagination
166        var paginaiton = $(this)
167          .find('.cs-pagination')
168          .hasClass('cs-pagination');
169        // Slide Per View
170        var slidesPerView = $ts.attr('data-slides-per-view');
171        if (slidesPerView == 1) {
172          slidesPerView = 1;
173        }
174        if (slidesPerView == 'responsive') {
175          var slidesPerView = parseInt($ts.attr('data-add-slides'), 10);
176          var lgPoint = parseInt($ts.attr('data-lg-slides'), 10);
177          var mdPoint = parseInt($ts.attr('data-md-slides'), 10);
178          var smPoint = parseInt($ts.attr('data-sm-slides'), 10);
179          var xsPoing = parseInt($ts.attr('data-xs-slides'), 10);
180        }
181        // Fade Slider
182        var fadeVar = parseInt($($ts).attr('data-fade-slide'));
183        fadeVar === 1 ? (fadeVar = true) : (fadeVar = false);
184
185        // Slick Active Code
186        $slickActive.slick({
187          autoplay: autoPlayVar,
188          dots: paginaiton,
189          centerPadding: '28%',
190          speed: speedVar,
191          infinite: loopVar,
192          autoplaySpeed: autoplaySpdVar,
193          centerMode: centerVar,
194          fade: fadeVar,
195          prevArrow: $(this).find('.cs-left_arrow'),
196          nextArrow: $(this).find('.cs-right_arrow'),
197          appendDots: $(this).find('.cs-pagination'),
198          slidesToShow: slidesPerView,
199          variableWidth: variableWidthVar,
200          // slidesToScroll: slidesPerView,
201          responsive: [
202            {
203              breakpoint: 1600,
204              settings: {
205                slidesToShow: lgPoint,
206                // slidesToScroll: lgPoint,
207              },
208            },
209            {
210              breakpoint: 1200,
211              settings: {
212                slidesToShow: mdPoint,
213                // slidesToScroll: mdPoint,
214              },
215            },
216            {
217              breakpoint: 992,
218              settings: {
219                slidesToShow: smPoint,
220                // slidesToScroll: smPoint,
221              },
222            },
223            {
224              breakpoint: 768,
225              settings: {
226                slidesToShow: xsPoing,
227                slidesToScroll: xsPoing,
228              },
229            },
230          ],
231        });
232      });
233    }
234    // Testimonial Slider
235    $('.slider-for').slick({
236      slidesToShow: 1,
237      slidesToScroll: 1,
238      arrows: true,
239      asNavFor: '.slider-nav',
240    });
241
242    $('.slider-nav').slick({
243      slidesToShow: 2,
244      slidesToScroll: 1,
245      asNavFor: '.slider-for',
246      dots: true,
247      centerMode: true,
248      focusOnSelect: true,
249      variableWidth: true,
250    });
251  }
252
253  /*--------------------------------------------------------------
254    6. Isotop Initialize
255  --------------------------------------------------------------*/
256  function isotopInit() {
257    if ($.exists('.cs-isotop')) {
258      $('.cs-isotop').isotope({
259        itemSelector: '.cs-isotop_item',
260        transitionDuration: '0.60s',
261        percentPosition: true,
262        masonry: {
263          columnWidth: '.cs-grid_sizer',
264        },
265      });
266      /* Active Class of Portfolio*/
267      $('.cs-isotop_filter ul li').on('click', function (event) {
268        $(this).siblings('.active').removeClass('active');
269        $(this).addClass('active');
270        event.preventDefault();
271      });
272      /*=== Portfolio filtering ===*/
273      $('.cs-isotop_filter ul').on('click', 'a', function () {
274        var filterElement = $(this).attr('data-filter');
275        $('.cs-isotop').isotope({
276          filter: filterElement,
277        });
278      });
279    }
280  }
281
282  /*--------------------------------------------------------------
283    7. Review
284  --------------------------------------------------------------*/
285  function review() {
286    $('.cs-rating').each(function () {
287      var review = $(this).data('rating');
288      var reviewVal = review * 20 + '%';
289      $(this).find('.cs-rating_percentage').css('width', reviewVal);
290    });
291  }
292
293  /*--------------------------------------------------------------
294    8. Modal Video
295  --------------------------------------------------------------*/
296  function modalVideo() {
297    $(document).on('click', '.cs-video_open', function (e) {
298      e.preventDefault();
299      var video = $(this).attr('href');
300      video = video.split('?v=')[1].trim();
301      $('.cs-video_popup_container iframe').attr(
302        'src',
303        `https://www.youtube.com/embed/${video}`,
304      );
305      $('.cs-video_popup').addClass('active');
306    });
307    $('.cs-video_popup_close, .cs-video_popup_layer').on('click', function (e) {
308      $('.cs-video_popup').removeClass('active');
309      $('html').removeClass('overflow-hidden');
310      $('.cs-video_popup_container iframe').attr('src', 'about:blank');
311      e.preventDefault();
312    });
313  }
314
315  /*--------------------------------------------------------------
316    9. Tabs
317  --------------------------------------------------------------*/
318  function tabs() {
319    $('.cs-tabs .cs-tab_links a').on('click', function (e) {
320      var currentAttrValue = $(this).attr('href');
321      $('.cs-tabs ' + currentAttrValue)
322        .fadeIn(400)
323        .siblings()
324        .hide();
325      $(this).parents('li').addClass('active').siblings().removeClass('active');
326      e.preventDefault();
327    });
328  }
329
330  /*--------------------------------------------------------------
331    10. Accordian
332  --------------------------------------------------------------*/
333  function accordian() {
334    $('.cs-accordian').children('.cs-accordian_body').hide();
335    $('.cs-accordian.active').children('.cs-accordian_body').show();
336    $('.cs-accordian_head').on('click', function () {
337      $(this)
338        .parent('.cs-accordian')
339        .siblings()
340        .children('.cs-accordian_body')
341        .slideUp(250);
342      $(this).siblings().slideDown(250);
343      $(this)
344        .parent()
345        .parent()
346        .siblings()
347        .find('.cs-accordian_body')
348        .slideUp(250);
349      /* Accordian Active Class */
350      $(this).parents('.cs-accordian').addClass('active');
351      $(this).parent('.cs-accordian').siblings().removeClass('active');
352    });
353  }
354
355  /*--------------------------------------------------------------
356    11. Counter Animation
357  --------------------------------------------------------------*/
358  function counterInit() {
359    if ($.exists('.odometer')) {
360      $(window).on('scroll', function () {
361        function winScrollPosition() {
362          var scrollPos = $(window).scrollTop(),
363            winHeight = $(window).height();
364          var scrollPosition = Math.round(scrollPos + winHeight / 1.2);
365          return scrollPosition;
366        }
367
368        $('.odometer').each(function () {
369          var elemOffset = $(this).offset().top;
370          if (elemOffset < winScrollPosition()) {
371            $(this).html($(this).data('count-to'));
372          }
373        });
374      });
375    }
376  }
377
378  /*--------------------------------------------------------------
379    12. Ripple
380  --------------------------------------------------------------*/
381  function rippleInit() {
382    if ($.exists('.cs-ripple_version')) {
383      $('.cs-ripple_version').each(function () {
384        $('.cs-ripple_version').ripples({
385          resolution: 512,
386          dropRadius: 20,
387          perturbance: 0.04,
388        });
389      });
390    }
391  }
392
393  /*--------------------------------------------------------------
394    13. Parallax
395  --------------------------------------------------------------*/
396  function parallaxEffect() {
397    $('.cs-parallax_bg, .cs-parallax').each(function () {
398      var windowScroll = $(document).scrollTop(),
399        windowHeight = $(window).height(),
400        barOffset = $(this).offset().top,
401        barHeight = $(this).height(),
402        barScrollAtZero = windowScroll - barOffset + windowHeight,
403        barHeightWindowHeight = windowScroll + windowHeight,
404        barScrollUp = barOffset <= windowScroll + windowHeight,
405        barSctollDown = barOffset + barHeight >= windowScroll;
406
407      if (barSctollDown && barScrollUp) {
408        var calculadedHeight = barHeightWindowHeight - barOffset;
409        var largeEffectPixel = calculadedHeight / 5 - 150;
410        var mediumEffectPixel = calculadedHeight / 20;
411        var miniEffectPixel = calculadedHeight / 10;
412
413        $(this)
414          .find('.cs-to_left')
415          .css('transform', `translateX(-${miniEffectPixel}px)`);
416        $(this)
417          .find('.cs-to_right')
418          .css('transform', `translateX(${miniEffectPixel}px)`);
419        $(this)
420          .find('.cs-to_up')
421          .css('transform', `translateY(-${miniEffectPixel}px)`);
422        $(this)
423          .find('.cs-to_down')
424          .css('transform', `translateY(${miniEffectPixel}px)`);
425        $(this)
426          .find('.cs-to_rotate')
427          .css('transform', `rotate(${miniEffectPixel}deg)`);
428        $(this).css('background-position', `center -${largeEffectPixel}px`);
429      }
430    });
431  }
432
433  /*--------------------------------------------------------------
434    14. Hobble Effect
435  --------------------------------------------------------------*/
436  function hobbleEffect() {
437    $(document)
438      .on('mousemove', '.cs-hobble', function (event) {
439        var halfW = this.clientWidth / 2;
440        var halfH = this.clientHeight / 2;
441        var coorX = halfW - (event.pageX - $(this).offset().left);
442        var coorY = halfH - (event.pageY - $(this).offset().top);
443        var degX1 = (coorY / halfH) * 8 + 'deg';
444        var degY1 = (coorX / halfW) * -8 + 'deg';
445        var degX2 = (coorY / halfH) * -50 + 'px';
446        var degY2 = (coorX / halfW) * 70 + 'px';
447        var degX3 = (coorY / halfH) * -10 + 'px';
448        var degY3 = (coorX / halfW) * 10 + 'px';
449        var degX4 = (coorY / halfH) * 15 + 'deg';
450        var degY4 = (coorX / halfW) * -15 + 'deg';
451        var degX5 = (coorY / halfH) * -30 + 'px';
452        var degY5 = (coorX / halfW) * 60 + 'px';
453
454        $(this)
455          .find('.cs-hover_layer1')
456          .css('transform', function () {
457            return (
458              'perspective( 800px ) translate3d( 0, 0, 0 ) rotateX(' +
459              degX1 +
460              ') rotateY(' +
461              degY1 +
462              ')'
463            );
464          });
465        $(this)
466          .find('.cs-hover_layer2')
467          .css('transform', function () {
468            return (
469              'perspective( 800px ) translateY(' +
470              degX2 +
471              ') translateX(' +
472              degY2 +
473              ')'
474            );
475          });
476        $(this)
477          .find('.cs-hover_layer3')
478          .css('transform', function () {
479            return (
480              'perspective( 800px ) translateX(' +
481              degX3 +
482              ') translateY(' +
483              degY3 +
484              ') scale(1.02)'
485            );
486          });
487      })
488      .on('mouseout', '.cs-hobble', function () {
489        $(this).find('.cs-hover_layer1').removeAttr('style');
490        $(this).find('.cs-hover_layer2').removeAttr('style');
491        $(this).find('.cs-hover_layer3').removeAttr('style');
492      });
493  }
494  /*--------------------------------------------------------------
495    15. Social Button Hover
496  --------------------------------------------------------------*/
497  function hoverTab() {
498    $('.cs-hover_tab a').hover(function () {
499      $(this)
500        .parents('.cs-hover_tab')
501        .addClass('active')
502        .siblings()
503        .removeClass('active');
504    });
505  }
506  /*--------------------------------------------------------------
507    16. Light Gallery
508  --------------------------------------------------------------*/
509  function lightGalleryInit() {
510    $('.cs-lightgallery').each(function () {
511      $(this).lightGallery({
512        selector: '.cs-lightbox_item',
513        subHtmlSelectorRelative: false,
514        thumbnail: false,
515        mousewheel: true,
516      });
517    });
518  }
519
520  /*--------------------------------------------------------------
521    17. Scroll Up
522  --------------------------------------------------------------*/
523  function scrollUp() {
524    $('.cs-scrollup').on('click', function (e) {
525      e.preventDefault();
526      $('html,body').animate(
527        {
528          scrollTop: 0,
529        },
530        0,
531      );
532    });
533  }
534  // For Scroll Up
535  function showScrollUp() {
536    let scroll = $(window).scrollTop();
537    if (scroll >= 350) {
538      $('.cs-scrollup').addClass('cs-scrollup_show');
539    } else {
540      $('.cs-scrollup').removeClass('cs-scrollup_show');
541    }
542  }
543
544  /*--------------------------------------------------------------
545    18. Portfolio Section
546  --------------------------------------------------------------*/
547  function portfolioSection() {
548    $('.cs-portfolio.cs-style2 .cs-text_btn').hover(
549      function () {
550        $(this)
551          .parents('.cs-portfolio')
552          .find('.cs-portfolio_img')
553          .addClass('active');
554      },
555      function () {
556        $(this)
557          .parents('.cs-portfolio')
558          .find('.cs-portfolio_img')
559          .removeClass('active');
560      },
561    );
562  }
563  /*--------------------------------------------------------------
564    20. Parallax Swiper Slider
565  --------------------------------------------------------------*/
566  function parallaxSwiperSlider() {
567    if ($.exists('.cs-parallax_slider')) {
568      // Params
569      let mainSliderSelector = '.cs-parallax_slider',
570        interleaveOffset = 0.5;
571      // Main Slider
572      let mainSliderOptions = {
573        loop: true,
574        speed: 1000,
575        autoplay: false,
576        loopAdditionalSlides: 10,
577        grabCursor: true,
578        watchSlidesProgress: true,
579        mousewheel: true,
580        navigation: {
581          nextEl: '.cs-swiper_button_next',
582          prevEl: '.cs-swiper_button_prev',
583        },
584        pagination: {
585          el: '.cs-swiper_pagination',
586          clickable: true,
587        },
588        on: {
589          init: function () {
590            this.autoplay.stop();
591          },
592          imagesReady: function () {
593            this.el.classList.remove('loading');
594            this.autoplay.start();
595          },
596          progress: function (swiper) {
597            for (let i = 0; i < swiper.slides.length; i++) {
598              let slideProgress = swiper.slides[i].progress,
599                innerOffset = swiper.width * interleaveOffset,
600                innerTranslate = slideProgress * innerOffset;
601
602              swiper.slides[i].querySelector(
603                '.cs-swiper_parallax_bg',
604              ).style.transform = 'translateX(' + innerTranslate + 'px)';
605            }
606          },
607          touchStart: function (swiper) {
608            for (let i = 0; i < swiper.slides.length; i++) {
609              swiper.slides[i].style.transition = '';
610            }
611          },
612          setTransition: function (swiper, transition) {
613            for (let i = 0; i < swiper.slides.length; i++) {
614              swiper.slides[i].style.transition = transition + 'ms';
615              swiper.slides[i].querySelector(
616                '.cs-swiper_parallax_bg',
617              ).style.transition = transition + 'ms';
618            }
619          },
620        },
621      };
622      let mainSlider = new Swiper(mainSliderSelector, mainSliderOptions);
623    }
624  }
625
626  /* Vertical Full Screen Swiper Slider Active */
627  function fullScreenSwiperSlider() {
628    if ($.exists('.cs-fullscreen_swiper_slider')) {
629      var swiper = new Swiper('.cs-fullscreen_swiper_slider', {
630        direction: 'vertical',
631        mousewheel: true,
632        loop: true,
633        speed: 1000,
634        pagination: {
635          el: '.cs-swiper_pagination',
636          clickable: true,
637        },
638        navigation: {
639          nextEl: '.cs-swiper_button_next',
640          prevEl: '.cs-swiper_button_prev',
641        },
642      });
643    }
644  }
645
646  /*--------------------------------------------------------------
647    21. Dynamic contact form
648  --------------------------------------------------------------*/
649  function ecommerce() {
650    // Star Rating Input
651    $('.cs-input_rating i').on('click', function () {
652      $(this).siblings().removeClass('fa-solid');
653      $(this).addClass('fa-solid').prevAll().addClass('fa-solid');
654    });
655    // Product Single Slider
656    $('.cs-single_product_thumb').slick({
657      slidesToShow: 1,
658      slidesToScroll: 1,
659      arrows: false,
660      asNavFor: '.cs-single_product_nav',
661    });
662
663    $('.cs-single_product_nav').slick({
664      slidesToShow: 4,
665      slidesToScroll: 1,
666      asNavFor: '.cs-single_product_thumb',
667      focusOnSelect: true,
668      arrows: false,
669    });
670    // Check All
671    $('#checkAll').change(function () {
672      var isChecked = $(this).prop('checked');
673      $('table input[type="checkbox"]').prop('checked', isChecked);
674    });
675    // Range Slider
676    if ($.exists('#slider-range')) {
677      $('#slider-range').slider({
678        range: true,
679        min: 0,
680        max: 1000,
681        values: [100, 600],
682        slide: function (event, ui) {
683          $('#amount').val('Price: $' + ui.values[0] + ' - $' + ui.values[1]);
684        },
685      });
686    }
687    if ($.exists('#amount')) {
688      $('#amount').val(
689        'Price: $' +
690          $('#slider-range').slider('values', 0) +
691          ' - $' +
692          $('#slider-range').slider('values', 1),
693      );
694    }
695    // Counter
696    $('.cs-increment').click(function () {
697      var countElement = $(this).siblings('.cs-quantity_input');
698      var count = parseInt(countElement.text());
699      count++;
700      countElement.text(count);
701    });
702
703    $('.cs-decrement').click(function () {
704      var countElement = $(this).siblings('.cs-quantity_input');
705      var count = parseInt(countElement.text());
706      if (count > 0) {
707        count--;
708        countElement.text(count);
709      }
710    });
711  }
712  /*--------------------------------------------------------------
713    21. Dynamic contact form
714  --------------------------------------------------------------*/
715  if ($.exists('#cs-form')) {
716    const form = document.getElementById('cs-form');
717    const result = document.getElementById('cs-result');
718
719    form.addEventListener('submit', function (e) {
720      const formData = new FormData(form);
721      e.preventDefault();
722      var object = {};
723      formData.forEach((value, key) => {
724        object[key] = value;
725      });
726      var json = JSON.stringify(object);
727      result.innerHTML = 'Please wait...';
728
729      fetch('https://api.web3forms.com/submit', {
730        method: 'POST',
731        headers: {
732          'Content-Type': 'application/json',
733          Accept: 'application/json',
734        },
735        body: json,
736      })
737        .then(async response => {
738          let json = await response.json();
739          if (response.status == 200) {
740            result.innerHTML = json.message;
741          } else {
742            console.log(response);
743            result.innerHTML = json.message;
744          }
745        })
746        .catch(error => {
747          console.log(error);
748          result.innerHTML = 'Something went wrong!';
749        })
750        .then(function () {
751          form.reset();
752          setTimeout(() => {
753            result.style.display = 'none';
754          }, 5000);
755        });
756    });
757  }
758
759  /*--------------------------------------------------------------
760    22. Cursor Animation
761  --------------------------------------------------------------*/
762  $(function () {
763    $('body').append('<span class="cs-cursor_lg d"></span>');
764    $('body').append('<span class="cs-cursor_sm"></span>');
765    $(
766      '.cs-text_btn, .cs-site_header a, .cs-down_btn, .cs-social_btns a, .cs-menu_widget',
767    ).on('mouseenter', function () {
768      $('.cs-cursor_lg').addClass('opacity-0');
769      $('.cs-cursor_sm').addClass('opacity-0');
770    });
771    $(
772      '.cs-text_btn, .cs-site_header a, .cs-down_btn, .cs-social_btns a, .cs-menu_widget',
773    ).on('mouseleave', function () {
774      $('.cs-cursor_lg').removeClass('opacity-0');
775      $('.cs-cursor_sm').removeClass('opacity-0');
776    });
777  });
778  function cursorMovingAnimation(event) {
779    try {
780      const timing = gsap.timeline({
781        defaults: {
782          x: event.clientX,
783          y: event.clientY,
784        },
785      });
786
787      timing
788        .to('.cs-cursor_lg', {
789          ease: 'power2.out',
790        })
791        .to(
792          '.cs-cursor_sm',
793          {
794            ease: 'power2.out',
795          },
796          '-=0.4',
797        );
798    } catch (err) {
799      console.log(err);
800    }
801  }
802  document.addEventListener('mousemove', cursorMovingAnimation);
803})(jQuery); // End of use strict
804
805
806/* Stat Counter
807    * ------------------------------------------------------ */
808var clStatCount = function() {
809        
810  var statSection = $(".about-stats"),
811      stats = $(".stats__count");
812
813  statSection.waypoint({
814
815      handler: function(direction) {
816
817          if (direction === "down") {
818
819              stats.each(function () {
820                  var $this = $(this);
821
822                  $({ Counter: 0 }).animate({ Counter: $this.text() }, {
823                      duration: 4000,
824                      easing: 'swing',
825                      step: function (curValue) {
826                          $this.text(Math.ceil(curValue));
827                      }
828                  });
829              });
830
831          } 
832
833          // trigger once only
834          this.destroy();
835
836      },
837
838      offset: "90%"
839
840  });
841};
842
843
844document.addEventListener("DOMContentLoaded", function() {
845  var aboutLink = document.querySelector('a[href="#about"]');
846  var portfolioLink = document.querySelector('a[href="#portfolio"]');
847  var bookACallLink = document.querySelector('a[href="#bookacall"]');
848  var servicesLink = document.querySelector('a[href="#services"]');
849  
850  function scrollToSection(event, sectionId) {
851    event.preventDefault(); // Prevent default link behavior
852      
853    var section = document.getElementById(sectionId);
854    if(section) {
855      section.scrollIntoView({ behavior: 'smooth' });
856    }
857  }
858  
859  if(aboutLink) {
860    aboutLink.addEventListener('click', function(event) {
861      scrollToSection(event, 'about');
862    });
863  }
864  
865  if(portfolioLink) {
866    portfolioLink.addEventListener('click', function(event) {
867      scrollToSection(event, 'portfolio');
868    });
869  }
870  
871  if(bookACallLink) {
872    bookACallLink.addEventListener('click', function(event) {
873      scrollToSection(event, 'bookacall');
874    });
875  }
876
877  if(servicesLink) {
878    servicesLink.addEventListener('click', function(event) {
879      scrollToSection(event, 'services');
880    });
881  }
882});
883
884
885      // JavaScript to hide the mobile tab bar on larger screens
886      function checkScreenSize() {
887        var mobileTabBar = document.querySelector('.mobile-tab-bar');
888        if (window.innerWidth > 767) { // If screen width is larger than 767px (typical tablet/desktop)
889          mobileTabBar.style.display = 'none'; // Hide the mobile tab bar
890        } else {
891          mobileTabBar.style.display = 'block'; // Show the mobile tab bar
892        }
893      }
894    
895      // Call the function on page load and resize
896      window.onload = checkScreenSize;
897      window.onresize = checkScreenSize;
898
899
900      particlesJS('particles-js', {
901        "particles": {
902          "number": {
903            "value": 100,
904            "density": {
905              "enable": true,
906              "value_area": 1000
907            }
908          },
909          "color": {
910            "value": "#ff2a00"
911          },
912          "shape": {
913            "type": "circle",
914            "stroke": {
915              "width": 0,
916              "color": "#fffff"
917            },
918            "polygon": {
919              "nb_sides": 5
920            }
921          },
922          "opacity": {
923            "value": 0.8,
924            "random": true,
925            "anim": {
926              "enable": true,
927              "speed": 1,
928              "opacity_min": 0.1,
929              "sync": false
930            }
931          },
932          "size": {
933            "value": 3,
934            "random": true,
935            "anim": {
936              "enable": false,
937              "speed": 40,
938              "size_min": 0.1,
939              "sync": false
940            }
941          },
942          "line_linked": {
943            "enable": true,
944            "distance": 120,
945            "color": "#fff",
946            "opacity": 0.6,
947            "width": 1
948          },
949          "move": {
950            "enable": true,
951            "speed": 4,
952            "direction": "none",
953            "random": true,
954            "straight": false,
955            "out_mode": "out",
956            "bounce": false,
957            "attract": {
958              "enable": false,
959              "rotateX": 600,
960              "rotateY": 1200
961            }
962          }
963        },
964        "interactivity": {
965          "detect_on": "canvas",
966          "events": {
967            "onhover": {
968              "enable": true,
969              "mode": "repulse"
970            },
971            "onclick": {
972              "enable": true,
973              "mode": "push"
974            },
975            "resize": true
976          },
977          "modes": {
978            "grab": {
979              "distance": 200,
980              "line_linked": {
981                "opacity": 1
982              }
983            },
984            "bubble": {
985              "distance": 400,
986              "size": 40,
987              "duration": 2,
988              "opacity": 8,
989              "speed": 3
990            },
991            "repulse": {
992              "distance": 100,
993              "duration": 0.4
994            },
995            "push": {
996              "particles_nb": 4
997            },
998            "remove": {
999              "particles_nb": 2
1000            }
1001          }
1002        },
1003        "retina_detect": true
1004      });

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.