function make_popup_visible( $popup, $delay, $cookie_exp, $cookie_content ){
			if ( ! $popup.hasClass( 'et_bloom_visible' ) ) {
				setTimeout( function() {
					$popup.addClass( 'et_bloom_visible et_bloom_animated' );
					$stats_data_container = 0 != $popup.find( '.et_bloom_custom_html_form' ).length ? $popup.find( '.et_bloom_custom_html_form' ) : $popup.find( '.et_bloom_submit_subscription' );
					update_stats_table( 'imp', $stats_data_container );

					if ( '' != $cookie_exp ) {
						set_cookie( $cookie_exp, $cookie_content );
					}

					if ( $( '.et_bloom_resize' ).length ) {
						$( '.et_bloom_resize.et_bloom_visible' ).each( function() {
							define_popup_position( $( this ), true, 0 );
						});
					}

					display_image( $popup );

				}, $delay );
			}
		}
//separate function for the setTimeout to make it work properly within the loop.
separate function for the setTimeout to make it work properly within the loop.
separate function for the setTimeout to make it work properly within the loop .
function make_popup_visible( $popup, $delay, $cookie_exp, $cookie_content ){
			if ( ! $popup.hasClass( 'et_bloom_visible' ) ) {
				setTimeout( function() {
					$popup.addClass( 'et_bloom_visible et_bloom_animated' );
					$stats_data_container = 0 != $popup.find( '.et_bloom_custom_html_form' ).length ? $popup.find( '.et_bloom_custom_html_form' ) : $popup.find( '.et_bloom_submit_subscription' );
					update_stats_table( 'imp', $stats_data_container );
					if ( '' != $cookie_exp ) {
						set_cookie( $cookie_exp, $cookie_content );
					}
					if ( $( '.et_bloom_resize' ).length ) {
						$( '.et_bloom_resize.et_bloom_visible' ).each( function() {
							define_popup_position( $( this ), true, 0 );
						});
					}
					display_image( $popup );
				}, $delay );
			}
		}
function make_popup_visible ( $popup , $delay , $cookie_exp , $cookie_content ) { if ( ! $popup . hasClass ( 'et_bloom_visible' ) ) { setTimeout ( function ( ) { $popup . addClass ( 'et_bloom_visible et_bloom_animated' ) ; $stats_data_container = 0 != $popup . find ( '.et_bloom_custom_html_form' ) . length ? $popup . find ( '.et_bloom_custom_html_form' ) : $popup . find ( '.et_bloom_submit_subscription' ) ; update_stats_table ( 'imp' , $stats_data_container ) ; if ( '' != $cookie_exp ) { set_cookie ( $cookie_exp , $cookie_content ) ; } if ( $ ( '.et_bloom_resize' ) . length ) { $ ( '.et_bloom_resize.et_bloom_visible' ) . each ( function ( ) { define_popup_position ( $ ( this ) , true , 0 ) ; } ) ; } display_image ( $popup ) ; } , $delay ) ; } }
separate function for the setTimeout to make it work properly within the loop.
separate function for the setTimeout to make it work properly within the loop .