PageSourceSearch

https://kostagroup.ru/local/templates/kostamash/js/main.js?ver=0.0.2

js kostagroup.ru collected 2026-10-07 13:19:48 UTC 9,842 bytes, 327 lines download raw bytes

1$(document).ready(function() {
2
3
4	var isMobile = {
5		Android: function() {
6			return navigator.userAgent.match(/Android/i);
7		},
8		BlackBerry: function() {
9			return navigator.userAgent.match(/BlackBerry/i);
10		},
11		iOS: function() {
12			return navigator.userAgent.match(/iPhone|iPad|iPod/i);
13		},
14		Opera: function() {
15			return navigator.userAgent.match(/Opera Mini/i);
16		},
17		Windows: function() {
18			return navigator.userAgent.match(/IEMobile/i);
19		},
20		any: function() {
21			return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
22		}
23	};
24
25	$(".product-main nav > ul > li").live('click', function() {
26		var show = true;
27		if ($(this).find(".arrow").hasClass('active'))
28			var show = false;
29		$("nav > ul li").find("ul:first").stop(true, true).fadeOut()
30		$("nav > ul li").find(".arrow").removeClass('active');
31		$("nav > ul li").removeClass('active');
32		/*$(this).find('a:first').css('border-bottom','1px dotted #9B9C9C');*/
33		if (show) {
34			$(this).find("ul:first").stop(true, true).fadeIn();
35			$(this).find(".arrow").addClass('active');
36			$(this).addClass('active');
37			/*$(this).find('a:first').css('border-bottom','none');*/
38		}
39		return false;
40	});
41	$(".product-main nav ul li ul li a").live('click', function() { window.location($(this).attr('href'));});
42	
43	$(".equipment-slider ul > li > a").hover(function(e) {
44        $(this).find("img:nth-child(3)").stop(true, true).fadeIn();
45		$(this).find("div").stop(true, true).fadeIn();
46    }, function(){
47		$(this).find("img:nth-child(3)").stop(true, true).fadeOut();
48		$(this).find("span").stop(true, true).fadeOut();
49	});
50	
51	$(".fancybox").fancybox({titlePosition:'inside'});
52	$(".fancybox-photo")
53		.attr('rel', 'gallery')
54	    .fancybox({
55        	helpers: {
56            	thumbs: {
57                	width  : 40,
58                	height : 40,
59                	source  : function(current) {
60                    	return $(current.element).data('thumbnail');
61	                }
62    	        }
63        	}
64		}
65    );
66	
67	$('.jcarousel').jcarousel({});
68	$('.jcarousel-prev').jcarouselControl({
69        target: '-=1'
70    });
71
72    $('.jcarousel-next').jcarouselControl({
73        target: '+=1'
74    });
75	
76	if (isMobile.any()) {
77		$('.production-wrapper').remove();
78		$('.equipment-slider').addClass('main');
79	}
80	else {
81		var line = $('.production-line').jScrollPane({
82			height: 147,
83			verticalDragMinHeight: 38,
84			verticalDragMaxHeight: 38,
85			horizontalDragMinWidth: 183,
86			horizontalDragMaxWidth: 183,
87			animateScroll: true,
88		});
89		if (line.data('jsp')) {
90			var line_api = line.data('jsp');
91			line_api.scrollToX(1200,0);
92		}
93	}
94	
95	$('.production-line.jspScrollable').css('overflow','visible');
96	$('.production-line .jspContainer').css('overflow','visible');
97
98	$('.description-tabs > ul > li > a').live('click', function() {
99		if ($(this).parent().hasClass('active')==false) {
100			if ($(this).closest('.description-tabs').find('ul > li:first').hasClass('active')==false) {
101				$($(this).closest('.description-tabs').find('.tab').css('border-top-left-radius','0'));
102			}
103			else {
104				$($(this).closest('.description-tabs').find('.tab').css('border-top-left-radius','5'));
105			}
106			$(this).closest('.description-tabs').find('ul li').removeClass('active');
107			$(this).parent().addClass('active');
108			$(this).closest('.description-tabs').find('.tab').hide();
109			$(this).closest('.description-tabs').find('.tab').removeClass('active');
110			$('.tab#'+$(this).data('link')).addClass('active');
111			$('.tab#'+$(this).data('link')).slideToggle(function(){});
112		}
113		return false;
114	});
115
116    if ($('body').width() > 768) {
117		$('.additional-goods').jScrollPane({
118			height: 147,
119			verticalDragMinHeight: 13,
120			verticalDragMaxHeight: 13,
121			horizontalDragMinWidth: 133,
122			horizontalDragMaxWidth: 133,
123			animateScroll: true,
124		});
125
126		$('.vertical-goods').jScrollPane({
127			height: 147,
128			verticalDragMinHeight: 123,
129			verticalDragMaxHeight: 145,
130			horizontalDragMinWidth: 133,
131			horizontalDragMaxWidth: 133,
132			animateScroll: true,
133		});
134    }
135	
136	
137	$('input').iCheck({
138		checkboxClass: 'icheckbox_flat-blue',
139		radioClass: 'iradio_flat-blue'
140	});
141	
142	var product_main_pad = (($(document).width()-960) / 2)/($(document).width()/100);
143	$('.product-main nav ul ul').css('padding', '30px '+product_main_pad+'% 40px '+product_main_pad+'%');
144        
145        /*var top_menu_pad = (($(document).width()-960) / 2)/($(document).width()/100);
146	$('.submenu').css('padding', '30px '+product_main_pad+'% 40px '+product_main_pad+'%');*/
147	
148	$('.filter').live('click',function(){
149		if ($(this).hasClass('all')) {
150			$(this).closest('.filters').find('input').removeAttr('checked');
151			$(this).find('input').iCheck('check');
152		}
153		else if ($(this).hasClass('active')) {
154			$(this).find('input').iCheck('uncheck');
155		}
156		else {
157			$(this).find('input').iCheck('check');
158		}
159		$('form[name="arrFilter_form"]').submit();
160	});
161
162	$('.filter input').on('ifChanged', function(event){
163		if ($(this).closest('.filter').hasClass('active'))
164			$(this).closest('.filter').removeClass('active');
165		else
166			$(this).closest('.filter').addClass('active');
167
168		if ($(this).closest('.filter').hasClass('all')) {
169			$(this).closest('.filters').find('input').removeAttr('checked');
170		}
171
172		$('form[name="arrFilter_form"]').submit();
173	});
174	/*
175	$("a.popup-video, li.video a").click(function() {
176		var video_link = $(this).data('href');
177		video_link = video_link.replace(/youtu.be\/(.+)/, "www.youtube.com\/watch\?v\=$1&autoplay=1");
178    	$.fancybox({
179            'padding'       : 10,
180            'autoScale'     : true,
181            'transitionIn'  : 'none',
182            'transitionOut' : 'none',
183            'title'         : $(this).attr('title'),
184            'width'     	: 640,
185            'height'        : 390,
186            'href'          : video_link.replace(new RegExp("watch\\?v=", "i"), 'v/'),
187            'type'          : 'swf',
188            'swf'           : {
189                'wmode'        : 'transparent',
190                'allowfullscreen'   : true,
191            },	
192			//'allowfullscreen'   : true;
193            });
194    });
195	*/
196	$("a.popup-video, li.video a").click(function(e) {
197		e.preventDefault();
198	
199		var video_link = $(this).data('href') || $(this).attr('href');
200
201		video_link = video_link.replace(
202			/https?:\/\/rutube\.ru\/video\/([^\/\?]+)\/?/i,
203			'https://rutube.ru/play/embed/$1/'
204		);
205	
206		$.fancybox({
207			padding: 10,
208			autoScale: true,
209			transitionIn: 'none',
210			transitionOut: 'none',
211			title: $(this).attr('title'),
212			width: 640,
213			height: 390,
214			href: video_link,
215			type: 'iframe'
216		});
217	});
218	
219	$('.description-tabs ul li:first, .description-tabs .tab:first').addClass('active');
220	
221	$('.fotorama-mask, li.photogallery a, .fotorama__img').live('click', function() {
222 		var $fotoramaDiv = $('.fotorama').fotorama();
223    	var fotorama = $fotoramaDiv.data('fotorama');
224		fotorama.requestFullScreen();
225		return false;
226	})
227
228	$(".fullscreen-click").hover(
229		function(e) {$('div.fotorama__wrap').removeClass('fotorama__wrap--no-controls');},
230		function(){ $('div.fotorama__wrap').addClass('fotorama__wrap--no-controls');});
231	
232	$('.fotorama-new-prev, .fotorama-new-line-prev').live('click', function() {
233 		var $fotoramaDiv = $('.fotorama').fotorama();
234    	var fotorama = $fotoramaDiv.data('fotorama');
235		fotorama.show('<');
236		return false;
237	});
238	$('.fotorama-new-next, .fotorama-new-line-next').live('click', function() {
239 		var $fotoramaDiv = $('.fotorama').fotorama();
240    	var fotorama = $fotoramaDiv.data('fotorama');
241		fotorama.show('>');
242		return false;
243	});
244	
245	$('.partners-form select').change(function() {
246		$(this).closest('form').submit();
247	})
248	
249	$('.telescopic').click(function(e){		
250		if ($(this).hasClass('telescopic-click')) {
251			$(this).next().fadeOut();
252			$(this).removeClass('telescopic-click');			
253		}
254		else {
255			$(this).next().fadeIn();
256			$(this).addClass('telescopic-click');
257		}
258	});
259	
260	$('.sitemap a').click(function(e){		
261		var dropDown = $(this).parent().next();
262		$('.dropdown').not(dropDown).slideUp('slow');
263		dropDown.slideToggle('slow');
264		e.preventDefault();				
265	});
266	
267	var owl = $("#owl-video");  
268	$('.video-item-other .owl-carousel').owlCarousel({
269	  items: 3,
270      itemsDesktop: [1200, 3],
271      itemsDesktopSmall: [992, 3],
272	  itemsTablet: [768,1],
273	  itemsMobile : [320,1]
274    });
275   
276  	$(".video-item-other .next").click(function(){$(this).closest('.customNavigation').prev().trigger('owl.next')}) 
277  	$(".video-item-other .prev").click(function(){$(this).closest('.customNavigation').prev().trigger('owl.prev')})
278
279	$(".fancybox.ajax.order").fancybox({closeBtn:false,padding:0});
280	
281	function hide(obj) {
282    	var el = document.getElementById(obj);
283        el.hide();
284	}
285
286	if($('#offset').length)
287		$('html, body').animate({
288        	scrollTop: $("#offset").offset().top
289    	}, 0);
290    	
291    $('.equipment-slider').width($(document).width());
292    $('.company-wrapper').width($(document).width());
293    
294    $(window).resize(function(){
295    	$('.equipment-slider').width($(document).width());
296    	$('.company-wrapper').width($(document).width());
297    });
298	
299	$(document).ready(function() {
300$(".fancybox").fancybox({
301openEffect:'none',
302closeEffect:'none',
303maxWidth: '1054',
304maxHeight:'712',
305});
306$(".fancybox-thumb").fancybox({
307prevEffect:'none',
308nextEffect:'none',
309helpers:{title:{type:'outside'},
310thumbs:{width:50,height:50}}});}); 
311
312	$('.catalog-goods .owl-carousel').owlCarousel({
313		items:1,
314        itemsDesktop: [1200, 1],
315        itemsDesktopSmall: [992, 1],
316        itemsTablet: [768,1],
317        itemsMobile : [320,1]
318	});
319	$('.catalog-goods .owl-pagination').css('display','none');  
320 
321  	$(".catalog-goods .next").click(function(){$(this).closest('.owl-nav').prev().trigger('owl.next')}) 
322  	$(".catalog-goods .prev").click(function(){$(this).closest('.owl-nav').prev().trigger('owl.prev')})
323
324
325	
326	
327});

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.