rtsw-public.js 581 Bytes
Newer Older
Pham Huy committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
jQuery(document).ready(function($) {
	$( '.rtsw-video' ).each(function( index ) {
		var popup_id   = $(this).attr('id');
		var popup_conf = $.parseJSON( $(this).closest('.testimonial-slider-wrp').find('.video-popup-conf').text());
   
    

		if( typeof(popup_id) != 'undefined' ) {
			jQuery('#'+popup_id+ ' .popup-youtube').magnificPopup({		
				type: 'iframe',
				mainClass: 'mfp-fade wp-html5vp-mfp-zoom-in wp-html5vp-popup-main-wrp',
				removalDelay: 160,
				preloader: false,
				fixedContentPos: popup_conf.video_yurl == 'true' ? true : 0,				
			});
			
		}
	});
	
});