HEX
Server: LiteSpeed
System: Linux server490.bertina.biz 5.14.0-687.31.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Aug 1 05:38:01 EDT 2026 x86_64
User: parskavirpaya (1252)
PHP: 8.1.34
Disabled: mail, show_source, system, shell_exec, passthru, exec, popen
Upload Files
File: /home/parskavirpaya/public_html/wp-content/themes/porto1/inc/lib/video-thumbnail/video-thumbnail.js
/**
 * Porto Dependent Plugin - ProductVideoThumbnail
 *
 */

'use strict';

window.theme || ( window.theme = {} );

( function ( $ ) {

	var ProductVideoThumbnail = {
		openVideoPopup: function ( e ) {
			if ( $(this).hasClass( 'popup-youtube' ) || $(this).hasClass( 'popup-vimeo' ) ) {
				return;
			}
			e.preventDefault();

			var data = $( this ).siblings( '.porto-video-thumbnail-data' ).html();

			if ( $.fn.magnificPopup ) {
				$.magnificPopup.open(
					{
						type: 'inline',
						mainClass: "porto-video-popup-wrapper mfp-fade",
						preloader: false,
						items: {
							src: '<div class="porto-video-popup-wrapper mx-auto" style="max-width: 50rem;">' + data + '</div>'
						},
						callbacks: {
							beforeClose: function () {
								this.container.empty();
							}
						}
					}
				);
			}
		}
	};

	theme.ProductVideoThumbnail = ProductVideoThumbnail;

	$( document ).ready( function () {
		$( '.product-thumbnails .porto-video-thumbnail-viewer' ).on( 'click', theme.ProductVideoThumbnail.openVideoPopup );
	} );
} )( jQuery );