PageSourceSearch

https://m-c-m-e.ru/eng/wp-content/themes/Kabuto/js/jquery.footer.custom.js?ver=6.8.10

js m-c-m-e.ru collected 2026-10-03 23:48:42 UTC 9,724 bytes, 302 lines download raw bytes

1/*-----------------------------------------------------------------------------------*/
2/*	Custom Footer JS
3/*-----------------------------------------------------------------------------------*/
4
5jQuery.fn.topLink = function(settings) {
6	settings = jQuery.extend({
7		min: 1,
8		fadeSpeed: 200,
9		ieOffset: 50
10	}, settings);
11	return this.each(function() {
12		//listen for scroll
13		var el = jQuery(this);
14		el.css('display','none'); //in case the user forgot
15		jQuery(window).scroll(function() {
16			if(!jQuery.support.hrefNormalized) {
17				el.css({
18					'position': 'absolute',
19					'top': jQuery(window).scrollTop() + jQuery(window).height() - settings.ieOffset
20				});
21			}
22			if(jQuery(window).scrollTop() >= settings.min)
23			{
24				el.fadeIn(settings.fadeSpeed);
25			}
26			else
27			{
28				el.fadeOut(settings.fadeSpeed);
29			}
30		});
31	});
32};
33
34(function($) {
35	"use strict";
36	
37	// Capture page elements
38	var $pageContent = $('.main-content');
39	var $portfolioContainer = $('#isotope-trigger');
40	var $filterCategories = $('.filter-category');
41	var $dropdownContainer = $('.dropdown-container');
42	var $dropdownContent = $('.dropdown-content');
43	var $mobileMenu = $('.mobile-menu');
44	var $mobileSearchForm = $('.header-buttons #main-search-form'); 
45	var isIE9 = $('html').hasClass('ie9');	
46	
47	
48	/*-----------------------------------------------------------------------------------*/
49	/*	Isotope
50	/*-----------------------------------------------------------------------------------*/
51	
52	/* Display the filter categories, or hide them */
53	$('.filter-button').click(function(e) {	
54		e.preventDefault();	 
55		$(this).toggleClass('filter-active');
56		
57		if(Modernizr.csstransitions) { 
58			if (!$filterCategories.first().hasClass('stop')) { // Continue if the filter categories don't have a class "stop"
59				$filterCategories.show();
60	        	$filterCategories.stop().transition({ opacity: 1, y: '0px' }, 300).addClass('stop'); // Show the categories and add the class "stop"
61			} else { 
62		        $filterCategories.transition({ opacity: 0, y: '50%' }, 300, function () { $(this).hide(); }).removeClass('stop'); // Hide the categories and remove "stop"
63			}
64		}
65		else {
66			if($(this).hasClass('filter-active')) {
67				// Show	
68				$filterCategories.show();
69				$filterCategories.stop().animate({ opacity: 1 }, 300);	
70			}
71			else {
72				// Hide
73				$filterCategories.stop().animate({ opacity: 0 }, 300, function () { $(this).hide(); });
74			}
75		}
76	});
77	
78	/* filter items with an isotope filter animation, when one of the filter links is clicked */
79	if($('body').hasClass('single-portfolio') || $('body').hasClass('page-template-template-portfolio-php')) {
80		$('.portfolio-filter a').click(function(e) {	
81			e.preventDefault();
82			
83			var selector = $(this).attr('data-filter');
84		 	$portfolioContainer.isotope({ filter: selector });
85			  	
86		});
87	}
88	
89	/* Reset the active class on all the buttons and assign it to the currently active category */
90	$('.portfolio-filter .filter-category a').click(function() { 				
91		$('.portfolio-filter li').removeClass('active'); 
92		$(this).parent().addClass('active'); 
93	});
94	
95	/* Initialize Isotope */ 
96	$portfolioContainer.imagesLoaded(function() {
97		
98		/* Get the widths of isotope thumbnails, depending on the current screen size */	
99		function getThumbWidth() {
100			var windowWidth = $(window).width();
101			
102			if(windowWidth <= 400) {
103				return Math.floor($portfolioContainer.width());
104			}
105			else if(windowWidth <= 855) {
106				return Math.floor($portfolioContainer.width() / 2);
107			}
108			else if(windowWidth <= 1280) {
109				return Math.floor($portfolioContainer.width() / 3);
110			}
111			else if(windowWidth <= 1480) {
112				return Math.floor($portfolioContainer.width() / 4);
113			}
114			else if(windowWidth <= 1880) {
115				return Math.floor($portfolioContainer.width() / 5);
116			}
117			else if(windowWidth <= 2280) {
118				return Math.floor($portfolioContainer.width() / 6);
119			}
120			else if(windowWidth <= 2680) {
121				return Math.floor($portfolioContainer.width() / 7);
122			}
123			else if(windowWidth <= 3080) {
124				return Math.floor($portfolioContainer.width() / 8);
125			}
126		}
127				
128		function setThumbWidth() {
129			var thumbWidth = getThumbWidth();
130			$portfolioContainer.children().css({ width: thumbWidth });
131		}
132		setThumbWidth();
133		
134		$portfolioContainer.isotope({
135			layoutMode: 'masonry',
136			masonry: {
137            	columnWidth: getThumbWidth()
138            }
139        });
140        
141        $(window).smartresize(function() {
142        	setThumbWidth();
143        	 
144			$portfolioContainer.isotope({
145            	masonry: {
146                	columnWidth: getThumbWidth()
147				}
148			});
149        });
150    });
151	
152	
153	/*-----------------------------------------------------------------------------------*/
154	/*	Superfish Drop-Down Menu
155	/*-----------------------------------------------------------------------------------*/
156	
157	if ( jQuery().superfish ) {
158		
159		$('.menu-container ul').superfish({
160			delay: 700,
161			animation: { opacity: 'show', height: 'show' },
162			speed: 250,
163			speedOut: 150,
164			autoArrows: false,
165			dropShadows: false
166		}); 
167		
168	}
169	
170	
171	/*-----------------------------------------------------------------------------------*/
172	/*	Drop-down Page
173	/*-----------------------------------------------------------------------------------*/
174		
175	var $dropDownWrapper = $( '#dropdown-wrapper' );
176	
177	if ( $dropDownWrapper.length ) { 
178			
179		$('#dropdown-trigger').click(function() {
180			
181			var pageHeight = $('.dropdown-page').outerHeight(true); // Get the height, while including the top and bottom padding of the drop-down page
182			var wrapperHeight = $dropDownWrapper.height();	
183				
184			// Animate the height of the wrapper, depending on the current state (visible or not)			
185			if( wrapperHeight == 0 ) {
186				$('.drop-down-arrows').addClass('arrow-up');
187				
188				if(Modernizr.csstransitions) {
189					$dropDownWrapper.transition({ height: pageHeight }, 500, 'easeOutCubic', function() {
190						$(this).css('height', 'auto');
191					});	
192				}
193				else {
194					$dropDownWrapper.animate({ height: pageHeight }, 500, 'easeOutCubic', function() {
195						$(this).css('height', 'auto');	
196					});	
197				}
198			}
199			else {
200				$('.drop-down-arrows').removeClass('arrow-up');
201				
202				if(Modernizr.csstransitions) {
203					$dropDownWrapper.height($('.dropdown-page').outerHeight(true));
204					$dropDownWrapper.transition({ height: 0 }, 500, 'easeOutCubic' );	
205				}
206				else {
207					$dropDownWrapper.animate({ height: 0 }, 500, 'easeOutCubic' );	
208				}
209			}
210			
211			$( 'body, html' ).animate({ scrollTop: 0 }, 200, 'easeOutCubic' );
212			
213		});
214		
215	}
216	
217
218	/*-----------------------------------------------------------------------------------*/
219	/*	Responsive Videos
220	/*-----------------------------------------------------------------------------------*/
221	
222	$pageContent.fitVids(); 
223	
224	
225	/*-----------------------------------------------------------------------------------*/
226	/*	Scroll back to top
227	/*-----------------------------------------------------------------------------------*/
228	
229	$('#back-to-top').topLink({
230		min: 200,
231		fadeSpeed: 500
232	});
233	
234	//smoothscroll
235	$('#back-to-top').click(function(e) {
236		e.preventDefault();
237		$('html, body').animate({ scrollTop: 0 }, 700, 'easeOutCubic');
238	});
239	
240	
241	/*-----------------------------------------------------------------------------------*/
242	/*	Comment Form Placeholders for IE9
243	/*-----------------------------------------------------------------------------------*/
244	
245	if (isIE9) {
246		
247		var authorPlaceholder = $('#commentform #author').attr('placeholder');
248		var emailPlaceholder = $('#commentform #email').attr('placeholder');
249		var urlPlaceholder = $('#commentform #url').attr('placeholder');
250		var commentPlaceholder = $('#commentform #comment').attr('placeholder');		
251				
252		$('#commentform #author').val(authorPlaceholder);
253		$('#commentform #email').val(emailPlaceholder);
254		$('#commentform #url').val(urlPlaceholder);
255		$('#commentform #comment').val(commentPlaceholder);
256		
257		$('#commentform input, #commentform textarea').focus(function() {
258			if($(this).attr('id') == 'author') {
259				if ($(this).val() == authorPlaceholder) { $(this).val(''); }
260			}
261			else if($(this).attr('id') == 'email') {
262				if ($(this).val() == emailPlaceholder) { $(this).val(''); }
263			}
264			else if($(this).attr('id') == 'url') {
265				if ($(this).val() == urlPlaceholder) { $(this).val(''); }
266			}
267			else if($(this).attr('id') == 'comment') {
268				if ($(this).val() == commentPlaceholder) { $(this).val(''); }
269			}
270		});
271		
272		$('#commentform input, #commentform textarea').blur(function() {
273			if($(this).attr('id') == 'author') {
274				if ($(this).val() == '') { $(this).val(authorPlaceholder); }
275			}		
276			else if($(this).attr('id') == 'email') {
277				if ($(this).val() == '') { $(this).val(emailPlaceholder); }
278			}
279			else if($(this).attr('id') == 'url') {
280				if ($(this).val() == '') { $(this).val(urlPlaceholder); }
281			}
282			else if($(this).attr('id') == 'comment') {
283				if ($(this).val() == '') { $(this).val(commentPlaceholder); }
284			}
285		});
286	
287	}
288	
289	
290	/*-----------------------------------------------------------------------------------*/
291	/*	Contact Form 7 ajax loader image in the main content area
292	/*-----------------------------------------------------------------------------------*/
293		
294	$(window).load(function() {
295		var $ajaxLoaderImg = $('.main-container .wpcf7 .ajax-loader');
296		
297		if($ajaxLoaderImg.length) {		
298			$ajaxLoaderImg.attr('src', footerJS.loaderurl);
299		}
300	});
301	
302})( jQuery );

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.