PageSourceSearch

https://www.ristorantepizzeriapepenero.com/wp-content/plugins/js_c…/assets/js/js_composer_front.js?ver=4.6.2

js ristorantepizzeriapepenero.com collected 2026-10-05 22:13:27 UTC 31,459 bytes, 999 lines download raw bytes

1document.documentElement.className += ' js_active ';
2document.documentElement.className += 'ontouchstart' in document.documentElement ? ' vc_mobile ' : ' vc_desktop ';
3(function () {
4	var prefix = [
5		'-webkit-',
6		'-o-',
7		'-moz-',
8		'-ms-',
9		""
10	];
11	for ( var i = 0; i < prefix.length; i++ ) {
12		if ( prefix[ i ] + 'transform' in document.documentElement.style ) {
13			document.documentElement.className += " vc_transform ";
14		}
15	}
16})();
17/*
18 On document ready jQuery will fire set of functions.
19 If you want to override function behavior then copy it to your theme js file
20 with the same name.
21 */
22
23jQuery( window ).load( function () {
24
25} );
26var vc_js = function () {
27	vc_twitterBehaviour();
28	vc_toggleBehaviour();
29	vc_toggleBehaviourOld(); // todo remove on next release
30	vc_tabsBehaviour();
31	vc_accordionBehaviour();
32	vc_teaserGrid();
33	vc_carouselBehaviour();
34	vc_slidersBehaviour();
35	vc_prettyPhoto();
36	vc_googleplus();
37	vc_pinterest();
38	vc_progress_bar();
39	vc_plugin_flexslider();
40	vc_google_fonts();
41	vc_gridBehaviour();
42	vc_rowBehaviour();
43	vc_ttaActivation(); // @since 4.5
44	jQuery( document ).trigger( 'vc_js' );
45	window.setTimeout( vc_waypoints, 1500 );
46};
47jQuery( document ).ready( function ( $ ) {
48	window.vc_js();
49} ); // END jQuery(document).ready
50
51if ( typeof window[ 'vc_plugin_flexslider' ] !== 'function' ) {
52	window.vc_plugin_flexslider = function ( $parent ) {
53		var $slider = $parent ? $parent.find( '.wpb_flexslider' ) : jQuery( '.wpb_flexslider' );
54		$slider.each( function () {
55			var this_element = jQuery( this );
56			var sliderSpeed = 800,
57				sliderTimeout = parseInt( this_element.attr( 'data-interval' ) ) * 1000,
58				sliderFx = this_element.attr( 'data-flex_fx' ),
59				slideshow = true;
60			if ( sliderTimeout == 0 ) {
61				slideshow = false;
62			}
63
64			this_element.is( ':visible' ) && this_element.flexslider( {
65				animation: sliderFx,
66				slideshow: slideshow,
67				slideshowSpeed: sliderTimeout,
68				sliderSpeed: sliderSpeed,
69				smoothHeight: true
70			} );
71		} );
72	};
73}
74
75/* Twitter
76 ---------------------------------------------------------- */
77if ( typeof window[ 'vc_twitterBehaviour' ] !== 'function' ) {
78	window.vc_twitterBehaviour = function () {
79		jQuery( '.wpb_twitter_widget .tweets' ).each( function ( index ) {
80			var this_element = jQuery( this ),
81				tw_name = this_element.attr( 'data-tw_name' ),
82				tw_count = this_element.attr( 'data-tw_count' );
83
84			this_element.tweet( {
85				username: tw_name,
86				join_text: "auto",
87				avatar_size: 0,
88				count: tw_count,
89				template: "{avatar}{join}{text}{time}",
90				auto_join_text_default: "",
91				auto_join_text_ed: "",
92				auto_join_text_ing: "",
93				auto_join_text_reply: "",
94				auto_join_text_url: "",
95				loading_text: '<span class="loading_tweets">loading tweets...</span>'
96			} );
97		} );
98	};
99}
100
101/* Google plus
102 ---------------------------------------------------------- */
103if ( typeof window[ 'vc_googleplus' ] !== 'function' ) {
104	window.vc_googleplus = function () {
105		if ( jQuery( '.wpb_googleplus' ).length > 0 ) {
106			(function () {
107				var po = document.createElement( 'script' );
108				po.type = 'text/javascript';
109				po.async = true;
110				po.src = 'https://apis.google.com/js/plusone.js';
111				var s = document.getElementsByTagName( 'script' )[ 0 ];
112				s.parentNode.insertBefore( po, s );
113			})();
114		}
115	}
116}
117
118/* Pinterest
119 ---------------------------------------------------------- */
120if ( typeof window[ 'vc_pinterest' ] !== 'function' ) {
121	window.vc_pinterest = function () {
122		if ( jQuery( '.wpb_pinterest' ).length > 0 ) {
123			(function () {
124				var po = document.createElement( 'script' );
125				po.type = 'text/javascript';
126				po.async = true;
127				po.src = 'http://assets.pinterest.com/js/pinit.js';
128				var s = document.getElementsByTagName( 'script' )[ 0 ];
129				s.parentNode.insertBefore( po, s );
130				//<script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script>
131			})();
132		}
133	}
134}
135
136/* Progress bar
137 ---------------------------------------------------------- */
138if ( typeof window[ 'vc_progress_bar' ] !== 'function' ) {
139	window.vc_progress_bar = function () {
140		if ( typeof jQuery.fn.waypoint !== 'undefined' ) {
141
142			jQuery( '.vc_progress_bar' ).waypoint( function () {
143				jQuery( this ).find( '.vc_single_bar' ).each( function ( index ) {
144					var $this = jQuery( this ),
145						bar = $this.find( '.vc_bar' ),
146						val = bar.data( 'percentage-value' );
147
148					setTimeout( function () {
149						bar.css( { "width": val + '%' } );
150					}, index * 200 );
151				} );
152			}, { offset: '85%' } );
153		}
154	}
155}
156
157/* Waypoints magic
158 ---------------------------------------------------------- */
159if ( typeof window[ 'vc_waypoints' ] !== 'function' ) {
160	window.vc_waypoints = function () {
161		if ( typeof jQuery.fn.waypoint !== 'undefined' ) {
162			jQuery( '.wpb_animate_when_almost_visible:not(.wpb_start_animation)' ).waypoint( function () {
163				jQuery( this ).addClass( 'wpb_start_animation' );
164			}, { offset: '85%' } );
165		}
166	}
167}
168
169/* Toggle
170 * @deprecated since 4.4
171 ---------------------------------------------------------- */
172// @todo remove on next release
173if ( typeof window[ 'vc_toggleBehaviourOld' ] !== 'function' ) {
174	/**
175	 * @deprecated will be removed in next release
176	 */
177	window.vc_toggleBehaviourOld = function () {
178		jQuery( ".wpb_toggle" ).unbind( 'click' ).click( function ( e ) {
179			if ( jQuery( this ).next().is( ':animated' ) ) {
180				return false;
181			}
182			if ( jQuery( this ).hasClass( 'wpb_toggle_title_active' ) ) {
183				jQuery( this ).removeClass( 'wpb_toggle_title_active' ).next().slideUp( 500 );
184			} else {
185				jQuery( this ).addClass( 'wpb_toggle_title_active' ).next().slideDown( 500 );
186			}
187		} );
188		jQuery( '.wpb_toggle_content' ).each( function ( index ) {
189			if ( jQuery( this ).next().is( 'h4.wpb_toggle' ) == false ) {
190				jQuery( '<div class="last_toggle_el_margin"></div>' ).insertAfter( this );
191			}
192		} );
193	}
194}
195
196/* Toggle/FAQ
197 ---------------------------------------------------------- */
198if ( typeof window[ 'vc_toggleBehaviour' ] !== 'function' ) {
199	window.vc_toggleBehaviour = function ( $el ) {
200		var event = function ( e ) {
201			e && e.preventDefault && e.preventDefault();
202			var title = jQuery( this );
203			var element = title.closest( '.vc_toggle' );
204			var content = element.find( '.vc_toggle_content' );
205			if ( element.hasClass( 'vc_toggle_active' ) ) {
206				content.slideUp( {
207					duration: 300,
208					complete: function () {
209						element.removeClass( 'vc_toggle_active' );
210					}
211				} );
212			} else {
213				content.slideDown( {
214					duration: 300,
215					complete: function () {
216						element.addClass( 'vc_toggle_active' );
217					}
218				} );
219			}
220		};
221		if ( $el ) {
222			if ( $el.hasClass( 'vc_toggle_title' ) ) {
223				$el.unbind( 'click' ).click( event );
224			} else {
225				$el.find( ".vc_toggle_title" ).unbind( 'click' ).click( event );
226			}
227		} else {
228			jQuery( ".vc_toggle_title" ).unbind( 'click' ).on( 'click', event );
229		}
230	}
231}
232
233/* Tabs + Tours
234 ---------------------------------------------------------- */
235if ( typeof window[ 'vc_tabsBehaviour' ] !== 'function' ) {
236	window.vc_tabsBehaviour = function ( $tab ) {
237		if ( jQuery.ui ) {
238			/* jQuery(function ($) {
239			 $(document.body).off('click.preview', 'a')
240			 }); */ // this causes wp-customizer bug
241			var $call = $tab || jQuery( '.wpb_tabs, .wpb_tour' ),
242				ver = jQuery.ui && jQuery.ui.version ? jQuery.ui.version.split( '.' ) : '1.10',
243				old_version = parseInt( ver[ 0 ] ) == 1 && parseInt( ver[ 1 ] ) < 9;
244			// if($call.hasClass('ui-widget')) $call.tabs('destroy');
245			$call.each( function ( index ) {
246				var $tabs,
247					interval = jQuery( this ).attr( "data-interval" ),
248					tabs_array = [];
249				//
250				$tabs = jQuery( this ).find( '.wpb_tour_tabs_wrapper' ).tabs( {
251					show: function ( event, ui ) {
252						wpb_prepare_tab_content( event, ui );
253					},
254					beforeActivate: function ( event, ui ) {
255						ui.newPanel.index() !== 1 && ui.newPanel.find( '.vc_pie_chart:not(.vc_ready)' );
256					},
257					activate: function ( event, ui ) {
258						wpb_prepare_tab_content( event, ui );
259					}
260				} );
261				if ( interval && interval > 0 ) {
262					try {
263						$tabs.tabs( 'rotate', interval * 1000 );
264					} catch ( e ) {
265						// nothing.
266						window.console && window.console.log && console.log( e );
267					}
268				}
269
270				jQuery( this ).find( '.wpb_tab' ).each( function () {
271					tabs_array.push( this.id );
272				} );
273
274				jQuery( this ).find( '.wpb_tabs_nav li' ).click( function ( e ) {
275					e.preventDefault();
276					/*if (jQuery.inArray(jQuery(this).attr('href'), tabs_array)) {
277					 if (old_version) {
278					 $tabs.tabs("select", jQuery(this).attr('href'));
279					 } else {
280					 $tabs.tabs("option", "active", jQuery(jQuery(this).attr('href')).index() - 1);
281					 }
282					 return false;
283					 }*/
284					if ( old_version ) {
285						$tabs.tabs( "select", jQuery( 'a', this ).attr( 'href' ) );
286					} else {
287						$tabs.tabs( "option", "active", jQuery( this ).index() );
288					}
289					return false;
290				} );
291
292				jQuery( this ).find( '.wpb_prev_slide a, .wpb_next_slide a' ).click( function ( e ) {
293					e.preventDefault();
294					if ( old_version ) {
295						var index = $tabs.tabs( 'option', 'selected' );
296						if ( jQuery( this ).parent().hasClass( 'wpb_next_slide' ) ) {
297							index ++;
298						}
299						else {
300							index --;
301						}
302						if ( index < 0 ) {
303							index = $tabs.tabs( "length" ) - 1;
304						}
305						else if ( index >= $tabs.tabs( "length" ) ) {
306							index = 0;
307						}
308						$tabs.tabs( "select", index );
309					} else {
310						var index = $tabs.tabs( "option", "active" ),
311							length = $tabs.find( '.wpb_tab' ).length;
312
313						if ( jQuery( this ).parent().hasClass( 'wpb_next_slide' ) ) {
314							index = (index + 1) >= length ? 0 : index + 1;
315						} else {
316							index = index - 1 < 0 ? length - 1 : index - 1;
317						}
318
319						$tabs.tabs( "option", "active", index );
320					}
321
322				} );
323
324			} );
325		}
326	}
327}
328;
329
330/* Tabs + Tours
331 ---------------------------------------------------------- */
332if ( typeof window[ 'vc_accordionBehaviour' ] !== 'function' ) {
333	window.vc_accordionBehaviour = function () {
334		jQuery( '.wpb_accordion' ).each( function ( index ) {
335			var $this = jQuery( this );
336			var $tabs,
337				interval = $this.attr( "data-interval" ),
338				active_tab = ! isNaN( jQuery( this ).data( 'active-tab' ) ) && parseInt( $this.data( 'active-tab' ) ) > 0 ? parseInt( $this.data( 'active-tab' ) ) - 1 : false,
339				collapsible = active_tab === false || $this.data( 'collapsible' ) === 'yes';
340			//
341			$tabs = $this.find( '.wpb_accordion_wrapper' ).accordion( {
342				header: "> div > h3",
343				autoHeight: false,
344				heightStyle: "content",
345				active: active_tab,
346				collapsible: collapsible,
347				navigation: true,
348
349				activate: vc_accordionActivate,
350				change: function ( event, ui ) {
351					if ( jQuery.fn.isotope != undefined ) {
352						ui.newContent.find( '.isotope' ).isotope( "layout" );
353					}
354					vc_carouselBehaviour( ui.newPanel );
355				}
356			} );
357			if ( true === $this.data( 'vcDisableKeydown' ) ) {
358				$tabs.data( 'uiAccordion' )._keydown = function () {
359				};
360			}
361			//.tabs().tabs('rotate', interval*1000, true);
362		} );
363	}
364}
365
366/* Teaser grid: isotope
367 ---------------------------------------------------------- */
368if ( typeof window[ 'vc_teaserGrid' ] !== 'function' ) {
369	window.vc_teaserGrid = function () {
370		var layout_modes = {
371			fitrows: 'fitRows',
372			masonry: 'masonry'
373		};
374		jQuery( '.wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)' ).each( function () {
375			var $container = jQuery( this );
376			var $thumbs = $container.find( '.wpb_thumbnails' );
377			var layout_mode = $thumbs.attr( 'data-layout-mode' );
378			$thumbs.isotope( {
379				// options
380				itemSelector: '.isotope-item',
381				layoutMode: (layout_modes[ layout_mode ] == undefined ? 'fitRows' : layout_modes[ layout_mode ])
382			} );
383			$container.find( '.categories_filter a' ).data( 'isotope', $thumbs ).click( function ( e ) {
384				e.preventDefault();
385				var $thumbs = jQuery( this ).data( 'isotope' );
386				jQuery( this ).parent().parent().find( '.active' ).removeClass( 'active' );
387				jQuery( this ).parent().addClass( 'active' );
388				$thumbs.isotope( { filter: jQuery( this ).attr( 'data-filter' ) } );
389			} );
390			jQuery( window ).bind( 'load resize', function () {
391				$thumbs.isotope( "layout" );
392			} );
393		} );
394
395		/*
396		 var isotope = jQuery('.wpb_grid ul.thumbnails');
397		 if ( isotope.length > 0 ) {
398		 isotope.isotope({
399		 // options
400		 itemSelector : '.isotope-item',
401		 layoutMode : 'fitRows'
402		 });
403		 jQuery(window).load(function() {
404		 isotope.isotope("layout");
405		 });
406		 }
407		 */
408	}
409}
410
411if ( typeof window[ 'vc_carouselBehaviour' ] !== 'function' ) {
412	window.vc_carouselBehaviour = function ( $parent ) {
413		var $carousel = $parent ? $parent.find( ".wpb_carousel" ) : jQuery( ".wpb_carousel" );
414		$carousel.each( function () {
415			var $this = jQuery( this );
416			if ( $this.data( 'carousel_enabled' ) !== true && $this.is( ':visible' ) ) {
417				$this.data( 'carousel_enabled', true );
418				var carousel_width = jQuery( this ).width(),
419					visible_count = getColumnsCount( jQuery( this ) ),
420					carousel_speed = 500;
421				if ( jQuery( this ).hasClass( 'columns_count_1' ) ) {
422					carousel_speed = 900;
423				}
424				/* Get margin-left value from the css grid and apply it to the carousele li items (margin-right), before carousele initialization */
425				var carousele_li = jQuery( this ).find( '.wpb_thumbnails-fluid li' );
426				carousele_li.css( { "margin-right": carousele_li.css( "margin-left" ), "margin-left": 0 } );
427
428				jQuery( this ).find( '.wpb_wrapper:eq(0)' ).jCarouselLite( {
429					btnNext: jQuery( this ).find( '.next' ),
430					btnPrev: jQuery( this ).find( '.prev' ),
431					visible: visible_count,
432					speed: carousel_speed
433				} )
434					.width( '100%' );
434//carousel_width
435
436				var fluid_ul = jQuery( this ).find( 'ul.wpb_thumbnails-fluid' );
437				fluid_ul.width( fluid_ul.width() + 300 );
438
439				jQuery( window ).resize( function () {
440					var before_resize = screen_size;
441					screen_size = getSizeName();
442					if ( before_resize != screen_size ) {
443						window.setTimeout( 'location.reload()', 20 );
444					}
445				} );
446			}
447
448		} );
449	}
450}
451
452if ( typeof window[ 'vc_slidersBehaviour' ] !== 'function' ) {
453	window.vc_slidersBehaviour = function () {
454		//var sliders_count = 0;
455		jQuery( '.wpb_gallery_slides' ).each( function ( index ) {
456			var this_element = jQuery( this );
457			var ss_count = 0, $imagesGrid;
458
459			/*if ( this_element.hasClass('wpb_slider_fading') ) {
460			 var sliderSpeed = 500, sliderTimeout = this_element.attr('data-interval')*1000, slider_fx = 'fade';
461			 var current_ss;
462
463			 function slideshowOnBefore(currSlideElement, nextSlideElement, options) {
464			 jQuery(nextSlideElement).css({"position" : "absolute" });
465			 jQuery(nextSlideElement).find("div.description").animate({"opacity": 0}, 0);
466			 }
467
468			 function slideshowOnAfter(currSlideElement, nextSlideElement, options) {
469			 jQuery(nextSlideElement).find("div.description").animate({"opacity": 1}, 2000);
470
471			 jQuery(nextSlideElement).css({"position" : "static" });
472			 var new_h = jQuery(nextSlideElement).find('img').height();
473			 if ( jQuery.isNumeric(new_h) ) {
474			 //this_element.animate({ "height" : new_h }, sliderSpeed );
475			 }
476			 }
477
478			 this_element.find('ul')
479			 .before('<div class="ss_nav ss_nav_'+ss_count+'"></div><div class="wpb_fading_nav"><a id="next_'+ss_count+'" href="#next"></a> <a id="prev_'+ss_count+'" href="#prev"></a></div>')
480			 .cycle({
481			 fx: slider_fx, // choose your transition type, ex: fade, scrollUp, shuffle, etc...
482			 pause: 1,
483			 speed: sliderSpeed,
484			 timeout: sliderTimeout,
485			 delay: -ss_count * 1000,
486			 before: slideshowOnBefore,
487			 after:slideshowOnAfter,
488			 pager:  '.ss_nav_'+ss_count
489			 });
490			 //.find('.description').width(jQuery(this).width() - 20);
491			 ss_count++;
492			 }
493			 else*/
494			if ( this_element.hasClass( 'wpb_slider_nivo' ) ) {
495				var sliderSpeed = 800,
496					sliderTimeout = this_element.attr( 'data-interval' ) * 1000;
497
498				if ( sliderTimeout == 0 ) {
499					sliderTimeout = 9999999999;
500				}
501
502				this_element.find( '.nivoSlider' ).nivoSlider( {
503					effect: 'boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse', // Specify sets like: 'fold,fade,sliceDown'
504					slices: 15, // For slice animations
505					boxCols: 8, // For box animations
506					boxRows: 4, // For box animations
507					animSpeed: sliderSpeed, // Slide transition speed
508					pauseTime: sliderTimeout, // How long each slide will show
509					startSlide: 0, // Set starting Slide (0 index)
510					directionNav: true, // Next & Prev navigation
511					directionNavHide: true, // Only show on hover
512					controlNav: true, // 1,2,3... navigation
513					keyboardNav: false, // Use left & right arrows
514					pauseOnHover: true, // Stop animation while hovering
515					manualAdvance: false, // Force manual transitions
516					prevText: 'Prev', // Prev directionNav text
517					nextText: 'Next' // Next directionNav text
518				} );
519			}
520			else if ( this_element.hasClass( 'wpb_image_grid' ) ) {
521				if ( jQuery.fn.imagesLoaded ) {
522					$imagesGrid = this_element.find( '.wpb_image_grid_ul' ).imagesLoaded( function () {
523						$imagesGrid.isotope( {
524							// options
525							itemSelector: '.isotope-item',
526							layoutMode: 'fitRows'
527						} );
528					} );
529				} else {
530					this_element.find( '.wpb_image_grid_ul' ).isotope( {
531						// options
532						itemSelector: '.isotope-item',
533						layoutMode: 'fitRows'
534					} );
535				}
536
537			}
538		} );
539	}
540}
541if ( typeof window[ 'vc_prettyPhoto' ] !== 'function' ) {
542	window.vc_prettyPhoto = function () {
543		try {
544			// just in case. maybe prettyphoto isnt loaded on this site
545			if ( jQuery && jQuery.fn && jQuery.fn.prettyPhoto ) {
546				jQuery( 'a.prettyphoto, .gallery-icon a[href*=".jpg"]' ).prettyPhoto( {
547					animationSpeed: 'normal', /* fast/slow/normal */
548					padding: 15, /* padding for each side of the picture */
549					opacity: 0.7, /* Value betwee 0 and 1 */
550					showTitle: true, /* true/false */
551					allowresize: true, /* true/false */
552					counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
553					//theme: 'light_square', /* light_rounded / dark_rounded / light_square / dark_square */
554					hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */
555					deeplinking: false, /* Allow prettyPhoto to update the url to enable deeplinking. */
556					modal: false, /* If set to true, only the close button will close the window */
557					callback: function () {
558						var url = location.href;
559						var hashtag = (url.indexOf( '#!prettyPhoto' )) ? true : false;
560						if ( hashtag ) {
561							location.hash = "!";
562						}
563					} /* Called when prettyPhoto is closed */,
564					social_tools: ''
565				} );
566			}
567		} catch ( err ) {
568			window.console && window.console.log && console.log( err );
569		}
570	}
571}
572
573if ( typeof window[ 'vc_google_fonts' ] !== 'function' ) {
574	window.vc_google_fonts = function () {
575		return false; // @todo check this for what this is needed
576	}
577}
578window.vcParallaxSkroll = false;
579if ( typeof window[ 'vc_rowBehaviour' ] !== 'function' ) {
580	window.vc_rowBehaviour = function () {
581		var $ = window.jQuery;
582		var local_function = function () {
583			var $elements = $( '[data-vc-full-width="true"]' );
584			$.each( $elements, function ( key, item ) {
585				var $el = $( this );
586				var $el_full = $el.next( '.vc_row-full-width' );
587				var el_margin_left = parseInt( $el.css( 'margin-left' ), 10 );
588				var el_margin_right = parseInt( $el.css( 'margin-right' ), 10 );
589				var offset = 0 - $el_full.offset().left - el_margin_left;
590				var width = $( window ).width();
591				$el.css( {
592					'position': 'relative',
593					'left': offset,
594					'box-sizing': 'border-box',
595					'width': $( window ).width()
596				} );
597				if ( ! $el.data( 'vcStretchContent' ) ) {
598					var padding = (- 1 * offset);
599					if ( padding < 0 ) {
600						padding = 0;
601					}
602					var paddingRight = width - padding - $el_full.width() + el_margin_left + el_margin_right;
603					if ( paddingRight < 0 ) {
604						paddingRight = 0;
605					}
606					$el.css( { 'padding-left': padding + 'px', 'padding-right': paddingRight + 'px' } );
607				}
608				$el.attr( "data-vc-full-width-init", "true" );
609			} );
610		};
611		/**
612		 * @todo refactor as plugin.
613		 * @returns {*}
614		 */
615		var parallaxRow = function () {
616			var vcSkrollrOptions,
617				callSkrollInit = false;
618			if ( vcParallaxSkroll ) {
619				vcParallaxSkroll.destroy();
620			}
621			$( '.vc_parallax-inner' ).remove();
622			$( '[data-5p-top-bottom]' ).removeAttr( 'data-5p-top-bottom data-30p-top-bottom' );
623			$( '[data-vc-parallax]' ).each( function () {
624				var skrollrSpeed,
625					skrollrSize,
626					skrollrStart,
627					skrollrEnd,
628					$parallaxElement,
629					parallaxImage,
630					youtubeId;
631				callSkrollInit = true; // Enable skrollinit;
632				if ( $( this ).data( 'vcParallaxOFade' ) == 'on' ) {
633					$( this ).children().attr( 'data-5p-top-bottom', 'opacity:0;' ).attr( 'data-30p-top-bottom',
634						'opacity:1;' );
635				}
636
637				skrollrSize = $( this ).data( 'vcParallax' ) * 100;
638				$parallaxElement = $( '<div />' ).addClass( 'vc_parallax-inner' ).appendTo( $( this ) );
639				$parallaxElement.height( skrollrSize + '%' );
640
641				parallaxImage = $( this ).data( 'vcParallaxImage' );
642
643				youtubeId = vcExtractYoutubeId( parallaxImage );
644
645				if ( youtubeId ) {
646					insertYoutubeVideoAsBackground( $parallaxElement, youtubeId );
647				} else if ( parallaxImage !== undefined ) {
648					$parallaxElement.css( 'background-image', 'url(' + parallaxImage + ')' );
649				}
650
651				skrollrSpeed = skrollrSize - 100;
652				skrollrStart = - skrollrSpeed;
653				skrollrEnd = 0;
654
655				$parallaxElement.attr( 'data-bottom-top', 'top: ' + skrollrStart + '%;' ).attr( 'data-top-bottom',
656					'top: ' + skrollrEnd + '%;' );
657			} );
658
659			if ( callSkrollInit && window.skrollr ) {
660				vcSkrollrOptions = {
661					forceHeight: false,
662					smoothScrolling: false,
663					mobileCheck: function () {
664						return false;
665					}
666				};
667				vcParallaxSkroll = skrollr.init( vcSkrollrOptions );
668				return vcParallaxSkroll;
669			}
670			return false;
671		};
672		/**
673		 * @todo refactor as plugin.
674		 * @returns {*}
675		 */
676		var fullHeightRow = function () {
677			$( '.vc_row-o-full-height:first' ).each( function () {
678				var $window,
679					windowHeight,
680					offsetTop,
681					fullHeight;
682				$window = $( window );
683				windowHeight = $window.height();
684				offsetTop = $( this ).offset().top;
685				if ( offsetTop < windowHeight ) {
686					fullHeight = 100 - offsetTop / (windowHeight / 100);
687					$( this ).css( 'min-height', fullHeight + 'vh' );
688				}
689			} );
690		};
691		$( window ).unbind( 'resize.vcRowBehaviour' ).bind( 'resize.vcRowBehaviour', local_function );
692		$( window ).bind( 'resize.vcRowBehaviour', fullHeightRow );
693		local_function();
694		fullHeightRow();
695		initVideoBackgrounds(); // must be called before parallax
696		parallaxRow();
697	}
698}
699
700if ( typeof window[ 'vc_gridBehaviour' ] !== 'function' ) {
701	window.vc_gridBehaviour = function () {
702		jQuery.fn.vcGrid && jQuery( '[data-vc-grid]' ).vcGrid();
703	}
704}
705/* Helper
706 ---------------------------------------------------------- */
707if ( typeof window[ 'getColumnsCount' ] !== 'function' ) {
708	window.getColumnsCount = function ( el ) {
709		var find = false,
710			i = 1;
711
712		while ( find == false ) {
713			if ( el.hasClass( 'columns_count_' + i ) ) {
714				find = true;
715				return i;
716			}
717			i ++;
718		}
719	}
720}
721
722var screen_size = getSizeName();
723function getSizeName() {
724	var screen_size = '',
725		screen_w = jQuery( window ).width();
726
727	if ( screen_w > 1170 ) {
728		screen_size = "desktop_wide";
729	}
730	else if ( screen_w > 960 && screen_w < 1169 ) {
731		screen_size = "desktop";
732	}
733	else if ( screen_w > 768 && screen_w < 959 ) {
734		screen_size = "tablet";
735	}
736	else if ( screen_w > 300 && screen_w < 767 ) {
737		screen_size = "mobile";
738	}
739	else if ( screen_w < 300 ) {
740		screen_size = "mobile_portrait";
741	}
742	return screen_size;
743}
744
745function loadScript( url, $obj, callback ) {
746
747	var script = document.createElement( "script" );
748	script.type = "text/javascript";
749
750	if ( script.readyState ) {  //IE
751		script.onreadystatechange = function () {
752			if ( script.readyState == "loaded" ||
753				script.readyState == "complete" ) {
754				script.onreadystatechange = null;
755				callback();
756			}
757		};
758	} else {  //Others
759		/*
760		 script.onload = function(){
761
762		 callback();
763		 };
764		 */
765	}
766
767	script.src = url;
768	$obj.get( 0 ).appendChild( script );
769}
770
771if ( typeof window[ 'wpb_prepare_tab_content' ] !== 'function' ) {
772	/**
773	 * Prepare html to correctly display inside tab container
774	 *
775	 * @param event - ui tab event 'show'
776	 * @param ui - jquery ui tabs object
777	 */
778	window.wpb_prepare_tab_content = function ( event, ui ) {
779		var panel = ui.panel || ui.newPanel,
780			$pie_charts = panel.find( '.vc_pie_chart:not(.vc_ready)' ),
781			$round_charts = panel.find( '.vc_round-chart' ),
782			$line_charts = panel.find( '.vc_line-chart' ),
783			$carousel = panel.find( '[data-ride="vc_carousel"]' ),
784			$ui_panel, $google_maps;
785		vc_carouselBehaviour();
786		vc_plugin_flexslider( panel );
787		if ( ui.newPanel.find( '.vc_masonry_media_grid, .vc_masonry_grid' ).length ) {
788			ui.newPanel.find( '.vc_masonry_media_grid, .vc_masonry_grid' ).each( function () {
789				var grid = jQuery( this ).data( 'vcGrid' );
790				grid && grid.gridBuilder && grid.gridBuilder.setMasonry && grid.gridBuilder.setMasonry();
791			} );
792		}
793		if ( panel.find( '.vc_masonry_media_grid, .vc_masonry_grid' ).length ) {
794			panel.find( '.vc_masonry_media_grid, .vc_masonry_grid' ).each( function () {
795				var grid = jQuery( this ).data( 'vcGrid' );
796				grid && grid.gridBuilder && grid.gridBuilder.setMasonry && grid.gridBuilder.setMasonry();
797			} );
798		}
799		$pie_charts.length && jQuery.fn.vcChat && $pie_charts.vcChat();
800		$round_charts.length && jQuery.fn.vcRoundChart && $round_charts.vcRoundChart( { reload: false } );
801		$line_charts.length && jQuery.fn.vcLineChart && $line_charts.vcLineChart( { reload: false } );
802		$carousel.length && jQuery.fn.carousel && $carousel.carousel( 'resizeAction' );
803		$ui_panel = panel.find( '.isotope, .wpb_image_grid_ul' ); // why var name '$ui_panel'?
804		$google_maps = panel.find( '.wpb_gmaps_widget' );
805		if ( $ui_panel.length > 0 ) {
806			$ui_panel.isotope( "layout" );
807		}
808		if ( $google_maps.length && ! $google_maps.is( '.map_ready' ) ) {
809			var $frame = $google_maps.find( 'iframe' );
810			$frame.attr( 'src', $frame.attr( 'src' ) );
811			$google_maps.addClass( 'map_ready' );
812		}
813		if ( panel.parents( '.isotope' ).length ) {
814			panel.parents( '.isotope' ).each( function () {
815				jQuery( this ).isotope( "layout" );
816			} );
817		}
818	}
819}
820var vc_ttaActivation = function () {
821	jQuery( '[data-vc-accordion]' ).on( 'show.vc.accordion', function ( e ) {
822		var $ = window.jQuery, ui = {};
823		ui.newPanel = $( this ).data( 'vc.accordion' ).getTarget();
824		window.wpb_prepare_tab_content( e, ui );
825	} );
826};
827
828var vc_accordionActivate = function ( event, ui ) {
829	if ( ui.newPanel.length && ui.newHeader.length ) {
830		var $pie_charts = ui.newPanel.find( '.vc_pie_chart:not(.vc_ready)' ),
831			$round_charts = ui.newPanel.find( '.vc_round-chart' ),
832			$line_charts = ui.newPanel.find( '.vc_line-chart' ),
833			$carousel = ui.newPanel.find( '[data-ride="vc_carousel"]' );
834		if ( jQuery.fn.isotope != undefined ) {
835			ui.newPanel.find( '.isotope, .wpb_image_grid_ul' ).isotope( "layout" );
836		}
837		if ( ui.newPanel.find( '.vc_masonry_media_grid, .vc_masonry_grid' ).length ) {
838			ui.newPanel.find( '.vc_masonry_media_grid, .vc_masonry_grid' ).each( function () {
839				var grid = jQuery( this ).data( 'vcGrid' );
840				grid && grid.gridBuilder && grid.gridBuilder.setMasonry && grid.gridBuilder.setMasonry();
841			} );
842		}
843		//jQuery('html, body').animate({scrollTop: ui.newHeader.offset().top - 100}, 1000); // #1370 enhancement, #1762 issue.
844		vc_carouselBehaviour( ui.newPanel );
845		vc_plugin_flexslider( ui.newPanel );
846		$pie_charts.length && jQuery.fn.vcChat && $pie_charts.vcChat();
847		$round_charts.length && jQuery.fn.vcRoundChart && $round_charts.vcRoundChart( { reload: false } );
848		$line_charts.length && jQuery.fn.vcLineChart && $line_charts.vcLineChart( { reload: false } );
849		$carousel.length && jQuery.fn.carousel && $carousel.carousel( 'resizeAction' );
850		if ( ui.newPanel.parents( '.isotope' ).length ) {
851			ui.newPanel.parents( '.isotope' ).each( function () {
852				jQuery( this ).isotope( "layout" );
853			} );
854		}
855	}
856};
857
858/**
859 * Reinitialize all video backgrounds
860 */
861function initVideoBackgrounds() {
862	jQuery( '.vc_row' ).each( function () {
863		var $row = jQuery( this ),
864			youtubeUrl,
865			youtubeId;
866
867		if ( $row.data( 'vcVideoBg' ) ) {
868			youtubeUrl = $row.data( 'vcVideoBg' );
869			youtubeId = vcExtractYoutubeId( youtubeUrl );
870
871			if ( youtubeId ) {
872				$row.find( '.vc_video-bg' ).remove();
873				insertYoutubeVideoAsBackground( $row, youtubeId );
874			}
875
876			jQuery( window ).on( 'grid:items:added', function ( event, $grid ) {
877				if ( ! $row.has( $grid ).length ) {
878					return;
879				}
880
881				vcResizeVideoBackground( $row );
882			} );
883		} else {
884			$row.find( '.vc_video-bg' ).remove();
885		}
886	} );
887}
888
889/**
890 * Insert youtube video into element.
891 *
892 * Video will be w/o controls, muted, autoplaying and looping.
893 */
894function insertYoutubeVideoAsBackground( $element, youtubeId, counter ) {
895	if ( 'undefined' === typeof( YT.Player ) ) {
896		// wait for youtube iframe api to load. try for 10sec, then abort
897		counter = 'undefined' === typeof( counter ) ? 0 : counter;
898		if ( counter > 100 ) {
899			console.warn( 'Too many attempts to load YouTube api' );
900			return;
901		}
902
903		setTimeout( function () {
904			insertYoutubeVideoAsBackground( $element, youtubeId, counter ++ );
905		}, 100 );
906
907		return;
908	}
909
910	var player,
911		$container = $element.prepend( '<div class="vc_video-bg"><div class="inner"></div></div>' ).find( '.inner' );
912
913	player = new YT.Player( $container[ 0 ], {
914		width: '100%',
915		height: '100%',
916		videoId: youtubeId,
917		playerVars: {
918			playlist: youtubeId,
919			iv_load_policy: 3, // hide annotations
920			enablejsapi: 1,
921			disablekb: 1,
922			autoplay: 1,
923			controls: 0,
924			showinfo: 0,
925			rel: 0,
926			loop: 1
927		},
928		events: {
929			onReady: function ( event ) {
930				event.target.mute().setLoop( true );
931			}
932		}
933	} );
934
935	vcResizeVideoBackground( $element );
936
937	jQuery( window ).bind( 'resize', function () {
938		vcResizeVideoBackground( $element );
939	} );
940}
941
942/**
943 * Resize background video iframe so that video content covers whole area
944 */
945function vcResizeVideoBackground( $element ) {
946	var iframeW,
947		iframeH,
948		marginLeft,
949		marginTop,
950		containerW = $element.innerWidth(),
951		containerH = $element.innerHeight(),
952		ratio1 = 16,
953		ratio2 = 9;
954
955	if ( ( containerW / containerH ) < ( ratio1 / ratio2 ) ) {
956		iframeW = containerH * (ratio1 / ratio2);
957		iframeH = containerH;
958
959		marginLeft = - Math.round( ( iframeW - containerW ) / 2 ) + 'px';
960		marginTop = - Math.round( ( iframeH - containerH ) / 2 ) + 'px';
961
962		iframeW += 'px';
963		iframeH += 'px';
964	} else {
965		iframeW = containerW;
966		iframeH = containerW * (ratio2 / ratio1);
967
968		marginTop = - Math.round( ( iframeH - containerH ) / 2 ) + 'px';
969		marginLeft = - Math.round( ( iframeW - containerW ) / 2 ) + 'px';
970
971		iframeW += 'px';
972		iframeH += 'px';
973	}
974
975	$element.find( '.vc_video-bg iframe' ).css( {
976		maxWidth: '1000%',
977		marginLeft: marginLeft,
978		marginTop: marginTop,
979		width: iframeW,
980		height: iframeH
981	} );
982}
983
984/**
985 * Extract video ID from youtube url
986 */
987function vcExtractYoutubeId( url ) {
988	if ( 'undefined' === typeof(url) ) {
989		return false;
990	}
991
992	var id = url.match( /(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/ );
993
994	if ( null != id ) {
995		return id[ 1 ];
996	}
997
998	return false;
999}

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.