PageSourceSearch

https://icl-services.com/local/templates/icl26/js/scripts.js

js icl-services.com collected 2026-10-03 22:12:05 UTC 64,660 bytes, 1,752 lines download raw bytes

1if ([].indexOf) {
2    var findStr = function (array, value) {
3        return array.indexOf(value);
4    };
5} else {
6    var findStr = function (array, value) {
7        for (var i = 0; i < array.length; i++) {
8            if (array[i] === value) return i;
9        }
10
11        return -1;
12    };
13}
14
15function setEqualHeight(columns) {
16    var tallestcolumn = 0;
17    columns.each(function () {
18        $(this).css("height", "auto");
19        currentHeight = $(this).height();
20        if (currentHeight > tallestcolumn) {
21            tallestcolumn = currentHeight;
22        }
23    });
24    columns.height(tallestcolumn);
25}
26
27$.fn.setEqualHeightNew = function () {
28    var currentCols = $(this);
29
30    if ($(currentCols).length > 0) {
31        function countH(currentCols) {
32            var tallestcolumn = 0;
33            currentCols.each(function () {
34                $(this).css("height", "auto");
35                currentHeight = $(this).height();
36                if (currentHeight > tallestcolumn) {
37                    tallestcolumn = currentHeight;
38                }
39            });
40            currentCols.height(tallestcolumn);
41        }
42
43        countH(currentCols);
44
45        $(window).on("resize orientationchange", function () {
46            setTimeout(function () {
47                countH(currentCols);
48            }, 100);
49        });
50
51        $(window).load(function () {
52            setTimeout(function () {
53                countH(currentCols);
54            }, 100);
55        });
56    }
57};
58
59function count(options) {
60    var $this = $(this);
61    options = $.extend({}, options || {}, $this.data("countToOptions") || {});
62    $this.countTo(options);
63}
64
65function podmenumaxheight() {
66    var headerheight = $("header").height();
67    var winowdheight = $(window).height();
68    $(".hiddenMenu").css({ "max-height": winowdheight - headerheight });
69}
70
71/* Scroll */
72var fl5 = 0;
73$(window).scroll(function () {
74    var wScrollTop = $(window).scrollTop();
75    var winowdWith = $(window).width();
76    var winowdheight = $(window).height();
77
78    if ($(".projectCenter").length > 0) {
79        projectCenter = $(".projectCenter").offset().top;
80        if (wScrollTop + winowdheight - 100 > projectCenter && !fl5) {
81            $(".projectCenter").addClass("animate");
82            fl5 = 1;
83        }
84    }
85
86    if (wScrollTop > 200 && winowdWith > 633) {
87        $("header").addClass("fixed");
88        $(".anchorNav nav").addClass("fixed");
89    } else {
90        $(".anchorNav nav").removeClass("fixed");
91        $("header").removeClass("fixed");
92    }
93
94    podmenumaxheight();
95});
96
97/* Scroll end*/
98
99$.fn.setEqualHeightTwo = function () {
100    var currentCols = $(this);
101
102    if ($(currentCols).length > 0) {
103        function countH(currentCols) {
104            var tallestcolumn = 0;
105            var key = 0;
106            currentCols.each(function () {
107                key++;
108                $(currentCols[key - 1]).css("height", "auto");
109                currentHeight = $(this).height();
110                if (currentHeight > tallestcolumn) {
111                    tallestcolumn = currentHeight;
112                }
113                if (key % 2 == 0 && key != 0) {
114                    $(currentCols[key - 1]).height(tallestcolumn);
115                    $(currentCols[key - 2]).height(tallestcolumn);
116                    if (
117                        $(currentCols[key - 1])
118                            .parent()
119                            .hasClass("no-pic")
120                    ) {
121                        $(currentCols[key - 1])
122                            .closest("li")
123                            .css("padding-bottom", $(currentCols[key - 1]).outerHeight());
124                    }
125                    if (
126                        $(currentCols[key - 2])
127                            .parent()
128                            .hasClass("no-pic")
129                    ) {
130                        $(currentCols[key - 2])
131                            .closest("li")
132                            .css("padding-bottom", $(currentCols[key - 2]).outerHeight());
133                    }
134
135                    tallestcolumn = 0;
136                }
137            });
138            //currentCols.height(tallestcolumn);
139        }
140
141        countH(currentCols);
142
143        $(window).on("load resize orientationchange", function () {
144            setTimeout(function () {
145                countH(currentCols);
146            }, 100);
147        });
148    }
149};
150
151/* Resize*/
152
153$(window).resize(function () {
154    var wScrollTop = $(window).scrollTop();
155    var winowdWith = $(window).width();
156    var winowdheight = $(window).height();
157
158    podmenumaxheight();
159
160    if (wScrollTop > 200 && winowdWith > 633) {
161        $("header").addClass("fixed");
162        $(".anchorNav nav").addClass("fixed");
163    } else {
164        $(".anchorNav nav").removeClass("fixed");
165        $("header").removeClass("fixed");
166    }
167
168    var maxContHeight = 0;
169    $(".eventConts  > li").each(function (index, element) {
170        if ($(this).outerHeight() > maxContHeight) {
171            maxContHeight = $(this).outerHeight();
172        }
173    });
174    $(".eventConts").height(maxContHeight);
175
176    if ($(".leadershipDetail").length > 0) {
177        var siteWidth = $(".siteWidth").width();
178        var windHeight = $(window).height() - 200;
179
180        if ($(window).height() < 950) {
181            windHeight += 200;
182        }
183        if ($(window).width() < 582) {
184            windHeight = "auto";
185        }
186        if ($(window).width() < 1500) {
187            if ($(window).width() < 1300) {
188                siteWidth = $(window).width();
189            }
190            $(".leadershipDetail").width(siteWidth).height(windHeight);
191        } else {
192            $(".leadershipDetail")
193                .width(siteWidth + 360)
194                .height(windHeight);
195        }
196    }
197});
198
199/* Resize end*/
200
201function redbtnhover() {
202    $(".redBtn").hover(
203        function () {
204            $(this).children(".helper").css("height", $(this).outerWidth());
205        },
206        function () {
207            $(this).children(".helper").css("height", 0);
208        },
209    );
210}
211
212function filehover() {
213    $(".jq-file").hover(
214        function () {
215            $(this)
216                .addClass("hover")
217                .children(".redBtn")
218                .children(".helper")
219                .css("height", $(this).outerWidth());
220        },
221        function () {
222            $(this).removeClass("hover").children(".redBtn").children(".helper").css("height", 0);
223        },
224    );
225}
226
227function isIe8() {
228    // HOT FIX
229    return false;
230
231    if ($.browser.msie && parseInt($.browser.version, 10) === 8) {
232        return true;
233    } else {
234        return false;
235    }
236}
237
238function setCookieCZ(name, value, expires, path, domain, secure) {
239    document.cookie =
240        name +
241        "=" +
242        escape(value) +
243        (expires ? "; expires=" + expires : "") +
244        (path ? "; path=" + path : "") +
245        (domain ? "; domain=" + domain : "") +
246        (secure ? "; secure" : "");
247}
248
249function getCookieCZ(name) {
250    var cookie = " " + document.cookie;
251    var search = " " + name + "=";
252    var setStr = null;
253    var offset = 0;
254    var end = 0;
255    if (cookie.length > 0) {
256        offset = cookie.indexOf(search);
257        if (offset != -1) {
258            offset += search.length;
259            end = cookie.indexOf(";", offset);
260            if (end == -1) {
261                end = cookie.length;
262            }
263            setStr = unescape(cookie.substring(offset, end));
264        }
265    }
266    return setStr;
267}
268
269/* Doc ready*/
270var globalGoal = "";
271$(document).ready(function () {
272    let setCookieLangManualChange = function () {
273        let lang = $(this).attr("data-lang");
274        if (lang) {
275            let expDate = new Date();
276            expDate.setTime(expDate.getTime() + 12 * 30 * 24 * 3600 * 1000); // year
277            setCookieCZ("langManualChange", lang, expDate, "/");
278        }
279    };
280
281    $(".js-languages a").on("click", setCookieLangManualChange);
282
283    $("#footerLanguage li a").on("click", setCookieLangManualChange);
284
285    var windowHeight = $(window).height();
286
287    $(".modalLink.getPresentation-link--pres").click(function () {
288        globalGoal = "formforpresentation";
289    });
290    $(".modalLink.getPresentation-link--callrequest").click(function () {
291        globalGoal = "callback";
292    });
293    $(".modalLink.btn--askaquestion").click(function () {
294        globalGoal = "callbackheader";
295    });
296
297    /*
298     http://icl-services.com/contacts/
299     table filter
300     */
301    if ($(".contacts-table-wrapper table").length) {
302        jQuery.expr[":"].ContainsCUN = function (obj, index, meta) {
303            return jQuery(obj).text().toUpperCase().indexOf(meta[3].toUpperCase()) >= 0;
304        };
305
306        $(".contacts-search-field").keyup(function () {
307            var rows = $(".contacts-table-wrapper table tbody").find("tr").hide();
308            if (this.value.length) {
309                var data = this.value.split(" ");
310                $.each(data, function (i, v) {
311                    rows.filter(":ContainsCUN('" + v + "')").show();
312                });
313            } else rows.show();
314        });
315    }
316
317    /*if ($('.newsScroller').length > 0) {
318
319        var newsSlider = $('.newsScroller');
320
321        var newsWidth = $(newsSlider).width();
322
323        $('.newsScroller>ul>li').width(newsWidth / 3);
324
325        if ($(window).width() < 900) {
326            $('.newsScroller>ul>li').width(newsWidth / 2);
327        }
328        if ($(window).width() < 450) {
329            $('.newsScroller>ul>li').width(newsWidth);
330        }
331
332
333        var sly = $(newsSlider).sly({
334            horizontal: 1,
335            itemNav: 'basic',
336            smart: 1,
337            mouseDragging: 1,
338            touchDragging: 1,
339            speed: 800,
340            elasticBounds: 1,
341            dragHandle: 1,
342            scrollBy: 0,
343            dynamicHandle: 1,
344            activatePageOn: 'click',
345            pagesBar: $('.newsScroller').next('.next').next('.pagesBar'),
346            prevPage: $('.newsScroller').prev('.prev'),
347            nextPage: $('.newsScroller').next('.next'),
348        });
349
350
351        $(window).resize(function (e) {
352
353            var newsWidth = $(newsSlider).width();
354
355            $('.newsScroller>ul>li').width(newsWidth / 3);
356
357            if ($(window).width() < 900) {
358                $('.newsScroller>ul>li').width(newsWidth / 2);
359            }
360            if ($(window).width() < 450) {
361                $('.newsScroller>ul>li').width(newsWidth);
362            }
363
364            $('.newsScroller').sly('reload');
365        });
366    }*/
367
368    let isSlickInitialized = false;
369
370    if ($(".newsScroller").length > 0 && !isSlickInitialized) {
371        $(".newsScroller ul.newsList").slick({
372            infinite: true,
373            dots: false,
374            arrows: false,
375            slidesToShow: 3,
376            slidesToScroll: 1,
377            responsive: [
378                {
379                    breakpoint: 1000,
380                    settings: {
381                        slidesToShow: 2,
382                    },
383                },
384                {
385                    breakpoint: 600,
386                    settings: {
387                        slidesToShow: 1,
388                    },
389                },
390            ],
391        });
392        isSlickInitialized = true; // Устанавливаем флаг, чтобы избежать повторной инициализации
393    }
394
395    $(".newsScrollerWrap span.prev").on("click", function () {
396        $(".newsScroller ul.newsList").slick("slickPrev");
397    });
398
399    $(".newsScrollerWrap span.next").on("click", function () {
400        $(".newsScroller ul.newsList").slick("slickNext");
401    });
402
403    var wScrollTop = $(window).scrollTop();
404    var winowdWith = $(window).width();
405    var winowdheight = $(window).height();
406
407    if ($(".projectCenter").length > 0) {
408        projectCenter = $(".projectCenter").offset().top;
409        if (wScrollTop + winowdheight - 100 > projectCenter && !fl5) {
410            setTimeout(function () {
411                $(".projectCenter").addClass("animate");
412            }, 1000);
413            fl5 = 1;
414        }
415    }
416
417    setTimeout(function () {
418        $("body").addClass("docreadyAnim");
419    }, 500);
420    setTimeout("podmenumaxheight()", 1000);
421
422    $(".goUpBtn").click(function () {
423        jQuery("html,body").animate({ scrollTop: 0 }, 1000);
424        return false;
425    });
426
427    $(window).scroll(function () {
428        if (window.pageYOffset > windowHeight / 2) {
429            $(".goUpBtn").addClass("active");
430        } else {
431            $(".goUpBtn").removeClass("active");
432        }
433    });
434
435    if ($.fn.placeholder) {
436        $("input, textarea").placeholder();
437    }
438
439    if ($.fn.cancelZoom) {
440        $('input[type="text"],input[type="email"],select,textarea').cancelZoom();
441    }
442    $('div:not(.kg-modal) input[type="radio"], input[type="checkbox"]:not(#cat_technical):not(#cat_analytics):not(#cat_ads):not(#cat_personalization), select').styler({
443         selectSearch: false,
444     });
445
446    $('[name="PROP_MY_PERSONAL_DATA"]').prop('checked', true);
447
448    var is_touch_device = "ontouchstart" in document.documentElement;
449
450    if (!is_touch_device) {
451        $(".workPlaceBenefits").addClass("notouchdev");
452
453        var s = skrollr.init({
454            forceHeight: false,
455        });
456    }
457
458    if ($("html").attr("lang") != "sr") {
459        $("input.phone").mask("+9 (999) 999-99-99", {
460            placeholder: " ",
461        });
462    }
463
464    var maxContHeight = 0;
465    $(".eventConts  > li").each(function (index, element) {
466        if ($(this).outerHeight() > maxContHeight) {
467            maxContHeight = $(this).outerHeight();
468        }
469    });
470    $(".eventConts").height(maxContHeight);
471
472    $(".eventTabs a").click(function () {
473        var clickedIndex = $(this).parent().index();
474        $(".eventTabs>li").removeClass("current");
475        $(this).parent().addClass("current");
476        $(".eventConts>li").removeClass("current");
477        $(".eventConts>li:eq(" + clickedIndex + ")").addClass("current");
478        var changeText = $(this).text();
479        var newLink = $(this).attr("data-link");
480        $(".eventsBlock .redBtn .text>span").text(changeText);
481        $(".eventsBlock .redBtn").attr("href", newLink);
482        return false;
483    });
484
485    $("#search .showhiddenbtn").click(function () {
486        $("#search .searchfield").animate({ width: "toggle" }, 400);
487    });
488
489    redbtnhover();
490
491    $(".whieBtn").hover(
492        function () {
493            $(this).children(".helper").css("height", $(this).outerWidth());
494        },
495        function () {
496            $(this).children(".helper").css("height", 0);
497        },
498    );
499
500    // проверяем, ставить ли меню в 2 колонки
501    menus = $(".hiddenMenu");
502    for (i = 1; i <= $(menus).length; i++) {
503        menun = $("#podMenu" + i + ">li");
504        for (j = 0; j < $(menun).length; j++) {
505            menua = $(menun[j]).find("a").length;
506            if (menua > 15) {
507                podmenucol = $(menun[j]).children("div").children(".podmenucol");
508                $(menun[j]).addClass("menucol2");
509                /*				podmenucolli = $(podmenucol).children("li");
510                 ipodmenucol = Math.floor($(podmenucolli).length/2+0.5);
511                 console.log($(podmenucolli[ipodmenucol]).html());
512                 $(podmenucolli[ipodmenucol]).before("<div class='podmenucolfix'></div>");
513                 $(podmenucolli[ipodmenucol]).before("<ul class='podmenucol'>");*/
514            }
515        }
516    }
517    $("#topnav>ul>li>a").click(function () {
518        var clickedLink = $(this);
519
520        if ($(this).parent("li").hasClass("openedMenu")) {
521            $(this).next(".closeCross").next(".hiddenMenu").slideUp(500);
522            $(this).parent("li").removeClass("openedMenu");
523            $("#menuMask").removeClass("show");
524            return false;
525        } else {
526            if ($(this).next(".closeCross").next(".hiddenMenu").length > 0) {
527                $("#menuMask").addClass("show");
528                if ($("#topnav > ul > li").hasClass("openedMenu")) {
529                    var needtoClose = $("#topnav > ul > li.openedMenu .hiddenMenu");
530                    $("#topnav > ul > li").removeClass("openedMenu");
531                    $(clickedLink).parent("li").addClass("openedMenu");
532                    $(needtoClose).slideUp(500, function () {
533                        $(clickedLink).next(".closeCross").next(".hiddenMenu").slideDown(500);
534                    });
535                } else {
536                    $("#topnav > ul > li").removeClass("openedMenu");
537                    $(this).parent("li").addClass("openedMenu");
538                    $(this).next(".closeCross").next(".hiddenMenu").slideDown(500);
539                }
540
541                return false;
542            }
543        }
544    });
545
546    $(document).on("click touchstart", function (event) {
547        if (
548            $(event.target).closest("#topnav>ul>li, #search .searchfield, #search .showhiddenbtn")
549                .length
550        )
551            return;
552        if ($("#search .showhiddenbtn").is(":visible")) {
553            $("#search .searchfield").fadeOut();
554        }
555        $("#menuMask").removeClass("show");
556        $("#topnav > ul > li.openedMenu").children(".hiddenMenu").slideUp();
557        $("#topnav > ul > li").removeClass("openedMenu");
558
559        event.stopPropagation();
560    });
561
562    $("#topnav .closeCross").click(function () {
563        $("#menuMask").removeClass("show");
564        $("#topnav > ul > li.openedMenu .hiddenMenu").slideUp();
565        $("#topnav > ul > li.openedMenu").removeClass("openedMenu");
566        return false;
567    });
568
569    var fancymargin = [20, 20, 20, 20];
570    if ($(window).width() < 650) {
571        fancymargin = [0, 10, 0, 10];
572    }
573
574    // $(".modalLink").fancybox({
575    //     padding: [40, 50, 40, 50],
576    //     margin: fancymargin,
577    //     helpers: {
578    //         /* overlay: {
579    //              locked: false
580    //              }*/
581    //     },
582    //     wrapCSS: "mainPopup",
583    //     afterLoad: function (current, previous) {
584    //         if (current.href === "#expertquest" && $(window).width() < 650) {
585    //             $(".fancybox-wrap").css({ "margin-top": "70px" });
586    //         }
587    //     },
588    //     afterClose: function () {
589    //         if (window.location.hash == "#expertquest") {
590    //             window.location.hash = "";
591    //         }
592    //     },
593    // });
594    // $.fancybox({
595    //     width: 620,
596    //     height: 490,
597    //     speedIn: 600,
598    //     speedOut: 200,
599    //     onComplete: function () {
600    //         $("#fancybox-wrap").css({ top: "20px", bottom: "auto" });
601    //     },
602    // });
603
604    // $(".helperLink").fancybox({
605    //     padding: [0, 0, 0, 0],
606    //     margin: fancymargin,
607    //     wrapCSS: "helperPopup mainPopup",
608    //     scrolling: "no",
609    // });
610    //
611    // $(".presentLink").fancybox({
612    //     padding: [0, 0, 0, 0],
613    //     margin: fancymargin,
614    //     wrapCSS: "mainPopup",
615    //     scrolling: "no",
616    // });
617
618    /*$('.contSlider .modalLink').fancybox(
619     {
620     padding:[40,50,40,50],
621     margin:fancymargin,
622     helpers: {
623     overlay: {
624     locked: false
625     }
626     },
627     wrapCSS: 'mainPopup'
628     }
629
630     );*/
631
632    // $(".partnersList .modalLink, .smallTabsPanes .modalLink").fancybox({
633    //     padding: [0, 0, 0, 0],
634    //     margin: fancymargin,
635    //     helpers: {
636    //         overlay: {
637    //             locked: false,
638    //         },
639    //     },
640    //     wrapCSS: "mainPopup borderedPopup",
641    // });
642
643    $(".js-modal-form").click(function (e) {
644        var id = $(this).attr("href");
645        $.fancybox.open($(id), {
646            touch: false,
647            toolbar: false,
648            hash: false,
649            clickSlide: false,
650            width: 570,
651        });
652    });
653
654    (function () {
655        var lang = $("html").attr("lang") || "ru";
656
657        // $(".js-modal-crm-form").fancybox({
658        //     padding: [40, 50, 40, 50],
659        //     margin: fancymargin,
660        //     width: 570,
661        //     type: "html",
662        //     autoSize: false,
663        //     wrapCSS: "mainPopup modal-crm-form-wrp",
664        //     afterLoad: function (current, previous) {
665        //         if ($(window).width() < 650) {
666        //             $(".fancybox-wrap").css({ "margin-top": "70px" });
667        //         }
668        //         this.content = "";
669        //         var sec = "";
670        //         var id = "";
671        //
672        //         switch (current.href) {
673        //             case "#expertquest":
674        //                 if (lang === "ru") {
675        //                     id = "8";
676        //                     sec = "vml9hr";
677        //                 } else {
678        //                     id = "12";
679        //                     sec = "yef4h6";
680        //                 }
681        //                 break;
682        //             case "#getPresentation":
683        //                 if (lang === "ru") {
684        //                     id = "10";
685        //                     sec = "dvp3x1";
686        //                 } else {
687        //                     id = "18";
688        //                     sec = "00dgwc";
689        //                 }
690        //                 break;
691        //             case "#downloadPresentation":
692        //                 if (lang === "ru") {
693        //                     id = "15";
694        //                     sec = "d05yok";
695        //                 } else {
696        //                     id = "18";
697        //                     sec = "00dgwc";
698        //                 }
699        //                 break;
700        //             case "#feedbackForm":
701        //                 if (lang === "ru") {
702        //                     id = "9";
703        //                     sec = "znfsa2";
704        //                 } else {
705        //                     id = "19";
706        //                     sec = "n8vr1u";
707        //                 }
708        //                 break;
709        //             case "#priceForm":
710        //                 id = "22";
711        //                 sec = "sbx8lt";
712        //                 break;
713        //             case "#downloadAfterPreview":
714        //                 if (lang === "ru") {
715        //                     id = "14";
716        //                     sec = "kskn6i";
717        //                 } else {
718        //                     id = "16";
719        //                     sec = "9gx38x";
720        //                 }
721        //                 break;
722        //             case "#contact-us":
723        //             case "#becomePartner":
724        //                 if (lang === "ru") {
725        //                     id = "11";
726        //                     sec = "a0in4v";
727        //                 } else {
728        //                     id = "20";
729        //                     sec = "053qm3";
730        //                 }
731        //                 break;
732        //         }
733        //         b24form &&
734        //             b24form({
735        //                 id: id,
736        //                 lang: lang,
737        //                 sec: sec,
738        //                 type: "inline",
739        //                 node: this.inner.get(0),
740        //             });
741        //     },
742        //     afterClose: function () {
743        //         if (window.location.hash === "#expertquest") {
744        //             window.location.hash = "";
745        //         }
746        //     },
747        // });
748    })();
749
750    if ($(".leadershipDetail").length > 0) {
751        var siteWidth = $(".siteWidth").width();
752        var windHeight = $(window).height() - 200;
753
754        if ($(window).height() < 950) {
755            windHeight += 200;
756        }
757        if ($(window).width() < 582) {
758            windHeight = "auto";
759        }
760        if ($(window).width() < 1500) {
761            if ($(window).width() < 1300) {
762                siteWidth = $(window).width();
763            }
764            $(".leadershipDetail").width(siteWidth).height(windHeight);
765        } else {
766            $(".leadershipDetail")
767                .width(siteWidth + 360)
768                .height(windHeight);
769        }
770
771        $(
772            ".leadershipList .ExpModalLink,.speakerList .modalLink,.successSlider .modalLink",
773        ).fancybox({
774            padding: [0, 0, 0, 0],
775            helpers: {
776                overlay: {
777                    locked: false,
778                },
779            },
780            margin: [0, 0, 0, 0],
781            openSpeed: 500,
782            closeSpeed: 500,
783            wrapCSS: "bigPopup",
784        });
785    }
786    if (is_touch_device) {
787        $(".workPlaceBenefits > div > div").on("tap", function () {
788            $(this).toggleClass("taped");
789        });
790    }
791
792    $("#mainLeftmenu .menulvl2 > li > strong > span>span").click(function () {
793        if ($(this).parent("span").parent("strong").parent("li").hasClass("current")) {
794            return false;
795        } else {
796            $("#mainLeftmenu .menulvl2 > li.current").removeClass("current");
797            $("#mainLeftmenu .menulvl3.current").slideUp();
798
799            $(this).parent("span").parent("strong").next("ul").slideDown();
800            $(this).parent("span").parent("strong").parent("li").addClass("current");
801            $(this).parent("span").parent("strong").next("ul").addClass("current");
802        }
803    });
804
805    $(".js-product-left-menu  li > strong > span").click(function () {
806        if ($(this).closest(".current").length > 0) {
807            return false;
808        } else {
809            $(".js-product-left-menu  li.current > ul").slideUp().parent().removeClass("current");
810            $(this).closest("li").addClass("current").find("ul").slideDown();
811        }
812    });
813
814    var windHeight = $(window).height();
815    if ($(".withAnim2").length > 0) {
816        var timerFl = 0;
817
818        let $withAnimLeft = $(".w45.left.withAnim");
819        let $withAnimLeft2 = $(".w45.left.withAnim2");
820        let animBlock1Top = 0;
821        let animBlock1Top2 = 0;
822        let $numbersBlock = $(".numbersBlock");
823        let $jsNumbers = $(".js-numbers");
824        let timerNumbersTop = 0;
825        let $timers;
826        if (typeof $withAnimLeft !== "undefined" && $withAnimLeft.length > 0) {
827            animBlock1Top = $withAnimLeft.offset().top;
828        }
829        if (typeof $withAnimLeft2 !== "undefined" && $withAnimLeft2.length > 0) {
830            animBlock1Top2 = $withAnimLeft2.offset().top;
831        }
832        if (typeof $numbersBlock !== "undefined" && $numbersBlock.length > 0) {
833            timerNumbersTop = $numbersBlock.offset().top;
834            $timers = $numbersBlock.find(".timer");
835        } else if (typeof $jsNumbers !== "undefined" && $jsNumbers.length > 0) {
836            timerNumbersTop = $jsNumbers.offset().top;
837            $timers = $jsNumbers.find(".js-timer");
838        }
839        var sliderTop = $("#slider0").offset().top;
840        $(window).scroll(function () {
841            var fromTop = $(this).scrollTop();
842            if (animBlock1Top - windHeight + 200 < fromTop) {
843                $(".w45.left.withAnim").addClass("show");
844                $(".w45.right.withAnim").addClass("show");
845            }
846
847            if (animBlock1Top2 - windHeight + 200 < fromTop) {
848                $(".w45.left.withAnim2").addClass("show");
849                $(".w45.right.withAnim2").addClass("show");
850            }
851            if (animBlock1Top2 - windHeight + 500 < fromTop) {
852                $(".paleBlock").addClass("show");
853            }
854            if (fromTop > timerNumbersTop - windHeight && !timerFl) {
855                timerFl = 1;
856                console.log($timers);
857                $timers.each(count);
858            }
859            if (fromTop > sliderTop - windHeight) {
860                $("#slider0").addClass("show");
861            }
862        });
863    }
864
865    if ($(".newVacancyList").length > 0) {
866        var newVacancyListTop = $(".newVacancyList").offset().top;
867
868        $(window).scroll(function () {
869            var fromTop = $(this).scrollTop();
870            if (newVacancyListTop - windHeight + 200 < fromTop) {
871                $(".newVacancyList").addClass("show");
872            }
873        });
874    }
875
876    if ($(".advantTop ").length > 0) {
877        var leftBlockTop = $(".w50.left.smallfont ").offset().top;
878
879        $(window).scroll(function () {
880            var fromTop = $(this).scrollTop();
881            if (leftBlockTop - windHeight + 200 < fromTop) {
882                $(".w50.left.smallfont, .educationBlock").addClass("show");
883            }
884        });
885    }
886
887    $(".presentPopup .redBtn").click(function (e) {
888        var hideElem = $(this).attr("data-class");
889        $("" + hideElem + "").addClass("hidden");
890        $.fancybox.open($("#presentok"));
891    });
892
893    if ($(".kso-benefits").length > 0) {
894        $(".kso-benefits>li>div").setEqualHeightTwo();
895    }
896
897    if ($(".main-projects-list").length > 0) {
898        $(".main-projects-list a").setEqualHeightNew();
899    }
900
901    // $(".eventScrollerWrap").adaptiveSlider({ elementCount: 4, marginVal: -30 });
902
903    $("body").on("click", ".loadMorBtn", function (e) {
904        var nextPage = $(this).attr("data-page");
905        var maxPages = $(this).attr("data-max-pages");
906
907        if (nextPage == maxPages) {
908            $(this).parent().hide();
909        }
910        if (moreEventsLoad == 0) {
911            moreEventsLoad = 1;
912
913            getMoreContent("/ajax/project-more.php", "ajax=Y&PAGEN_1=" + nextPage, "projList");
914            nextPage++;
915
916            $(this).attr("href", "/projects/?PAGEN_1=" + nextPage);
917            $(this).attr("data-page", nextPage);
918        }
919
920        e.preventDefault();
921    });
922
923    var $porjectFixLine = $(".projectDetailFixedLine");
924
925    if ($porjectFixLine.length > 0) {
926        var lineBottom = $porjectFixLine.offset().top + $porjectFixLine.height();
927        $porjectFixLine.attr("data-start-top-position", lineBottom);
928        var windTop = $(window).scrollTop();
929        var windHeight = $(window).height();
930        if (windTop + windHeight > lineBottom) {
931            $porjectFixLine.removeClass("fixed");
932        } else {
933            $porjectFixLine.addClass("fixed");
934        }
935
936        $(window).on("resize", function () {
937            lineBottom = $porjectFixLine.offset().top + $porjectFixLine.height();
938            $porjectFixLine.attr("data-start-top-position", lineBottom);
939            windTop = $(window).scrollTop();
940            windHeight = $(window).height();
941            if (windTop + windHeight > lineBottom) {
942                $porjectFixLine.removeClass("fixed");
943            } else {
944                $porjectFixLine.addClass("fixed");
945            }
946        });
947
948        $(window).on("scroll", function () {
949            // lineBottom = $porjectFixLine.offset().top + $porjectFixLine.height();
950            var windTop = $(window).scrollTop();
951            if (windTop + windHeight > $porjectFixLine.data("startTopPosition")) {
952                $porjectFixLine.removeClass("fixed");
953            } else {
954                $porjectFixLine.addClass("fixed");
955            }
956        });
957    }
958
959    $(".anchorLink").on("click", function (e) {
960        var targetId = $(this).attr("href");
961        if (targetId != "#") {
962            var targetDest = $(targetId).offset().top;
963            $("html,body").animate({ scrollTop: targetDest }, 700);
964        }
965        e.preventDefault();
966    });
967
968    var moreEventsLoad = 0;
969
970    function getMoreContent(url, params, domID) {
971        $.ajax({
972            url: url,
973            context: document.body,
974            data: params,
975        }).done(function (data) {
976            $("#" + domID).append(data);
977            moreEventsLoad = 0;
978        });
979    }
980
981    if ($("#expertquest").length > 0) {
982        if (window.location.hash == "#expertquest") {
983            $(".js-modal-crm-form[href='#expertquest']").click();
984        }
985    }
986});
987
988/* Doc ready end*/
989
990/* Window load*/
991
992$(window).load(function () {
993    $("#mainSlider .slides > li:eq(1)").addClass("current");
994});
995
996/* Window load end*/
997
998/* Mainslider func*/
999function mainSlider() {
1000    $("#mainSlider .sliderNav .slierTabs > li").click(function () {
1001        if ($(this).hasClass("active")) {
1002            $("#mainSlider .slides").addClass("elastic");
1003            setTimeout(function () {
1004                $("#mainSlider .slides").removeClass("elastic");
1005            }, 500);
1006        }
1007    });
1008
1009    var $topslider = $("#mainSlider>.slidesWrap");
1010    var $items = $("#mainSlider .slides > li");
1011    var $next = $(".sliderNav .next");
1012    var $prev = $(".sliderNav .prev");
1013
1014    $items.width($(window).width());
1015
1016    $topslider
1017        .scrollable({
1018            next: $next,
1019            prev: $prev,
1020            circular: true,
1021            keyboard: false,
1022            speed: 700,
1023            onSeek: function () {
1024                var $current = $("#mainSlider .slides > li.current");
1025                i = this.getIndex() + 1;
1026
1027                $current.removeClass("current");
1028                $("#mainSlider .slides > li:eq(" + i + ")").addClass("current");
1029            },
1030        })
1031        .navigator({ navi: ".sliderNav .slierTabs" });
1032
1033    if ($items.length < 2) {
1034        $("#mainSlider .sliderNav .prev, #mainSlider .sliderNav .next").hide();
1035    } else {
1036        $topslider.autoscroll(6000);
1037    }
1038
1039    var conf = $("#mainSlider .slidesWrap").scrollable().getConf();
1040    conf.easing = "easeInOutCubic";
1041}
1042
1043/* Mainslider func end*/
1044
1045function getCookie(name) {
1046    var matches = document.cookie.match(
1047        new RegExp("(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, "\\$1") + "=([^;]*)"),
1048    );
1049    return matches ? decodeURIComponent(matches[1]) : undefined;
1050}
1051
1052function setCookie(name, value, options) {
1053    options = options || {};
1054    var expires = options.expires;
1055    if (typeof expires == "number" && expires) {
1056        var d = new Date();
1057        d.setTime(d.getTime() + expires * 1000);
1058        expires = options.expires = d;
1059    }
1060    if (expires && expires.toUTCString) {
1061        options.expires = expires.toUTCString();
1062    }
1063    value = encodeURIComponent(value);
1064    var updatedCookie = name + "=" + value;
1065    for (var propName in options) {
1066        updatedCookie += "; " + propName;
1067        var propValue = options[propName];
1068        if (propValue !== true) {
1069            updatedCookie += "=" + propValue;
1070        }
1071    }
1072    document.cookie = updatedCookie;
1073}
1074
1075function deleteCookie(name) {
1076    setCookie(name, "", { expires: -1 });
1077}
1078
1079window.aGetLangPrefix = function () {
1080    if ($("html").attr("lang") == "en") {
1081        return "/eng/";
1082    } else {
1083        if ($("html").attr("lang") == "sr") {
1084            return "/sr/";
1085        } else {
1086            return "/";
1087        }
1088    }
1089};
1090
1091function str_replace(search, replace, subject) {
1092    return subject.split(search).join(replace);
1093}
1094
1095Share = {
1096    facebook: function (purl) {
1097        url = "https://www.facebook.com/sharer/sharer.php?u=";
1098        url += encodeURIComponent(purl);
1099        Share.popup(url);
1100    },
1101    twitter: function (purl, ptitle) {
1102        ptitle = str_replace("| ICL Services", "via @icl_services", ptitle);
1103
1104        url = "https://twitter.com/intent/tweet?";
1105        url += "text=" + encodeURIComponent(ptitle);
1106        url += "&url=" + encodeURIComponent(purl);
1107        Share.popup(url);
1108    },
1109    linkedin: function (purl, ptitle, text) {
1110        url = "http://www.linkedin.com/shareArticle?mini=true";
1111        url += "&url=" + encodeURIComponent(purl);
1112        url += "&title=" + encodeURIComponent(ptitle).substr(0, 199);
1113        if (text) {
1114            url += "&summary=" + encodeURIComponent(text).substr(0, 200);
1115        }
1116        url += "&source=" + encodeURIComponent("ICL Services");
1117        Share.popup(url);
1118    },
1119
1120    vkontakte: function (purl, ptitle, pimg, text) {
1121        url = "http://vkontakte.ru/share.php?";
1122        url += "url=" + encodeURIComponent(purl);
1123        url += "&title=" + encodeURIComponent(ptitle);
1124        url += "&image=" + encodeURIComponent(pimg);
1125        url += "&description=" + encodeURIComponent(text);
1126        url += "&noparse=true";
1127        Share.popup(url);
1128    },
1129    popup: function (url) {
1130        window.open(url, "", "toolbar=0,status=0,width=626,height=436");
1131    },
1132};
1133
1134function fbshare(obj) {
1135    /*if ($(obj).attr("data-picLink")) {
1136        picLink = $(obj).attr("data-picLink");
1137    } else {
1138        picLink = "";
1139    }
1140
1141    descr = $(obj).data("descr");
1142    title = $(obj).data("title");
1143    flink = $(obj).data("flink");
1144
1145    FB.ui(
1146        {
1147            method: "feed",
1148            name: title,
1149            link: flink,
1150            description: descr,
1151            picture: picLink,
1152        },
1153        function (response) {},
1154    );*/
1155}
1156
1157// send reached goals to Google Analytics, Yandex.Metrika
1158function sendAnalyticsGoal(reachedGoal) {
1159    window.onload = function () {
1160        yaCounter26665989.reachGoal("" + reachedGoal);
1161    };
1162}
1163
1164$(document).ready(function () {
1165    // ionRangeSlider
1166    // $(".ionrange-procents").ionRangeSlider({
1167    //     min: 0,
1168    //     max: 100,
1169    //     from: 32,
1170    //     postfix: "%",
1171    // });
1172    // End ionRangeSlider
1173
1174    if ($(".form-steping").length) {
1175        var thisStep = 1;
1176        var formTitleScroll = $("#redinfo-form-top-scroll").offset().top;
1177        // Функция переключения на след шаг формы
1178        var nextSteping = function () {
1179            event.preventDefault();
1180
1181            switch (thisStep) {
1182                case 1:
1183                    result = $("#form-step-1 input").valid();
1184                    if (!result) {
1185                        return false;
1186                    }
1187                    break;
1188                case 2:
1189                    result = $("#form-step-2 input").valid();
1190                    if (!result) {
1191                        return false;
1192                    }
1193                    break;
1194            }
1195
1196            thisStep += 1;
1197            $("#form-step-" + thisStep).removeClass("form-step--hidden");
1198            $("#form-step-" + (thisStep - 1)).addClass("form-step--hidden");
1199            $("body").animate({ scrollTop: formTitleScroll }, 400);
1200            if (thisStep > 1) {
1201                $(".redBtn--prev").removeClass("deactive");
1202            }
1203            if (thisStep == 2) {
1204                $(".white-form-block__steps li:nth-child(1)").addClass("checked");
1205                $(".white-form-block__steps li:nth-child(1)").removeClass("active");
1206                $(".white-form-block__steps li:nth-child(2)").addClass("active");
1207            }
1208            if (thisStep == 3) {
1209                $(".white-form-block__steps li:nth-child(1)").addClass("checked");
1210                $(".white-form-block__steps li:nth-child(2)").addClass("checked");
1211                $(".white-form-block__steps li:nth-child(2)").removeClass("active");
1212                $(".white-form-block__steps li:nth-child(3)").addClass("active");
1213                $(this).find(".text").text("Отправить анкету");
1214                // Снимаем обработчик при последнем шаге
1215                $(this).unbind("click", nextSteping);
1216            }
1217        };
1218
1219        $(".form-steping #form-step-next").bind("click", nextSteping);
1220
1221        var prevSteping = function () {
1222            event.preventDefault();
1223            thisStep = thisStep - 1;
1224            $("#form-step-" + thisStep).removeClass("form-step--hidden");
1225            $("#form-step-" + (thisStep + 1)).addClass("form-step--hidden");
1226            $("body").animate({ scrollTop: formTitleScroll }, 400);
1227            if (thisStep == 1) {
1228                $(".white-form-block__steps li:nth-child(1)").addClass("active");
1229                $(".white-form-block__steps li:nth-child(1)").removeClass("checked");
1230                $(".white-form-block__steps li:nth-child(2)").removeClass("active");
1231                $("#form-step-prev").addClass("deactive");
1232            }
1233            if (thisStep == 2) {
1234                $(".white-form-block__steps li:nth-child(2)").addClass("active");
1235                $(".white-form-block__steps li:nth-child(2)").removeClass("checked");
1236                $(".white-form-block__steps li:nth-child(3)").removeClass("active");
1237            }
1238            if (thisStep < 3) {
1239                $(".form-steping #form-step-next .text").text("Продолжить");
1240                $(".form-steping #form-step-next").unbind("click", nextSteping);
1241                $(".form-steping #form-step-next").bind("click", nextSteping);
1242            }
1243        };
1244        $(".form-steping #form-step-prev").bind("click", prevSteping);
1245
1246        $("[id ^= lang-support]").on("change", function (event) {
1247            event.preventDefault();
1248            var thisLang = $(this).attr("id");
1249            var thisLangName = $(this).parent().siblings("label").text();
1250            var thisIonRangeWrap = $("[data-lang-support=" + thisLang + "]");
1251            thisIonRangeWrap.toggleClass("formLine--ionrange-hidden");
1252            thisIonRangeWrap.find(".ionrange-descr").text(thisLangName);
1253            // console.log(thisLangName);
1254        });
1255    }
1256
1257    $(".js-tabs a").click(function () {
1258        tabid = $(this).attr("href");
1259        $(".js-tabs a").removeClass("current");
1260        $(this).addClass("current");
1261        $(".prjItem").removeClass("current");
1262        $(tabid).addClass("current");
1263        let $porjectFixLine = $(tabid).find(".projectDetailFixedLine");
1264        $(".projectDetailFixedLine").removeClass("fixed");
1265        lineBottom = $porjectFixLine.offset().top + $porjectFixLine.height();
1266        $(".projectDetailFixedLine").data("startTopPosition", lineBottom);
1267        return false;
1268    });
1269});
1270
1271$(window).on("load", function () {
1272    if ($(window).width() > 600) {
1273        // mCustomScrollbar
1274        if ($.fn.mCustomScrollbar) {
1275            $(".leadershipDetail .infoBlock").mCustomScrollbar({
1276                theme: "minimal-dark",
1277            });
1278        }
1279        if ($(".leadershipDetail.modalWindow .infoBlock").length) {
1280            $("<style>.bigPopup .fancybox-inner {overflow: hidden!important;}</style>").appendTo(
1281                "head",
1282            );
1283        }
1284    }
1285});
1286
1287/* cookies agree */
1288$(window).load(function () {
1289    cookiesagree = getCookie("cookiesagree");
1290    if (!cookiesagree) {
1291        $(".goUpBtn").addClass("js-disabled");
1292        setTimeout(function () {
1293            $(".cookiesagree").fadeIn(500);
1294        }, 2000);
1295    }
1296    $(".cookiesagree .cookiesBtn").click(function () {
1297        newsdate = new Date();
1298        newsdate.setDate(newsdate.getDate() + 180);
1299        newsdate = newsdate.toUTCString();
1300        $(".cookiesagree").fadeOut(500);
1301        deleteCookie("cookiesagree");
1302        setCookie("cookiesagree", "agree", { path: "/", expires: newsdate });
1303        $(".goUpBtn").removeClass("js-disabled");
1304        return false;
1305    });
1306});
1307/* cookies agree */
1308
1309/* show/hide */
1310
1311$(function () {
1312    $(".list-toggle").click(function () {
1313        $(".ui-content").toggleClass("ui-content--open");
1314        $(this).hide();
1315    });
1316});
1317
1318/* service-center link */
1319$(document).ready(function () {
1320    let location = window.location.pathname;
1321    let hash = window.location.hash;
1322
1323    if (location === "/contacts/" && hash.length > 0) {
1324        let selector = "a[href=" + hash + "]";
1325        let trigger = $(selector).parent()[0];
1326
1327        setTimeout(function () {
1328            trigger.click();
1329        }, 0);
1330    }
1331
1332    // $(".search-projects .projects-box .slider.main-projects__list--inner").slick({
1333    //     infinite: true,
1334    //     dots: false,
1335    //     arrows: true,
1336    //     slidesToShow: 3,
1337    //     slidesToScroll: 1,
1338    //     nextArrow:
1339    //         '<button class="slider-universal-arrow slider-universal-arrow--next" tabindex="0" aria-label="Next slide" aria-controls="swiper-wrapper-871a5beb1bee967a" aria-disabled="false">\n' +
1340    //         '        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41 41">\n' +
1341    //         '            <path d="M20.5,41A20.5,20.5,0,1,1,41,20.5,20.53,20.53,0,0,1,20.5,41Zm0-40A19.5,19.5,0,1,0,40,20.5,19.53,19.53,0,0,0,20.5,1Z"></path>\n' +
1342    //         '            <polygon points="20.92 13.83 20.21 14.53 26.74 21.06 12.95 21.06 12.95 22.06 26.42 22.06 20.21 28.27 20.92 28.98 28.5 21.4 20.92 13.83"></polygon>\n' +
1343    //         "        </svg>\n" +
1344    //         "    </button>",
1345    //     prevArrow:
1346    //         '<button class="slider-universal-arrow slider-universal-arrow--prev" tabindex="0" aria-label="Previous slide" aria-controls="swiper-wrapper-871a5beb1bee967a" aria-disabled="false">\n' +
1347    //         '        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41 41">\n' +
1348    //         '            <path d="M20.5,41A20.5,20.5,0,1,1,41,20.5,20.53,20.53,0,0,1,20.5,41Zm0-40A19.5,19.5,0,1,0,40,20.5,19.53,19.53,0,0,0,20.5,1Z"></path>\n' +
1349    //         '            <polygon points="28.05 21.06 14.26 21.06 20.79 14.53 20.08 13.83 12.5 21.4 20.08 28.98 20.79 28.27 14.58 22.06 28.05 22.06 28.05 21.06"></polygon>\n' +
1350    //         "        </svg>\n" +
1351    //         "    </button>",
1352    //     responsive: [
1353    //         {
1354    //             breakpoint: 1000,
1355    //             settings: {
1356    //                 slidesToShow: 2,
1357    //             },
1358    //         },
1359    //         {
1360    //             breakpoint: 600,
1361    //             settings: {
1362    //                 slidesToShow: 1,
1363    //             },
1364    //         },
1365    //     ],
1366    // });
1367
1368    // $(".search-news .tabs-content .tab-content").slick({
1369    //     infinite: true,
1370    //     dots: false,
1371    //     arrows: true,
1372    //     slidesToShow: 3,
1373    //     slidesToScroll: 1,
1374    //     nextArrow:
1375    //         '<button class="slider-universal-arrow slider-universal-arrow--next" tabindex="0" aria-label="Next slide" aria-controls="swiper-wrapper-871a5beb1bee967a" aria-disabled="false">\n' +
1376    //         '        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41 41">\n' +
1377    //         '            <path d="M20.5,41A20.5,20.5,0,1,1,41,20.5,20.53,20.53,0,0,1,20.5,41Zm0-40A19.5,19.5,0,1,0,40,20.5,19.53,19.53,0,0,0,20.5,1Z"></path>\n' +
1378    //         '            <polygon points="20.92 13.83 20.21 14.53 26.74 21.06 12.95 21.06 12.95 22.06 26.42 22.06 20.21 28.27 20.92 28.98 28.5 21.4 20.92 13.83"></polygon>\n' +
1379    //         "        </svg>\n" +
1380    //         "    </button>",
1381    //     prevArrow:
1382    //         '<button class="slider-universal-arrow slider-universal-arrow--prev" tabindex="0" aria-label="Previous slide" aria-controls="swiper-wrapper-871a5beb1bee967a" aria-disabled="false">\n' +
1383    //         '        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41 41">\n' +
1384    //         '            <path d="M20.5,41A20.5,20.5,0,1,1,41,20.5,20.53,20.53,0,0,1,20.5,41Zm0-40A19.5,19.5,0,1,0,40,20.5,19.53,19.53,0,0,0,20.5,1Z"></path>\n' +
1385    //         '            <polygon points="28.05 21.06 14.26 21.06 20.79 14.53 20.08 13.83 12.5 21.4 20.08 28.98 20.79 28.27 14.58 22.06 28.05 22.06 28.05 21.06"></polygon>\n' +
1386    //         "        </svg>\n" +
1387    //         "    </button>",
1388    //     responsive: [
1389    //         {
1390    //             breakpoint: 1000,
1391    //             settings: {
1392    //                 slidesToShow: 2,
1393    //             },
1394    //         },
1395    //         {
1396    //             breakpoint: 600,
1397    //             settings: {
1398    //                 slidesToShow: 1,
1399    //             },
1400    //         },
1401    //     ],
1402    // });
1403
1404    var projectReviewCount = $(
1405        ".project-reviews .project-reviews-slider .project-reviews-slide",
1406    ).length;
1407    var projectReviewsDots = false;
1408
1409    if (projectReviewCount < 3) {
1410        projectReviewCount = 2;
1411        $(".project-reviews .project-reviews-slider .slick-track").addClass("no-margin");
1412    } else {
1413        projectReviewCount = 3;
1414    }
1415    if (projectReviewCount > 3) {
1416        projectReviewsDots = true;
1417    }
1418
1419    // $(".project-reviews .project-reviews-slider").slick({
1420    //     dots: projectReviewsDots,
1421    //     infinite: true,
1422    //     slidesToShow: projectReviewCount,
1423    //     slidesToScroll: 1,
1424    //     prevArrow:
1425    //         '<div class="projects-prev-btn"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41 41">\n' +
1426    //         '            <path d="M20.5,41A20.5,20.5,0,1,1,41,20.5,20.53,20.53,0,0,1,20.5,41Zm0-40A19.5,19.5,0,1,0,40,20.5,19.53,19.53,0,0,0,20.5,1Z"></path>\n' +
1427    //         '            <polygon points="28.05 21.06 14.26 21.06 20.79 14.53 20.08 13.83 12.5 21.4 20.08 28.98 20.79 28.27 14.58 22.06 28.05 22.06 28.05 21.06"></polygon>\n' +
1428    //         "        </svg></div>",
1429    //     nextArrow:
1430    //         '<div class="projects-next-btn"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41 41">\n' +
1431    //         '            <path d="M20.5,41A20.5,20.5,0,1,1,41,20.5,20.53,20.53,0,0,1,20.5,41Zm0-40A19.5,19.5,0,1,0,40,20.5,19.53,19.53,0,0,0,20.5,1Z"></path>\n' +
1432    //         '            <polygon points="20.92 13.83 20.21 14.53 26.74 21.06 12.95 21.06 12.95 22.06 26.42 22.06 20.21 28.27 20.92 28.98 28.5 21.4 20.92 13.83"></polygon>\n' +
1433    //         "        </svg></div>",
1434    //     responsive: [
1435    //         {
1436    //             breakpoint: 1000,
1437    //             settings: {
1438    //                 slidesToShow: 2,
1439    //             },
1440    //         },
1441    //         {
1442    //             breakpoint: 600,
1443    //             settings: {
1444    //                 slidesToShow: 1,
1445    //             },
1446    //         },
1447    //     ],
1448    // });
1449
1450    // $("section.projects .projects-slider").slick({
1451    //     infinite: true,
1452    //     dots: false,
1453    //     slidesToShow: 3,
1454    //     slidesToScroll: 3,
1455    //     prevArrow:
1456    //         '<button class="projects-slider-button prev-button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41 41">\n' +
1457    //         '            <path d="M20.5,41A20.5,20.5,0,1,1,41,20.5,20.53,20.53,0,0,1,20.5,41Zm0-40A19.5,19.5,0,1,0,40,20.5,19.53,19.53,0,0,0,20.5,1Z"></path>\n' +
1458    //         '            <polygon points="28.05 21.06 14.26 21.06 20.79 14.53 20.08 13.83 12.5 21.4 20.08 28.98 20.79 28.27 14.58 22.06 28.05 22.06 28.05 21.06"></polygon>\n' +
1459    //         "        </svg></button>",
1460    //     nextArrow:
1461    //         '<button class="projects-slider-button next-button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41 41">\n' +
1462    //         '            <path d="M20.5,41A20.5,20.5,0,1,1,41,20.5,20.53,20.53,0,0,1,20.5,41Zm0-40A19.5,19.5,0,1,0,40,20.5,19.53,19.53,0,0,0,20.5,1Z"></path>\n' +
1463    //         '            <polygon points="20.92 13.83 20.21 14.53 26.74 21.06 12.95 21.06 12.95 22.06 26.42 22.06 20.21 28.27 20.92 28.98 28.5 21.4 20.92 13.83"></polygon>\n' +
1464    //         "        </svg></button>",
1465    //     responsive: [
1466    //         {
1467    //             breakpoint: 800,
1468    //             settings: {
1469    //                 slidesToShow: 2,
1470    //                 slidesToScroll: 2,
1471    //             },
1472    //         },
1473    //         {
1474    //             breakpoint: 550,
1475    //             settings: {
1476    //                 slidesToShow: 1,
1477    //                 slidesToScroll: 1,
1478    //             },
1479    //         },
1480    //     ],
1481    // });
1482    //
1483    // $("section.service-man .service-man-slider").slick({
1484    //     infinite: true,
1485    //     dots: false,
1486    //     slidesToShow: 4,
1487    //     slidesToScroll: 1,
1488    //     prevArrow:
1489    //         '<button class="service-man-slider-button prev-button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41 41">\n' +
1490    //         '            <path d="M20.5,41A20.5,20.5,0,1,1,41,20.5,20.53,20.53,0,0,1,20.5,41Zm0-40A19.5,19.5,0,1,0,40,20.5,19.53,19.53,0,0,0,20.5,1Z"></path>\n' +
1491    //         '            <polygon points="28.05 21.06 14.26 21.06 20.79 14.53 20.08 13.83 12.5 21.4 20.08 28.98 20.79 28.27 14.58 22.06 28.05 22.06 28.05 21.06"></polygon>\n' +
1492    //         "        </svg></button>",
1493    //     nextArrow:
1494    //         '<button class="service-man-slider-button next-button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41 41">\n' +
1495    //         '            <path d="M20.5,41A20.5,20.5,0,1,1,41,20.5,20.53,20.53,0,0,1,20.5,41Zm0-40A19.5,19.5,0,1,0,40,20.5,19.53,19.53,0,0,0,20.5,1Z"></path>\n' +
1496    //         '            <polygon points="20.92 13.83 20.21 14.53 26.74 21.06 12.95 21.06 12.95 22.06 26.42 22.06 20.21 28.27 20.92 28.98 28.5 21.4 20.92 13.83"></polygon>\n' +
1497    //         "        </svg></button>",
1498    //     responsive: [
1499    //         {
1500    //             breakpoint: 1000,
1501    //             settings: {
1502    //                 slidesToShow: 3,
1503    //             },
1504    //         },
1505    //         {
1506    //             breakpoint: 800,
1507    //             settings: {
1508    //                 slidesToShow: 2,
1509    //             },
1510    //         },
1511    //         {
1512    //             breakpoint: 500,
1513    //             settings: {
1514    //                 slidesToShow: 1,
1515    //             },
1516    //         },
1517    //     ],
1518    // });
1519    //
1520    // $("section.news .news-slider").slick({
1521    //     infinite: true,
1522    //     dots: false,
1523    //     slidesToShow: 3,
1524    //     slidesToScroll: 1,
1525    //     prevArrow:
1526    //         '<button class="news-slider-button prev-button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41 41">\n' +
1527    //         '            <path d="M20.5,41A20.5,20.5,0,1,1,41,20.5,20.53,20.53,0,0,1,20.5,41Zm0-40A19.5,19.5,0,1,0,40,20.5,19.53,19.53,0,0,0,20.5,1Z"></path>\n' +
1528    //         '            <polygon points="28.05 21.06 14.26 21.06 20.79 14.53 20.08 13.83 12.5 21.4 20.08 28.98 20.79 28.27 14.58 22.06 28.05 22.06 28.05 21.06"></polygon>\n' +
1529    //         "        </svg></button>",
1530    //     nextArrow:
1531    //         '<button class="news-slider-button next-button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41 41">\n' +
1532    //         '            <path d="M20.5,41A20.5,20.5,0,1,1,41,20.5,20.53,20.53,0,0,1,20.5,41Zm0-40A19.5,19.5,0,1,0,40,20.5,19.53,19.53,0,0,0,20.5,1Z"></path>\n' +
1533    //         '            <polygon points="20.92 13.83 20.21 14.53 26.74 21.06 12.95 21.06 12.95 22.06 26.42 22.06 20.21 28.27 20.92 28.98 28.5 21.4 20.92 13.83"></polygon>\n' +
1534    //         "        </svg></button>",
1535    //     responsive: [
1536    //         {
1537    //             breakpoint: 1000,
1538    //             settings: {
1539    //                 slidesToShow: 2,
1540    //             },
1541    //         },
1542    //         {
1543    //             breakpoint: 800,
1544    //             settings: {
1545    //                 slidesToShow: 1,
1546    //             },
1547    //         },
1548    //     ],
1549    // });
1550    //
1551    // $("section.ratings .ratings-item-slider").slick({
1552    //     infinite: true,
1553    //     dots: false,
1554    //     slidesToShow: 4,
1555    //     slidesToScroll: 1,
1556    //     prevArrow:
1557    //         '<button class="ratings-slider-button prev-button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41 41">\n' +
1558    //         '            <path d="M20.5,41A20.5,20.5,0,1,1,41,20.5,20.53,20.53,0,0,1,20.5,41Zm0-40A19.5,19.5,0,1,0,40,20.5,19.53,19.53,0,0,0,20.5,1Z"></path>\n' +
1559    //         '            <polygon points="28.05 21.06 14.26 21.06 20.79 14.53 20.08 13.83 12.5 21.4 20.08 28.98 20.79 28.27 14.58 22.06 28.05 22.06 28.05 21.06"></polygon>\n' +
1560    //         "        </svg></button>",
1561    //     nextArrow:
1562    //         '<button class="ratings-slider-button next-button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 41 41">\n' +
1563    //         '            <path d="M20.5,41A20.5,20.5,0,1,1,41,20.5,20.53,20.53,0,0,1,20.5,41Zm0-40A19.5,19.5,0,1,0,40,20.5,19.53,19.53,0,0,0,20.5,1Z"></path>\n' +
1564    //         '            <polygon points="20.92 13.83 20.21 14.53 26.74 21.06 12.95 21.06 12.95 22.06 26.42 22.06 20.21 28.27 20.92 28.98 28.5 21.4 20.92 13.83"></polygon>\n' +
1565    //         "        </svg></button>",
1566    //     responsive: [
1567    //         {
1568    //             breakpoint: 1300,
1569    //             settings: {
1570    //                 slidesToShow: 3,
1571    //             },
1572    //         },
1573    //         {
1574    //             breakpoint: 900,
1575    //             settings: {
1576    //                 slidesToShow: 2,
1577    //             },
1578    //         },
1579    //         {
1580    //             breakpoint: 600,
1581    //             settings: {
1582    //                 slidesToShow: 1,
1583    //             },
1584    //         },
1585    //     ],
1586    // });
1587    //
1588    // if ($(document).width() <= 1199) {
1589    //     $("section.projects .projects-icon-wrap").slick({
1590    //         infinite: true,
1591    //         dots: false,
1592    //         slidesToShow: 4,
1593    //         slidesToScroll: 1,
1594    //         arrows: false,
1595    //         responsive: [
1596    //             {
1597    //                 breakpoint: 600,
1598    //                 settings: {
1599    //                     slidesToShow: 2,
1600    //                 },
1601    //             },
1602    //         ],
1603    //     });
1604    // }
1605});
1606
1607$(document).on("click", ".search-news .tabs .tabs__tab.js-tab", function (e) {
1608    var id = $(this).data("tab");
1609    $(".search-news .tabs .tabs__tab.js-tab").removeClass("active");
1610    $(".search-news .tabs-content .tab-content-wrap").removeClass("active");
1611    $(".search-news .main-news-tabs__link").removeClass("active");
1612    $(this).addClass("active");
1613    $('.search-news .tabs-content .tab-content-wrap[data-tab="' + id + '"]').addClass("active");
1614    $('.search-news .main-news-tabs__link[data-tab="' + id + '"]').addClass("active");
1615});
1616
1617$(document).on("click", ".search-services .tabs .main-services__tab", function (e) {
1618    var id = $(this).data("href");
1619    id = id.substring(1);
1620    $(".search-services .tabs .main-services__tab").removeClass("current");
1621    $(".search-services .tabs-content .tab-content-wrap").removeClass("current");
1622    $(this).addClass("current");
1623    $('.search-services .tabs-content .tab-content-wrap .tab[id="' + id + '"]')
1624        .parent(".tab-content-wrap")
1625        .addClass("current");
1626});
1627
1628$(document).on("click", "section.ratings .ratings-tab-button", function (e) {
1629    var tab = $(this).data("tab");
1630    $("section.ratings .ratings-tab-button").removeClass("active");
1631    $("section.ratings .ratings-item").removeClass("active");
1632    $(this).addClass("active");
1633    $('section.ratings .ratings-item[data-item="' + tab + '"]').addClass("active");
1634});
1635
1636$(document).on("click", ".phpdev-form-js", function (e) {
1637    e.preventDefault();
1638    var formId = $(this).attr("href");
1639    var isMobile = $(window).width() <= 767;
1640    var fancyboxOpts = {
1641        wrapCSS: "formPopup",
1642    };
1643    if (isMobile) {
1644        fancyboxOpts.padding = [0, 0, 0, 0];
1645        fancyboxOpts.margin = [0, 0, 0, 0];
1646    }
1647    $.fancybox.open($(formId), fancyboxOpts);
1648});
1649
1650document.addEventListener("DOMContentLoaded", function () {
1651
1652    // $(".projects-slider").slick({
1653    //     infinite: true,
1654    //     slidesToShow: 5,
1655    //     dots: true,
1656    //     responsive: [
1657    //         {
1658    //             breakpoint: 1200,
1659    //             settings: {
1660    //                 slidesToShow: 4,
1661    //             },
1662    //         },
1663    //         {
1664    //             breakpoint: 768,
1665    //             settings: {
1666    //                 slidesToShow: 3,
1667    //             },
1668    //         },
1669    //         {
1670    //             breakpoint: 576,
1671    //             settings: {
1672    //                 slidesToShow: 2,
1673    //             },
1674    //         },
1675    //     ],
1676    // });
1677
1678
1679    //modal
1680    $(document).on("click", "[data-modal-btn]", function (e) {
1681        e.preventDefault();
1682        const hash = this.hash;
1683        console.log(hash);
1684        modalOpen(hash);
1685    });
1686
1687    $(document).on("click", "[data-modal-overlay], [data-modal-close]", function () {
1688        modalClose();
1689    });
1690
1691
1692
1693    //let sessionText = sessionStorage.getItem("subscribe");
1694    //if (sessionText !== "added") {
1695    //    setTimeout(() => {
1696    //        modalOpen("#modal-subscribe"); 
1697    //        sessionStorage.setItem("subscribe", "added");
1698    //    }, 5000);
1699    //}
1700
1701});
1702
1703    
1704//modals
1705function modalOpen(hash) {
1706    if ($("[data-modal]").hasClass("modal-open")) {
1707        modalClose();
1708        setTimeout(() => {
1709            $(hash).fadeIn();
1710            $(hash).addClass("modal-open");
1711        }, 100);
1712    } else {
1713        $(hash).fadeIn();
1714        $(hash).addClass("modal-open");
1715    }
1716    }
1717    
1718    function modalClose() {
1719    const modalOpen = $("[data-modal].modal-open");
1720    modalOpen.fadeOut();
1721    modalOpen.removeClass("modal-open");
1722    }
1723
1724document.addEventListener('DOMContentLoaded', function() {
1725    // Указываем ссылки, для которых нужно изменить атрибут target и URL
1726    var targetUrl = '/products/produkty-dlya-avtomatizatsii-biznes-zadach/sistema-dlya-upravleniya-servisnym-obsluzhivaniem-snaryad/';
1727    var targetUrl1 = '/products/produkty-dlya-avtomatizatsii-biznes-zadach/platforma-videoanalitiki-aisee/';
1728    var targetUrl2 = '/services/postavka-programmnogo-obespecheniya-i-oborudovaniya/litsenzii-laboratorii-kasperskogo/'; // Старая ссылка
1729    var newTargetUrl2 = 'https://kaspersky.icl-services.com/'; // Новая ссылка
1730    var targetUrl3 = '/services/tsifrovaya-transformatsiya/vnedrenie-i-soprovozhdenie-pak-icl-avtozakazy/'; // Старая ссылка
1731    var newTargetUrl3 = 'https://icl-soft.ru/solutions/sobstvennye-it-produkty/icl-avtozakazy/'; // Новая ссылка
1732
1733    // Функция для изменения ссылки и добавления атрибута target
1734    function updateLinks(oldUrl, newUrl) {
1735        var links = document.querySelectorAll('a[href="' + oldUrl + '"]'); // Находим все ссылки с указанным URL
1736        if (links.length > 0) {
1737            links.forEach(function(link) {
1738                link.setAttribute('href', newUrl); // Обновляем URL
1739                link.setAttribute('target', '_blank'); // Добавляем атрибут target
1740                //console.log('Ссылка обновлена:', link); // Логируем обновление
1741            });
1742        }
1743    }
1744
1745    // Обновляем ссылки
1746    updateLinks(targetUrl, targetUrl); // Добавляем target для первой ссылки
1747    updateLinks(targetUrl1, targetUrl1); // Добавляем target для второй ссылки
1748    updateLinks(targetUrl2, newTargetUrl2); // Меняем URL и добавляем target для третьей ссылки
1749    updateLinks(targetUrl3, newTargetUrl3); // Меняем URL и добавляем target для третьей ссылки
1750});
1751    
1752    

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.