PageSourceSearch

https://passzio.hu/wp-content/themes/wesper/js/custom.js

js passzio.hu collected 2026-10-02 12:42:15 UTC 65,277 bytes, 1,225 lines download raw bytes

1(function ($) {
2    "use strict";
3    var $window, $document, $body;
4    var jlCookies = {
5        setCookie: function setCookie(key, value, time, path) {
6            var expires = new Date();
7            expires.setTime(expires.getTime() + time);
8            var pathValue = '';
9            if (typeof path !== 'undefined') {
10                pathValue = 'path=' + path + ';';
11            }
12            document.cookie = key + '=' + value + ';' + pathValue + 'expires=' + expires.toUTCString();
13        },
14        getCookie: function getCookie(key) {
15            var keyValue = document.cookie.match('(^|;) ?' + key + '=([^;]*)(;|$)');
16            return keyValue ? keyValue[2] : null;
17        }
18    };
19    $window         = $(window);
20    $document       = $(document);
21    $body           = $("body");
22    var Optloadfnc  = {
23        initialised: false,
24        init: function() {
25            if (!this.initialised) {
26                this.initialised = true;
27            } else {
28                return;
29            }
30            this.jlmenucalc();
31            this.jl_img_pop();
32            this.jl_vid_pop();
33            this.jl_img_slider();
34            this.jl_nav_detect();
35            this.jl_nav_custom();
36            this.jl_gdpr();
37            this.jl_to_top();
38            this.jl_qnt_num();
39            this.jl_dn_tog();
40            this.jl_lazy_opt();
41            this.jl_n_mode_opt();
42            this.jl_n_mode_store();
43            this.livmode();
44            this.jl_sh_link();
45            this.jl_rd_scroll();
46    },
47    jl_img_pop: function() {
48        var img_container = $('.wp-block-image');
49        var gal_container = $('.wp-block-gallery');
50        if (img_container.length) {
51            var galItems = img_container.find(' > a');
52            galItems.addClass('jl_gal_img');
53            img_container.addClass('jl_gals_w');
54        }
55        if (gal_container.length) {
56            var galItems = gal_container.find('figure');
57            gal_container.addClass('jl_gals_w');
58            galItems.removeClass('jl_gals_w');            
59        }
60        var pop_img_wrap = $('.jl_gals_w');
61        if (pop_img_wrap.length > 0) {
62            pop_img_wrap.each(function () {
63                var galPops = GLightbox({
64                    selector: '.jl_gal_img'
65                });
66            })
67        }        
68    },
69    jl_vid_pop: function() {
70        var initVid = GLightbox({
71            selector: '.jl_pop_vid',
72        });        
73    },
74    jl_img_slider: function() {
75        var i;
76        var swiperContainer = $('.jl-pgal-slider');
77            for (i = 0; i < swiperContainer.length; i++) {
78            var slider = $(swiperContainer[i]);
79            var navid = '.jlc-navigation-'+slider.data("swpid"),
80                pagiid = '.jlc-pagination-'+slider.data("swpid");
81            
82            var navigation = {
83                nextEl: navid+' .jl-swiper-button-next',
84                prevEl: navid+' .jl-swiper-button-prev',
85            };            
86            var pagination =  {
87                el: pagiid+' .swiper-pagination',
88                type: 'bullets',
89                clickable: true,
90            };
91            var swiper = new Swiper( slider, {
92                loop: true,
93                autoplay: true,
94                simulateTouch: true,
95                parallax: true,
96                speed: 500,
97                autoplay: {
98                    delay: 5000,
99                    disableOnInteraction: false
100                },
101                navigation: navigation,
102                pagination: pagination,
103            });
104            }
105    },
106    jl_nav_detect: function() {
107        var $menuItems = $('.navigation_wrapper .jl_main_menu > li.menu-item-has-children');
108        if ($menuItems.length) {
109            $menuItems.each(function (i) {
110                var thisItem = $(this),
111                menuItemPosition = thisItem.offset().left,
112                dropdownMenuItem = thisItem.find(' > ul'),
113                dropdownMenuWidth = dropdownMenuItem.outerWidth(),
114                menuItemFromLeft = $(window).width() - menuItemPosition;
115                var dropDownMenuFromLeft;
116                    if (thisItem.find('li.menu-item-has-children').length > 0) {
117                        dropDownMenuFromLeft = menuItemFromLeft - dropdownMenuWidth;
118                    }
119                dropdownMenuItem.removeClass('jlc-right-menu');
120                    if (menuItemFromLeft < dropdownMenuWidth || dropDownMenuFromLeft < dropdownMenuWidth) {
121                        dropdownMenuItem.addClass('jlc-right-menu');
122                    }
123            });
124        }
125    },    
126    jl_nav_custom: function() {
127            $('.menu_mobile_icons, .mobile_menu_overlay').on("click", function() {
128            $('#jl_sb_nav').toggleClass('jl_mobile_nav_open');
129            $('.mobile_menu_overlay').toggleClass('mobile_menu_active');
130            $('.mobile_nav_class').toggleClass('active_mobile_nav_class');
131            });
132
133            $('.widget_nav_menu ul > li.menu-item-has-children').on( 'click', function(){
134                    var parentMenu = jQuery(this);
135                    parentMenu.toggleClass('active');
136                    return false;
137                });
138
139            $("#mobile_menu_slide .menu-item-has-children > a").append($("<span/>", {
140                class: 'arrow_down'
141            }).html('<i class="jli-down-chevron-1" aria-hidden="true"></i>'));
142            $('#mobile_menu_slide .arrow_down i').on("click", function() {
143                var submenu = $(this).closest('.menu-item-has-children').find(' > .sub-menu');
144                $(this).toggleClass("jli-down-chevron-1").toggleClass("jli-up-chevron-1");
145                $(submenu).slideToggle(150,"linear");
146                return false;
147            });
148            
149            $('.search_form_menu_personal_click').on("click", function() {
150                $('.search_form_menu_personal').toggleClass('search_form_menu_personal_active');
151                $('.mobile_nav_class').toggleClass('active_search_box');
152                setTimeout(function() {                    
153                    if (!$("body").hasClass("jlac_smseah")) {
154                        $('.search_form_menu_personal').find('.search_btn').focus()
155                    }
156                }, 100)
157
158            });
159
160            $(document).keyup(function(e) {
161                if (e.keyCode == 27) {
162                    $('.search_form_menu_personal.search_form_menu_personal_active').toggleClass('search_form_menu_personal_active');
163                    $('.mobile_nav_class.active_search_box').toggleClass('active_search_box');
164                }
165            });
166
167            $('.search_form_menu_click').on('click', function(e) {
168                e.preventDefault();
169                $('.search_form_menu').toggle();
170                $(this).toggleClass('active');
171            });
172            if ($('.sb-toggle-left').length) {
173                $('.sb-toggle-left').on("click", function() {
174                    $('#nav-wrapper').toggle(100);
175                });
176                $("#menu-main-menu .menu-item-has-children > a").append($("<span/>", {
177                    class: 'arrow_down'
178                }).html('<i class="jli-down-chevron-1"></i>'));
179            }
180
181            $('#nav-wrapper .menu .arrow_down').on("click", function() {
182                var $submenu = $(this).closest('.menu-item-has-children').find(' > .sub-menu');
183
184                if ($submenu.hasClass('menu-active-class')) {
185                    $submenu.removeClass('menu-active-class');
186                } else {
187                    $submenu.addClass('menu-active-class');
188                }
189                return false;
190            });
191
192            $('.jl_filter_btn').on("click", function() {
193                $('.jl_shop_filter_content').toggleClass('jl_woo_fs');                
194            });
195
196            if ($('body').hasClass('jl_nav_stick')) {
197                var theElement = $('body').hasClass('jl_nav_active') ? $('.jl_cus_sihead') : $('.tp_head_on');
198                var jl_navbase, $orgElement, $jl_r_menudElement, orgElementTop, currentScroll, previousScroll = 0, scrollDifference, detachPoint = 320, hideShowOffset = 2,
199                $html = $('body');
200                $orgElement = $('.jl_base_menu');
201                if ($orgElement.length) {
202                $jl_r_menudElement = $('.jl_r_menu');
203                jl_navbase = $('body').hasClass('jl_nav_slide');
204                $jl_r_menudElement.width($orgElement.width());
205                $(window).on("resize", function() {
206                    $jl_r_menudElement.width($orgElement.width());
207                });
208                $(window).on("scroll", function() {
209                    if (jQuery(this).scrollTop() > 500) {
210                        jQuery("#go-top").fadeIn();
211                    } else {
212                        jQuery("#go-top").fadeOut();
213                    }
214                    currentScroll = $(this).scrollTop(),
215                    scrollDifference = Math.abs(currentScroll - previousScroll);
216
217                    if ($(this).scrollTop() <= 330) {
218                        if (!$html.hasClass('menu-hide-fixed')) {
219                        $html.addClass('menu-hide-fixed');
220                        }
221                    }else{
222                        $html.removeClass('menu-hide-fixed');
223                    }
224                    
225                    $jl_r_menudElement.width($orgElement.width());
226                        orgElementTop = $orgElement.offset().top;
227                        if (currentScroll >= (orgElementTop) && currentScroll != 0) {
228                            if (jl_navbase) {
229                                if (currentScroll > detachPoint) {
230                                    if (!$html.hasClass('menu-detached')) {
231                                        $html.addClass('menu-detached');
232                                    }                                    
233                                    
234                                }
235                                if (scrollDifference >= hideShowOffset) {
236                                    if (currentScroll > previousScroll) {
237                                        if (!$html.hasClass('menu-invisible')) {
238                                            $html.addClass('menu-invisible');
239                                        }
240                                    } else {
241                                        if ($html.hasClass('menu-invisible')) {
242                                            $html.removeClass('menu-invisible');
243                                        }
244                                    }
245                                }
246                            } else {
247                                $jl_r_menudElement.addClass('m-visible');
248                                $orgElement.addClass('m-hidden');
249                            }
250                        } else {
251                            $jl_r_menudElement.removeClass('m-visible');
252                            $orgElement.removeClass('m-hidden');
253
254                            if (jl_navbase) {
255                                $html.removeClass('menu-detached').removeClass('menu-invisible');
256                            }
257                        }
258                        previousScroll = currentScroll;
259                });
260            }
261            }
262            },
263            jlmenucalc: function() {
264                var jlCusMenu = $('.jl_hwrap');
265                if (jlCusMenu.length > 0) {
266                jlCusMenu.each(function () {
267                    var thisItem = $(this);
268                    thisItem.find('.jl-cus-mega-menu').css({
269                    'width': $(window).width(),
270                    'left': -thisItem.offset().left,
271                    });
272                    thisItem.addClass('mega-menu-loaded')
273                })
274                }
275            },
276            jl_gdpr: function() {
277                    if ($('#jl-gdpr').length > 0) {
278                        if ($.cookie('jl_cookie_accept') !== '1') {
279                            $('#jl-gdpr').css('display', 'block');
280                            setTimeout(function () {
281                                $('#jl-gdpr').addClass('jl-display');
282                            }, 10)
283                        }
284                        $('#jl-gdpr-accept').off('click').on('click', function (e) {
285                            e.preventDefault();
286                            e.stopPropagation();
287                            $.cookie('jl_cookie_accept', '1', {expires: 30, path: '/'});
288                            $('#jl-gdpr').removeClass('jl-display');
289                            setTimeout(function () {
290                                $('#jl-gdpr').css('display', 'none');
291                            }, 500)
292                        })
293                    }
294            },
295            jl_to_top: function() {
296                    $("#go-top").on("click", function() {
297                    jQuery("body,html").animate({
298                        scrollTop: 0
299                    }, 800);
300                    return false;
301                    });
302            },
303            jl_qnt_num: function() {
304                $('.quantity .jlb-btn').on("click", function(e) {
305                e.preventDefault();
306                var woo_btn = $(this);
307                var step = 1;
308                var input = woo_btn.parent().find('input');
309                var min = 1;
310                var max = 99999;
311                var input_old_val = parseInt(input.val());
312                var input_new_val = parseInt(input.val());
313                if (input.attr('step')) {
314                    step = parseInt(input.attr('step'));
315                }
316                if (input.attr('min')) {
317                    min = parseInt(input.attr('min'));
318                }
319                if (input.attr('max')) {
320                    max = parseInt(input.attr('max'));
321                }
322                if (woo_btn.hasClass('up')) {
323                    if (input_old_val < max) {
324                        input_new_val = input_old_val + step;
325                    } else {
326                        input_new_val = 1;
327                    }
328                } else if (woo_btn.hasClass('down')) {
329                    if (input_old_val > min) {
330                        input_new_val = input_old_val - step;
331                    } else {
332                        input_new_val = 0;
333                    }
334                }
335                if (!input.attr('disabled')) {
336                    input.val(input_new_val).change();
337                }
338            });
339            },
340            jl_ma_effect_load: function(jl_post_effect) {
341                var $commonElements = $('.jl_ani_col');
342                if ($commonElements.length) {
343                    $commonElements.each(function () {
344                        var $thisItem = $(this);
345                        if (jl_post_effect) {
346                            $thisItem.addClass('jl_ma_nitem');
347                            setTimeout(function () {
348                                $thisItem.addClass('jl_ma_appear');
349                            }, 1100);
350                        } else {
351                            $thisItem.waypoint( function () {
352                                $thisItem.addClass('jl_ma_appear');
353                            }, {
354                                offset: '105%'
355                            } );
356                        }
357                    });
358                }
359            },
360            jl_rd_scroll: function() {
361                $(window).on("scroll", function() {            
362                    var target = $('.jl_sp_con');
363                    if ( target.length > 0 ) {
364                    target.each(function (id, el) {
365                        var _el = $(el),
366                            pageTop = $(window).scrollTop(),
367                            pageBottom = pageTop + $(window).height(),
368                            elementTop = _el.offset().top,
369               
369             elementBottom = elementTop + _el.height(),
370                            elementBottomNew = elementTop + 0,
371                            key = _el.attr('id');
372                                        
373                            if (pageTop >= elementTop && pageTop <= elementBottom) {
374                              var elementHeight = _el.height();
375                              var totalScroll = -(elementTop - pageTop) / elementHeight * 200;
376                            $('.jl_rd_read[data-key = ' + key + ']').css({'width': totalScroll + '%', 'opacity': '1'});
377                            }
378                            if (pageTop < elementTop) {
379                              $('.jl_rd_read[data-key = ' + key + ']').css({'width': '0', 'opacity': '0'});
380                            }
381                            if (pageTop > elementBottom) {
382                              $('.jl_rd_read[data-key = ' + key + ']').css({'width': '100%', 'opacity': '0'});
383                            }
384                      });                        
385                    }
386                });                
387            },
388            jl_dn_tog: function() {
389                $('.wesper_day_night .jl_moon').on("click", function() {
390                    $('.wesper_day_night').addClass('jl_night_en');
391                    $('.wesper_day_night').removeClass('jl_day_en');
392                    $('.jl_en_day_night').addClass('options_dark_skin');
393                    $('.mobile_nav_class').addClass('wp-night-mode-on');
394                    $.cookie('jlendnight', 'no', {
395                        expires: 7,
396                        path: '/'
397                    });
398                    $.cookie('jlenday', 'no', {
399                        expires: 7,
400                        path: '/'
401                    });
402                });
403                $('.wesper_day_night .jl_sun').on("click", function() {
404                    $('.wesper_day_night').addClass('jl_day_en');
405                    $('.wesper_day_night').removeClass('jl_night_en');
406                    $('.jl_en_day_night').removeClass('options_dark_skin');
407                    $('.mobile_nav_class').removeClass('wp-night-mode-on');
408
409                    $.cookie('jlenday', 'no', {
410                        expires: 7,
411                        path: '/'
412                    });
413                    $.cookie('jlendnight', 'no', {
414                        expires: 7,
415                        path: '/'
416                    });
417
418                });
419            },
420            jl_lazy_opt: function() {
421                window.lazySizesConfig = window.lazySizesConfig || {};
422                window.lazySizesConfig.expand = 1000;
423                window.lazySizesConfig.loadMode = 1;
424                window.lazySizesConfig.loadHidden = false;
425            },
426            jl_n_mode_opt: function() {
427                var nightModeButton = document.querySelectorAll('.jl-night-toggle-icon');
428                for (var i = 0; i < nightModeButton.length; i++) {
429                    nightModeButton.item(i).onclick = function (event) {
430                        event.preventDefault();
431                        for (var i = 0; i < nightModeButton.length; i++) {
432                            nightModeButton[i].classList.toggle('active');
433                        }
434                        if (this.classList.contains('active')) {
435                            jlCookies.setCookie('jlmode_dn', 'true', 2628000000, '/');
436                        } else {
437                            jlCookies.setCookie('jlmode_dn', 'false', 2628000000, '/');
438                        }
439                    };
440                }
441            },
442            jl_n_mode_store: function() {
443                var nightModeButton = document.querySelectorAll('.jl-night-toggle-icon');
444                if ('true' === jlCookies.getCookie('jlmode_dn')) {
445                     document.body.classList.add('wp-night-mode-on');
446                     $('.jl_en_day_night').addClass('options_dark_skin');
447                     $('.wesper_day_night').addClass('jl_night_en');
448                     $('.wesper_day_night').removeClass('jl_day_en');
449                     for (var i = 0; i < nightModeButton.length; i++) {
450                         nightModeButton[i].classList.add('active');
451                     }
452                 }else if ('false' === jlCookies.getCookie('jlmode_dn')) {
453                         document.body.classList.remove('wp-night-mode-on');
454                         $('.jl_en_day_night').removeClass('options_dark_skin');
455                         $('.wesper_day_night').removeClass('jl_night_en');
456                         for (var i = 0; i < nightModeButton.length; i++) {
457                             nightModeButton[i].classList.remove('active');
458                         }
459                 }else{
460                   if (jlParamsOpt.opt_dark == 1) {
461                         document.body.classList.add('wp-night-mode-on');
462                         $('.jl_en_day_night').addClass('options_dark_skin');
463                         $('.wesper_day_night').addClass('jl_night_en');
464                         $('.wesper_day_night').removeClass('jl_day_en');
465                         for (var i = 0; i < nightModeButton.length; i++) {
466                             nightModeButton[i].classList.add('active');
467                         }
468                     }
469                 }
470            },
471            mediaFrameLoad: function() {
472                var jlFrame = document.getElementsByClassName( 'jl_fm_vid_load' ),
473                    jlOptFrame = new IntersectionObserver(function (entries) {
474                    entries.forEach(function (entry ) {
475                        if ( entry.isIntersecting ) {
476                            jlOptFrame.unobserve(entry.target);
477                            Optloadfnc.mediaFrameCheck(entry.target);
478                        }
479                    });
480                }, { threshold: [0], rootMargin: '150px 0px', });
481                for ( var i = jlFrame.length - 1; i >= 0; i-- ) {
482                    if ( ! jlFrame[i].classList.contains( 'jl_fm_loading' ) ) {
483                        jlOptFrame.observe( jlFrame[i] );
484                    }
485                }
486            },
487            mediaFrameCheck: function( iframe ) {
488                var src = iframe.getAttribute('data-lazy-src');                                
489                iframe.setAttribute('src', src );
490                $(iframe).on( 'load', function() {
491                    var commonElements = $('.jl_img_holder');
492                    var jl_vidfr_in = commonElements.find( '.video-wrap' );
493                    iframe.classList.add('jl_fm_loading');
494                    iframe.classList.add( 'loaded' );
495                    $(this).parent().addClass('jl_load_vids');                    
496                });
497            },
498            jl_wp_mu: function(i) {
499                var commonElements = $('.jl-wp-mu');
500                if (commonElements.length){
501                    for (i = 0; i < commonElements.length; i++) {
502                    var $commonElements = $(commonElements[i]);
503                        let $optElements = $commonElements.find( '.jl_mega_cols' );
504                        $optElements.each(
505                            function (index) {
506                                let $character = $( this ), transitionDelay = (index * 100) + 'ms';
507                                $character.css({'animation-delay': transitionDelay});
508                            }
509                        );
510                    }
511                }
512            },
513            jl_sh_link: function() {
514                var jlMainShare = $('.jl_shli .jl_sshl');
515                if ( jlMainShare.length > 0 ) {
516                    jlMainShare.on('click', function() {
517                        var left = (screen.width/2)-(640/2),
518                                top = (screen.height/2)-(440/2)-100;
519                        window.open($(this).attr('href'), 'mywin', 'left='+left+',top='+top+',width=640,height=440,toolbar=0');
520                        return false;
521                    });
522                }
523            },
524            livmode: function() {
525              var $body = $( 'body' );
526                    $body.on( 'click', '.jl_vid_sh', Optloadfnc.mdsOpt );
527                },
528            mdsOpt: function( ) {
529              var video = document.createElement( 'video' );
530              var thisItem  = $( this ),
531                        optVid  = thisItem.data(),
532                        vidDisplay;
533                        if ( optVid.vidtype == 'embedvid' ) {
534                            if ( optVid.embedvid === '' ) {
535                                vidDisplay = '';
536                            } else {
537                                vidDisplay = '<iframe title="Video" frameborder="0" seamless="seamless" allow="autoplay" src="' + optVid.embedvid + '" allowfullscreen></iframe>';
538                            }
539                        } else {
540                                if ( video.canPlayType( 'video/mp4;' ) ) { video.type= 'video/mp4'; if ( optVid.localvid !== '' ) { video.src = optVid.localvid; } }
541                                video.setAttribute( 'controls', 'controls' );
542                                video.setAttribute( 'controlsList', 'nodownload' );
543                                video.play();
544                                vidDisplay = video;
545                        }
546                        var jl_vidli_w = thisItem.closest( '.jl_vidsb_c' );
547                        if ( jl_vidli_w.hasClass( 'jl_ac_vid' ) ) { return; }
548                        var jl_vidli_in = $( '#jl-vid-alist-' + optVid.blockid );
549                        var jl_vidli_fr = jl_vidli_in.find( '.jl_vid_msh' );
550                        var jl_vidfr_in = jl_vidli_fr.find( '.jl_vidfr' );
551                        jl_vidli_fr.addClass( 'jl_vidprog' ).removeClass( 'jl_vidacsh' );
552                        jl_vidfr_in.html( '<div class="jl_vid_pac"><div id="jl-vid-ac-' + optVid.blockid + '" class="jl_vid_pin"></div></div>' );
553                        $( '#jl-vid-ac-' + optVid.blockid ).append(vidDisplay );
554                        setTimeout( function() { jl_vidli_fr.addClass( 'jl_vidacsh jl_vidfr' ); }, 190 );
555                        if ( thisItem.hasClass( 'jl_vid_tar' ) ) { jl_vidli_w.addClass( 'jl_ac_vid' ).siblings().removeClass( 'jl_ac_vid' ); }
556                    return false;
557                }
558    };
559    $(document).ready(function(){
560        Optloadfnc.init();
561        cusMainScript.init();
562    });
563    $(window).on('load',function(){
564        Optloadfnc.jl_ma_effect_load();
565        Optloadfnc.jl_wp_mu();
566        Optloadfnc.mediaFrameLoad();
567    });
568    window.addEventListener('resize',function(){
569        Optloadfnc.jlmenucalc();
570        Optloadfnc.jl_nav_detect();
571    });
572    })(jQuery);
573jlSpscript = (function($) {
574        var jlMainOpt = { jlSpLoad: function() { this.jlGalPop(); this.jlShLink(); this.JlLoadV(); },
575        JlLoadV: function() {
576            var jlFrame = document.getElementsByClassName( 'jl_fm_vid_load' ),
577                jlOptFrame = new IntersectionObserver(function (entries) {
578                entries.forEach(function (entry ) {
579                    if ( entry.isIntersecting ) {
580                        jlOptFrame.unobserve(entry.target);                        
581                        var iframe = entry.target;
582                        var src = iframe.getAttribute('data-lazy-src');                                
583                        iframe.setAttribute('src', src );
584                        $(iframe).on( 'load', function() {
585                            var commonElements = $('.jl_img_holder');
586                            var jl_vidfr_in = commonElements.find( '.video-wrap' );
587                            iframe.classList.add('jl_fm_loading');
588                            iframe.classList.add( 'loaded' );
589                            $(this).parent().addClass('jl_load_vids');                    
590                        });
591                    }
592                });
593            }, { threshold: [0], rootMargin: '150px 0px', });
594            for ( var i = jlFrame.length - 1; i >= 0; i-- ) {
595                if ( ! jlFrame[i].classList.contains( 'jl_fm_loading' ) ) {
596                    jlOptFrame.observe( jlFrame[i] );
597                }
598            }
599        },        
600        jlShLink: function() {
601            var jlMainShare = $('.jl_shli .jl_sshl');
602            if ( jlMainShare.length > 0 ) {            
603                jlMainShare.on('click', function() {
604                    var left = (screen.width/2)-(640/2),
605                            top = (screen.height/2)-(440/2)-100;
606                    window.open($(this).attr('href'), 'mywin', 'left='+left+',top='+top+',width=640,height=440,toolbar=0');
607                    return false;
608                });
609            }
610        },        
611        jlGalPop: function() {
612            var img_container = $('.wp-block-image');
613            var gal_container = $('.wp-block-gallery');
614            if (img_container.length) {
615                var galItems = img_container.find(' > a');
616                galItems.addClass('jl_gal_img');
617                img_container.addClass('jl_gals_w');
618            }
619            if (gal_container.length) {
620                var galItems = gal_container.find('figure');
621                gal_container.addClass('jl_gals_w');
622                galItems.removeClass('jl_gals_w');            
623            }
624            var pop_img_wrap = $('.jl_gals_w');        
625            if (pop_img_wrap.length > 0) {
626                pop_img_wrap.each(function () {
627                    var galPops = GLightbox({
628                        selector: '.jl_gal_img'
629                    });
630                })
631            }     
632        },
633    }
634    return jlMainOpt;
635    })(jQuery);        
636    (function () {
637        const detectScrlDown = 0.76; let numPDisplay = []; let spSelect_load; let spLoadView; let spProgress = false; let spLoadItems = []; let spEachItem;
638        function spLoadScript() { spMainLoad(spScript); }
639        function spScript() {
640            if (typeof JlOptPosts === 'undefined' || !window.fetch) { return; }
641            numPDisplay = JlOptPosts;
642            spEachItem = document.querySelector('.jl_sp_con');
643            spSelect_load = spEachItem;		
644            spLoadItems.push(spSelect_load);
645            if (!spSelect_load) { return; }
646            Object.assign(spSelect_load.dataset, { title: document.title, url: window.location.href });
647            document.addEventListener('scroll', () => {
648                if (spProgress || spEachItem.dataset.loading) { return; }
649                let triggerLoad = spEachItem.offsetTop + (spEachItem.offsetHeight * detectScrlDown);
650                if (window.scrollY > triggerLoad) { spProgress = true; requestAnimationFrame(spDisplayItems); }
651            });
652            spLoadView = new IntersectionObserver(spActivePost, { root: null, rootMargin: '0px 0px -50%', threshold: 0 });
653        }        
654        function spSpinView(target) {
655            target = target || spEachItem;
656            const spin = document.createElement('div');
657            Object.assign(spin, { className: 'jl_sp_spin' });
658            target.after(spin);
659        }
660        function spDisplayItems() {
661            const spItems = numPDisplay.shift();
662            if (!spItems) { return; }
663            if (spSelect_load === spEachItem) { spSelect_load.classList.add('jl_spm_con'); }
664            const addPostContainer = (html) => {
665                if (!html) { return; }
666                const spParam = new DOMParser();
667                const spConType = spParam.parseFromString(html, 'text/html');			
668                const spOutput = spConType.querySelector('.jl_sp_con');
669                if (!spOutput) { return; }
670                const spWrapper = document.createElement('div');
671                spEachItem.after(spWrapper);
672                Object.assign(spWrapper.dataset, { url: spItems.url, title: spItems.title, });
673                Object.assign(spWrapper, { className: 'jl_sp_lp', innerHTML: spOutput.outerHTML });
674                spEachItem = spWrapper;
675                spLoadItems.push(spWrapper);
676                return spWrapper;
677            };
678            spSpinView();
679            fetch(spItems.url).then(resp => resp.text()).then(html => {
680                    const spWrapper = addPostContainer(html);
681                    document.querySelectorAll('.jl_sp_spin').forEach(e => e.remove());	
682                    if (!spWrapper) { return; }
683                    spsLoads(spWrapper);
684                    if (window.twttr && twttr.widgets && twttr.widgets.load) { twttr.widgets.load(); }
685                    requestAnimationFrame(() => {
686                        spProgress = false;
687                        spCheckLoad(spWrapper);
688                        spLoadView.observe(spWrapper);
689                        jlSpscript.jlSpLoad(spWrapper);
690                    });                    
691                });
692        } 
693        function spActivePost(entries) {
694            let spMainPost;
695            let spActiveItem;
696            for (let element of entries) {
697                if (element.intersectionRatio <= 0) { spActiveItem = element.target; continue; }		
698                spMainPost = element.target;
699                break;
700            }
701            if (!spMainPost) {
702                const spFirstPost = spLoadItems.findIndex(spItems => spItems === spActiveItem);
703                const spMovePost = spLoadItems[spFirstPost - 1];
704                if (spMovePost && spMovePost.getBoundingClientRect().bottom >= 0) { spMainPost = spMovePost; }
705            }
706            if (spMainPost && spMainPost.dataset.url) {
707                window.history.pushState(null, spMainPost.dataset.title, spMainPost.dataset.url);
708                document.title = spMainPost.dataset.title;
709                spActiveView();
710            }
711        }   
712        function spActiveView() {
713            if (!spEachItem || spEachItem.dataset.viewTracked) { return; }
714            if (window.gtag) { window.gtag('event', 'page_view', { page_title: spEachItem.dataset.title, page_location: spEachItem.dataset.url }); }
715            if (window.ga) { window.ga('send', 'pageview', spEachItem.dataset.url); }
716            spEachItem.dataset.viewTracked = 1;
717        }
718        function spsLoads(element) {
719            element.querySelectorAll('script').forEach(item => {
720                const scrawl = document.createElement('script');
721                scrawl.text = item.textContent;
722                const attrs = item.attributes;
723                for (const attr of attrs) { scrawl.setAttribute(attr.name, attr.value || true); }
724                if (scrawl.type && scrawl.type === 'rocketlazyloadscript') { scrawl.type = 'text/javascript'; }
725                if (!scrawl.src && scrawl.dataset.src) { scrawl.src = scrawl.dataset.src; }		
726                document.body.append(scrawl);
727            });
728        }
729        function spCheckLoad(spEachItem) {
730            const spConType = document.documentElement;
731            if (spConType.scrollHeight - spConType.scrollTop <= spConType.clientHeight + 75) { spEachItem.scrollIntoView(); }
732        }    
733        function spMainLoad(optsc) { document.readyState !== 'loading' ? optsc() : document.addEventListener('DOMContentLoaded', optsc); }
734        spLoadScript();
735    })();
736    var cusMainScript = (function (OptScript, $) { OptScript.$body = $('body'); OptScript.$document = $(document); OptScript.$html = $('html, body'); OptScript.$window = $(window); OptScript.$ajax = {}; OptScript.sjload = {};
737    OptScript.init = function () { this.queryList(); this.cusLoadScript();};
738    OptScript.cusLoadScript = function () { this.jl_menu_cat(); this.navNextPre(); this.navloadMore(); this.jl_popup_search(); this.navautoload(); this.blocknest();};
739    OptScript.loadpFunctions = function () {this.$html.off();this.$document.off();this.$window.trigger('load');this.cusLoadScript();};
740    OptScript.$blocksave = {data: {},get: function (id) {return this.data[id];},set: function (id, data) {this.remove(id);this.data[id] = data;},remove: function (id) {delete this.data[id];},exist: function (id) {return this.data.hasOwnProperty(id) && this.data[id] !== null;}};
741    OptScript.blocknest = function () {
742        var wrapper = $('.jl_ma_grid.jl_load_magrid');
743        if (wrapper.length > 0) {
744            wrapper.each(function () {
745                var jcontain = $(this).find('.jl_contain').eq(0);
746                $(jcontain).isotope({itemSelector: '.jl_ma_grid_col', percentPosition: true,masonry: {columnWidth: '.jl_ma_grid_w', gutter: '.jl_ma_grid_gutter'}});
747                jcontain.imagesLoaded().progress(function () {$(jcontain).isotope('layout');});
748            });
749        }
750    };
751    OptScript.blockDatalist = function (block) {
752        return {blockid: block.data('blockid'), section_style: block.data('section_style'), post_type: block.data('post_type'), post_type_tax: block.data('post_type_tax'),term_slugs: block.data('term_slugs'), posts_per_page: block.data('posts_per_page'), page_max: block.data('page_max'), page_current: block.data('page_current'), category: block.data('category'), categories: block.data('categories'), orderby: block.data('orderby'), author: block.data('author'), tags: block.data('tags'), tabs_link: block.data('tabs_link'), post_not_in: block.data('post_not_in'), format: block.data('format'), offset: block.data('offset')};
753    };
754    OptScript.trackPagenav = function (block) {
755        var settings = this.blockDatalist(block); var max_offsets = settings.page_max+settings.offset;
756        var settings_max = ((settings.page_max * settings.posts_per_page) - settings.offset) / settings.posts_per_page;
757        if(settings.page_current >= max_offsets || settings.page_current >= settings.page_max || settings.page_max <= 1 || settings.page_current >= settings_max) {
758            block.find('.jl-load-link').hide(); block.find('.jl-load-animation').hide(); block.find('.jl_el_nav_w').addClass('jl_hide_pagination'); block.find('.jl_lmore_c').addClass('jl_hide_pagination'); block.find('.jl_autoload').addClass('jl_hide_pagination');
759        }else{
760            block.find('.jl-load-link').show(); block.find('.jl-load-link').css('opacity', 1); block.find('.jl-load-animation').hide(); block.find('.jl_el_nav_w').removeClass('jl_hide_pagination'); block.find('.jl_lmore_c').removeClass('jl_hide_pagination'); block.find('.jl_autoload').removeClass('jl_hide_pagination');
761        }
762        if (settings.page_max < 2) { block.find('.jl-foot-nav').addClass('jl_disable'); }
763        if (settings.page_current >= settings.page_max) { block.find('.jl-next-nav').addClass('jl_disable'); }
764        if (settings.page_current <= 1) { block.find('.jl-prev-nav').addClass('jl_disable'); }
765    };
766    OptScript.queryList = function () {
767        var object = this;
768        $('.jl-tab-link').off('click').on('click', function (e) {
769            e.preventDefault(); e.stopPropagation(); var link = $(this); var block = link.parents('.block-section'); var blockid = block.attr('id');
770            if (true == object.$ajax[blockid + '_loading']) { return; }
771            object.$ajax[blockid + '_loading'] = true;
772            var filterVal = link.data('ajax_filter_val');
773            block.find('.jl-tab-link').removeClass('jl-ac-m');
774            block.find('.jl-tab-link').not(this).addClass('jl-rm-ac');
775            link.addClass('jl-ac-m');
776            object.startEffect(block, 'replace');
777            var settings = object.blockDatalist(block);
778            object.resetQuickFilter(block, settings, filterVal);
779            setTimeout(function () { object.blockLink(block, settings); }, 400);
780        });
781        OptScript.navNextPre = function () {
782            var object = this;
783            $('.jl-foot-nav').off('click').on('click', function (e) {
784                e.preventDefault(); e.stopPropagation(); var link = $(this); var block = link.parents('.block-section'); var blockid = block.attr('id');
785                if (true == object.$ajax[blockid + '_loading']) { return; }
786                object.$ajax[blockid + '_loading'] = true;
787                var type = link.data('type'); var settings = object.blockDatalist(block);
788                object.startEffect(block, 'replace');
789                object.navNextPreProcess(block, settings, type);
790            });
791        };
792        OptScript.navNextPreProcess = function (block, settings, type) {
793            if ('prev' == type){ settings.page_next = parseInt(settings.page_current) - 1; }else{ settings.page_next = parseInt(settings.page_current) + 1; }
794            var cacheSettings = settings; delete cacheSettings.page_max; cacheSettings.page_current = settings.page_next; var cacheID = JSON.stringify(cacheSettings);
795            if (object.$blocksave.exist(cacheID)) {
796                var data = object.$blocksave.get(cacheID);
797                if ('undefined' != typeof data.page_current) { block.data('page_current', data.page_current); }
798                object.endEffect(block, data.content, 'replace');
799                return false;
800            } else {
801                $.ajax({
802                    type: 'POST', url: jlParamsOpt.ajaxurl, data: { action: 'wesper_loadnavs', data: settings },
803                    success: function (data) {
804                        data = $.parseJSON(JSON.stringify(data));
805                        if ('undefined' != typeof data.page_current) { block.data('page_current', data.page_current); }
806                        object.$blocksave.set(cacheID, data);
807                        object.endEffect(block, data.content, 'replace');
808                    },
809                    complete: function(){ block.find('.load-animation').css({'display': 'none'}); }
810                });
811            }
812        };
813        OptScript.resetQuickFilter = function (block, settings, filterVal) {
814            var object = this; var blockid = block.attr('id');
815            settings.page_current = 1;
816            block.data('page_current', 1);
817            if ('category' == settings.tabs_link) {
818                if ('undefined' == typeof (object.$ajax[blockid + '_category'])) { object.$ajax[blockid + '_category'] = 0; }
819                if (0 == filterVal) {
820                    settings.category = object.$ajax[blockid + '_category'];
821                    settings.categories = object.$ajax[blockid + '_categories'];
822                    block.data('category', object.$ajax[blockid + '_category']);
823                    block.data('categories', object.$ajax[blockid + '_categories']);
824                } else {
825                    settings.category = filterVal;
826                    settings.categories = 0;
827                    block.data('category', filterVal);
828                    block.data('categories', 0);
829                }
830            }
831            if ('tag' == settings.tabs_link) { settings.tags = filterVal; block.data('tags', filterVal); }
832        };
833        OptScript.blockLink = function (block, settings) {
834            var object = this; var cacheSettings = settings;
835            delete cacheSettings.page_max;
836            var cacheID = JSON.stringify(cacheSettings);
837            if (object.$blocksave.exist(cacheID)) {
838                var data = object.$blocksave.get(cacheID);
839                if ('undefined' != typeof data.page_max) { block.data('page_max', data.page_max); }
840                object.endEffect(block, data.content, 'replace');
841                return false;
842            } else {
843                $.ajax({
844                    type: 'POST', url: jlParamsOpt.ajaxurl, data: { action: 'wesper_block_link', data: settings },
845                    success: function (data) {
846                        data = $.parseJSON(JSON.stringify(data));
847                        if ('undefined' != typeof data.page_max) { block.data('page_max', data.page_max); }
848                        object.$blocksave.set(cacheID, data);
849                        object.endEffect(block, data.content, 'replace');
850                    }
851                });
852            }
853        };
854        OptScript.startEffect = function (block, action) {
855            var wrapper = block.find('.jl_wrap_eb'); var jcontain = wrapper.find('.jl_contain');
856            block.find('.jl-block-link').addClass('jl_disable');
857            jcontain.stop();
858            if (action =='replace') {
859                wrapper.css('height', wrapper.outerHeight());
860                wrapper.prepend('<div class="jl-load-animation"></div>');
861                jcontain.addClass('jl_overflow');
862                jcontain.fadeTo('100', .3);
863            } else {
864                block.find('.jl-load-link').addClass('loading').animate({opacity: 0}, 100);
865                block.find('.jl-load-animation').css({'display': 'block'}).delay(100).animate({opacity: 1}, 100);
866            }
867        };
868        OptScript.navloadMore = function () {
869            var object = this;
870            $('.jl-load-link').off('click').on('click', function (e) {
871                e.preventDefault(); e.stopPropagation();
872                var link = $(this); var block = link.parents('.block-section'); var blockid = block.attr('id');
873                if (true == object.$ajax[blockid + '_loading']) { return; }
874                object.$ajax[blockid + '_loading'] = true;
875                var settings = object.blockDatalist(block);
876                if (settings.page_current >= settings.page_max) { return; }
877                object.startEffect(block, 'append');
878                object.navloadAction(block, settings);
879            })
880        };
881        OptScript.navautoload = function () {
882            var object = this; var infiniteElements = $('.jl_autoload');
883            if (infiniteElements.length > 0) {
884                infiniteElements.each(function () {
885                    var link = $(this);
886                    if (!link.hasClass('jl_hide_pagination')) {
887                        var animation = link.find('.jl-load-animation'); var block = link.parents('.block-section'); var blockid = block.attr('id'); var sjloadID = 'infinite' + blockid; var settings = object.blockDatalist(block);
888                        object.sjload[sjloadID] = new Waypoint({
889                            element: link,
890                            handler: function (direction) {
891                                if ('down' == direction) {
892                                    if (true == object.$ajax[blockid + '_loading']) { return; }
893                                    object.$ajax[blockid + '_loading'] = true;
894                                    object.startEffect(block, 'append');
895                                    OptScript.navloadAction(block, settings);
896                                    setTimeout(function () { object.sjload[sjloadID].destroy(); }, 10);
897                                }
898                            },
899                            offset: '99%'
900                        })
901                    }
902                });
903            }
904        };
905        OptScript.navloadAction = function (block, settings) {
906            settings.page_next = parseInt(settings.page_current) + 1;
907            if (settings.page_next <= settings.page_max) {
908                $.ajax({
909                    type: 'POST', url: jlParamsOpt.ajaxurl, data: { action: 'wesper_loadnavs', data: settings },
910                    success: function (data) {
911                        data = $.parseJSON(JSON.stringify(data));
912                        if ('undefined' != data.page_current) { block.data('page_current', data.page_current); }
913                        if ('undefined' != data.notice) { data.content = data.content + data.notice; }
914                        object.endEffect(block, data.content, 'append');
915                    }
916                });
917            }
918        };
919        OptScript.jl_menu_cat = function() {
920            var cat_haction; var cat_sub = $('.mega-category-menu .menu-item');
921            cat_sub.hover(function(event) {
922                event.stopPropagation();
923                cat_sub = $(this);
924                cat_sub.addClass('is-current-sub').siblings().removeClass('is-current-sub current-menu-item');
925                var wrapper = cat_sub.parents('.mega-category-menu'); var block = wrapper.find('.block-section');
926                cat_haction = setTimeout(function() { object.jl_menu_cat_load(cat_sub, block); }, 200);
927            }, function() { clearTimeout(cat_haction); });
928        };
929        OptScript.jl_menu_cat_load = function(cat_sub, block) {
930            var blockid = block.attr('id');
931            if (true == object.$ajax[blockid + '_loading']) { return; }
932            object.$ajax[blockid + '_loading'] = true;
933            var settings = object.blockDatalist(block);
934            settings.category = cat_sub.data('mega_sub_filter');
935            settings.page_current = 1;
936            settings.section_style = settings.section_style;
937            settings.posts_per_page = settings.posts_per_page;
938            block.data('category', settings.category);
939            block.data('page_current', settings.page_current);
940            object.startEffect(block, 'replace');
941            setTimeout(function() { object.jl_menu_cat_fil(block, settings); }, 200);
942        };
943        OptScript.jl_menu_cat_fil = function(block, settings) {
944            var jl_mcache = settings; delete jl_mcache.page_max; var cache_id = JSON.stringify(jl_mcache);
945            if (object.$blocksave.exist(cache_id)) {
946                var data = object.$blocksave.get(cache_id);
947                if ('undefined' != data.page_max) { block.data('page_max', data.page_max); }
948                object.endEffect(block, data.content, 'replace');
949                return false;
950            }
951            $.ajax({
952                type: 'POST', url: jlParamsOpt.ajaxurl, data: { action: 'wesper_menu_cat_opt', data: settings },
953                success: function(data) {
954                    data = $.parseJSON(data);
955                    if ('undefined' != data.page_max) { block.data('page_max', data.page_max); }
956                    object.$blocksave.set(cache_id, data);
957                    object.endEffect(block, data.content, 'replace');
958                }
959            });
960        };
961        OptScript.jl_popup_search = function () {
962            var jl_search_main = $('.jl_search_list');
963            if (jl_search_main.length == 0) {return;}
964            jl_search_main.each(function () {
965                var jl_search_mainEl = $(this);
966                var input = jl_search_mainEl.find('.search_btn');
967                var contentWrap = jl_search_mainEl.find('.jl_search_box_li');
968                var jl_search_wrap = jl_search_mainEl.find('.searchform_theme');
969                input.attr('autocomplete', 'off');
970                var delay = (function () {
971                    var timer = 0;
972                    return function (callback, ms) {clearTimeout(timer); timer = setTimeout(callback, ms); };
973                })();
974                input.keyup(function () {
975                    var param = $(this).val();
976                    delay(function () {
977                        if (param) {
978                            jl_search_wrap.addClass('jl_search_act');                            
979                            $.ajax({
980                                type: 'POST',
981                                url: jlParamsOpt.ajaxurl,
982                                data: {
983                                    action: 'shareblock_search_view',
984                                    s: param
985                                },
986                                success: function (data) {
987                                    data = $.parseJSON(JSON.stringify(data));
988                                    contentWrap.hide().empty().css('height', contentWrap.height());
989                                    contentWrap.html(data);
990                                    contentWrap.css('height', 'auto').fadeIn(250);
991                                    $(window).trigger('load');
992                                }
993                            });
994                        } else {
995                            setTimeout(function () {jl_search_wrap.removeClass('jl_search_act');}, 300);
996                            contentWrap.fadeOut(300, function () {contentWrap.empty().css('height', 'auto');});
997                        }
998                    }, 300);
999                })
1000            });
1001        };
1002        OptScript.endEffect = function (block, content, action) {
1003            var object = this;
1004            block.delay(100).queue(function () {
1005                var blockid = block.attr('id'); var wrapper = block.find('.jl_wrap_eb'); var jcontain = block.find('.jl_contain');
1006                block.find('.filter-link').removeClass('jl_removes'); block.find('.jl-block-link').removeClass('jl_disable'); jcontain.stop();
1007                if ('replace' == action) {
1008                    wrapper.find('.jl-load-animation').remove();
1009                    jcontain.html(content);
1010                    if (jcontain.hasClass('large-jcontain')) {
1011                        jcontain.imagesLoaded(function () {
1012                            setTimeout(function () { jcontain.removeClass('jl_overflow'); wrapper.css('height', 'auto'); setTimeout(function () { jcontain.fadeTo(200, 1); }, 200); }, 100)
1013                        });
1014                    } else {
1015                        jcontain.removeClass('jl_overflow'); wrapper.css('height', 'auto');
1016                        setTimeout(function () { jcontain.fadeTo(200, 1); }, 200);
1017                    }
1018                } else {
1019                    content = $(content); content.addClass('jl_hide'); content.addClass('show_block'); jcontain.append(content);
1020                    block.find('.jl-load-animation').animate({opacity: 0}, 200, function () { $(this).css({'display': 'none'}); });
1021                    setTimeout(function () { content.removeClass('jl_hide'); }, 200);
1022                    block.find('.jl-load-link').removeClass('loading').delay(200).animate({opacity: 1}, 200);
1023                }
1024                if (jcontain.hasClass('jl_ma_layout')) { $(jcontain).isotope('reloadItems').isotope({ sortBy: 'original-order', transitionDuration: 0 }); }
1025                var initVid = GLightbox({ selector: '.jl_pop_vid' });        
1026                object.trackPagenav(block); block.dequeue();
1027                setTimeout(function () { object.$ajax[blockid + '_loading'] = false; object.loadpFunctions(); }, 50);
1028            });
1029        }
1030    };
1031    return OptScript;
1032}(cusMainScript || {}, jQuery));
1033( function( $ ) {
1034    var jl_wp_sl = function ($scope, $) {
1035                var swiperContainer = $scope.find('.jl-eb-sl').eq(0);
1036                if ( swiperContainer.length > 0 ) {
1037                    var dataOpt = swiperContainer.data('settings');
1038                    var navid = '.jlc-navigation-'+dataOpt.uniqid,
1039                        pagiid = '.jlc-pagination-'+dataOpt.uniqid;
1040                    var pagination =  {
1041                        el: pagiid+' .swiper-pagination',
1042                        type: 'bullets',
1043                        clickable: true,
1044                    };
1045                    var navigation = {
1046                        nextEl: navid+' .jl-swiper-button-next',
1047                        prevEl: navid+' .jl-swiper-button-prev',
1048                    };
1049                    var autoplay = {
1050                        delay: dataOpt.autoplay_delay,
1051                        disableOnInteraction: false,
1052                    };
1053                    if( dataOpt.autoplay == false ){
1054                        autoplay = false;
1055                    }
1056                    if( dataOpt.pagination == false ){
1057                        pagination = false;
1058                    }
1059                    if( dataOpt.navigation == false ){
1060                        navigation = false;
1061                    }
1062                    var desktop = parseInt( dataOpt.slideitem['desktop'] ) || 5,
1063                        tablet = parseInt( dataOpt.slideitem['tablet'] ) || 4,
1064                        landscape_mobile = parseInt( dataOpt.slideitem['landscape_mobile'] ) || 3,
1065                        large_mobile = parseInt( dataOpt.slideitem['large_mobile'] ) || 2,
1066                        small_mobile = parseInt( dataOpt.slideitem['small_mobile'] ) || 1;
1067                    var swiper = new Swiper( swiperContainer, {
1068                            loop: dataOpt.loop,
1069                            autoplay: autoplay,
1070                            watchSlidesVisibility: true,
1071                            parallax: dataOpt.parallax,
1072                            spaceBetween: dataOpt.spacebetween,
1073                            centeredSlides: dataOpt.centered,
1074                            speed: dataOpt.speed,
1075                            pagination: pagination,
1076                            navigation: navigation,
1077                            slidesPerView: desktop,
1078                            effect: dataOpt.effect,
1079                            breakpoints: {
1080                                320: {
1081                                    slidesPerView: small_mobile
1082                                },
1083                                480: {
1084                                    slidesPerView: large_mobile
1085                                },
1086                                576: {
1087                                    slidesPerView: landscape_mobile
1088                                },
1089                                768: {
1090                                    slidesPerView: tablet
1091                                },
1092                                992: {
1093                                    slidesPerView: desktop
1094                                },
1095                                1200: {
1096                                    slidesPerView: desktop
1097                                }
1098                            },
1099                        });
1100                }
1101      };
1102
1103      var jl_wp_sl_tab = function ($scope, $) {
1104                var swipertabs = $scope.find('.jl-eb-sltab').eq(0);
1105                if ( swipertabs.length > 0 ) {
1106                   var swiper = new Swiper( swipertabs, {
1107                         loop: false,
1108                         slidesPerView: 4,
1109                         watchSlidesProgress: true,
1110                         direction: "vertical"
1111                  });
1112                }
1113                var swiperContainer = $scope.find('.jl-eb-sl').eq(0);
1114                if ( swiperContainer.length > 0 ) {
1115                    var dataOpt = swiperContainer.data('settings');
1116                    var navid = '.jlc-navigation-'+dataOpt.uniqid,
1117                        pagiid = '.jlc-pagination-'+dataOpt.uniqid;
1118                    var pagination =  {
1119                        el: pagiid+' .swiper-pagination',
1120                        type: 'bullets',
1121                        clickable: true,
1122                    };
1123                    var navigation = {
1124                        nextEl: navid+' .jl-swiper-button-next',
1125                        prevEl: navid+' .jl-swiper-button-prev',
1126                    };
1127                    var autoplay = {
1128                        delay: dataOpt.autoplay_delay,
1129                        disableOnInteraction: false,
1130                    };
1131                    if( dataOpt.autoplay == false ){
1132                        autoplay = false;
1133                    }
1134                    if( dataOpt.pagination == false ){
1135                        pagination = false;
1136                    }
1137                    if( dataOpt.navigation == false ){
1138                        navigation = false;
1139                    }
1140                    var swiper = new Swiper( swiperContainer, {
1141                            loop: dataOpt.loop,
1142                            autoplay: autoplay,
1143                            watchSlidesVisibility: true,
1144                            parallax: dataOpt.parallax,
1145                            spaceBetween: 0,
1146                            speed: dataOpt.speed,
1147                            pagination: pagination,
1148                            navigation: navigation,
1149                            slidesPerView: 1,
1150                            effect: dataOpt.effect,
1151                            thumbs: {
1152                              swiper: swiper,
1153                            },
1154                        });
1155                }
1156      };
1157      var jl_wp_showcase = function ( $scope, $ ) {
1158        var showcaseContainer = $scope.find('.jl-showcase-container').eq(0);
1159                if ( showcaseContainer.length > 0 ) {
1160                showcaseContainer.each(function () {
1161                    var $showContainer = $(this),
1162                        $bgsOpt = $showContainer.find('.jl-img-inner'),
1163                        $contentOpt = $showContainer.find('.jl-showcase-item-inner');
1164                        var $showContent = $showContainer.find('.jl-showcase-content');
1165                        var setActive = function () {
1166                            $bgsOpt.eq(0).addClass('jl-showcase-active');
1167                            $showContent.eq(0).addClass('jl-showcase-active');
1168                        }
1169                        $showContent.on('touchstart mouseenter', function (e) {
1170                            var $currentContent = $(this);
1171                            if ((!$currentContent.hasClass('jl-showcase-active'))) {
1172                                e.preventDefault();
1173                                $bgsOpt.removeClass('jl-showcase-active').eq($currentContent.index()).addClass('jl-showcase-active');
1174                                $showContent.removeClass('jl-showcase-active').eq($currentContent.index()).addClass('jl-showcase-active');
1175                            }
1176                        }).on('touchend mouseleave', function (e) {
1177                            var $currentContent = $(this);
1178                            if ((!$currentContent.hasClass('jl-showcase-active'))) {
1179                                $showContent.removeClass('jl-showcase-active').eq($currentContent.index()).addClass('jl-showcase-active');
1180                                $bgsOpt.removeClass('jl-showcase-active').eq($currentContent.index()).addClass('jl-showcase-active');
1181                            }
1182                        });
1183                });
1184            }
1185      };
1186      var jellyMenu = function ( $scope, $ ) {
1187        var jlCusMenu = $scope.find('.menupost');
1188        if (jlCusMenu.length > 0) {
1189                jlCusMenu.each(function () {
1190                    var thisItem = $(this);
1191                    thisItem.find('.jl-cus-mega-menu').css({
1192                    'width': $(window).width(),
1193                    'left': -thisItem.offset().left,
1194                    });                    
1195                    thisItem.addClass('mega-menu-loaded')
1196                })
1197        }
1198
1199        window.addEventListener('resize', function() {
1200            if (jlCusMenu.length > 0) {
1201                jlCusMenu.each(function () {
1202                    var thisItem = $(this);
1203                    thisItem.find('.jl-cus-mega-menu').css({
1204                    'width': $(window).width(),
1205                    'left': -thisItem.offset().left,
1206                    });                    
1207                    thisItem.addClass('mega-menu-loaded')
1208                })
1209        }   
1210        });
1211};
1212
1213  $( window ).on( 'elementor/frontend/init', function() {
1214    elementorFrontend.hooks.addAction( 'frontend/element_ready/wesper-feature-carousel.default', jl_wp_sl );
1215    elementorFrontend.hooks.addAction( 'frontend/element_ready/wesper-newsticker-text.default', jl_wp_sl );
1216    elementorFrontend.hooks.addAction( 'frontend/element_ready/wesper-feature-center-slider.default', jl_wp_sl );
1217    elementorFrontend.hooks.addAction( 'frontend/element_ready/wesper-feature-slider.default', jl_wp_sl );
1218    elementorFrontend.hooks.addAction( 'frontend/element_ready/wesper-feature-sl-tab.default', jl_wp_sl_tab );
1219    elementorFrontend.hooks.addAction( 'frontend/element_ready/wesper-feature-hover.default', jl_wp_showcase );
1220    elementorFrontend.hooks.addAction( 'frontend/element_ready/wesper-main-menu.default', jellyMenu );
1221  });
1222})( jQuery );
1223
1224
1225

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.