PageSourceSearch

https://www.biopet.co.il/wp-content/themes/biopet/slider/template.js?1.0.287

js biopet.co.il collected 2026-10-02 20:06:21 UTC 40,396 bytes, 1,083 lines download raw bytes

1$ = jQuery;
2
3function getCookie(cname) {
4    var name = cname + "=";
5    var ca = document.cookie.split(';');
6    for(var i=0; i<ca.length; i++) {
7        var c = ca[i];
8        while (c.charAt(0)==' ') c = c.substring(1);
9        if (c.indexOf(name) != -1) return c.substring(name.length, c.length);
10    }
11    return "";
12}
13function showPopup() {
14    $(".fancybox-iframe.iframe_reg").show()
15    $(".inner_div_iframe_register .loader").hide();
16
17};
18function myFunction() {
19    document.getElementById("#wpsl-search-wrap ul").classList.toggle("show");
20  }
21  
22  function filterFunction (event) {
23    if(event.key == 'ArrowDown' || event.key == 'ArrowUp'){
24        if(event.key == 'ArrowDown'){
25            if($('.focus-li').length == 0){
26                $('.divautocomplete ul').find('li').not('[style*="display: none"]').first().addClass('focus-li');
27                $('#autocompleteInput').val($('li.focus-li').text());
28            }else{
29                $('li.focus-li').last().nextAll('li').not('[style*="display: none"]').first().addClass('focus-li');
30                $('li.focus-li').first().removeClass('focus-li');
31                $('#autocompleteInput').val($('li.focus-li').text());
32            }
33        }
34        else if(event.key == 'ArrowUp'){
35            if($('.focus-li').length == 0){
36                $('.divautocomplete ul').find('li').not('[style*="display: none"]').last().addClass('focus-li');
37            }else{
38                $('li.focus-li').last().prevAll('li').not('[style*="display: none"]').first().addClass('focus-li');
39                $('li.focus-li').last().removeClass('focus-li');
40            }
41        }
42        return;
43    }
44    $('li.focus-li').removeClass('focus-li');
45
46    if(!$('.wpsl-dropdown').hasClass('wpsl-active')){
47        $('.wpsl-dropdown').click();
48    } 
49    
50    var input, filter, ul, li, a, i;
51    input = document.getElementById("autocompleteInput");
52    filter = input.value.toUpperCase();
53    div = $("#wpsl-search-wrap .divautocomplete ul");
54    a = $("#wpsl-search-wrap .divautocomplete ul li");
55    
56    if(filter ==''){
57	    $('.wpsl-dropdown').find( $( ".wpsl-selected-item" ) ).attr( "data-value", "0");	
58    }else{
59        $('.wpsl-dropdown').find( $( ".wpsl-selected-item" ) ).attr( "data-value", "-1");
60    }
61    //if(event.keyCode)
62    for (i = 0; i < a.length; i++) {
63      txtValue = a[i].textContent || a[i].innerText;
64      $val_sku = $(a[i]).attr( "data-value" );
65        if($val_sku == filter){
66            $( ".wpsl-selected-item" ).attr( "data-value", $(a[i]).attr( "data-value" ));
67        }
68
69      if (txtValue.toUpperCase().indexOf(filter) > -1) {
70        a[i].style.display = "";
71        if (txtValue.toUpperCase()==filter){
72            $( ".wpsl-selected-item" ).attr( "data-value", $(a[i]).attr( "data-value" ));
73            if(event.key == 'Enter'){
74                $('.wpsl-dropdown').click();
75            }
76        }else{
77
78        }
79      } else {
80        a[i].style.display = "none";
81      }
82    }
83
84    
85
86  }
87
88 
89jQuery(window).load(function(){
90
91    navigator.geolocation.watchPosition(function(position) {
92    },
93    function(error) {
94       // alert(error.code);
95      if (error.code == error.PERMISSION_DENIED || error.code == 1){
96          //$('#wpsl-stores').append('<span class="not_location">אנא הזן את מיקומך/אזור מבוקש על מנת לקבל את רשימת החנויות הרלוונטיות</span>')
97            $('#wpsl-search-input').val('');   
98           // $('#wpsl-checkbox-filter input').prop('checked', false);
99           // $('#wpsl-search-btn').addClass('defaut_click');
100           //$('li[data-store-id]').remove();
101           //$('#wpsl-search-btn').click();
102        }
103    });
104
105   // $('#wpsl-search-btn').click();
106});
107
108jQuery(document).ready(function($){     
109    //$("img.lazyload").lazyload();
110    $('#searchSelect').on('change', function() {
111        $('#search_post_type').val(this.value);
112    });    
113    if($('.product_map_container').length > 0){
114
115        navigator.geolocation.watchPosition(function(position) {
116
117        },
118        function(error) {
119          if (error.code == error.PERMISSION_DENIED){
120              //$('#wpsl-stores').append('<span class="not_location">אנא הזן את מיקומך/אזור מבוקש על מנת לקבל את רשימת החנויות הרלוונטיות</span>')
121                $('#wpsl-search-input').val('');
122                $('#wpsl-search-btn').addClass('default_click');
123                $('#wpsl-search-btn').click();
124            }
125        });  
126    } 
127      
128    if ($(window).width()<1250){
129        $('.mobile_search').on('click',function(){
130            $('.biopet-header > .clearfix > .menu-form').toggle();
131            $('.navbar-header .mobile_search svg').toggle();
132            // $('.navbar-header .mobile_search span.icon').toggleClass('close_icon');
133        });
134    }
135    if($('.flex-control-nav').length > 0){
136        $('.flex-control-nav').flexslider();
137    }  
138  
139      $('.wr-megamenu-container ul.wr-mega-menu > li.wr-megamenu-item, .wr-megamenu-container ul.wr-mega-menu > li.wr-megamenu-item > a.menu-item-link, .wr-megamenu-container ul.wr-mega-menu > li.wr-megamenu-item > a.menu-item-link span').click(function(e) {
140        if ($(window).width()>=1250){
141        if($(this).find(a).attr('href').length == 0 || $(this).find(a).attr('href').length == '#') {
142            return;
143         }  
144        }
145        if ($(window).width()<1250){ 
146                $('.mega_menu_articles .caption').click(function(e) {
147                    e.preventDefault();
148                    return;
149                });
150            }
151           
152            if($(this).hasClass('menu-item')){ //click on li
153                if(event.target.nodeName !='A' && $(event.target).attr('class') !='ig-menu-title' ){
154                    $(this).children('.wr-megamenu-inner').toggle();
155                    $(this).closest('li').toggleClass('active-t');
156                }
157            }
158            else if($(this).hasClass('menu-item-link')){ //clicked on a
159                $(this).closest('li').toggleClass('active-t');
160                $(this).closest('li').children('.wr-megamenu-inner').toggle();
161            }
162            else if($(this).hasClass('menu_title')){ //clicked on span
163                if(event.target.nodeName !='A'){
164                $(this).closest('li').toggleClass('active-t');
165                $(this).closest('li').children('.wr-megamenu-inner').toggle();
166                }
167            } 
168            if ($(window).width()<1250){ 
169                        
170                var target = $( e.target );
171                if ( (! target.is( "a" ) || $(this).hasClass('menu-item-link') || $(this).next('.wr-megamenu-inner').lenght > 0) && !$(target).hasClass('ig-menu-title')) {
172                    e.preventDefault();
173                    return false;
174                }
175                    
176            }
177      });
178    
179    $('.navbar-nav > li.menu-li, .navbar-nav > li.menu-li .menu-li-icon').hover(function(){
180        $('.wr-megamenu-container ul.wr-mega-menu > li:first-of-type').addClass('hover');
181        $('.wr-megamenu-container ul.wr-mega-menu > li:first-of-type > a').addClass('hover')
182        $('.wr-megamenu-container ul.wr-mega-menu > li:first-of-type > .wr-megamenu-inner').addClass('open_first');
183    });
184
185    $('.wr-megamenu-container ul.wr-mega-menu>li').hover(function(){
186        $('.wr-megamenu-container ul.wr-mega-menu > li:first-of-type').removeClass('hover');
187        $('.wr-megamenu-container ul.wr-mega-menu > li:first-of-type > a').removeClass('hover')
188        $('.wr-megamenu-container ul.wr-mega-menu > li:first-of-type > .wr-megamenu-inner').removeClass('open_first');
189    })
190
191
192    $(".wr-megamenu-inner").mouseover(function(e){
193        $(this).parent('li.menu-item').addClass('hover');
194        $(this).parent('li.menu-item').children('a').addClass('hover');
195     });
196     $(".wr-megamenu-inner").mouseout(function(e){
197        $(this).parent('li.menu-item').removeClass('hover');
198        $(this).parent('li.menu-item').children('a').removeClass('hover');
199    });
200
201    if($(window).width() > 768){
202        $('#wpsl-search-btn').click(function(e) {
203            wpsl_search_btn_click();
204            if(!$(this).hasClass('default_click')){
205             $('#wpsl-wrap').addClass('after-search');
206            }
207            $(this).removeClass('default_click');
208        });
209    }
210    if($(window).width() <= 768){
211        $('.single-product .summary.entry-summary .product_title.entry-title').remove();
212        $('#wpsl-search-btn').click(function(e) {
213            //wpsl_search_btn_click();
214            if(!$(this).hasClass('default_click')){
215                $('#wpsl-wrap').addClass('after-search');
216
217                if($('#wpsl-search-input' ).val() != ''){
218                    $([document.documentElement, document.body]).animate({
219                        scrollTop: $("#wpsl-gmap").offset().top + 300
220                    }, 1500);
221                }else{
222                    //$('#wpsl-stores').append('<span class="not_location">אנא הזן את מיקומך/אזור מבוקש על מנת לקבל את רשימת החנויות הרלוונטיות</span>');
223                }
224            }
225            $(this).removeClass('default_click');
226        }); 
227        $('body').on('click','.wpsl-direction-wrap a',function(e){
228            $([document.documentElement, document.body]).animate({
229                scrollTop: $("#wpsl-gmap").offset().top - 70
230            }, 1500);
231        });   
232    }
233
234    if($(window).width()>768){
235        $('body').on('click','.wpsl-direction-wrap a',function(e){
236            e.preventDefault();
237        });
238    }
239
240    function disableScroll() { 
241        // Get the current page scroll position 
242        scrollTop = window.pageYOffset || document.documentElement.scrollTop; 
243        scrollLeft = window.pageXOffset || document.documentElement.scrollLeft, 
244      
245            // if any scroll is attempted, set this to the previous value 
246            window.onscroll = function() { 
247                window.scrollTo(scrollLeft, scrollTop); 
248            }; 
249    } 
250
251    function enableScroll() { 
252        window.onscroll = function() {}; 
253    } 
254
255    $('.category-filter a').click(function(e){
256        if($(this).hasClass('active')){
257            return;
258        }
259        $('.articles-home').empty();
260        $('.articles-home').html('<span class="bploader"></span>');
261       // alert( my_ajax_object.ajaxurl);
262        $('.category-filter a').removeClass('active')
263        $(this).addClass('active')
264        $('.category-filter a')
265        e.preventDefault();
266        var cat_id = $(this).attr('data-id');
267        var post_per_page = $(this).attr('data-mobiledetect');
268        $.ajax({
269            type : "POST",
270            url : my_ajax_object.ajax_url,
271            data : {action: "home_articles",cat_id : cat_id,post_per_page : post_per_page},
272            success: function(response) {
273                $(".articles-home").html($(response).fadeIn('slow'));
274            }
275       });   
276
277    });
278
279
280    $('.whatIsBMIReadMore').click(function(){
281        $('.whatIsBMITitleContent').slideDown();
282        $('.whatIsBMIReadMore').hide();
283    })
284    if($(window).height() - 93 < $('.iframe_reg').height()){
285        $('.iframe_reg').height($(window).height() - 113)
286    }
287//   open pop up
288    /*$('.overlay_register').click(function(){
289        $("#open_register" ).trigger('click');
290    });*/
291    $('.newsletter-container .open_register_form').click(function(){
292        parent.$("#open_register" ).trigger('click');
293    });
294
295    $('#open_register').click(function(e){
296        if($(".fancybox-iframe.iframe_reg").length == 0){
297            $(".inner_div_iframe_register").append('<iframe id="fancybox-frame1491113468450" onload="showPopup()" name="fancybox-frame1491113468450" class="fancybox-iframe iframe_reg" frameborder="0" vspace="0" hspace="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" scrolling="auto" src="'+url_to_popup_iframe+'"></iframe>');
298        }else{
299            $(".inner_div_iframe_register .iframe_reg").attr("src",url_to_popup_iframe);
300        }
301
302        //if (getCookie('username')==''){
303            if(!$('body').hasClass('activewrap_body')){
304                disableScroll();
305                $('body').toggleClass('activewrap_body');
306                setTimeout(function() {
307                    $('.wrap_open').toggleClass('activewrap');
308                    $('.div_iframe_register').toggleClass('activeiframe');
309                    //$('.wrap_open').slideToggle( "slow");
310                    $('.overlay_register').toggleClass('activeoverlay');
311                },200);
312            } else {
313                sessionStorage.setItem("clouse_popup",'true')
314                enableScroll();
315                $('.wrap_open').toggleClass('activewrap');
316                $('.div_iframe_register').toggleClass('activeiframe');
317                //$('.wrap_open').slideToggle( "slow");
318                $('.overlay_register').toggleClass('activeoverlay');
319                setTimeout(function() {
320                    $('body').toggleClass('activewrap_body');
321                    $('html').toggleClass('activewrap_html');
322                }, 200);
323            }
324    });
325
326    //translate breadcrumb in search results page
327    $('.breadcrumbs span').each(function(){
328        if($(this).attr('property')=='name'){
329            if ($(this).text().indexOf("Search results for") >= 0){
330                $(this).text( $(this).text().replace("Search results for", "תוצאות חיפוש עבור"));
331            }
332        }
333    });
334// menu
335    jQuery('.biopet-header .btn-menu').click(function(){
336        $('body').toggleClass('menu-responsive-open');
337    })
338
339    $('.biopet-header .search-form').submit(function () {
340        if($('.menu-searchValue').val().length<2){
341            return false;
342        }
343    });
344    // $('.wr-megamenu-container ul.wr-mega-menu li:first-child').addClass('active');
345    // articles
346    $(".span").each(function(){
347        $(this).find('> a').replaceWith('<span>' +  $(this).find('> a').html() + "</span>");
348    })
349    $('.mega_menu_articles').mouseleave(function(){
350        $('.wr-megamenu-container ul.wr-mega-menu li',this).removeClass('active');
351        // $('.wr-megamenu-container ul.wr-mega-menu li:first-child',this).addClass('active');
352
353    });
354    $('.mega_menu_articles .wr-megamenu-container ul.wr-mega-menu li').mouseover(function(){
355        $('.mega_menu_articles .wr-megamenu-container ul.wr-mega-menu li').removeClass('active');
356        $(this).addClass('active');
357    });
358    $('#site-navigation').mouseleave(function(){
359        $('.mega_menu_articles .wr-megamenu-container ul.wr-mega-menu li').removeClass('active');
360    });
361    // end articles
362    // products
363    $('#site-navigation-product').mouseleave(function(){
364        $('.mega_menu_products .wr-megamenu-container ul.wr-mega-menu li').removeClass('active');
365    });
366    $('.mega_menu_products').mouseleave(function(){
367        $('.wr-megamenu-container ul.wr-mega-menu li',this).removeClass('active');
368        // $('.wr-megamenu-container ul.wr-mega-menu li:first-child',this).addClass('active');
369
370    });
371    $('.mega_menu_products .wr-megamenu-container ul.wr-mega-menu li').mouseover(function(){
372       
373        if(event.target.nodeName !='A' && $(event.target).attr('class') !='ig-menu-title' ){
374            $('.mega_menu_products .wr-megamenu-container ul.wr-mega-menu li').removeClass('active');
375            $(this).addClass('active');
376        }
377    });
378    // end products
379    // professionals
380    $('.professional-page-menu-ul').addClass('clearfix');
381    $(window).load(function(){
382        if ($(window).width()>=1250){
383            $('.INDDesktop .biopet-header .menu-professionals-container').find('.menu-item a').text(function (index, text) {
384                return text+" >";
385            });
386        }
387    });
388    // end professionals
389
390    // responsive
391    if ($(window).width()<1250){
392        $('.menu-item-link').attr('href','#');
393
394        $(".menu-li").on('click',function(e){
395            $('.mega_menu_articles .caption').click(function(e) {
396                e.preventDefault();
397                return;
398            });
399            var menu_this=$(this);
400            if(menu_this.hasClass('li-menu-open')){
401                console.log($(this).closest('.mega_menu_articles').length);
402                console.log($(event.target).attr('class') );
403                console.log($(this).hasClass('ig-menu-title'));
404                if(event.target.nodeName != 'A' ){
405                 if($(event.target).attr('class')== 'ig-menu-title' && $(this).closest('.mega_menu_articles').length == 1){
406                        return;
407                    }
408                    $(this).find("nav").slideUp('300',function(){
409                        menu_this.removeClass('li-menu-open');
410                    });
411                }
412            }else{
413                $(this).find("nav").slideDown();
414                menu_this.addClass('li-menu-open');
415            }
416        });
417    }
418
419    //end responsive
420// end menu
421    /*$("#type_animal,#type_dog,#month_birth,.nf-form-layout select").select2({
422        minimumResultsForSearch: -1
423    });*/
424    
425    /*setTimeout(function(){
426        if( $("nf-field select").length){
427             $("nf-field select").select2({
428                minimumResultsForSearch: -1
429            });
430        }
431    },500);
432
433    setTimeout(function(){
434        if( $("nf-field select").length){
435             $("nf-field select").select2({
436                minimumResultsForSearch: -1
437            });
438        }
439    },500);*/
440
441// select
442    /*$(".select-search-kind-dog, select.professionals-field").select2({
443        templateResult: function (data, container) {
444            if (data.element) {
445                $(container).addClass($(data.element).attr("class"));
446            }
447            return data.text;
448        }
449    });*/
450    // home page
451    // $(".site-header select,.aboutAnimal-another").select2({
452    //     minimumResultsForSearch: -1,
453    //     templateResult: function (data, container) {
454    //         if (data.element) {
455    //             $(container).addClass($(data.element).attr("class"));
456    //         }
457    //         return data.text;
458    //     }
459    // });
460
461    // end home page
462    // category page
463    // $('.animal-by-category').select2({
464    //     minimumResultsForSearch: -1,
465    //     templateResult: function (data, container) {
466    //         if (data.element) {
467    //             $(container).addClass($(data.element).attr("class"));
468    //         }
469    //         return data.text;
470    //     }
471    // });
472    //
473    // $('.category-page #categories_select').on('select2:open', function (evt) {
474    //     $('.select2-dropdown').css("left","-18px");
475    // });
476    // $('.articles-page .animal-by-category').on('select2:open', function (evt) {
477    //     $('.select2-dropdown').css("width","auto");
478    // });
479    // $('.articles-page .animal-by-category').on('select2:open', function (evt) {
480    //     $('.select2-dropdown ul').css("max-height","100%");
481    // });
482    // // end category page
483    // $('.select-search-kind-dog').on('select2:open', function (evt) {
484    //     $('.select2-dropdown').addClass("complete-guide-select");
485    // });
486    // $('.professionals-field').on('select2:open', function (evt) {
487    //     $('.select2-dropdown').addClass("professionals-select");
488    // });
489    //
490    // $('.aboutAnimal-another').on('select2:open', function (evt) {
491    //     $('.select2-dropdown').addClass("animal-select");
492    // });
493    $('#animal_select, #categories_select').change(function(){
494        var id = $(this).children(":selected").attr("id");
495        $('#wrapSelectAnimal').attr('class',id);
496    });
497// end select
498
499    $(window).load(function(){
500
501        if ($(window).width()>=1250){
502            $(".INDMobile .menu-li").on('click',function(e){
503                var menu_this=$(this);
504                if(menu_this.hasClass('li-menu-open')){
505                    $(this).find("nav").slideUp('300',function(){
506                        menu_this.removeClass('li-menu-open');
507                    });
508                }else{
509                    $(this).find("nav").slideDown();
510                    menu_this.addClass('li-menu-open');
511                }
512            });
513        }
514        //Google map scrolling
515        $('.map iframe').addClass('scrolloff');
516        $('.map').on('click', function () {
517            $('.map iframe ').removeClass('scrolloff');
518        });
519
520        $(".map iframe").mouseleave(function () {
521            $('.map iframe').addClass('scrolloff');
522        });
523        // end Google map scrolling
524        // article intro text
525        if($('#article-text p').length){
526            $('#article-text p').each(function(){
527                var p=$(this);
528                var divh=$(this).parent().height();
529                while ($(p).outerHeight()>divh) {
530                    $(p).text(function (index, text) {
531                        return text.replace(/\w*\s(\S)*$/,'…');
532                    });
533                }
534            })
535
536        }
537        // end article intro text
538        // isotope
539
540        if ($(window).width()>=1900){
541            $('.events').isotope({
542                itemSelector: '.event',
543                masonry: { columnWidth: 407},
544                isOriginLeft: false
545            });
546        }else if ($(window).width()>=1250){
547            $('.events').isotope({
548                itemSelector: '.event',
549                masonry: { columnWidth: 376},
550                isOriginLeft: false
551            });
552        }else if ($(window).width()>=740){
553            $('.events').isotope({
554                itemSelector: '.event',
555                masonry: { columnWidth: 329},
556                isOriginLeft: false
557            });
558        }
559        $( window ).resize(function() {
560            if ($(window).width()>=1900){
561                $('.events').isotope({
562                    itemSelector: '.event',
563                    masonry: { columnWidth: 407},
564                    isOriginLeft: false
565                });
566            }else if ($(window).width()>=1250){
567                $('.events').isotope({
568                    itemSelector: '.event',
569                    masonry: { columnWidth: 376},
570                    isOriginLeft: false
571                });
572            }else if ($(window).width()>=740){
573                $('.events').isotope({
574                    itemSelector: '.event',
575                    masonry: { columnWidth: 329},
576                    isOriginLeft: false
577                });
578            }
579        });
580
581
582        $('.professionals').isotope({
583            itemSelector: '.professional',
584            masonry: { columnWidth: 94},
585            isOriginLeft: false
586        });
587        $( window ).resize(function() {
588            if ($(window).width()>=1900){
589                $('.brands-page-brands').isotope({
590                    itemSelector: '.brands-page-brand',
591                    masonry: { columnWidth: 360},
592                    isOriginLeft: false
593                });
594            }else if ($(window).width()>=1250){
595                $('.brands-page-brands').isotope({
596                    itemSelector: '.brands-page-brand',
597                    masonry: { columnWidth: 376},
598                    isOriginLeft: false
599                });
600            }else if($(window).width()>=740){
601                $('.brands-page-brands').isotope({
602                    itemSelector: '.brands-page-brand',
603                    masonry: { columnWidth: 329},
604                    isOriginLeft: false
605                });
606            }
607        });
608        if ($(window).width()>=1900){
609            $('.brands-page-brands').isotope({
610                itemSelector: '.brands-page-brand',
611                masonry: { columnWidth: 360},
612                isOriginLeft: false
613            });
614        }else if ($(window).width()>=1250){
615            $('.brands-page-brands').isotope({
616                itemSelector: '.brands-page-brand',
617                masonry: { columnWidth: 376},
618                isOriginLeft: false
619            });
620        }else if($(window).width()>=740){
621            $('.brands-page-brands').isotope({
622                itemSelector: '.brands-page-brand',
623                masonry: { columnWidth: 329},
624                isOriginLeft: false
625            });
626        }
627
628        // end isotope
629    })
630// sliders
631
632    
633
634    
635
636
637    // var swiperTop = new Swiper('.topSlider.swiper-container', {
638    //     height:'500px',
639    //     pagination: '.swiper-pagination',
640    //     paginationClickable: true,
641    //     loop:true,
642    //     autoplay: 6000,
643    //     autoplayDisableOnInteraction:false,
644    //     autoplayStopOnLast:false
645    // });
646    // $('.topSlider.swiper-container').mouseover(function(){
647    //     swiperTop.stopAutoplay()
648    // })
649    // $('.topSlider.swiper-container').mouseleave(function(){
650    //     swiperTop.startAutoplay();
651    // })
652
653    // var swiperBrand = new Swiper('.brand.swiper-container', {
654    //     nextButton: '.swiper-button-next',
655    //     prevButton: '.swiper-button-prev',
656    //     slidesPerView: 8,
657    //     loop: true,
658    //     centeredSlides: false,
659    //     paginationClickable: true,
660    //     preventClicks: false,
661    //     simulateTouch: false,
662    //     breakpoints: {
663    //         1600: {
664    //             slidesPerView: 7,
665    //             spaceBetweenSlides: 10
666    //         },
667    //         1249: {
668    //             slidesPerView: 5,
669    //             spaceBetweenSlides: 10
670    //         },
671    //         1100: {
672    //             slidesPerView: 4,
673    //             spaceBetweenSlides: 10
674    //         },
675    //         739: {
676    //             slidesPerView: 3,
677    //             spaceBetweenSlides: 0,
678    //             simulateTouch: true
679    //
680    //         }
681    //     }
682    // });
683    // var swiperBrand = new Swiper('.general-brands.swiper-container', {
684    //     nextButton: '.swiper-button-next',
685    //     prevButton: '.swiper-button-prev',
686    //     slidesPerView: 6,
687    //     centeredSlides: false,
688    //     paginationClickable: true,
689    //     spaceBetween: 30,
690    //     preventClicks: false,
691    //     simulateTouch: false,
692    //     breakpoints: {
693    //         1899: {
694    //             slidesPerView: 8,
695    //             spaceBetweenSlides: 10
696    //         },
697    //         1600: {
698    //             slidesPerView: 6,
699    //             spaceBetweenSlides: 10
700    //         },
701    //         1249: {
702    //             slidesPerView: 3,
703    //             spaceBetweenSlides: 10
704    //         },
705    //         739: {
706    //             slidesPerView: 2,
707    //             spaceBetweenSlides: 0,
708    //             simulateTouch: true
709    //
710    //         }
711    //     }
712    // });
713// end sliders
714
715// landing page
716    var bannerSwiper = new Swiper('.landing-cats-swiper-container', {
717        effect: 'fade',
718        autoplay: 2500,
719        autoplayDisableOnInteraction: false,
720        slidesPerView: 1,
721    });
722
723    var packSwiper = new Swiper('.desktop .landing-pack-swiper-container', {
724        effect: 'fade',
725        autoplay: 2500,
726        autoplayDisableOnInteraction: false,
727        slidesPerView: 1
728    }); 
729
730    var galleryThumbs = new Swiper('.gallery-thumbs', {
731        slidesPerView: 3,
732        loop: 'true',
733        nextButton: '.swiper-button-next',
734        prevButton: '.swiper-button-prev',
735    }); 
736
737    $('.single-landing-page .floating_button_colors').click(function(){
738        var top = $('.single-landing-page .mobile .content_form')[0].offsetTop;
739        $('html, body').animate({ scrollTop: top }, 'slow');
740    });
741
742    $('.single-landing-page .popup_area .text_to_icons span').click(function(){
743        $(this).parent().hide();
744    });
745
746    $('.single-landing-page .popup_area .icon img').click(function(){
747        $(this).next().show();
748    });
749    
750    $( window ).scroll(function() {
751        if($('.single-landing-page .mobile').length){
752            var scrolled   = $(window).scrollTop();
753            var topElement = $('.single-landing-page .mobile .content_form .nf-form-cont')[0].offsetTop;
754            var h          = $( window ).height();
755            if((scrolled + h) - 20 > topElement){
756                $('.single-landing-page .floating_button_colors').hide();
757            }
758            else{
759                $('.single-landing-page .floating_button_colors').show();
760            }
761        }
762    });
763    
764    $(document).on("keypress", ".lp_phone", function(evt){
765        var charCode = (evt.which) ? evt.which : event.keyCode;
766        if (charCode != 46 && charCode > 31 && (charCode < 48 || charCode > 57)) return false;
767        return true;
768    });
769
770// end landing page
771
772// new newsletter
773// end new newsletter
774
775// newsletter
776    var document_width=$( window ).width();
777    var iframe_width='762px';
778    if(document_width<800){
779        iframe_width='70%';
780    }
781    $(".newsletter a").fancybox({
782        maxWidth	: 800,
783        maxHeight	: 600,
784        fitToView	: false,
785        width		: iframe_width,
786        height		: '80%',
787        autoSize	: false,
788        closeClick	: false,
789        openEffect	: 'none',
790        closeEffect	: 'none',
791        type : 'iframe',
792        padding: 0
793    });
794// end newsletter
795//footer
796    $(".footer-main-menu").prepend("<span class='footer-icon'></span>");
797    $('.nav-menu-footer .menu-footer> li').each(function(){
798        $(this).find("> a").replaceWith('<span class="sub-item-title">' +  $(this).find("> a").html() + "</span>");
799    })
800    if ($(window).width()<1250){
801        $(".sub-item-title").on('click',function(e){
802            e.preventDefault();
803            $(this).parent().toggleClass("footer-toggle-bg-minus footer-toggle-bg-plus");
804            $(this).parent().find("ul").toggle();
805
806        });
807
808    }
809// end-footer
810// home page
811
812    // brand arrow
813    if (($(window).width()<1250 && $(".swiper-wrapper").children('.brand-slider').length<=3)
814        ||($(window).width()<1900 && $(".swiper-wrapper").children('.brand-slider').length<=5)
815        ||($(window).width()<740 && $(".swiper-wrapper").children('.brand-slider').length<=2)){
816        $('.brand-swiper-button-next').css('display','none');
817        $('.brand-swiper-button-prev').css('display','none');
818    }
819//end home page
820// question-answer
821    $(".wrapper-question-answer").on('click',function(e){
822        $(this).find('p').toggle();
823        if( $(this).hasClass('question-answer-plus')){
824            $(this).removeClass("question-answer-plus");
825            $(this).addClass("question-answer-minus");
826        }
827        else{
828            $(this).addClass("question-answer-plus");
829            $(this).removeClass("question-answer-minus ");
830        }
831
832    });
833// question-answer
834// select redirect
835    $(".aboutAnimal-another").change(function(){
836        window.location.href = $(this).find(':selected').data('href');
837    });
838    $(".select-search-kind-dog, .animal-by-category").change(function(){
839        window.location.href = $(this).find(':selected').data('href');
840    });
841// end select redirect
842
843
844// races info block width
845    /*var margin=$('.dog-informaiton').width()/2 *-1;
846    $('.dog-informaiton').css('margin-right',$('.dog-informaiton').width()/2 *-1);
847    $('.dog-informaiton').css("right","50%");*/
848
849    /*$( window ).resize(function() {
850        var margin=$('.dog-informaiton').width()/2 *-1;
851        $('.dog-informaiton').css("right","50%");
852        $('.dog-informaiton').css('margin-right',$('.dog-informaiton').width()/2 *-1);
853    })
854    if($('.dog-informaiton').height()<192){
855        $('.dog-informaiton').css('margin-bottom',' -40px');
856    }*/
857// races info block width
858// banner
859    var heightBanner=0;
860    $('.banner').each(function(){
861        if (heightBanner<$(this).find('.bannerContain p').height()) {
862            heightBanner=$(this).find('.bannerContain p').height();
863        }
864    })
865    $('.banner').each(function(){
866        $(this).find('.bannerContain p').height(heightBanner);
867    })
868    $( window ).resize(function() {
869        var heightBanner=0;
870        $('.banner').each(function(){
871            if (heightBanner<$(this).find('.bannerContain p').height()) {
872                heightBanner=$(this).find('.bannerContain p').height();
873            }
874        })
875        $('.banner').each(function(){
876            $(this).find('.bannerContain p').height(heightBanner);
877        })
878    })
879// end banner
880// effect to article div scroll
881    $(".toOurArticles").on('click', function(event) {
882        if (this.hash !== "") {
883            event.preventDefault();
884            var hash = this.hash;
885            $('html, body').animate({
886                scrollTop: $(hash).offset().top
887            }, 800, function(){
888                window.location.hash = hash;
889            });
890        }
891    });
892// end effect to article div
893// Contact Us
894    $('.contact').css('margin-right',$('.contact').width()/2 *-1);
895    $('.contact').css("right","50%");
896
897    $( window ).resize(function() {
898        $('.contact').css("right","50%");
899        $('.contact').css('margin-right',$('.contact').width()/2 *-1);
900    })
901// Contact Us
902//    404
903//    if ($(window).width()>=740){
904    var doc_width=$( window ).width();
905    var slid_height=doc_width/1.92;
906    $('.error-404 .page-content ').height(slid_height);
907//    }
908//    else{
909//        $('.error-404 .page-content  ').height(455)
910//    }
911
912    $( window ).resize(function() {
913//        if ($(window).width()>=740){
914        var doc_width=$( window ).width();
915        var slid_height=doc_width/1.92;
916        $('.error-404 .page-content ').height(slid_height);
917//        }
918//        else{
919//            $('.error-404 .page-content ').height(455)
920//        }
921    });
922//    end 404
923//    guide names
924    $('.guide-names .letter .dog-item:last-child .dog-kind').each(function(){
925        $(this).text($(this).text().substring(0,$(this).text().length - 1));
926    });
927//    end guide names
928
929//    youtube popup news and updates
930    $(".kicon-youtube").fancybox({
931        autoSize	: false,
932        closeClick	: false,
933        openEffect	: 'none',
934        closeEffect	: 'none'
935    });
936
937
938//  end  youtube popup news and updates
939    //read more
940    $('.more_st.openHidden').click(function(e){
941        e.preventDefault();
942        if(!$(this).prev().is(':visible')){
943            $(this).text('הסתר');
944        }else{
945            $(this).text('קרא עוד');
946        }
947        $(this).prev().slideToggle();
948//        $(this).prev().slideToggle();
949
950    });
951
952    // validations
953    /*$('select').on("select2:selecting", function(e) {
954        $(this).parent().children().removeClass('data-to-calc-error');
955    });*/
956
957    $('#weight').focusout(function(){
958        // שונה מ-0 ובעל 2 ספרות
959        if (($('#weight').val()!=""&&($('#weight').val()>=100||$('#weight').val()<=0))||$('#weight').val()==""){
960            $('#weight').addClass('data-to-calc-error');
961            // $('#weight').prev().show();
962        }
963        // else  {
964        //     $('#weight').prev().hide();
965        // }
966        // עיגול המספר ל-2 ספרות אחרי הנקודה
967        if ((x = Math.floor($('#weight').val() * 100) / 100 )!=$('#weight').val())
968            $('#weight').val(x);
969    });
970
971    $('#height').focusout(function(){
972        // שונה מ-0 ובעל 2 ספרות
973        if ($('#height').val()!=""&&($('#height').val()>=100||$('#height').val()<=0)){
974            $('#height').addClass('data-to-calc-error');
975            //$('#height').prev().show();
976        }
977        else    $('#height').removeClass('data-to-calc-error');
978
979        // עיגול המספר ל-2 ספרות אחרי הנקודה
980        if ((x = Math.floor($('#height').val() * 100) / 100 )!=$('#height').val())
981            $('#height').val(x);
982    });
983
984    $('.calc-form').submit(function(){
985        var count=0;
986        var valid=0;
987        $('.required',this).each(function(){
988            if (!$(this).val())
989            {
990                $(this).addClass('data-to-calc-error');
991                $(this).parent().children().last().addClass('data-to-calc-error');
992                //$(this).prev().show();
993                count++;
994            }
995            else {
996                $(this).removeClass('data-to-calc-error');
997                $(this).parent().children().last().removeClass('data-to-calc-error');
998                //  $(this).prev().hide();
999            }
1000
1001        });
1002        if ($('#weight').val()!=""&&($('#weight').val()>=99||$('#weight').val()<=0)){
1003            $('#weight').addClass('data-to-calc-error');
1004            // $('#weight').prev().show();
1005            count++;
1006        }
1007        else $('#weight').prev().hide();
1008        if ($('#height').val()!=""&&($('#height').val()>=99||$('#height').val()<=0)){
1009            $('#height').addClass('data-to-calc-error');
1010            // $('#height').prev().show();
1011            count++;
1012        }
1013        //  else $('#height').prev().hide();
1014        if(count>0)
1015            return false;
1016
1017        dataLayer.push({'event':'bmi_calculator', 'dog_gender':$( ".m-f option:selected" ).text(), 'dog_breed':$
1017( ".type option:selected" ).text(), 'weight':$('#weight').val(), 'height':$('#height').val()});
1018        console.log({'event':'bmi_calculator', 'dog_gender':$( ".m-f option:selected" ).text(), 'dog_breed':$( ".type option:selected" ).text(), 'weight':$('#weight').val(), 'height':$('#height').val()});
1019        return true;
1020   
1021           
1022
1023        
1024    });
1025
1026    $('.required').focus(function(){
1027        $(this).removeClass('data-to-calc-error');
1028        $(this).children().removeClass('data-to-calc-error');
1029    });
1030
1031
1032
1033    //sort the option by alphabetic
1034    $('.type').html($(".type option").sort(
1035        function (a, b) {
1036            var str = a.text;
1037            return a.text == b.text ? 0 : (a.text > b.text) && !str.match("^מעורב") ? 1 : -1
1038        }));
1039        $('.type').prepend('<option selcted disables></option>')
1040    $('.type').val($('.type option:first-child').val()).trigger('change');
1041
1042    // keep search preferences
1043    if( $('#searchSelect')){
1044    $('#searchSelect').on('change', function() {
1045        localStorage.setItem("optionSearch", $('#searchSelect').val() );     
1046    });     
1047      $('#search_post_type').val(localStorage.getItem("optionSearch"));          
1048    }
1049    if(localStorage.getItem('optionSearch')!==null){
1050        $('#searchSelect').val(localStorage.getItem('optionSearch'));
1051        $('#searchSelect').change();  
1052    }       
1053});
1054
1055
1056function wpsl_search_btn_click(){
1057    if($('#wpsl-search-input').val() == ''){
1058        return;
1059    }
1060    var search_type = '';
1061    if($('#wpsl-wrap').hasClass('productmap-temaplate') == true){
1062        search_type = 'location';
1063        product_search =   $('.product_title').text();
1064    }else{
1065        search_type = 'product';
1066        product_search =   $('.wpsl-selected-item').text();
1067    }
1068    /*console.log(search_type);
1069    console.log($('#wpsl-search-input').val());
1070    console.log(product_search);*/
1071    if($('#wpsl-search-input').val()!=''){  
1072    	/*dataLayer.push({
1073        "event": "store_locator",
1074        "action": "search",
1075        "search_type": search_type, // search type – location or product
1076        "location":$('#wpsl-search-input').val(), // replace with location searched if applicable
1077        "product_search":  product_search // replace with product searched if applicable
1078        });*/
1079    }
1080}
1081
1082
1083  

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.