HEX
Server: LiteSpeed
System: Linux server.nevid-deploma.com 4.18.0-553.111.1.lve.el8.x86_64 #1 SMP Fri Mar 13 13:42:17 UTC 2026 x86_64
User: smilepac (1037)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/smilepac/public_html/wp-content/plugins/codevz-plus/wpbakery/assets/js/video_popup.js
! function( $ ) {
	"use strict";

	Codevz_Plus.inline_video = function( wpb ) {

		// Reinit lightGallery in page builder.
		wpb && Codevz_Plus.lightGallery( $( '.cz_video_popup' ) );

		// Inline video.
		$( '.cz_video_inline' ).codevzPlus( 'video', function( x ) {

			x.find( 'a' ).on( 'click', function( e ) {

				if ( ! x.find( 'iframe' ).length ) {

					var url = $( this ).attr( 'href' ),
						src = url.substr( url.indexOf( "=" ) + 1 ),
						src = url.indexOf( "youtube" ) > 0 ? 'https://youtube-nocookie.com/embed/' + src + '?autoplay=1&rel=0&showinfo=0&mute=1' : 'https://player.vimeo.com/video/' + url.match( /\d+/ ) + '?autoplay=1',
						src = url.indexOf( "youtube" ) > 0 || url.indexOf( "vimeo" ) > 0 ? src : url,
						iframe = '<iframe src="' + src + '" allowfullscreen></iframe>';

					$( this ).fadeOut( 'fast' ).css( 'position','absolute' );

					x.append( iframe ).find( 'iframe' ).css(
						{
							'position': 'relative',
							'width': '100%',
							'height': x.find( 'img' ).height()
						}
					);

				}

				if ( ! $( this ).parent().find('.close_inline_video').length ) {

					x.append('<i class="fa fa-remove close_inline_video"></i>');

					$( '.close_inline_video' ).on('click', function( e ) {
						$( this ).parent().find('iframe').detach();
						$( this ).parent().find('a').fadeIn( 'fast' ).css('position','relative');
						$( this ).detach();
					});

				}

				e.preventDefault();

			});

		});

	};

	Codevz_Plus.inline_video();

}( jQuery );