PageSourceSearch

https://visa-mastercard.ru/wp-content/themes/visa-mastercard/js/main.js?ver=8c398b0f233f

js visa-mastercard.ru collected 2026-10-02 22:50:22 UTC 6,849 bytes, 243 lines download raw bytes

1var swiper = new Swiper('.swiper-recomend', {
2	slidesPerView: 4,
3	//centeredSlides: true,
4	spaceBetween: 5,
5	grabCursor: true,
6	navigation: {
7	  nextEl: '.swiper-recomend .swiper-button-next',
8	  prevEl: '.swiper-recomend .swiper-button-prev',
9	},
10	pagination: {
11	  el: '.swiper-recomend .swiper-pagination',
12	  clickable: true,
13	},
14	  breakpoints: {
15  // when window width is <= 420px
16  720: {
17	slidesPerView: 1
18  },
19  // when window width is <= 720px
20  860: {
21	slidesPerView: 2
22  },
23  // when window width is <= 860px
24  1024: {
25	slidesPerView: 3
26  }
27}
28  }); 
29
30  
31jQuery(document).ready(function ($) {
32	$('.overlay').click(function(){
33		$('.ov_cont').removeClass('active');
34		$(this).removeClass('active');
35	});
36	
37	$('.ov_click').click(function(){
38		$('.ov_cont').addClass('active');
39		$('.overlay').addClass('active');
40	});
41	$('.page img').addClass('img-fluid');
42	window.scrollMaxY = 2400;
43	
44	
45 	//плавный скролл к якорям
46 	$(".scrollto").each(function() {                                         //для каждого эл-та scrollto
47    	$(this).on('click', function () {                                    //добавить событие по клику
48
49      		var elementClick = $(this).attr("href");                         //определяем якорь нажатой ссылки
50      		var destination = $(elementClick).offset().top;                  //определяем точку конца прокрутки
51
52      		if ($(window).width() <= 420)
53      			destination -= 100
54
55      		$('html,body').animate( { scrollTop: destination - 80 }, 1000 ); //анимация прокручивания, заменить 1000 
56    	});                                                                  //       на произвольное число для изменения скорости
57  	})
58
59
60	var mySwiperOp = new Swiper('.slider_op', {
61		loop: true,
62		autoplay: {
63			delay: 4000,
64		},
65		slidesPerView: 6,
66		spaceBetween: 20,
67		breakpoints: {
68			1366: {
69				slidesPerView: 6,
70				spaceBetween: 20,
71			},
72			1280: {
73				slidesPerView: 6,
74				spaceBetween: 30,
75			},
76			1024: {
77				slidesPerView: 5,
78				spaceBetween: 30,
79			},
80			860: {
81				slidesPerView: 4,
82				spaceBetween: 30,
83			},
84			720: {
85				slidesPerView: 3,
86				spaceBetween: 30,
87			},
88			540: {
89				slidesPerView: 2,
90				spaceBetween: 10,
91			}
92		}
93	});
94});
95
96//выпадающее окно поисковой строки в хедере
97jQuery('header .btn-search').click(function(e){
98	e.preventDefault();
99    jQuery(this).closest('.top').toggleClass('active-form');           //к ближайшему родителю с классом top
100});                                                                    //       добавляем .active-form
101//закрытие строки поиска по клику на крестик в хедере
102jQuery('.search-form .close').click(function(e){
103	e.preventDefault();
104    jQuery('.top.active-form').removeClass('active-form');
105});  
106
107jQuery(function(){ 
108	jQuery('.index_load_more').click(function (e){
109		e.preventDefault();
110		
111		var el = jQuery(this);
112		if (el.data('lock') == 1)
113			return;
114		el.data('lock', 1);
115		var cont = el.closest('.blok-index');
116		var count = el.data('count'); 
117		var page = el.data('page');
118		var type = el.data('type');
119		jQuery.ajax({
120			url: '/wp-admin/admin-ajax.php',
121			method: 'POST',
122			data: { 
123				action: 'index_load_more',
124				page: page,
125				type: type
126			},
127			success: function(data){
128				var items = jQuery(data);
129				//items.hide();
130				items.insertBefore(cont);
131				//items.slideDown();
132				if (page < count){
133					el.data('page', page + 1);
134					el.data('lock', 0);
135				}
136			}
137		});
138		 
139		return false; 
140	});
141});
142
143
144jQuery(function(){ 
145	jQuery(window).scroll(function(){
146		if (jQuery(this).scrollTop() > 0)
147			jQuery('#scroller').fadeIn();
148		else
149			jQuery('#scroller').fadeOut();
150	});
151	jQuery('#scroller').click(function(){
152	jQuery('body, html').animate({scrollTop: 0}, 400);
153	return false; 
154	});
155});  
156
157
158
159
160var mySwiper = new Swiper ('.best-offers', {
161      slidesPerView: 2,
162      spaceBetween: 5,
163      navigation: {
164		nextEl: '.best-offers .swiper-button-next',
165		prevEl: '.best-offers .swiper-button-prev',
166	  },
167	    breakpoints: {
168    		992: {
169      		slidesPerView: 1
170			},
171			380: {
172				slidesPerView: 1
173			  }
174  		}
175  	});
176
177
178
179const newLocal = jQuery(document).ready(function ($) {
180	var swiper = new Swiper('.sidebar-offer', {
181		loop: true,
182		autoplay: {
183			delay: 4000,
184		},
185		pagination: {
186			el: '.sidebar-offer .swiper-pagination',
187			clickable: true,
188			renderBullet: function (index, className) {
189				return '<span class="' + className + '">&#127942;' + (index + 1) + '</span>';
190			},
191		},
192		navigation: {
193			nextEl: '.sidebar-offer .swiper-button-next',
194			prevEl: '.sidebar-offer .swiper-button-prev',
195		},
196	});
197});
198
199// всплывашка добавить в закладки
200var bookmark = document.querySelector('.bookmark')
201var timer
202document.addEventListener('DOMContentLoaded', function(){
203	if(document.cookie.indexOf('bookmarkSlide') == -1){
204    timer = setTimeout(function(){
205					document.cookie = "bookmarkSlide=1; path=/";
206          document.getElementById('modalka').style.margin = '0';
207          bookmark.classList.add('bookmark__close-2');
208			}, 4000);
209	}
210});
211
212// закрыть крестик добавить в закладки
213var bookmark__close = document.querySelector('.bookmark__close')
214var bookmark = document.querySelector('.bookmark')
215bookmark__close.addEventListener('click', function () {
216	document.getElementById('modalka').style.margin='-36px 0 0 0'
217	bookmark.classList.remove('bookmark__close-2');
218});
219
220// открыть/закрыть флажок добавить вкладки
221var bookmark__open = document.querySelector('.bookmark__open')
222var bookmark = document.querySelector('.bookmark')
223bookmark__open.addEventListener('click', function () {
224  if(bookmark.classList.contains('bookmark__close-2')){
225    clearTimeout(timer)
226		bookmark.classList.remove('bookmark__close-2');
227		document.getElementById('modalka').style.margin='-36px 0 0 0'
228  }
229  else{
230    clearTimeout(timer)
231		bookmark.classList.add('bookmark__close-2');
232		document.getElementById('modalka').style.margin='0'
233  }
234 });
235
236 let litebox = function(img){
237	let box = document.createElement('div');
238	box.setAttribute('style', 'position:fixed;top:0;left:0;height:100%;width:100%;display:flex;justify-content:center;align-items:center;background:rgba(0,0,0,0.8);cursor:pointer;z-index:101;opacity:0;transition:opacity 0.4s;');
239	box.setAttribute('onclick', 'let bl=this;bl.style.opacity=0;setTimeout(function(){bl.remove()},400);');
240	box.innerHTML = '<img src="'+img.getAttribute('src')+'" style="max-width:100%;max-height:100%;z-index:101;">';
241	document.body.appendChild(box);
242	setTimeout(function(){box.style.opacity=1},0);
243};

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.