PageSourceSearch

https://www.marko-shoes.ru/local/templates/.default/js/custom.js?173702500910166

js marko-shoes.ru collected 2026-10-04 06:48:35 UTC 10,166 bytes, 387 lines download raw bytes

1(function(){
2
3	$(function () {
4
5		// $('.jstree').jstree({
6		// 	plugins: ["json_data","checkbox"],
7		// 	checkbox: {
8		// 		three_state : true, // to avoid that fact that checking a node also check others
9		// 		whole_node : true,  // to avoid checking the box just clicking the node
10		// 		tie_selection : false, // for checking without selecting and selecting without checking
11		// 		keep_selected_style : false
12		// 	},
13		// 	"core": {
14		// 		"open_parents": false,
15		// 		"load_open": true,
16		// 		'strings' : { 'Loading ...' : 'Загрузка ...' },
17		// 		"themes":{
18		// 			"icons":false,
19		// 			"dots" : false,
20		// 			"responsive" : false
21		// 		}
22		// 	}
23		// });
24
25	});
26 
27	function ValidateEmail(mail) {
28		if (/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test( mail )) {
29			return (true);
30		}
31		else {
32			return (false);
33		}
34	}
35
36    var ajaxPagerLoadingClass   = 'ajax-pager-loading',
37        ajaxPagerWrapClass      = 'ajax-pager-wrap',
38        ajaxPagerLinkClass      = 'ajax-pager-link',
39        ajaxWrapAttribute       = 'wrapper-class',
40        ajaxPagerLoadingTpl     = ['<span class="' + ajaxPagerLoadingClass + '">', 
41                                       'Загрузка…',     
42                                   '</span>'].join(''),
43        busy = false,
44 
45 
46        attachPagination = function (wrapperClass){
47            var $wrapper = $('.' + wrapperClass),
48                $window  = $(window);
49 
50            if($wrapper.length && $('.' + ajaxPagerWrapClass).length){
51                $window.on('scroll', function() {
52                    if(($window.scrollTop() + $window.height()) > 
53                        ($wrapper.offset().top + $wrapper.height()) && !busy) {
54                        busy = true;
55                        $('.' + ajaxPagerLinkClass).click();
56                    }
57                });
58            }
59        },
60 
61 
62        ajaxPagination = function (e){
63            e.preventDefault();
64 
65            busy = true;
66            var wrapperClass = $('.'+ajaxPagerLinkClass).data(ajaxWrapAttribute),
67                $wrapper = $('.' + wrapperClass),
68                $link = $(this);
69 
70            if($wrapper.length){
71                $('.' + ajaxPagerWrapClass).append(ajaxPagerLoadingTpl);
72                $.get($link.attr('href'), {'AJAX_PAGE' : 'Y'}, function(data) {
73					$wrapper.append(data);
74					if ( !$('.news-previews .ajax-pager-link').length ){
75						$('.' + ajaxPagerWrapClass).remove();
76					}
77					else {
78						$('.' + ajaxPagerWrapClass).html( $('.news-previews .ajax-pager-link')[0].outerHTML );
79					}
80					$('.news-previews .ajax-pager-link').remove();
81                    attachPagination(wrapperClass);
82                    busy = false;
83                });
84            }
85        };  
86 
87    $(function() {
88        if($('.'+ajaxPagerLinkClass).length 
89            && $('.'+ajaxPagerLinkClass).data(ajaxWrapAttribute).length){
90            attachPagination($('.'+ajaxPagerLinkClass).data(ajaxWrapAttribute));
91            $(document).on('click', '.' + ajaxPagerLinkClass, ajaxPagination);
92        }
93    });
94	
95	$('.share-aside__item.audio').on('click', function(e) {
96		e.preventDefault();
97		var audio_share = document.getElementById("corpMusic");
98		if ( $('.share-audio').is(':visible') ) {
99			$('.share-audio').hide(100, 'linear', function(){
100				audio_share.pause();
101			});
102		}
103		else {
104			$('.share-audio').show(100, 'linear', function(){
105				audio_share.play();
106			});
107			
108		}
109		return false;
110	})
111
112	$('form[name="subscribe"]').on("submit", function( event ) {
113		
114		event.preventDefault();
115
116		var _email = $('#subs').val();
117		if ( _email != '' && ValidateEmail( _email ) ) {
118		   $.ajax({
119			   type: "POST",
120			   url: $('form[name="subscribe"]').attr('action'),
121			   data: $( 'form[name="subscribe"]' ).serialize(),
122			   dataType: "json",
123			   success: function( fillter ) {
124				   console.log( fillter.error );
125				   if ( fillter.error == "N" ){
126						$('form[name="subscribe"]').addClass('form-success');
127						$('.subs-success span').html( fillter.message );
128				   }
129				   else {
130						$('form[name="subscribe"]').addClass('form-unsuccess');
131						$('.subs-success span').html( fillter.message );
132				   }
133
134			   }
135		  });
136		}
137	});
138
139	/*
140	$('.select_city').on('click', '.select__head', function () {
141		if ($(this).hasClass('open')) {
142			$(this).removeClass('open');
143			$(this).next().fadeOut();
144		} else {
145			$('.select__head').removeClass('open');
146			$('.select__list, .select__lit').fadeOut();
147			$(this).addClass('open');
148			$(this).next().fadeIn();
149		}
150	});
151	*/
152	/*
153		if(!$('.select__input').val()) {
154			console.log('false')
155		} else {
156			console.log('true')
157		}
158	*/
159	/*
160	$('.select_city').on('click', '.select__item', function () {
161		$('.select .select__item').removeClass('select__item__active');
162		$(this).addClass('select__item__active');
163	//
164		$('.select__head').removeClass('open');
165		$(this).parent().fadeOut();
166		$(this).parent().prev().text($(this).text());
167		$(this).parent().prev().prev().val($(this).text());
168	});
169	*/
170
171	$('.faq_list').on("click", '.faq_el--q a', function( event ){
172		$(this).parent().toggleClass('active').next().slideToggle( 200 );
173		event.stopPropagation();
174	});
175
176
177	$(document).click(function (e) {
178		if (!$(e.target).closest('.select').length) {
179			$('.select__head').removeClass('open');
180			$('.select__list, .select__lit').fadeOut();
181		}
182	});
183
184
185	$(window).scroll(function(){
186		
187		let scrollTop = $(this).scrollTop();
188
189		if ( scrollTop > 100) {
190			$('.scrollup').fadeIn();
191		}
192		else {
193			$('.scrollup').fadeOut();
194		}
195
196		if ( scrollTop > 220) {
197			$('.sidebar-opener-js').addClass('fixed');
198		}
199		else {
200			$('.sidebar-opener-js').removeClass('fixed');
201		}
202
203	});
204 
205	$('.scrollup').click(function(){
206		$("html, body").animate({ scrollTop: 0 }, 600);
207		return false;
208	});
209
210
211    // Фильтрация магазинов
212    $(document).on('click', '.select_country .select__item', function(e){
213        if(
214            !$(this).hasClass('select__item__active')
215        ){
216            var item = $(this);
217            var relTab = $(item).attr('rel');
218
219			$('.select_country .select__item').removeClass('select__item__active');
220			$(this).addClass('select__item__active');
221
222			$('.shop__tab').removeClass('shop__tab__current');
223			$('#'+relTab).addClass('shop__tab__current');
224
225
226			$('.select_country .select__head').text( item.text() );
227			$('.select_country .select__head').click();
228
229        }
230    });
231
232	$('.sidebar-close-js').click(function(){
233		$(".catalog__sidebar").removeClass('sidebar_fixed');
234		$("body").removeClass('css-scroll-fixed');
235		return false;
236	});
237
238	$('.sidebar-opener-js').click(function(){
239		$("body").addClass('css-scroll-fixed');
240		$(".catalog__sidebar").addClass('sidebar_fixed');
241		return false;
242	});
243
244	if ( $('.lg-gallery').length ) {
245		lightGallery(document.querySelector('.lg-gallery'), {
246			plugins: [lgZoom],
247			download: false,
248			counter: false,
249			selector: '.zoom',
250			backgroundColor: '#F00',
251			closeOnTap: true,
252			mobileSettings: { controls: true, showCloseIcon: true, download: false, closeOnTap: true }
253		});
254	}
255/*
256	if ( $('.book-btn').length ) {
257		$('.book-btn').on('click', function(e){
258			event.preventDefault();
259			Popup.open();		
260		});
261	}
262*/
263	var Popup = {};
264	Popup = {
265
266		open: function(url, title, maxwidth) {
267
268			var $popup = $('#jPopup');
269			$popup.fadeIn(200);
270
271		},
272
273		close: function() {
274
275			setTimeout(function(){
276				$('#jPopup').fadeOut(200, function(){});
277			},100)
278
279		}
280
281	};
282
283	popupEvents();
284
285	function popupEvents() {
286
287		$(document).on('click', '#jPopup .close', function(event) {
288			event.preventDefault();
289			Popup.close();
290		});
291
292		$(document).on('keyup', function(e) {
293			if (e.keyCode === 27) Popup.close();
294		});
295
296		$(document).on('click', '#jPopup', function(e) {
297			if ( $(e.target).is(".modalPopup")) {
298				Popup.close();
299			}			
300		});
301	}
302
303	if ( $('#reservationTable').length )	{
304		/*$('#reservationTable tbody tr').on( "click", function(e){
305			if (!$(e.target).closest('a').length) {
306				Popup.open();
307			}
308		})*/
309	}
310
311	$( ".footer-nav__list>li.has-drop" ).each(function( index ) {
312		_footerMenu = $( this );
313		
314		if ( index > 0 ) {
315			$('.nav__list').append(
316			'<li class="has-drop hide-1280">'+
317				'<div class="nav__tab nav__tab-js">'+
318					'<a href="'+$('a:first-child', _footerMenu).attr('href')+'"><span>'+$('.rub', _footerMenu).html()+'</span></a>'+
319					'<span class="nav__angle nav-handler-js"><i>&nbsp;</i></span>'+
320				'</div>'+
321				'<div class="nav__drop nav__drop-js nav__simple">'+
322					'<ul class="sub-nav__list">'+
323						$('ul', _footerMenu).html()+
324					'</ul>'+
325				'</div>'+
326			'</li>');
327		}
328
329	});
330
331	$(".inner-gallery").length &&
332	$(".inner-gallery").owlCarousel({
333		loop: true,
334		margin: 0,
335		nav: true,
336		autoplayHoverPause: true,
337		smartSpeed: 700,
338		autoplay: true,
339		autoplayTimeout:5000,
340		autoHeight: false,
341		navText: ['<i class="fa fa-chevron-left"></i>', '<i class="fa fa-chevron-right"></i>'],
342		responsive: { 0: { items: 1 }, 768: { items: 1 }, 1024: { items: 1 } },
343	})
344
345	$(".articles-gallery").length &&
346	$(".articles-gallery").owlCarousel({
347		loop: true,
348		margin: 0,
349		nav: true,
350		autoplayHoverPause: true,
351		smartSpeed: 700,
352		autoplay: true,
353		autoplayTimeout:5000,
354		autoHeight: false,
355		navText: ['<i class="fa fa-chevron-left"></i>', '<i class="fa fa-chevron-right"></i>'],
356		responsive: { 0: { items: 1 }, 768: { items: 1 }, 1024: { items: 1 } },
357	})
358
359	
360	var youtubeOwl = $(".youtube-carousel");
361
362	youtubeOwl.length &&
363	youtubeOwl.owlCarousel({
364		loop: true,
365		margin: 0,
366		nav: true,
367		autoplayHoverPause: true,
368		smartSpeed: 700,
369		autoplay: true,
370		autoplayTimeout:5000,
371		navText: ['<i class="fa fa-chevron-left"></i>', '<i class="fa fa-chevron-right"></i>'],
372		responsive: { 0: { items: 2 }, 768: { items: 4 }, 1024: { items: 6 } },
373		onInitialized: function(){
374			lightGallery(document.getElementById('youtube-gallery'), {
375				plugins: [lgVideo],
376				licenseKey: '0000-0000-000-0000',
377				download: false,
378				counter: false,
379				selector: 'a',
380				backgroundColor: '#F00',
381				closeOnTap: true,
382				mobileSettings: { controls: true, showCloseIcon: true, download: false, closeOnTap: true }
383			});
384		}
385	})
386
387})();

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.