PageSourceSearch

https://www.9fortomuziejus.lt/wp-content/themes/muzex/assets/js/main.js?ver=1790279383

js 9fortomuziejus.lt collected 2026-09-24 19:51:40 UTC 18,700 bytes, 571 lines download raw bytes

1(function ($) {
2    "use strict";
3	
4
5
6    if($('.curved-circle').length) {
7        $('.curved-circle').circleType({position: 'absolute', dir: 1, radius: 57, forceHeight: true, forceWidth: true});
8    }
9	
10
11	
12    //Submenu Dropdown Toggle
13    if ($('.main-nav__main-navigation li.dropdown ul').length) {
14        $('.main-nav__main-navigation li.dropdown').append('<button class="dropdown-btn"><i class="fa fa-angle-right"></i></button>');
15    }
16	
17
18
19    function dynamicCurrentMenuClass(selector) {
20        let FileName = window.location.href.split('/').reverse()[0];
21
22        selector.find('li').each(function () {
23            let anchor = $(this).find('a');
24            if ($(anchor).attr('href') == FileName) {
25                $(this).addClass('current');
26            }
27        });
28        // if any li has .current elmnt add class
29        selector.children('li').each(function () {
30            if ($(this).find('.current').length) {
31                $(this).addClass('current');
32            }
33        });
34        // if no file name return 
35        if ('' == FileName) {
36            selector.find('li').eq(0).addClass('current');
37        }
38    }
39
40    // mobile menu
41
42    if ($('.main-nav__main-navigation').length) {
43        let mobileNavContainer = $('.mobile-nav__container');
44        let mainNavContent = $('.main-nav__main-navigation').html();
45
46
47
48        mobileNavContainer.append(function () {
49            return mainNavContent;
50        });
51
52
53
54        //Dropdown Button
55        mobileNavContainer.find('li.dropdown .dropdown-btn').on('click', function () {
56            $(this).toggleClass('open');
57            $(this).prev('ul').slideToggle(500);
58        });
59
60        // dynamic current class        
61        let mainNavUL = $('.main-nav__main-navigation').find('.main-nav__navigation-box');
62        let mobileNavUL = mobileNavContainer.find('.main-nav__navigation-box');
63
64        dynamicCurrentMenuClass(mainNavUL);
65        dynamicCurrentMenuClass(mobileNavUL);
66
67
68    }
69
70
71    if ($('.mc-form').length) {
72        var mcURL = $('.mc-form').data('url');
73        $('.mc-form').ajaxChimp({
74            url: mcURL,
75            callback: function (resp) {
76                // appending response
77                $('.mc-form__response').append(function () {
78                    return '<p class="mc-message">' + resp.msg + '</p>';
79                })
80                // making things based on response
81                if (resp.result === 'success') {
82                    // Do stuff
83                    $('.mc-form').removeClass('errored').addClass('successed');
84                    $('.mc-form__response').removeClass('errored').addClass('successed');
85                    $('.mc-form').find('input').val('');
86
87                    $('.mc-form__response p').fadeOut(10000);
88
89                }
90                if (resp.result === 'error') {
91                    $('.mc-form').removeClass('successed').addClass('errored');
92                    $('.mc-form__response').removeClass('successed').addClass('errored');
93                    $('.mc-form').find('input').val('');
94
95                    $('.mc-form__response p').fadeOut(10000);
96
97                }
98            }
99        });
100
101    }
102
103		//Fact Counter + Text Count
104	if($('.count-box').length){
105		$('.count-box').appear(function(){
106	
107			var $t = $(this),
108				n = $t.find(".count-text").attr("data-stop"),
109				r = parseInt($t.find(".count-text").attr("data-speed"), 10);
110				
111			if (!$t.hasClass("counted")) {
112				$t.addClass("counted");
113				$({
114					countNum: $t.find(".count-text").text()
115				}).animate({
116					countNum: n
117				}, {
118					duration: r,
119					easing: "linear",
120					step: function() {
121						$t.find(".count-text").text(Math.floor(this.countNum));
122					},
123					complete: function() {
124						$t.find(".count-text").text(this.countNum);
125					}
126				});
127			}
128			
129		},{accY: 0});
130	}
131	
132
133    if ($('.datepicker').length) {
134        $('.datepicker').datepicker();
135    }
136
137
138    if ($('.plan-visit__tab-links').length) {
139        var planVisitLink = $('.plan-visit__tab-links').find('.nav-link');
140        planVisitLink.on('click', function (e) {
141            var target = $(this).attr('data-target');
142            // animate
143            $('html, body').animate({
144                scrollTop: $(target).offset().top - 50
145            }, 1000);
146
147
148            planVisitLink.removeClass('active');
149            $(this).addClass('active');
150
151            return false;
152        })
153    }
154
155   /* if ($('.contact-form-validated').length) {
156        $('.contact-form-validated').validate({ // initialize the plugin
157            rules: {
158                fname: {
159                    required: true
160                },
161                lname: {
162                    required: true
163                },
164                name: {
165                    required: true
166                },
167                email: {
168                    required: true,
169                    email: true
170                },
171                service: {
172                    required: true
173                },
174                message: {
175                    required: true
176                },
177                subject: {
178                    required: true
179                }
180            },
181            submitHandler: function (form) {
182                // sending value with ajax request
183                $.post($(form).attr('action'), $(form).serialize(), function (response) {
184                    $(form).parent().find('.result').append(response);
185                    $(form).find('input[type="text"]').val('');
186                    $(form).find('input[type="email"]').val('');
187                    $(form).find('textarea').val('');
188                });
189                return false;
190            }
191        });
192    }*/
193    if ($('.counter').length) {
194        $('.counter').counterUp({
195            delay: 10,
196            time: 3000
197        });
198    }
199    if ($('.img-popup').length) {
200        var groups = {};
201        $('.img-popup').each(function () {
202            var id = parseInt($(this).attr('data-group'), 10);
203
204            if (!groups[id]) {
205                groups[id] = [];
206            }
207
208            groups[id].push(this);
209        });
210
211
212        $.each(groups, function () {
213
214            $(this).magnificPopup({
215                type: 'image',
216                closeOnContentClick: true,
217                closeBtnInside: false,
218                gallery: {
219                    enabled: true
220                }
221            });
222
223        });
224
225    };
226    if ($('.wow').length) {
227        var wow = new WOW({
228            boxClass: 'wow', // animated element css class (default is wow)
229            animateClass: 'animated', // animation css class (default is animated)
230
231            mobile: true, // trigger animations on mobile devices (default is true)
232            live: true // act on asynchronously loaded content (default is true)
233        });
234        wow.init();
235    }
236
237    if ($('.video-popup').length) {
238        $('.video-popup').magnificPopup({
239            disableOn: 700,
240            type: 'iframe',
241            mainClass: 'mfp-fade',
242            removalDelay: 160,
243            preloader: true,
244
245            fixedContentPos: false
246        });
247    }
248    if ($('[data-toggle="tooltip"]').length) {
249        $('[data-toggle="tooltip"]').tooltip();
250    }
251    if ($('.stricky').length) {
252        $('.stricky').addClass('original').clone(true).insertAfter('.stricky').addClass('stricked-menu').removeClass('original');
253    }
254    if ($('.scroll-to-target').length) {
255        $(".scroll-to-target").on('click', function () {
256            var target = $(this).attr('data-target');
257            // animate
258            $('html, body').animate({
259                scrollTop: $(target).offset().top
260            }, 1000);
261
262            return false;
263
264        });
265    }
266
267    if ($('.side-menu__toggler').length) {
268        $('.side-menu__toggler').on('click', function (e) {
269            $('.side-menu__block').toggleClass('active');
270            e.preventDefault();
271        });
272    }
273
274    if ($('.side-menu__block-overlay').length) {
275        $('.side-menu__block-overlay').on('click', function (e) {
276            $('.side-menu__block').removeClass('active');
277            e.preventDefault();
278        });
279    }
280
281    if ($('.side-content__toggler').length) {
282        $('.side-content__toggler').on('click', function (e) {
283            $('.side-content__block').toggleClass('active');
284            e.preventDefault();
285        });
286    }
287
288    if ($('.side-content__block-overlay').length) {
289        $('.side-content__block-overlay').on('click', function (e) {
290            $('.side-content__block').removeClass('active');
291            e.preventDefault();
292        });
293    }
294
295
296    if ($('.search-popup__toggler').length) {
297        $('.search-popup__toggler').on('click', function (e) {
298            $('.search-popup').addClass('active');
299            $('.search-popup .search-popup__inner > form > .form-group input').focus()
300            e.preventDefault();
301        });
302    }
303
304    if ($('.search-popup__overlay').length) {
305        $('.search-popup__overlay').on('click', function (e) {
306            $('.search-popup').removeClass('active');
307            e.preventDefault();
308        });
309    }
310    $(window).on('scroll', function () {
311        if ($('.scroll-to-top').length) {
312            var strickyScrollPos = 300;
313            if ($(window).scrollTop() > strickyScrollPos) {
314                $('.scroll-to-top').fadeIn(500);
315            } else if ($(this).scrollTop() <= strickyScrollPos) {
316                $('.scroll-to-top').fadeOut(500);
317            }
318        }
319        if ($('.stricked-menu').length) {
320            var headerScrollPos = 300;
321            var stricky = $('.stricked-menu');
322            if ($(window).scrollTop() > headerScrollPos) {
323                stricky.addClass('stricky-fixed');
324            } else if ($(this).scrollTop() <= headerScrollPos) {
325                stricky.removeClass('stricky-fixed');
326            }
327        }
328    });
329    if ($('.accrodion-grp').length) {
330        var accrodionGrp = $('.accrodion-grp');
331        accrodionGrp.each(function () {
332            var accrodionName = $(this).data('grp-name');
333            var Self = $(this);
334            var accordion = Self.find('.accrodion');
335            Self.addClass(accrodionName);
336            Self.find('.accrodion .accrodion-content').hide();
337            Self.find('.accrodion.active').find('.accrodion-content').show();
338            accordion.each(function () {
339                $(this).find('.accrodion-title').on('click', function () {
340                    if ($(this).parent().hasClass('active') === false) {
341                        $('.accrodion-grp.' + accrodionName).find('.accrodion').removeClass('active');
342                        $('.accrodion-grp.' + accrodionName).find('.accrodion').find('.accrodion-content').slideUp();
343                        $(this).parent().addClass('active');
344                        $(this).parent().find('.accrodion-content').slideDown();
345                    };
346
347
348                });
349            });
350        });
351
352    };
353
354
355
356    $(window).on('load', function () {
357
358
359        if ($('.thm__owl-carousel').length) {
360            $('.thm__owl-carousel').each(function () {
361
362                var Self = $(this);
363                var carouselOptions = Self.data('options');
364                var carouselPrevSelector = Self.data('carousel-prev-btn');
365                var carouselNextSelector = Self.data('carousel-next-btn');
366                var thmCarousel = Self.owlCarousel(carouselOptions);
367                if (carouselPrevSelector !== undefined) {
368                    $(carouselPrevSelector).on('click', function () {
369                        thmCarousel.trigger('prev.owl.carousel', [1000]);
370                        return false;
371                    });
372                }
373                if (carouselNextSelector !== undefined) {
374                    $(carouselNextSelector).on('click', function () {
375                        thmCarousel.trigger('next.owl.carousel', [1000]);
376                        return false;
377                    });
378                }
379            });
380        }
381
382        // owl dots margin increment
383        if ($('.thm__owl-dot-1').length) {
384            var count = 10;
385            $('.thm__owl-dot-1').find('.owl-dot span').each(function () {
386                count += 10;
387                $(this).css('left', '+=' + count + 'px');
388            });
389        }
390        if ($('.thm__owl-dot-rtl-1').length) {
391            var count = 10;
392            $('.thm__owl-dot-rtl-1').find('.owl-dot span').each(function () {
393                count += 10;
394                $(this).css('right', '+=' + count + 'px');
395            });
396        }
397        if ($('.thm__owl-dot-2').length) {
398            var count = 10;
399            $('.thm__owl-dot-2').find('.owl-dot span').each(function () {
400                count += 10;
401                $(this).css('top', '+=' + count + 'px');
402            });
403        }
404        if ($('.preloader').length) {
405            $('.preloader').fadeOut('slow');
406        }
407
408        if ($('.side-menu__block-inner').length) {
409            $('.side-menu__block-inner').mCustomScrollbar({
410                axis: 'y',
411                theme: 'dark'
412            });
413        }
414        
415
416        if ($('.side-content__block-inner').length) {
417            $('.side-content__block-inner').mCustomScrollbar({
418                axis: 'y',
419                theme: 'dark'
420            });
421        }
422
423        if ($('.custom-cursor__overlay').length) {
424
425            // / cursor /
426            var cursor = $(".custom-cursor__overlay .cursor"),
427                follower = $(".custom-cursor__overlay .cursor-follower");
428
429            var posX = 0,
430                posY = 0;
431
432            var mouseX = 0,
433                mouseY = 0;
434
435            TweenMax.to({}, 0.016, {
436                repeat: -1,
437                onRepeat: function () {
438                    posX += (mouseX - posX) / 9;
439                    posY += (mouseY - posY) / 9;
440
441                    TweenMax.set(follower, {
442                        css: {
443                            left: posX - 22,
444                            top: posY - 22
445                        }
446                    });
447
448                    TweenMax.set(cursor, {
449                        css: {
450                            left: mouseX,
451                            top: mouseY
452                        }
453                    });
454
455                }
456            });
457
458            $(document).on("mousemove", function (e) {
459                var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
460                mouseX = e.pageX;
461                mouseY = e.pageY - scrollTop;
462            });
463            $("button, a").on("mouseenter", function () {
464                cursor.addClass("active");
465                follower.addClass("active");
466            });
467            $("button, a").on("mouseleave", function () {
468                cursor.removeClass("active");
469                follower.removeClass("active");
470            });
471            $(".custom-cursor__overlay").on("mouseenter", function () {
472                cursor.addClass("close-cursor");
473                follower.addClass("close-cursor");
474            });
475            $(".custom-cursor__overlay").on("mouseleave", function () {
476                cursor.removeClass("close-cursor");
477                follower.removeClass("close-cursor");
478            });
479        }
480
481
482        if ($('.masonary-layout').length) {
483            $('.masonary-layout').isotope({
484                layoutMode: 'masonry',
485                itemSelector: '.masonary-item'
486            });
487        }
488
489        if ($('.post-filter').length) {
490            var postFilterList = $('.post-filter li');
491            // for first init
492            $('.filter-layout').isotope({
493                filter: '.filter-item',
494                animationOptions: {
495                    duration: 500,
496                    easing: 'linear',
497                    queue: false
498                }
499            });
500            // on click filter links
501            postFilterList.children('span').on('click', function () {
502                var Self = $(this);
503                var selector = Self.parent().attr('data-filter');
504                postFilterList.children('span').parent().removeClass('active');
505                Self.parent().addClass('active');
506
507
508                $('.filter-layout').isotope({
509                    filter: selector,
510                    animationOptions: {
511                        duration: 500,
512                        easing: 'linear',
513                        queue: false
514                    }
515                });
516                return false;
517            });
518        }
519
520        if ($('.post-filter.has-dynamic-filter-counter').length) {
521            // var allItem = $('.single-filter-item').length;
522
523            var activeFilterItem = $('.post-filter.has-dynamic-filter-counter').find('li');
524
525            activeFilterItem.each(function () {
526                var filterElement = $(this).data('filter');
527                var count = $('.gallery-content').find(filterElement).length;
528                $(this).children('span').append('<span class="count"><b>' + count + '</b></span>');
529            });
530        }
531
532    });
533
534})(jQuery);
535
536
537(function($) {
538   'use strict'
539    var testMobile;
540    var isMobile = {
541        Android: function() {
542            return navigator.userAgent.match(/Android/i);
543        },
544        BlackBerry: function() {
545            return navigator.userAgent.match(/BlackBerry/i);
546        },
547        iOS: function() {
548            return navigator.userAgent.match(/iPhone|iPad|iPod/i);
549        },
550        Opera: function() {
551            return navigator.userAgent.match(/Opera Mini/i);
552        },
553        Windows: function() {
554            return navigator.userAgent.match(/IEMobile/i);
555        },
556        any: function() {
557            return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
558        }
559    };
560  var parallax = function() {
561    testMobile = isMobile.any();
562    if (testMobile == null) {
563      $(".parallax").parallax("50%", 0.3);
564    }
565  };
566  // Dom Ready
567  $(function() {
568    parallax();
569     });
570})(jQuery);
571!function(n){var t=n(window),e=t.height();t.resize(function(){e=t.height()}),n.fn.parallax=function(o,r,i){function u(){var i=t.scrollTop();l.each(function(t,u){var l=n(u),f=l.offset().top,s=a(l);i>f+s||f>i+e||l.css("backgroundPosition",o+" "+Math.round((l.data("firstTop")-i)*r)+"px")})}var a,l=n(this);l.each(function(t,e){$element=n(e),$element.data("firstTop",$element.offset().top)}),a=i?function(n){return n.outerHeight(!0)}:function(n){return n.height()},(arguments.length<1||null===o)&&(o="50%"),(arguments.length<2||null===r)&&(r=.1),(arguments.length<3||null===i)&&(i=!0),t.bind("scroll",u).resize(u),u()}}(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.