PageSourceSearch

https://universum-clean.de/wp-content/themes/cleaning-services/js/custom.js?ver=1790206225

js universum-clean.de collected 2026-10-06 16:34:47 UTC 60,006 bytes, 1,425 lines download raw bytes

1    (function($) {
2
3        "use strict";
4        var target = 3;
5        var $document = $(document),
6            $window = $(window),
7            // Template options
8            templateOption = {
9                stickyHeader: true,
10                smoothScroll: false,
11                backToTop: true
12            },
13
14            // Template Blocks
15            blocks = {
16                mainSlider: $('#mainSlider'),
17                slideNav: $('#slide-nav'),
18                categoryCarousel: $('.category-carousel'),
19                servicesSimpleCarousel: $('.services-carousel'),
20                servicesCarousel: $('.services-mobile-carousel'),
21                servicesCarouselCircle: $('.services-circle-carousel'),
22                testimonialsCarousel: $('.testimonials-carousel'),
23                testimonialsCarousel1: $('.testimonials-carousel-1'),
24                servicesBlockAlt: $('.services-block-alt'),
25                textIconCarousel: $('.text-icon-carousel'),
26                personCarousel: $('.person-carousel'),
27                personCarousel2: $('.person-carousel-2'),
28                numbersCarousel: $('.numbers-carousel'),
29                couponsCarousel: $('.coupons-carousel'),
30                brandCarousel: $('.brand-carousel'),
31                submenu: $('[data-submenu]'),
32                counterBlock: $('.numbers-carousel'),
33                isotopeGallery: $('#isotopeGallery'),
34                slickGallery: $('#slickGallery'),
35                postGallery: $('.blog-isotope'),
36                postCarousel: $('.post-carousel'),
37                newsCarousel: $('.news-carousel'),
38                priceCarousel: $('.price-carousel'),
39                priceCarousel3: $('.price-carousel-3'),
40                priceCarousel1: $('.price-carousel-tab'),
41                textIconsCarousel: $('.text-icon-carousel'),
42                prdCarousel: $('.prd-carousel'),
43                postMoreLink: $('.view-more-post'),
44                testimonialMoreLink: $('.view-more-testimonials'),
45                testimonialsLength: $('.testimonial-item.grid-item'),
46                getQuoteLink: $('.form-popup-link'),
47                animation: $('.animation'),
48                rangeSlider: $('#rangeSlider1'),
49                stickyHeader: $(".header-sticky"),
50                productImage: $("#mainImage"),
51                rtltrue: jQuery('body').hasClass('rtl'),
52                restHtml: '',
53            };
54        // ligth box options
55        lightbox.option({
56                'fadeDuration': 300,
57                'imageFadeDuration': 300,
58                'alwaysShowNavOnTouchDevices': true
59            }
60
61            /* ---------------------------------------------
62             Scripts initialization
63             --------------------------------------------- */
64        );
65
66        $document.ready(function() {
67            if ($('.datetimepicker').length) {
68                $('.datetimepicker').datetimepicker({
69                    format: cleaning_services_ajax_object.form_date_format,
70                    icons: {
71                        time: 'icon icon-clock',
72                        date: 'icon icon-calendar',
73                        up: 'icon icon-arrow_up',
74                        down: 'icon icon-arrow_down',
75                        previous: 'icon icon-arrow-left',
76                        next: 'icon icon-arrow-right',
77                        today: 'icon icon-today',
78                        clear: 'icon icon-trash',
79                        close: 'icon icon-cancel-music'
80                    }
81                });
82            }
83
84
85            $(".cart .input-text.qty.text").spinner({
86                spin: function(event, ui) {
87                    $('.woocommerce-cart-form input[name="update_cart"]').prop('disabled', false);
88                }
89            });
90            $(document.body).on('updated_cart_totals', function() {
91                $(".cart .input-text.qty.text").spinner({
92                    spin: function(event, ui) {
93                        $('.woocommerce-cart-form input[name="update_cart"]').prop('disabled', false);
94                    }
95                });
96            });
97
98            $('.header-cart').on('click', '.prd-sm-delete', function() {
99                $(this).closest('.prd-sm-item').append('<div class="loader-cart-delete"><img src="' + cleaning_services_ajax_object.loader_img + '"></div>');
100                var id = $(this).data('product_id')
101                var qty = $(this).data('qty')
102                var cid = $(this).data('cid')
103                 var vid = $(this).data('variation_id')
104                $.ajax({
105                    type: "POST",
106                    url: cleaning_services_ajax_object.ajax_url,
107                    data: {
108                        action: 'remove_item_from_cart',
109                        product_id: id,
110                        cid: cid,
111                        vid: vid,
112                        security: cleaning_services_ajax_object.ajax_nonce_removecart,
113                    },
114                    success: function(res) {
115                        if (res.fragments) {
116                            $('.cart-contents').replaceWith(res.fragments['a.cart-contents'])
117                            $('.header-cart-dropdown').replaceWith(res.fragments['div.header-cart-dropdown'])
118                        }
119                        $('.loader-cart-delete').replaceWith('');
120                    }
121                });
122            })
123
124
125            var windowWidth = window.innerWidth || $window.width();
126            var windowH = $window.height();
127
128            // set background image inline
129            if ($('[data-bg]').length) {
130                $('[data-bg]').each(function() {
131                    var $this = $(this),
132                        bg = $this.attr('data-bg');
133                    if ($this.hasClass('fullwidth-bg') || $this.hasClass('fullwidth')) {
134                        $this.css({
135                            'background-image': 'url(' + bg + ')'
136                        });
137                    } else {
138                        $this.find('.container').first().css({
139                            'background-image': 'url(' + bg + ')'
140                        });
141                    }
142                });
143            }
144
145            //for testimonials
146            if (blocks.testimonialsLength.length > target) {
147                $('.view-more-testimonials').show();
148            }
149
150            $('.view-more-testimonials').on('click', function() {
151                $('.view-more-testimonials').hide()
152                $('.more-loader').addClass('visible');
153                setTimeout(function() {
154                    var i = 0
155                    var j = 0
156                    $('.testimonial-item.grid-item').each(function() {
157                        if ($(this).is(':visible')) {
158                            j++;
159                        } else {
160                            if (i < target) {
161                                var h = $('.testimonial-item.grid-item:first-child').find('.text').height()
162                                $(this).show()
163                                $(this).find('.text').height(h)
164                                i++
165                            }
166                        }
167                    })
168
169                    if (blocks.testimonialsLength.length == i + j) {
170                        $('.more-loader').removeClass('visible');
171                        $('.view-more-testimonials').hide()
172                    } else {
173                        $('.more-loader').removeClass('visible');
174                        $('.view-more-testimonials').show()
175
176                    }
177                }, 2000);
178            })
179
180
181            // main slider
182            // $(document).ready(function() {
183            //     if (blocks.mainSlider.length) {
184            //         var $el = blocks.mainSlider;
185            //         $el.on('init', function(e, slick) {
186            //             var $firstAnimatingElements = $('div.slide:first-child').find('[data-animation]');
187            //             doAnimations($firstAnimatingElements);
188            //         });
189            //         $el.on('beforeChange', function(e, slick, currentSlide, nextSlide) {
190            //             var $currentSlide = $('div.slide[data-slick-index="' + nextSlide + '"]');
191            //             var $animatingElements = $currentSlide.find('[data-animation]');
192            //             doAnimations($animatingElements);
193            //         });
194            //         $el.slick({
195            //             arrows: JSON.parse(ajax_slickslider.arrows),
196            //             dots: JSON.parse(ajax_slickslider.dots),
197            //             autoplay: JSON.parse(ajax_slickslider.autoplay),
198            //             autoplaySpeed: parseInt(ajax_slickslider.autoplay_speed),
199            //             fade: JSON.parse(ajax_slickslider.fade),
200            //             speed: parseInt(ajax_slickslider.speed),
201            //             rtl: blocks.rtltrue,
202            //             pauseOnHover: JSON.parse(ajax_slickslider.pause_on_hover),
203            //             pauseOnDotsHover: JSON.parse(ajax_slickslider.pause_on_dots_hover)
204            //         });
205            //     }
206            // });
207
208            // number counter
209            if (blocks.counterBlock.length) {
210                blocks.counterBlock.waypoint(function() {
211                    $('.number > span.count', blocks.counterBlock).each(count);
212                }, {
213                    triggerOnce: true,
214                    offset: '80%'
215                });
216            }
217
218            // post isotope
219            if (blocks.postGallery.length) {
220                var $postgallery = $('.blog-isotope');
221                $postgallery.imagesLoaded(function() {
222                    $postgallery.isotope({
223                        itemSelector: '.blog-post, .testimonial-card',
224                        masonry: {
225                            gutter: 30,
226                            columnWidth: '.blog-post, .testimonial-card'
227                        }
228                    });
229                });
230            }
231
232            // product gallery
233            if (blocks.productImage.length) {
234                blocks.productImage.elevateZoom({
235                    gallery: 'productPreviews',
236                    cursor: 'pointer',
237                    galleryActiveClass: 'active',
238                    zoomWindowPosition: 1,
239                    zoomWindowFadeIn: 500,
240                    zoomWindowFadeOut: 500,
241                    lensFadeIn: 500,
242                    lensFadeOut: 500
243                });
244                var ezApi = blocks.productImage.data('elevateZoom');
245                if ((window.innerWidth || $window.width()) < 769) {
246                    ezApi.changeState('disable');
247                }
248                $(window).on('resize', function() {
249                    if ((window.innerWidth || $window.width()) < 769) {
250                        ezApi.changeState('disable');
251                    } else {
252                        ezApi.changeState('enable');
253                    }
254                });
255                $('#productPreviews > a').on('click', function() {
256                    blocks.productImage.attr({
257                        src: $(this).attr('data-image'),
258                        'data-zoom-image': $(this).attr('data-zoom-image')
259                    });
260                });
261            }
262
263            // rangeSlider
264            if (blocks.rangeSlider.length) {
265                var rangeSlider1 = document.getElementById('rangeSlider1');
266                noUiSlider.create(rangeSlider1, {
267                    start: [100, 2000],
268                    connect: true,
269                    step: 100,
270                    padding: 100,
271                    rtl: blocks.rtltrue,
272                    range: {
273                        'min': 0,
274                        'max': 10100
275                    }
276                });
277                var number1_1 = document.getElementById('number-1-1');
278                var number1_2 = document.getElementById('number-1-2');
279                rangeSlider1.noUiSlider.on('update', function(values, handle) {
280                    var value = values[handle];
281                    if (handle) {
282                        number1_1.textContent = Math.round(value);
283                    } else {
284                        number1_2.textContent = Math.round(value);
285                    }
286                });
287                number1_1.addEventListener('change', function() {
288                    rangeSlider1.noUiSlider.set([this.textContent, null]);
289                });
290                number1_2.addEventListener('change', function() {
291                    rangeSlider1.noUiSlider.set([null, this.textContent]);
292                });
293            }
294
295            // CAROUSELS
296            // services simple carousel
297            // if (blocks.servicesSimpleCarousel.length) {
298            //     blocks.servicesSimpleCarousel.slick({
299            //         slidesToShow: JSON.parse(ajax_serviceSlider.slides_to_show),
300            //         slidesToScroll: JSON.parse(ajax_serviceSlider.slides_to_scroll),
301            //         infinite: JSON.parse(ajax_serviceSlider.infinite),
302            //         autoplay: JSON.parse(ajax_serviceSlider.autoplay),
303            //         autoplaySpeed: parseInt(ajax_serviceSlider.autoplay_speed),
304            //         dots: JSON.parse(ajax_serviceSlider.dots),
305            //         arrows: JSON.parse(ajax_serviceSlider.arrows),
306            //         responsive: [{
307            //             breakpoint: 1299,
308            //             settings: {
309            //                 dots: true,
310            //                 arrows: false
311            //             }
312            //         }, {
313            //             breakpoint: 991,
314            //             settings: {
315            //                 slidesToShow: 2,
316            //                 dots: true,
317            //                 arrows: false
318            //             }
319            //         }, {
320            //             breakpoint: 767,
321            //             settings: {
322            //                 slidesToShow: 2,
323            //                 dots: true,
324            //                 arrows: false
325            //             }
326            //         }, {
327            //             breakpoint: 480,
328            //             settings: {
329            //                 slidesToShow: 1,
330            //                 dots: true,
331            //                 arrows: false
332            //             }
333            //         }]
334            //     });
335            // }
336            // if (blocks.servicesSimpleCarousel.length) {
337            //     blocks.servicesSimpleCarousel.slick({
338            //         slidesToShow: JSON.parse(ajax_serviceSlider.slides_to_show),
339            //         slidesToScroll: JSON.parse(ajax_serviceSlider.slides_to_scroll),
340            //         infinite: JSON.parse(ajax_serviceSlider.infinite),
341            //         autoplay: JSON.parse(ajax_serviceSlider.autoplay),
342            //         autoplaySpeed: parseInt(ajax_serviceSlider.autoplay_speed),
343            //         dots: JSON.parse(ajax_serviceSlider.dots),
344            //         arrows: JSON.parse(ajax_serviceSlider.arrows),
345            //         responsive: [{
346            //             breakpoint: 1299,
347            //             settings: {
348            //                 dots: true,
349            //                 arrows: false
350            //             }
351            //         }, {
352            //             breakpoint: 991,
353            //             settings: {
354            //                 slidesToShow: 2,
355            //                 dots: true,
356            //                 arrows: false
357            //             }
358            //         }, {
359            //             breakpoint: 767,
360            //             settings: {
361            //                 slidesToShow: 2,
362            //                 dots: true,
363            //                 arrows: false
364            //             }
365            //         }, {
366            //             breakpoint: 480,
367            //             settings: {
368            //                 slidesToShow: 1,
369            //                 dots: true,
370            //                 arrows: false
371            //             }
372            //         }]
373            //     });
374            // }
375
376            // products carousel
377            if (blocks.prdCarousel.length) {
378                blocks.prdCarousel.slick({
379                    slidesToShow: 4,
380                    slidesToScroll: 1,
381                    infinite: true,
382                    dots: false,
383                    arrows: true,
384                    rtl: blocks.rtltrue,
385                    responsive: [{
386                        breakpoint: 1299,
387                        settings: {
388                            dots: true,
389                            arrows: false
390                        }
391                    }, {
392                        breakpoint: 991,
393                        settings: {
394                            slidesToShow: 3
395                        }
396                    }, {
397                        breakpoint: 767,
398                        settings: {
399                            slidesToShow: 2
400                        }
401                    }, {
402                        breakpoint: 480,
403                        settings: {
404                            slidesToShow: 1
405                        }
406                    }]
407                });
408            }
409
410            // numbers carousel
411            if (blocks.numbersCarousel.length) {
412                blocks.numbersCarousel.slick({
413                    mobileFirst: JSON.parse(ajax_numberslide.mobile_first),
414                    slidesToShow: JSON.parse(ajax_numberslide.slides_to_show),
415                    slidesToScroll: JSON.parse(ajax_numberslide.slides_to_scroll),
416                    infinite: JSON.parse(ajax_numberslide.infinite),
417                    autoplay: JSON.parse(ajax_numberslide.autoplay),
418                    autoplaySpeed: parseInt(ajax_numberslide.autoplay_speed),
419                    rtl: blocks.rtltrue,
420                    arrows: JSON.parse(ajax_numberslide.arrows),
421                    dots: JSON.parse(ajax_numberslide.dots),
422                    responsive: [{
423                        breakpoint: 991,
424                        settings: {
425                            slidesToShow: 3
426                        }
427                    }, {
428                        breakpoint: 767,
429                        settings: {
430                            slidesToShow: 2
431                        }
432                    }, {
433                        breakpoint: 480,
434                        settings: {
435                            slidesToShow: 1,
436                            centerMode: true,
437                            centerPadding: '40px'
438                        }
439                    }]
440                });
441            }
442
443            // coupons carousel
444            if (blocks.couponsCarousel.length) {
445                blocks.couponsCarousel.slick({
446                    mobileFirst: JSON.parse(ajax_coupon.mobile_first),
447                    slidesToShow: JSON.parse(ajax_coupon.slides_to_show),
448                    slidesToScroll: JSON.parse(ajax_coupon.slides_to_scroll),
449                    infinite: JSON.parse(ajax_coupon.infinite),
450                    autoplay: JSON.parse(ajax_coupon.autoplay),
451                    autoplaySpeed: parseInt(ajax_coupon.autoplay_speed),
452                    rtl: blocks.rtltrue,
453                    arrows: JSON.parse(ajax_coupon.arrows),
454                    dots: JSON.parse(ajax_coupon.dots),
455                    responsive: [{
456                        breakpoint: 667,
457                        settings: {
458                            slidesToShow: 1
459                        }
460                    }]
461                });
462            }
463
464            // text_icon carousel
465            if (blocks.textIconCarousel.length) {
466                blocks.textIconCarousel.slick({
467                    mobileFirst: JSON.parse(ajax_textimonials.mobile_first),
468                    slidesToShow: JSON.parse(ajax_textimonials.slides_to_show),
469                    slidesToScroll: JSON.parse(ajax_textimonials.slides_to_scroll),
470                    infinite: JSON.parse(ajax_textimonials.infinite),
471                    autoplay: JSON.parse(ajax_textimonials.autoplay),
472                    rows: JSON.parse(ajax_textimonials.rows_per),
473                    slidesPerRow: JSON.parse(ajax_textimonials.slides_per_row),
474                    autoplaySpeed: parseInt(ajax_textimonials.autoplay_speed),
475                    rtl: blocks.rtltrue,
476                    arrows: JSON.parse(ajax_textimonials.arrows),
477                    dots: JSON.parse(ajax_textimonials.dots),
478                    responsive: [{
479                        breakpoint: 991,
480                        settings: {
481                            slidesPerRow: 1
482                        }
483                    }]
484                });
485            }
486
487            // // testimonials carousel (home page)
488            // if (blocks.testimonialsCarousel.length) {
489            //     blocks.testimonialsCarousel.slick({
490            //         mobileFirst: JSON.parse(ajax_textimonials.mobile_first),
491            //         slidesToShow: JSON.parse(ajax_textimonials.slides_to_show),
492            //         slidesToScroll: JSON.parse(ajax_textimonials.slides_to_scroll),
493            //         infinite: JSON.parse(ajax_textimonials.infinite),
494            //         autoplay: JSON.parse(ajax_textimonials.autoplay),
495            //         autoplaySpeed: parseInt(ajax_textimonials.autoplay_speed),
496            //         rtl: blocks.rtltrue,
497            //         arrows: JSON.parse(ajax_textimonials.arrows),
498            //         dots: JSON.parse(ajax_textimonials.dots),
499            //         cssEase: 'linear',
500            //         responsive: [{
501            //             breakpoint: 1199,
502            //             settings: {
503            //                 arrows: false,
504            //                 dots: true
505            //             }
506            //         }]
507            //     });
508            // }
509            // // testimonials carousel 1 (testimonial page)
510            // if (blocks.testimonialsCarousel1.length) {
511            //     blocks.testimonialsCarousel1.slick({
512            //         mobileFirst: JSON.parse(ajax_textimonials.mobile_first),
513            //         slidesToShow: JSON.parse(ajax_textimonials.slides_to_show),
514            //         slidesToScroll: JSON.parse(ajax_textimonials.slides_to_scroll),
515            //         infinite: JSON.parse(ajax_textimonials.infinite),
516            //         autoplay: JSON.parse(ajax_textimonials.autoplay),
517            //         autoplaySpeed: parseInt(ajax_textimonials.autoplay_speed),
518            //         rtl: blocks.rtltrue,
519            //         arrows: JSON.parse(ajax_textimonials.arrows),
520            //         dots: JSON.parse(ajax_textimonials.dots),
521            //         cssEase: 'linear',
522            //         responsive: [{
523            //             breakpoint: 1299,
524            //             settings: {
525            //                 arrows: false,
526            //                 dots: true
527            //             }
528            //         }]
529            //     });
530            // }
531            // person carousel (team)
532            if (blocks.personCarousel.length) {
533                blocks.personCarousel.slick({
534                    mobileFirst: JSON.parse(ajax_teamcarousel.mobile_first),
535                    slidesToShow: JSON.parse(ajax_teamcarousel.slides_to_show),
536                    slidesToScroll: JSON.parse(ajax_teamcarousel.slides_to_scroll),
537                    infinite: JSON.parse(ajax_teamcarousel.infinite),
538                    autoplay: JSON.parse(ajax_teamcarousel.autoplay),
539                    autoplaySpeed: parseInt(ajax_teamcarousel.autoplay_speed),
540                    rtl: blocks.rtltrue,
541                    arrows: JSON.parse(ajax_teamcarousel.arrows),
542                    dots: JSON.parse(ajax_teamcarousel.dots),
543                    responsive: [{
544                        breakpoint: 1199,
545                        settings: {
546                            slidesToShow: 2
547                        }
548                    }, {
549                        breakpoint: 767,
550                        settings: {
551                            slidesToShow: 1
552                        }
553                    }]
554                });
555            }
556
557            // person carousel (team)
558            // if (blocks.personCarousel2.length) {
559            //     blocks.personCarousel2.slick({
560            //         mobileFirst: JSON.parse(ajax_teamcarousel.mobile_first),
561            //         slidesToShow: JSON.parse(ajax_teamcarousel.slides_to_show),
562            //         slidesToScroll: JSON.parse(ajax_teamcarousel.slides_to_scroll),
563            //         infinite: JSON.parse(ajax_teamcarousel.infinite),
564            //         autoplay: JSON.parse(ajax_teamcarousel.autoplay),
565            //         autoplaySpeed: parseInt(ajax_teamcarousel.autoplay_speed),
566            //         rtl: blocks.rtltrue,
567            //         arrows: JSON.parse(ajax_teamcarousel.arrows),
568            //         dots: JSON.parse(ajax_teamcarousel.dots),
569            //         responsive: [{
570            //             breakpoint: 991,
571            //             settings: {
572            //                 slidesToShow: 2,
573            //                 slidesToScroll: 1
574            //             }
575            //         }, {
576            //             breakpoint: 767,
577            //             settings: {
578            //                 slidesToShow: 1
579            //             }
580            //         }]
581            //     });
582            // }
583
584            // category carousel
585            if (blocks.categoryCarousel.length) {
586                blocks.categoryCarousel.slick({
587                    mobileFirst: false,
588                    slidesToShow: 3,
589                    slidesToScroll: 1,
590                    infinite: true,
591                    arrows: false,
592                    rtl: blocks.rtltrue,
593                    autoplay: true,
594                    dots: true,
595                    responsive: [{
596                        breakpoint: 991,
597                        settings: {
598                            slidesToShow: 3
599                        }
600                    }, {
601                        breakpoint: 767,
602                        settings: {
603                            slidesToShow: 2
604                        }
605                    }, {
606                        breakpoint: 480,
607                        settings: {
608                            slidesToShow: 1
609                        }
610                    }]
611                });
612            }
613
614            // news carousel
615            // if (blocks.newsCarousel.length) {
616            //     blocks.newsCarousel.slick({
617            //         slidesToShow: parseInt(ajax_newsslide.slides_to_show),
618            //         slidesToScroll: parseInt(ajax_newsslide.slides_to_scroll),
619            //         infinite: JSON.parse(ajax_newsslide.infinite),
620            //         autoplay: JSON.parse(ajax_newsslide.autoplay),
621            //         autoplaySpeed: parseInt(ajax_newsslide.autoplay_speed),
622            //         rtl: blocks.rtltrue,
623            //         arrows: JSON.parse(ajax_newsslide.arrows),
624            //         dots: JSON.parse(ajax_newsslide.dots),
625            //         adaptiveHeight: true,
626            //         responsive: [{
627            //             breakpoint: 991,
628            //             settings: {
629            //                 slidesToShow: 2
630            //             }
631            //         }, {
632            //             breakpoint: 767,
633            //             settings: {
634            //                 slidesToShow: 2
635            //             }
636            //         }, {
637            //             breakpoint: 480,
638            //             settings: {
639            //                 slidesToShow: 1
640            //             }
641            //         }]
642            //     });
643            // }
644            // brand carousel
645            // if (blocks.brandCarousel.length) {
646            //     blocks.brandCarousel.slick({
647            //         mobileFirst: JSON.parse(ajax_brandcarousel.mobile_first),
648            //         slidesToShow: JSON.parse(ajax_brandcarousel.slides_to_show),
649            //         slidesToScroll: JSON.parse(ajax_brandcarousel.slides_to_scroll),
650            //         infinite: JSON.parse(ajax_brandcarousel.infinite),
651            //         autoplay: JSON.parse(ajax_brandcarousel.autoplay),
652            //         autoplaySpeed: parseInt(ajax_brandcarousel.autoplay_speed),
653            //         rtl: blocks.rtltrue,
654            //         arrows: JSON.parse(ajax_brandcarousel.arrows),
655            //         dots: JSON.parse(ajax_brandcarousel.dots),
656            //         variableWidth: true,
657            //         responsive: [{
658            //             breakpoint: 1199,
659            //             settings: {
660            //                 slidesToShow: 6
661            //             }
662            //         }, {
663            //             breakpoint: 767,
664            //             settings: {
665            //                 slidesToShow: 5
666            //             }
667            //         }]
668            //     });
669            // }
670            // prices carousel
671            // if (blocks.priceCarousel.length) {
672            //     blocks.priceCarousel.slick({
673            //         mobileFirst: JSON.parse(ajax_priceslide.mobile_first),
674            //         slidesToShow: JSON.parse(ajax_priceslide.slides_to_show),
675            //         slidesToScroll: JSON.parse(ajax_priceslide.slides_to_scroll),
676            //         infinite: JSON.parse(ajax_priceslide.infinite),
677            //         autoplay: JSON.parse(ajax_priceslide.autoplay),
678            //         autoplaySpeed: parseInt(ajax_priceslide.autoplay_speed),
679            //         rtl: blocks.rtltrue,
680            //         arrows: JSON.parse(ajax_priceslide.arrows),
681            //         dots: JSON.parse(ajax_priceslide.dots),
682            //         responsive: [{
683            //             breakpoint: 991,
684            //             settings: {
685            //                 slidesToShow: 3,
686            //                 slidesToScroll: 3
687            //             }
688            //         }, {
689            //             breakpoint: 767,
690            //             settings: {
691            //                 slidesToShow: 2,
692            //                 slidesToScroll: 2
693            //             }
694            //         }, {
695            //             breakpoint: 500,
696            //             settings: {
697            //                 slidesToShow: 1,
698            //                 slidesToScroll: 1
699            //             }
700            //         }]
701            //     });
702            // }
703
704            // if (blocks.priceCarousel3.length) {
705            //     blocks.priceCarousel3.slick({
706            //         mobileFirst: JSON.parse(ajax_priceslide.mobile_first),
707            //         slidesToShow: JSON.parse(ajax_priceslide.slides_to_show),
708            //         slidesToScroll: JSON.parse(ajax_priceslide.slides_to_scroll),
709            //         infinite: JSON.parse(ajax_priceslide.infinite),
710            //         autoplay: JSON.parse(ajax_priceslide.autoplay),
711            //         autoplaySpeed: parseInt(ajax_priceslide.autoplay_speed),
712            //         rtl: blocks.rtltrue,
713            //         arrows: JSON.parse(ajax_priceslide.arrows),
714            //         dots: JSON.parse(ajax_priceslide.dots),
715            //         responsive: [{
716            //             breakpoint: 991,
717            //             settings: {
718            //                 slidesToShow: 2,
719            //                 slidesToScroll: 2
720            //             }
721            //         }, {
722            //             breakpoint: 767,
723            //             settings: {
724            //                 slidesToShow: 2,
725            //                 slidesToScroll: 2
726            //             }
727            //         }, {
728            //             breakpoint: 500,
729            //             settings: {
730            //                 slidesToShow: 1,
731            //                 slidesToScroll: 1
732            //             }
733            //         }]
734            //     });
735            // }
736
737            // prices carousel
738            // if (blocks.priceCarousel1.length) {
739            //     blocks.priceCarousel1.slick({
740            //         mobileFirst: (typeof ajax_priceslide_tab !== 'undefined') ? JSON.parse(ajax_priceslide_tab.mobile_first) : false,
741            //         slidesToShow: 3,
742            //         slidesToScroll: 3,
743            //         infinite: (typeof ajax_priceslide_tab !== 'undefined') ? JSON.parse(ajax_priceslide_tab.infinite) : false,
744            //         autoplay: (typeof ajax_priceslide_tab !== 'undefined') ? JSON.parse(ajax_priceslide_tab.autoplay) : true,
745            //         autoplaySpeed: 2500,
746            //         arrows: (typeof ajax_priceslide_tab !== 'undefined') ? JSON.parse(ajax_priceslide_tab.arrows) : false,
747            //         dots: (typeof ajax_priceslide_tab !== 'undefined') ? JSON.parse(ajax_priceslide_tab.dots) : true,
748            //         responsive: [{
749            //             breakpoint: 991,
750            //             settings: {
751            //                 slidesToShow: 2,
752            //                 slidesToScroll: 2
753            //             }
754            //         }, {
755            //             breakpoint: 767,
756            //             settings: {
757            //                 slidesToShow: 2,
758            //                 slidesToScroll: 2
759            //             }
760            //         }, {
761            //             breakpoint: 500,
762            //             settings: {
763            //                 slidesToShow: 1,
764            //                 slidesToScroll: 1
765            //             }
766            //         }]
767            //     });
768            // }
769
770            // post carousel
771            if (blocks.postCarousel.length) {
772                blocks.postCarousel.slick({
773                    mobileFirst: false,
774                    slidesToShow: 1,
775                    slidesToScroll: 1,
776                    infinite: true,
777                    autoplay: false,
778                    arrows: true,
779                    rtl: blocks.rtltrue,
780                    dots: false
781                });
782            }
783
784            // END CAROUSELS
785
786            headerSearch();
787            mobileMenu(windowWidth);
788            toggleCart('.header-cart', '.header-cart-dropdown');
789            printThis('.coupon-print', '.coupon');
790            backToTop('.js-backToTop', templateOption.backToTop);
791            doubleTap(windowWidth);
792            mobileInfoSlide();
793            isotopeGallery(blocks.isotopeGallery, blocks.slickGallery, windowWidth);
794            changeInput();
795            $(".testimonial-item.cutted").dotdotdot();
796
797
798            if (windowWidth < 769) {
799                if (typeof(ajax_bannercarousel) != 'undefined') {
800                    slickMobile(blocks.servicesCarousel, 479, 1, 1, ajax_bannercarousel);
801                }
802                if (typeof(ajax_bannershine) != 'undefined') {
803                    slickMobile(blocks.servicesCarouselCircle, 767, 1, 1, ajax_bannershine);
804                }
805
806
807
808            }
809
810            if (blocks.stickyHeader.length && templateOption.stickyHeader) {
811                $(blocks.stickyHeader).stickyHeader();
812            }
813
814            // lazy loading effect
815            if (blocks.animation.length) {
816                onScrollInit(blocks.animation, windowWidth);
817            }
818            // Resize window events
819
820            $window.resize(function() {
821                var windowWidth = window.innerWidth || $window.width();
822
823                if (windowWidth < 769) {
824                    if (typeof(ajax_bannercarousel) != 'undefined') {
825                        slickMobile(blocks.servicesCarousel, 479, 1, 1, ajax_bannercarousel);
826                    }
827                    if (typeof(ajax_bannershine) != 'undefined') {
828                        slickMobile(blocks.servicesCarouselCircle, 767, 1, 1, ajax_bannershine);
829                    }
830
831                } else {
832                    if ($('.services-circle-carousel.hidden-sm').length == 0) {
833                        $('.services-circle-carousel').append(blocks.restHtml)
834                    }
835                }
836            });
837
838            $(window).resize(debouncer(function(e) {
839                var windowWidth = window.innerWidth || $window.width();
840                isotopeGallery(blocks.isotopeGallery, blocks.slickGallery, windowWidth);
841                doubleTap(windowWidth);
842                if (windowWidth > 991) {
843                    mobileMenuClose(false);
844                }
845
846            }));
847        });
848
849        $window.on('load', function() {
850            var windowWidth = window.innerWidth || $window.width();
851            $('body').addClass('is-loaded');
852        });
853
854
855        /* ---------------------------------------------
856         Functions
857         --------------------------------------------- */
858        // double tap
859        function doubleTap(windowWidth) {
860            if (windowWidth > 767) {
861                $('.page-header-menu').addClass('doubletap');
862                $('.page-header-menu li:has(ul)').doubleTapToGo();
863            }
864
865            if (windowWidth > 991) {
866                $('.page-header--style2 .page-header-menu').addClass('doubletap');
867                $('.page-header--style2 .page-header-menu li:has(ul)').doubleTapToGo();
868            }
869        }
870        // icrease/decrease input
871        function changeInput() {
872            $(document).on('click', '.count-add, .count-reduce', function(e) {
873                var $this = $(e.target),
874                    input = $this.parent().find('.count-input'),
875                    valString = input.val(),
876                    valNum = valString.replace(/[^0-9]/g, ''),
877                    valText = valString.replace(/[0-9]/g, ''),
878                    v = $this.hasClass('count-reduce') ? valNum - 1 : valNum * 1 + 1,
879                    min = input.attr('data-min') ? input.attr('data-min') : 0;
880                if (v >= min)
881                    input.val(v + valText);
882                e.preventDefault();
883            });
884        }
885
886        // back to top
887        function backToTop(button, flag) {
888            if (flag) {
889                var $button = $(button);
890                $(window).on('scroll', function() {
891                    if ($(this).scrollTop() >= 500) {
892                        $button.addClass('visible');
893                    } else {
894                        $button.removeClass('visible');
895                    }
896                });
897                $button.on('click', function() {
898                    $('body,html').animate({
899                        scrollTop: 0
900                    }, 1000);
901                });
902            } else {
903                $(button).hide();
904            }
905        }
906
907        // mobile collapsed text
908        function allViewMobile() {
909            $("[data-show-xs]").on('click', function(e) {
910                e.preventDefault();
911                $('.' + $(this).attr('data-show-xs')).each(function() {
912                    $(this).toggleClass('collapsed');
913                })
914                $(this).hide();
915            })
916        }
917        // header search
918        function headerSearch() {
919            $('.header-search-toggle').on('click', function() {
920                $('.header-search-drop').toggleClass('opened');
921                $(this).toggleClass('opened');
922            })
923            $(document).on('click', function(e) {
924                if (!$(e.target).closest('.header-search').length) {
925                    $('.header-search-drop').removeClass('opened');
926                    $('.header-search-toggle').removeClass('opened');
927                }
928            });
929        }
930
931        // sticky header
932        $.fn.stickyHeader = function() {
933            var $header = this,
934                $body = $('body'),
935                headerOffset,
936                stickyH;
937
938            function setHeigth() {
939                $(".fix-space").remove();
940                $header.removeClass('animated is-sticky fadeIn');
941                $body.removeClass('hdr-sticky');
942                headerOffset = $('.page-header-menu', $header).offset().top;
943                stickyH = $header.height() + headerOffset;
944            }
945            setHeigth();
946            var prevWindow = window.innerWidth || $(window).width();
947            $(window).bind('resize', function() {
948                var currentWindow = window.innerWidth || $(window).width();
949                if (currentWindow != prevWindow) {
950                    setHeigth();
951                    prevWindow = currentWindow;
952                }
953            });
954            $(window).scroll(function() {
955                var st = getCurrentScroll();
956                if (st > headerOffset) {
957                    if (!$(".fix-space").length && !$body.hasClass('home')) {
958                        $header.after('<div class="fix-space"></div>');
959                        $(".fix-space").css({
960                            'height': $header.height() + 'px'
961                        });
962                    }
963                    $header.addClass('is-sticky animated fadeIn');
964                    $body.addClass('hdr-sticky');
965                } else {
966                    $(".fix-space").remove();
967                    $header.removeClass('animated is-sticky fadeIn');
968                    $body.removeClass('hdr-sticky');
969                }
970            });
971
972            function getCurrentScroll() {
973                return window.pageYOffset || document.documentElement.scrollTop;
974            }
975        };
976
977        function isotopeGallery(galleryIsotope, gallerySlick, windowWidth) {
978            var $galleryIsotope = $(galleryIsotope),
979                $gallerySlick = $(gallerySlick);
980            if (windowWidth > 767) {
981                if ($galleryIsotope.length) {
982                    var isoOptions = {
983                        itemSelector: '.gallery-item',
984                        masonry: {
985                            columnWidth: '.gallery-item',
986                            gutter: 0
987                        }
988                    };
989                    $galleryIsotope.imagesLoaded(function() {
990                        $galleryIsotope.isotope(isoOptions);
991                    });
992                    isotopeFilters($galleryIsotope);
993                }
994            } else {
995                if ($gallerySlick.length) {
996                    if (!$gallerySlick.hasClass('slick-slider')) {
997                        $gallerySlick.append($galleryIsotope.children().clone().removeAttr('style'));
998                        $("#isotopeGalleryFilters").children().clone().appendTo("#slickGalleryFilters");
999                        $gallerySlick.slick({
1000                            mobileFirst: JSON.parse(ajax_gallery.mobile_first),
1001                            slidesToShow: parseInt(ajax_gallery.slides_to_show),
1002                            slidesToScroll: parseInt(ajax_gallery.slides_to_scroll),
1003                            infinite: JSON.parse(ajax_gallery.infinite),
1004                            autoplay: JSON.parse(ajax_gallery.autoplay),
1005                            autoplaySpeed: parseInt(ajax_gallery.autoplay_speed),
1006                            rtl: blocks.rtltrue,
1007                            arrows: JSON.parse(ajax_gallery.arrows),
1008                            dots: JSON.parse(ajax_gallery.dots),
1009                            responsive: [{
1010                                breakpoint: 321,
1011                                settings: {
1012                                    slidesToShow: 1
1013                                }
1014                            }]
1015                        });
1016
1017                        slickFilters("#slickGallery");
1018                    }
1019                }
1020            }
1021        }
1022
1023        // Filters (for gallery)
1024        function isotopeFilters(gallery) {
1025            var $gallery = $(gallery);
1026            if ($gallery.length) {
1027                var container = $gallery;
1028                var optionSets = $(".filters-by-category .option-set"),
1029                    optionLinks = optionSets.find("a");
1030                optionLinks.on('click', function(e) {
1031                    var thisLink = $(this);
1032                    if (thisLink.hasClass("selected")) return false;
1033                    var optionSet = thisLink.parents(".option-set");
1034                    optionSet.find(".selected").removeClass("selected");
1035                    thisLink.addClass("selected");
1036                    var options = {},
1037                        key = optionSet.attr("data-option-key"),
1038                        value = thisLink.attr("data-option-value");
1039                    value = value === "false" ? false : value;
1040                    options[key] = value;
1041                    if (key === "layoutMode" && typeof changeLayoutMode === "function") changeLayoutMode($this, options);
1042                    else {
1043                        container.isotope(options);
1044                    }
1045                    return false;
1046                });
1047            }
1048        }
1049
1050        function slickFilters() {
1051            $('#slickGalleryFilters [data-option-value]').on('click', function(e) {
1052                var $this = $(this),
1053                    $carousel = $('#slickGallery'),
1054                    filtername = $this.attr('data-option-value'),
1055                    currentclass = $this.attr('class');
1056                $carousel.slick('slickUnfilter');
1057                $carousel.slick('slickFilter', filtername);
1058                $('#slickGalleryFilters').find(".selected").removeClass("selected");
1059                $this.addClass('selected');
1060                e.preventDefault();
1061            });
1062        }
1063
1064        // print
1065        function printThis(link, target) {
1066            $(link).on('click', function() {
1067                $(this).closest(target).print();
1068            });
1069        }
1070
1071        // Mobile Only carousel initialization
1072        function slickMobile(carousel, breakpoint, slidesToShow, slidesToScroll, options) {
1073            if (carousel.length) {
1074                var windowWidth = window.innerWidth || $window.width();
1075                if (windowWidth < breakpoint + 1) {
1076                    if (carousel.find('.services-circle-item.hidden-sm').length != 0) {
1077                        blocks.restHtml = carousel.find('.services-circle-item.hidden-sm');
1078                        $('.services-circle-item.hidden-sm').remove()
1079                    }
1080                    carousel.slick({
1081                        mobileFirst: JSON.parse(options.mobile_first),
1082                        slidesToShow: parseInt(options.slides_to_show),
1083                        slidesToScroll: parseInt(options.slides_to_scroll),
1084                        infinite: JSON.parse(options.infinite),
1085                        autoplay: JSON.parse(options.autoplay),
1086                        autoplaySpeed: parseInt(options.autoplay_speed),
1087                        rtl: blocks.rtltrue,
1088                        arrows: JSON.parse(options.arrows),
1089                        dots: JSON.parse(options.dots),
1090
1091                        responsive: [{
1092                            breakpoint: breakpoint,
1093                            settings: "unslick"
1094                        }]
1095                    });
1096
1097
1098                }
1099            }
1100        }
1101
1102        // Slider Animation
1103        // function doAnimations(elements) {
1104        //     var animationEndEvents = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
1105        //     elements.each(function() {
1106        //         var $this = $(this);
1107        //         var $animationDelay = $this.data('delay');
1108        //         var $animationType = 'animated ' + $this.data('animation');
1109        //         $this.css({
1110        //             'animation-delay': $animationDelay,
1111        //             '-webkit-animation-delay': $animationDelay
1112        //         });
1113        //         $this.addClass($animationType).one(animationEndEvents, function() {
1114        //             $this.removeClass($animationType);
1115        //         });
1116        //         if ($this.hasClass('animate')) {
1117        //             $this.removeClass('animation');
1118        //         }
1119        //     });
1120        // }
1121
1122        // Time Out Resize
1123        function debouncer(func, timeout) {
1124            var timeoutID,
1125                timeout = timeout || 500;
1126            return function() {
1127                var scope = this,
1128                    args = arguments;
1129                clearTimeout(timeoutID);
1130                timeoutID = setTimeout(function() {
1131                    func.apply(scope, Array.prototype.slice.call(args));
1132                }, timeout);
1133            };
1134        }
1135
1136        // Count To
1137        function count(options) {
1138            var $this = $(this);
1139            options = $.extend({}, options || {}, $this.data('countToOptions') || {});
1140            $this.countTo(options);
1141        }
1142
1143        // Mobile Header Collapse
1144        function mobileInfoSlide() {
1145            var $toggle = $('.page-header-mobile-info-toggle'),
1146                $content = $('.page-header-mobile-info-content');
1147            $toggle.on('click', function(e) {
1148                e.preventDefault();
1149                $content.slideToggle(200);
1150                $toggle.toggleClass('opened');
1151            })
1152        }
1153
1154        // Menu max height
1155        function mHeight() {
1156            return $(window).height() - $('.page-header').height();
1157        }
1158
1159        // Navigation dropdown menu
1160        function mobileMenu(windowWidth) {
1161
1162            var $menu = $('.page-header .menu'),
1163                $menuWrap = $('.page-header-menu'),
1164                $menuToggle = $('.menu-toggle'),
1165                $menuSub = $('.page-header .menu'),
1166                $menuArrow = $('.page-header .menu .arrow');
1167
1168            $menuToggle.on('click', function(e) {
1169                e.preventDefault();
1170                var $this = $(this);
1171                if (!$menu.hasClass('opened')) {
1172                    $menu.slideDown().addClass('opened');
1173                    $this.addClass('opened');
1174                    $('body').addClass('fixed');
1175                    $menuWrap.css({
1176                        'height': mHeight() + 'px'
1177                    });
1178                } else {
1179                    $menu.slideUp().removeClass('opened');
1180                    $this.removeClass('opened');
1181                    $('body').removeClass('fixed');
1182                    $menuWrap.css({
1183                        'height': ''
1184                    });
1185                }
1186            });
1187
1188            $menuArrow.on('click', function(e) {
1189                e.preventDefault();
1190                var $this = $(this).parent('a');
1191                $this.next('ul').slideToggle();
1192                $this.toggleClass('opened');
1193            });
1194
1195        }
1196
1197        function mobileMenuClose(mobile) {
1198            var $menu = $('.page-header .menu'),
1199                $menuWrap = $('.page-header-menu'),
1200                $menuToggle = $('.menu-toggle');
1201            if (mobile === true) {
1202                $menu.slideUp();
1203            } else {
1204                $('.sub-menu', $menu).removeAttr('style');
1205                $('.menu', $menu).removeAttr('style');
1206            }
1207            $menu.removeClass('opened').show();
1208            $menuToggle.removeClass('opened');
1209            $('body').removeClass('fixed');
1210            $menuWrap.css({
1211                'height': ''
1212            });
1213        }
1214
1215        // Header Cart dropdown menu
1216        function toggleCart(cart, drop) {
1217            $(document).on('click', cart, function() {
1218                $(cart).toggleClass('opened');
1219            });
1220            $(document).on('click', function(e) {
1221                if (!$(e.target).closest(cart).length) {
1222                    if ($(cart).hasClass("opened")) {
1223                        $(cart).removeClass('opened');
1224                    }
1225                }
1226            });
1227        }
1228
1229        // Lazy Load animation
1230        function onScrollInit(items, wW) {
1231            if (wW > 991) {
1232                if (!$('body').data('firstInit')) {
1233                    items.each(function() {
1234                        var $element = $(this),
1235                            animationClass = $element.attr('data-animation'),
1236                            animationDelay = $element.attr('data-animation-delay');
1237                        $element.removeClass('no-animate');
1238                        $element.css({
1239                            '-webkit-animation-delay': animationDelay,
1240                            '-moz-animation-delay': animationDelay,
1241                            'animation-delay': animationDelay
1242                        });
1243                        var trigger = $element;
1244                        trigger.waypoint(function() {
1245                            $element.addClass('animated').addClass(animationClass);
1246                            if ($element.hasClass('hoveranimation')) {
1247                                $element.on("webkitAnimationEnd mozAnimationEnd oAnimationEnd animationEnd", function() {
1248                                    $(this).removeClass("animated").removeClass("animation").removeClass(animationClass);
1249                                });
1250                            }
1251                        }, {
1252                            triggerOnce: true,
1253                            offset: '90%'
1254                        });
1255                    });
1256                    $('body').data('firstInit', true);
1257                }
1258            } else {
1259                items.each(function() {
1260                    var $element = $(this);
1261                    $element.addClass('no-animate');
1262                });
1263            }
1264        }
1265
1266        // Get Scrollbar Width
1267        function getScrollbarWidth() {
1268            var outer = document.createElement("div");
1269            outer.style.visibility = "hidden";
1270            outer.style.width = "100px";
1271            outer.style.msOverflowStyle = "scrollbar"; // needed for WinJS apps
1272
1273            document.body.appendChild(outer);
1274
1275            var widthNoScroll = outer.offsetWidth;
1276            // force scrollbars
1277            outer.style.overflow = "scroll";
1278            // add innerdiv
1279            var inner = document.createElement("div");
1280            inner.style.width = "100%";
1281            outer.appendChild(inner);
1282
1283            var widthWithScroll = inner.offsetWidth;
1284
1285            // remove divs
1286            outer.parentNode.removeChild(outer);
1287
1288            return widthNoScroll - widthWithScroll;
1289        }
1290
1291        // store the slider in a local variable
1292        var $window = $(window),
1293            flexslider = { vars: {} };
1294
1295        // tiny helper function to add breakpoints
1296        function getGridSize() {
1297
1298            var gridSize = (window.innerWidth < 600) ? 2 : (window.innerWidth < 900) ? 2 : 4;
1299            if (window.innerWidth < 321)
1300                gridSize = 1
1301            flexslider.vars.minItems = gridSize;
1302            flexslider.vars.maxItems = gridSize;
1303
1304        }
1305
1306        function callflexslider(a) {
1307            if ($('.related.products .prd-grid').length && $('.related.products .prd-grid .prd-img').length > a) {
1308                $('.related.products .prd-grid').flexslider({
1309                    animation: "slide",
1310                    selector: ".slides > div",
1311                    animationLoop: true,
1312                    itemWidth: 200,
1313                    itemMargin: 15,
1314                    minItems: a,
1315                    maxItems: a,
1316                    controlNav: false
1317                });
1318            }
1319
1320
1321            if ($('.up-sells.upsells .prd-grid').length && $('.up-sells.upsells .prd-grid .prd-img').length > a) {
1322                $('.up-sells.upsells .prd-grid').flexslider({
1323                    animation: "slide",
1324                    selector: ".slides > div",
1325                    animationLoop: true,
1326                    itemWidth: 200,
1327                    itemMargin: 15,
1328                    minItems: a,
1329                    maxItems: a,
1330                    controlNav: false
1331                });
1332            }
1333
1334        }
1335
1336        $window.load(function() {
1337            getGridSize();
1338            callflexslider(flexslider.vars.minItems)
1339
1340        });
1341
1342        // check grid size on resize event
1343        $window.resize(function() {
1344            getGridSize();
1345            callflexslider(flexslider.vars.minItems)
1346
1347        });
1348        if (window.innerWidth < 766) {
1349            if (jQuery('.hide-first-in-mobile').length != 0) {
1350                jQuery('.hide-first-in-mobile').hide()
1351                var row = jQuery('.hide-first-in-mobile').closest(".vc_row-fluid");
1352                if (jQuery(row).find('.showallServices').length == 0)
1353                    jQuery(row).append('<div class="showallServices"> ' + cleaning_services_ajax_object.all_service + '</div>')
1354                jQuery('.showallServices').on('click', function() {
1355                    jQuery('.hide-first-in-mobile').show()
1356                    jQuery(this).replaceWith('')
1357                })
1358            }
1359        }
1360
1361
1362        $('body').on('click', '.service-cart', function() {
1363            var id = $(this).data('product_id');
1364            var selectorid = $(this).attr('id');
1365            var quantity = 1;
1366            var price = $('.value_price').val();
1367
1368            var service_name = $(this).attr('data-service-title');
1369
1370            var $this = $(this);
1371            if (price == 0) {
1372                $('[data-target="' + selectorid + '"]').nextAll('.control-indicator').addClass('shadow')
1373                return false;
1374            }
1375            $($this).prev('.spinner').show();
1376            $this.hide();
1377            $('[data-target="' + selectorid + '"]').nextAll('.control-indicator').removeClass('shadow')
1378            $.ajax({
1379                type: "POST",
1380                url: cleaning_services_ajax_object.ajax_url,
1381                data: {
1382                    action: 'service_add_to_cart',
1383                    product_id: id,
1384                    price: price,
1385                    quantity: quantity,
1386                    service_name: service_name,
1387                    security: cleaning_services_ajax_object.ajax_nonce_servicecart,
1388                },
1389                success: function(res) {
1390                    if (res = 'success')
1391                        $("body").trigger("wc_fragment_refresh")
1392                    $this.show();
1393                    $($this).prev('.spinner').hide();
1394                }
1395            });
1396        })
1397
1398        // END FUNCTIONS
1399    })(jQuery);
1400
1401    jQuery(document).ready(function() {
1402        // obj.init();
1403        //mutation event for rtl
1404        if (jQuery('body').hasClass('rtl')) {
1405            var $targets = document.querySelectorAll('.vc_row[data-vc-full-width]');
1406            NodeList.prototype.forEach = Array.prototype.forEach;
1407            $targets.forEach(function($target) {
1408                var $config = { attributes: true, childList: true, characterData: true };
1409                var observer = new MutationObserver(function(mutations) {
1410                    mutations.forEach(function(mutation) {
1411                        if (mutation.attributeName == 'style' && $target.style.left.indexOf('-') != -1) {
1412                            var $right = $target.style.left;
1413                            $target.style.left = 'auto';
1414                            $target.style.right = $right;
1415                        }
1416                    });
1417                });
1418                observer.observe($target, $config);
1419            });
1420        }
1421
1422
1423
1424
1425    });

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.