PageSourceSearch

https://medongroup-odc.ru/local/templates/medon/scripts/additional_min.js

js medongroup-odc.ru collected 2026-09-28 14:24:48 UTC 14,189 bytes, 291 lines download raw bytes

1$(function() {
2    function getCookiesPolicyAccepted() {
3        return "true" === BX.getCookie("COOKIESPOLICYACCEPTED")
4    }
5
6    function closeCookiesWarn() {
7        $("#cookiesWarn").hide()
8    }
9    $(".js-price-branch-show-more").on("click", function(e) {
10        $branchId = $(this).data("branch-id"), $branchCode = $(this).data("branch-code"), e
11            .preventDefault(), $el = $(this).parent().prev(), $lastPriceRow = $el.prev()
12            .prev(), $lastPriceRow.hasClass("there-was-radius") ? ($lastPriceRow.removeClass(
13                "there-was-radius"), $lastPriceRow.addClass("border-radius-bottom")) :
14            $lastPriceRow.hasClass("border-radius-bottom") && $lastPriceRow.hasClass(
15                "price__block_without-preview") && ($lastPriceRow.removeClass(
16                    "border-radius-bottom"), $lastPriceRow.addClass("there-was-radius"), $el
17                .prev().find(".price__block:first").removeClass("border-radius-top"), $el
18                .prev().css("margin-top", "-1px")), $.post(window.location.href, {
19                BX_AJAX: "Y",
20                "branch-id": $branchId,
21                "branch-code": $branchCode
22            }, function(data) {
23                data.length > 0 ? $el.html(data) : $el.prev().slideToggle($el.height())
24            }), $el.fadeIn(), $(this).fadeOut()
25    }),
26
27    $(document).on("click", ".headerSearch", function(e) {
28        e.preventDefault();
29        $("input.header__search-input").addClass('is-active');
30        $('.js-search-close').fadeIn(1000);
31    }),
32
33    $('.js-search-close').on('click', function() {
34        $("input.header__search-input").removeClass('is-active');
35        $(this).hide();
36    });
37
38    $("#content-treatment_benefits .medication__title").click(function() {
39        var txt = $(this).parent().children(".medication__text");
40        txt.is(":visible") ? txt.hasClass("toggle") && txt.hide() : txt.addClass("toggle")
41            .show()
42    }), $("#content-treatment_benefits .medication-wrapper").click(function() {
43        var txt = $(this).parent().children(".medication__text");
44        txt.is(":visible") ? txt.hasClass("toggle") && txt.hide() : txt.addClass("toggle")
45            .show()
46    }), $(document).ready(function() {
47        $("#content-contraindication .whatwedo__header").each(function() {
48            var text = $(this).html();
49            "Показание:" == text ? $(this).html("Показания:") : "Противопоказание:" ==
50                text && $(this).html("Противопоказания:")
51        })
52    }), getCookiesPolicyAccepted() || $("#cookiesWarn").show(), $(".cookieclose").on("click",
53        closeCookiesWarn), BX.setCookie("COOKIESPOLICYACCEPTED", "true", {
54        path: "/",
55        expires: 31536e3
56    }), $(".show_more_five").on("click", function(e) {
57        e.preventDefault(), $(this).text() == $(this).data("nameshow") ? $(this).text($(this)
58            .data("namehide")) : $(this).text($(this).data("nameshow")), $(this).parents(
59            "ul").find(".hidded").slideToggle()
60    }), $(window).scroll(function() {
61        var scrollDistance = $(window).scrollTop();
62        $("section").each(function(i) {
63            $(this).position().top - 51 <= scrollDistance && ($(".clinicsNav li")
64                .removeClass("active"), $("a[href='#" + $(this).prop("id") + "']")
65                .parent().addClass("active"))
66        })
67    }).scroll(), $(".clinicsNav a").click(function() {
68        if ($(".clinicsNav li").removeClass("active"), $(this).parent().addClass("active"),
69            location.pathname.replace(/^\//, "") === this.pathname.replace(/^\//, "") &&
70            location.hostname === this.hostname) {
71            var target = $(this.hash);
72            if ((target = target.length ? target : $("[name=" + this.hash.slice(1) + "]"))
73                .length) return $("html, body").animate({
74                scrollTop: target.offset().top - 50
75            }, 500), !1
76        }
77    }), $(".clinicsNav a").each(function() {
78        $($(this).attr("href")).text().length < 10 && $(this).parent().hide()
79    })
80}), $(".dropdown-city .btn-additional").on("click", function() {
81    $(".dropdown-city").hide(), $("#menu").text("КОРПОРАЦИЯ")
82}), $(".dropdown-city .w-choose-city-widget").on("click", function(e) {
83    e.preventDefault(), $(".dropdown-city").hide(), $("#menu").text("КОРПОРАЦИЯ"), $(".nav__geo")
84        .addClass("show")
85}), $(".photoslider .button-next").on("click", function(e) {
86    var $els = $(this).parents(".photoslider").find(".slide-item"),
87        len = $els.length - 1;
88    $els.each(function(i) {
89        if ($(this).is(":visible")) return $(this).hide(), next = i == len ? 0 : i + 1, el =
90            $els[next], $(el).show(), !1
91    })
92}), $(".photoslider .button-previous").on("click", function(e) {
93    var $els = $(this).parents(".photoslider").find(".slide-item"),
94        len = $els.length - 1;
95    $els.each(function(i) {
96        if ($(this).is(":visible")) return $(this).hide(), next = 0 == i ? len : i 
96- 1, el =
97            $els[next], console.log(len, i, next), $(el).show(), !1
98    })
99});
100var isMobile = {
101    Android: function() {
102        return !!navigator.userAgent.match(/Android/i)
103    },
104    BlackBerry: function() {
105        return !!navigator.userAgent.match(/BlackBerry/i)
106    },
107    iOS: function() {
108        return !!navigator.userAgent.match(/iPhone|iPad|iPod/i)
109    },
110    Windows: function() {
111        return !!navigator.userAgent.match(/IEMobile/i)
112    },
113    any: function() {
114        return isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Windows()
115    }
116};
117if ($(".doctor-metro2").hover(function() {
118        $(this).closest(".doctor__col").find(".metroaddress").css("opacity", "1"), $(this).closest(
119            ".doctor__col").find(".doctor-wrap").css("opacity", "1"), $(this).css("opacity", "0")
120    }, function() {
121        $(this).closest(".doctor__col").find(".metroaddress").css("opacity", "0"), $(this).closest(
122            ".doctor__col").find(".doctor-wrap").css("opacity", "0"), $(this).css("opacity", "1")
123    }), window.ismsk) {
124    var intervalId = getInterval();
125
126    function getInterval() {
127        return setInterval(function() {
128            openZapisModal(), clearInterval(intervalId)
129        }, 12e4)
130    }
131    $(document).on("mousemove", function() {
132        clearInterval(intervalId), intervalId = getInterval()
133    }), $(".price").each(function(key) {
134        var $prev = "",
135            $next = "",
136            rows = $(this).find(".price__block").each(function(key2) {
137                $next = $(this).next(), $prev && $prev.hasClass("price__block_without-preview") ||
138                    $(this).addClass("border-radius-top"), $next && $next.hasClass(
139                        "price__block_without-preview") || $(this).addClass(
140                        "border-radius-bottom"), $prev = $(this)
141            }),
142            $prev = "",
143            $next = "",
144            rows = $(this).find(".hideblock").find(".price__block").each(function(key2) {
145                $next = $(this).next(), $prev && $prev.hasClass("price__block_without-preview") ||
146                    $(this).addClass("border-radius-top"), $next && $next.hasClass(
147                        "price__block_without-preview") || $(this).addClass(
148                        "border-radius-bottom"), $prev = $(this)
149            })
150    })
151}
152
153function openZapisModal() {
154    $(".btnOpenForm[href='/modals/appointments/']:last").trigger("click")
155}
156
157function openZapisModalDoctor(t1) {
158    $.ajax({
159        url: "/modals/appointments/"
160    }).done(function(t) {
161        var n = $(t);
162        n.appendTo("body"), $.fn.webform && n.find(".js-webform").webform(), $("html").addClass(
163                "fixForModelForm"), $(".form-popup-bg").addClass("is-visible"), $(".form-popup-bg")
164            .on("click", function(t) {
165                ($(t.target).is(".form-popup-bg") || $(t.target).is(".close-button")) && (t
166                    .preventDefault(), $(this).remove(), $("html").removeClass("fixForModelForm"))
167            }), $docName = $(t1).parent().find(".doctor__name"), $("#webform1").find(
168                "input[name='form_hidden_5']").val($docName.text());
169        for (var inputs = document.getElementsByTagName("input"), i = 0; i < inputs.length; i++)
170            if ("js-blink-input" == document.getElementsByTagName("input")[i].id) {
171                var id = document.getElementsByTagName("input")[i].id,
172                    elem = document.getElementById(id);
173                elem.parentNode.removeChild(elem)
174            }
175    }).fail(function(e) {
176        console.log("error", e)
177    })
178}
179$(document).ajaxSuccess(function() {
180    Recaptchafree.reset()
181}), jQuery(function($) {
182    if (window.innerWidth < 420 && $(document).on("click", ".nav__clinics .text__geo", function() {
183            $(this).parent().addClass("blue"), setTimeout(function() {
184                $(this).parent().removeClass("blue")
185            }, 5e3)
186        }), $(".wrap_input .input_phone").mask("+7(999) 999-99-99", {
187            autoclear: !1
188        }), $(document).ajaxSuccess(function() {
189            $(".ajax_phone").attr("href", $(".text__main-link.text_link_phone").attr("href")), $(
190                ".ajax_phone").text($(".text__main-link.text_link_phone:first").text()), $(
191                ".wrap_input .input_phone").mask("+7(999) 999-99-99", {
192                autoclear: !1
193            })
194        }), $(".price-analysis table tr td").each(function() {
195            $(this).replaceWith('<div class="price__cell">' + $(this).html() + "</div>")
196        }), $(".price-analysis table tr").each(function() {
197            $(this).replaceWith('<div class="price__line">
197' + $(this).html() + "</div>")
198        }), $(".price-analysis table").replaceWith('<div class="price__table">' + $(
199            ".price-analysis table").html() + "</div>"), window.innerWidth < 420) {
200        var reg = /(\d{2})\.(\d{2})\.(\d{4})/;
201        $(".date").each(function() {
202            "" != $(this).text().trim() && $(this).text($(this).text().replace(reg, "$1.$2"))
203        })
204    }
205    $(document).on("focus", 'input[type="text"], .js-placeholder', function() {
206        $(this).parent().addClass("focused")
207    }), $(document).on("keypress", 'input[type="text"]', function() {
208        if ("" == $(this).val());
209        else {
210            var pattern, pattern;
211            // if ($(this).hasClass("input_phone"))(pattern =
212            //     /^\+7\(\d{3}\)\ \d{3}-\d{2}-\d{2}$/i).test($(this).val()) ? ($(this)
213            //     .parents("form").find(".form-sumbit").removeAttr("disabled"), $(this)
214            //     .parents("form").find(".form-sumbit").css("background-color", "#0babcd"),
215            //     $(this).css("border", ""), $(".form_error_onpage").hide()) : ($(this)
216            //     .parents("form").find(".form-sumbit").attr("disabled", "disabled"), $(
217            //         this).parents("form").find(".form-sumbit").css("background-color",
218            //         "#c8d3d9"), $(this).css("border", "1px solid red"), $(
219            //         ".form_error_onpage").show());
220            if ($(this).hasClass("input_email"))(pattern =
221                /^([a-z0-9_\.-])+@[a-z0-9-]+\.([a-z]{2,4}\.)?[a-z]{2,4}$/i).test($(this)
222                .val()) ? ($(this).parents("form").find(".form-sumbit").removeAttr(
223                    "disabled"), $(this).parents("form").find(".form-sumbit").css(
224                    "background-color", "#0babcd"), $(this).css("border", ""), $(this)
225                .parents(".wrap_input").find("small").hide()) : ($(this).parents("form")
226                .find(".form-sumbit").attr("disabled", "disabled"), $(this).parents(
227                    "form").find(".form-sumbit").css("background-color", "#c8d3d9"), $(
228                    this).css("border", "1px solid red"), $(this).parents(".wrap_input")
229                .find("small").show(), $(this).parents(".wrap_input").find("small").show()
230            )
231        }
232    })
233}), void 0 !== window.frameCacheVars && BX.addCustomEvent("onFrameDataReceived", function(json) {
234    Recaptchafree.reset()
235}), $(document).ready(function() {
236    $(window).scroll(function() {
237        $(this).scrollTop() > 50 ? $(".button-up").fadeIn() : $(".button-up").fadeOut()
238    }), $(".button-up").click(function() {
239        return $("body,html").animate({
240            scrollTop: 0
241        }, 500), !1
242    })
243});
244
245$(document).ready(function () {
246    var EDU_SPOILER_MARKER_TEST = /\[\s*свернуть\s*\]/i;
247    var EDU_SPOILER_MARKER_STRIP = /\s*\[\s*свернуть\s*\]/gi;
248    var EDU_SPOILER_VISIBLE_ITEMS = 4;
249
250    $('.doctor-main__spec').each(function () {
251        if ($(this).text().replace(/\s+/g, ' ').trim() !== 'Образование') {
252            return;
253        }
254
255        var $zone = $(this).nextUntil('.doctor-main__spec');
256
257        $zone.each(function () {
258            var $marker = $(this);
259            if (!EDU_SPOILER_MARKER_TEST.test($marker.text())) {
260                return;
261            }
262
263            $marker.html($marker.html().replace(EDU_SPOILER_MARKER_STRIP, ''));
264
265            var $list = $marker.nextAll('ul').first();
266            if (!$list.length || $list.hasClass('doctor-edu-collapse-list')) {
267                return;
268            }
269            if ($list.children('li').length <= EDU_SPOILER_VISIBLE_ITEMS) {
270                return;
271            }
272
273            $list.addClass('doctor-edu-collapse-list is-collapsed');
274            var $toggle = $('<button type="button" class="doctor-edu-collapse-toggle">Показать всё</button>');
275            $list.after($toggle);
276
277            $toggle.on('click', function () {
278                var isCollapsed = $list.toggleClass('is-collapsed').hasClass('is-collapsed');
279                $toggle.text(isCollapsed ? 'Показать всё' : 'Свернуть');
280            });
281        });
282    });
283});
284
285$(document).on('click', '.license-docs-group__header', function (e) {
286    e.preventDefault();
287    var $header = $(this);
288    var $body = $header.closest('.license-docs-group').find('.license-docs-group__body');
289    $header.toggleClass('is-open');
290    $body.slideToggle(200);
291});

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.