PageSourceSearch

https://spartacks.net/wp-content/themes/spartacks/assets/js/main.js?ver=201513434

js spartacks.net collected 2026-10-03 02:55:18 UTC 36,351 bytes, 1,182 lines download raw bytes

1/**
2*
3* --------------------------------------------------------------------
4*
5* Template : Khelo - Gym, Fitness WordPress Theme
6* Author : rs-theme
7* Author URI : http://www.rstheme.com/
8*
9* --------------------------------------------------------------------
10*
11**/
12(function($) {
13    "use strict";
14    // sticky menu
15    var header = $('.menu-sticky');
16    var win = $(window);
17    var headerinnerHeight = $(".header-inner").innerHeight();
18
19    win.on('scroll', function() {
20       var scroll = win.scrollTop();
21       if (scroll < headerinnerHeight) {
22           header.removeClass("sticky");
23       } else {
24           header.addClass("sticky");
25       }
26    });
27
28    $(".widget_nav_menu li a").filter(function(){
29        return $.trim($(this).html()) == '';
30    }).hide();
31
32    // Canvas Menu Js
33    $( ".nav-link-container > a" ).off("click").on("click", function(event){
34        event.preventDefault();
35        $(".nav-link-container").toggleClass("nav-inactive-menu-link-container");
36        $(".sidenav").toggleClass("nav-active-menu-container");
37    });
38    
39    $(".nav-close-menu-li > a").on('click', function(event){
40        $(".sidenav").toggleClass("nav-active-menu-container");
41        $(".content").toggleClass("inactive-body");
42    });
43
44    // Smooth About
45    if ($('.smoothAbout').length){
46        $(".smoothAbout").on('click', function() {
47            $('html, body').animate({
48                scrollTop: $("#rs-about").offset().top
49            }, 1000);
50        });
51    }
52 
53    // collapse hidden
54    $(function(){ 
55        var navMain = $(".navbar-collapse"); // avoid dependency on #id
56         // "a:not([data-toggle])" - to avoid issues caused
57         // when you have dropdown inside navbar
58         navMain.on("click", "a:not([data-toggle])", null, function () {
59             navMain.collapse('hide');
60        });
61     });
62
63    if($(".club-details_data").length){
64      $(".club-details_data ul li:first-child a").addClass('active show');
65      $(".club-details_data .tab-content > div:first-child").addClass('active show');
66
67    }
68    
69
70    // video 
71    if ($('.player').length) {
72        $(".player").YTPlayer();
73    }
74
75    //Flicker   
76    if ($('ul#rsflicker').length) { 
77        $('ul#rsflicker').jflickrfeed({        
78            limit: flicker_data.limit_f,
79            qstrings: {
80                id: flicker_data.flicker_id
81            },
82            itemTemplate: '<li><a href=\"http://www.flickr.com/photos/'+flicker_data.flicker_id+'"\"><img src=\"{{image_s}}\" alt=\"{{title}}\" /></a></li>'
83        });
84    }
85    if($('.match-list .match-table').length){        
86      $(".match-list .match-table tr:nth-child(2n+1) td").css("background-color", table_row.odd);
87      $(".match-list .match-table tr:nth-child(2n) td").css("background-color", table_row.even);
88    }  
89
90    if($('.rs-result-style-1.row-data-info').length){        
91      $(".rs-result-style-1.row-data-info tr:nth-child(2n+1)").css("background-color", result_table_row.odd);
92      $(".rs-result-style-1.row-data-info tr:nth-child(2n)").css("background-color", result_table_row.even);
93    }   
94  
95    if($('.rs-portfolio-style.pointable').length){        
96      $(".rs-portfolio-style.pointable tr:nth-child(2n+1)").css("background-color", point_table_row.odd);
97      $(".rs-portfolio-style.pointable tr.bg-colors").css("background-color", point_table_row.heading_bg);
98      $(".rs-portfolio-style.pointable tr:nth-child(2n)").css("background-color", point_table_row.even);
99      $(".rs-portfolio-style.pointable tr:nth-child(2n+1) td").css("color", point_table_row.odd_text);
100      $(".rs-portfolio-style.pointable tr:nth-child(2n) td").css("color", point_table_row.even_text);
101    }
102
103    //Feature Left
104    $('.image-carousel').owlCarousel({
105        loop: true,
106        items: 1,
107        mouseDrag: true,
108        dotsContainer: '#item-thumb',  
109    });
110
111    //Upcoming Match Slider
112    $(".umatch-carousel").each(function() {
113        var options = $(this).data('carousel-options');
114        $(this).owlCarousel(options); 
115    });
116
117    //Award Slider
118    if($('.award-carourel').length){
119        $(".award-carourel").each(function() {
120            var options = $(this).data('award-options');
121            $(this).owlCarousel(options); 
122        });
123    }
124
125    //Recent Result Carousel
126    if($('.recent-result-slide').length){
127        $(".recent-result-slide").each(function() {
128            var options = $(this).data('carousel-options');
129            $(this).owlCarousel(options); 
130        });
131    }
132
133
134    $('.slider-service-slick').slick({
135       slidesToShow: 1,
136       slidesToScroll: 1,
137       arrows: false,
138       fade: true,
139       asNavFor: '.slider-nav'
140     });
141    if($('.slider-service-slick').length){
142       $('.slider-nav').slick({
143         slidesToShow: service3_slider_data.col_lg,
144         slidesToScroll: 1,
145         asNavFor: '.slider-service-slick',
146         dots: false,
147         arrows: true,
148         mouseDrag : true,
149         vertical: true,
150         centerMode:true,
151         centerPadding:0,
152         focusOnSelect: true
153      });
154    }
155
156    //search 
157
158     $('.sticky_search').on('click', function(event) {        
159
160        $('.sticky_form').toggle('show');
161
162    });
163
164    //One page menu js
165    if ($('.page-template-page-single-php .nav').length) {
166        $('#single-menu li:first-child').addClass('active');
167        $('#single-menu a').on('click', function(){
168            if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
169              var target = $(this.hash);
170              target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
171              $('#single-menu li').removeClass('active');
172              $(this).parent('li').addClass('active');
173              if (target.length) {
174                $('html, body').animate({
175                  scrollTop: (target.offset().top - 70)
176                }, 1000, "easeInOutExpo");
177                return false;
178              }
179            }
180        });
181
182        var navChildren = $("#single-menu li.menu-item").children("a");
183        var aArray = [];
184        for (var i = 0; i < navChildren.length; i++) {
185            var aChild = navChildren[i];
186            var ahref = $(aChild).attr('href');
187            aArray.push(ahref);
188        }
189
190        $(window).on("scroll", function(){
191            var windowPos = $(window).scrollTop();
192            var windowHeight = $(window).height();
193            var docHeight = $(document).height();
194            for (var i = 0; i < aArray.length; i++) {
195                var theID = aArray[i];
196                var secPosition = $(theID).offset().top;
197                secPosition = secPosition - 135;
198                var divHeight = $(theID).height();
199                divHeight = divHeight + 90;
200                if (windowPos >= secPosition && windowPos < (secPosition + divHeight)) {
201                    $("#single-menu a[href='" + theID + "']").parent().addClass("active");
202                } else {
203                    $("#single-menu a[href='" + theID + "']").parent().removeClass("active");
204                }
205            }
206        });
207    }
208
209    // Get a quote popup
210
211    $('.popup-quote').magnificPopup({
212        type: 'inline',
213        preloader: false,
214        focus: '#qname',
215        removalDelay: 500, //delay removal by X to allow out-animation
216        // When elemened is focused, some mobile browsers in some cases zoom in
217        // It looks not nice, so we disable it:
218        callbacks: {
219            beforeOpen: function() {
220                this.st.mainClass = this.st.el.attr('data-effect');
221                if($(window).width() < 700) {
222                    this.st.focus = false;
223                } else {
224                    this.st.focus = '#qname';
225                }
226            }
227        }
228    });
229
230
231
232
233    $(".rs-heading h3").each(function() {
234  
235      // Some Vars
236      var elText,
237          openSpan = '<span class="first-word">',
238          closeSpan = '</span>';
239      
240      // Make the text into array
241      elText = $(this).text().split(" ");
242      
243      // Adding the open span to the beginning of the array
244      elText.unshift(openSpan);
245      
246      // Adding span closing after the first word in each sentence
247      elText.splice(2, 0, closeSpan);
248      
249      // Make the array into string 
250      elText = elText.join(" ");
251      
252      // Change the html of each element to style it
253      $(this).html(elText);
254    });
255
256    $('.latest-news-slider').slick({
257        slidesToShow: 1,
258        slidesToScroll: 1,
259        arrows: true,
260        fade: false,
261        asNavFor: '.latest-news-nav'
262    });
263    $('.latest-news-nav').slick({
264        slidesToShow: 4,
265        slidesToScroll: 1,
266        asNavFor: '.latest-news-slider',
267        dots: false,
268        centerMode: false,
269        centerPadding: '0',
270        focusOnSelect: true
271    });
272    
273
274     // team init
275    $(".team-carousel").each(function() {
276        var options = $(this).data('carousel-options');
277        $(this).owlCarousel(options); 
278    });
279
280
281    /*----------------------------
282      swiper progressbar Slider
283      ------------------------------ */
284    var swiper_data = $('.swiper-container');
285    if(swiper_data.length){ 
286      var swiper = new Swiper('.swiper-container', {
287          spaceBetween: 30,
288          slidesPerGroup: 1,
289          loop: true,
290          loopFillGroupWithBlank: true,
291          centeredSlides: false,
292          mousewheel: true,
293          direction: 'horizontal',
294          grabCursor: false,
295          autoplay: {
296              delay: 2500,
297              disableOnInteraction: true,
298          },
299          pagination: {
300              el: '.swiper-pagination',
301              type: 'progressbar',
302          },
303          navigation: {
304              nextEl: '.next',
305              prevEl: '.prev',
306          },
307          breakpoints: {
308              320: {
309                  slidesPerView: 1,
310                  spaceBetween: 20,
311              },
312              481: {
313                  slidesPerView: 1,
314                  spaceBetween: 20,
315              },
316              576: {
317                  slidesPerView: player_data.col_sm,
318                  spaceBetween: 20,
319              },
320              768: {
321                  slidesPerView: player_data.col_md,
322                  spaceBetween: 30,
323              },
324              992: {
325                  slidesPerView: player_data.col_lg,
326                  spaceBetween: 30,
327              },
328          }
329      });
330    }
331
332    var swiper_speed = $('.swiper-container');
333    if(swiper_speed.length){ 
334      $(".swiper-container").hover(function() {
335          (this).swiper.autoplay.stop();
336      }, function() {
337          (this).swiper.autoplay.start();
338      }); 
339    } 
340
341    // team init with slick
342    if ($('.team-slider').length) {
343      var sliderDots = "";
344      if(team_item_data.slider_dots==1){
345        sliderDots = true;
346      }
347      var sliderNav = "";
348      if(team_item_data.nav==1){
349        sliderNav = true;
350      }
351      $(".team-slider").each(function() {
352        $(".team-slider").slick({
353            slidesToShow: team_item_data.col_lg,
354            centerMode: false,
355            dots: sliderDots,
356            arrows: sliderNav,
357            autoplay: team_item_data.autoplay,
358            slidesToScroll: 2,
359            centerPadding: '15px',
360            autoplaySpeed: team_item_data.autoplaySpeed,
361            pauseOnHover: team_item_data.pauseOnHover,
362            prevArrow:"<button type='button' class='slick-prev pull-left'><i class='glyph-icon flaticon-left-arrow' aria-hidden='true'></i></button>",
363          nextArrow:"<button type='button' class='slick-next pull-right'><i class='glyph-icon flaticon-right-arrow' aria-hidden='true'></i></button>",
364            responsive: [{
365                breakpoint: 1400,
366                settings: {
367                    centerPadding: '15px',
368                    slidesToShow: team_item_data.col_lg,
369                }
370            }, 
371            {
372                breakpoint: 1200,
373                settings: {
374                    centerPadding: '15px',
375                    slidesToShow: team_item_data.col_md,
376                }
377            }, 
378            {
379                breakpoint: 767,
380                settings: {
381                    centerPadding: '10px',
382                    slidesToShow: team_item_data.col_sm,
383                }
384            },
385            {
386                breakpoint: 480,
387                settings: {
388                    centerPadding: '5px',
389                    slidesToShow: team_item_data.col_xs,
390                    slidesToScroll: 1,
391                }
392            },
393            {
394                breakpoint: 350,
395                settings: {
396                    centerPadding: '0px',
397                    slidesToShow: team_item_data.col_mobile,
398                }
399            }, ]
400        });
401      });
402    }
403
404
405    // partner init
406
407    $(".partner-carousel").each(function() {
408        var options = $(this).data('carousel-options');
409        $(this).owlCarousel(options); 
410    });
411
412
413    //gallery slider carouserl full width
414    if ($('.gallery-carousel').length) {
415        var sliderDots = "";
416        if(gallery_item_data.slider_dots==1){
417          sliderDots = true;
418        }
419
420        $('.gallery-carousel').slick({
421            slidesToShow: gallery_item_data.col_lg,
422            centerMode: false,
423            dots: sliderDots,
424            arrows: false,
425            autoplay: gallery_item_data.autoplay,
426            slidesToScroll: 2,
427            autoplaySpeed: gallery_item_data.autoplaySpeed,
428            pauseOnHover: gallery_item_data.pauseOnHover,
429            centerPadding: '228px',
430            responsive: [{
431                breakpoint: 1200,
432                settings: {
433                    centerPadding: '188px',
434                    slidesToShow: gallery_item_data.col_lg,
435                }
436            }, 
437            {
438                breakpoint: 991,
439                settings: {
440                    centerPadding: '144px',
441                    slidesToShow: gallery_item_data.col_md,
442                }
443            }, 
444            {
445                breakpoint: 767,
446                settings: {
447                    centerPadding: '0px',
448                    slidesToShow: gallery_item_data.col_sm,
449                }
450            },
451            {
452                breakpoint: 480,
453                settings: {
454                    centerPadding: '0px',
455                    slidesToShow: gallery_item_data.col_xs,
456                    slidesToScroll: 1,
457                }
458            },
459            {
460                breakpoint: 350,
461                settings: {
462                    centerPadding: '0px',
463                    slidesToShow: gallery_item_data.col_mobile,
464                }
465            }, ]
466        });
467      }
468    
469     // partner init
470
471       $('.gallery-slider').slick({
472       slidesToShow: 3,
473        slidesToScroll: 1,
474        centerMode: true,
475        focusOnSelect: true,
476        dots: false,
477        centerPadding: '228px',
478        arrows: true,
479        responsive: [{
480            breakpoint: 1200,
481            settings: {
482                centerPadding: '188px',
483            }
484        }, {
485            breakpoint: 970,
486            settings: {
487                arrows: true,
488                centerPadding: '144px',
489            }
490        }, {
491            breakpoint: 767,
492            settings: {
493                arrows: true,
494                centerPadding: '0px',
495            }
496        }, {
497            breakpoint: 350,
498            settings: {
499                arrows: false,
500                centerPadding: '0px',
501                dots: true,
502                slidesToShow: 1,
503            }
504        }, ]
505    });
506
507
508
509    // testimonial init   
510    $('.testi-carousel').slick({
511          centerMode: true,
512          centerPadding: '0px',
513          slidesToShow: 3,
514          focusOnSelect: true,
515          responsive: [
516            {
517              breakpoint: 768,
518              settings: {
519                arrows: false,
520                centerMode: true,
521                centerPadding: '0px',
522                slidesToShow: 3
523              }
524            },
525            {
526              breakpoint: 480,
527              settings: {
528                arrows: false,
529                centerMode: true,
530                centerPadding: '0px',
531                slidesToShow: 1
532              }
533            }
534          ]
535        });
536        
537    
538    $(".testi-item  a.tab").on('click', function(e){
539          e.preventDefault();
540          slideIndex = $(this).index();
541          $( '.testi-carousel' ).slickGoTo( parseInt(slideIndex) );
542    });
543
544    // Portfolio Single Carousel
545    if ($('.cdev').length) {
546         $(".cdev").circlos();
547    }
548
549    // Portfolio Single Carousel
550    if ($('.portfolio-carousel').length) {
551        $('.portfolio-carousel').owlCarousel({
552            loop: true,
553            nav:true,
554            autoHeight:true,
555            items:1
556        })
557    }
558
559    if ($('.upcoming-carousel').length) {
560        $('.upcoming-carousel').owlCarousel({
561            loop: true,
562            nav:true,
563            dots:false,
564            autoHeight:true,
565            items:1
566        })
567    }
568
569
570    // Countdown Single Carousel
571    $('.sports-carousel').on('init', function(e, slick) {
572        var $firstAnimatingElements = $('div.hero-slide:first-child').find('[data-animation]');
573        doAnimations($firstAnimatingElements);    
574    });
575
576    $('.sports-carousel').on('beforeChange', function(e, slick, currentSlide, nextSlide) {
577              var $animatingElements = $('div.hero-slide[data-slick-index="' + nextSlide + '"]').find('[data-animation]');
578              doAnimations($animatingElements);    
579    });
580    if ($('.sports-carousel').length) {
581        $('.sports-carousel').slick({
582           slidesToShow: 1,
583           nav:false,
584           fade: true,
585           arrows: false,
586           dots: false,
587         });
588    }
589    function doAnimations(elements) {
590        var animationEndEvents = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
591        elements.each(function() {
592            var $this = $(this);
593            var $animationDelay = $this.data('delay');
594            var $animationType = 'animated ' + $this.data('animation');
595            $this.css({
596                'animation-delay': $animationDelay,
597                '-webkit-animation-delay': $animationDelay
598            });
599            $this.addClass($animationType).one(animationEndEvents, function() {
600                $this.removeClass($animationType);
601            });
602        });
603    }
604
605
606
607    $('.slider-service-slick').slick({
608       slidesToShow: 1,
609       slidesToScroll: 1,
610       arrows: false,
611       fade: true,
612       asNavFor: '.slider-nav'
613     });
614    
615    // blog init
616
617    $(".blog-carousel").each(function() {
618        var options = $(this).data('carousel-options');
619        $(this).owlCarousel(options); 
620    });
621
622    $(function(){ 
623        $( "ul.children" ).addClass( "sub-menu" );
624    });
625    
626     //Videos popup jQuery activation code
627    $('.popup-videos').magnificPopup({
628        disableOn: 10,
629        type: 'iframe',
630        mainClass: 'mfp-fade',
631        removalDelay: 160,
632        preloader: false,
633
634        fixedContentPos: false
635    });
636
637
638    //type writer
639    $(".rs-banner .cd-words-wrapper p:first-child").addClass("is-visible");
640
641
642    // collapse hidden
643    $(function(){ 
644         var navMain = $(".navbar-collapse"); // avoid dependency on #id
645         // "a:not([data-toggle])" - to avoid issues caused
646         // when you have dropdown inside navbar
647         navMain.on("click", "a:not([data-toggle])", null, function () {
648             navMain.collapse('hide');
649         });
650
651     });
652
653
654    //CountDown Timer   
655    var CountTimer = $('.CountDownTimer');
656    if(CountTimer.length){ 
657        $(".CountDownTimer4").TimeCircles({
658            fg_width: 0.030,
659            bg_width: 0.8,
660            circle_bg_color: "#ffffff",
661            circle_fg_color: "#ffffff",
662
663            time: {
664                Days:{
665                    color: "#fff",
666                    text: events_data.days_text,
667                },
668                Hours:{
669                    text: events_data.hours_text,
670                    color: "#fff"
671                },
672                Minutes:{
673                    text: events_data.minutes_text,
674                    color: "#fff"
675                },
676                Seconds:{
677                    text: events_data.seconds_text,
678                    color: "#fff"
679                }
680            }
681        });
682    }
683
684   //CountDown Timer
685    var CountTimer = $('.CountDownTimer3');
686    if(CountTimer.length){ 
687        $(".CountDownTimer3").TimeCircles({
688            fg_width: 0.030,
689            bg_width: 0.8,
690            circle_bg_color: events_data.ev_circle_bg_color,
691            time: {
692                Days:{
693                    color: "#fff",
694                    text: events_data.days_text,
695                },
696                Hours:{
697                    text: events_data.hours_text,
698                    color: "#fff"
699                },
700                Minutes:{
701                    text: events_data.minutes_text,
702                    color: "#fff"
703                },
704                Seconds:{
705                    text: events_data.seconds_text,
706                    color: "#fff"
707                }
708            }
709        });       
710    }
711
712    //CountDown Timer
713    var CountTimer = $('.CountDownTimer4');
714    if(CountTimer.length){ 
715        $(".CountDownTimer4").TimeCircles({
716            fg_width: 0.030,
717            bg_width: 0.8,
718            circle_bg_color: events_data.ev_circle_bg_color,
719            time: {
720                Days:{
721                    color: "#fff",
722                    text: events_data.days_text,
723                },
724                Hours:{
725                    text: events_data.hours_text,
726                    color: "#fff"
727                },
728                Minutes:{
729                    text: events_data.minutes_text,
730                    color: "#fff"
731                },
732                Seconds:{
733                    text: events_data.seconds_text,
734                    color: "#fff"
735                }
736            }
737        }); 
738    }
739
740
741
742    //Start horizontal timeline js
743        var $index = $('#index'),
744          $wrap = $('#wrap-list'),
745          $wrap_index = $('#wrap-index'),
746          $list = $('#list'),
747          $items = $('> li', $list),
748          n = $items.length,
749          $btn_prev = $('[data-toggle=prev]'),
750          $btn_next = $('[data-toggle=next]');
751
752      // modify style
753      $items.css({
754        width: (100/n) + '%'
755      });
756      $list.css({
757        width: n*100 + '%'
758      }).removeClass('hide');
759      var i_padding = $wrap_index.width();
760      $index.css({
761        width: n*200 + i_padding*2 + 'px',
762        'padding-left': i_padding + 'px',
763        'padding-right': i_padding + 'px',
764      });
765
766      function goToStep(step){
767        var $i_active = $('li', $index).removeClass('active').eq(step).addClass('active');
768        $items.removeClass('show-me').eq(step).addClass('show-me');
769        $list.css({
770          'margin-left': -step*100 + '%'
771        });
772        $('html, body').scrollLeft(0);
773
774        //
775        $btn_prev.add($btn_next).removeClass('disabled');
776        if (step == 0){
777          $btn_prev.addClass('disabled');
778        }
779        if (step == n - 1){
780          $btn_next.addClass('disabled');
781        }
782        
783        // scroll wrap index to center active
784        $wrap_index.animate({
785          scrollLeft: $i_active.position().left - $wrap_index.width()/2 + 100
786        }, 300);
787      }
788
789      // events
790      $('a', $index).on('click', function(){
791        var $li = $(this).parent();
792        if ($li.hasClass('active')){
793          return false;
794        }
795        // step want to go next
796        var step  = $('li', $index).index($li);
797        goToStep(step);
798        return false;
799      }).eq(0).trigger('click');
800
801      $btn_prev.on('click', function(){
802        var $li = $('li.active', $index).prev('li');
803        if ($li.length){
804          $('a', $li).trigger('click');
805        }
806        return false;
807      });
808
809      $btn_next.on('click', function(){
810        var $li = $('li.active', $index).next('li');
811        if ($li.length){
812          $('a', $li).trigger('click');
813        }
814        return false;
815      });
816
817
818  //preloader
819    $(window).on( 'load', function() {
820      $(".loading").delay(800).fadeOut(300);
821      $("#loading").delay(800).fadeOut(300);
822      $("#loading-center").on( 'click', function() {
823      $("#loading").fadeOut(300);
824    })
825
826    if($(window).width() < 992) {
827      $('.rs-menu').css('height', '0');
828      $('.rs-menu').css('opacity', '0');
829      $('.rs-menu').css('z-index', '-1');
830      $('.rs-menu-toggle').on( 'click', function(){
831         $('.rs-menu').css('opacity', '1');
832         $('.rs-menu').css('z-index', '1');
833     });
834    }
835    })
836
837    // image loaded portfolio init
838    $('.grid').imagesLoaded(function() {
839        $('.portfolio-filter').on('click', 'button', function() {
840            var filterValue = $(this).attr('data-filter');
841            $grid.isotope({
842                filter: filterValue
843            });
844        });
845        var $grid = $('.grid').isotope({
846            itemSelector: '.grid-item',
847            percentPosition: true,
848            masonry: {
849                columnWidth: '.grid-item',
850            }
851        });
852    });          
853
854            
855    // portfolio Filter
856    $('.portfolio-filter button').on('click', function(event) {
857        $(this).siblings('.active').removeClass('active');
858        $(this).addClass('active');
859        event.preventDefault();
860    });
861
862
863
864    // Posts loaded Filter init
865    $('.grids').imagesLoaded(function() {
866        $('.portfolio-filters').on('click', 'button', function() {
867            var filterValue = $(this).attr('data-filter');
868            $grid.isotope({
869                filter: filterValue
870            });
871        });
872        var $grid = $('.grids').isotope({
873            itemSelector: '.grid-item',
874            percentPosition: true,
875            masonry: {
876                columnWidth: '.grid-item',
877            }
878        });
879    });
880                
881    // Posts Filter
882    $('.portfolio-filters button').on('click', function(event) {
883        $(this).siblings('.active').removeClass('active');
884        $(this).addClass('active');
885        event.preventDefault();
886    });
887    
888
889     // magnificPopup init
890    $('.image-popup').magnificPopup({
891        type: 'image',
892        callbacks: {
893            beforeOpen: function() {
894               this.st.image.markup = this.st.image.markup.replace('mfp-figure', 'mfp-figure animated zoomInDown');
895            }
896        },
897        gallery: {
898            enabled: true
899        }
900    });
901
902         
903    // Counter Up  
904    $('.rs-counter').counterUp({
905        delay: 20,
906        time: 1500
907    });
908    
909    // scrollTop init
910    var win=$(window);
911    var totop = $('#scrollUp');    
912    win.on('scroll', function() {
913        if (win.scrollTop() > 150) {
914            totop.fadeIn();
915        } else {
916            totop.fadeOut();
917        }
918    });
919    totop.on('click', function() {
920        $("html,body").animate({
921            scrollTop: 0
922        }, 500)
923    }); 
924
925
926
927    $(function(){ 
928        $( "ul.children" ).addClass( "sub-menu" );
929    });
930
931
932    $(".sidenav .menu li").on('click', function() {
933        $(this).children("ul.sub-menu").slideToggle();
934    }); 
935
936    $( ".comment-body, .comment-respond" ).wrap( "<div class='comment-full'></div>" ); 
937
938
939    // Sticky Sidebar
940    $('.contents-sticky, .sticky-sidebar').theiaStickySidebar({
941        additionalMarginTop: 160,
942        additionalMarginBottom: 20,
943    });
944
945
946    //services style js
947
948    $(".services-main").on({
949       mouseenter: function(){
950            var icon_hover = $(this).data('icon-hover');
951            var icon_hover_bg = $(this).data('icon-hoverbg');
952            var title_hover_color = $(this).data('title-hover');
953            $(this).find(".services-icon i").css('color', icon_hover);         
954            $(this).find(".services-icon i").css('background-color', icon_hover_bg);         
955            $(this).find(".services-icon h2 a").css('color', title_hover_color);
956        },
957        mouseleave: function(){
958            var icon_color = $(this).data('icon-color');
959            var icon_bg = $(this).data('icon-bg');  
960            var title_color = $(this).data('title-color');          
961            $(this).find(".services-icon i").css('color', icon_color);
962            $(this).find(".services-icon i").css('background-color', icon_bg);          
963            $(this).find(".services-icon h2 a").css('color', title_color);    
964        }      
965  }, this);
966
967  //services 2 style
968  $(".services-style-2").on({
969     mouseenter: function(){
970          var title_hover = $(this).data('icon-hover');           
971          $(this).find(".services-title a").css('color', title_hover);            
972      },
973      mouseleave: function(){
974          var title_color = $(this).data('icon-color'); 
975          $(this).find(".services-title a").css('color', title_color);    
976      }      
977  }, this);
978
979  //services 3 style
980  $('.rs-services-style3').each(function(){
981      var overlaybg     = $(this).data('overlay');
982      var opacity    = $(this).data('opacity');
983      var imgid = $(this).find(".bg-img").attr('id');
984
985      $( "<style>.rs-services-style3 #"+ imgid +":after { background: " + overlaybg + "; opacity: " + opacity + " }</style>" ).appendTo( "head" )
986  });
987
988  //services 8 style
989  $(".services-style-8 .services-title a").on({
990     mouseenter: function(){
991          var title_hover = $(this).data('onhovercolor'); 
992          $(this).css('color', title_hover);        
993      },
994      mouseleave: function(){
995          var title_color = $(this).data('onleavecolor'); 
996          $(this).css('color', title_color); 
997      }      
998  }, this);
999
1000  //services 4 & 5 style
1001  $(".rs-services-style4 .services-title a, .rs-services-style5 .services-title a").on({
1002     mouseenter: function(){
1003          var title_hover = $(this).data('onhovercolor'); 
1004          $(this).css('color', title_hover);        
1005      },
1006      mouseleave: function(){
1007          var title_color = $(this).data('onleavecolor'); 
1008          $(this).css('color', title_color); 
1009      }      
1010  }, this);
1011
1012  //services 4 & 5 style
1013  $(".rs-popular-classes .single-classes .classes-content .title-bar a").on({
1014     mouseenter: function(){
1015          var title_hover = $(this).data('onhovercolor'); 
1016          $(this).css('color', title_hover);        
1017      },
1018      mouseleave: function(){
1019          var title_color = $(this).data('onleavecolor'); 
1020          $(this).css('color', title_color); 
1021      }      
1022  }, this);
1023
1024  //title hover for sevices
1025    $('.rs-services1 a, .rs-services-style6 a, .services-style-7 a').on('hover', function() {
1026      $(this).css({
1027        'color': $(this).data('onhovercolor')
1028        });
1029    }, function() {
1030      $(this).css({
1031        'color': $(this).data('onleavecolor')
1032      
1033    });   
1034  }); 
1035
1036
1037    //For Video
1038    $('.rs-video-2').each(function(){
1039      var btnBg     = $(this).find(".popup-videos").data('bg');
1040      var iconColor = $(this).find(".popup-videos i").data('icolor');
1041      var videoId = $(this).find(".popup-videos").attr('id');
1042
1043      $( "<style>.rs-video-2 #"+ videoId +":before { background: " + btnBg + " }</style>" ).appendTo( "head" )
1044      $( "<style>.rs-video-2 #"+ videoId +" i:before { color: " + iconColor + " }</style>" ).appendTo( "head" )
1045    });
1046
1047  //for button
1048  $(".rs-btn a").on({
1049       mouseenter: function(){
1050            var btnBg = $(this).data('onhoverbg');            
1051            var btnBorder = $(this).data('onhoverbg');            
1052            var btnColor = $(this).data('onhovercolor');            
1053
1054            $(this).css('border-color', btnBorder);
1055            $(this).css('color', btnColor);
1056        },
1057        mouseleave: function(){
1058            var btnHoverBg = $(this).data('onleavebg');
1059            var btnBorder = $(this).data('bordercolor');
1060            var btnHoverColor = $(this).data('onleavecolor');
1061            
1062            $(this).css('border-color', btnBorder); 
1063            $(this).css('color', btnHoverColor);   
1064        }      
1065  }, this);
1066
1067  $(".rs-btn2 a").on({
1068       mouseenter: function(){
1069            var btnBg = $(this).data('onhoverbg');            
1070            var btnBorder = $(this).data('onhoverbg');            
1071            var btnColor = $(this).data('onhovercolor');            
1072
1073            $(this).css('background-color', btnBg);
1074            $(this).css('border-color', btnBorder);
1075            $(this).css('color', btnColor);
1076        },
1077        mouseleave: function(){
1078            var btnHoverBg = $(this).data('onleavebg');
1079            var btnBorder = $(this).data('bordercolor');
1080            var btnHoverColor = $(this).data('onleavecolor');
1081
1082            $(this).css('border-color', btnBorder); 
1083            $(this).css('background-color', btnHoverBg);
1084            $(this).css('color', btnHoverColor);   
1085        }      
1086  }, this);
1087
1088  $(".rs-cta .button-wrap a").on({
1089       mouseenter: function(){
1090            var btnBg = $(this).data('hoverbg');            
1091            var btnBorder = $(this).data('hoverborder');            
1092            var btnColor = $(this).data('hovertext');            
1093
1094            $(this).css('background-color', btnBg);
1095            $(this).css('border-color', btnBorder);
1096            $(this).css('color', btnColor);
1097        },
1098        mouseleave: function(){
1099            var btnHoverBg = $(this).data('leavebg');
1100            var btnBorder = $(this).data('leaveborder');
1101            var btnHoverColor = $(this).data('leavecolor');
1102
1103            $(this).css('background-color', btnHoverBg);
1104            $(this).css('border-color', btnBorder); 
1105            $(this).css('color', btnHoverColor);   
1106        }      
1107  }, this);
1108
1109
1110    //woocommerce quantity style
1111    if ( ! String.prototype.getDecimals ) {
1112          String.prototype.getDecimals = function() {
1113              var num = this,
1114                  match = ('' + num).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
1115              if ( ! match ) {
1116                  return 0;
1117              }
1118              return Math.max( 0, ( match[1] ? match[1].length : 0 ) - ( match[2] ? +match[2] : 0 ) );
1119          }
1120    }
1121    $('.rs-products-slider .product-item .product-btn a').addClass('glyph-icon flaticon-basket');
1122    // Quantity "plus" and "minus" buttons
1123    $( document.body ).on( 'click', '.plus, .minus', function() {
1124        var $qty        = $( this ).closest( '.quantity' ).find( '.qty'),
1125            currentVal  = parseFloat( $qty.val() ),
1126            max         = parseFloat( $qty.attr( 'max' ) ),
1127            min         = parseFloat( $qty.attr( 'min' ) ),
1128            step        = $qty.attr( 'step' );
1129
1130        // Format values
1131        if ( ! currentVal || currentVal === '' || currentVal === 'NaN' ) currentVal = 0;
1132        if ( max === '' || max === 'NaN' ) max = '';
1133        if ( min === '' || min === 'NaN' ) min = 0;
1134        if ( step === 'any' || step === '' || step === undefined || parseFloat( step ) 
1134=== 'NaN' ) step = 1;
1135
1136        // Change the value
1137        if ( $( this ).is( '.plus' ) ) {
1138            if ( max && ( currentVal >= max ) ) {
1139                $qty.val( max );
1140            } else {
1141                $qty.val( ( currentVal + parseFloat( step )).toFixed( step.getDecimals() ) );
1142            }
1143        } else {
1144            if ( min && ( currentVal <= min ) ) {
1145                $qty.val( min );
1146            } else if ( currentVal > 0 ) {
1147                $qty.val( ( currentVal - parseFloat( step )).toFixed( step.getDecimals() ) );
1148            }
1149        }
1150
1151        // Trigger change event
1152        $qty.trigger( 'change' );
1153    });
1154
1155    $('.team-carousel-single').owlCarousel({
1156      items:3,
1157      loop:true,
1158      margin:10,
1159      dots:false,
1160      autoplay:true,
1161      navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"],
1162      autoplayTimeout:3000,
1163      autoplayHoverPause:true,      
1164      responsive:{
1165          0:{
1166              items:1,
1167              nav:true
1168          },
1169          600:{
1170              items:2,
1171              nav:false
1172          },
1173          1000:{
1174              items:3,
1175              nav:true            
1176          }
1177      }
1178  })
1179
1180  
1181
1182})(jQuery);  

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.