PageSourceSearch

https://www.russianembassy.org/wp-content/plugins/modeltheme-framework/js/modeltheme-custom.js?ver=1.0.0

js russianembassy.org collected 2026-10-01 12:13:41 UTC 10,453 bytes, 373 lines download raw bytes

1/*
2 Project name:       MODELTHEME
3 Project author:     ModelTheme
4 File name:          Custom JS
5*/
6
7
8
9jQuery(document).ready(function() {
10
11    // MT Video Shortcode
12    if ( jQuery( ".popup-vimeo-video" ).length ) {
13        jQuery(".popup-vimeo-video").magnificPopup({
14            type:"iframe",
15            disableOn: 700,
16            removalDelay: 160,
17            preloader: false,
18            fixedContentPos: false
19        });
20    }
21
22    if ( jQuery( ".popup-vimeo-youtube" ).length ) {
23        jQuery(".popup-vimeo-youtube").magnificPopup({
24            type:"iframe",
25            disableOn: 700,
26            removalDelay: 160,
27            preloader: false,
28            fixedContentPos: false
29        });
30    }
31
32
33    // MT Countdown v2
34    if ( jQuery( ".clock" ).length ) {
35        var clock;
36        var currentDate = new Date();
37        var element_date = jQuery('.clock').attr('data-date');
38        var inserted_date = new Date(element_date);
39        var diff = inserted_date.getTime() / 1000 - currentDate.getTime() / 1000;
40        clock = jQuery(".clock").FlipClock(diff, {
41            clockFace: "DailyCounter",
42            countdown: true
43        });
44    }
45
46
47});
48
49
50
51// TIMELINE VERTICAL
52jQuery(document).ready(function($){
53  var timelineBlocks = $('.cd-timeline-block'),
54    offset = 0.8;
55
56  //hide timeline blocks which are outside the viewport
57  hideBlocks(timelineBlocks, offset);
58
59  //on scolling, show/animate timeline blocks when enter the viewport
60  $(window).on('scroll', function(){
61    (!window.requestAnimationFrame) 
62      ? setTimeout(function(){ showBlocks(timelineBlocks, offset); }, 100)
63      : window.requestAnimationFrame(function(){ showBlocks(timelineBlocks, offset); });
64  });
65
66  function hideBlocks(blocks, offset) {
67    blocks.each(function(){
68      ( $(this).offset().top > $(window).scrollTop()+$(window).height()*offset ) && $(this).find('.cd-timeline-img, .cd-timeline-content, .cd-date, .timeline_item_title, .timeline_item_content').addClass('is-hidden');
69    });
70  }
71
72  function showBlocks(blocks, offset) {
73    blocks.each(function(){
74      ( $(this).offset().top <= $(window).scrollTop()+$(window).height()*offset && $(this).find('.cd-timeline-img').hasClass('is-hidden') ) && $(this).find('.cd-timeline-img, .cd-timeline-content, .cd-date, .timeline_item_title, .timeline_item_content').removeClass('is-hidden').addClass('bounce-in');
75    });
76  }
77});
78
79function altrows(firstcolor,secondcolor)
80{
81    var tableElements = document.getElementsByClassName("compare_table_section") ;
82    for(var j = 0; j < tableElements.length; j++)
83    {
84        var table = tableElements[j] ;
85
86        var rows = table.getElementsByTagName("tr") ;
87        for(var i = 0; i <= rows.length; i++)
88        {
89            if(i%2==0){
90                rows[i].style.backgroundColor = firstcolor ;
91            }
92            else{
93                rows[i].style.backgroundColor = secondcolor ;
94            }
95        }
96    }
97}
98
99  if ( jQuery( "#grid" ).length ) {
100    (function() {
101
102      function init() {
103        var speed = 300,
104          easing = mina.backout;
105
106        [].slice.call ( document.querySelectorAll( '#grid a' ) ).forEach( function( el ) {
107          var s = Snap( el.querySelector( 'svg' ) ), path = s.select( 'path' ),
108            pathConfig = {
109              from : path.attr( 'd' ),
110              to : el.getAttribute( 'data-path-hover' )
111            };
112
113          el.addEventListener( 'mouseenter', function() {
114            path.animate( { 'path' : pathConfig.to }, speed, easing );
115          } );
116
117          el.addEventListener( 'mouseleave', function() {
118            path.animate( { 'path' : pathConfig.from }, speed, easing );
119          } );
120        } );
121      }
122
123      init();
124
125    })();
126  }
127
128
129
130
131
132(function ($) {
133  'use strict';
134
135  jQuery( document ).ready(function() {
136    /*
137    * ||||||||||||||||||||||||||||||||||||||||||||||||||||||||-> TESTIMONIALS01 SLIDER (Shortcode)
138    */
139    jQuery(".testimonials-container").owlCarousel({
140        navigation      : false, // Show next and prev buttons
141        pagination      : true,
142        autoPlay        : false,
143        slideSpeed      : 700,
144        paginationSpeed : 700,
145        itemsCustom : [
146            [0,     1],
147            [450,   1],
148            [600,   2],
149            [700,   2],
150            [1000,  2],
151            [1200,  2],
152            [1400,  2],
153            [1600,  2]
154        ]
155    });
156    jQuery(".testimonials-container-1").owlCarousel({
157        navigation      : false, // Show next and prev buttons
158        pagination      : true,
159        autoPlay        : false,
160        slideSpeed      : 700,
161        paginationSpeed : 700,
162        itemsCustom : [
163            [0,     1],
164            [450,   1],
165            [600,   1],
166            [700,   1],
167            [1000,  1],
168            [1200,  1],
169            [1400,  1],
170            [1600,  1]
171        ]
172    });
173    jQuery(".testimonials-container-2").owlCarousel({
174        navigation      : false, // Show next and prev buttons
175        pagination      : true,
176        autoPlay        : false,
177        slideSpeed      : 700,
178        paginationSpeed : 700,
179        itemsCustom : [
180            [0,     1],
181            [450,   1],
182            [600,   2],
183            [700,   2],
184            [1000,  2],
185            [1200,  2],
186            [1400,  2],
187            [1600,  2]
188        ]
189    });
190    jQuery(".testimonials-container-3").owlCarousel({
191        navigation      : false, // Show next and prev buttons
192        pagination      : false,
193        autoPlay        : false,
194        slideSpeed      : 700,
195        paginationSpeed : 700,
196        itemsCustom : [
197            [0,     1],
198            [450,   1],
199            [600,   2],
200            [700,   2],
201            [1000,  3],
202            [1200,  3],
203            [1400,  3],
204            [1600,  3]
205        ]
206    });
207
208    /*
209    * ||||||||||||||||||||||||||||||||||||||||||||||||||||||||-> TWEETS SLIDER (Shortcode)
210    */
211    jQuery(".mt_tweets_slider").owlCarousel({
212      navigation      : false, // Show next and prev buttons
213      pagination      : false,
214      autoPlay        : false,
215      slideSpeed      : 700,
216      paginationSpeed : 700,
217      singleItem      : true
218    });
219
220    /*
221    * ||||||||||||||||||||||||||||||||||||||||||||||||||||||||-> CLIENTS SLIDER (Shortcode)
222    */
223    jQuery(".clients_container_shortcode-1").owlCarousel({
224        navigation      : false, // Show next and prev buttons
225        pagination      : false,
226        autoPlay        : false,
227        slideSpeed      : 700,
228        paginationSpeed : 700,
229        autoPlay : true,
230        autoPlayTimeout:10000,
231        autoPlayHoverPause:true,
232        itemsCustom : [
233            [0,     1],
234            [450,   1],
235            [600,   1],
236            [700,   1],
237            [1000,  1],
238            [1200,  1],
239            [1400,  1],
240            [1600,  1]
241        ]
242    });
243    jQuery(".clients_container_shortcode-2").owlCarousel({
244        navigation      : false, // Show next and prev buttons
245        pagination      : false,
246        autoPlay        : false,
247        slideSpeed      : 700,
248        paginationSpeed : 700,
249        autoPlay : true,
250        autoPlayTimeout:10000,
251        autoPlayHoverPause:true,
252        itemsCustom : [
253            [0,     1],
254            [450,   1],
255            [600,   2],
256            [700,   2],
257            [1000,  2],
258            [1200,  2],
259            [1400,  2],
260            [1600,  2]
261        ]
262    });
263    jQuery(".clients_container_shortcode-3").owlCarousel({
264        navigation      : false, // Show next and prev buttons
265        pagination      : false,
266        autoPlay        : false,
267        slideSpeed      : 700,
268        paginationSpeed : 700,
269        autoPlay : true,
270        autoPlayTimeout:10000,
271        autoPlayHoverPause:true,
272        itemsCustom : [
273            [0,     1],
274            [450,   1],
275            [600,   2],
276            [700,   2],
277            [1000,  3],
278            [1200,  3],
279            [1400,  3],
280            [1600,  3]
281        ]
282    });
283
284    jQuery(".clients_container_shortcode-4").owlCarousel({
285        navigation      : false, // Show next and prev buttons
286        pagination      : false,
287        autoPlay        : false,
288        slideSpeed      : 700,
289        paginationSpeed : 700,
290        autoPlay : true,
291        autoPlayTimeout:10000,
292        autoPlayHoverPause:true,
293        itemsCustom : [
294            [0,     1],
295            [450,   1],
296            [600,   2],
297            [700,   3],
298            [1000,  4],
299            [1200,  4],
300            [1400,  4],
301            [1600,  4]
302        ]
303    });
304
305
306    jQuery(".clients_container_shortcode-5").owlCarousel({
307        navigation      : false, // Show next and prev buttons
308        pagination      : false,
309        autoPlay        : false,
310        slideSpeed      : 700,
311        paginationSpeed : 700,
312        autoPlay : true,
313        autoPlayTimeout:10000,
314        autoPlayHoverPause:true,
315        itemsCustom : [
316            [0,     1],
317            [450,   2],
318            [600,   2],
319            [700,   3],
320            [1000,  4],
321            [1200,  4],
322            [1400,  5],
323            [1600,  5]
324        ]
325    });
326
327
328    // Tabs
329    jQuery('.naccs .menu div').click(function(){
330      var tab_id = jQuery(this).attr('data-tab');
331
332      jQuery('.naccs .menu div').removeClass('active');
333      jQuery('.naccs ul li').removeClass('active');
334      jQuery('.naccs .gc--1-of-3').removeClass('active');
335      jQuery('.naccs .gc--2-of-3').removeClass('active');
336
337      
338      jQuery(this).parent().parent().addClass('active');
339      jQuery("#"+tab_id).parent().parent().addClass('active');
340      jQuery(this).addClass('active');
341      jQuery("#"+tab_id).addClass('active');
342    });
343
344    jQuery(function () { 
345		jQuery('[data-toggle="tooltip"]').tooltip({trigger: 'manual'}).tooltip('show');
346	});  
347
348	jQuery( window ).scroll(function() { 
349	jQuery(".progress-bar").each(function(){
350	  var each_bar_width = jQuery(this).attr('aria-valuenow');
351	  jQuery( this ).css( "width", each_bar_width + '%');
352	});
353	});
354
355
356  });
357} (jQuery) )
358
359  // Same hight event 4 columns
360
361  jQuery.fn.equalHeights = function(){
362  var max_height = 0;
363  jQuery(this).each(function(){
364    max_height = Math.max(jQuery(this).height(), max_height);
365  });
366  jQuery(this).each(function(){
367    jQuery(this).height(max_height);
368  });
369};
370
371jQuery(document).ready(function(){
372    jQuery('.row-4events .mt-single-event-inner').equalHeights();
373});

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.