PageSourceSearch

https://obedofficemoscow.ru/js/my.js?v=1790898238

js obedofficemoscow.ru collected 2026-10-01 23:44:14 UTC 22,704 bytes, 707 lines download raw bytes

1(function(){var b,f;b=this.jQuery||window.jQuery;f=b(window);b.fn.stick_in_parent=function(d){var A,w,J,n,B,K,p,q,k,E,t;null==d&&(d={});t=d.sticky_class;B=d.inner_scrolling;E=d.recalc_every;k=d.parent;q=d.offset_top;p=d.spacer;w=d.bottoming;null==q&&(q=0);null==k&&(k=void 0);null==B&&(B=!0);null==t&&(t="is_stuck");A=b(document);null==w&&(w=!0);J=function(a,d,n,C,F,u,r,G){var v,H,m,D,I,c,g,x,y,z,h,l;if(!a.data("sticky_kit")){a.data("sticky_kit",!0);I=A.height();g=a.parent();null!=k&&(g=g.closest(k));
2if(!g.length)throw"failed to find stick parent";v=m=!1;(h=null!=p?p&&a.closest(p):b("<div />"))&&h.css("position",a.css("position"));x=function(){var c,f,e;if(!G&&(I=A.height(),c=parseInt(g.css("border-top-width"),10),f=parseInt(g.css("padding-top"),10),d=parseInt(g.css("padding-bottom"),10),n=g.offset().top+c+f,C=g.height(),m&&(v=m=!1,null==p&&(a.insertAfter(h),h.detach()),a.css({position:"",top:"",width:"",bottom:""}).removeClass(t),e=!0),F=a.offset().top-(parseInt(a.css("margin-top"),10)||0)-q,
3u=a.outerHeight(!0),r=a.css("float"),h&&h.css({width:a.outerWidth(!0),height:u,display:a.css("display"),"vertical-align":a.css("vertical-align"),"float":r}),e))return l()};x();if(u!==C)return D=void 0,c=q,z=E,l=function(){var b,l,e,k;if(!G&&(e=!1,null!=z&&(--z,0>=z&&(z=E,x(),e=!0)),e||A.height()===I||x(),e=f.scrollTop(),null!=D&&(l=e-D),D=e,m?(w&&(k=e+u+c>C+n,v&&!k&&(v=!1,a.css({position:"fixed",bottom:"",top:c}).trigger("sticky_kit:unbottom"))),e<F&&(m=!1,c=q,null==p&&("left"!==r&&"right"!==r||a.insertAfter(h),
4h.detach()),b={position:"",width:"",top:""},a.css(b).removeClass(t).trigger("sticky_kit:unstick")),B&&(b=f.height(),u+q>b&&!v&&(c-=l,c=Math.max(b-u,c),c=Math.min(q,c),m&&a.css({top:c+"px"})))):e>F&&(m=!0,b={position:"fixed",top:c},b.width="border-box"===a.css("box-sizing")?a.outerWidth()+"px":a.width()+"px",a.css(b).addClass(t),null==p&&(a.after(h),"left"!==r&&"right"!==r||h.append(a)),a.trigger("sticky_kit:stick")),m&&w&&(null==k&&(k=e+u+c>C+n),!v&&k)))return v=!0,"static"===g.css("position")&&g.css({position:"relative"}),
5a.css({position:"absolute",bottom:d,top:"auto"}).trigger("sticky_kit:bottom")},y=function(){x();return l()},H=function(){G=!0;f.off("touchmove",l);f.off("scroll",l);f.off("resize",y);b(document.body).off("sticky_kit:recalc",y);a.off("sticky_kit:detach",H);a.removeData("sticky_kit");a.css({position:"",bottom:"",top:"",width:""});g.position("position","");if(m)return null==p&&("left"!==r&&"right"!==r||a.insertAfter(h),h.remove()),a.removeClass(t)},f.on("touchmove",l),f.on("scroll",l),f.on("resize",
6y),b(document.body).on("sticky_kit:recalc",y),a.on("sticky_kit:detach",H),setTimeout(l,0)}};n=0;for(K=this.length;n<K;n++)d=this[n],J(b(d));return this}}).call(this);
7
8jQuery.validator.addMethod("usPhoneFormat", function(value, element) {
9return this.optional(element) || /\d{1}[\(]\d{3}[\)]\d{3}[\-]\d{2}[\-]\d{2}/.test(value);
10}, "Enter a valid phone number.");
11
12
13function getCookie(name) {
14  let matches = document.cookie.match(new RegExp(
15    "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
16  ));
17  return matches ? decodeURIComponent(matches[1]) : 'no';
18}
19
20function setCookie( name, value, exp_y, exp_m, exp_d, path, domain, secure ){
21  var cookie_string = name + "=" + escape ( value );
22  if ( exp_y ){
23    var expires = new Date ( exp_y, exp_m, exp_d );
24    cookie_string += "; expires=" + expires.toGMTString();
25  }
26  if ( path )cookie_string += "; path=" + escape ( path );
27  if ( domain )cookie_string += "; domain=" + escape ( domain );
28  if ( secure )cookie_string += "; secure";
29  document.cookie = cookie_string;
30}
31
32
33
34
35
36$(window).load(function(){
37    if($('.cat_list_wrp').length > 0 && $(window).width() > 991) {
38        $(".cat_list_wrp").stick_in_parent({
39            offset_top: 30
40        });
41    }
42    if($('.cat_over_in').length > 0 && $(window).width() > 991) {
43        $(".cat_over_in").stick_in_parent({
44            offset_top: 30
45        });
46    }
47    if($('.fixed_menu_wrp').length > 0 && $(window).width() > 1190) {
48        $(".fixed_menu_wrp").stick_in_parent({
49            offset_top: 0
50        });
51    }
52    
53    
54
55    $(document).ready(function() {
56		$('body').on('click', '.cat_list_wrp a', function(e) {
57				e.preventDefault();
58				var target = $(this).attr("href");
59				var totop = Number($(target).offset().top) - 100;
60				$('html, body').stop().animate({
61					scrollTop: totop
62				}, 600);
63					
64				return false;
65		});
66	});
67
68	$(window).scroll(function() {
69		var scrollDistance = $(window).scrollTop();
70		$('.cat_wrp_menu').each(function(i) {
71				if ($(this).position().top <= (scrollDistance - 400)) {
72					$('.cat_list_wrp ul a.active').removeClass('active');
73					$('.cat_list_wrp ul a').eq(i).addClass('active');
74				}
75			});
76	}).scroll();
77		
78		
79})
80
81
82
83
84
85	
86	
87	
88	
89
90$(document).ready(function() {
91	
92
93	
94	
95	
96	
97	
98	
99	
100		$("input[name='phone']").mask("0(000)000-00-00");
101			$('.main_slider_carousel').owlCarousel({
102			loop:true,
103			margin:10,
104			nav:true,
105			navText:['',''],
106			dots:true,
107			responsive:{
108				0:{
109					items:1
110				},
111				600:{
112					items:1
113				},
114				1000:{
115					items:1
116				}
117			}
118		}).find('.owl-nav, .owl-dots').wrapAll("<div class='owl-controls-parent'></div>").wrapAll("<div class='owl-controls'></div>");
119			
120			
121	
122	
123	$('body').on('click', '.opennav', function(e) {
124        $('.mobnavigation').slideToggle(300)
125    })
126	
127	
128	$('body').on('click', '.arrtotop', function(e) {
129		$('html, body').stop().animate({scrollTop: 0}, 600);
130    })
131
132	
133	
134	
135	
136
137	
138	
139	
140	
141	
142	//Удаление даты при оформлении заказа
143	$('body').on('click', '.date_del', function(e) {
144		var t = $(this),
145		date = t.closest('.checkout_item_parent').attr('data-date'),
146		dateConf = t.closest('.checkout_item_parent').find('.checkout_header p').text();
147		if(t.closest('.checkout_item_parent').hasClass('disabled_parent')){
148			$.get(location.href+'?zakaz=del&date='+date,function(data){
149				$('.allcheckout').html($(data).find('.allcheckout').html());
150			})
151		} else {
152			if(confirm('Удалить заказ на '+ dateConf +' ?')){
153				$.get(location.href+'?zakaz=del&date='+date ,function(data){
154					$('.allcheckout').html($(data).find('.allcheckout').html());
155				})
156			}
157		}
158	});
159	
160	
161	
162
163	
164    $('body').on('click', '.check_wrp', function(){
165        $('.check_wrp').removeClass('checked');
166        $(this).addClass('checked');
167		setCookie("oplata",$(this).attr('data-id'));
168    })
169	
170	
171	$('body').on('keyup', '.checkout_wrp textarea', function(){
172        setCookie("textarea",$(this).val());
173    })
174	
175	
176	
177	
178	
179    $('body').on('click', '.toggle_inner', function(){
180        $(this).toggleClass('clicked');
181        $(this).closest('.lk_elem_item').find('.lk_elem_body').slideToggle(300);
182    })
183    
184
185    $('body').on('click', '.shop_cart_but', function(e){
186        e.preventDefault();
187        $(this).closest('.menu_cart_wrp').find('.cat_inner_wrp').slideToggle(300)
188    })
189    
190	//переключение дней недели
191    $('body').on('click', '.tabs_dates_wrp:not(.main_page) a:not(.disabled_date),.tab_dates_wrp:not(.main_page) a:not(.disabled_date)', function(e){
192        e.preventDefault();
193
194	if ($(this).hasClass('disabled'))
195		return;
196
197        var t = $(this),
198		href = t.attr('href');
199		$('.load_overlay').show();
200		$.get(href,function(data){
201			$('.cat_list_wrp').html($(data).find('.cat_list_wrp').html());
202			$('.catalog_content').html($(data).find('.catalog_content').html());
203			$('.tabs_dates_wrp').html($(data).find('.tabs_dates_wrp').html());
204			$('.fixed_menu_parent').html($(data).find('.fixed_menu_parent').html());
205			$('.shop_cart_wrp.menu_cart_wrp').html($(data).find('.shop_cart_wrp.menu_cart_wrp').html());
206			let title = data.match(/<title>(.*?)<\/title>/);
207			document.title = title[1];
208			$('.load_overlay').hide();
209			$('.cat_list_wrp li:first-child a').click();
210		})	
211		history.pushState('', '', href);
212    })
213	
214	
215	//Переключение дней
216    $('body').on('click', '.cat_dates a', function(){
217		var t = $(this),
218		href = t.attr('data-href');
219		if(!t.closest('li').hasClass('disableddate')){
220			$('.shop_cart_but b').text(t.attr('data-date'));
221			$('.load_overlay').show();
222			$.get(href,function(data){
223				$('.catalog_content').html($(data).find('.catalog_content').html());
224				$('.tabs_dates_wrp').html($(data).find('.tabs_dates_wrp').html());
225				$('.fixed_menu_parent').html($(data).find('.fixed_menu_parent').html());
226				$('.cat_list_wrp').html($(data).find('.cat_list_wrp').html());
227				$('.cat_count').html($(data).find('.cat_count').html());
228				$('.cat_price').html($(data).find('.cat_price').html());
229				$('.cat_items_inner').html($(data).find('.cat_items_inner').html());
230				document.title = $(data).find('title').text();
231				$('title').text($(data).find('title').text());
232				$('.load_overlay').hide();
233				$('.korzinapodniyam').html($(data).find('.korzinapodniyam').html());
234				$('.cat_list_wrp li:first-child a').click();
235			})	
236			history.pushState('', '', href);
237		}
238    })
239	
240	
241    $('body').on('click', '.prosmotret_profil', function(){
242		$('.cont_table_formchangeLK').toggle();
243    })
244	
245	
246	
247	$('.fancybox').fancybox();
248	
249	
250	//Отзывы 
251    $('body').on('submit', '.recall', function(e){
252        e.preventDefault();
253		var t = $(this);
254		$.ajax({
255			type: "POST",
256			url: '/include/ajax.php?act=submit',
257		    data: t.serialize(),
258			success: function(eds){
259				if(Number(eds)==1){
260					$('.err').text('Неправильно ввели капчу');
261				} else {
262					t.text('Отзыв отправлен');
263				}
264			},
265		});
266    })
267
268	
269	
270	if($('.aytFormLazy').length){
271		setTimeout(function(){
272			var bReg = $('.aytFormLazy').attr('data-registration') == "Y";
273			var htmlForm = '<form action="/lk/" class="login_autoriz login_autoriz2" method="post"><div class="err"></div><div class="user-input-wrp"><input type="text" class="inputText" name="login" placeholder="ЛогиÐ
273½" value="" /></div><div class="user-input-wrp"><input type="password" class="inputText" name="password" placeholder="Пароль" value="" /></div><div class="buttons_group"><input type="submit" class="grayb2" value="Войти">';
274			console.log(bReg);
275			if(bReg){
276				htmlForm += '<a href="/lk/register.php" class="text_registr">Регистрация</a>';
277			}
278
279			htmlForm += '</div></form>';
280			$('.aytFormLazy').html(htmlForm);
281		}, 1500);
282	}
283	//Авторизация
284    $('body').on('submit', '.cart_auth , .login_autoriz', function(e){
285        e.preventDefault();
286		var t = $(this);
287		$.ajax({
288			type: "POST",
289			url: '/include/ajax.php?auth=check',
290		    data: t.serialize(),
291			success: function(eds){
292				console.log(eds);
293				if(Number(eds)=='1'){
294					$('.err').text('Неверный логин или пароль');
295				} else {
296					$.get(location.href,function(data){
297						if(t.hasClass('login_autoriz2')){
298							location.href = "/"
299						} else {
300							$('.allcheckout').html($(data).find('.allcheckout').html());
301						}
302						$('.login_link').html($(data).find('.login_link').html());
303					})	
304				}
305			},
306		});
307    })
308	
309	
310	
311	//Оформление заказа
312    $('body').on('click', '.submit_all_zakaz', function(e){
313        e.preventDefault();
314		var t = $(this),
315		arr={},date,id,
316		mess={};
317		arr['products'] = {},
318		dlevery = {},
319		skidka = {};
320		//arr['payment'] = $('.check_wrp.checked').attr('data-id');
321		
322		$('.checkout_item_parent:not(.disabled_parent)').each(function(i,v){
323			date = String($(v).attr('data-date'));
324			arr['products'][date] = {};
325			mess[date] = {};
326			dlevery[date] = {};
327			if($(v).find('.skidka').length > 0){
328				skidka[date] = {};
329				skidka[date] = $(v).find('.skidka').attr('data-skidka');
330			}
331			dlevery[date] = $(v).find('.dlevery').attr('data-delevery');
332			mess[date] = $(v).find('.message').val();
333			$(v).find('.checkout_item').each(function(i2,v2){
334				id = String($(v2).attr('data-id'));
335				arr['products'][date][id] = {};
336				arr['products'][date][id]['qnt'] = $(v2).find('input').val();
337				arr['products'][date][id]['name'] = $(v2).find('.checkout_ttle').text();
338				arr['products'][date][id]['price'] = $(v2).find('.checkout_price').text();
339				
340			})
341		})
342
343		$.ajax({
344			type: "POST", 
345			url: '/include/savezakaz.php',
346			dataType: "html",
347			data: {
348				"zakaz": JSON.stringify(arr),
349				"mess": JSON.stringify(mess),
350				"skidka": JSON.stringify(skidka),
351				"dlevery": JSON.stringify(dlevery),
352			}, 
353			success: function(data){console.log(data);
354				setCookie("textarea",'');
355				$('.checkout_wrp_all').html('Ваш заказ создан. Оплатить и просмотреть информацию о нем вы можете в <a href="/lk/">личном кабинете.</a>');
356				$('.other_allitem').detach();
357			},
358		});
359    })
360	
361	
362	
363
364	
365	
366	$('body').on('keyup','.classEMAIL',function(){
367		$('.classLOGIN').val($(this).val());
368	})
369	
370	
371	
372	//Регистарция
373    $('body').on('submit', '.cont_table_form_reg', function(e){
374        e.preventDefault();
375		var t = $(this),
376		check = true;
377		var r = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
378		var mail = $('.classEMAIL').val();
379		$('.classEMAIL').css('border-color','#d1d1d1');
380		$('.PASSWORD').css('border-color','#d1d1d1');
381		$('.CONFIRM_PASSWORD').css('border-color','#d1d1d1');
382		if(!r.test(mail)){
383			$('.classEMAIL').css('border-color','red');
384			check = false;
385		}
386		if($('.PASSWORD').val() != $('.CONFIRM_PASSWORD').val() || $('.PASSWORD').val().length < 6){
387			$('.PASSWORD').css('border-color','red');
388			$('.CONFIRM_PASSWORD').css('border-color','red');
389			check = false;
390		}
391		
392		if(check){	
393			$.ajax({
394				type: "POST",
395				url: '/include/ajax.php?reg=save',
396				data: t.serialize(),
397				success: function(data){
398					if(Number(data)==1){
399						$('.err').text('Неправильно ввели капчу');
400					} else {
401						t.html('Ваша заявка отправлена. Вскоре вы получите на ваш электронный адрес указанный при регистрации письмо с доступами для авторизации на сайте.');
402					}
403				},
404			});
405		}
406		
407    })
408	
409	
410    $('body').on('click', '.lkcheckout a', function(e){
411        e.preventDefault();
412        $('.lkstatus').hide();
413		$('.lkcheckout li').removeClass('active');
414		$(this).closest('li').addClass('active');
415		$('.status' + $(this).attr('data-status')).show();
416    })
417	
418	
419	
420	//Удалить заказ
421    $('body').on('click', '.delete_link_zakaz', function(e){
422        e.preventDefault();
423		var t = $(this),
424		id = t.closest('.lk_elem_item').attr('data-id');
425		if(confirm('Удалить заказ?')){
426			$('.load_overlay').show();
427			$.ajax({
428				type: "POST",
429				url: '/include/ajax.php?order=del',
430				data: '&id='+ id ,
431				success: function(data){
432					console.log(data);
433					t.closest('.lk_elem_item').detach();
434					$('.load_overlay').hide();
435				},
436			});
437		}
438    })
439	
440	
441	//Комментарий к заказу в ЛК
442    $('body').on('click', '.commets_submit', function(e){
443        e.preventDefault();
444		var t = $(this),
445		id = t.closest('.lk_elem_item').attr('data-id'),
446		comment = t.closest('.commets').find('textarea').val();console.log(id);
447		$('.load_overlay').show();
448		$.ajax({
449			type: "POST",
450			url: '/include/ajax.php?save=comment',
451			data: '&id='+ id + '&comment='+ comment ,
452			success: function(data){
453				t.text('Комментарий сохранен');
454				setTimeout(function(){
455					t.text('Сохранить комментарий');
456				}, 5000);
457				$('.load_overlay').hide();
458			},
459		});
460    })
461	
462 
463	
464	//Удаление и добавление товара в оформленный заказ
465    $('body').on('click', '.add.changeCart , .sub.changeCart, .subdel.changeCart', function(e) {
466		 e.preventDefault();
467		addOrder(this);
468	});
469    $('body').on('keyup', '.keyUpAddProduct.changeCart', function(e) {
470		 e.preventDefault();
471		addOrder(this);
472	});
473	function addOrder($this){
474		var t = $($this);
475		if(t.hasClass('keyUpAddProduct')){
476			var input = t;
477			var val = Number(t.val());
478		} else {
479			var input = t.closest('div').find('input');
480			var val = Number(input.val());
481		}
482		var quant = 1, price='',name='',
483		id = t.closest('.item_ajax_info').attr('data-id'),
484		productid = t.closest('.item_ajax_info').attr('data-product'),
485		zakazID = t.closest('.item_ajax_info').attr('data-zakaz'),
486		urlGet = location.href;
487		
488		if(t.hasClass('delete_link_item_zakaz')){
489			quant = 0;
490		} else if(t.hasClass('keyUpAddProduct')){
491			if(val < 0)return false;
492			quant = val;
493		} else if(t.hasClass('sub')){
494			if(val == 1)return false;
495			quant = val - 1;
496		} else {
497			quant = val + 1;
498		}
499		input.val(quant);
500		if(t.closest('.item_ajax_info').hasClass('menu_item_wrp') && val==0){
501			name = t.closest('.item_ajax_info').attr('data-name');
502			price = t.closest('.item_ajax_info').attr('data-price');
503		}
504		if(t.closest('.item_ajax_info').hasClass('menu_item_wrp') || t.closest('.item_ajax_info').hasClass('cat_item_menu')){
505			urlGet = location.href + '?zakaz='+ zakazID +'&dopid='+ t.closest('.item_ajax_info').attr('data-dopid') +'&datid='+ t.closest('.item_ajax_info').attr('data-date');
506		}
507
508		$('.load_overlay').show();
509		$.ajax({
510			type: "POST",
511			url: '/include/ajax.php?zakaz=change',
512		    data: '&quant='+ quant +'&id='+ id +'&productid='+ productid +'&zakazID='+ zakazID +'&name='+ name +'&price='+ price ,
513			success: function(esf){console.log(esf);
514				if(quant ==0){
515					t.closest('.item_ajax_info').detach();
516				}
517				$.get(urlGet,function(data){
518					if(t.closest('.item_ajax_info').hasClass('menu_item_wrp') || t.closest('.item_ajax_info').hasClass('cat_item_menu')){
519						$('.catalog_content').html($(data).find('.catalog_content').html());
520						$('.cat_items_inner').html($(data).find('.cat_items_inner').html());
521						$('.numcart').html($(data).find('.numcart').html());
522						$('.cat_count').html($(data).find('.cat_count').html());
523						$('.cat_price').html($(data).find('.cat_price').html());
524					} else {
525						zakazID = t.closest('.lk_elem_item').attr('data-id');
526						$('.lk_elem_item[data-id="'+ zakazID +'"] .lk_elem_footer').html($(data).find('.lk_elem_item[data-id="'+ zakazID +'"] .lk_elem_footer').html());
527						$('.lk_elem_item[data-id="'+ zakazID +'"] .lk_elem_body').html($(data).find('.lk_elem_item[data-id="'+ zakazID +'"] .lk_elem_body').html());
528					}
529					$('.load_overlay').hide();
530				})
531			},
532		});
533	}
534
535	
536	//Удаление и добавление товара в заказ
537    $('body').on('click', '.add:not(.changeCart), .sub:not(.changeCart), .subdel:not(.changeCart)', function(e) {
538		addBasket(this);
539	});
540    $('body').on('keyup', '.keyUpAddProduct:not(.changeCart)', function(e) {
541		addBasket(this);
542	});
543	
544	function addBasket($this){
545		var t = $($this);
546		if(t.hasClass('keyUpAddProduct')){
547			var input = t;
548			var val = Number(t.val());
549		} else {
550			var input = t.closest('div').find('input');
551			var val = Number(input.val());
552		}
553		var quant = 1,
554		props = t.closest('.item_ajax_info').find('.checkout_chars').html(),
555		id = t.closest('.item_ajax_info').attr('data-id'),
556		price = t.closest('.item_ajax_info').attr('data-price'),
557		name = t.closest('.item_ajax_info').attr('data-name'),
558		img = t.closest('.item_ajax_info').attr('data-img'),
559		date = t.closest('.item_ajax_info').attr('data-date'),
560		ves = t.closest('.item_ajax_info').find('.checkout_price span').html(),
561		opis = t.closest('.item_ajax_info').find('.opisanie span').html();
562		
563		/*
564		max = t.closest('.item_ajax_info').attr('data-max'),
565		if (val > input.attr('max')) {
566			return false;
567		}*/
568		if(t.hasClass('subdel')){
569			quant = 0;
570		} else if(t.hasClass('keyUpAddProduct')){
571			if(val < 0)return false;
572			quant = val;
573		} else if(t.hasClass('sub')){
574			if(val == 0)return false;
575			quant = val - 1;
576		} else {
577			quant = val + 1;
578		}
579		input.val(quant);
580		if(quant==0){
581			t.closest('.item_ajax_info').detach();
582		}
583		
584		$('.load_overlay').show();
585	
586		$.ajax({
587			type: "POST",
588			url: '/include/ajax.php?product=updown',
589		    data: '&quant='+ quant +'&id='+ id +'&date='+ date +'&price='+ price  +'&name=' + name +'&img=' + img +'&props=' + props +'&ves=' + ves +'&opis=' + opis ,//+'&max=' + max
590			success: function(){
591				$('.load_overlay').show();
592				$.get(location.href,function(data){
593					if(t.hasClass('subcart')){
594						$('.cat_count').html($(data).find('.cat_count').html());
595						$('.cat_price').html($(data).find('.cat_price').html());
596					} 
597					else if(t.closest('.item_ajax_info').hasClass('checkout_item'))
598					{
599						$('.allcheckout').html($(data).find('.allcheckout').html());
600					} 
601					else 
602					{
603						$('.shop_cart_wrp.menu_cart_wrp').html($(data).find('.shop_cart_wrp.menu_cart_wrp').html());
604					}
605					$('.catalog_content').html($(data).find('.catalog_content').html());
606					$('.load_overlay').hide();
607					if(val == 0){
608						$('.catalog_content .item_ajax_info[data-id="'+ id +'"]').find('.plus_minus_item').find('.added').show().delay(1000).fadeOut();
609					}
610				});
611			},
612		});
613	}
614	
615	
616	
617	
618		
619	
620
621	
622	function IsJsonString(str) {
623		try {
624			JSON.parse(str);
625		} catch (e) {
626			return false;
627		}
628		return true;
629	}
630	
631	
632	//Оплата сбером
633    $('body').on('submit', '.paysber', function(e){
634        e.preventDefault();
635		var t = $(this),
636		check = true;
637			$.ajax({
638				type: "POST",
639				url: '/include/ajax.php?sber=go',
640				data: t.serialize(),
641				success: function(data){
642					
643					if(IsJsonString(data)){
644						var sber = JSON.parse( data );
645						
646						if(sber.formUrl != undefined && sber.formUrl){
647							
648							location.href = sber.formUrl;
649						} else {
650							t.html(sber.error);
651						}
652					} else {
653						t.html(sber.error);
654					}
655				},
656			});
657    })
658	
659	
660	
661	//Возврат средств Сбербанком
662    $('body').on('click', '.otmenz_zakaza', function(e){
663        e.preventDefault();
664		var t = $(this),
665		zakazID = t.attr('data-id');
666		if(confirm('Запросить возврат средств и отменить заказ?')){
667			$.ajax({
668				type: "POST",
669				url: '/include/ajax.php?sber=back',
670				data: '&orderNumber='+ zakazID +'&amount='+ t.attr('data-amount') ,
671				success: function(data){
672					t.closest('.lk_elem_item').detach();
673				},
674			});
675		}
676    })
677	
678	$('body').on('click', '.nozakaz span', function(e){
679        e.preventDefault();
680		$('.nozakaz').css('display','none');
681    })
682	
683	
684});
685
686
687$(document).on('click', 'a.disabled', function(e) {
688	e.preventDefault();
689});
690
691
692$(window).on('load', function() {
693    if (window.location.hash.length>0) {
694				var target = window.location.hash;
695				var totop = Number($(target).offset().top) - 100;
696				$('html, body').stop().animate({
697					scrollTop: totop
698				}, 600);
699    }
700});
701
702
703
704
705
706
707

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.