PageSourceSearch

https://amuzteatr.ru/wp-content/themes/presso/js/main.js?ver=1.0

js amuzteatr.ru collected 2026-10-02 18:09:53 UTC 5,630 bytes, 190 lines download raw bytes

1/* -----------------------------------------------------------------------------
2 * Document ready
3 * -------------------------------------------------------------------------- */
4;(function( $, window, document, undefined ){
5	"use strict";
6	
7	$( document ).ready( function ($) {
8		
9		// Add swipe box into gallery
10		$(".swipebox, .custom-gallery a, iv[id^=attachment_] a[href$=jpg], div[id^=attachment_] a[href$=jpeg], div[id^=attachment_] a[href$=png], .post-content a[href$=jpg], .post-content a[href$=png], .post-content a[href$=jpeg]").each( function( i, el ) {
11			var $this = $( el );
12
13			if ( ! $this.attr( 'title' ) ) {
14				$this.attr( 'title', $this.find( 'img' ).attr( 'alt' ) );
15			}
16		}).swipebox();
17
18		// Wordpress gallery grid
19		$( '.custom-gallery' ).each( function ( i, el ) {
20			var $gallery =  $( el );
21			var layout = $gallery.attr( 'data-gallery-layout' );
22			if ( ! ( parseInt( layout, 10 ) > 0 ) ) {
23				layout = '213'; // Default layout
24			}
25
26			layout = layout.split('');
27			var columnLayout = [];
28			for (var i in layout ) {
29				var columnCount = parseInt( layout[i], 10 );
30				var columnWidth = 100.0 / columnCount;
31				for ( var j = 1; j <= columnCount; j++ ) {
32					columnLayout.push( columnWidth );
33				}
34			}
35
36			$gallery.find( '> figure' ).each( function( i, el ) {
37				var $el = $( el );
38				var layoutIndex = i % columnLayout.length;
39				$el.css( 'width', columnLayout[ layoutIndex ] - 1 + '%' );
40			} );
41		} );
42
43		// Fit images
44		$( '.vw-imgliquid' ).imgLiquid();
45
46		// Show circle graph for review box
47		$(".dial").knob();
48
49		//  Instant search
50		$(".instant-search-icon").instant_search();
51
52		// Sticky top bar
53		$(".top-bar").sticky();
54
55		// carouFredSel
56		$(".top-posts .top-posts-inner").carouFredSel({
57			auto: true,
58			swipe: true,
59			mousewheel: true,
60			align: 'left',
61			width: '100%',
62			items: {
63				start: -1,
64				width: 'auto',
65				visible: function( visibleItems ) {
66					var viewportWidth  = document.documentElement.clientWidth;
67
68					/* md device */ if ( viewportWidth >= 992 ) return 4;
69					/* sm device */if ( viewportWidth >= 768 ) return 3;
70					return 2;
71				},
72			},
73			scroll: {
74				items: 1,
75				easing: "quadratic",
76				duration: 500,
77				pauseOnHover: true,
78				onAfter: function() {
79					$.force_appear();
80				}
81			},
82			prev: ".carousel-nav-prev",
83			next: ".carousel-nav-next",
84			onCreate: function( data ) {
85				var $this = $(this)
86				setTimeout( function() {
87					$this.trigger("slideTo", 0);
88				}, 250 );
89			}
90		});
91
92		$(window).resize(function() {
93			$(".top-posts .top-posts-inner").trigger('configuration', ['debug', false, true]);
94		});
95
96		// -----------------------------------------------------------------------------
97		// Mobile navigation
98		// 
99		var $body = $('body');
100
101		$('#open-mobile-nav').click( function( e ) {
102			$body.toggleClass('mobile-nav-open');
103			$( 'body,html' ).scrollTop( 0 );
104			return false;
105		} );
106
107		var defaultWindowWidth = $(window).width();
108		$(window).resize(function() {
109			if ( defaultWindowWidth != $(window).width() ) {
110				$body.removeClass('mobile-nav-open');
111			}
112		});
113
114		var $mobile_nav = $('#mobile-nav-wrapper');
115
116		var $clone_main_nav = $('#main-nav-wrapper').children().clone();
117		$clone_main_nav.find( '.sub-posts' ).remove();
118		$clone_main_nav = $clone_main_nav.removeAttr('id').removeClass('main-nav').addClass('mobile-nav');
119
120		var $clone_top_nav = $('#top-nav-wrapper').children().clone();
121		$clone_top_nav.find( '.sub-posts' ).remove();
122		$clone_top_nav = $clone_top_nav.removeAttr('id').removeClass('top-nav').addClass('mobile-nav');
123
124		$mobile_nav.append( $clone_main_nav, $( '<hr>' ), $clone_top_nav );
125
126		// -----------------------------------------------------------------------------
127		// Navigation Sub-menu
128		// 
129		$( '.main-nav .menu-item' ).hover(
130			function() {
131				$( '> .sub-menu' , this )
132					.stop( true, true )
133					.fadeIn( { duration: 250 } );
134
135			}, function() {
136				$( '> .sub-menu' , this )
137					.stop( true, true )
138					.fadeOut( { duration: 250 } );
139		} );
140
141		// -----------------------------------------------------------------------------
142		// Fitvids - keep video ratio
143		// 
144		$( '.post-audio-wrapper, .post-video-wrapper, .flxmap-container, .comment-body, .post-content, #footer' ).fitVids( { customSelector: "iframe[src*='maps.google.']", ignore: '.vw-ignore-fitvids' });
145
146		// -----------------------------------------------------------------------------
147		// Isotope - Mansonry grid
148		// 
149		var $isotope_list = $('.vw-isotope');
150		$isotope_list.imagesLoaded( function () {
151			var options = {};
152			if ( $( 'body' ).hasClass( 'rtl' ) ) {
153				options.isOriginLeft = false;
154			}
155
156			$isotope_list.isotope( options );
157
158			$(window).resize(function() {
159				$isotope_list.isotope('layout');
160			});
161		});
162
163		// -----------------------------------------------------------------------------
164		// Back to top
165		//
166		$( '.back-to-top' ).click( function() {
167			$( 'body,html' ).animate( {	scrollTop: 0 } );
168			return false;
169		} );
170
171		// -----------------------------------------------------------------------------
172		// Appear
173		//
174		$( 'body.site-enable-post-box-effects .post-box.animated-content' ).data( 'appear-top-offset', 100 ).on( 'appear', function( event, $all_appeared_elements ) {
175			$all_appeared_elements.removeClass( 'animated-content' ).addClass( 'appeared' );
176		} ).appear( { force_process: false } );
177
178		if ( $( 'html' ).hasClass( 'no-touch' ) ) {
179			$( document ).scrollTop( 1 );
180		}
181
182	} );
183})( jQuery, window , document );
184
185/**
186 * No-touch detection
187 */
188if (!("ontouchstart" in document.documentElement)){ 
189    document.documentElement.className += " no-touch"; 
190}

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.