') } }, Me = { timeLineSwipe: $(".timeline__ruler_wrapper.vm-swipe"), campusGallertySwipe: $(".territory__items-wrapper.vm-swipe"), continuingCardSwipe: $(".dpal__research_project.vm-swipe"), jobsSwipe: $(".jarm__table-wrapper table"), dpTable01: $(".dp__table-01"), reasonPlates: $(".trad-plates__section .plate-item__text-link").not(".go_to_link") }; function Re(e, t) { var a = t.attr("data-open") , n = t.attr("data-close"); t.on("click", (function() { var t = $(this); e.hasClass("active") ? (t.text(a), e.slideUp().removeClass("active")) : (t.text(n), e.slideDown().addClass("active")) } )) } function De(e, t) { if (e) if (t) e.parent(".vw-swipe-wrapper").length && e.css({ position: "", overflow: "", cursor: "", height: "", left: "" }).off("touchstart mousedown touchmove mousemove").unwrap(); else { var a, n, i, o, s, r, l, c = $("
", { style: "position: relative; overflow: hidden;", class: "vw-swipe-wrapper" }); e.css({ position: "absolute", overflow: "hidden" }).wrap(c), e.css({ width: e.hasClass("vm-swipe-width") ? p(e) : "" }), "ie" === navigator.browserSpecs.name.toLowerCase() && e.css({ width: e.hasClass("vm-swipe-width") ? p(e) + 10 : "" }), e.each((function() { var e = $(this); e.parent().css({ height: e.outerHeight() }) } )), e.on("touchstart mousedown", (function(e) { var t = $(this); "touchstart" === e.type && (i = e.originalEvent.changedTouches[0]); "mousedown" === e.type && (e.preventDefault(), i = e.originalEvent, t.css({ cursor: "move" }), t.on("mousemove", d), $(document).on("mouseup", (function(e) { t.off("mousemove", d).css({ cursor: "default" }) } ))); s = parseInt(t.position().left), a = i.pageX, r = t.outerWidth(), l = t.parent().outerWidth(), n = r - l } )), e.on("touchmove", d), ve({ userFunction: function() { e.each((function() { if (e.parent(".vw-swipe-wrapper").length) { var t = parseInt($(this).position().left, 10); if ($(this).parent().css({ height: $(this).outerHeight() }), t) { var a = $(this).parent().outerWidth() , n = $(this).outerWidth() , i = n - Math.abs(t) , o = a - i; o < 0 || (a >= i && a <= n ? $(this).css({ left: t + o }) : $(this).css({ left: 0 })) } } } )) } }) } else console.log("ERROR: no element for swipe"); function d(e) { var t = $(this); n <= 0 || ("touchmove" === e.type && (i = e.originalEvent.changedTouches[0]), "mousemove" === e.type && (i = e.originalEvent), o = parseInt(i.clientX) - a, t.css({ left: s + o }), parseInt(t.position().left) > 0 ? t.css("left", 0) : parseInt(t.position().left) < -n && t.css("left", -n)) } function p(e) { var t = 0; return e.children().each((function() { var e = this , a = e.getBoundingClientRect().width , n = parseInt(window.getComputedStyle(e).marginLeft, 10) , i = parseInt(window.getComputedStyle(e).marginRight, 10); t += a + n + i } )), console.log("width: ", t), t } } function Be(e) { if ($(e).length) { var t = $(e); t.each((function() { if ($(this).hasClass("el-open")) return !0; !function(e) { var t = e , a = t.children().length - 1; t.children().each((function(e) { var t = $(this); e === a ? t.addClass("el-text") : t.addClass("el-block") } )) }($(this)); var e, a, n, i, o, s = $(this), r = s.find(".el-block"), l = 0, c = s.find(".el-text"), d = c.text(), p = [], u = '
', _ = -1, h = []; r.each((function() { l += $(this).outerHeight(!0) } )), e = parseInt(c.css("margin-top"), 10) + parseInt(c.css("margin-bottom"), 10) + parseInt(c.css("padding-top"), 10) + parseInt(c.css("padding-bottom"), 10), c.height(t.outerHeight() - l - e), a = c.height(), c.html(d), p = $.trim(d).split(/\s+/), c.html('' + u + p.join(" " + u) + ""), $(".el").find("span").each((function(e, t) { var s = $(t) , r = s.position().top; o = s.height(), r === n ? h[_].push(s) : (n = r, h[_ += 1] = [s]); if (r + o > a) { if (h[_ - 1]) return i = e - h[_ - 1].length, c.css({ visibility: "visible" }), !1; c.css({ visibility: "hidden" }) } } )), null != i ? (f = i, p[f] = '
' + p[f], p.push(""), c.html(p.join(" "))) : c.html(p.join(" ")); var f } )) } } function Pe(e) { De((e = $(e)).closest(".vm-swipe"), !0), De(e.closest(".vm-swipe")) } function Oe(e) { $(e).each((function() { var e = $(this); e.find(".form-control").attr("disabled", !1), e.hasClass("active") || e.find(".form-control").attr("disabled", !0) } )) } $(".js_adapt").vmPVD({ activated: function() { window.location.reload(true); for (var e in console.log("ksksk"), $(".owl-carousel").parent().addClass("pvm-slider"), o) o[e].selector.length && o[e].PVM_activate(); $(".js_gr_scroll").length > 0 && $(".main__section .js_gr_scroll").mCustomScrollbar("destroy"), Ae.showFirstN_elements($(".main__news").find(".news__item"), 3), Ae.showFirstN_elements($(".main__events").find(".events__item"), 3), $(".vm-swipe").length && Pe($(".vm-swipe")), Me.timeLineSwipe.length && (De(Me.timeLineSwipe, "destroy"), Me.timeLineSwipe.attr("style", ""), k.trigger("refresh.owl.carousel")), Me.reasonPlates.length && Me.reasonPlates.off("click", P), Me.campusGallertySwipe.length && De(Me.campusGallertySwipe, "destroy"), Me.continuingCardSwipe.length && De(Me.continuingCardSwipe, "destroy"), Me.jobsSwipe.length && (De($(".toggleTable__wrapper.vm-swipe"), "destroy"), ge({ selector: ".jarm__table-wrapper table" }, "destroy"), ve({ userNamespace: "toggleTablesPart", off: !0 })), Me.dpTable01.length && ge(".dp__table-01", "destroy"), B.masonry("destroy"), $(".default__masonry-row").masonry("destroy"), $(".masonry__item").css({ position: "", top: "", left: "" }), "static" !== $(".grid").css("position") && ($(".grid").masonry("destroy"), $(".grid").css({ position: "", top: "", left: "" })), ie.init(), $(".rudn__default-acc").accordion("destroy"), $(".js_accordion_def").accordion("destroy"), $(".ril__acc-pub-act").accordion("destroy"), $(".jarm__acc-staff").accordion("destroy"), $(".ril__acc-pub").accordion("destroy"), $(".acc-inside-owl").accordion("destroy"), $(".education_acc.ui-accordion").length && $(".education_acc").accordion("destroy"), $(".espr-acc.ui-accordion").length && $(".espr-acc").accordion("destroy"), $(".mv .timeline__carusel ").length && k.trigger("refresh.owl.carousel"); }, deactivated: function() { for (var e in $(".owl-carousel").parent().removeClass("pvm-slider"), o) o[e].selector.length && o[e].PVM_deactivate(); $(".js_gr_scroll").length > 0 && $(".js_gr_scroll").mCustomScrollbar({ axis: "x" }), $(".vm-swipe").length && Pe($(".vm-swipe")), $(".js_accordion_def").accordion({ active: !1, heightStyle: "content", collapsible: !0 }), $(".ril__acc-pub-act").accordion({ heightStyle: "content", collapsible: !0, active: !1 }), $(".ril__acc-pub").accordion({ heightStyle: "content", collapsible: !0, active: !1 }), $(".rudn__default-acc").accordion({ heightStyle: "content", collapsible: !0, active: !1 }), $(".education_acc").accordion({ heightStyle: "content", collapsible: !0, active: !1 }), $(".jarm__acc-staff").accordion({ heightStyle: "content", collapsible: !0, active: !1, animate: !1 }), $(".acc-inside-owl").accordion({ heightStyle: "content", collapsible: !0, active: !1, animate: !1, activate: function() { k.trigger("refresh.owl.carousel") } }), $(".espr-acc").accordion({ heightStyle: "content", collapsible: !0, active: $(".espr-acc").attr("data-active-plates") ? "false" !== $(".espr-acc").attr("data-active-plates") && +$(".espr-acc").attr("data-active-plates") : 0 }), $(".mv .timeline__carusel ").length && k.trigger("refresh.owl.carousel"), Me.timeLineSwipe.length && (k.trigger("refresh.owl.carousel"), function(e) { var t = e.find(".active") , a = t.position() , n = e.parent(); if ($(".timeline__ruler_wrapper-thumb").width(t.width() / 2 + a.left), a.left + 2 * t.width() > n.width()) { var i = t.is(":last-child") ? 1 : 2 , o = a.left + t.width() * i - n.width(); e.css("left", -o) } else e.css("left", 0) }(Me.timeLineSwipe)), Me.reasonPlates.length && Me.reasonPlates.on("click", P), Me.campusGallertySwipe.length && De(Me.campusGallertySwipe), Me.continuingCardSwipe.length && De(Me.continuingCardSwipe), Me.jobsSwipe.length && ge({ selector: ".jarm__table-wrapper table", openText: $(".jarm__table-wrapper").attr("data-button-open"), closeText: $(".jarm__table-wrapper").attr("data-button-close"), wrapperClass: "" }), Me.dpTable01.length && ge({ selector: ".dp__table-01", openText: $(".dp__table-01").attr("data-dp_t-open"), closeText: $(".dp__table-01").attr("data-dp_t-close"), wrapperClass: "" }), B.masonry({ itemSelector: ".masonry__item", columnWidth: ".masonry__sizer", gutter: 15 }), $(".default__masonry-row").masonry({ itemSelector: ".default__masonry-item", columnWidth: ".default__masonry-sizer", percentPosition: !0 }), $(".grid").imagesLoaded((function() { $(".grid").masonry({ itemSelector: ".grid-item", columnWidth: ".grid-sizer", percentPosition: !0 }) } )), ie.init(); window.location.reload(true); } }), function() { var e = $(".search-button-toggle") , t = $(".ab__searchForm_wrapper"); function a(e, t) { var a = +$(e).find(".ad__item_ext-data__txt-year_date").html(); return +$(t).find(".ad__item_ext-data__txt-year_date").html() - a } function n(e, t) { var a = $(e).find(".ad__item_pesr-data__name").html().toLowerCase() , n = $(t).find(".ad__item_pesr-data__name").html().toLowerCase(); return a > n ? 1 : a < n ? -1 : void 0 } e.on("click", (function(e) { e.preventDefault(); var a = $(this); t.slideToggle((function() { a.hasClass("ab__search-txt__open") ? (a.removeClass("ab__search-txt__open"), a.find(".ab__search-txt").html(a.attr("data-open"))) : (a.addClass("ab__search-txt__open"), a.find(".ab__search-txt").html(a.attr("data-close"))) } )) } )), $(document).on("click", (function(e) { var t = $(e.target) , i = $(".ab__graduate__list").clone(); t.closest(".ab__sort-btn").length ? t.closest(".ab__sort-btn").next(".ab__sort-block").slideToggle() : t.closest(".ab__sort-block__year").length ? (i.sort(a), $(".ab__items .container").html("").append(i), t.closest(".ab__sort-block").slideUp()) : t.closest(".ab__sort-block__alph").length ? (i.sort(n), $(".ab__items .container").html("").append(i), t.closest(".ab__sort-block").slideUp()) : $(".ab__sort-block").slideUp() } )) }(), $("[class *= coop__accordion-block-]").each((function(e, t) { $(t).accordion({ heightStyle: "content", collapsible: !0, active: !1 }) } )), $("#coop__accordion-block:not(.research-partnerships)").accordion({ heightStyle: "content", collapsible: !0, active: !1 }), $(".jarm__acc-staff").accordion({ heightStyle: "content", collapsible: !0, active: !1, animate: !1 }), $(".rudn__default-acc").accordion({ heightStyle: "content", collapsible: !0, active: !1, animate: !1, beforeActivate: function(e, t) { if ($(t.newHeader[0]).hasClass("disabled")) return !1; var a = $(e.originalEvent.target).closest("a"); a.length && (e.preventDefault(), a.on("click", (function() { var e = $(this).attr("href"); window.open(e) } )), a.triggerHandler("click")) } }), $("#coop__accordion-block-1").accordion({ heightStyle: "content", collapsible: !0, active: !1 }), $(".espr-acc").accordion({ heightStyle: "content", collapsible: !0, active: $(".espr-acc").attr("data-active-plates") ? "false" !== $(".espr-acc").attr("data-active-plates") && +$(".espr-acc").attr("data-active-plates") : 0, beforeActivate: function(e, t) { t.newHeader.length && t.newHeader.addClass("acc-active") }, activate: function(e, t) { t.oldHeader.length && t.oldHeader.toggleClass("acc-active") } }), $(".espr-acc").find(".ui-accordion-header-active").addClass("acc-active"), $(".aeca__maps-acc").accordion({ heightStyle: "content", collapsible: !1, active: 0, animate: !1 }), $(".hdd-bio__date_btn-wrapper a").on("click", (function(e) { e.preventDefault(); var t = $(this); t.toggleClass("bio-open"), t.hasClass("bio-open") ? ($e = t.text(), t.text(t.attr("data-close"))) : t.text($e), t.closest(".hdd-bio").find(".hdd-bio__date-undercut-wrapper").slideToggle() } )), Re($(".fsmi-gallery-undercut-logo-0 .fsmi-gallery-row"), $(".js__fsmi-all-logo-0")), Re($(".fsmi-gallery-undercut-logo-1 .fsmi-gallery-row"), $(".js__fsmi-all-logo-1")), $(".show-all-video").on("click", (function(e) { $(this).toggleClass("show-all-video-open"), $(this).hasClass("show-all-video-open") ? $(this).text("Свернуть") : $(this).text("Смотреть все записи"), $(this).closest(".conf-det__video_full-width__wrapper").find(".other-video").slideToggle() } )), $(window).on("load", (function() { function e() { var e = $(window).width(); e < 1185 && e > 560 ? Pe($(".territory__items-wrapper.vm-swipe")) : De($(".territory__items-wrapper.vm-swipe"), !0) } De($(".vm-swipe")), $(".lae").length && (e(), ve({ userFunction: e })) } )), $(".el-wrapper").length && (setTimeout((function() { Be(".el-wrapper"), ve({ userFunction: Be }, ".el-wrapper") } ), 50), $(".dpal__title").on("click", (function() { var e = $(this) , t = e.closest(".el-wrapper"); t.find(".el-last-str").length && (t.hasClass("el-open") ? (t.removeClass("el-open").css({ height: "400px" }), Be(t), Pe(e)) : (t.addClass("el-open").css({ height: "auto" }).find(".el-text").css({ height: "auto" }).find(".el-last-str").css({ "white-space": "normal", "text-overflow": "" }), Pe(e))) } )), ve({ userFunction: Pe }, ".dpal__title")), $(".lae").length && $(".js-more").on("click", (function(e) { e.preventDefault(); var t = $(this) , a = t.data("page") + 1; $.ajax({ type: "POST", dataType: "json", url: "/api/v1/life/annual-events", data: { action: "getAjaxAnnualEvents", p: a }, beforeSend: function() {}, complete: function() {}, success: function(e) { $(".js-more").data("page", a), e.empty && t.hide(); for (var n = $(".territory__wrapper"), i = 0, o = e.list.length; i < o; i++) n.append(e.list[i]), Pe($(".territory__wrapper .vm-swipe").last()) } }) } )), $(".lcun").length && $(".js-more__culture").on("click", (function(e) { e.preventDefault(); var t = $(this) , a = t.data("page") + 1; $.ajax({ type: "POST", dataType: "json", url: window.location.href, data: { action: "getAjaxCulture", p: a }, beforeSend: function() {}, complete: function() {}, success: function(e) { $(".js-more").data("page", a), e.empty && t.hide(); for (var n = $(".territory__wrapper"), i = 0, o = e.list.length; i < o; i++) n.append(e.list[i]), Pe($(".territory__wrapper .vm-swipe").last()) } }) } )), $((function() { $(".js__quam-toggle-under").length && $(".js__quam-toggle-under").each((function() { var t = $(this) , a = t.next(".js__quam-toggle-button-wrapper") , n = a.find(".js__quam-toggle-button"); t.hide(), a.show(), n.on("click", e) } )); function e() { var e = $(this) , t = e.attr("data-open") , a = e.attr("data-close"); thisUnder = e.closest(".js__quam-toggle").find(".js__quam-toggle-under"), thisUnder.hasClass("active") ? (thisUnder.slideUp().removeClass("active"), e.text(t)) : (thisUnder.slideDown().addClass("active"), e.text(a)) } } )), ve({ userFunction: function() { $(window).width() > 560 && $(".olympd__card-content").each((function() { var e = $(this); $(this).hasClass("active") ? e.css({ display: "block" }) : e.css({ display: "" }) } )) } }), $(".olympd__card-header").on("click", (function() { var e = $(this) , t = e.closest(".row__card-header").next(".olympd__card-content") , a = document.documentElement.clientWidth , n = t.find(".vm-swipe") , i = e.hasClass("active"); a > 560 || ($(".olympd__card-content").removeClass("active").slideUp(), $(".olympd__card-header").removeClass("active"), i || (t.toggleClass("active").slideToggle(), e.toggleClass("active"), Pe(n))) } )), $(".jarf .nav-tabs").on("click", "li", (function() { setTimeout((function() { Oe(".jarf .tab-pane") } ), 10) } )), Oe(".jarf .tab-pane"), we = ".js__toggle_block", be = 330, (we = $(we)).each((function() { var e = $(this) , t = e.attr("data-button-open-name") || "Open" , a = e.attr("data-button-close-name") || "Close" , n = e.attr("data-button-class-name"); e.children().length && (e.after('
' + t + ""), be && $(".js__toggle_block-wrapper").length && (e.css({ display: "block", overflow: "hidden" }), $(".js__toggle_block-wrapper").height() > be ? e.height(be) : e.height($(".js__toggle_block-wrapper").height())), e.next(".js__toggle_block-link").addClass(n).on("click", (function() { var e = $(this); $(".js__toggle_block-wrapper").length && be && $(".js__toggle_block-wrapper").height() > be ? (e.hasClass("active") ? e.prev(".js__toggle_block").animate({ height: be }, 400) : e.prev(".js__toggle_block").css({ height: "auto" }), e.toggleClass("active").prev(".js__toggle_block").toggleClass("active")) : e.toggleClass("active").prev(".js__toggle_block").toggleClass("active").slideToggle(), e.prev(".js__toggle_block").hasClass("active") ? e.text(a) : e.text(t) } ))) } )), function() { var e = $(".js__eqp-docs-block") , t = $(".js__eqp-docs-button") , a = t.attr("data-open") , n = t.attr("data-close"); e.hide(), t.on("click", (function() { var e = $(this) , t = e.closest(".eqp__docs-wrapper").find(".js__eqp-docs-block"); t.hasClass("active") ? (t.removeClass("active").slideUp(), e.text(a)) : (t.addClass("active").slideDown(), e.text(n)) } )) }(), $(".freshman").length && function() { var e = $(".research-area__carousel") , t = $(".under-cut") , a = $(".js__freshman__open-link"); t.hide(), a.on("click", (function(t) { t.preventDefault(); var a = $(this) , n = a.closest(".card__text").find(".under-cut"); n.hasClass("active") ? (n.hide().removeClass("active"), a.html(a.attr("data-open"))) : (n.show().addClass("active"), a.html(a.attr("data-close"))), e.trigger("refresh.owl.carousel") } )), o.research.selector.owlCarousel(o.research.options), o.research.selector.owlCarousel().on("translated.owl.carousel", (function(e) { setTimeout((function() { $(".owl-stage-outer").height($(".owl-item.active").outerHeight()) } ), 1e3) } )) }(), $(".inner-carusel-wrapper").on("mousedown touchstart", (function(e) { e.stopPropagation(), console.log("mousedown touchstart") } )), v.owlCarousel({ margin: 0, dots: !0, dotsContainer: ".rudn__owl-dots-video", responsive: { 0: { items: 1 } } }), w.owlCarousel({ margin: 0, dots: !0, dotsContainer: ".rudn__owl-dots-photo", responsive: { 0: { items: 1 } } }), $(".js__btn-valid").on("click", (function() { var e = $(this) , t = e.closest(".row__page") , a = e.closest(".row__page").next(".row__page") , n = e.closest(".mc__form"); rudnForm.validateForm(t) && ("yes" !== t.attr("data-checkboxes") || t.find("[type=checkbox]:checked").length >= 3 ? (a.next(".row__page").length || ($(".js__thanks-show").show(), $(".js__thanks-hide").hide(), $(".js__thanks-white-bg").addClass("bg-white")), a.length ? (t.removeClass("active"), a.addClass("active"), $(window).scrollTop(0)) : (e.attr("disabled", !0), rudnForm.disabledEmpty(n), console.log(n.serialize()), n.submit())) : alert("Укажите 3 способа/инструмента продвижения ценностей")) } )), function() { var e = $(".btn-back"); if (e.length) { var t = $(".crumbs__item") , a = t.length; $(t.get().reverse()).each((function(t) { var n = $(this); if (n.children(".circle-item").length) return e.text(n.children().text()).attr("href", n.children().attr("href")), !1; a - 1 === t && e.text("Главная").attr("href", "/") } )) } }(), $(".photo__grid").length > 0 && $(".photo__grid").mCustomScrollbar({ axis: "x" }), $(".js_gr_scroll").length > 0 && $(".js_gr_scroll").mCustomScrollbar({ axis: "x" }), rudnAnalytics.setAnalytics($("[data-analytics=true]")), (ye = ["iPhone", "iPod", "iPad", "iPhone Simulator", "iPod Simulator", "iPad Simulator", "Macintosh", "MacIntel", "MacPPC", "Mac68K", "Pike v7.6 release 92", "Pike v7.8 release 517"], { isIOS_Mobile: function() { var e = !1; return ye.forEach((function(t) { t === navigator.platform && "Safari" === navigator.browserSpecs.name && (e = !0) } )), e } }).isIOS_Mobile() && ($("body").addClass("ios-mobile-body"), $("html").css("min-width", "100%")), function() { function e(e, t) { var a = 0; t.each((function() { var e = $(this); e.height() > 0 && (a = e.height()) } )), e.css("min-height", a + 70) } e($(".aeca__maps .aeca__maps-acc"), $(".aeca__maps .maps-acc__img")), e($(".scheme__wrapper"), $(".scheme__wrapper .maps-acc__img")), ve({ userFunction: e, userNamespace: "aeca" }, $(".aeca__maps .aeca__maps-acc"), $(".aeca__maps .maps-acc__img")), ve({ userFunction: e, userNamespace: "aeca" }, $(".scheme__wrapper"), $(".scheme__wrapper .maps-acc__img")) }(), (Ce = $(".js__event-tooltip")).length && (Ce.on("click", (function(e) { e.preventDefault() } )), Ce.tooltipster({ maxWidth: 422, side: ["bottom", "right", "top", "left"], theme: "custom-tooltip-theme", interactive: !0 })), (xe = $(".js__students-assoc-banner-slider")).length && xe.owlCarousel({ items: 1, dots: !0, autoHeight: !0 }), (ke = $(".js__scroll-slider-wrapper")).length && ke.each((function(e, t) { var a, n = $(t); n.find(".js__scroll-slider").mCustomScrollbar({ axis: "x", callbacks: { onInit: function() { a = function(e) { var t = e , a = t.find(".js__scroll-slider") , n = t.find(".js__scroll-slider--prev") , i = t.find(".js__scroll-slider--next") , o = t.find(".js__scroll-slider--current") , s = t.find(".js__scroll-slider--total") , r = t.width() , l = a.find(".mCSB_container").prop("scrollWidth") , c = Math.round(l / r) , d = 0; return { init: p, update: _ }; function p() { o.text(d + 1), s.text(c), n.on("click", (function(e) { e.preventDefault(), u("prev"), _() } )), i.on("click", (function(e) { e.preventDefault(), u("next"), _() } )) } function u(e) { if ("prev" === e) { if (0 === d) return; d-- } else if ("next" === e) { if (d + 1 === c) return; d++ } a.mCustomScrollbar("scrollTo", r * d) } function _(e) { var t = o.text(); "number" == typeof e && (0 === e ? d = 0 : (console.log(e), d = Math.floor(l / e))), d + 1 + "" !== t && o.text(d + 1) } }(n), a.init() }, whileScrolling: function() { this.mcs.left } } }) } )), $(".accordion").accordion({ active: 0, heightStyle: "content", collapsible: !0 }), $(".js_accordion_def").accordion({ active: !1, heightStyle: "content", collapsible: !0 }), $(".js_accordion_fresh").accordion({ collapsible: !0, active: !1, heightStyle: "content", activate: function() { var e = $(this).parents(".owl-item").height(); $(this).parents(".owl-stage-outer").css("height", e), $(this).parents(".owl-carousel").trigger("refresh.owl.carousel") } }), Se = $(".js_scroll_achievements"), je = +Se.attr("data-max"), Te = !0, $(window).scroll((function() { if (Se.length && Te && $(window).scrollTop() >= $(document).height() - $(window).height() - $(".footer__main").height()) { Te = !1; var e = +Se.attr("data-page"); e < je && $.ajax({ url: "/api/v1/about/achievements/list?p=" + e, method: "POST", data: "action=getAjaxList", success: function(t) { $msg = JSON.parse(t), $(".js_achievements_list").append($msg.view), $msg.count > 0 ? (Te = !0, Se.attr("data-page", parseInt(e) + 1)) : Te = !1 } }) } } )), $("body").on("click", ".give_me_more_list", (function() { var e = $('.administration__item[data-id="' + $(this).attr("data-id") + '"]') , t = $('.administration__item-sub[data-id="' + $(this).attr("data-id") + '"]'); e.hasClass("active") ? e.removeClass("active") : (e.addClass("active"), t.length || $.ajax({ url: "/api/v1" + window.location.pathname, method: "POST", data: "department_id=" + $(this).attr("data-id") + "&action=getDepartmentChildsList", success: function(e) { msg = e.data, 0 == msg.id || $('.administration__item-sub[data-id="' + msg.id + '"]').length || $('.administration__item[data-id="' + msg.id + '"]').after(msg.view) } })) } )), $(".js_getNextProgramm").on("click", (function() { var e, t = $(this), a = t.parents(".tab-pane").find(".js-program-loader"), n = t.attr("data-mode_of_study"), i = $(".js_mode_of_study_" + n), o = t.attr("data-page"), s = parseInt(o) + 1; t.addClass("hidden"), a.append('
'), $.ajax({ url: "/api/v1" + window.location.pathname + window.location.search, type: "POST", data: "action=getNextPrograms&mode_of_study=" + n + "&page=" + o, success: function(o) { e = JSON.parse(o), t.removeClass("hidden"), a.find(".preload-js").remove(), t.attr("data-page", s), $.each(e.directions, (function(e, t) { 0 === $('td[data-name="' + t.name + '"][data-mode_of_study=' + n + "]").length && i.append(t.direction), i.append(t.programs) } )), 0 === e.next && t.remove() } }) } )), Ne = $(".ril__acc-pub"), $(Ne).each((function(e, t) { var a = $(t).find("h3"); $(a).each((function(e, t) { e > 1 && $(t).addClass("toggle-panel hide-panel") } )) } )), $(".js__show-more").click((function() { var e, t = $(this).closest(".rid__text"), a = $(t).find(".toggle-panel"); $(a).each((function(e, t) { $(t).toggleClass("hide-panel") } )), e = $(this).text(), $(this).text($(this).data("title")), $(this).data("title", e) } )), $(".js_tags").select2({ placeholder: $(this).data("placeholder"), tags: !0 }), $(".toggle-list__item-header").click((function() { let e = $(this); const t = e.closest(".toggle-list__item") , a = $(t).find(".toggle-list__item-text"); "none" == a.css("display") ? (e.addClass("open-item"), a.slideDown()) : (e.removeClass("open-item"), a.slideUp()) } )) } )), function() { let e = []; $(".toggler").click((function() { if ($(this).prev(".dropdown-text").toggleClass("open"), $(this).prev(".dropdown-text").hasClass("open")) { let t = $(this).prev(".dropdown-text").attr("data-id"); $(this).prev(".dropdown-text").css("max-height", e[t]), $(this).html("Свернуть") } else $(this).html("Развернуть"), $(this).prev(".dropdown-text").css("max-height", "") } )), $(window).on("load resize", (function() { $(".dropdown-text").each((function(t) { let a = this.scrollHeight; $(this).attr("data-id", t), e[t] = a + "px" } )) } )) }(), $("#js-show-more-button").click((e => { let t = $("#js-hidden-text"); "none" == t.css("display") || "hidden" == t.css("visibility") ? (t.slideToggle(), $("#js-show-more-button").text("Свернуть")) : "block" == t.css("display") && (t.slideToggle(), $("#js-show-more-button").text("Показать больше")) } )), document.addEventListener("DOMContentLoaded", (function() { setTimeout((function() { var e; if ("IntersectionObserver"in window) { e = document.querySelectorAll(".lazy"); var t = new IntersectionObserver((function(e, a) { e.forEach((function(e) { if (e.isIntersecting) { var a = e.target; "IMG" === a.tagName ? a.src = a.dataset.src : void 0 !== a.dataset.src && (a.style.backgroundImage = "url(" + function(e) { let t, a, n = e.split(",").map((e => e.trim().replace("url('", "").replace("')", "").split(" ").filter((e => !!e)))); return 1 === n.length ? t = n[0][0] : (a = n.filter((e => 1 * e[1].replace("w", "") >= window.innerWidth)), t = 0 === a.length ? n[0][0] : a[a.length - 1][0]), t }(a.dataset.src) + ")"), a.classList.remove("lazy"), t.unobserve(a) } } )) } )); e.forEach((function(e) { t.observe(e) } )) } else { var a; function n() { a && clearTimeout(a), a = setTimeout((function() { var t = window.pageYOffset; e.forEach((function(e) { e.offsetTop < window.innerHeight + t && ("IMG" === e.tagName ? e.src = e.dataset.src : e.style.backgroundImage = e.dataset.src, e.classList.remove("lazy")) } )), 0 == e.length && (document.removeEventListener("scroll", n), window.removeEventListener("resize", n), window.removeEventListener("orientationChange", n)) } ), 20) } e = document.querySelectorAll(".lazy"), document.addEventListener("scroll", n), window.addEventListener("resize", n), window.addEventListener("orientationChange", n) } } ), 20) } )), 0 !== $(".slider--reviews-content").length) { var sliderOwl = $(".slider--reviews-content"); function carouselInitialized() { sliderOwl.addClass("owl-carousel"), console.log("установлен") } sliderOwl.owlCarousel({ items: 1, margin: 10, autoHeight: !0, nav: !0, dots: !1, navText: [], onInitialized: carouselInitialized }) } $(".give_me_more_departments").on("click", (function(e) { e.preventDefault(), page = String($(this).attr("data-page")), id = $(this).attr("data-id"), $.ajax({ url: "/api/v1/education/schools-and-departments/faculties", method: "POST", data: "page=" + page + "&institute=" + String($(this).attr("data-institute")) + "&action=giveNextDepartment", success: function(e) { $msg = e.data, $msg.page ? $(".give_me_more_departments").attr("data-page", String($(".give_me_more_departments").attr("data-page")) + 1) : $(".give_me_more_departments").remove(), $msg.view ? ($(".push_ajax_here").append($msg.view), $("#coop__accordion-block").accordion("refresh")) : $(".give_me_more_departments").remove() } }) } )), $("#onlineReg .js_phone").inputmask("+7 (999) 999 99 99"); class Iframe { constructor(e) { const t = document.querySelectorAll(e); if (t.length > 0) { let e = []; t.forEach((t => { e.push(t.src), t.src = "" } )), window.addEventListener("load", ( () => { let a = 0; t.forEach((t => { t.src = e[a], a++ } )) } )) } } } new Iframe("iframe"); var cookieModule = function() { function e() { return window.location.hostname.replace(/^(www\.)*([a-zA-Z0-9][-_a-zA-Z0-9.]+)+$/, "$1,$2").split(",") } return { get: function(t) { e()[0] && (t = "www" + t); var a = document.cookie.match(new RegExp("(?:^|; )" + t.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, "\\$1") + "=([^;]*)")); return a ? decodeURIComponent(a[1]) : void 0 }, set: function(t, a) { var n, i = "expires=" + new Date((new Date).setFullYear((new Date).getFullYear() + 100)).toUTCString() + ";", o = "path=/;"; n = e()[0] ? "www" + t + "=" + a + "; " + i + " " + o + " " + ("domain=" + e()[0] + e()[1] + ";") : t + "=" + a + "; " + i + " " + o + " " + ("domain=." + e()[1] + ";"), document.cookie = n }, del: function(t) { var a, n = "expires=" + new Date(0).toUTCString() + ";", i = "path=/;"; e()[0] ? (a = "domain=" + e()[0] + e()[1] + ";", document.cookie = "www" + t + "=;" + n + " " + i + " " + a) : (a = "domain=." + e()[1] + ";", document.cookie = t + "=;" + n + " " + i + " " + a) } } }(); function checkCommercialInputs(e, t, a) { var n = 0; return void 0 === t && (t = ".required"), void 0 === e && (e = document), $(e).find(t).each((function() { var e = checkCommercialFieldContent($(this)); void 0 === a && setCommercialReaction(this, e), e || (n = 1) } )), n } function setCommercialReaction(e, t) { var a, n = $(e); if ($attr = n.attr("data-name"), "undefined" != typeof $attr) { switch ($attr) { case "select": a = n.closest(".jqselect.query-form-select"); break; case "group_cheсk": a = $('input[data-name="group_check"]'); break; case "captcha": a = n.find("iframe"); break; default: a = n.closest(".query-form-input") } return t ? ($(a).removeClass("query-error"), n.removeClass("query-error"), n.parent().removeClass("has-error"), !0) : ($(a).addClass("query-error"), n.addClass("query-error"), n.parent().addClass("has-error"), !1) } return !0 } function checkCommercialFieldContent(e) { var t = e.val() , a = !0; switch (e.attr("data-name")) { case "phone": /^((\+7)[\- ]?)?(\(?\d{3}\)?[\- ]?)?[\d\- ]{7,10}$/.test(t) || (a = !1); break; case "email": /^([a-z0-9_\.-])+@[a-z0-9-]+\.([a-z]{2,4}\.)?[a-z]{2,4}$/i.test(t) || (a = !1); break; case "name": case "lastname": case "address": value = t.replace(/[\s]+/g, ""), 0 == value.length && (a = !1); break; case "index": value = t.replace(/[\d\w]/, ""), 0 == value.length && (a = !1); break; case "captcha": grecaptcha.getResponse().length || (a = !1) } return a } function initPercentData(e) { var t = 0 , a = new Object; for (var n in e) t += e[n]; for (var n in e) a[n] = new Object, a[n].pi = e[n], a[n].pr = parseFloat((e[n] / t * 100).toFixed(1)); return a } $((function() { $('input[name="checkbox-send"]').removeAttr("checked"), $("#form__tel").inputmask("+7 (999) 999-99-99"); var e = 0; $(document).on("change, blur", 'input[type="text"]', (function() { e && checkCommercialInputs("#form__dialog") } )), $(document).on("change", "select", (function() { e && checkCommercialInputs("#form__dialog") } )), $(document).on("change", 'input[type="checkbox"]', (function() { e && checkCommercialInputs("#form__dialog") } )), $(document).on("change", 'input[type="email"]', (function() { e && checkCommercialInputs("#form__dialog") } )), $(document).on("click", "#btn_submit", (function(t) { if (t.preventDefault(), checkCommercialInputs("#form__dialog")) { var a = $("#form__dialog").find(".query-error")[0]; $("html, body").animate({ scrollTop: $(a).offset().top - 220 }, 500), e = 1 } else if (!$('input[name="checkbox-send"]').prop("checked") && "" === $('input[name="text-send"]').val()) { var n = new FormData($("#form__dialog")[0]); n.append("action", "saveRequest"), n.append("g-recaptcha-response", grecaptcha.getResponse()); var i = $(t.target); i.prop("disabled", !0).text(i.attr("data-loading-text")), $.ajax({ url: "/api/v1" + window.location.pathname, data: n, processData: !1, contentType: !1, type: "POST", dataType: "JSON", success: function(e) { if (i.prop("disabled", !1).text(i.attr("data-button-text")), 1 === e.data.success) { grecaptcha.reset(), $("#form__dialog")[0].reset(), $("#form__dialog").find(".file__loading").remove(), $("#add-file").wrap("