PageSourceSearch

https://elpn.ru/t/v1015/images/js/main.js

js elpn.ru collected 2026-10-02 17:21:29 UTC 28,616 bytes, 1,107 lines download raw bytes

1shop2.msg = function(text, obj) {
2	var selector = '#shop2-msg',
3		msg = $(selector),
4		offset = obj.offset(),
5		width = obj.outerWidth(true),
6		height = obj.outerHeight(true);
7
8	if (!msg.get(0)) {
9		msg = $('<div id="shop2-msg">');
10		$(document.body).append(msg);
11		msg = $(selector);
12	}
13	var topMinus = parseInt($('.site-wrapper').css('marginTop'));
14
15	msg.html(text).show();
16
17	var msgWidth = msg.outerWidth();
18	var left = offset.left;
19	var top = offset.top + height - topMinus;
20
21	if (left + msgWidth > $(window).width()) {
22		left = offset.left - msgWidth;
23	}
24
25	msg.css({
26		left: left,
27		top: top
28	});
29
30	$.s3throttle('msg', function() {
31		msg.hide();
32	}, shop2.options.msgTime);
33
34};
35shop2.queue.question = function() {
36			var cls = '.price-old.question, .shop-cart-total .question';
37
38			$(document).on('mouseenter', cls, function() {
39				var $this = $(this),
40					win = $this.next().show(),
41					position = $this.position(),
42					height = win.outerHeight(true);
43
44				win.css({
45					top: position.top - height - 5,
46					left: position.left
47				});
48
49			}).on('mouseleave', cls, function() {
50
51				var $this = $(this),
52					win = $this.next();
53
54				win.hide();
55
56			});
57
58		},
59shop2.filter.sort = function(name, elem) {
60	var re = new RegExp(this.escape('s[sort_by]') + '=([^&]*)'),
61		params = this.str.match(re),
62		desc = name + ' desc',
63		asc = name + ' asc',
64		isDesc = (elem.is('.sort-param-desc'));
65
66
67	params = (params && params.length > 1) ? params[1] : '';
68	
69	params = (isDesc) ? desc : asc;
70
71	// if (params.indexOf(desc) !== -1) {
72	//     params = params.replace(desc, asc);
73	// } else if (params.indexOf(asc) !== -1) {
74	//     params = params.replace(asc, desc);
75	// } else if (params !== '') {
76	//     params += ',' + desc;
77	// } else {
78	//     params = asc;
79	// }
80
81	this.remove('s[sort_by]');
82	this.add('s[sort_by]', params);
83	return this;
84}
85shop2.queue.sort = function() {
86	var wrap = $('.sorting');
87
88	wrap.find('.sort-param').on('click', function(e) {
89		var $this = $(this),
90			name = $this.data('name');
91
92		e.preventDefault();
93		shop2.filter.sort(name, $this);
94		shop2.filter.go();
95	});
96
97	wrap.find('.sort-reset').on('click', function(e) {
98		e.preventDefault();
99		shop2.filter.remove('s[sort_by]');
100		shop2.filter.go();
101	});
102};
103
104shop2.queue.cart = function() {
105
106	var updateBtn = $('.shop2-cart-update'),
107		cartTable = $('.shop2-cart-wrapper'),
108		form = $('#shop2-cart');
109
110	shop2.on('afterCartRemoveItem, afterCartUpdate', function() {
111		document.location.reload();
112	});
113
114	function updateBtnShow() {
115		updateBtn.show();
116	}
117
118	cartTable.find('input:text').on('keypress', function(e) {
119		if (e.keyCode == 13) {
120			shop2.cart.update(form);
121		} else {
122			updateBtnShow();
123		}
124	});
125
126	cartTable.find('.amount-minus, .amount-plus').on('click', updateBtnShow);
127
128	updateBtn.on('click', function(e) {
129		e.preventDefault();
130		shop2.cart.update(form);
131		return false;
132	});
133
134
135	$('.cart-delete a').on('click', function(e) {
136		var $this = $(this),
137			id = $this.data('id');
138
139		e.preventDefault();
140
141		shop2.cart.remove(id);
142
143	});
144
145}
146
147shop2.queue.addToCart = function() {
148
149
150			$(document).on('click', '.shop-product-button', function(e) {
151
152				var $this = $(this),
153					$form = $this.closest('form'),
154					form = $form.get(0),
155					adds = $form.find('.additional-cart-params'),
156					len = adds.length,
157					i, el,
158					a4 = form.amount.value,
159					kind_id = form.kind_id.value;
160
161				e.preventDefault();
162
163				if (len) {
164					a4 = {
165						amount: a4
166					};
167
168					for (i = 0; i < len; i += 1) {
169						el = adds[i];
170						if (el.value) {
171							a4[el.name] = el.value;
172						}
173					}
174				}
175
176				shop2.cart.add(kind_id, a4, function(d) {
177
178					$('#shop2-cart-preview').replaceWith(d.data);
179
180					if (d.errstr) {
181						shop2.msg(d.errstr, $this);
182					} else {
183						shop2.msg(window._s3Lang.JS_ADDED, $this);
184					}
185
186					if (d.panel) {
187						$('#shop2-panel').replaceWith(d.panel);
188					}
189				});
190
191			});
192
193		},
194
195shop2.queue.hs = function() {
196
197	$('.shop-compare-product-image a img, .shop-compare-data a img, .shop-product .product-image a img, .shop-product .product-thumbnails li a img, .cart-product-image a img, .cart-product-param a img').closest('a').on('click', function() {
198		hs.expand(this);
199		return false;
200	}
200).addClass('highslide');
201	
202	$(document).on('click', '.shop2-edost-office-address a', function() {
203		hs.htmlExpand(this, {
204			objectType: 'iframe',
205			wrapperClassName: 'draggable-header',
206			outlineType: 'rounded-white',
207			width: 900,
208			height: 600,
209			align: 'center'
210		});
211		return false;
212	});
213
214
215},
216
217(function($) {
218	$(function() {
219
220		var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/i.test(navigator.userAgent),
221			isApple = /iPod|iPad|iPhone/i.test(navigator.userAgent);
222
223	//bind image load
224
225	$.fn.bindImageLoad = function (callback) {
226	  function isImageLoaded(img) {
227		  if (!img.complete) {
228			  return false;
229		  }
230		  if (typeof img.naturalWidth !== "undefined" && img.naturalWidth === 0) {
231			  return false;
232		  }
233		  return true;
234	  }
235
236	  return this.each(function () {
237		  var ele = $(this);
238		  if (ele.is("img") && $.isFunction(callback)) {
239			  ele.one("load", callback);
240			  if (isImageLoaded(this)) {
241				  ele.trigger("load");
242			  }
243		  }
244	  });
245	};
246		function searchHeight() {
247			var seachBlcok = $('.search-online-store .block-body'),
248				seachBlcokPosition = seachBlcok.offset().top,
249				seachBlcokMaxHeight = ($(document).height()) - seachBlcokPosition - 2;
250
251				seachBlcok.css('maxHeight', seachBlcokMaxHeight);
252		}
253
254		setTimeout(function() {
255			searchHeight();
256		}, 1500);
257
258		
259
260		var clickStart = (isMobile) ? 'touchend.respons' : 'click.respons';
261
262		(function() {
263			var $sos = $(".search-online-store-wrapper"),
264				$button = $(".top-panel-search-button"),
265				$close = $(".search-online-store-button");
266
267			$sos.pudgeJS({slideToOpen: false});
268
269			$close.on("click", function() {
270				$sos.pudgeJS("close");
271			});
272
273			resizeController(900, function() {
274			
275				$button.on("click", searchToggle);
276				$sos.pudgeJS({slideToOpen: false});
277				$('.search-block-wr .search-btn').off(clickStart, searchBlockWr);
278				$('.search-online-store .block-title').off(clickStart, searchOnlineStore);
279			}, function() {
280
281				$button.off("click", searchToggle);
282				$sos.pudgeJS("destroy");
283				$('.search-block-wr .search-btn').on(clickStart, searchBlockWr);
284				$('.search-online-store .block-title').on(clickStart, searchOnlineStore);
285			});
286
287			function searchBlockWr(event) {
288				var $wrapper = $('.top-navigation-search-preview'),
289					isOpened = $wrapper.hasClass('opened');
290
291				if(isOpened) {
292					$wrapper.removeClass('opened');
293					$(this).removeClass('opened')
294				} else {
295					$wrapper.addClass('opened');
296					$(this).addClass('opened');
297				};
298			};
299
300			function searchOnlineStore(event) {
301				var $wrapper = $('.search-online-store, .top-navigation-in'),
302					isOpened = $wrapper.hasClass('opened');
303
304				if(isOpened) {
305					$wrapper.removeClass('opened');
306				} else {
307					$wrapper.addClass('opened');
308				};
309			};
310
311			function searchToggle(event) {
312				event.preventDefault();
313				$sos.pudgeJS("toggle");
314			}
315		})();
316
317		$('.left-categor-wr .left-categor-title').on(clickStart, function() {
318			if($('.left-categor-wr .left-categor').is(':hidden')) {
319				$('.left-categor-wr .left-categor').fadeIn();
320			} else {
321				$('.left-categor-wr .left-categor').fadeOut();
322			}
323		});
324
325		$(document).click(function(event) {
326			if ($(event.target).closest('.search-block-wr, .top-navigation-search-preview, .shop-product-order-btn, .shop2-color-ext-options').length) return;
327
328			$('.top-navigation-search-preview').removeClass('opened');
329			$('.search-block-wr .search-btn').removeClass('opened');
330			$('.search-online-store').removeClass('opened');
331
332			$('.closeBtnForm').click(function(event) {
333				$('.product-includeForm').removeClass('active');
334				
335				if (/iPod|iPad|iPhone/i.test(navigator.userAgent)) {
336					$('html, body').removeClass('overflowHidden');
337				} else if (isMobile) {
338					$(document.documentElement).removeClass('overflowHidden');
339				}
340			});
341			if ($('.product-includeForm').hasClass('active')) {
342				if ($(event.target).closest('.gr-form-wrap, .buy-one-click > a').length) return;
343				$('.product-includeForm').removeClass('active');
344			}
345			
346			if (/iPod|iPad|iPhone/i.test(navigator.userAgent)) {
347				$('html, body').removeClass('overflowHidden');
348			} else{
349				$(document.documentElement).removeClass('overflowHidden');
350			}
351
352		});
353
354	$(this).keydown(function(eventObject){
355		if (eventObject.which == 27) {
356			$('.product-includeForm').removeClass('active');
357			
358			if (/iPod|iPad|iPhone/i.test(navigator.userAgent)) {
359				$('html, body').removeClass('overflowHidden');
360			} else {
361				$(document.documentElement).removeClass('overflowHidden');
362			}
363		}
364	})
365		
366	function topPanel() {
367		var offsetTop = $(document).scrollTop();
368
369		$(document).scroll(function(e) {
370			if ($('.top-menu-wrapper, .search-online-store-wrapper').hasClass('pudgeJS-opened')) return;
371
372			if ($(document).scrollTop() >= 40) {
373				var offsetTopScroll = $(document).scrollTop();
374
375
376				if (offsetTopScroll > offsetTop) {
377					$('.top-panel-wr, .top-panel-navigation-button').css({
378						'opacity' : '0',
379						'visibility' : 'hidden',
380						'height' : '0'
381					});
382				} else {
383					$('.top-panel-wr, .top-panel-navigation-button').css({
384						'opacity' : '1',
385						'visibility' : 'visible',
386						'height' : '48px'
387					});
388				}
389				offsetTop = offsetTopScroll;
390			}
391		});
392	}
393	topPanel();
394	
395	
396	
397		$('.shop-product-button').on(clickStart, function(event) {
398			$('.top-panel-wr').css({
399				'opacity' : '1',
400				'visibility' : 'visible',
401				'height' : 'auto'
402			});
403		});
404
405		$('.product-options select').styler();
406		
407		$('.shop-filter select').styler();
408
409		$('.search-online-store select').styler({selectPlaceholder: 'Все',});
410		
411		$('.shop2-order-options input[type="radio"]').styler();
412shop2.on('afterGetProductListItem', function() {
413              $('.product-list select').styler('destroy').styler();
414        })
415		
416		$('table').wrap('<div class="table-wrapper"></div>');
417
418		 if ($('.main-slider .owl-carousel .slider-img').length > 1) {
419			$('.main-slider .owl-carousel').owlCarousel({
420				loop:true,
421				items:1,
422				margin:0,
423				nav:true,
424				autoplay:true,
425				autoplayHoverPause:true
426			});
427		};
428		
429		
430
431		 var $owl2 = $('.main-blocks-slider');
432		   
433		$owl2.owlCarousel ({
434			margin: 16,
435			loop: true,
436			autoplay:true,
437			dots: 1,
438			nav: true,
439			responsive: {
440			  0: {
441				items: 2
442			  },
443			  640: {
444				items: 3
445			  },
446			  1000: {
447				items: 4
448			  }
449			}
450		});
451               setTimeout(function() {
452			$('.main-new-block-wrapper, .shop-main-header').css({'opacity':1});
453		}, 1000);
454
455		$(window).load(function() {
456			$('.main-new-block').each(function(){
457				var heights = [],
458					maxHeight,
459					myPaddingTop,
460					slideCount = $(this).find('.owl-item').length;
461					
462				if (slideCount <= 4) {
463					$(this).find('.owl-controls').hide();
464				}
465				$(this).find('.owl-item .product-thumb-list').each(function(){
466					heights.push($(this).height());
467				});
468				maxHeight = Math.max.apply(null, heights);
469				
470				$(this).find('.owl-item .product-thumb-list').each(function(){
471					myPaddingTop = (maxHeight - $(this).height() + 15);
472		
473					$(this).find('.product-bot').css('paddingTop', myPaddingTop);
474				});
475			});
476		});
477
478
479		$('.noUi-slider').each(function(index, el) {
480
481			var $this = $(this),
482				$lower = $this.closest('.range_slider_wrapper').find('.noUi-slider__low'),
483				$upper = $this.closest('.range_slider_wrapper').find('.noUi-slider__hight'),
484				priceMin = 999999999,
485				priceMax = 0,
486				arr = [0,1500000];
487				
488			if( $this.parents('li').find('.filter-title').text()=='Цена (руб):' && window.folder_filter ){
489				arr = [0,window.folder_filter]
490			} else if ( $this.parents('li').find('.filter-title').text()!='Цена (руб):' && window.folder_filter2 ) {
491				
492				arr = [0,window.folder_filter2]
493				
494			} else {
495				arr = [0,1500000];
496			}
497
498
499			var slider = $this.noUiSlider({
500				start: [$lower.attr('value'), $upper.attr('value')],
501				connect: true,
502				step: 1,
503				behaviour: 'drag-tap',
504				format:wNumb({
505					decimals:0
506				}),
507				range: {
508					'min': [ arr[0] ],
509					'max': [ arr[1] ]
510				}
511			});
512
513			slider.Link('lower').to($lower);
514			slider.Link('upper').to($upper);
515			
516		});
517
518		var $tabs = $('#product_tabs'),
519			$win = $(window),
520			$doc = $(document),
521			isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),
522			click = clickStart,
523			srchIsOpen = false;
524
525		$tabs.responsiveTabs({
526			rotate: false,
527			startCollapsed: 'accordion',
528			collapsible: 'accordion',
529			animation: 'slide',
530			setHash: true,
531			scrollToAccordion: true,
532			scrollToAccordionOffset: 50
533		 });
534		 
535		 //$(document.body).addClass('overflow_hidden');
536		 //setTimeout(function(){
537			// $(document.body).removeClass('overflow_hidden');
538			// $('#site_loader').hide();
539		 //}, 7000)
540		 
541		// FILTER
542
543			//Sorting
544		var $sortingBtn = $('.shop-sorting-panel .sorting-wrap .sort-title'),
545			$sortingBlock = $('.shop-sorting-panel .sorting-wrap .sorting-block'),
546			sortingParamLink = $('.shop-sorting-panel .sorting-wrap .sort-param.active');
547
548		$sortingBtn.click(function(event) {
549                      event.preventDefault();
550				$('.sorting-wrap').toggleClass('opened');
551				$sortingBlock.slideToggle('300');
552		});
553
554		$(document).click(function(event) {
555			if ($('.sorting-wrap').hasClass('opened')) {
556				if ($(event.target).closest('.sorting-wrap').length) return;
557				$('.sorting-wrap').removeClass('opened');
558				$sortingBlock.slideToggle('300');
559			}
560		});
561
562		function sortingTitle() {
563			var paramClone = sortingParamLink.first().clone().addClass('clone');
564
565			$sortingBtn.html(paramClone);
566
567			$('.sort-param.clone').click(function(event) {
568                event.preventDefault();
569            });
570		}
571		if (sortingParamLink.hasClass('active')){
572			sortingTitle();
573		}
574		//filter 
575
576		var wrap = $('.shop-filter'),
577			result = $('.result');
578
579		shop2.filter.init();
580
581		shop2.on('afterGetSearchMatches', function (d, status) {
582
583			if (d.data.total_found === 0) {
584
585				result.addClass('no-result');
586			} else {
587				result.removeClass('no-result');
588			}
589
590			$('#filter-result').html(d.data.total_found);
591			
592			result.removeClass('hide');
593		});
594
595		wrap.find('.param-val span').on(clickStart, function(e) {
596			var $this = $(this).closest('.param-val'),
597				name = $this.data('name'),
598				value = $this.data('value');
599
600			e.preventDefault();
601
602			$this.toggleClass('active-val');
603			shop2.filter.toggle(name, value);
604			shop2.filter.count();
605		});
606
607		wrap.find('select').on('change', function() {
608			var $this = $(this),
609				name = this.name,
610				value = $this.val();
611			shop2.filter.remove(name);
612			shop2.filter.add(name, value);
613			shop2.filter.count();
614		});
615
616		wrap.find('input:text').keyup(function() {
617			var $this = $(this),
618				name = $this.attr('name');
619
620			$.s3throttle('filter: ' + name, function() {
621				var value = $this.val();
622
623				shop2.filter.add(name, value);
624				shop2.filter.count();
625			}, 500);
626		});
627
628		wrap.find('.noUi-slider').on('change', function(e){
629			var $this = $(this),
630				$parent = $this.closest('.range_slider_wrapper'),
631				$input = $parent.find('input:text');
632				
633			var id = 0;
634			$.each($input, function(i, elem) {
635				var name = $(elem).attr('name');
636				id = id + 500;
637				$.s3throttle('filter: ' + name, function() {
638					var value = $(elem).val();
639					shop2.filter.add(name, value);
640					shop2.filter.count();
641				}, id);
642			});
643		});
644
645		wrap.find('.shop2-filter-go').on(clickStart, function(e) {
646			e.preventDefault();
647			shop2.filter.go();
648		});
649
650		$('.sorting-shop-arrow').on(clickStart, function() {
651
652			if($('.sorting-inner').hasClass("active")) {
653				$('.sorting-inner').removeClass("active")
654			} else {
655				$('.sorting-inner').addClass("active");
656			}
657
658			return false;
659		});
660
661		$('.shop2-filter-title').on(clickStart, function() {
662
663			if($('.shop-filter').hasClass("active")) {
664				$('.shop-filter').removeClass("active");
665				sessionStorage.filter = 0;
666			} else {
667				$('.shop-filter').addClass("active");
668				sessionStorage.filter = 1;
669			}
670
671			return false;
672		});
673		
674		var $ti = 0;
675
676		if ($('.left-categor li').find('.s1').length == 0){
677			$ti = 1;
678
679			$('.left-categor li').each(function(){
680				var $this = $(this),
681				$spanS1 = $('<span class="s1"></span>');
682				
683				if ($this.find('> ul').get(0)) {
684					$this.append($spanS1);
685				}
686			});
687		 }
688
689		if ($ti == 1){
690
691			$('.left-categor').on('click', '.s1', function() {
692				var $this = $(this);
693				var $li = $this.closest('li');
694				var $ul = $li.find('>ul');
695				
696				if ($li.hasClass('opened')) {
697					$ul.stop().slideUp(400, function(){
698		
699						$li.removeClass('opened');
700					});
701				} else {
702					$ul.stop().slideDown(400, function(){
703				
704						$li.addClass('opened');
705					});
706					$li.siblings().filter(':has(">ul")').each(function(){
707						var $this = $(this);
708						$this.find('>ul').stop().slideUp(400, function(){
709			
710							$this.removeClass('opened');
711						});
712					});
713				}
714			});
715
716		}else {
717
718			$('.left-categor > li > ul').prev().click(function(){
719
720			 if(!$(this).parent().hasClass('opened') && !$(this).next().is(':animated')){
721				$(this).next().slideDown('400').parent().addClass('opened');
722			 } else {
723			 
724			   $(this).next().slideUp('400').parent().removeClass('opened');
725			 }
726			
727			 return false;
728
729		   });
730		}
731	  
732	 
733	
734
735	
736
737
738	
739		(function() {
740			var $wrapper = $(".top-menu-wrapper"),
741				$button = $(".top-panel-navigation-button"),
742				$list = $(".top-menu"),
743				options = {
744					wrapper: ".site-wrapper"
745				};
746
747			// menu init
748			$wrapper.pudgeJS(/* options */);
749  
750			resizeController(900, function() {
751
752				// menu toggle
753				$wrapper.pudgeJS(/*, options */);
754				$button.on(clickStart, menuPudgeToggle);
755			}, function() {
756
757				// menu destroy
758				$wrapper.pudgeJS("destroy");
759				$button.off(clickStart, menuPudgeToggle);
760			});
761			
762			function menuPudgeToggle(event) {
763				event.preventDefault();
764				$wrapper.pudgeJS("toggle");
765			};
766		})();
767
768		(function() {
769			var $wrapper = $(".shop2-filter-wr"),
770				$button = $(".shop-filter-button"),
771				$close = $(".shop-filter-button-close"),
772				$list = $(".shop-filter"),
773				options = {
774					wrapper: ".site-wrapper"
775				};
776
777			$close.on("click", function() {
778				$wrapper.pudgeJS("close");
779			});
780
781			// menu init
782			$wrapper.pudgeJS(/* options */);
783
784			resizeController(900, function() {
785
786				// menu toggle
787				$wrapper.pudgeJS({slideToOpen: false});
788				$button.on(clickStart, menuPudgeToggle);
789			
790			}, function() {
791
792				// menu destroy
793				$wrapper.pudgeJS("destroy");
794				$button.off(clickStart, menuPudgeToggle);
795			});
796			
797			function menuPudgeToggle(event) {
798				event.preventDefault();
799				$wrapper.pudgeJS("toggle");
800			};
801			
802				
803		})();
804
805		resizeController(690, function(){
806			$('.shop-product-item.tr').each(function(index,elem){
807				var button = $(elem).find('.shop-product-button, .shop-product-order-btn');
808				var amount = $(elem).find('.td.column-amount');
809
810				amount.append(button);
811			});
812		}, function(){
813			$('.shop-product-item.tr').each(function(index,elem){
814				var add = $(elem).find('.td.column-add');
815				var button2 = $(elem).find('.shop-product-button, .shop-product-order-btn');
816
817				add.append(button2);
818			});
819		});
820
821		/*(function(){
822			if(!$('.buy-one-click').length) return;
823			
824			var $form = $('<div class="product-includeForm" />');
825			
826			$form.appendTo($('body'));
827			
828			
829			$('.buy-one-click > a').on(clickStart, function(e){
830				e.preventDefault();
831				var url = $(this).attr('href');
832				
833				$form.s3IncludeForm(url, 'comment');
834				
835				$('.product-includeForm').addClass('active');
836				
837				if (/iPod|iPad|iPhone/i.test(navigator.userAgent)) {
838					$('html, body').addClass('overflowHidden');
839				} else {
840					$(document.documentElement).addClass('overflowHidden');
841				}
842			})
843		})();*/
844
845	(function(){
846		if(!$('.shop-product-order-btn').length) return;
847		
848		var $form = $('<div class="product-includeForm" />');
849		
850		$form.appendTo($('body'));
851		
852		
853		$('.shop-product-order-btn').on('click', function(e){
854			e.preventDefault();
855			var url = $(this).attr('href'),
856			productLink = (shop2.mode!=="product") ? (document.location.origin)+$(this).closest('.shop2-product-item').find('.product-name > a').attr('href') : (document.location.href),
857			productName = (shop2.mode!=="product") ? $(this).closest('.shop2-product-item').find('.product-name > a').html() + (' Количество:' + $(this).closest('.shop2-product-item').find('.shop2-product-amount input[type="text"]').val()) : $(this).closest('.site-main-inner').find('h1').html() + (' Количество:' + $(this).closest('.product-right-side').find('.shop2-product-amount input[type="text"]').val());
858			
859			$form.s3IncludeForm(url, 'comment');
860			
861			$('.product-includeForm').addClass('active');
862			setTimeout(function() {
863				$('.product-includeForm input.productName').val(productName);
864				$('.product-includeForm input.productLink').val(productLink);
865			}, 500);
866			if (/iPod|iPad|iPhone/i.test(navigator.userAgent)) {
867				$('html, body').addClass('overflowHidden');
868			} else {
869				$(document.documentElement).addClass('overflowHidden');
870			}
871		})
872	})();
873
874	(function(){
875		if(!$('.buy-one-click').length) return;
876		
877		var $form = $('<div class="product-includeForm" />');
878			
879			$form.appendTo($('body'));
880		var $closeFormBtn = $('.buy-one-click-form-in .close-btn');
881		
882		$('.buy-one-click > a').on(clickStart, function(e){
883			e.preventDefault();
884				var url = $(this).attr('href');
885			var productLink = (shop2.mode!=="product") ? (document.location.origin)+$(this).closest('.shop2-item-product').find('.product-name > a').attr('href') : (document.location.href),
886				productName = (shop2.mode!=="product") ? $(this).closest('.shop2-item-product').find('.product-name > a').html() + (' Количество:' + $(this).closest('.shop2-item-product').find('.shop2-product-amount input[type="text"]').val()) : $(this).closest('.site-container').find('h1').html() + (' Количество:' + $(this).closest('.product-right-side').find('.shop2-product-amount input[type="text"]').val());
887			
888
889			$form.s3IncludeForm(url, 'comment');
890			$form.addClass('active');
891			setTimeout(function() {
892				$form.find('input.productName').val(productName);
893				$form.find('input.productLink').val(productLink);
894			}, 1000);
895			
896			if (isApple) {
897				$('html, body').addClass('overflowHidden');
898			} else {
899				$(document.documentElement).addClass('overflowHidden');
900			}
901		});
902		
903		$closeFormBtn.on(clickStart, function(e){
904			e.preventDefault();
905			
906			$form.removeClass('active');
907			
908			if (isApple) {
909				$('html, boremove').removeClass('overflowHidden');
910			} else {
911				$(document.documentElement).removeClass('overflowHidden');
912			}
913		});
914	})();
915
916	(function() {
917		var $menu = $('.top-menu');
918
919		resizeController(900, function() {
920                         $('.top-menu').addClass('mobile');
921			$menu.off('mouseenter mouseleave');
922			$menu.find('.s3-menu-allin-has').removeClass('s3-menu-allin-has');
923			$menu.find('ul').removeAttr('style');
924		}, function() {
925        	$('.top-menu').removeClass('mobile');
926			$menu.s3MenuAllIn({
927				type: 'bottom',
928				debug: false,
929				activateTimeout: 250,
930				showTime: 250,
931				hideTime: 250,
932				showFn: $.fn.fadeIn,
933				hideFn: $.fn.fadeOut
934			});
935		});
936	})();
937	function productImageHeigth() {
938	    	
939		var temp = 1;
940		
941		$('.product-list-thumbs .product-image img').bindImageLoad(function(){
942			temp++;
943			
944			if(temp == $('.product-list-thumbs .product-image img').length) {
945			    		var heights = [],
946			    		maxHeight;
947					
948					$('.product-thumb-list .product-image').css('height', 'auto');
949
950			    		$('.product-thumb-list .product-image').each(function(){
951				            heights.push($(this).height());
952				        });
953			    		maxHeight = Math.max.apply(null, heights);
954				    
955				    $('.product-thumb-list .product-image').each(function(){					    
956						$(this).css('height', maxHeight);
957				    });
958			}
959		});
960	}
961$(window).on('resize', productImageHeigth).trigger('resize');
962	function resizeController() {
963			var $win = $(window),
964				winWidth = $win.width(),
965				range = [],
966				func = [],
967				toggleState = [undefined, undefined];
968
969			if (!!arguments.length) {
970				for (var i = 0; i <= arguments.length-1; i++) {
971					
972					if ($.isArray(arguments[i])) {
973						range = arguments[i];
974					} else if ($.isNumeric(arguments[i])) {
975						range.push(arguments[i]);
976					} else if ($.isFunction(arguments[i])) {
977						func.push(arguments[i]);
978					} 
979				};
980			}
981
982			$win.resize(function(event) {
983				winWidth = $win.width();
984				
985				if (range.length > 1) {
986					if (winWidth >= range[0] && winWidth <= range[range.length-1] && typeof toggleState[0] === "undefined") {
987						func[0]();
988						toggleState[0] = true;
989						toggleState[1] = undefined;												
990					} else if ((winWidth < range[0] || winWidth > range[range.length-1]) && typeof toggleState[1] === "undefined") {						
991						toggleState[0] = undefined;
992						toggleState[1] = true;
993
994						if ($.isFunction(func[1])) {
995							func[1]();
996						}
997
998						
999					}
1000				} else if (range.length == 1) {
1001					if (winWidth <= range[0] && typeof toggleState[0] === "undefined") {
1002						func[0]();
1003						toggleState[0] = true;
1004						toggleState[1] = undefined;
1005					} else if (winWidth > range[0] && typeof toggleState[1] === "undefined") {
1006						toggleState[0] = undefined;
1007						toggleState[1] = true;
1008
1009						if ($.isFunction(func[1])) {
1010							func[1]();
1011						}
1012					}
1013				}
1014			}).trigger('resize');
1015	};
1016		
1017	 function marginRight() {
1018	if ($('.shop-kind-item-similar').length) return;
1019		$('.site-main-inner').css('margin-right', '');
1020	}
1021	marginRight();
1022	});
1023	
1024	$(function(){
1025	
1026		$('.fn').each(function(){
1027			var $this	=	$(this),
1028				$name	=	$this.find('input').length ? $this.find('input').attr('name') : $this.find('textarea').attr('name') ,
1029				userFiz	=	[
1030								'note'
1031							],
1032				userYr	=	[
1033								'full_name',
1034								'ur_address',
1035								'fact_address',
1036								'inn',
1037								'kpp',
1038								'ogrn',
1039								'okpo',
1040								'okato',
1041								'okved',
1042								'rs',
1043								'bank',
1044								'kc',
1045								'bik',
1046								'company'
1047							];
1048			
1049			for( var i = 0; i < userFiz.length; i++){
1050				if( $name == userFiz[i] ){
1051					$this.addClass('fiz');
1052				};
1053			};
1054			
1055			for( var j = 0; j < userYr.length; j++){
1056				if( $name == userYr[j] ){
1057					$this.addClass('yur');
1058				};
1059			};
1060			
1061			
1062			
1063		});
1064		$('.fiz').wrapAll('<div class="fiz_face"></div>');
1065		$('.yur').wrapAll('<div class="yur_face"></div>');
1066		
1067		
1068		$('.fiz_face').after($('.yur_face'));
1069		
1070		$(function(){
1071		$('.yur_face').hide().find('input, textarea').prop('disabled',true);
1072		
1073			
1074		function toTabs(){
1075			
1076			
1077			
1078			$('.yf').on('click', function() {
1079				$('.yur_face').show().find('input, textarea').prop('disabled',false);
1080				$('.fiz_face').hide().find('input, textarea').prop('disabled',true);
1081				
1082				$(this).find('input').attr('checked', 'checked');
1083				
1084				$('.title.yf').after($('#orderForm'));
1085			});
1086			$('.ff').on('click', function() {
1087				$('.yur_face').hide().find('input, textarea').prop('disabled',true);
1088				$('.fiz_face').show().find('input, textarea').prop('disabled',false);
1089				$('.title.ff').after($('#orderForm'));
1090				$(this).find('input').attr('checked', 'checked');
1091			});
1092			
1093		};
1094		
1095		toTabs();
1096		
1097		});	
1098	});
1099		
1100})(jQuery);
1101$(function(){
1102	
1103	if ( sessionStorage.filter == 1 ){
1104		$('.shop-filter').addClass("active");
1105	}
1106	shop2.filter.count();
1107})

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.