PageSourceSearch

https://usedata.ru/js/usedata/2019/common.js

js usedata.ru collected 2026-09-30 18:07:38 UTC 4,475 bytes, 160 lines download raw bytes

1(function($) {
2	$(function() {
3		/*
4		Carousel initialization
5		*/
6		$('.jcarousel')
7			.jcarousel({
8				// Options go here
9			});
10
11		/*
12			Prev control initialization
13		 */
14		$('.jcarousel-control-prev')
15		.on('jcarouselcontrol:active', function() {
16			$(this).removeClass('inactive');
17		})
18		.on('jcarouselcontrol:inactive', function() {
19			$(this).addClass('inactive');
20		})
21		.jcarouselControl({
22			// Options go here
23			target: '-=1'
24		});
25
26		/*
27			Next control initialization
28		*/
29		$('.jcarousel-control-next')
30		.on('jcarouselcontrol:active', function() {
31			$(this).removeClass('inactive');
32		})
33		.on('jcarouselcontrol:inactive', function() {
34			$(this).addClass('inactive');
35		})
36		.jcarouselControl({
37			// Options go here
38			target: '+=1'
39		});
40
41		/*
42		Pagination initialization
43		*/
44		$('.jcarousel-pagination')
45		.on('jcarouselpagination:active', 'a', function() {
46			$(this).addClass('active');
47		})
48		.on('jcarouselpagination:inactive', 'a', function() {
49			$(this).removeClass('active');
50		})
51		.jcarouselPagination({
52			// Options go here
53		});
54	});
55
56	// Sticky header
57	$(window).on("scroll touchmove", function () {
58		$('.navigation').toggleClass('is-sticky', $(document).scrollTop() > 0);
59	});
60
61	// $('form.mc-embedded-subscribe-form').each( function () { $(this).mailchimpForm() } );
62
63	// Teaser
64	var $topline = $('.n-topline');
65	$('.n-topline__l', $topline).load('/topline-left.html', function(){
66		$('.n-topline__r', $topline).load('/topline-right.html', function(){
67			$topline.animate( { top: 0 }, 300 );
68		});
69	});
70	var pollIsShown = false;
71	// Exit poll
72	if ( 0 && location.search.indexOf('utm_source') != -1 ) {
73		var
74			pageLoadedAt = new Date,
75			O = {x: 0,y: 0};
76
77		$("body").bind("mouseleave", function( event ) {
78			var el = event.relatedTarget || event.toElement;
79			var tolerancy = $(window).height() / 5;
80			if ((!el || el.nodeName == "HTML") && event.clientY <= 0 && (O.y <= 0 || O.y < tolerancy) && ! pollIsShown && (new Date - pageLoadedAt > 10000)) {
81				pollIsShown = true;
82				$.get( '/popup/exit-poll.html' ).done( function ( html ) {
83					$('html, body').animate({ scrollTop: 0 }, 500 );
84					var $popup = $(html);
85					$('body').append( $(html) );
86					$('.overlay').on('click', function () {
87						$(this).hide();
88						$(this).next('.poll-popup').hide();
89					});
90					$(document).on('keydown', function(e){
91						if ( e.which == 27 ) {
92							$('.overlay').hide();
93							$('.poll-popup').hide();
94						}
95					});
96					$('button.close').on('click', function(e){
97						$('.overlay').hide();
98						$('.poll-popup').hide();
99					});
100					$('input#quest368650').val( location.search );
101				});
102			}
103		}).bind("mousemove", function( event ) {
104			O.x = event.clientX;
105			O.y = event.clientY;
106		});
107	}
108
109	// Register button
110	$('.js-register-button').on('click', function () {
111		var h = window.innerHeight * 0.8;
112		var win = window.open( $(this).attr('href') + '?popup=2', '_blank', 'width=992, height=700, resizable=yes,' +
113			' left=100, top=0, toolbar=no, location=no' );
114		if ( win != null ) {
115			if ( window.Ontico == undefined ) {
116				window.Ontico = {};
117			}
118			window.Ontico.wasBooked = false;
119			var waitingForPopupClose = setInterval( function () {
120				if ( win.closed ) {
121					clearInterval( waitingForPopupClose );
122					if ( 0 && ! window.Ontico.wasBooked && ! pollIsShown ) {
123						$.get( '/popup/poll.html' ).done( function ( html ) {
124							$('html, body').animate({ scrollTop: 0 }, 500 );
125							pollIsShown = true;
126							$('body').append( $(html) );
127							$('.overlay').on('click', function () {
128								$(this).hide();
129								$(this).next('.poll-popup').hide();
130							});
131							$(document).on('keydown', function(e){
132								if ( e.which == 27 ) {
133									$('.overlay').hide();
134									$('.poll-popup').hide();
135								}
136							});
137							$('button.close').on('click', function(e){
138								$('.overlay').hide();
139								$('.poll-popup').hide();
140							});
141							$('input#quest368680').val( location.search );
142						});
143					}
144				}
145			}, 300);
146			// listen to message
147			$(window).on('message', function ( e ) {
148				var event = e.originalEvent;
149				var yaCounter = window['yaCounter45786261'];
150
151				if ( event.data == 'Ontico.booked' && event.origin == 'http://conf.ontico.ru' ) {
152					Ontico.wasBooked = true;
153					if ( window.fbq ) fbq('track', 'Purchase', {value: '0.00', currency:'USD'});
154					if ( yaCounter ) yaCounter.reachGoal( 'book_tickets', {} );
155				}
156			});
157			return false;
158		}
159	});
160})(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.