PageSourceSearch

https://www.medicon.co.il/scripts/head.js?v=4.7.13

js medicon.co.il collected 2026-09-29 20:25:54 UTC 29,116 bytes, 831 lines download raw bytes

1// head.js
2
3/**
4* Cookie plugin
5*
6* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
7* Dual licensed under the MIT and GPL licenses:
8* http://www.opensource.org/licenses/mit-license.php
9* http://www.gnu.org/licenses/gpl.html
10*
11*/
12
13jQuery.cookie = function (a, b, c) { if (typeof b != "undefined") { c = c || {}; if (b === null) { b = ""; c.expires = -1 } var d = ""; if (c.expires && (typeof c.expires == "number" || c.expires.toUTCString)) { var e; if (typeof c.expires == "number") { e = new Date; e.setTime(e.getTime() + c.expires * 24 * 60 * 60 * 1e3) } else { e = c.expires } d = "; expires=" + e.toUTCString() } var f = c.path ? "; path=" + c.path : ""; var g = c.domain ? "; domain=" + c.domain : ""; var h = c.secure ? "; secure" : ""; document.cookie = [a, "=", encodeURIComponent(b), d, f, g, h].join("") } else { var i = null; if (document.cookie && document.cookie != "") { var j = document.cookie.split(";"); for (var k = 0; k < j.length; k++) { var l = jQuery.trim(j[k]); if (l.substring(0, a.length + 1) == a + "=") { i = decodeURIComponent(l.substring(a.length + 1)); break } } } return i } };
14
15function getScrollOffset() {
16    var offset = 10;
17    var $fixed = $("#header").find(".fixed-top");
18    if ($fixed.length) offset += $fixed.outerHeight() || 0;
19    var $sticky = $("#sticky_header:not(.hide)");
20    if ($sticky.length) offset += $sticky.outerHeight() || 0;
21    if ($("body").hasClass("responsive") && $("#mobile_header").length)
22        offset += $("#mobile_header").outerHeight() || 0;
23    var adminBar = $(".AdminBar").outerHeight();
24    if (adminBar) offset += adminBar;
25    return offset;
26}
27
28function init() {
29    
30    /*images loader start*/
31       /* var imgDefer = document.getElementsByTagName('img');
32        for (var i = 0; i < imgDefer.length; i++) {
33            if (imgDefer[i].getAttribute('data-src')) {
34                imgDefer[i].setAttribute('src',imgDefer[i].getAttribute('data-src'));
35            }
36        }*/
37    /*images loader end*/
38        
39    /*fancybox start*/
40        $(".fancybox").fancybox(
41            {
42                'autoScale': 'false',
43                'transitionIn': 'none',
44                'transitionOut': 'none',
45                'width': '800',
46                'height': '600',
47                'autoDimensions': 'false',
48                'scrolling': 'auto'
49            });
50        $(".fancybox.autoload").fancybox().trigger('click');
51        $(".fancybox.iframe").fancybox({ 'type': 'iframe', 'iframe': { 'scrolling': 'auto' } });
52
53
54        $('.open-fancybox').on('click', function() {
55            // Try logging the button element and its data-id attribute to verify it's being read
56             
57            var src = $(this).attr("href"); // Retrieve the data-id attribute
58
59            // If src is undefined, log an error
60            if ( ! src ) {
61                return false;
62            }
63
64            // Open Fancybox with the src set to the data-id value
65            $.fancybox.open({
66                src: src,
67                type: 'inline', // Inline type to load the content within the same page
68                opts: {
69                    smallBtn: true, // Optional: Hide the small close button
70                    baseClass: 'custom-modal-class', // Optional: Add a custom class for styling
71                    afterShow: function(instance, current) {}
72                }
73            });
74            return false;
75        });
76    /*fancybox end*/
77
78    /*tooltip start*/
79        $("body").on('mouseover', ".tooltip", function (event) {
80            var obj = this;
81            $(this).qtip({
82                overwrite: false,
83                position: {
84                    my: 'bottom center',
85                    at: 'top center'
86                },
87                style: {
88                    classes: 'qtip-dark qtip-rounded ' + $(obj).attr("tooltipclass")
89                },
90                content: {
91                    title: function (event, api) { return $(this).find("span.value").html() },
92                    text: function (event, api) { return $(this).find("span.content").html(); }
93                },
94                show: {
95                    ready: true // Needed to make it show on first mouseover event
96                }
97            });
98        });
99    /*tooltip end*/
100
101    /*promotions offers start*/
102        $("body").on("click",".promotionsofferitemsul li .button a.es_button_link",function(){
103            var promotionitem = $(this);
104           // $(promotionitem).parents("li").replaceWith("");
105            $.get("/cartLogic.asp?ajax=1&pid=" + $(this).attr("itemid") + "&quan=" + $(this).attr("quantity") , function (data)
106            {
107                RenderAllCarts();
108            });
109            return false;
110        });
111 
112         
113
114        $("body").on("click",".relatives-carousel .es_button_link",function(){
115            
116            $.get("/cartLogic.asp?ajax=1&pid=" + $(this).attr("itemid") + "&quan=" + $(this).attr("quantity") , function (data)
117            {
118
119                var data_array = data.split("|");
120                //console.log(data);
121                if (data_array[0]=="0")
122                    {   
123                        alert (data_array[1]);
124                    }
125                else
126                {
127                    RenderAllCarts();
128                }
129                 
130            });
131            return false;
132        });
133    /*promotions offers end*/
134
135    /*cart start*/
136        $("body").on("click","#clear_cart",function(){
137            if(confirm($(this).attr("clear_alert")))
138            {
139                $.get("/services/cartservices.asp?service=clearcart", function (data)
140                {
141                    RenderAllCarts();
142                    return false;
143                });
144            }
145        });
146    /*cart end*/
147     
148    /*accordion start*/
149        if ($(".es_accordion").length) {
150            $("body").on("click",".es_accordion .nav-link", function () {
151                if ($(this).hasClass("active")) {
152                    $(this).removeClass("active");
153                }
154                else {
155                    $(this).addClass("active");
156                }
157                var current_nav = $(this);
158                $(this).parent().find(".nav-link").each(function () {
159                    $(this).not(current_nav).removeClass("active");
160                });
161
162
163                var current_accoordionid = $(this).next().attr("id");
164                $(this).next().slideToggle("fast", function () {
165                    if ($(this).is(":visible")) {
166                        var navTop = current_nav.offset().top;
167                        $("html, body").animate({ scrollTop: navTop - getScrollOffset() }, 200);
168                    }
169                });
170
171                $(this).parent().find(".designbox").each(function () {
172                    if ($(this).attr("id") != current_accoordionid) {
173                        $(this).slideUp("fast");
174                    }
175                });
176
177                return false;
178            });
179
180            $(".es_accordion").each(function () {
181                var show_accordion = 0;
182                var es_accordion = this;
183                var es_tabs_click = "";
184                var accordion_tabindex = 0;
185                $(this).find(".designbox").each(function () {
186                    $(this).hide();
187
188                    var temp_content = $.trim($(this).text());
189                    temp_content = temp_content.replace(/(\r\n\t|\n|\r\t)/gm,"");
190                    
191                    if (temp_content == "" && $(this).find("iframe").length == 0 && $(this).find("img").length == 0 ) {
192                        $(es_accordion).find(".nav-item").eq(accordion_tabindex).hide();
193                    } else
194                    {
195                        var first_div = $(this).find("div").first();
196                        var accordion_title = $(es_accordion).find(".nav-item").eq(accordion_tabindex).text();
197
198                        $(this).before("<a class='nav-link'>" + accordion_title + '</a>');
199                        show_accordion = 1;
200                    }
201                    accordion_tabindex = accordion_tabindex + 1;
202                });
203
204                if (show_accordion == 1) {
205                    $(es_accordion).show();
206                }
207
208            });
209
210        }
211    /*accordion end*/
212
213    /*tabs start*/
214        if ( $(".es_tabs").length ) {
215
216            $("body").on("click", ".es_tabs .nav-link", function () {
217                var current_nav = $(this).parent().parent().parent();
218                $(current_nav).find(".designbox").hide();
219                $(current_nav).find(".nav-link").removeClass("active");
220                $(this).addClass("active");
221                $(current_nav).find(".designbox").eq($(this).parent().index()).show();
222                return false;
223            });
224
225            $(".es_tabs").each(function () {
226                 
227                var show_tab = 0;
228                var es_tabs = this;
229                var es_tabs_click  = "";
230                var es_tabs_height = $(this).attr("data-height");
231
232                $(this).find(".designbox").each(function () {
233                    if (es_tabs_height != "")
234                    {
235                        $(this).css("height", es_tabs_height + 'px');
236                        $(this).css("overflow-y", 'auto');
237                    }
238                    var tabindex = $(this).index() - 1;
239                  
240                    var temp_content = $.trim($(this).text());
241                    temp_content = temp_content.replace(/(\r\n\t|\n|\r\t)/gm,"");
242                    
243                    if (temp_content == "" && $(this).find("iframe").length == 0 && $(this).find("img").length == 0 ) {
244                        $(es_tabs).find(".nav-item").eq(tabindex).hide();
245                    }
246                    else {
247                        show_tab = 1;
248                        $(es_tabs).find(".nav-item").eq(tabindex).show();
249                        if (es_tabs_click == "") {
250                            $(es_tabs).find(".nav-item").eq(tabindex).find(".nav-link").trigger("click");
251                            es_tabs_click = "1";
252                        }
253                    }
254
255                });
256
257                if (show_tab == 1) {
258                    $(es_tabs).show();
259                }
260            });
261        }
262    /*tabs end*/
263
264    /*smooth scrolling seamless loop start*/
265        setupSmoothScrollingLoop();
266    /*smooth scrolling seamless loop end*/
267
268    /*popup start*/
269        if ( $(".es_popup").length ) {
270            
271            // Open popup on button click
272            $("body").on("click", ".popup-trigger", function () {
273                var popupId = $(this).attr("data-popup");
274                var popup = $("#" + popupId);
275                
276                // Show overlay if enabled
277                if (popup.attr("data-overlay") == "yes") {
278                    if (!$(".popup-overlay").length) {
279                        $("body").append("<div class='popup-overlay'></div>");
280                    }
281                    $(".popup-overlay").fadeIn(300);
282                }
283                
284                // Show popup with animation
285                popup.removeClass("hide").addClass("show");
286                
287                return false;
288            });
289            
290            // Close popup on close button click
291            $("body").on("click", ".popup-close", function () {
292                var popup = $(this).closest(".es_popup");
293                closePopup(popup);
294                return false;
295            });
296            
297            // Close popup on overlay click if enabled
298            $("body").on("click", ".popup-overlay", function () {
299                var visiblePopup = $(".es_popup.show");
300                if (visiblePopup.length && visiblePopup.attr("data-close-overlay") == "yes") {
301                    closePopup(visiblePopup);
302                }
303            });
304            
305            // Close popup function
306            function closePopup(popup) {
307                popup.removeClass("show").addClass("hide");
308                $(".popup-overlay").fadeOut(300, function() {
309                    $(this).remove();
310                });
311            }
312            
313            // Close on ESC key
314            $(document).on("keyup", function(e) {
315                if (e.key === "Escape" || e.keyCode === 27) {
316                    var visiblePopup = $(".es_popup.show");
317                    if (visiblePopup.length) {
318                        closePopup(visiblePopup);
319                    }
320                }
321            });
322        }
323    /*popup end*/
324}
325
326
327
328
329
330/*functions start*/
331
332/*log start*/
333
334function dblog(objid, logtype, logdata) {
335    const body =
336      "objid="   + encodeURIComponent(objid)   +
337      "&logtype="+ encodeURIComponent(logtype) +
338      "&logdata="+ encodeURIComponent(logdata);
339  
340    /* ---- try Beacon first ---- */
341    let ok = false;
342    if (navigator.sendBeacon) {
343      const blob = new Blob([body], {
344        type: "application/x-www-form-urlencoded"
345      });
346      ok = navigator.sendBeacon("/siteservices.asp?service=log", blob);
347    }
348  
349    /* ---- fallback to fetch if Beacon failed / unsupported ---- */
350    if (!ok) {
351      fetch("/siteservices.asp?service=log", {
352        method:  "POST",
353        headers: { "Content-Type": "application/x-www-form-urlencoded" },
354        body:    body,
355        keepalive: true
356      });
357    }
358  
359    /* optional debug GET */
360    // $.get("/siteservices.asp?service=log&" + body);
361    //$.get("/siteservices.asp?service=log&objid=" + objid + "&logtype=" + logtype + "&logdata=" + logdata), function (data) { }
362  }
363
364          
365
366          
367
368
369     
370/*log end*/
371
372/*lightpopup start*/
373    function lightpopup(data, classname) {
374        if ( data == "close" )
375        {
376           $("#lightpopup").hide();
377        }
378        else
379        {
380
381            if ($("#lightpopup").length == 0) {
382                $("body").append("<div id='lightpopup' class=" + classname + " style='display:none'><div class='overlay'></div><div class='close'>X</div><div class='content'></div></div>");
383            }
384            
385            $("#lightpopup").attr("class", classname);
386            $("#lightpopup .content").html(data + " ");
387
388            $("#lightpopup").show();
389            $("#lightpopup .overlay").on("click", function () { $(this).parent().hide(); return false });
390            dynamicform();
391        }
392    }
393
394  
395/*lightpopup end*/
396
397/*wishlist start*/
398    function renderwishlist() {
399        $.get("/siteservices.asp?service=getwishlist", function (data) {
400            if (data != "") {
401                $(".wishlistdiv").each(function () {
402                    $(this).html(data);
403                    $(".wishlistQuantity").html($(this).find(".wishlistcounter").html());
404                    var wishlistitemidents = $(this).find(".wishlistitemidents").html();
405                    var str = ', ' + wishlistitemidents + ', ';
406                    $(".wishlist-product-add").each(function () {
407                        $(this).removeClass("active");
408                        var itemident = $(this).attr("itemid");
409
410                        if (str.indexOf(', ' + itemident + ', ') > -1) {
411                            $(this).addClass("active");
412                        }
413                    });
414                });
415
416                if ($(".user_page.wishlist").length) {
417                    $.get("/siteservices.asp?service=getwishlist&params=1", function (data) {
418                        if (data != "") {
419                            $(".user_page.wishlist .wishlistdiv").html(data);
420                        }
421                    });
422                }
423            }
424        })
425    }
426/*wishlist end*/
427
428
429    function minimize_on_resolution() {
430
431        $(".hideonresolution").each(function () {
432            var resolution = $(this).attr("data");
433            var textToHide = $(this).find(".icon_wrap :nth-child(2)");
434            
435            if ($(window).width() < resolution) {
436                
437                $(this).addClass("minimize_icon");
438                textToHide.css('display', 'none');
439
440                if ($(this).find(".icon_wrap i").length)
441                {
442                    var iconwrapobj      = $(this).find(".icon_wrap i");
443                    var tooltip_position = $(this).find(".icon_wrap i").position();
444                }
445                else
446                {
447                    var iconwrapobj      = $(this).find(".icon_wrap img");
448                    var tooltip_position = $(this).find(".icon_wrap img").position();
449                }
450                
451                var icon_top    = tooltip_position.top;
452                var icon_left   = tooltip_position.left;
453                var icon_width  = $(iconwrapobj).width();
454                var icon_height = $(iconwrapobj).height();
455                 
456                //(icon_position.left * 1) + (icon_width) - (icon_width / 2) - 28 + "px"
457
458                $(this).find(".icon_wrap").mouseover(function ()
459                {
460                    textToHide.addClass("tooltip_text");
461                    var textToHide_width = textToHide.width();
462                    
463                    var caluclate_top = ((icon_top + 5) * 1) + (icon_height * 1) * 1;
464                    var caluclate_left_icon = (((icon_width) / 2) * 1);
465                    
466                    var caluclate_left_tooltip = ((((textToHide_width) / 2) * 1) + 10);
467                    var caluclate_left = (caluclate_left_tooltip - icon_width);
468                    
469                    $(this).find(".tooltip_text").css({
470                            "top": caluclate_top + "px",
471                            "left": "-" + caluclate_left + "px"
472                    });
473 
474                })
475
476                    $(this).mouseout(function () {
477                        textToHide.removeClass("tooltip_text");
478                    });
479
480            }
481            else {
482
483                $(this).removeClass("minimize_icon");
484                textToHide.css('display', 'inline-block');
485            }
486        });
487    }
488
489
490/*smooth scrolling seamless loop start*/
491var smoothScrollingLoopRetries = {};
492var smoothScrollingLoopSetupBound = false;
493
494function getSmoothScrollingLoopGroups($scope) {
495    var $scope = $scope ? $($scope) : $(document);
496    if ($scope.is(".es_smooth_scrolling.es_smooth_scrolling_loop")) {
497        return $scope;
498    }
499    return $scope.find(".es_smooth_scrolling.es_smooth_scrolling_loop");
500}
501
502function getSmoothScrollingContainerWidth($container, $group) {
503    var width = $container.innerWidth();
504    if (width < 1) {
505        width = $group.innerWidth();
506    }
507    if (width < 1) {
508        width = $group.closest(".designbox, .container, .container-fluid, #header, body").innerWidth() || 0;
509    }
510    if (width < 1) {
511        width = $(window).width() || 0;
512    }
513    return width;
514}
515
516function getSmoothScrollingDuration($group, $content) {
517    var duration = parseFloat($group.attr("data-duration"), 10);
518    if (isNaN(duration) || duration <= 0) {
519        duration = parseFloat($content.css("animation-duration"), 10);
520    }
521    if (isNaN(duration) || duration <= 0) {
522        duration = 20;
523    }
524    return duration;
525}
526
527function stopSmoothScrollingRaf($content) {
528    var rafId = $content.data("raf-id");
529    if (rafId) {
530        cancelAnimationFrame(rafId);
531    }
532    $content.removeData("raf-id").off(".smoothScroll");
533}
534
535function stopSmoothScrollingAnimation($content) {
536    stopSmoothScrollingRaf($content);
537    $content.removeData("loop-width scroll-offset");
538}
539
540function restoreSmoothScrollingOriginals($content) {
541    var $originals = $();
542    var $firstSet = $content.children(".smoothScrolling-set").first();
543    if ($firstSet.length) {
544        $firstSet.children(".designbox").not(".smoothScrolling-clone").each(function () {
545            $originals = $originals.add(this);
546        });
547    } else {
548        $content.children(".designbox").not(".smoothScrolling-clone").each(function () {
549            $originals = $originals.add(this);
550        });
551    }
552    // detach first: empty() would strip the events and data bound to the
553    // original items, so anything inside the bar would stop working on resize
554    $originals.detach();
555    $content.empty();
556    $originals.appendTo($content);
557    return $originals;
558}
559
560function cloneSmoothScrollingItem($el) {
561    var $clone = $el.clone(false);
562    $clone.addClass("smoothScrolling-clone");
563    $clone.attr("aria-hidden", "true");
564    $clone.removeAttr("id");
565    $clone.find("[id]").removeAttr("id");
566    return $clone;
567}
568
569function measureSmoothScrollingSetWidth($set) {
570    if (!$set || !$set.length) {
571        return 0;
572    }
573    return $set[0].getBoundingClientRect().width;
574}
575
576function cloneSmoothScrollingSet($set) {
577    var $clone = $set.clone(false);
578    $clone.addClass("smoothScrolling-set-clone");
579    $clone.attr("aria-hidden", "true");
580    $clone.find(".designbox").each(function () {
581        var $item = $(this);
582        $item.addClass("smoothScrolling-clone");
583        $item.removeAttr("id");
584        $item.find("[id]").removeAttr("id");
585    });
586    return $clone;
587}
588
589function startSmoothScrollingAnimation($content, $group) {
590    var loopWidth = parseFloat($content.data("loop-width"), 10);
591    stopSmoothScrollingRaf($content);
592
593    if (!loopWidth || loopWidth < 1) {
594        return;
595    }
596
597    if (window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
598        $content.css("transform", "translate3d(0,0,0)");
599        return;
600    }
601
602    var duration = getSmoothScrollingDuration($group, $content);
603    var speed = loopWidth / duration;
604    var offset = parseFloat($content.data("scroll-offset"), 10) || 0;
605    var paused = false;
606    var lastTime = null;
607
608    $content.on("mouseenter.smoothScroll", function () {
609        paused = true;
610    });
611    $content.on("mouseleave.smoothScroll", function () {
612        paused = false;
613        lastTime = null;
614    });
615
616    function tick(timestamp) {
617        if (!$content[0] || !$.contains(document.documentElement, $content[0])) {
618            stopSmoothScrollingRaf($content);
619            return;
620        }
621
622        if (lastTime === null) {
623            lastTime = timestamp;
624        }
625
626        if (!paused) {
627            var delta = (timestamp - lastTime) / 1000;
628            if (delta > 0) {
629                offset += speed * delta;
630                while (offset >= loopWidth) {
631                    offset -= loopWidth;
632                }
633                $content.css("transform", "translate3d(" + (-offset) + "px,0,0)");
634                $content.data("scroll-offset", offset);
635            }
636        }
637
638        lastTime = timestamp;
639        $content.data("raf-id", requestAnimationFrame(tick));
640    }
641
642    $content.data("raf-id", requestAnimationFrame(tick));
643}
644
645function scheduleSmoothScrollingLoopRetry($scope, retryKey) {
646    var key = retryKey || "global";
647    smoothScrollingLoopRetries[key] = (smoothScrollingLoopRetries[key] || 0) + 1;
648    if (smoothScrollingLoopRetries[key] > 20) {
649        return;
650    }
651    setTimeout(function () {
652        initSmoothScrollingLoop($scope, key);
653    }, 50 * smoothScrollingLoopRetries[key]);
654}
655
656function buildSmoothScrollingTrack($content, $container, $group, groupKey) {
657    stopSmoothScrollingAnimation($content);
658    $content.css({ transform: "translate3d(0,0,0)", "--scroll-distance": "" });
659
660    var $originals = restoreSmoothScrollingOriginals($content);
661    if ($originals.length < 1) {
662        return false;
663    }
664
665    var containerWidth = getSmoothScrollingContainerWidth($container, $group);
666    if (containerWidth < 1) {
667        scheduleSmoothScrollingLoopRetry($group, groupKey);
668        return false;
669    }
670
671    var originals = $originals.toArray();
672    var $set1 = $('<div class="smoothScrolling-set"></div>');
673
674    // the set has to sit in the document before it is measured - a detached
675    // node always reports a width of 0, which never reaches containerWidth
676    $content.append($set1);
677    $originals.appendTo($set1);
678
679    var setWidth = measureSmoothScrollingSetWidth($set1);
680    if (setWidth < 1) {
681        // items have no width yet (fonts/images still loading) - try again later
682        scheduleSmoothScrollingLoopRetry($group, groupKey);
683        return false;
684    }
685
686    var fillPasses = Math.ceil(containerWidth / setWidth);
687    if (!isFinite(fillPasses) || fillPasses > 50) {
688        fillPasses = 50;
689    }
690    for (var pass = 1; pass < fillPasses; pass++) {
691        originals.forEach(function (el) {
692            $set1.append(cloneSmoothScrollingItem($(el)));
693        });
694    }
695
696    var $set2 = cloneSmoothScrollingSet($set1);
697
698    $content.append($set2);
699
700    if ($content[0]) {
701        $content[0].offsetHeight;
702    }
703
704    var loopWidth = $set2[0] ? ($set2[0].offsetLeft - $set1[0].offsetLeft) : 0;
705    if (loopWidth < 1) {
706        loopWidth = measureSmoothScrollingSetWidth($set1);
707    }
708    if (loopWidth < 1) {
709        scheduleSmoothScrollingLoopRetry($group, groupKey);
710        return false;
711    }
712
713    loopWidth = Math.round(loopWidth * 100) / 100;
714
715    $content.data({ "loop-width": loopWidth, "loop-init": true, "scroll-offset": 0 });
716    startSmoothScrollingAnimation($content, $group);
717    return true;
718}
719
720function initSmoothScrollingLoop(root, retryKey) {
721    getSmoothScrollingLoopGroups(root).each(function () {
722        var $group = $(this);
723        var groupKey = retryKey || $group.attr("id") || ("ss-" + $group.index());
724        var $container = $group.find("> .smoothScrolling-container").first();
725        var $content = $container.find("> .smoothScrolling-content").first();
726        if (!$content.length) {
727            return;
728        }
729        buildSmoothScrollingTrack($content, $container, $group, groupKey);
730    });
731}
732
733function resetSmoothScrollingLoop() {
734    smoothScrollingLoopRetries = {};
735    $(".es_smooth_scrolling.es_smooth_scrolling_loop .smoothScrolling-content").each(function () {
736        stopSmoothScrollingAnimation($(this));
737    });
738    initSmoothScrollingLoop();
739}
740
741function setupSmoothScrollingLoop() {
742    initSmoothScrollingLoop();
743    if (!smoothScrollingLoopSetupBound) {
744        smoothScrollingLoopSetupBound = true;
745        $(window).on("resize.smoothScrollingLoop", resetSmoothScrollingLoop);
746        $(window).on("load.smoothScrollingLoop", resetSmoothScrollingLoop);
747    }
748}
749
750window.resetSmoothScrollingLoop = resetSmoothScrollingLoop;
751window.initSmoothScrollingLoop = initSmoothScrollingLoop;
752/*smooth scrolling seamless loop end*/
753
754function loadLazyDesignboxes(root) {
755    var $scope = root ? $(root) : $(document);
756    $scope.find(".designbox.lazyload").each(function () {
757        var $box = $(this);
758        if ($box.data("loaded")) return;
759        var id = $box.attr("id");
760        if (!id) return;
761        // Breadcrumb is loaded by head_js.asp get_factory_url() with full page context (cat, item, etc.)
762        if ($box.attr("class") && $box.attr("class").indexOf("_breadcrumb") > -1) return;
763
764        var pageid = $box.data("factory-pageid") || window.esFactoryPageId || "";
765        var url = "/factory.asp?id=" + encodeURIComponent(id);
766        if (pageid) url += "&pageid=" + encodeURIComponent(pageid);
767        var scriptName = window.esSVScriptName || window.location.pathname;
768        url += "&SV_SCRIPT_NAME=" + encodeURIComponent(scriptName);
769
770        $box.data("loaded", 1);
771        $.get(url, function (html) {
772            $box.html(html);
773            if (typeof dynamicform === "function") dynamicform();
774            if (typeof minimize_on_resolution === "function") minimize_on_resolution();
775            if (typeof mini_userbar_element === "function") mini_userbar_element
775();
776            loadLazyDesignboxes($box);
777            if ($box.find(".es_smooth_scrolling.es_smooth_scrolling_loop").length) {
778                initSmoothScrollingLoop($box);
779            }
780        });
781    });
782}
783
784/*functions end*/
785
786
787
788
789/*document read start*/
790$(document).ready(function () {
791    init();
792    minimize_on_resolution();
793    loadLazyDesignboxes();
794
795    var distance = $(".menus ul.menu.menu-horizontal > li.parent:last-child");
796    if ((distance).length > 0) {
797         distance = $(".menus ul.menu.menu-horizontal > li.parent:last-child").offset().left;
798        if ( distance < '420' ){
799            $('.menus ul.menu.menu-horizontal > li.parent:last-child ul.thin > li.parent > ul').css({
800                "right":"auto", 
801                "left": "100%",
802                "top": "-1px"
803            });
804        }
805    
806        $(window).resize(function() {
807            var distance = $(".menus ul.menu.menu-horizontal > li.parent:last-child").offset().left;
808            if ( distance < '420' ){
809                $('.menus ul.menu.menu-horizontal > li.parent:last-child ul.thin > li.parent > ul').css({
810                    "right":"auto", 
811                    "left": "100%",
812                    "top": "-1px"
813                });
814            }
815        });
816    }
817     
818    
819
820});
821/*document read end*/
822
823/*document resize start*/
824$(window).resize(function () {
825    minimize_on_resolution();
826});
827/*document resize end*/
828
829$(window).on("scroll", function () {
830    loadLazyDesignboxes();
831});

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.