PageSourceSearch

https://dynamo.kiev.ua/static/js/all-action.js?v=17

js dynamo.kiev.ua collected 2026-10-02 06:43:09 UTC 5,245 bytes, 209 lines download raw bytes

1$(function() {
2
3	//закрывалка-раскрывалка меню
4
5	var close_dd = function() {
6		$('.top-menu__item a').removeClass('top-menu__link_hover');
7		$('#dd-container').find('.dd-item').removeClass('dd-item_show');
8		$('body').unbind('click');
9	}
10
11	var dd_handler = function(e) {
12		var el = e.target;
13
14		if (! ($(el).attr('id') == 'dd-container' || $(el).parents('#dd-container').length || $(el).parents('li.top-menu__item').length)) {
15			close_dd();
16		}
17	}
18
19	var mobile = (/iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()));
20
21	if (mobile) {
22		$('.top-menu__item a').on('click', function() {
23			var linkid = $(this).attr('rel');
24			if (linkid) {
25				if ($(this).hasClass('top-menu__link_hover')) {
26					close_dd();
27					visib_object();
28					return false;
29				} else {
30					close_dd();
31					$('#dd-container').find(linkid).addClass('dd-item_show');
32					$(this).addClass('top-menu__link_hover');
33					hide_object();
34					$('body').click(dd_handler);
35					return false;
36				}
37			}
38		});
39	} else {
40		$('.top-menu-click .top-menu__item a').on('click', function() {
41			var linkid = $(this).attr('rel');
42			if (linkid) {
43				if ($(this).hasClass('top-menu__link_hover')) {
44					close_dd();
45					visib_object();
46					return false;
47				} else {
48					close_dd();
49					$('#dd-container').find(linkid).addClass('dd-item_show');
50					$(this).addClass('top-menu__link_hover');
51					hide_object();
52					$('body').click(dd_handler);
53					return false;
54				}
55			}
56		});
57
58		$('.top-menu-hover .top-menu__item a').mouseover(function() {
59			var linkid = $(this).attr('rel');
60			var linkthis = $(this);
61			$('.top-menu-hover .top-menu__link').unbind('click');
62			if (linkid) {
63				$('#dd-container').find(linkid).addClass('dd-item_show').hover(function(){
64					$('#dd-container').find(linkid).addClass('dd-item_show');
65					$(linkthis).addClass('top-menu__link_hover');
66				}, function() {
67					close_dd();
68				});
69				$(this).addClass('top-menu__link_hover');
70			}
71		}).mouseout(function() {
72			var linkid = $(this).attr('rel');
73			if (linkid) {
74				close_dd();
75			}
76		});
77	}
78
79	//Move topbar with scroll-x
80	var page_left;
81	var top_bar = $('.top-bar');
82
83	function scrolling() {
84		page_left = $(document).scrollLeft();
85		top_bar.css('left', - page_left + 'px');
86	};
87
88	scrolling();
89
90	$(window).bind('scroll', function() {
91		scrolling();
92	});
93	//hide and visible flash
94	function hide_object() {
95		var obj = $('object, embed');
96		obj.each(function(index){
97			var obj_status = $(this).css('visibility');
98			if ( obj_status !==  'hidden') {
99				$(this).addClass('counter' + index).css('visibility', 'hidden');
100			}
101		});
102	};
103	window.hide_object = hide_object;
104
105	function visib_object() {
106		var obj = $('object, embed');
107		obj.each(function(index){
108			if ( $(this).hasClass('counter'+ index)) {
109				$(this).css('visibility', 'visible');
110			}
111		});
112	};
113	window.visib_object = visib_object;
114
115	//google searh in top
116	var setFocus = function () {
117		var interval;
118		var index = 1;
119
120		interval = setInterval(
121			function() {
122				if (index > 10) {
123					clearInterval(interval);
124					return;
125				}
126
127				try {
128					document.getElementById('gsc-i-id1').focus();
129				} catch (e) {
130					index += 1;
131					return;
132				}
133				clearInterval(interval);
134			}, 100
135		)
136
137		try {
138			document.getElementById('gsc-i-id1').focus();
139		} catch (e) {}
140	}
141
142	var cont = $('.b-gsearch');
143	$('#gsearch-link').click(function(){
144		var link = $(this);
145		if (!link.hasClass('gsearch_ready')) {
146			$('.b-gsearch-wr').addClass('b-gsearch_show');
147			$.ajax({
148				url: "/" + link.data('language-code') + "/search/top/",
149				success: function(html){
150					cont.append(html);
151					$('.b-gsearch-preload').hide();
152					link.addClass('gsearch_ready');
153					setFocus();
154				},
155				error: function(){
156					cont.append("<div class='gsearch_error'>Ошибка загрузки поиска</div>");
157				}
158			});
159			return false;
160		} else {
161			cont.show();
162			setFocus();
163			return false;
164		}
165	});
166
167	//close search block
168	$('.gsearch_close').click(function() {
169		cont.hide();
170		return false;
171	});
172
173	try {
174		$('a[rel=popover]').popover();
175		$('a[rel=tooltip]').tooltip();
176	} catch (e) {};
177
178	$('.js-button-show, .js-button-hide').click(function (){
179		$(this).parents('.js-move-block').toggleClass('move-class');
180	});
181	$('.controll-hide-link').click(function (){
182		$(this).parents('.js-text-block').toggleClass('open');
183		return false;
184	});
185	$(document).on('click', function(e) {
186		if($(e.target).parents().hasClass('js-country')){
187			$(".js-country").toggleClass('actives');
188		} else {
189			$(".js-country").removeClass('actives');
190		}
191	});
192
193	$('.js-change-preffered-language').click(function(){
194		var preffered_language = $(this).data('language');
195		$.cookie('preffered_language', preffered_language, { expires: 365, path: '/' });
196		return true;
197	});
198});
199
200//lang
201$(document).ready(function() {
202	$('[data-js="show-lang"]').hover(
203		function() {
204			$(this).find('div').show();
205		}, function() {
206			$(this).find('div').hide();
207		}
208	);
209}); //end ready

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.