HEX
Server: Apache
System: Linux 162-240-236-42.bluehost.com 3.10.0-1160.114.2.el7.x86_64 #1 SMP Wed Mar 20 15:54:52 UTC 2024 x86_64
User: bt667 (1004)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /home/bt667/www/wp-content/plugins/wp_mvplayer/includes/player.php
<?php
if (!defined('ABSPATH')) {
    exit;
}

global $youtube_players;
$youtube_players = array();
function youtube_playerdata()
{
    global $youtube_players;
    $whichpost = get_the_ID();
    $i = 0;
    foreach ($youtube_players as $youtube_player) {
        echo "<script>
            var player{$youtube_players[$i]['player_id']};
            var current_player_id = false;
            var stop_video{$youtube_players[$i]['player_id']} = false;
            var show_optin{$youtube_players[$i]['player_id']} = false;
            var show_popup{$youtube_players[$i]['player_id']} = false;
            var social_lock{$youtube_players[$i]['player_id']} = false;
            var cta_lock{$youtube_players[$i]['player_id']} = false;
            var on_ps{$youtube_players[$i]['player_id']} = false;
            var content_settime{$youtube_players[$i]['player_id']};
            var optin_settime{$youtube_players[$i]['player_id']};
            var popup_settime{$youtube_players[$i]['player_id']};
            var social_settime{$youtube_players[$i]['player_id']};
            var cta_settime{$youtube_players[$i]['player_id']};
            var cntnt_show{$youtube_players[$i]['player_id']} = false;
            var social_show{$youtube_players[$i]['player_id']} = false;
            var cta_show{$youtube_players[$i]['player_id']} = false;
            var pause_event{$youtube_players[$i]['player_id']} = false;
            </script>";
        $i++;
    }
    ?>
    <script>
        window.onYouTubeIframeAPIReady = function(){
            <?php $i = 0;
    foreach ($youtube_players as $youtube_player) {
        echo "
                    player{$youtube_players[$i]['player_id']} = new YT.Player('player{$youtube_players[$i]['player_id']}',{
                        height: '{$youtube_players[$i]['height']}',
                        width: '{$youtube_players[$i]['width']}',
                        videoId: '{$youtube_players[$i]['video_id']}',
                        playerVars: {
                            controls: {$youtube_players[$i]['videocontrols']},
                            showinfo: 0,
                            modestbranding: 1,
                            wmode: 'transparent',
                            rel: 0,
                            mute:1
                        },
                        events: {
                            'onReady': onPlayerReady{$youtube_players[$i]['player_id']},
                            'onStateChange': onPlayerStateChange{$youtube_players[$i]['player_id']}
                        }
                    });";
        $i++;
    }
    ?>
        }
    </script>
    <?php
$i = 0;
    foreach ($youtube_players as $youtube_player) {
        echo "<script>
        jQuery(document).ready(function(){
            document.cookie = 'mvplayer_social_lockdown_shared{$youtube_players[$i]['player_id']}=; expires=Thu, 01 Jan 1970 00:00:00 UTC ;path=/;';
            document.cookie = 'mvplayer_cta_lockdown_shared{$youtube_players[$i]['player_id']}=; expires=Thu, 01 Jan 1970 00:00:00 UTC ;path=/;';
            document.cookie = 'check_preview_{$youtube_players[$i]['player_id']}=; expires=Thu, 01 Jan 1970 00:00:00 UTC ;path=/;';
            if('{$youtube_players[$i]['auto']}'=='true' && '{$youtube_players[$i]['mvp_type']}' != 'playlist'){
                isplaying{$youtube_players[$i]['player_id']} = true;
            }else{
                isplaying{$youtube_players[$i]['player_id']} = false;
                jQuery.cookie('check_preview_{$youtube_players[$i]['player_id']}', '1', { expires: 30, path: '/' });
            }
        });
        function onPlayerReady{$youtube_players[$i]['player_id']}(event){
            var check_preview = jQuery.cookie('check_preview_{$youtube_players[$i]['player_id']}');
            if('{$youtube_players[$i]['auto']}'=='true'){
                jQuery('#ico_img{$youtube_players[$i]['player_id']}').hide();
                event.target.playVideo();
            }
            if({$youtube_players[$i]['content_duration']}==1 && check_preview != null && isplaying{$youtube_players[$i]['player_id']}){
                jQuery('#mvplayer_video_content{$youtube_players[$i]['player_id']}').show();
            }
            if('{$youtube_players[$i]['OptinBox']}'=='yes' && {$youtube_players[$i]['optin_duration']}==1 && !show_optin{$youtube_players[$i]['player_id']} && check_preview != null && isplaying{$youtube_players[$i]['player_id']}){
                optinShowIt_{$youtube_players[$i]['player_id']}();
            }
            if('{$youtube_players[$i]['Popup']}'=='yes' && {$youtube_players[$i]['popup_duration']}==1 && !show_popup{$youtube_players[$i]['player_id']} && check_preview != null && isplaying{$youtube_players[$i]['player_id']}){
                popupShowIt_{$youtube_players[$i]['player_id']}();
            }
            var mvplayer_social_shared = jQuery.cookie('mvplayer_social_lockdown_shared{$youtube_players[$i]['player_id']}');
            if({$youtube_players[$i]['social']}==1 && {$youtube_players[$i]['socialbtn_duration']}==1 && mvplayer_social_shared == null && check_preview != null && isplaying{$youtube_players[$i]['player_id']}){
                sociallock_{$youtube_players[$i]['player_id']}();
            }
            var mvplayer_cta_shared = jQuery.cookie('mvplayer_cta_lockdown_shared{$youtube_players[$i]['player_id']}');
            if({$youtube_players[$i]['cta']}==1 && {$youtube_players[$i]['ctabtn_duration']}==1 && mvplayer_cta_shared == null && check_preview != null && isplaying{$youtube_players[$i]['player_id']}){
                ctabtn_{$youtube_players[$i]['player_id']}();
            }
        }
        function onPlayerStateChange{$youtube_players[$i]['player_id']}(event) {
            // alert('state change')
            var check_preview = jQuery.cookie('check_preview_{$youtube_players[$i]['player_id']}');
            var seektime{$youtube_players[$i]['player_id']} = player{$youtube_players[$i]['player_id']}.getCurrentTime();
            if (event.data == YT.PlayerState.PLAYING) {
                jQuery('.main-wrapper').each(function(index,item){
                    var elem = jQuery(item).data('player_id');
                    var v_type = jQuery(item).data('v_type');
                    if(elem == '{$youtube_players[$i]['player_id']}'){
                        if(v_type == 'yt'){
                            window['player'.concat(elem)].playVideo();
                        }else if(v_type == 'mp4'){
                            flowplayer(jQuery('.player'+elem)).play();
                        }else if(v_type == 'vimeo'){
                            window['player'.concat(elem)].api('play');
                        }
                        window['isplaying'.concat(elem)] = true;
                    }else{
                        var check = jQuery.cookie('check_preview_'+elem);
                        if(v_type == 'yt' && check != null){
                            window['player'.concat(elem)].pauseVideo();
                        }else if(v_type == 'mp4' && check != null){
                            flowplayer(jQuery('.player'+elem)).pause();
                        }else if(v_type == 'vimeo' && check != null){
                            window['player'.concat(elem)].api('pause');
                        }
                        window['isplaying'.concat(elem)] = false;
                    }
                })
                //  This pause event will be fired to make video work
                if(pause_event{$youtube_players[$i]['player_id']}){
                    console.log('video is played');
                    var pausetime{$youtube_players[$i]['player_id']} = player{$youtube_players[$i]['player_id']}.getCurrentTime();
                    if('{$youtube_players[$i]['OptinBox']}'=='yes' && {$youtube_players[$i]['optin_durations']}>0 && !show_optin{$youtube_players[$i]['player_id']} && check_preview != null){
                        optintime{$youtube_players[$i]['player_id']} = {$youtube_players[$i]['optin_durations']} - pausetime{$youtube_players[$i]['player_id']};
                        optin_settime{$youtube_players[$i]['player_id']} = setTimeout(optinShowIt_{$youtube_players[$i]['player_id']},optintime{$youtube_players[$i]['player_id']}*1000);
                    }
                    if('{$youtube_players[$i]['Popup']}'=='yes' && {$youtube_players[$i]['popup_durations']}>0 && !show_popup{$youtube_players[$i]['player_id']} && check_preview != null){
                        popuptime{$youtube_players[$i]['player_id']} = {$youtube_players[$i]['popup_durations']} - pausetime{$youtube_players[$i]['player_id']};
                        popup_settime{$youtube_players[$i]['player_id']} = setTimeout(popupShowIt_{$youtube_players[$i]['player_id']},popuptime{$youtube_players[$i]['player_id']}*1000);
                    }
                    console.log('content duration time: '+{$youtube_players[$i]['content_durations']});
                    console.log(check_preview);
                    if({$youtube_players[$i]['content_durations']}>0 && check_preview != null){
                        console.log('inside if 1');
                        contenttime{$youtube_players[$i]['player_id']} = {$youtube_players[$i]['content_durations']} - pausetime{$youtube_players[$i]['player_id']};
                        if(!cntnt_show{$youtube_players[$i]['player_id']}){
                            console.log('inside if 2');
                            content_settime{$youtube_players[$i]['player_id']} = setTimeout(show_content{$youtube_players[$i]['player_id']}, contenttime{$youtube_players[$i]['player_id']}*1000);
                        }else{console.log('inside else 2');}
                    }else{console.log('inside else 1');}
                    var mvplayer_social_shared = jQuery.cookie('mvplayer_social_lockdown_shared{$youtube_players[$i]['vid']}');
                    console.log('undr pause event mvplayer_social_shared: '+mvplayer_social_shared);
                    console.log('social_lock: '+social_lock{$youtube_players[$i]['player_id']});
                    if({$youtube_players[$i]['social']}==1 && {$youtube_players[$i]['socialbtn_durations']}>0 && !social_lock{$youtube_players[$i]['player_id']} && mvplayer_social_shared == null && check_preview != null){
                        socialtime{$youtube_players[$i]['player_id']} = {$youtube_players[$i]['socialbtn_durations']} - pausetime{$youtube_players[$i]['player_id']};
                        if(!social_show{$youtube_players[$i]['player_id']}){
                            social_settime{$youtube_players[$i]['player_id']} = setTimeout(sociallock_{$youtube_players[$i]['player_id']},socialtime{$youtube_players[$i]['player_id']}*1000);
                        }
                    }
                    var mvplayer_cta_shared = jQuery.cookie('mvplayer_cta_lockdown_shared{$youtube_players[$i]['vid']}');
                    if({$youtube_players[$i]['cta']}==1 && {$youtube_players[$i]['ctabtn_durations']}>0 && !cta_lock{$youtube_players[$i]['player_id']} && mvplayer_cta_shared == null && check_preview != null){
                        ctatime{$youtube_players[$i]['player_id']} = {$youtube_players[$i]['ctabtn_durations']} - pausetime{$youtube_players[$i]['player_id']};
                        if(!cta_show{$youtube_players[$i]['player_id']}){
                            cta_settime{$youtube_players[$i]['player_id']} = setTimeout(ctabtn_{$youtube_players[$i]['player_id']},ctatime{$youtube_players[$i]['player_id']}*1000);
                        }
                    }
                    pause_event{$youtube_players[$i]['player_id']} = false;
                    isplaying{$youtube_players[$i]['player_id']} = true;
                    if({$youtube_players[$i]['content_duration']}==1 && check_preview != null){
                        jQuery('#mvplayer_video_content{$youtube_players[$i]['player_id']}').show();
                    }
                    if('{$youtube_players[$i]['OptinBox']}'=='yes' && {$youtube_players[$i]['optin_duration']}==1 && !show_optin{$youtube_players[$i]['player_id']} && check_preview != null){
                        optinShowIt_{$youtube_players[$i]['player_id']}();
                    }
                    if('{$youtube_players[$i]['Popup']}'=='yes' && {$youtube_players[$i]['popup_duration']}==1 && !show_popup{$youtube_players[$i]['player_id']} && check_preview != null){
                        popupShowIt_{$youtube_players[$i]['player_id']}();
                    }
                    var mvplayer_social_shared = jQuery.cookie('mvplayer_social_lockdown_shared{$youtube_players[$i]['player_id']}');
                    if({$youtube_players[$i]['social']}==1 && {$youtube_players[$i]['socialbtn_duration']}==1 && mvplayer_social_shared == null && check_preview != null){
                        console.log('social log when video player is ready and cookie does not exist');
                        sociallock_{$youtube_players[$i]['player_id']}();
                    }
                    var mvplayer_cta_shared = jQuery.cookie('mvplayer_cta_lockdown_shared{$youtube_players[$i]['player_id']}');
                    if({$youtube_players[$i]['cta']}==1 && {$youtube_players[$i]['ctabtn_duration']}==1 && mvplayer_cta_shared == null && check_preview != null){
                        // console.log('social log when video player is ready and cookie does not exist');
                        ctabtn_{$youtube_players[$i]['player_id']}();
                    }
                }else{
                    //  This else part will run one time on video load
                    console.log('runs once only when the video is loaded');
                    // console.log('129-Else-seektime:'+seektime{$youtube_players[$i]['player_id']});
                    if({$youtube_players[$i]['content_durations']}>0 && check_preview != null){
                        if(seektime{$youtube_players[$i]['player_id']}>{$youtube_players[$i]['content_durations']}){show_content{$youtube_players[$i]['player_id']}(); }
                        if(!cntnt_show{$youtube_players[$i]['player_id']}){
                            content_settime{$youtube_players[$i]['player_id']} = setTimeout(show_content{$youtube_players[$i]['player_id']}, {$youtube_players[$i]['content_durations']}*1000);
                        }
                    }
                    if('{$youtube_players[$i]['OptinBox']}'=='yes' && {$youtube_players[$i]['optin_durations']}>0 && !show_optin{$youtube_players[$i]['player_id']} && check_preview != null){
                        if(seektime{$youtube_players[$i]['player_id']}>{$youtube_players[$i]['optin_durations']}){optinShowIt_{$youtube_players[$i]['player_id']}(); }
                        optin_settime{$youtube_players[$i]['player_id']} = setTimeout(function(){
                            if(!show_optin{$youtube_players[$i]['player_id']}){
                            optinShowIt_{$youtube_players[$i]['player_id']}();}
                        }, {$youtube_players[$i]['optin_durations']}*1000);
                    }
                    if('{$youtube_players[$i]['Popup']}'=='yes' && {$youtube_players[$i]['popup_durations']}>0 && !show_popup{$youtube_players[$i]['player_id']} && check_preview != null){
                        console.log('148-ifpopupShowIt:'+seektime{$youtube_players[$i]['player_id']});
                        if(seektime{$youtube_players[$i]['player_id']}>{$youtube_players[$i]['popup_durations']}){popupShowIt_{$youtube_players[$i]['player_id']}(); }
                        popup_settime{$youtube_players[$i]['player_id']} = setTimeout(function(){
                            if(!show_popup{$youtube_players[$i]['player_id']}){
                            popupShowIt_{$youtube_players[$i]['player_id']}();}
                        }, {$youtube_players[$i]['popup_durations']}*1000);
                    }
                    var mvplayer_social_shared = jQuery.cookie('mvplayer_social_lockdown_shared{$youtube_players[$i]['vid']}');
                    if({$youtube_players[$i]['social']}==1 && {$youtube_players[$i]['socialbtn_durations']}>0 && !social_lock{$youtube_players[$i]['player_id']} && mvplayer_social_shared == null && check_preview != null){
                        console.log('seektime: '+seektime{$youtube_players[$i]['player_id']});
                        console.log('socialbtn_durations: '+{$youtube_players[$i]['socialbtn_durations']});
                        console.log('social_show: '+social_show{$youtube_players[$i]['player_id']});
                        if(seektime{$youtube_players[$i]['player_id']}>{$youtube_players[$i]['socialbtn_durations']}){
                            console.log('under seek time');
                            sociallock_{$youtube_players[$i]['player_id']}();
                        }else{
                            console.log('outside seek time');
                        }
                        if(!social_show{$youtube_players[$i]['player_id']}){
                            console.log('social show false');
                            social_settime{$youtube_players[$i]['player_id']} = setTimeout(sociallock_{$youtube_players[$i]['player_id']}, {$youtube_players[$i]['socialbtn_durations']}*1000);
                        }else{
                            console.log('social show true');
                        }
                    }
                    var mvplayer_cta_shared = jQuery.cookie('mvplayer_cta_lockdown_shared{$youtube_players[$i]['vid']}');
                    if({$youtube_players[$i]['cta']}==1 && {$youtube_players[$i]['ctabtn_durations']}>0 && !cta_lock{$youtube_players[$i]['player_id']} && mvplayer_cta_shared == null && check_preview != null){
                        if(seektime{$youtube_players[$i]['player_id']}>{$youtube_players[$i]['ctabtn_durations']}){
                            ctabtn_{$youtube_players[$i]['player_id']}();
                        }
                        if(!cta_show{$youtube_players[$i]['player_id']}){
                            cta_settime{$youtube_players[$i]['player_id']} = setTimeout(ctabtn_{$youtube_players[$i]['player_id']}, {$youtube_players[$i]['ctabtn_durations']}*1000);
                        }
                    }
                    if({$youtube_players[$i]['content_duration']}==1 && check_preview != null){
                        jQuery('#mvplayer_video_content{$youtube_players[$i]['player_id']}').show();
                    }
                    if('{$youtube_players[$i]['OptinBox']}'=='yes' && {$youtube_players[$i]['optin_duration']}==1 && !show_optin{$youtube_players[$i]['player_id']} && check_preview != null){
                        optinShowIt_{$youtube_players[$i]['player_id']}();
                    }
                    if('{$youtube_players[$i]['Popup']}'=='yes' && {$youtube_players[$i]['popup_duration']}==1 && !show_popup{$youtube_players[$i]['player_id']} && check_preview != null){
                        popupShowIt_{$youtube_players[$i]['player_id']}();
                    }
                    var mvplayer_social_shared = jQuery.cookie('mvplayer_social_lockdown_shared{$youtube_players[$i]['player_id']}');
                    if({$youtube_players[$i]['social']}==1 && {$youtube_players[$i]['socialbtn_duration']}==1 && mvplayer_social_shared == null && check_preview != null){
                        console.log('social log when video player is ready and cookie does not exist');
                        sociallock_{$youtube_players[$i]['player_id']}();
                    }
                    var mvplayer_cta_shared = jQuery.cookie('mvplayer_cta_lockdown_shared{$youtube_players[$i]['player_id']}');
                    if({$youtube_players[$i]['cta']}==1 && {$youtube_players[$i]['ctabtn_duration']}==1 && mvplayer_cta_shared == null && check_preview != null){
                        ctabtn_{$youtube_players[$i]['player_id']}();
                    }
                }
            }
            //  This block will run once video will be paused
            if (event.data == YT.PlayerState.PAUSED) {
                // alert('pause event')
                var seektime{$youtube_players[$i]['player_id']} = player{$youtube_players[$i]['player_id']}.getCurrentTime();
                console.log('169-PAUSED-seektime:'+seektime{$youtube_players[$i]['player_id']});
                var pausetime{$youtube_players[$i]['player_id']} = player{$youtube_players[$i]['player_id']}.getCurrentTime();
                console.log('172-pausetime:'+pausetime{$youtube_players[$i]['player_id']});
                if(optin_settime{$youtube_players[$i]['player_id']} && check_preview != null){
                    clearTimeout(optin_settime{$youtube_players[$i]['player_id']});
                }
                if(popup_settime{$youtube_players[$i]['player_id']} && check_preview != null){
                    console.log('before-popup_settime:'+popup_settime{$youtube_players[$i]['player_id']});
                    clearTimeout(popup_settime{$youtube_players[$i]['player_id']});
                    console.log('after-popup_settime:'+popup_settime{$youtube_players[$i]['player_id']});
                }
                if(content_settime{$youtube_players[$i]['player_id']} && check_preview != null){
                    //cntnt_show{$youtube_players[$i]['player_id']} = true;
                    clearTimeout(content_settime{$youtube_players[$i]['player_id']});
                }
                if(social_settime{$youtube_players[$i]['player_id']} && check_preview != null){
                    //social_show{$youtube_players[$i]['player_id']} = true;
                    clearTimeout(social_settime{$youtube_players[$i]['player_id']});
                }
                if(cta_settime{$youtube_players[$i]['player_id']} && check_preview != null){
                    //cta_show{$youtube_players[$i]['player_id']} = true;
                    clearTimeout(cta_settime{$youtube_players[$i]['player_id']});
                }
                if('{$youtube_players[$i]['allowpause']}'=='1' && !on_ps{$youtube_players[$i]['player_id']} && check_preview != null){
                    on_ps{$youtube_players[$i]['player_id']} = false;
                    jQuery('#ico_img{$youtube_players[$i]['player_id']}').hide();
                    player{$youtube_players[$i]['player_id']}.playVideo();
                    isplaying{$youtube_players[$i]['player_id']}=true;
                }
                pause_event{$youtube_players[$i]['player_id']} = true;
                isplaying{$youtube_players[$i]['player_id']} = false;
            }
            //  This block will run once video will be ended
            if (event.data == YT.PlayerState.ENDED) {
                if({$youtube_players[$i]['content_dur_end']}==1 && check_preview != null){
                    jQuery('#mvplayer_video_content{$youtube_players[$i]['player_id']}').show();
                }
                if('{$youtube_players[$i]['OptinBox']}'=='yes' && {$youtube_players[$i]['optin_dur_end']}==1 && !show_optin{$youtube_players[$i]['player_id']} && check_preview != null){
                    optinShowIt_{$youtube_players[$i]['player_id']}();
                }
                if('{$youtube_players[$i]['Popup']}'=='yes' && {$youtube_players[$i]['popup_dur_end']}==1 && !show_popup{$youtube_players[$i]['player_id']} && check_preview != null){
                    popupShowIt_{$youtube_players[$i]['player_id']}();
                }
                var mvplayer_social_shared = jQuery.cookie('mvplayer_social_lockdown_shared{$youtube_players[$i]['vid']}');
                if({$youtube_players[$i]['social']}==1 && {$youtube_players[$i]['socialbtn_dur_end']}==1 && mvplayer_social_shared == null && check_preview != null){
                    sociallock_{$youtube_players[$i]['player_id']}();
                    console.log('social log when video player has ended and cookie does not exist');
                }else{
                    console.log('social log when video player has ended and cookie does exist');
                }
                var mvplayer_cta_shared = jQuery.cookie('mvplayer_cta_lockdown_shared{$youtube_players[$i]['vid']}');
                if({$youtube_players[$i]['cta']}==1 && {$youtube_players[$i]['ctabtn_dur_end']}==1 && mvplayer_cta_shared == null && check_preview != null){
                    ctabtn_{$youtube_players[$i]['player_id']}();
                    console.log('social log when video player has ended and cookie does not exist');
                }
            }
        }
        </script>";
        ?>
        <script>
            jQuery('.vid-list a').click(function (){
                jQuery("li.vid-list.active").removeClass("active");
                jQuery(this).parent('li').addClass('active');
                var src = jQuery(this).attr('data-src');
                var vidurl = jQuery("iframe#player<?php echo $youtube_players[$i]['player_id']; ?>").attr('src');
                console.log("vidurl: "+vidurl);
                var newUrl = vidurl.replace(/\/embed\/[^?]+/, '/embed/' + src);
                jQuery(this).parents('.all-vid-pl').siblings('div').find(`iframe#player<?php echo $youtube_players[$i]['player_id']; ?>`).attr('src', newUrl);
            });
            jQuery('#ico_img<?php echo $youtube_players[$i]['player_id']; ?>').on('click',function(){
                jQuery(this).hide();
                player<?php echo $youtube_players[$i]['player_id']; ?>.playVideo();
                isplaying<?php echo $youtube_players[$i]['player_id']; ?>=true;
            });
            jQuery(window).scroll(function() {
                var pos<?php echo $youtube_players[$i]['player_id']; ?> = jQuery('#main-parent-<?php echo $youtube_players[$i]['player_id']; ?>').offset().top;
                var wintop<?php echo $youtube_players[$i]['player_id']; ?> = jQuery(window).scrollTop();
                if(<?php echo $youtube_players[$i]['allowscroll']; ?>==1){
                    if(pos<?php echo $youtube_players[$i]['player_id']; ?> > 0){
                        if(wintop<?php echo $youtube_players[$i]['player_id']; ?> > pos<?php echo $youtube_players[$i]['player_id']; ?> && isplaying<?php echo $youtube_players[$i]['player_id']; ?>){
                            jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?>').addClass('pip-video');
                            jQuery('.skin-img').addClass('skin-dim');
                            jQuery('#main-parent-<?php echo $youtube_players[$i]['player_id']; ?>').css('min-height','400px');
                        }else{
                            jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?>').removeClass('pip-video');
                            jQuery('.skin-img').removeClass('skin-dim');
                            jQuery('#main-parent-<?php echo $youtube_players[$i]['player_id']; ?>').css('min-height','0px');
                        }
                    }
                }
            });
            function mvplayer_social_lockdown_plusone(plusone) {
                if (plusone.state == "on") {
                    var data = {post: "<?php echo $whichpost; ?>", action: "mvplayer_social_lockdown", source: "google"};
                    jQuery.post("<?php echo admin_url('admin-ajax.php'); ?>", data, function(response) {
                    if(current_player_id == '<?php echo $youtube_players[$i]['player_id']; ?>')
                    {
                        <?php echo 'sociallock_hide_' . $youtube_players[$i]['player_id'] . '();'; ?>
                    }
                    });
                }
            }
            jQuery(document).ready(function() {
                FB.Event.subscribe("edge.create", function(href) {
                    var data = {post: "<?php echo $whichpost; ?>", action: "mvplayer_social_lockdown", source: "facebook"};
                    jQuery.post("<?php echo admin_url('admin-ajax.php'); ?>", data, function(response) {
                        jQuery(".fb_edge_comment_widget.fb_iframe_widget").remove();
                        if(current_player_id == '<?php echo $youtube_players[$i]['player_id']; ?>')
                        {
                            <?php echo 'sociallock_hide_' . $youtube_players[$i]['player_id'] . '();'; ?>
                        }
                    });
                });
            });
            twttr.ready(function (twttr) {
                twttr.events.bind("tweet", function(event) {
                    var data = {post: "<?php echo $whichpost; ?>", action: "mvplayer_social_lockdown", source: "twitter"};
                    jQuery.post("<?php echo admin_url('admin-ajax.php'); ?>", data, function(response) {
                        if(current_player_id == '<?php echo $youtube_players[$i]['player_id']; ?>')
                        {
                            <?php echo 'sociallock_hide_' . $youtube_players[$i]['player_id'] . '();'; ?>
                        }
                    });
                });
            });

            jQuery('.allsharebtn<?php echo $youtube_players[$i]['player_id']; ?>').on('click',function(){
                current_player_id = '<?php echo $youtube_players[$i]['player_id']; ?>';
                jQuery('.social_btn').hide();
                <?php echo 'socialHideIt_' . $youtube_players[$i]['player_id'] . '();'; ?>
            });

            // jQuery('.allsharebtn<?php echo $youtube_players[$i]['player_id']; ?>').on('mouseover',function(){
            //     current_player_id = '<?php echo $youtube_players[$i]['player_id']; ?>';
            // });

            function show_content<?php echo $youtube_players[$i]['player_id']; ?>(){
                jQuery('#mvplayer_video_content<?php echo $youtube_players[$i]['player_id']; ?>').show();
            }

            function sociallock_<?php echo $youtube_players[$i]['player_id']; ?>(){
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_allbtnleft<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_iframe<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_htmlcode<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_maploc<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?>').children('.show_post').hide();
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?>').children('.show_page').hide();
                if(optin_settime<?php echo $youtube_players[$i]['player_id']; ?>){ clearTimeout(optin_settime<?php echo $youtube_players[$i]['player_id']; ?>);}
                if(popup_settime<?php echo $youtube_players[$i]['player_id']; ?>){ clearTimeout(popup_settime<?php echo $youtube_players[$i]['player_id']; ?>);}
                if(content_settime<?php echo $youtube_players[$i]['player_id']; ?>){
                    cntnt_show<?php echo $youtube_players[$i]['player_id']; ?> = false;
                    clearTimeout(content_settime<?php echo $youtube_players[$i]['player_id']; ?>);
                }
                if(cta_settime<?php echo $youtube_players[$i]['player_id']; ?>){
                    cta_show<?php echo $youtube_players[$i]['player_id']; ?> = false;
                }
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_allbtnleft<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> .mv_player_video_overlap').show();
                jQuery('#social_button<?php echo $youtube_players[$i]['player_id']; ?>').css('display','flex');
                jQuery('#cta_section<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                on_ps<?php echo $youtube_players[$i]['player_id']; ?> = true;
                social_lock<?php echo $youtube_players[$i]['player_id']; ?> = true;
                player<?php echo $youtube_players[$i]['player_id']; ?>.pauseVideo();
                isplaying<?php echo $youtube_players[$i]['player_id']; ?>=false;
            }
            function ctabtn_<?php echo $youtube_players[$i]['player_id']; ?>(){
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_allbtnleft<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_iframe<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_htmlcode<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_maploc<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?>').children('.show_post').hide();
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?>').children('.show_page').hide();
                if(optin_settime<?php echo $youtube_players[$i]['player_id']; ?>){ clearTimeout(optin_settime<?php echo $youtube_players[$i]['player_id']; ?>);}
                if(popup_settime<?php echo $youtube_players[$i]['player_id']; ?>){ clearTimeout(popup_settime<?php echo $youtube_players[$i]['player_id']; ?>);}
                if(social_settime<?php echo $youtube_players[$i]['player_id']; ?>){
                    social_show<?php echo $youtube_players[$i]['player_id']; ?> = false;
                }
                if(content_settime<?php echo $youtube_players[$i]['player_id']; ?>){
                    cntnt_show<?php echo $youtube_players[$i]['player_id']; ?> = false;
                    clearTimeout(content_settime<?php echo $youtube_players[$i]['player_id']; ?>);
                }
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_allbtnleft<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> .mv_player_video_overlap').show();
                jQuery('#social_button<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#cta_section<?php echo $youtube_players[$i]['player_id']; ?>').css('display','flex');
                on_ps<?php echo $youtube_players[$i]['player_id']; ?> = true;
                cta_lock<?php echo $youtube_players[$i]['player_id']; ?> = true;
                player<?php echo $youtube_players[$i]['player_id']; ?>.pauseVideo();
                isplaying<?php echo $youtube_players[$i]['player_id']; ?>=false;
            }
            function sociallock_hide_<?php echo $youtube_players[$i]['player_id']; ?>(){
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> .mv_player_video_overlap').hide();
                jQuery('#social_button<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery.cookie('mvplayer_social_lockdown_shared<?php echo $youtube_players[$i]['vid']; ?>', '3', { expires: 30, path: '/' });
                on_ps<?php echo $youtube_players[$i]['player_id']; ?> = false;
                jQuery('#ico_img<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                pause_event<?php echo $youtube_players[$i]['player_id']; ?> = true;
                player<?php echo $youtube_players[$i]['player_id']; ?>.pauseVideo();
                isplaying<?php echo $youtube_players[$i]['player_id']; ?>=false;
            }
            function ctabtn_hide_<?php echo $youtube_players[$i]['player_id']; ?>(){
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> .mv_player_video_overlap').hide();
                jQuery('#cta_section<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery.cookie('mvplayer_cta_lockdown_shared<?php echo $youtube_players[$i]['vid']; ?>', '3', { expires: 30, path: '/' });
                on_ps<?php echo $youtube_players[$i]['player_id']; ?> = false;
                jQuery('#ico_img<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                pause_event<?php echo $youtube_players[$i]['player_id']; ?> = true;
                player<?php echo $youtube_players[$i]['player_id']; ?>.pauseVideo();
                isplaying<?php echo $youtube_players[$i]['player_id']; ?>=false;
            }
            function optinShowIt_<?php echo $youtube_players[$i]['player_id']; ?>(){
                console.log('option close');
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_allbtnleft<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_iframe<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_htmlcode<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_maploc<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?>').children('.show_post').hide();
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?>').children('.show_page').hide();
                if(popup_settime<?php echo $youtube_players[$i]['player_id']; ?>){
                    clearTimeout(popup_settime<?php echo $youtube_players[$i]['player_id']; ?>);
                }
                if(content_settime<?php echo $youtube_players[$i]['player_id']; ?>){
                    console.log('cntnt_show remove');
                    cntnt_show<?php echo $youtube_players[$i]['player_id']; ?> = false;
                }
                if(social_settime<?php echo $youtube_players[$i]['player_id']; ?>){
                    social_show<?php echo $youtube_players[$i]['player_id']; ?> = false;
                }
                if(cta_settime<?php echo $youtube_players[$i]['player_id']; ?>){
                    cta_show<?php echo $youtube_players[$i]['player_id']; ?> = false;
                }
                on_ps<?php echo $youtube_players[$i]['player_id']; ?> = true;
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_allbtnleft<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                if ( document.getElementById("show_optinbox_<?php echo $youtube_players[$i]['player_id']; ?>") ){
                    document.getElementById("show_optinbox_<?php echo $youtube_players[$i]['player_id']; ?>").style.display = "flex";
                }
                player<?php echo $youtube_players[$i]['player_id']; ?>.pauseVideo();
                isplaying<?php echo $youtube_players[$i]['player_id']; ?>=false;
            }
            function popupShowIt_<?php echo $youtube_players[$i]['player_id']; ?>(){
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_allbtnleft<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_iframe<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_htmlcode<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_maploc<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?>').children('.show_post').hide();
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?>').children('.show_page').hide();
                if(optin_settime<?php echo $youtube_players[$i]['player_id']; ?>){ clearTimeout(optin_settime<?php echo $youtube_players[$i]['player_id']; ?>);}
                if(content_settime<?php echo $youtube_players[$i]['player_id']; ?>)
                {
                    cntnt_show<?php echo $youtube_players[$i]['player_id']; ?> = false;
                    clearTimeout(content_settime<?php echo $youtube_players[$i]['player_id']; ?>);
                }
                if(social_settime<?php echo $youtube_players[$i]['player_id']; ?>)
                {
                    social_show<?php echo $youtube_players[$i]['player_id']; ?> = false;
                    clearTimeout(social_settime<?php echo $youtube_players[$i]['player_id']; ?>);
                }
                if(cta_settime<?php echo $youtube_players[$i]['player_id']; ?>)
                {
                    cta_show<?php echo $youtube_players[$i]['player_id']; ?> = false;
                    clearTimeout(social_settime<?php echo $youtube_players[$i]['player_id']; ?>);
                }
                on_ps<?php echo $youtube_players[$i]['player_id']; ?> = true;
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_allbtnleft<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                if ( document.getElementById("show_popupbox_<?php echo $youtube_players[$i]['player_id']; ?>") ){
                    document.getElementById("show_popupbox_<?php echo $youtube_players[$i]['player_id']; ?>").style.display = "block";
                }
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> .mv_player_video_overlap').show();
                player<?php echo $youtube_players[$i]['player_id']; ?>.pauseVideo();
                isplaying<?php echo $youtube_players[$i]['player_id']; ?>=false;
            }
            jQuery('#popuplink<?php echo $youtube_players[$i]['player_id']; ?>').on('click',function(){
                console.log('383');
                if ( document.getElementById("show_popupbox_<?php echo $youtube_players[$i]['player_id']; ?>") ){
                    document.getElementById("show_popupbox_<?php echo $youtube_players[$i]['player_id']; ?>").style.display = "none";
                }
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> .mv_player_video_overlap').hide();
                show_popup<?php echo $youtube_players[$i]['player_id']; ?> = true;
                on_ps<?php echo $youtube_players[$i]['player_id']; ?> = false;
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').show();
                jQuery('#ico_img<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                pause_event<?php echo $youtube_players[$i]['player_id']; ?> = true;
                player<?php echo $youtube_players[$i]['player_id']; ?>.playVideo();
                isplaying<?php echo $youtube_players[$i]['player_id']; ?>=true;
            });
            function optinHideIt_<?php echo $youtube_players[$i]['player_id']; ?>()
            {
                if ( document.getElementById("show_optinbox_<?php echo $youtube_players[$i]['player_id']; ?>") ){
                    document.getElementById("show_optinbox_<?php echo $youtube_players[$i]['player_id']; ?>").style.display = "none";
                }
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> .mv_player_video_overlap').hide();
                show_optin<?php echo $youtube_players[$i]['player_id']; ?> = true;
                on_ps<?php echo $youtube_players[$i]['player_id']; ?> = false;
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').show();
                jQuery('#ico_img<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                pause_event<?php echo $youtube_players[$i]['player_id']; ?> = true;
                player<?php echo $youtube_players[$i]['player_id']; ?>.playVideo();
                isplaying<?php echo $youtube_players[$i]['player_id']; ?>=true;
            }
            function socialHideIt_<?php echo $youtube_players[$i]['player_id']; ?>()
            {
                if ( document.getElementById("social_button<?php echo $youtube_players[$i]['player_id']; ?>") ){
                    document.getElementById("social_button<?php echo $youtube_players[$i]['player_id']; ?>").style.display = "none";
                }
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> .mv_player_video_overlap').hide();
                jQuery.cookie('mvplayer_social_lockdown_shared<?php echo $youtube_players[$i]['player_id']; ?>', '1', { expires: 30, path: '/' });
                oncuepoint_<?php echo $youtube_players[$i]['player_id']; ?> = true;
                social_lock<?php echo $youtube_players[$i]['player_id']; ?> = true;
                on_ps<?php echo $youtube_players[$i]['player_id']; ?> = false;
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').show();
                jQuery('#ico_img<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                pause_event<?php echo $youtube_players[$i]['player_id']; ?> = true;
                player<?php echo $youtube_players[$i]['player_id']; ?>.playVideo();
                isplaying<?php echo $youtube_players[$i]['player_id']; ?>=true;
            }
            function ctaHideIt_<?php echo $youtube_players[$i]['player_id']; ?>()
            {
                console.log(true);
                if ( document.getElementById("cta_section<?php echo $youtube_players[$i]['player_id']; ?>") ){
                    document.getElementById("cta_section<?php echo $youtube_players[$i]['player_id']; ?>").style.display = "none";
                }
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> .mv_player_video_overlap').hide();
                jQuery.cookie('mvplayer_cta_lockdown_shared<?php echo $youtube_players[$i]['player_id']; ?>', '1', { expires: 30, path: '/' });
                oncuepoint_<?php echo $youtube_players[$i]['player_id']; ?> = true;
                cta_lock<?php echo $youtube_players[$i]['player_id']; ?> = true;
                on_ps<?php echo $youtube_players[$i]['player_id']; ?> = false;
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').show();
                jQuery('#ico_img<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                pause_event<?php echo $youtube_players[$i]['player_id']; ?> = true;
                player<?php echo $youtube_players[$i]['player_id']; ?>.playVideo();
                isplaying<?php echo $youtube_players[$i]['player_id']; ?>=true;
            }
            function redirectAndCtaHideIt_<?php echo $youtube_players[$i]['player_id']; ?>()
            {
                if(jQuery(".cta-redirect-<?php echo $youtube_players[$i]['player_id']; ?>").data('redirect_link') != undefined){
                    window.open(
                        jQuery(".cta-redirect-<?php echo $youtube_players[$i]['player_id']; ?>").data("redirect_link"),
                        '_blank' // <- This is what makes it open in a new window.
                    );
                }
                if ( document.getElementById("cta_section<?php echo $youtube_players[$i]['player_id']; ?>") ){
                    document.getElementById("cta_section<?php echo $youtube_players[$i]['player_id']; ?>").style.display = "none";
                }
                jQuery.cookie('mvplayer_cta_lockdown_shared<?php echo $youtube_players[$i]['player_id']; ?>', '1', { expires: 30, path: '/' });
                oncuepoint_<?php echo $youtube_players[$i]['player_id']; ?> = true;
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> .mv_player_video_overlap').hide();
                cta_lock<?php echo $youtube_players[$i]['player_id']; ?> = true;
                on_ps<?php echo $youtube_players[$i]['player_id']; ?> = false;
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').show();
                jQuery('#ico_img<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                player<?php echo $youtube_players[$i]['player_id']; ?>.playVideo();
                isplaying<?php echo $youtube_players[$i]['player_id']; ?>=true;
            }
            jQuery('#morebtnlink<?php echo $youtube_players[$i]['player_id']; ?>').on('click',function(){
                jQuery('#show_allbtnleft<?php echo $youtube_players[$i]['player_id']; ?>').show();
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> .mv_player_video_overlap').show();
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                player<?php echo $youtube_players[$i]['player_id']; ?>.pauseVideo();
                isplaying<?php echo $youtube_players[$i]['player_id']; ?>=false;
                if(optin_settime<?php echo $youtube_players[$i]['player_id']; ?>)
                {
                    clearTimeout(optin_settime<?php echo $youtube_players[$i]['player_id']; ?>);
                }
                if(popup_settime<?php echo $youtube_players[$i]['player_id']; ?>)
                {
                    clearTimeout(popup_settime<?php echo $youtube_players[$i]['player_id']; ?>);
                }
                if(content_settime<?php echo $youtube_players[$i]['player_id']; ?>)
                {
                    cntnt_show<?php echo $youtube_players[$i]['player_id']; ?> = true;
                    clearTimeout(content_settime<?php echo $youtube_players[$i]['player_id']; ?>);
                }
                if(social_settime<?php echo $youtube_players[$i]['player_id']; ?>)
                {
                    social_show<?php echo $youtube_players[$i]['player_id']; ?> = true;
                    clearTimeout(social_settime<?php echo $youtube_players[$i]['player_id']; ?>);
                }
                pause_event<?php echo $youtube_players[$i]['player_id']; ?> = true;
            });

            jQuery('#close_btn_iframe<?php echo $youtube_players[$i]['player_id']; ?>').on('click',function(){
                jQuery(this).parents('#show_iframe<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').show();
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> .mv_player_video_overlap').hide();
                jQuery('#ico_img<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                player<?php echo $youtube_players[$i]['player_id']; ?>.playVideo();
                isplaying<?php echo $youtube_players[$i]['player_id']; ?>=true;
            });
            jQuery('#close_btn_htmlcode<?php echo $youtube_players[$i]['player_id']; ?>').on('click',function(){
                jQuery(this).parents('#show_htmlcode<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').show();
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> .mv_player_video_overlap').hide();
                jQuery('#ico_img<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                player<?php echo $youtube_players[$i]['player_id']; ?>.playVideo();
                isplaying<?php echo $youtube_players[$i]['player_id']; ?>=true;
            });
            jQuery('#close_btn_map<?php echo $youtube_players[$i]['player_id']; ?>').on('click',function(){
                jQuery(this).parents('#show_maploc<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').show();
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> .mv_player_video_overlap').hide();
                jQuery('#ico_img<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                player<?php echo $youtube_players[$i]['player_id']; ?>.playVideo();
                isplaying<?php echo $youtube_players[$i]['player_id']; ?>=true;
            });
            jQuery('#close_btn_relatedvideos<?php echo $youtube_players[$i]['player_id']; ?>').on('click',function(){
                jQuery(this).parents('#show_all_relatedvideo<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery(this).parents('#show_all_relatedvideo<?php echo $youtube_players[$i]['player_id']; ?>').children('.singlevideo').remove();
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').show();
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> .mv_player_video_overlap').hide();
                jQuery('#ico_img<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                player<?php echo $youtube_players[$i]['player_id']; ?>.playVideo();
                isplaying<?php echo $youtube_players[$i]['player_id']; ?>=true;
            });
            jQuery('#close_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').on('click',function(){
                jQuery(this).parents('#show_allbtnleft<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').show();
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> .mv_player_video_overlap').hide();
                jQuery('#ico_img<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                player<?php echo $youtube_players[$i]['player_id']; ?>.playVideo();
                isplaying<?php echo $youtube_players[$i]['player_id']; ?>=true;
            });
            jQuery(document).on("click", "#close_post<?php echo $youtube_players[$i]['player_id']; ?>", function () {
                jQuery(this).parents('.show_post').hide();
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').show();
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> .mv_player_video_overlap').hide();
                jQuery('#ico_img<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                player<?php echo $youtube_players[$i]['player_id']; ?>.playVideo();
                isplaying<?php echo $youtube_players[$i]['player_id']; ?>=true;
            });
            jQuery(document).on("click", "#close_page<?php echo $youtube_players[$i]['player_id']; ?>", function () {
                jQuery(`#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> .pagedesc iframe`).remove();
                jQuery(this).parents('.show_page').hide();
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').show();
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> .mv_player_video_overlap').hide();
                jQuery('#ico_img<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                player<?php echo $youtube_players[$i]['player_id']; ?>.playVideo();
                isplaying<?php echo $youtube_players[$i]['player_id']; ?>=true;
            });
            jQuery(document).on("click", "#front_btnleft<?php echo $youtube_players[$i]['player_id']; ?>", function () {
                jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> .mv_player_video_overlap').hide();
                jQuery(this).parents('#show_allbtnleft<?php echo $youtube_players[$i]['player_id']; ?>').hide();
                var btn_type =jQuery(this).children('#btn_type<?php echo $youtube_players[$i]['player_id']; ?>').val();
                var btn_maptitle =jQuery(this).children('#btn_maptitle<?php echo $youtube_players[$i]['player_id']; ?>').val();
                var btn_maploc =jQuery(this).children('#btn_maploc<?php echo $youtube_players[$i]['player_id']; ?>').val();
                var btn_maplat =jQuery(this).children('.btn_maplat').val();
                var btn_maplng =jQuery(this).children('.btn_maplng').val();
                var btn_iframeurl =jQuery(this).children('#btn_iframeurl<?php echo $youtube_players[$i]['player_id']; ?>').val();
                console.log("btn_iframeurl"+btn_iframeurl);
                console.log("playerid: <?php echo $youtube_players[$i]['player_id']; ?>");
                var btn_htmlcode =jQuery(this).children('#btn_htmlcode<?php echo $youtube_players[$i]['player_id']; ?>').val();
                var btn_relatedvideo_url =jQuery(this).children('#btn_relatedvideo_url<?php echo $youtube_players[$i]['player_id']; ?>').val();
                var btn_relatedvideo_thumb =jQuery(this).children('#btn_relatedvideo_thumb<?php echo $youtube_players[$i]['player_id']; ?>').val();
                var btn_postdivid =jQuery(this).children('.btn_postdivid').val();
                var btn_pagedivid =jQuery(this).children('.btn_pagedivid').val();
                console.log("btn_type: "+btn_type);
                if(btn_type=='iframe')
                {
                    jQuery('#show_iframe<?php echo $youtube_players[$i]['player_id']; ?>').show();
                    jQuery('#show_iframe<?php echo $youtube_players[$i]['player_id']; ?>').children('iframe').attr('src',btn_iframeurl);
                }
                else if(btn_type=='related_video')
                {
                    jQuery('#show_all_relatedvideo<?php echo $youtube_players[$i]['player_id']; ?>').show();
                    var btn_relatedvideo_urlarray = btn_relatedvideo_url.split(",") ;
                    var btn_relatedvideo_thumbarray = btn_relatedvideo_thumb.split(",") ;
                    for(var a=0;a<btn_relatedvideo_urlarray.length;a++)
                    {
                        jQuery('#show_all_relatedvideo<?php echo $youtube_players[$i]['player_id']; ?>').append('<div class="singlevideo"><a target="_blank" href="'+btn_relatedvideo_urlarray[a]+'"><img src="'+btn_relatedvideo_thumbarray[a]+'"></a></div>');
                    }
                }
                else if(btn_type=='post')
                {
                    console.log(btn_postdivid);
                    jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?>').children(btn_postdivid).show();
                }
                else if(btn_type=='page')
                {
                    var plink = jQuery(`#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> ${btn_pagedivid} #pagelink`).val();
                    if(jQuery(`#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> `+btn_pagedivid+ ' .pagedesc').children().length == 1){
                        jQuery(`#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> `+btn_pagedivid+ ' .pagedesc').append("<iframe id='page_iframe' src='"+plink+"' height='100%' width='100%'></iframe>");
                    }
                    jQuery(`#wrapper-<?php echo $youtube_players[$i]['player_id']; ?>`).children(btn_pagedivid).show();
                }
                else if(btn_type=='htmlcode')
                {
                    if(jQuery('#show_htmlcode<?php echo $youtube_players[$i]['player_id']; ?> label').children().length == 0){
                        jQuery('#show_htmlcode<?php echo $youtube_players[$i]['player_id']; ?> label').html(btn_htmlcode);
                    }
                    jQuery('#show_htmlcode<?php echo $youtube_players[$i]['player_id']; ?>').show();
                }
                else if(btn_type=='map')
                {
                    jQuery('#show_maploc<?php echo $youtube_players[$i]['player_id']; ?>').show();
                    var country = null;
                    jQuery(".btn_maploc<?php echo $youtube_players[$i]['player_id']; ?>").each(function(){
                        // Test if the div element is empty
                        if(jQuery(this).val() != "" && jQuery(this).val() != null){
                            console.log('loop is running');
                            country = jQuery(this).val();
                        }
                    });
                    console.log("country: "+"btn_maploc<?php echo $youtube_players[$i]['player_id']; ?>");
                    console.log("country: "+country);
                    if(country){
                        jQuery("#show_map<?php echo $youtube_players[$i]['player_id']; ?>").html(`<iframe id='country_iframe' src='https://maps.google.com/maps?q=${country}&output=embed' height='100%' width='100%'></iframe>`);
                    }
                }
            });
            jQuery(document).on("click", "#front_btn<?php echo $youtube_players[$i]['player_id']; ?>", function () {
                console.log('front_btn<?php echo $youtube_players[$i]['player_id']; ?>');
                if(optin_settime<?php echo $youtube_players[$i]['player_id']; ?>){
                    clearTimeout(optin_settime<?php echo $youtube_players[$i]['player_id']; ?>);
                }
                if(popup_settime<?php echo $youtube_players[$i]['player_id']; ?>){
                    clearTimeout(popup_settime<?php echo $youtube_players[$i]['player_id']; ?>);
                }
                if(content_settime<?php echo $youtube_players[$i]['player_id']; ?>){
                    cntnt_show<?php echo $youtube_players[$i]['player_id']; ?> = true;
                    clearTimeout(content_settime<?php echo $youtube_players[$i]['player_id']; ?>);
                }
                if(social_settime<?php echo $youtube_players[$i]['player_id']; ?>){
                    social_show<?php echo $youtube_players[$i]['player_id']; ?> = true;
                    clearTimeout(social_settime<?php echo $youtube_players[$i]['player_id']; ?>);
                }
                player<?php echo $youtube_players[$i]['player_id']; ?>.pauseVideo();
                isplaying<?php echo $youtube_players[$i]['player_id']; ?>=false;
                pause_event<?php echo $youtube_players[$i]['player_id']; ?> = true;
                var btn_type =jQuery(this).parents('#btn_data<?php echo $youtube_players[$i]['player_id']; ?>').children('#btn_type<?php echo $youtube_players[$i]['player_id']; ?>').val();
                var btn_maptitle =jQuery(this).parents('#btn_data<?php echo $youtube_players[$i]['player_id']; ?>').children('#btn_maptitle<?php echo $youtube_players[$i]['player_id']; ?>').val();
                var btn_maploc =jQuery(this).parents('#btn_data<?php echo $youtube_players[$i]['player_id']; ?>').children('#btn_maploc<?php echo $youtube_players[$i]['player_id']; ?>').val();
                var btn_maplat =jQuery(this).parents('#btn_data<?php echo $youtube_players[$i]['player_id']; ?>').children('.btn_maplat').val();
                var btn_maplng =jQuery(this).parents('#btn_data<?php echo $youtube_players[$i]['player_id']; ?>').children('.btn_maplng').val();
                var btn_iframeurl =jQuery(this).parents('#btn_data<?php echo $youtube_players[$i]['player_id']; ?>').children('#btn_iframeurl<?php echo $youtube_players[$i]['player_id']; ?>').val();
                var btn_htmlcode =jQuery(this).parents('#btn_data<?php echo $youtube_players[$i]['player_id']; ?>').children('#btn_htmlcode<?php echo $youtube_players[$i]['player_id']; ?>').val();
                var btn_relatedvideo_url =jQuery(this).parents('#btn_data<?php echo $youtube_players[$i]['player_id']; ?>').children('#btn_relatedvideo_url<?php echo $youtube_players[$i]['player_id']; ?>').val();
                var btn_relatedvideo_thumb =jQuery(this).parents('#btn_data<?php echo $youtube_players[$i]['player_id']; ?>').children('#btn_relatedvideo_thumb<?php echo $youtube_players[$i]['player_id']; ?>').val();
                var btn_postdivid =jQuery(this).parents('#btn_data<?php echo $youtube_players[$i]['player_id']; ?>').children('.btn_postdivid').val();
                var btn_pagedivid =jQuery(this).parents('#btn_data<?php echo $youtube_players[$i]['player_id']; ?>').children('.btn_pagedivid').val();
                if(btn_type=='iframe'){
                    jQuery('#show_iframe<?php echo $youtube_players[$i]['player_id']; ?>').show();
                    jQuery('#show_iframe<?php echo $youtube_players[$i]['player_id']; ?>').children('iframe').attr('src',btn_iframeurl);
                }else if(btn_type=='related_video'){
                    jQuery('#show_all_relatedvideo<?php echo $youtube_players[$i]['player_id']; ?>').show();
                    var btn_relatedvideo_urlarray = btn_relatedvideo_url.split(",");
                    var btn_relatedvideo_thumbarray = btn_relatedvideo_thumb.split(",");
                    for(var a=0;a<btn_relatedvideo_urlarray.length;a++){
                        jQuery('#show_all_relatedvideo<?php echo $youtube_players[$i]['player_id']; ?>').append('<div class="singlevideo"><a target="_blank" href="'+btn_relatedvideo_urlarray[a]+'"><img src="'+btn_relatedvideo_thumbarray[a]+'"></a></div>');
                    }
                }else if(btn_type=='post'){
                    console.log(btn_postdivid);
                    jQuery('#wrapper-<?php echo $youtube_players[$i]['player_id']; ?>').children(btn_postdivid).show();
                }else if(btn_type=='page'){
                    var plink = jQuery(`#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> ${btn_pagedivid} #pagelink`).val();
                    if(jQuery(`#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> `+btn_pagedivid+ ' .pagedesc').children().length == 1){
                        jQuery(`#wrapper-<?php echo $youtube_players[$i]['player_id']; ?> `+btn_pagedivid+ ' .pagedesc').append("<iframe id='page_iframe' src='"+plink+"' height='100%' width='100%'></iframe>");
                    }
                    jQuery(`#wrapper-<?php echo $youtube_players[$i]['player_id']; ?>`).children(btn_pagedivid).show();
                }else if(btn_type=='htmlcode'){
                    if(jQuery('#show_htmlcode<?php echo $youtube_players[$i]['player_id']; ?> label').children().length == 0){
                        jQuery('#show_htmlcode<?php echo $youtube_players[$i]['player_id']; ?> label').html(btn_htmlcode);
                    }
                    jQuery('#show_htmlcode<?php echo $youtube_players[$i]['player_id']; ?>').show();
                }else if(btn_type=='map'){
                    jQuery('#show_maploc<?php echo $youtube_players[$i]['player_id']; ?>').show();
                    var country = null;
                    jQuery(".btn_maploc<?php echo $youtube_players[$i]['player_id']; ?>").each(function(){
                        // Test if the div element is empty
                        if(jQuery(this).val() != "" && jQuery(this).val() != null){
                            console.log('loop is running');
                            country = jQuery(this).val();
                        }
                    });
                    console.log("country: "+"btn_maploc<?php echo $youtube_players[$i]['player_id']; ?>");
                    console.log("country: "+country);
                    if(country){
                        jQuery("#show_map<?php echo $youtube_players[$i]['player_id']; ?>").html(`<iframe id='country_iframe' src='https://maps.google.com/maps?q=${country}&output=embed' height='100%' width='100%'></iframe>`);
                    }
                }
                jQuery('#show_allbtn<?php echo $youtube_players[$i]['player_id']; ?>').hide();
            });
        </script>
        <?php
$i++;
    }
}
add_action('wp_footer', 'youtube_playerdata');
function google_map_script()
{
    ?><script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
      <script type="text/javascript" src="https://www.youtube.com/iframe_api"></script>
        <?php
}
add_action('wp_footer', 'google_map_script');
function wp_mvplayer_redirect($url, $data = array())
{
    if (count($data) <= 0) {
        /* Try to set headers first */
        //if(! @header( 'Location: '.$url ) )
        {
            echo '<script language="javascript">window.location="' . $url . '";</script>';
        }
    } else {
        /* Genrate the form */
        echo "<form name='SFResponse::redirect-form' id='SFResponse::redirect-form' method='post' action='$url'>";
        foreach ($data as $key => $val) {
            echo "<input type=\"hidden\" name=\"$key\" id=\"$key\" value=\"$val\">";
        }
        echo "</form>";
        /* Now SFResponse::redirect script */
        echo "<script language=\"javascript\">document.forms[\"SFResponse::redirect-form\"].submit();</script>";
    }
    die;
}
//function for get video id from youtube video url
function getYouTubeIdFromURL($url)
{
    $url_string = parse_url($url, PHP_URL_QUERY);
    parse_str($url_string, $args);
    return isset($args['v']) ? $args['v'] : false;
}
global $a;
$a = 0;
function mvplayer($atts, $content = null)
{
    $id = $atts["id"];
    $player_id = uniqid('player_');
    global $wpdb;
    $table_name = $wpdb->prefix . "mvplayer_video";
    $info = $wpdb->get_row("SELECT * FROM $table_name where id= $id ");

    if (empty($info)) {
        return false;
    }

    $tbl_name = $wpdb->prefix . "mvplayer_videobuttons";
    $buttons = $wpdb->get_results("SELECT * FROM $tbl_name where VideoId= $id ");
    $vid = $info->id;
    $video = $info->Video;
    $video_type = $info->VideoSource;
    $image = $info->ImageLogo;
    $height = $info->VideoHeight;
    $width = $info->VideoWidth;
    $auto = $info->AutoPlay;
    if ($auto == 'yes') {$autoplay = 'autoplay';} else { $autoplay = '';}
    $video_align = $info->VideoAlign;
    $videocontent = $info->VideoContent;
    // social lock
    $socialbuttonlocation = $info->SocialButtonLocation;
    $sociallockduration = $info->SocialLockDuration;
    $social_enable = $info->SocialEnable;
    if ($social_enable == 'yes') {$social = 1;} else { $social = 0;}
    if ($socialbuttonlocation == 'beginning') {$socialbtn_duration = 1;} else { $socialbtn_duration = 0;}
    if ($socialbuttonlocation == 'end') {$socialbtn_dur_end = 1;} else { $socialbtn_dur_end = 0;}
    if ($socialbuttonlocation == 'middle') {$socialbtn_durations = $sociallockduration;} else { $socialbtn_durations = 0;}
    $socialtitle = $info->SocialTitle;
    $socialtext = $info->SocialText;
    $DefaultTweet = $info->DefaultTweet;

    // call to action button
    $cta_enable = $info->cta_enable;
    $ctabtn_location = $info->ctabtn_location;
    $ctabtnlock_dur = $info->ctabtn_dur;
    if ($cta_enable == 'yes') {$cta = 1;} else { $cta = 0;}
    if ($ctabtn_location == 'beginning') {$ctabtn_dur = 1;} else { $ctabtn_dur = 0;}
    if ($ctabtn_location == 'end') {$ctabtn_dur_end = 1;} else { $ctabtn_dur_end = 0;}
    if ($ctabtn_location == 'middle') {
        $ctabtn_durs = $ctabtnlock_dur;
    } else {
        $ctabtn_durs = 0;
    }
    $showcontentlocation = $info->ShowContentLocation;
    $showcontentduration = $info->ShowContentDuration;
    if ($showcontentlocation == 'beginning') {$content_duration = 1;} else { $content_duration = 0;}
    if ($showcontentlocation == 'end') {$content_dur_end = 1;} else { $content_dur_end = 0;}
    if ($showcontentlocation == 'middle') {
        if ($info->ShowContentDuration != "") {
            $content_durations = $showcontentduration;
        } else {
            $content_durations = 0;
        }
    } else {
        $content_durations = 0;
    }
    $Popup = $info->Popup;
    $PopupContent = $info->PopupContent;

    $PopupLink = $info->PopupLink;
    $PopupLocation = $info->PopupLocation;
    $PopupMidTime = $info->PopupMidTime;
    if ($Popup == 'yes') {
        if ($PopupLocation == 'beginning') {$popup_duration = 1;} else { $popup_duration = 0;}
        if ($PopupLocation == 'end') {$popup_dur_end = 1;} else { $popup_dur_end = 0;}
        if ($PopupLocation == 'middle') {$popup_durations = $PopupMidTime;} else { $popup_durations = 0;}
    } else {
        $popup_duration = 0;
        $popup_dur_end = 0;
        $popup_durations = 0;
    }

    $OptinBox = $info->OptinBox;
    $SocialLockAllowSkip = $info->SocialLockAllowSkip;
    $ctabtn_allow_skip = $info->ctabtn_allow_skip;
    $OptinLocation = $info->OptinLocation;
    $OptinHeadline = $info->OptinHeadline;
    $OptinText = $info->OptinText;
    $OptinAllowSkip = $info->OptinAllowSkip;
    $OptinMidTime = $info->OptinMidTime;
    $OptinSubmitText = $info->OptinSubmitText;
    $ThankyouMessage = $info->ThankyouMessage;
    $AutoPlay = $info->AutoPlay;
    $videocontrols = $info->VideoControls;
    $VideoMailingList = $info->VideoMailingList;

    if ($videocontrols == 'show') {
        $youtube_controls = 1;
    } else {
        $youtube_controls = 0;
    }
    $AllowPause = $info->AllowPause;
    if ($AllowPause == 'no') {$allowpause = 1;} else { $allowpause = '';}
    $AllowScroll = $info->AllowScroll;
    if ($AllowScroll == 'yes' || $AllowScroll == '') {$allowscroll = 1;} else { $allowscroll = 0;}
    if ($AutoPlay == 'yes') {$auto = 'true';} else { $auto = 'false';}
    if ($OptinBox == 'yes') {
        if ($OptinLocation == 'beginning') {$optin_duration = 1;} else { $optin_duration = 0;}
        if ($OptinLocation == 'end') {$optin_dur_end = 1;} else { $optin_dur_end = 0;}
        if ($OptinLocation == 'middle') {$optin_durations = $OptinMidTime;} else { $optin_durations = 0;}
    } else {
        $optin_duration = 0;
        $optin_dur_end = 0;
        $optin_durations = 0;
    }
    if ($info->PlayerSkin == 'skin1') {
        $img_top = MV_PLAYER_URL . "image/skin6/skin6_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/skin6/skin6_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/skin6/skin6_left_center.png";
        $img_right = MV_PLAYER_URL . "image/skin6/skin6_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/skin6/skin6_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/skin6/skin6_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/skin6/skin6_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/skin6/skin6_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin2') {
        $img_top = MV_PLAYER_URL . "image/skin3/skin3_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/skin3/skin3_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/skin3/skin3_left_center.png";
        $img_right = MV_PLAYER_URL . "image/skin3/skin3_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/skin3/skin3_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/skin3/skin3_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/skin3/skin3_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/skin3/skin3_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin3') {
        $img_top = MV_PLAYER_URL . "image/skin15/skin15_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/skin15/skin15_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/skin15/skin15_left_center.png";
        $img_right = MV_PLAYER_URL . "image/skin15/skin15_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/skin15/skin15_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/skin15/skin15_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/skin15/skin15_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/skin15/skin15_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin4') {
        $img_top = MV_PLAYER_URL . "image/skin1/skin1_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/skin1/skin1_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/skin1/skin1_left_center.png";
        $img_right = MV_PLAYER_URL . "image/skin1/skin1_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/skin1/skin1_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/skin1/skin1_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/skin1/skin1_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/skin1/skin1_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin5') {
        $img_top = MV_PLAYER_URL . "image/skin23/skin23_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/skin23/skin23_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/skin23/skin23_left_center.png";
        $img_right = MV_PLAYER_URL . "image/skin23/skin23_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/skin23/skin23_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/skin23/skin23_right_top2.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/skin23/skin23_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/skin23/skin23_right_bottom2.png";
    } else if ($info->PlayerSkin == 'skin6') {
        $img_top = MV_PLAYER_URL . "image/newskin1/newskin1_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/newskin1/newskin1_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/newskin1/newskin1_left_center.png";
        $img_right = MV_PLAYER_URL . "image/newskin1/newskin1_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/newskin1/newskin1_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/newskin1/newskin1_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/newskin1/newskin1_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/newskin1/newskin1_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin7') {
        $img_top = MV_PLAYER_URL . "image/newskin2/newskin2_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/newskin2/newskin2_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/newskin2/newskin2_left_center.png";
        $img_right = MV_PLAYER_URL . "image/newskin2/newskin2_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/newskin2/newskin2_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/newskin2/newskin2_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/newskin2/newskin2_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/newskin2/newskin2_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin8') {
        $img_top = MV_PLAYER_URL . "image/newskin3/newskin3_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/newskin3/newskin3_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/newskin3/newskin3_left_center.png";
        $img_right = MV_PLAYER_URL . "image/newskin3/newskin3_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/newskin3/newskin3_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/newskin3/newskin3_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/newskin3/newskin3_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/newskin3/newskin3_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin9') {
        $img_top = MV_PLAYER_URL . "image/newskin4/newskin4_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/newskin4/newskin4_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/newskin4/newskin4_left_center.png";
        $img_right = MV_PLAYER_URL . "image/newskin4/newskin4_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/newskin4/newskin4_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/newskin4/newskin4_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/newskin4/newskin4_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/newskin4/newskin4_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin10') {
        $img_top = MV_PLAYER_URL . "image/newskin5/newskin5_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/newskin5/newskin5_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/newskin5/newskin5_left_center.png";
        $img_right = MV_PLAYER_URL . "image/newskin5/newskin5_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/newskin5/newskin5_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/newskin5/newskin5_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/newskin5/newskin5_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/newskin5/newskin5_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin11') {
        $img_top = MV_PLAYER_URL . "image/newskin6/newskin6_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/newskin6/newskin6_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/newskin6/newskin6_left_center.png";
        $img_right = MV_PLAYER_URL . "image/newskin6/newskin6_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/newskin6/newskin6_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/newskin6/newskin6_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/newskin6/newskin6_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/newskin6/newskin6_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin12') {
        $img_top = MV_PLAYER_URL . "image/newskin7/newskin7_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/newskin7/newskin7_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/newskin7/newskin7_left_center.png";
        $img_right = MV_PLAYER_URL . "image/newskin7/newskin7_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/newskin7/newskin7_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/newskin7/newskin7_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/newskin7/newskin7_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/newskin7/newskin7_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin13') {
        $img_top = MV_PLAYER_URL . "image/newskin8/newskin8_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/newskin8/newskin8_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/newskin8/newskin8_left_center.png";
        $img_right = MV_PLAYER_URL . "image/newskin8/newskin8_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/newskin8/newskin8_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/newskin8/newskin8_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/newskin8/newskin8_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/newskin8/newskin8_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin14') {
        $img_top = MV_PLAYER_URL . "image/newskin9/newskin9_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/newskin9/newskin9_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/newskin9/newskin9_left_center.png";
        $img_right = MV_PLAYER_URL . "image/newskin9/newskin9_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/newskin9/newskin9_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/newskin9/newskin9_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/newskin9/newskin9_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/newskin9/newskin9_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin15') {
        $img_top = MV_PLAYER_URL . "image/newskin10/newskin10_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/newskin10/newskin10_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/newskin10/newskin10_left_center.png";
        $img_right = MV_PLAYER_URL . "image/newskin10/newskin10_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/newskin10/newskin10_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/newskin10/newskin10_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/newskin10/newskin10_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/newskin10/newskin10_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin16') {
        $img_top = MV_PLAYER_URL . "image/newskin11/newskin11_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/newskin11/newskin11_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/newskin11/newskin11_left_center.png";
        $img_right = MV_PLAYER_URL . "image/newskin11/newskin11_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/newskin11/newskin11_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/newskin11/newskin11_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/newskin11/newskin11_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/newskin11/newskin11_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin17') {
        $img_top = MV_PLAYER_URL . "image/newskin12/newskin12_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/newskin12/newskin12_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/newskin12/newskin12_left_center.png";
        $img_right = MV_PLAYER_URL . "image/newskin12/newskin12_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/newskin12/newskin12_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/newskin12/newskin12_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/newskin12/newskin12_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/newskin12/newskin12_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin18') {
        $img_top = MV_PLAYER_URL . "image/newskin13/newskin13_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/newskin13/newskin13_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/newskin13/newskin13_left_center.png";
        $img_right = MV_PLAYER_URL . "image/newskin13/newskin13_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/newskin13/newskin13_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/newskin13/newskin13_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/newskin13/newskin13_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/newskin13/newskin13_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin19') {
        $img_top = MV_PLAYER_URL . "image/newskin14/newskin14_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/newskin14/newskin14_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/newskin14/newskin14_left_center.png";
        $img_right = MV_PLAYER_URL . "image/newskin14/newskin14_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/newskin14/newskin14_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/newskin14/newskin14_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/newskin14/newskin14_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/newskin14/newskin14_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin20') {
        $img_top = MV_PLAYER_URL . "image/newskin15/newskin15_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/newskin15/newskin15_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/newskin15/newskin15_left_center.png";
        $img_right = MV_PLAYER_URL . "image/newskin15/newskin15_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/newskin15/newskin15_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/newskin15/newskin15_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/newskin15/newskin15_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/newskin15/newskin15_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin21') {
        $img_top = MV_PLAYER_URL . "image/newskin16/newskin16_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/newskin16/newskin16_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/newskin16/newskin16_left_center.png";
        $img_right = MV_PLAYER_URL . "image/newskin16/newskin16_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/newskin16/newskin16_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/newskin16/newskin16_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/newskin16/newskin16_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/newskin16/newskin16_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin22') {
        $img_top = MV_PLAYER_URL . "image/newskin17/newskin17_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/newskin17/newskin17_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/newskin17/newskin17_left_center.png";
        $img_right = MV_PLAYER_URL . "image/newskin17/newskin17_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/newskin17/newskin17_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/newskin17/newskin17_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/newskin17/newskin17_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/newskin17/newskin17_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin23') {
        $img_top = MV_PLAYER_URL . "image/newskin18/newskin18_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/newskin18/newskin18_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/newskin18/newskin18_left_center.png";
        $img_right = MV_PLAYER_URL . "image/newskin18/newskin18_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/newskin18/newskin18_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/newskin18/newskin18_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/newskin18/newskin18_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/newskin18/newskin18_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin24') {
        $img_top = MV_PLAYER_URL . "image/newskin19/newskin19_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/newskin19/newskin19_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/newskin19/newskin19_left_center.png";
        $img_right = MV_PLAYER_URL . "image/newskin19/newskin19_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/newskin19/newskin19_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/newskin19/newskin19_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/newskin19/newskin19_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/newskin19/newskin19_right_bottom.png";
    } else if ($info->PlayerSkin == 'skin25') {
        $img_top = MV_PLAYER_URL . "image/newskin20/newskin20_center_top.png";
        $img_bottom = MV_PLAYER_URL . "image/newskin20/newskin20_center_bottom.png";
        $img_left = MV_PLAYER_URL . "image/newskin20/newskin20_left_center.png";
        $img_right = MV_PLAYER_URL . "image/newskin20/newskin20_right_center.png";
        $img_left_top_corner = MV_PLAYER_URL . "image/newskin20/newskin20_left_top.png";
        $img_right_top_corner = MV_PLAYER_URL . "image/newskin20/newskin20_right_top.png";
        $img_left_bottom_corner = MV_PLAYER_URL . "image/newskin20/newskin20_left_bottom.png";
        $img_right_bottom_corner = MV_PLAYER_URL . "image/newskin20/newskin20_right_bottom.png";
    }
    $v_url = parse_url($video);
    if (preg_match("/\/watch/", $v_url["path"]) && $video_type == 'youtube_video') {
        $youtube_video_id = getYouTubeIdFromURL($video);
        global $a, $youtube_players;
        $youtube_players[$a]['player_id'] = $player_id;
        $youtube_players[$a]['video_id'] = $youtube_video_id;
        $youtube_players[$a]['height'] = $height;
        $youtube_players[$a]['width'] = $width;
        $youtube_players[$a]['auto'] = $auto;
        $youtube_players[$a]['content_duration'] = $content_duration;
        $youtube_players[$a]['OptinBox'] = $OptinBox;
        $youtube_players[$a]['Popup'] = $Popup;
        $youtube_players[$a]['popup_duration'] = $popup_duration;
        $youtube_players[$a]['popup_durations'] = $popup_durations;
        $youtube_players[$a]['popup_dur_end'] = $popup_dur_end;
        $youtube_players[$a]['social'] = $social;
        $youtube_players[$a]['optin_duration'] = $optin_duration;
        $youtube_players[$a]['videocontrols'] = $youtube_controls;
        $youtube_players[$a]['socialbtn_duration'] = $socialbtn_duration;
        $youtube_players[$a]['vid'] = $vid;
        $youtube_players[$a]['content_durations'] = $content_durations;
        $youtube_players[$a]['optin_durations'] = $optin_durations;
        $youtube_players[$a]['socialbtn_durations'] = $socialbtn_durations;
        $youtube_players[$a]['allowpause'] = $allowpause;
        $youtube_players[$a]['allowscroll'] = $allowscroll;
        $youtube_players[$a]['content_dur_end'] = $content_dur_end;
        $youtube_players[$a]['optin_dur_end'] = $optin_dur_end;
        $youtube_players[$a]['socialbtn_dur_end'] = $socialbtn_dur_end;
        $youtube_players[$a]['cta'] = $cta;
        $youtube_players[$a]['ctabtn_duration'] = $ctabtn_dur;
        $youtube_players[$a]['ctabtn_durations'] = $ctabtn_durs;
        $youtube_players[$a]['ctabtn_dur_end'] = $ctabtn_dur_end;
        $youtube_players[$a]['mvp_type'] = "video";
        $a++;
        $container_width = $width + 300;
        $scroll_class = '';

        if ($info->PlayerSkin == 'skin25') {
            $container_width = $container_width + 30;
            $scroll_class = 'skin_scroll';
        }
        $main_style = "max-width:{$width}px!important;min-height:{$height}px;";
        if ($video_align == "left") {
            $main_style .= "float: left!important;";
        } else if ($video_align == "center") {
            $main_style .= "margin: 0 auto!important;";
        } else if ($video_align == "right") {
            $main_style .= "float: right!important;";
        }
        $return = "<div class='main-wrapper {$scroll_class}' data-v_type='yt' data-player_id='{$player_id}' id='inglevideo' style='{$main_style}'><div id='mv_player_loader{$player_id}' class='mv_player_loader'></div>
                    <style>
                        #optinsubmit{
                            background-color: #1da900;
                            color: #FFF;
                            padding: 5px 15px;
                            font-size: 14px;
                            text-transform: capitalize!important;
                            border-radius:4px;
                            margin-top: 8px;
                            display: inline-block;
                            cursor:pointer;
                        }
                    </style>
                    <div id='main-parent-{$player_id}' >
                    <div class='wrapper_player' id='wrapper-{$player_id}' style='position:relative;display: inline-block;'>";
        $return .= "<input type='hidden' class='iframe-id' data-attr='player{$player_id}'><div id='id-JjWqkhvXVKA' style='pointer-events: none'></div>";
        if ($info->PlayerSkin == 'skin1') //anujy1
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = MV_PLAYER_URL . '/image/newSkins/1-skin.png';
            $return .= "<img src ='{$skingImg}' class='skin-img' style='display:block;height:{$height}px;width:{$width}px;'>
                            <div class='youtubeVideo'style='width: 88%;clear: both;position: absolute;top: 2.4%;left: 6%;height: 94%;'>";
            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'style='height: 100%;width: 100%;'>";
            }

            $return .= "<div id='player{$player_id}' style='height:100%;background:url({$image});'></div>";
            $return .= "<style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                    margin-left: 45px;
                                    margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                                .main-wrapper{
                                        height: 100% !important;
                                    }
                            }
                    </style>
            </div>";
        } else if ($info->PlayerSkin == 'skin2') //anujy2
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = MV_PLAYER_URL . '/image/newSkins/2-skin.png';
            $return .= "<img src ='{$skingImg}' class='skin-img' style='display:block;height:{$height}px;width:{$width}px;'>";
            $return .= "<div class='youtubeVideo'
                    style='
                        width: 99.3%;
                        clear: both;
                        position: absolute;
                        top: 0.6%;
                        left: 0.3%;
                        height: 99%;
                    }
                    '>";
            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                        style='
                        height: 100%;
                        width: 100%;
                    '>";
            }
            $return .= "<div id='player{$player_id}' style='height:100%;background:url({$image});'></div>";
            $return .= "<style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                    margin-left: 45px;
                                    margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                                .main-wrapper{
                                        height: 100% !important;
                                    }
                            }
                    </style>
            </div>";
        } else if ($info->PlayerSkin == 'skin3') //anujy3
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = MV_PLAYER_URL . '/image/newSkins/3-skin.png';

            $return .= "<img src ='{$skingImg}' class='skin-img'  style='display:block;height:{$height}px;width:{$width}px;'>";
            $return .= "<div class='youtubeVideo'
                                style='
                                    width: 88%;
                                        clear: both;
                                        position: absolute;
                                        top: 4.4%;
                                        left: 5.8%;
                                        height: 91%;'>";

            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }
            $return .= "
                    <div id='player{$player_id}' style='height:100%;background:url({$image});'></div>
                    <style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                    margin-left: 45px;
                                    margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                            }
                                .main-wrapper{
                                        height: 100% !important;
                                    }
                    </style>
            </div>";
        } else if ($info->PlayerSkin == 'skin4') //anujy4
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }

            $skingImg = MV_PLAYER_URL . '/image/newSkins/4-skin.png';
            $return .= "<img src ='{$skingImg}' class='skin-img' style='display:block;height:{$height}px;width:{$width}px;'>";
            $return .= "<div class='youtubeVideo'
                                style='
                                    width: 87%;
                                    clear: both;
                                    position: absolute;
                                    top: 4.4%;
                                    left: 6.8%;
                                    height: 92%;'>";

            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";
            }
            $return .= "<div id='player{$player_id}' style='height:100%;background:url({$image});'></div>";
            $return .= "<style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                    margin-left: 45px;
                                    margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                            }
                                .main-wrapper{
                                        height: 100% !important;
                                    }
                    </style>
                </div>";
        } else if ($info->PlayerSkin == 'skin5') //anujy5
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = MV_PLAYER_URL . '/image/newSkins/5-skin.png';
            $return .= "<img src ='{$skingImg}' class='skin-img' style='display:block;height:{$height}px;width:{$width}px;'>";
            $return .= "<div class='youtubeVideo'
                                style='width: 95%;
                                clear: both;
                                position: absolute;
                                top: 3.5%;
                                left: 2.5%;
                                height: 93%;
                                '>";
            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }
            $return .= "
                    <div id='player{$player_id}' style='height:100%;background:url({$image});'></div>
                    <style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                    margin-left: 45px;
                                    margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                            }
                                .main-wrapper{
                                        height: 100% !important;
                                    }
                    </style>
                </div>";
        } else if ($info->PlayerSkin == 'skin6') //anujy6
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>
                            ";
            }
            $skingImg = MV_PLAYER_URL . '/image/newSkins/6-skin.png';
            $return .= "<img src ='{$skingImg}' class='img-u-tube skin-img' style='display:block;height:{$height}px;width:{$width}px;'>";
            $return .= "<div class='youtubeVideo' style='width: 92.8%;clear: both;position: absolute;top: 5.4%;left: 3.8%;height:89%;'>";

            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }
            $return .= "<div id='player{$player_id}' style='height:100%;'></div>";
            $return .= "<style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                    margin-left: 45px;
                                    margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                    </style>
                </div>";
        } else if ($info->PlayerSkin == 'skin7') //anujy7
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>';
                                    </div>
                                </div>";
            }
            $skingImg = MV_PLAYER_URL . '/image/newSkins/7-skin.png';
            $return .= "<img src ='{$skingImg}' class='skin-img' class='img-u-tube' style='display:block;height:{$height}px;width:{$width}px;'>";
            $return .= "<div class='youtubeVideo' style='width: 92.8%;clear: both;position: absolute;top: 5.4%;left: 3.8%;height:89%;'>";

            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }
            $return .= "<div id='player{$player_id}' style='background:url({$image});height:100%;'></div>";
            $return .= "<style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                    margin-left: 45px;
                                    margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                            }
                                .main-wrapper{
                                        height: 100% !important;
                                    }
                    </style>
                </div>";
        } else if ($info->PlayerSkin == 'skin8') //anujy8
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = MV_PLAYER_URL . '/image/newSkins/8-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='skin-img' class='img-u-tube' style='display:block;height:{$height}px;width:{$width}px;'>
                <div class='youtubeVideo'
            style='
            width: 93.8%;
            clear: both;
            position: absolute;
            top: 5.4%;
            left: 3.2%;
            height: 89%;
            '>";
            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }

            $return .= "<div id='player{$player_id}' style='background:url({$image});height:100%;'></div>";
            $return .= "<style>
                                #wrapper-{$player_id} .mv_player_video_overlap,
                                #show_all_relatedvideo{$player_id}
                                {
                                        margin-left: 45px;
                                        margin-top: 53px ;
                                }
                                #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                                @media screen and (max-width: {$width}px) {
                                    .skin-img{
                                        height:100% !important;
                                        width:100% !important;
                                    }
                                }
                                    .main-wrapper{
                                            height: 100% !important;
                                        }
                        </style>
                    </div>";
        } else if ($info->PlayerSkin == 'skin9') //anujy9
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = MV_PLAYER_URL . '/image/newSkins/9-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='skin-img' class='img-u-tube' style='display:block;height:{$height}px;width:{$width}px;'>
            <div class='youtubeVideo'
            style='
            width: 92.8%;
            clear: both;
            position: absolute;
            top: 5.4%;
            left: 3.8%;
            height:89%;
            '>";

            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }
            $return .= "<div id='player{$player_id}' style='background:url({$image});height:100%;'></div>";
            $return .= "<style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                    margin-left: 45px;
                                    margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                            }
                                .main-wrapper{
                                        height: 100% !important;
                                    }
                    </style>
                </div>";
        } else if ($info->PlayerSkin == 'skin10') //anujy10
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = MV_PLAYER_URL . '/image/newSkins/10-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='skin-img' class='img-u-tube' style='display:block;height:{$height}px;width:{$width}px;'>
            <div class='youtubeVideo'
            style='
            width: 92.8%;
            clear: both;
            position: absolute;
            top: 5.4%;
            left: 3.8%;
            height:89%;
            '>";
            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }
            $return .= "<div id='player{$player_id}' style='background:url({$image});height:100%;'></div>";
            $return .= "<style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                    margin-left: 45px;
                                    margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                            }
                                .main-wrapper{
                                        height: 100% !important;
                                    }
                    </style>
                </div>";
        } else if ($info->PlayerSkin == 'skin11') //anujy11
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }

            $skingImg = MV_PLAYER_URL . '/image/newSkins/11-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='skin-img' style='display:block;height:{$height}px;width:{$width}px;'>
            <div class='youtubeVideo'
            style='
            width: 92.9%;
            clear: both;
            position: absolute;
            top: 5.4%;
            left: 3.6%;
            height:89%;
            '>";

            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }

            $return .= "<div id='player{$player_id}' style='height:100%;background:url({$image});width:100%;'></div>";
            $return .= "<style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                    margin-left: 45px;
                                    margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                            }
                                .main-wrapper{
                                        height: 100% !important;
                                    }
                    </style>
                </div>";
        } else if ($info->PlayerSkin == 'skin12') //anujy12
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = MV_PLAYER_URL . '/image/newSkins/12-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='skin-img' style='display:block;height:{$height}px;width:{$width}px;'>
            <div class='youtubeVideo'
            style='
                width: 93.8%;
                clear: both;
                position: absolute;
                top: 5.4%;
                left: 3.3%;
                height: 90%;
            '>";
            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }

            $return .= "<div id='player{$player_id}' style='background:url({$image});height:100%;'></div>";
            $return .= "<style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                    margin-left: 45px;
                                    margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                            }
                                .main-wrapper{
                                        height: 100% !important;
                                    }
                    </style>
                </div>";
        } else if ($info->PlayerSkin == 'skin13') //anujy13
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }

            $skingImg = MV_PLAYER_URL . '/image/newSkins/13-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='skin-img' style='display:block;height:{$height}px;width:{$width}px;'>
            <div class='youtubeVideo'
            style='
                    width: 93.8%;
                    clear: both;
                    position: absolute;
                    top: 5.4%;
                    left: 3.9%;
                    height: 88.9%;
                }
            '>";
            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }

            $return .= "<div id='player{$player_id}' style='background:url({$image});height:100%;'></div>";
            $return .= "<style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                    margin-left: 45px;
                                    margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                            }
                                .main-wrapper{
                                        height: 100% !important;
                                    }
                    </style>
                </div>";
        } else if ($info->PlayerSkin == 'skin14') //anujy14
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = MV_PLAYER_URL . '/image/newSkins/14-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='skin-img' style='display:block;height:{$height}px;width:{$width}px;'>
                <div class='youtubeVideo'
            style='
                width: 93.8%;
                clear: both;
                position: absolute;
                top: 5.4%;
                left: 3.3%;
                height: 90%;
            '>";
            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }
            $return .= "<div id='player{$player_id}' style='height:100%;background:url({$image});'></div>";
            $return .= "<style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                    margin-left: 45px;
                                    margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                    </style>
               </div>";
        } else if ($info->PlayerSkin == 'skin15') //anujy15
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = MV_PLAYER_URL . '/image/newSkins/15-skin.png';

            $return .= "
            <img src ='{$skingImg}' class='skin-img' style='display:block;height:{$height}px;width:{$width}px;'>
            <div class='youtubeVideo'
            style='
                width: 93.8%;
                clear: both;

                position: absolute;
                top: 5.4%;
                left: 3.3%;
                height: 90%;
            '>";
            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }
            $return .= "<div id='player{$player_id}' style='height:100%;background:url({$image});'></div>";
            $return .= "<style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                    margin-left: 45px;
                                    margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                            }
                                .main-wrapper{
                                        height: 100% !important;
                                    }
                    </style>
                </div>";
        } else if ($info->PlayerSkin == 'skin16') //anujy16
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }

            $skingImg = MV_PLAYER_URL . '/image/newSkins/16-skin.png';
            $return .= "
                <img src ='{$skingImg}' class='skin-img' style='display:block;height:{$height}px;width:{$width}px;'>
            <div class='youtubeVideo'
            style='
                width: 94%;
                clear: both;
                position: absolute;
                top: 5.4%;
                left: 3.3%;
                height: 90%;
            '>";
            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }

            $return .= "<div id='player{$player_id}' style='height:100%;background:url({$image});'></div>";
            $return .= "<style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                    margin-left: 45px;
                                    margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                            }
                                .main-wrapper{
                                        height: 100% !important;
                                    }
                    </style>
                </div>";
        } else if ($info->PlayerSkin == 'skin17') //anujy17
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = MV_PLAYER_URL . '/image/newSkins/17-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='skin-img' style='display:block;height:{$height}px;width:{$width}px;'>
            <div class='youtubeVideo'
            style='
                width: 93.8%;
                clear: both;
                position: absolute;
                top: 5.4%;
                left: 3.3%;
                height: 90%;
            '>";
            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }
            $return .= "<div id='player{$player_id}' style='height:100%;background:url({$image});'></div>";
            $return .= "<style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                    margin-left: 45px;
                                    margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                            }
                                .main-wrapper{
                                        height: 100% !important;
                                    }
                    </style>
                </div>";

        } else if ($info->PlayerSkin == 'skin18') //anujy18
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = MV_PLAYER_URL . '/image/newSkins/18-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='skin-img' style='display:block;height:{$height}px;width:{$width}px;'>
            <div class='youtubeVideo'
            style='
                width: 93.8%;
                clear: both;
                position: absolute;
                top: 5.4%;
                left: 3.3%;
                height: 90%;
            '>";
            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }
            $return .= "<div id='player{$player_id}' style='height:100%;background:url({$image});'></div>";
            $return .= "<style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                    margin-left: 45px;
                                    margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                            }
                                .main-wrapper{
                                        height: 100% !important;
                                    }
                    </style>
                </div>";
        } else if ($info->PlayerSkin == 'skin19') //anujy19
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = MV_PLAYER_URL . '/image/newSkins/19-skin.png';

            $return .= "
            <img src ='{$skingImg}' class='skin-img' style='display:block;height:{$height}px;width:{$width}px;'>
            <div class='youtubeVideo'
            style='
                width: 93.8%;
                clear: both;
                position: absolute;
                top: 5.4%;
                left: 3.3%;
                height: 90%;
            '>";
            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }
            $return .= "<div id='player{$player_id}' style='height:100%;background:url({$image});'></div>";
            $return .= "<style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                    margin-left: 45px;
                                    margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                            }
                                .main-wrapper{
                                        height: 100% !important;
                                    }
                    </style>
                </div>";
        } else if ($info->PlayerSkin == 'skin20') //anujy20
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = MV_PLAYER_URL . '/image/newSkins/20-skin.png';

            $return .= "
            <img src ='{$skingImg}' class='skin-img' style='display:block;height:{$height}px;width:{$width}px;'>
            <div class='youtubeVideo'
            style='
                width: 93.8%;
                clear: both;
                position: absolute;
                top: 5.4%;
                left: 3.3%;
                height: 90%;
            '>";
            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }

            $return .= "<div id='player{$player_id}' style='height:100%;background:url({$image});'></div>";
            $return .= "<style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                    margin-left: 45px;
                                    margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                            }
                                .main-wrapper{
                                        height: 100% !important;
                                    }
                    </style>
                </div>";
        } else if ($info->PlayerSkin == 'skin21') //anujy21
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 89%;width: 99.4%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = MV_PLAYER_URL . '/image/newSkins/21-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='skin-img' style='display:block;height:{$height}px;width:{$width}px;'>
            <div class='youtubeVideo'
            style='height: 83%;
            width: 95%;
            clear: both;
            position: absolute;
            top: 3.4%;
            left: 2%;
            }'>";
            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }

            $return .= "<div id='player{$player_id}' style='height:100%;background:url({$image});'></div>";
            $return .= "<style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                    margin-left: 45px;
                                    margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                            .left-controls {
                                height: 89% !important;
                                width: 99% !important;
                            }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                            }
                                .main-wrapper{
                                        height: 100% !important;
                                    }
                    </style>
                </div>";
        } else if ($info->PlayerSkin == 'skin22') //anujy22
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 91%;width: 75.3%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;left: 12.3%;border-top-left-radius: 20px;border-top-right-radius: 20px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = MV_PLAYER_URL . '/image/newSkins/22-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='skin-img' style='display:block;height:{$height}px;width:{$width}px;'>
            <div class='youtubeVideo'
                    style='width: 68.5%;
                        clear: both;
                        position: absolute;
                        top: 6.1%;
                        left: 15.7%;
                        height: 85%;'>";
            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }
            $return .= "<div id='player{$player_id}' style='height:100%;background:url({$image});'></div>";
            $return .= "<style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                margin-left: 45px;
                                margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{
                                margin-right: 17%;
                                margin-top: 2%;
                                }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                    </style>
                </div>";
        } else if ($info->PlayerSkin == 'skin23') //anujy23
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 91%;width: 81%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;left: 9.6%;border-top-left-radius: 20px;border-top-right-radius: 20px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = MV_PLAYER_URL . '/image/newSkins/23-skin.png';
            $return .= "
                <img src ='{$skingImg}' class='skin-img' style='display:block;height:{$height}px;width:{$width}px;'>
                <div class='youtubeVideo'
                    style='width: 68.5%;
                        clear: both;
                        position: absolute;
                        top: 6.1%;
                        left: 15.7%;
                        height: 76%;'>";
            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }
            $return .= "<div id='player{$player_id}' style='height:100%;background:url({$image});'></div>";
            $return .= "<style>
                            #wrapper-{$player_id} .mv_player_video_overlap,
                            #show_all_relatedvideo{$player_id}
                            {
                                margin-left: 45px;
                                margin-top: 53px ;
                            }
                            #show_allbtn{$player_id}{
                                margin-right: 17%;
                                margin-top: 2%;
                            }
                            @media screen and (max-width: {$width}px) {
                                .skin-img{
                                    height:100% !important;
                                    width:100% !important;
                                }
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                    </style>
                </div>";
        } else if ($info->PlayerSkin == 'skin24') //anujy24
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 89%;width: 90.8%;display: flex;justify-content: center;align-items: center;background-color: #0a0a0a94;position: absolute;z-index: 333;border-radius: 35px;left: 8.9%;top: 1.6%;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = MV_PLAYER_URL . '/image/newSkins/24-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='skin-img' style='display:block;height:{$height}px;width:{$width}px;'>
            <div class='youtubeVideo' style='width: 83.3%;clear: both;position: absolute;top: 8%;left: 12.5%;height: 77%;'>";

            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }
            $return .= "<div id='player{$player_id}' style='height:100%;background:url({$image});'></div>";
            $return .= "<style>
                        #wrapper-{$player_id} .mv_player_video_overlap,
                        #show_all_relatedvideo{$player_id}
                        {
                                margin-left: 45px;
                                margin-top: 53px ;
                        }
                        #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                        @media screen and (max-width: {$width}px) {
                            .skin-img{
                                height:100% !important;
                                width:100% !important;
                            }
                        }
                            .main-wrapper{
                                    height: 100% !important;
                                }
                </style>
            </div>";
        } else if ($info->PlayerSkin == 'none') {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #0a0a0a94;position: absolute;z-index: 333;border-radius: 0px;left: 0%;top: 0%;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = MV_PLAYER_URL . '/image/newSkins/24-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='skin-img' style='display:block;height:{$height}px;width:{$width}px;visibility:hidden;'>
            <div class='youtubeVideo' style='width: 100%;clear: both;position: absolute;top: 0%;left: 0%;height: 100%;'>";
            if ($image != "") {
                $return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
                style='
                height: 100%;
                width: 100%;
            '>";
            }

            $return .= "<div id='player{$player_id}' style='height:100%;background:url({$image});'></div>";
            $return .= "<style>
                        #wrapper-{$player_id} .mv_player_video_overlap,
                        #show_all_relatedvideo{$player_id}
                        {
                                margin-left: 45px;
                                margin-top: 53px ;
                        }
                        #show_allbtn{$player_id}{ margin-right: 45px;margin-top: 53px; }
                        @media screen and (max-width: {$width}px) {
                            .skin-img{
                                height:100% !important;
                                width:100% !important;
                            }
                        }
                            .main-wrapper{
                                    height: 100% !important;
                                }
                </style>
            </div>";
        } else {
            $return .= "<img src='{$image}' id='ico_img{$player_id}' class='ico_img' style='height:{$height}px;width:{$width}px;margin-left: -3px;margin-top: -3px';>
            <div id='player{$player_id}' style='width:{$width}px;height:{$height}px;background:url({$image});'></div>";
        }
        $return .= "<div class='mv_player_video_overlap' style='width:{$width}px; height:{$height}px;display:none'></div>";
        ob_start();
        require MV_PLAYER_PATH . 'includes/social-lock/socialbtn.php';
        require MV_PLAYER_PATH . 'includes/optin-popup.php';
        require MV_PLAYER_PATH . 'includes/popup.php';
        require MV_PLAYER_PATH . 'includes/ctabtn.php';
        echo "<div id='show_maploc{$player_id}' class='show_maploc'>
                <div id='show_map{$player_id}' class='show_map map-loc-page-you'></div>
                <a class='close_btn_map' id='close_btn_map{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a></div>";
        $return .= "<div class='show_allbtn' id='show_allbtn{$player_id}' style='height:{$height}px;'>";
        $k = 1;
        foreach ($buttons as $button) {
            if ($k < 4) {
                $return .= "<div class='btn_data' id='btn_data{$player_id}'>
                    <a class='front_btn' id='front_btn{$player_id}'><img src=" . $button->Icon . ">    <span class='label'>" . $button->Label . "</span></a>
                            <!--img class='btn_ico' id='btn_ico{$player_id}' src=" . $button->Icon . "-->
                        <input type='hidden' id='btn_type{$player_id}' value='" . $button->Type . "'>
                        <input type='hidden' id='btn_maploc{$player_id}' class='btn_maploc{$player_id}' value='" . $button->MapLocation . "'>
                        <input type='hidden' id='btn_iframeurl{$player_id}' value='" . $button->IframeUrl . "'>
                        <input type='hidden' id='btn_htmlcode{$player_id}' value='" . htmlspecialchars($button->HtmlCode) . "'>
                        <input type='hidden' id='btn_postcat{$player_id}' value='" . $button->PostCategory . "'>
                        <input type='hidden' id='btn_postno{$player_id}' value='" . $button->PostNo . "'>
                        <input type='hidden' id='btn_page{$player_id}' value='" . $button->Page . "'>
                        <input type='hidden' id='btn_relatedvideo_url{$player_id}' value='" . $button->RelatedVideoUrls . "'>
                        <input type='hidden' id='btn_relatedvideo_thumb{$player_id}' value='" . $button->RelatedVideoThumbs . "'>";

                if ($button->PostCategory) {
                    $return .= "<input type='hidden' id='btn_postdivid{$k}' class='btn_postdivid' value='#show_post" . $k . $player_id . "'>";
                } else { $return .= "<input type='hidden' id='btn_postdivid{$k}' class='btn_postdivid'>";}
                if ($button->Page) {
                    $return .= "<input type='hidden' id='btn_pagedivid{$k}' class='btn_pagedivid' value='#show_page" . $k . $player_id . "'>";
                } else { $return .= "<input type='hidden' id='btn_pagedivid{$k}' class='btn_pagedivid'>";}
                $return .= "</div>";
                $k++;
            }
            if ($k == 4) {
                $return .= "<div id='morebtndiv{$player_id}' class='morebtndiv'><a id='morebtnlink{$player_id}' class='morebtnlink'>more..</a><label id='morebtn{$player_id}' class='morebtn'>..</label></div>";
                $k++;
            }
        }
        $return .= "</div>";
        $return .= "<div id='show_allbtnleft{$player_id}' class='show_allbtnleft left-controls' >
                <a class='close_allbtn' id='close_allbtn{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a>";
        $k = 1;
        foreach ($buttons as $button) {
            $j = $k + 3;
            $w = $width - 50;
            $return .= "<div class='front_btnleft' id='front_btnleft{$player_id}' ><img src=" . $button->Icon . ">    " . $button->Label . "
                    <input type='hidden' id='btn_type{$player_id}' value='" . $button->Type . "'>
                    <input type='hidden' id='btn_maploc{$player_id}' class='btn_maploc{$player_id}' value='" . $button->MapLocation . "'>
                    <input type='hidden' id='btn_iframeurl{$player_id}' value='" . $button->IframeUrl . "'>
                    <input type='hidden' id='btn_htmlcode{$player_id}' value='" . htmlspecialchars($button->HtmlCode) . "'>
                    <input type='hidden' id='btn_postcat{$player_id}' value='" . $button->PostCategory . "'>
                    <input type='hidden' id='btn_postno{$player_id}' value='" . $button->PostNo . "'>
                    <input type='hidden' id='btn_page{$player_id}' value='" . $button->Page . "'>
                    <input type='hidden' id='btn_relatedvideo_url{$player_id}' value='" . $button->RelatedVideoUrls . "'>
                    <input type='hidden' id='btn_relatedvideo_thumb{$player_id}' value='" . $button->RelatedVideoThumbs . "'>
                                ";
            if ($button->PostCategory) {
                $return .= "<input type='hidden' id='btn_postdivid{$j}' class='btn_postdivid' value='#show_post" . $j . $player_id . "'>";
            } else { $return .= "<input type='hidden' id='btn_postdivid{$j}' class='btn_postdivid'>";}
            if ($button->Page) {
                $return .= "<input type='hidden' id='btn_pagedivid{$j}' class='btn_pagedivid' value='#show_page" . $j . $player_id . "'>";
            } else { $return .= "<input type='hidden' id='btn_pagedivid{$j}' class='btn_pagedivid'>";}
            $return .= "</div>";
            $k++;
        }
        $return .= "</div>";
        $postdiv_count = 1;
        $postdiv_countleft = 4;
        foreach ($buttons as $button) {
            if ($button->Page) {
                echo "  <div class='show_page eml-page-you' id='show_page{$postdiv_count}{$player_id}'>
                            <a class='close_page' id='close_page{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a>";
                $page = get_post($button->Page);
                echo "      <div class='pagedesc' style='height:100%;'>";
                $plink = get_permalink($page->ID);
                echo "          <input id='pagelink' value='" . $plink . "' hidden/>";
                echo "      </div>";
                echo "</div>";
                echo "  <div class='show_page eml-page-you' id='show_page{$postdiv_countleft}{$player_id}'>
                            <a class='close_page' id='close_page{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a>";
                $page = get_post($button->Page);
                echo "      <div class='pagedesc' style='height:100%;'>";
                $plink = get_permalink($page->ID);
                echo "          <input id='pagelink' value='" . $plink . "' hidden/>";
                echo "      </div>";
                echo "  </div>";
            }
            if ($button->PostCategory) {
                echo "<div class='show_post show-possst-page-you' id='show_post{$postdiv_count}{$player_id}' >
                        <a class='close_post' id='close_post{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a>";
                $args = array('post_type' => 'post', 'tax_query' => array(
                    array('taxonomy' => 'category', 'field' => 'term_id', 'terms' => $button->PostCategory,
                    )));
                $posts = get_posts($args);
                $post_cnt = 1;
                foreach ($posts as $post) {
                    if ($button->PostNo >= $post_cnt) {
                        echo "<div class='postdesc'><div class='posttitle'>" . $post->post_title . "</div>";
                        ?><a class="readmore" target='_blank' href='<?php echo get_permalink($post->ID); ?>'>Read More</a> <?php
echo "</div>";
                        $post_cnt++;
                    }
                }
                echo "</div>";
                echo "<div class='show_post show-possst-page-you' id='show_post{$postdiv_countleft}{$player_id}'>
                        <a class='close_post' id='close_post{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a>";
                $args = array('post_type' => 'post', 'tax_query' => array(
                    array('taxonomy' => 'category', 'field' => 'term_id', 'terms' => $button->PostCategory,
                    )));
                $posts = get_posts($args);
                $post_cnt = 1;
                foreach ($posts as $post) {
                    if ($button->PostNo >= $post_cnt) {
                        echo "<div class='postdesc'><div class='posttitle'>" . $post->post_title . "</div>";
                        ?><a class="readmore" target='_blank' href='<?php echo get_permalink($post->ID); ?>'>Read More</a> <?php
echo "</div>";
                        $post_cnt++;
                    }
                }
                echo "</div>";
            }
            $postdiv_count++;
            $postdiv_countleft++;
        }
        $return .= "<div id='show_all_relatedvideo{$player_id}' class='show_all_relatedvideo' style='  top: -3px;left: 42px;width: 85%!important;min-height: 395px;-webkit-box-shadow: 0px 0px 5px 3px rgba(255,0,0,0.67);-moz-box-shadow: 0px 0px 5px 3px rgba(255,0,0,0.67);box-shadow: 0px 0px 5px 3px rgba(255,0,0,0.67);;'><a class='close_btn_relatedvideos' id='close_btn_relatedvideos{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a></div>";
        $return .= "<div class='show_iframe' id='show_iframe{$player_id}' style='  top: -3px;left: 42px;width: 85%!important;min-height: 395px;-webkit-box-shadow: 0px 0px 5px 3px rgba(255,0,0,0.67);-moz-box-shadow: 0px 0px 5px 3px rgba(255,0,0,0.67);
        box-shadow: 0px 0px 5px 3px rgba(255,0,0,0.67);;'><a class='close_btn_iframe' id='close_btn_iframe{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a><iframe id='if1' name='I1'  height='{$height}px' width='{$width}px'></iframe></div>";
        $return .= "<div class='show_htmlcode shw-html-page-you' id='show_htmlcode{$player_id}'>
                        <a class='close_btn_htmlcode' id='close_btn_htmlcode{$player_id}'>
                        <img src='" . MV_PLAYER_URL . "image/close1.png'></a><label></label></div>";
        $whichpost = get_the_ID();
        ?>
        <!-- ********** START :: Social Share for youtube video ********** -->
        <script type="text/javascript">
            var isplaying<?php echo $player_id; ?> = true;
            jQuery(document).ready(function() {
                if('<?php echo $info->PlayerSkin; ?>'=='skin21'){
                    jQuery("#show_optinbox_<?php echo $player_id; ?>").addClass('optin21');
                    jQuery("#social_button<?php echo $player_id; ?>").addClass('social21');
                    jQuery("#cta_section<?php echo $player_id; ?>").addClass('ctabtn21');
                }else if('<?php echo $info->PlayerSkin; ?>'=='skin22'){
                    jQuery("#show_allbtn<?php echo $player_id; ?>").addClass('mainallbtn22');
                    jQuery("#show_allbtnleft<?php echo $player_id; ?>").addClass('allbtn22');
                    jQuery("#show_optinbox_<?php echo $player_id; ?>").addClass('optin22');
                    jQuery("#social_button<?php echo $player_id; ?>").addClass('social22');
                }else if('<?php echo $info->PlayerSkin; ?>'=='skin23'){
                    jQuery("#show_allbtn<?php echo $player_id; ?>").addClass('mainallbtn23');
                    jQuery("#show_allbtnleft<?php echo $player_id; ?>").addClass('allbtn23');
                    jQuery("#show_optinbox_<?php echo $player_id; ?>").addClass('optin23');
                    jQuery("#social_button<?php echo $player_id; ?>").addClass('social23');
                }else if('<?php echo $info->PlayerSkin; ?>'=='skin24'){
                    jQuery("#show_allbtnleft<?php echo $player_id; ?>").addClass('allbtn24');
                    jQuery("#show_optinbox_<?php echo $player_id; ?>").addClass('optin24');
                    jQuery("#social_button<?php echo $player_id; ?>").addClass('social24');
                }
                // jQuery('.allsharebtn<?php echo $player_id; ?>').on('click',function(){
                //     current_player_id = '<?php echo $player_id; ?>';
                //     jQuery('.social_btn').hide();
                //     jQuery('.cta_btn').hide();
                //     jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                //     jQuery('#social_button<?php echo $player_id; ?>').hide();
                //     jQuery('#cta_section<?php echo $player_id; ?>').hide();
                //     jQuery.cookie('mvplayer_social_lockdown_shared<?php echo $vid; ?>', '1', { expires: 30, path: '/' });
                //     jQuery.cookie('mvplayer_cta_lockdown_shared<?php echo $vid; ?>', '1', { expires: 30, path: '/' });
                //     on_ps<?php echo $player_id; ?> = false;
                //     jQuery('#show_allbtn<?php echo $player_id; ?>').show();
                //     jQuery('#ico_img<?php echo $player_id; ?>').hide();
                //     var iframe<?php echo $player_id; ?> = jQuery('#player<?php echo $player_id; ?>')[0],player<?php echo $player_id; ?> = $f(iframe<?php echo $player_id; ?>);
                //     player<?php echo $player_id; ?>.api('pause');
                //     show_socialbtn<?php echo $player_id; ?> = true;
                //     isplaying<?php echo $player_id; ?> = false;
                // });
            })
            jQuery(document).on("click","#play-icon-<?php echo $player_id; ?>", function(){
                jQuery("#play-overlay-<?php echo $player_id; ?>").hide();
                player<?php echo $player_id; ?>.seekTo(0);
                player<?php echo $player_id; ?>.unMute();
                isplaying<?php echo $player_id; ?> = true;
                jQuery.cookie('check_preview_<?php echo $player_id; ?>', '1', { expires: 30, path: '/' });
            })
        </script>
        <!-- ********** END :: Social Share for youtube video ********** -->
        <?php
$return .= ob_get_clean();
        $return .= "</div></div><div id='mvplayer_video_content" . $player_id . "'style='display:none;margin-top:30px;'>" . do_shortcode($videocontent) . "</div></div>";
        return $return;
    } else if ($video_type == 'vimeo_video') {
        $vimeo_video = (int) substr(parse_url($video, PHP_URL_PATH), 1);
        $controls = 1;
        if ($videocontrols == 'show') {
            $controls = 1;
        } else {
            $controls = 0;
        }
        if ($auto == 'yes' || $auto == 'true') {$autoplay = '&autoplay=1&muted=1';} else { $autoplay = '';}
        $video_url = "https://player.vimeo.com/video/{$vimeo_video}?api=1&player_id=player{$player_id}{$autoplay}&controls={$controls}";

        $container_width = $width + 300;
        $scroll_class = '';
        if ($info->PlayerSkin == 'skin25') {
            $container_width = $container_width + 30;
            $scroll_class = 'skin_scroll';
        }
        $main_style = "max-width:{$width}px!important;min-height:{$height}px;";
        if ($video_align == "left") {
            $main_style .= "float: left!important;";
        } else if ($video_align == "center") {
            $main_style .= "margin: 0 auto!important;";
        } else if ($video_align == "right") {
            $main_style .= "float: right!important;";
        }
        $return = "<div class='main-wrapper {$scroll_class}' data-v_type='vimeo' data-player_id='{$player_id}' id='main-wrapper-{$player_id}' style='{$main_style}'><div id='mv_player_loader{$player_id}' class='mv_player_loader'></div>
                        <style>
                                #optinsubmit{
                                    background-color: #1da900;
                                    color: #FFF;
                                    padding: 5px 15px;
                                    font-size: 14px;
                                    text-transform: capitalize!important;
                                    border-radius:4px;
                                    margin-top: 8px;
                                    display: inline-block;
                                    cursor:pointer;
                                }
                            </style>
                <div id='main-parent-{$player_id}' >
                <div id='wrapper-{$player_id}' style='position:relative;display: inline-block;'>";

        if ($info->PlayerSkin == 'skin1') //anujv1
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='margin-bottom: 10px;width: 94%;height: 25%;background: black;position: absolute;left: 20px;bottom: 0;z-index: 15;'></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/1-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                                <style>
                                #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                                        .vimeoVideo iframe {
                                                width: 87.5%;
                                            height: 85%;
                                            position: absolute;
                                            top: 8.1%;
                                            left: 6%;
                                            background: black;
                                        }
                                        @media screen and (max-width: {$width}px) {
                                            .skinFrame{
                                                height:100% !important;
                                                // width:100% !important;
                                            }
                                            .main-wrapper{
                                                height: 100% !important;
                                            }
                                        }
                                </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin2') //anujv2
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }

            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='margin-bottom: 10px;width: 99.6%;height: 36%;background: black;position: absolute;left: 1px;bottom: 0;z-index: 15;'></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/2-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                                <style>
                                #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                                        .vimeoVideo iframe {
                                            width: 99.3%;
                                            height: 99%;
                                            position: absolute;
                                            top: .6%;
                                            left: .4%;
                                            background: black;
                                        }
                                        @media screen and (max-width: {$width}px) {
                                            .skinFrame{
                                                height:100% !important;
                                                // width:100% !important;
                                            }
                                            .main-wrapper{
                                                height: 100% !important;
                                            }
                                        }
                                </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin3') //anujv3
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='
            // margin-bottom: 10px;
            // width: 94%;
            // height: 25%;
            // background: black;
            // position: absolute;
            // left: 20px;
            // bottom: 0;
            // z-index: 15;
            // '></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/3-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                                <style>
                                #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                                        .vimeoVideo iframe {
                                                width: 88.5%;
                                                height: 84%;
                                                position: absolute;
                                                top: 9.1%;
                                                left: 5%;
                                                background: black;
                                            }
                                        @media screen and (max-width: {$width}px) {
                                            .skinFrame{
                                                height:100% !important;
                                                // width:100% !important;
                                            }
                                            .main-wrapper{
                                                height: 100% !important;
                                            }
                                        }
                                </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin4') //anujv4
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='
            // margin-bottom: 10px;
            // width: 94%;
            // height: 25%;
            // background: black;
            // position: absolute;
            // left: 20px;
            // bottom: 0;
            // z-index: 15;
            // '></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/4-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                                <style>
                                #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                                        .vimeoVideo iframe {
                                            width: 87%;
                                            height: 92%;
                                            position: absolute;
                                            top: 4.1%;
                                            left: 6.8%;
                                            background: black;
                                        }
                                        @media screen and (max-width: {$width}px) {
                                            .skinFrame{
                                                height:100% !important;
                                                // width:100% !important;
                                            }
                                            .main-wrapper{
                                                height: 100% !important;
                                            }
                                        }
                                </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin5') //anujv5
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='
            // margin-bottom: 10px;
            // width: 99.2%;
            // height: 36%;
            // background: black;
            // position: absolute;
            // left: 3px;
            // bottom: 0;
            // z-index: 15;
            // '></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/5-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                                <style>
                                #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                                        .vimeoVideo iframe {
                                            width: 95.3%;
                                            height: 93%;
                                            position: absolute;
                                            top: 3.6%;
                                            left: 2.4%;
                                            background: black;
                                        }
                                        @media screen and (max-width: {$width}px) {
                                            .skinFrame{
                                                height:100% !important;
                                                // width:100% !important;
                                            }
                                            .main-wrapper{
                                                height: 100% !important;
                                            }
                                        }
                                </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin6') //anujv6
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='
            // margin-bottom: 10px;
            // width: 93.2%;
            // height: 25%;
            // background: black;
            // position: absolute;
            // left: 3.5%;
            // bottom: 4.5%;
            // z-index: 15;
            // '></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/6-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                                <style>
                                #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                                .vimeoVideo iframe {
                                    width: 93.2%;
                                    height: 89%;
                                    position: absolute;
                                    top: 5.3%;
                                    left: 3.5%;
                                    background: black;
                                }
                                @media screen and (max-width: {$width}px) {
                                    .skinFrame{
                                        height:100% !important;
                                        // width:100% !important;
                                    }
                                    .main-wrapper{
                                        height: 100% !important;
                                    }
                                }
                                </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin7') //anujv7
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }

            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='
            // margin-bottom: 10px;
            // width: 93.2%;
            // height: 25%;
            // background: black;
            // position: absolute;
            // left: 3.5%;
            // bottom: 4.5%;
            // z-index: 15;
            // '></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/7-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                                <style>
                                #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                                    .vimeoVideo iframe {
                                        width: 93.2%;
                                        height: 89%;
                                        position: absolute;
                                        top: 5.3%;
                                        left: 3.5%;
                                        background: black;
                                    }
                                    @media screen and (max-width: {$width}px) {
                                        .skinFrame{
                                            height:100% !important;
                                            // width:100% !important;
                                        }
                                        .main-wrapper{
                                            height: 100% !important;
                                        }
                                    }
                                </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin8') //anujv8
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='
            // margin-bottom: 10px;
            // width: 94.1%;
            // height: 25%;
            // background: black;
            // position: absolute;
            // left: 3.2%;
            // bottom: 5.5%;
            // z-index: 15;
            // '></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/8-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                        <style>
                        #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                        .vimeoVideo iframe {
                            width: 94%;
                            height: 89%;
                            position: absolute;
                            top: 5.3%;
                            left: 3.3%;
                            background: black;
                        }
                        @media screen and (max-width: {$width}px) {
                            .skinFrame{
                                height:100% !important;
                                // width:100% !important;
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                        }
                        </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin9') //anujv9
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='
            // margin-bottom: 10px;
            // width: 93.2%;
            // height: 25%;
            // background: black;
            // position: absolute;
            // left: 3.5%;
            // bottom: 4.5%;
            // z-index: 15;
            // '></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/9-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                        <style>
                        #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                        .vimeoVideo iframe {
                            width: 93.2%;
                            height: 89%;
                            position: absolute;
                            top: 5.3%;
                            left: 3.5%;
                            background: black;
                        }
                        @media screen and (max-width: {$width}px) {
                            .skinFrame{
                                height:100% !important;
                                // width:100% !important;
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                        }
                        </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin10') //anujv10
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }

            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='
            // margin-bottom: 10px;
            // width: 94.1%;
            // height: 25%;
            // background: black;
            // position: absolute;
            // left: 3.2%;
            // bottom: 5.5%;
            // z-index: 15;
            // '></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/10-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                        <style>
                        #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                        .vimeoVideo iframe {
                            width: 94%;
                            height: 89%;
                            position: absolute;
                            top: 5.3%;
                            left: 3.3%;
                            background: black;
                        }
                        @media screen and (max-width: {$width}px) {
                            .skinFrame{
                                height:100% !important;
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                        }
                        </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin11') //anujv11
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='
            // margin-bottom: 10px;
            // width: 94.1%;
            // height: 25%;
            // background: black;
            // position: absolute;
            // left: 3.2%;
            // bottom: 5.5%;
            // z-index: 15;
            // '></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/11-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                        <style>
                        #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                        .vimeoVideo iframe {
                            width: 94%;
                            height: 89%;
                            position: absolute;
                            top: 5.3%;
                            left: 3.3%;
                            background: black;
                        }
                        @media screen and (max-width: {$width}px) {
                            .skinFrame{
                                height:100% !important;
                                // width:100% !important;
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                        }
                        </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin12') //anujv12
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='
            // margin-bottom: 10px;
            // width: 94.1%;
            // height: 25%;
            // background: black;
            // position: absolute;
            // left: 3.2%;
            // bottom: 5.5%;
            // z-index: 15;
            // '></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/12-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";

            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                                <style>
                                #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                                        .vimeoVideo iframe {
                                                width: 93.8%;
                                                height: 90%;
                                                position: absolute;
                                                top: 5.1%;
                                                left: 3.3%;
                                                background: black;
                                        }
                                        @media screen and (max-width: {$width}px) {
                                            .skinFrame{
                                                height:100% !important;
                                                // width:100% !important;
                                            }
                                            .main-wrapper{
                                                height: 100% !important;
                                            }
                                        }
                                </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin13') //anujv13
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }

            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='
            // margin-bottom: 10px;
            // width: 93.8%;
            // height: 25%;
            // background: black;
            // position: absolute;
            // left: 3.4%;
            // bottom: 3.5%;
            // z-index: 15;
            // '></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/13-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";

            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                        <style>
                        #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                        .vimeoVideo iframe {
                                width: 92.8%;
                                height: 89%;
                                position: absolute;
                                top: 5.1%;
                                left: 3.8%;
                                background: black;
                        }
                        @media screen and (max-width: {$width}px) {
                            .skinFrame{
                                height:100% !important;
                                // width:100% !important;
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                        }
                        </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin14') //anujv14
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }

            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='
            // margin-bottom: 10px;
            // width: 93.2%;
            // height: 25%;
            // background: black;
            // position: absolute;
            // left: 3.5%;
            // bottom: 4.5%;
            // z-index: 15;
            // '></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/14-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                        <style>
                        #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                        .vimeoVideo iframe {
                            width: 92.8%;
                            height: 89%;
                            position: absolute;
                            top: 5.3%;
                            left: 3.8%;
                            background: black;
                        }
                        @media screen and (max-width: {$width}px) {
                            .skinFrame{
                                height:100% !important;
                                // width:100% !important;
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                        }
                        </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin15') //anujv15
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='
            // margin-bottom: 10px;
            // width: 93.2%;
            // height: 25%;
            // background: black;
            // position: absolute;
            // left: 3.5%;
            // bottom: 4.5%;
            // z-index: 15;
            // '></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/15-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "<iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                        <style>
                        #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                        .vimeoVideo iframe {
                            width: 93.2%;
                            height: 88%;
                            position: absolute;
                            top: 5.3%;
                            left: 3.5%;
                            background: black;
                        }
                        @media screen and (max-width: {$width}px) {
                            .skinFrame{
                                height:100% !important;
                                // width:100% !important;
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                        }
                        </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin16') //anujv16
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='
            // margin-bottom: 10px;
            // width: 94.1%;
            // height: 25%;
            // background: black;
            // position: absolute;
            // left: 3.2%;
            // bottom: 4.5%;
            // z-index: 15;
            // '></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/16-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                        <style>
                        #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                        .vimeoVideo iframe {
                            width: 94.2%;
                                height: 90%;
                                position: absolute;
                                top: 5.3%;
                                left: 3.2%;
                                background: black;
                        }
                        @media screen and (max-width: {$width}px) {
                            .skinFrame{
                                height:100% !important;
                                // width:100% !important;
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                        }
                        </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin17') //anujv17
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='
            // margin-bottom: 10px;
            // width: 94.1%;
            // height: 25%;
            // background: black;
            // position: absolute;
            // left: 3.2%;
            // bottom: 4.5%;
            // z-index: 15;
            // '></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/17-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                        <style>
                        #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                        .vimeoVideo iframe {
                                width: 92.8%;
                                height: 89%;
                                position: absolute;
                                top: 5.3%;
                                left: 3.6%;
                                background: black;
                        }
                        @media screen and (max-width: {$width}px) {
                            .skinFrame{
                                height:100% !important;
                                // width:100% !important;
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                        }
                        </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin18') //anujv18
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='
            // margin-bottom: 10px;
            // width: 93.2%;
            // height: 25%;
            // background: black;
            // position: absolute;
            // left: 3.5%;
            // bottom: 4.5%;
            // z-index: 15;
            // '></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/18-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                        <style>
                        #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                        .vimeoVideo iframe {
                                width: 92.9%;
                                height: 89%;
                                position: absolute;
                                top: 5.3%;
                                left: 3.5%;
                                background: black;
                            }
                        @media screen and (max-width: {$width}px) {
                            .skinFrame{
                                height:100% !important;
                                // width:100% !important;
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                        }
                        </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin19') //anujv19
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='
            // margin-bottom: 10px;
            // width: 93.2%;
            // height: 25%;
            // background: black;
            // position: absolute;
            // left: 3.5%;
            // bottom: 4.5%;
            // z-index: 15;
            // '></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/19-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                        <style>
                        #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                        .vimeoVideo iframe {
                            width: 92.9%;
                            height: 89%;
                            position: absolute;
                            top: 5.9%;
                            left: 3.5%;
                            background: black;
                        }
                        @media screen and (max-width: {$width}px) {
                            .skinFrame{
                                height:100% !important;
                                // width:100% !important;
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                        }
                        </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin20') //anujv20
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='margin-bottom: 10px;width: 93.2%;height: 25%;background: black;position: absolute;left: 3.5%;bottom: 4.5%;z-index: 15;'></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'style='height: 100%;width: 100%;'>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/20-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                        <style>
                        #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                        .vimeoVideo iframe {
                            width: 92.9%;
                            height: 89%;
                            position: absolute;
                            top: 5.3%;
                            left: 3.5%;
                            background: black;
                        }
                        @media screen and (max-width: {$width}px) {
                            .skinFrame{
                                height:100% !important;
                                // width:100% !important;
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                        }
                        </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin21') //anujv21
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 89%;width: 99.4%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='margin-bottom: 10px;width: 95.2%;height: 25%;background: black;position: absolute;left: 2%;bottom: 12.8%;z-index: 15;'></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'style='height: 100%;width: 100%;'>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/21-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
            <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                        <style>
                        #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                        .vimeoVideo iframe {
                            width: 94.9%;
                            height: 83%;
                            position: absolute;
                            top: 3.4%;
                            left: 2.2%;
                            background: black;
                        }
                        .left-controls {
                            height: 89% !important;
                            width: 99% !important;
                        }
                        @media screen and (max-width: {$width}px) {
                            .skinFrame{
                                height:100% !important;
                                // width:100% !important;
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                        }
                        </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin22') //anujv22
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 91%;width: 75.3%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;left: 12.3%;border-top-left-radius: 20px;border-top-right-radius: 20px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='
            // margin-bottom: 10px;
            // width: 69.2%;
            // height: 25%;
            // background: black;
            // position: absolute;
            // left: 15%;
            // bottom: 12.8%;
            // z-index: 15;
            // '></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/22-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                        <style>
                        #show_allbtn{$player_id}{
                            margin-right: 16%;
                            margin-top: 4%;
                        }
                        .vimeoVideo .myFrame {
                            width: 68%;
                            height: 100%;
                            position: absolute;
                            left: 16%;
                            top: -3.9%;
                        }
                        @media screen and (max-width: {$width}px) {
                            .skinFrame{
                                height:100% !important;
                                // width:100% !important;
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                        }
                        </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin23') //anujv23
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 91%;width: 81%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;left: 9.7%;border-top-left-radius: 20px;border-top-right-radius: 20px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }

            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='
            // margin-bottom: 10px;
            // width: 69.2%;
            // height: 25%;
            // background: black;
            // position: absolute;
            // left: 15%;
            // bottom: 16.8%;
            // z-index: 15;
            // '></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/23-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}'  style='display:block;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                        <style>
                        #show_allbtn{$player_id}{
                            margin-right: 16%;
                            margin-top: 4%;
                        }
                        .vimeoVideo .myFrame {
                            width: 73.1%;
                            height: 100%;
                            position: absolute;
                            left: 13.6%;
                            top: -5.9%;
                        }
                        @media screen and (max-width: {$width}px) {
                            .skinFrame{
                                height:100% !important;
                                // width:100% !important;
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                        }
                        </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'skin24') //anujv23
        {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 89%;width: 91%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 35px;left: 8.8%;top: 1.5%;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='
            // margin-bottom: 10px;
            // width: 80%;
            // height: 25%;
            // background: black;
            // position: absolute;
            // left: 14%;
            // bottom: 14.8%;
            // z-index: 15;
            // '></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/24-skin.png';
            $return .= "
            <img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                        <style>
                        #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                        .vimeoVideo .myFrame {
                            width: 82%;
                            height: 100%;
                            position: absolute;
                            left: 13.5%;
                            top: -3.9%;
                        }
                        @media screen and (max-width: {$width}px) {
                            .skinFrame{
                                height:100% !important;
                                // width:100% !important;
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                        }
                        </style>
                        </div>
                    </div>";
        } else if ($info->PlayerSkin == 'none') {
            if ($autoplay == "&autoplay=1&muted=1") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #0a0a0a94;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            // $return .= "<div id='hide_controls{$player_id}' class='hide_controls' style='
            // margin-bottom: 10px;
            // width: 80%;
            // height: 25%;
            // background: black;
            // position: absolute;
            // left: 14%;
            // bottom: 14.8%;
            // z-index: 15;
            // '></div>";
            if ($image != "") {$return .= "<img src='{$image}' id='ico_img{$player_id}' class='w-400 ico_img'
            style='
            height: 100%;
            width: 100%;
            '>";}
            $skingImg = MV_PLAYER_URL . '/image/newSkins/6-skin.png';
            $return .= "<img class='skinFrame' id='skinFrame' src ='{$skingImg}' style='display:block;height:{$height}px;width:{$width}px;visibility:hidden;'>";
            $return .= "
            <div>";
            $return .= "<div class='vimeoVideo'>";
            $return .= "
                        <iframe class='myFrame' id='player{$player_id}' src='{$video_url}&rel=0' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen >
                        </iframe>
                        <style>
                        #show_allbtn{$player_id}{ margin-right: 28px;margin-top: 53px; }
                        .vimeoVideo .myFrame {
                            width: 100%;
                            height: 100%;
                            position: absolute;
                            left: 0%;
                            top: 0%;
                            background-color: #000;
                        }
                        @media screen and (max-width: {$width}px) {
                            .skinFrame{
                            .main-wrapper{
                                height: 100% !important;
                            }
                                height:100% !important;
                                // width:100% !important;
                            }
                        }
                        </style>
                        </div>
                    </div>";
        } else {
            $return .= "<img src='{$image}' id='ico_img{$player_id}' class='ico_img' style='height:{$height}px;width:{$width}px;margin-left: -3px;margin-top: -3px;'>
                <div id='hide_controls{$player_id}' class='hide_controls' style='width:{$width}px;'></div>
            <iframe id='player{$player_id}' style='margin:0;' src='{$video_url}' width='{$width}' height='{$height}' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>";
        }
        ob_start();
        require MV_PLAYER_PATH . 'includes/social-lock/socialbtn.php';
        require MV_PLAYER_PATH . 'includes/optin-popup.php';
        require MV_PLAYER_PATH . 'includes/popup.php';
        require MV_PLAYER_PATH . 'includes/ctabtn.php';
        echo "<div id='show_maploc{$player_id}' class='show_maploc map-loc-page'>
        <div id='show_map{$player_id}' class='show_map maptitu' style='width:100%; height:100%;'></div>
                <a class='close_btn_map' id='close_btn_map{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a></div>";
        $return .= "<div class='show_allbtn' id='show_allbtn{$player_id}' style='height:{$height}px;'>";
        $k = 1;
        foreach ($buttons as $button) {
            if ($k < 4) {
                $return .= "<div class='btn_data' id='btn_data{$player_id}'>
                    <a class='front_btn' id='front_btn{$player_id}'><img src=" . $button->Icon . ">    <span class='label'>" . $button->Label . "</span></a>
                            <!--img class='btn_ico' id='btn_ico{$player_id}' src=" . $button->Icon . "-->
                        <input type='hidden' id='btn_type{$player_id}' value='" . $button->Type . "'>
                        <input type='hidden' id='btn_maploc{$player_id}' class='btn_maploc{$player_id}' value='" . $button->MapLocation . "'>
                        <input type='hidden' id='btn_iframeurl{$player_id}' value='" . $button->IframeUrl . "'>
                        <input type='hidden' id='btn_htmlcode{$player_id}' value='" . htmlspecialchars($button->HtmlCode) . "'>
                        <input type='hidden' id='btn_postcat{$player_id}' value='" . $button->PostCategory . "'>
                        <input type='hidden' id='btn_postno{$player_id}' value='" . $button->PostNo . "'>
                        <input type='hidden' id='btn_page{$player_id}' value='" . $button->Page . "'>
                        <input type='hidden' id='btn_relatedvideo_url{$player_id}' value='" . $button->RelatedVideoUrls . "'>
                        <input type='hidden' id='btn_relatedvideo_thumb{$player_id}' value='" . $button->RelatedVideoThumbs . "'>";
                if ($button->PostCategory) {
                    $return .= "<input type='hidden' id='btn_postdivid{$k}' class='btn_postdivid' value='#show_post" . $k . $player_id . "'>";
                } else { $return .= "<input type='hidden' id='btn_postdivid{$k}' class='btn_postdivid'>";}
                if ($button->Page) {
                    $return .= "<input type='hidden' id='btn_pagedivid{$k}' class='btn_pagedivid' value='#show_page" . $k . $player_id . "'>";
                } else { $return .= "<input type='hidden' id='btn_pagedivid{$k}' class='btn_pagedivid'>";}
                $return .= "</div>";
                $k++;
            }
            if ($k == 4) {
                $return .= "<div id='morebtndiv{$player_id}' class='morebtndiv'><a id='morebtnlink{$player_id}' class='morebtnlink'>more..</a><label id='morebtn{$player_id}' class='morebtn'>..</label></div>";
                $k++;
            }
        }
        $return .= "</div>";
        $return .= "<div id='show_allbtnleft{$player_id}' class='show_allbtnleft left-controls'>
                <a class='close_allbtn' id='close_allbtn{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a>";
        $k = 1;
        foreach ($buttons as $button) {
            $j = $k + 3;
            $return .= "<div class='front_btnleft' id='front_btnleft{$player_id}' ><img src=" . $button->Icon . ">    " . $button->Label . "
                    <input type='hidden' id='btn_type{$player_id}' value='" . $button->Type . "'>
                    <input type='hidden' id='btn_maploc{$player_id}' class='btn_maploc{$player_id}' value='" . $button->MapLocation . "'>
                    <input type='hidden' id='btn_iframeurl{$player_id}' value='" . $button->IframeUrl . "'>
                    <input type='hidden' id='btn_htmlcode{$player_id}' value='" . htmlspecialchars($button->HtmlCode) . "'>
                    <input type='hidden' id='btn_postcat{$player_id}' value='" . $button->PostCategory . "'>
                    <input type='hidden' id='btn_postno{$player_id}' value='" . $button->PostNo . "'>
                    <input type='hidden' id='btn_page{$player_id}' value='" . $button->Page . "'>
                    <input type='hidden' id='btn_relatedvideo_url{$player_id}' value='" . $button->RelatedVideoUrls . "'>
                    <input type='hidden' id='btn_relatedvideo_thumb{$player_id}' value='" . $button->RelatedVideoThumbs . "'>";
            if ($button->PostCategory) {
                $return .= "<input type='hidden' id='btn_postdivid{$j}' class='btn_postdivid' value='#show_post" . $j . $player_id . "'>";
            } else { $return .= "<input type='hidden' id='btn_postdivid{$j}' class='btn_postdivid'>";}
            if ($button->Page) {
                $return .= "<input type='hidden' id='btn_pagedivid{$j}' class='btn_pagedivid' value='#show_page" . $j . $player_id . "'>";
            } else { $return .= "<input type='hidden' id='btn_pagedivid{$j}' class='btn_pagedivid'>";}
            $return .= "</div>";
            $k++;
        }
        $return .= "</div>";
        $postdiv_count = 1;
        $postdiv_countleft = 4;
        foreach ($buttons as $button) {
            if ($button->Page) {
                echo "<div class='show_page eml-page' id='show_page{$postdiv_count}{$player_id}' style=''>
                    <a class='close_page' id='close_page{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a>";
                $page = get_post($button->Page);
                echo "      <div class='pagedesc' style='height:100%;'>";
                $plink = get_permalink($page->ID);
                echo "          <input id='pagelink' value='" . $plink . "' hidden/>";
                echo "      </div>";
                echo "</div>";
                echo "<div class='show_page eml-page' id='show_page{$postdiv_countleft}{$player_id}' style=''>
                    <a class='close_page' id='close_page{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a>";
                $page = get_post($button->Page);
                echo "      <div class='pagedesc' style='height:100%;'>";
                $plink = get_permalink($page->ID);
                echo "          <input id='pagelink' value='" . $plink . "' hidden/>";
                echo "      </div>";
                echo "</div>";
            }
            if ($button->PostCategory) {
                echo "<div class='show_post show-possst-page' id='show_post{$postdiv_count}{$player_id}' style=''>
                        <a class='close_post' id='close_post{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a>";
                $args = array('post_type' => 'post', 'tax_query' => array(
                    array('taxonomy' => 'category', 'field' => 'term_id', 'terms' => $button->PostCategory,
                    )));
                $posts = get_posts($args);
                $post_cnt = 1;
                foreach ($posts as $post) {
                    if ($button->PostNo >= $post_cnt) {
                        echo "<div class='postdesc'><div class='posttitle'>" . $post->post_title . "</div>";?>
                        <a class="readmore" href='<?php echo get_permalink($post->ID); ?>'>Read More</a> <?php
echo "</div>";
                        $post_cnt++;
                    }
                }
                echo "</div>";
                echo "<div class='show_post show-possst-page' id='show_post{$postdiv_countleft}{$player_id}' style='width:{$width}px; height:{$height}px;'>
                                <a class='close_post' id='close_post{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a>";
                $args = array('post_type' => 'post', 'tax_query' => array(
                    array('taxonomy' => 'category', 'field' => 'term_id', 'terms' => $button->PostCategory,
                    )));
                $posts = get_posts($args);
                $post_cnt = 1;
                foreach ($posts as $post) {
                    if ($button->PostNo >= $post_cnt) {
                        echo "<div class='postdesc'><div class='posttitle'>" . $post->post_title . "</div>";
                        ?>
                        <a class="readmore" href='<?php echo get_permalink($post->ID); ?>'>Read More</a> <?php
echo "</div>";
                        $post_cnt++;
                    }
                }
                echo "</div>";
            }
            $postdiv_count++;
            $postdiv_countleft++;
        }
        $return .= "<div id='show_all_relatedvideo{$player_id}' class='show_all_relatedvideo' style='top: -3px!important;
        left: 42px!important;
        width: 85%!important;
        min-height: 395px!important;
        -webkit-box-shadow: 0px 0px 5px 3px rgba(255,0,0,0.67)!important;
        -moz-box-shadow: 0px 0px 5px 3px rgba(255,0,0,0.67)!important;
        box-shadow: 0px 0px 5px 3px rgba(255,0,0,0.67)!important;'><a class='close_btn_relatedvideos' id='close_btn_relatedvideos{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a></div>";
        $return .= "<div class='show_iframe' id='show_iframe{$player_id}' style='width:{$width}px; height:{$height}px;'><a class='close_btn_iframe' id='close_btn_iframe{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a><iframe id='if1' name='I1'  height='{$height}px' width='{$width}px'></iframe></div>";
        $return .= "<div class='show_htmlcode shw-html-page' id='show_htmlcode{$player_id}'><a class='close_btn_htmlcode' id='close_btn_htmlcode{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a><label></label></div>";
        $whichpost = get_the_ID();
        ?>
        <!-- <script src="https://player.vimeo.com/api/player.js"></script> -->
        <script>
            jQuery(document).ready(function($){
                document.cookie = 'mvplayer_social_lockdown_shared<?php echo $player_id; ?>=; expires=Thu, 01 Jan 1970 00:00:00 UTC ;path=/;';
                document.cookie = 'mvplayer_cta_lockdown_shared<?php echo $player_id; ?>=; expires=Thu, 01 Jan 1970 00:00:00 UTC ;path=/;';
                document.cookie = 'check_preview_<?php echo $player_id; ?>=; expires=Thu, 01 Jan 1970 00:00:00 UTC ;path=/;';
                if('<?php echo $info->PlayerSkin; ?>'=='skin21'){
                    $("#show_optinbox_<?php echo $player_id; ?>").addClass('optin21');
                    $("#social_button<?php echo $player_id; ?>").addClass('social21');
                    $("#cta_section<?php echo $player_id; ?>").addClass('ctabtn21');
                }else if('<?php echo $info->PlayerSkin; ?>'=='skin22'){
                    $("#show_allbtn<?php echo $player_id; ?>").addClass('mainallbtn22');
                    $("#show_allbtnleft<?php echo $player_id; ?>").addClass('allbtn22');
                    $("#show_optinbox_<?php echo $player_id; ?>").addClass('optin22');
                    $("#social_button<?php echo $player_id; ?>").addClass('social22');
                }else if('<?php echo $info->PlayerSkin; ?>'=='skin23'){
                        $("#show_allbtn<?php echo $player_id; ?>").addClass('mainallbtn23');
                    $("#show_allbtnleft<?php echo $player_id; ?>").addClass('allbtn23');
                    $("#show_optinbox_<?php echo $player_id; ?>").addClass('optin23');
                    $("#social_button<?php echo $player_id; ?>").addClass('social23');
                }else if('<?php echo $info->PlayerSkin; ?>'=='skin24'){
                    $("#show_allbtnleft<?php echo $player_id; ?>").addClass('allbtn24');
                    $("#show_optinbox_<?php echo $player_id; ?>").addClass('optin24');
                    $("#social_button<?php echo $player_id; ?>").addClass('social24');
                }
            });

            var on_ps<?php echo $player_id; ?> = false;
            var show_optin<?php echo $player_id; ?> = false;
            var show_popup<?php echo $player_id; ?> = false;
            var show_socialbtn<?php echo $player_id; ?> = false;
            var show_ctabtn<?php echo $player_id; ?> = false;
            var show_content<?php echo $player_id; ?> = false;
            var isplaying<?php echo $player_id; ?> = true;
            var current_player_id = false;
            var iframe<?php echo $player_id; ?> = jQuery('#player<?php echo $player_id; ?>')[0],
            player<?php echo $player_id; ?> = $f(iframe<?php echo $player_id; ?>);
            jQuery(document).ready(function($){
                if("<?php echo $autoplay; ?>" == "&autoplay=1&muted=1"){
                    isplaying<?php echo $player_id; ?> = true;
                }else{
                    isplaying<?php echo $player_id; ?> = false;
                    jQuery.cookie('check_preview_<?php echo $player_id; ?>', '1', { expires: 30, path: '/' });
                }

                window.onload = function(){
                    on_ps<?php echo $player_id; ?> = false;
                    show_optin<?php echo $player_id; ?> = false;
                    show_popup<?php echo $player_id; ?> = false;
                    show_socialbtn<?php echo $player_id; ?> = false;
                    show_ctabtn<?php echo $player_id; ?> = false;
                    show_content<?php echo $player_id; ?> = false;
                    current_player_id = false;
                    iframe<?php echo $player_id; ?> = jQuery('#player<?php echo $player_id; ?>')[0];
                    player<?php echo $player_id; ?> = $f(iframe<?php echo $player_id; ?>);
                    console.log('i m checking here');
                    console.log(player<?php echo $player_id; ?>);

                    //start the player
                    if(player<?php echo $player_id; ?>){
                        player<?php echo $player_id; ?>.addEvent('ready', function() {
                            player<?php echo $player_id; ?>.addEvent('ready', onReady<?php echo $player_id; ?>);
                            player<?php echo $player_id; ?>.addEvent('pause', onPause<?php echo $player_id; ?>);
                            player<?php echo $player_id; ?>.addEvent('play', onPlay<?php echo $player_id; ?>);
                            player<?php echo $player_id; ?>.addEvent('seek', onSeek<?php echo $player_id; ?>);
                            player<?php echo $player_id; ?>.addEvent('finish', onFinish<?php echo $player_id; ?>);
                            player<?php echo $player_id; ?>.addEvent('playProgress', onPlayProgress<?php echo $player_id; ?>);
                        });
                    }

                    function onReady<?php echo $player_id; ?>(id) {
                        var check_preview = jQuery.cookie('check_preview_<?php echo $player_id; ?>');
                        console.log('check_preview: '+check_preview);
                        if('<?php echo $auto; ?>'=='true' && '<?php echo $optin_duration; ?>'=='0' && '<?php echo $popup_duration; ?>'=='0' && '<?php echo $socialbtn_duration; ?>'=='0' && check_preview != null && isplaying<?php echo $player_id; ?>)
                        {
                            jQuery('#ico_img<?php echo $player_id; ?>').hide();
                            player<?php echo $player_id; ?>.api('play');
                            isplaying<?php echo $player_id; ?>=true;
                        }
                        if('<?php echo $content_duration; ?>'=='1' && check_preview != null && isplaying<?php echo $player_id; ?>)
                        {
                            jQuery('#mvplayer_video_content<?php echo $player_id; ?>').show();
                        }
                        if('<?php echo $OptinBox; ?>'=='yes' && '<?php echo $optin_duration; ?>'=='1' && !show_optin<?php echo $player_id; ?> && check_preview != null && isplaying<?php echo $player_id; ?>)
                        {
                            player<?php echo $player_id; ?>.api('pause');
                            isplaying<?php echo $player_id; ?> = false;
                            <?php echo 'optinShowIt_' . $player_id . '();'; ?>
                        }
                        if('<?php echo $Popup; ?>'=='yes' && '<?php echo $popup_duration; ?>'=='1' && !show_popup<?php echo $player_id; ?> && check_preview != null && isplaying<?php echo $player_id; ?>)
                        {
                            player<?php echo $player_id; ?>.api('pause');
                            isplaying<?php echo $player_id; ?> = false;
                            <?php echo 'popupShowIt_' . $player_id . '();'; ?>
                        }
                        var mvplayer_social_shared = jQuery.cookie('mvplayer_social_lockdown_shared<?php echo $player_id; ?>');
                        if('<?php echo $social; ?>'=='1' && '<?php echo $socialbtn_duration; ?>'=='1' && mvplayer_social_shared == null && check_preview != null && isplaying<?php echo $player_id; ?>)
                        {
                            player<?php echo $player_id; ?>.api('pause');
                            isplaying<?php echo $player_id; ?> = false;
                            <?php echo 'sociallock_' . $player_id . '();'; ?>
                        }
                        var mvplayer_cta_shared = jQuery.cookie('mvplayer_cta_lockdown_shared<?php echo $player_id; ?>');
                        if('<?php echo $cta; ?>'=='1' && '<?php echo $ctabtn_dur; ?>'=='1' && mvplayer_cta_shared == null && check_preview != null && isplaying<?php echo $player_id; ?>)
                        {
                            player<?php echo $player_id; ?>.api('pause');
                            isplaying<?php echo $player_id; ?> = false;
                            <?php echo 'ctabtn_' . $player_id . '();'; ?>
                        }
                    }
                    //playe pause
                    function onPause<?php echo $player_id; ?>(id) {
                        console.log('onPause');
                        // alert('pause')
                        if('<?php echo $allowpause; ?>'=='1')
                        {
                            console.log('<?php echo $allowpause; ?>');
                            if(!on_ps<?php echo $player_id; ?>)
                            {
                                console.log('play-pause: '+!on_ps<?php echo $player_id; ?>);
                                on_ps<?php echo $player_id; ?> = false;
                                jQuery('#ico_img<?php echo $player_id; ?>').hide();
                                player<?php echo $player_id; ?>.api('play');
                                isplaying<?php echo $player_id; ?>=true;
                            }
                        }
                    }
                    function onPlay<?php echo $player_id; ?>(id) {
                        console.log('onplay');
                        isplaying<?php echo $player_id; ?>=true;
                        jQuery('.main-wrapper').each(function(index,item){
                            var elem = jQuery(item).data('player_id');
                            var v_type = jQuery(item).data('v_type');
                            if(elem == '<?php echo $player_id; ?>'){
                                if(v_type == 'yt'){
                                    window['player'.concat(elem)].playVideo();
                                }else if(v_type == 'mp4'){
                                    flowplayer(jQuery('.player'+elem)).play();
                                }else if(v_type == 'vimeo'){
                                    window['player'.concat(elem)].api('play');
                                }
                                    window['isplaying'.concat(elem)]=true;
                            }else{
                                var check = jQuery.cookie(`check_preview_${elem}`);
                                if(v_type == 'yt' && check != null){
                                    window['player'.concat(elem)].pauseVideo();
                                }else if(v_type == 'mp4' && check != null){
                                    flowplayer(jQuery('.player'+elem)).pause();
                                }else if(v_type == 'vimeo' && check != null){
                                    window['player'.concat(elem)].api('pause');
                                }
                                window['isplaying'.concat(elem)]=false;
                            }
                        })
                    }
                    //player finish
                    function onFinish<?php echo $player_id; ?>(id) {
                        var check_preview = jQuery.cookie('check_preview_<?php echo $player_id; ?>');
                        console.log('onFinish');
                        if(<?php echo $content_dur_end; ?>==1 && check_preview != null)
                        {
                            jQuery('#mvplayer_video_content<?php echo $player_id; ?>').show();
                        }
                        if('<?php echo $OptinBox; ?>'=='yes' && '<?php echo $optin_dur_end; ?>'=='1' && !show_optin<?php echo $player_id; ?> && check_preview != null)
                        {
                            // player<?php echo $player_id; ?>.api('pause');
                            isplaying<?php echo $player_id; ?> = false;
                            <?php echo 'optinShowIt_' . $player_id . '();'; ?>
                        }
                        if('<?php echo $Popup; ?>'=='yes' && '<?php echo $popup_dur_end; ?>'=='1' && !show_popup<?php echo $player_id; ?> && check_preview != null)
                        {
                            // player<?php echo $player_id; ?>.api('pause');
                            isplaying<?php echo $player_id; ?> = false;
                            <?php echo 'popupShowIt_' . $player_id . '();'; ?>
                        }
                        var mvplayer_social_shared = jQuery.cookie('mvplayer_social_lockdown_shared<?php echo $player_id; ?>');
                        if('<?php echo $social; ?>'=='1' && '<?php echo $socialbtn_dur_end; ?>'=='1' && mvplayer_social_shared == null && check_preview != null)
                        {
                            // player<?php echo $player_id; ?>.api('pause');
                            isplaying<?php echo $player_id; ?> = false;
                            <?php echo 'sociallock_' . $player_id . '();'; ?>
                        }
                        var mvplayer_cta_shared = jQuery.cookie('mvplayer_cta_lockdown_shared<?php echo $player_id; ?>');
                        if('<?php echo $cta; ?>'=='1' && '<?php echo $ctabtn_dur_end; ?>'=='1' && mvplayer_cta_shared == null && check_preview != null)
                        {
                            // player<?php echo $player_id; ?>.api('pause');
                            isplaying<?php echo $player_id; ?> = false;
                            <?php echo 'ctabtn_' . $player_id . '();'; ?>
                        }

                    }
                    function onSeek<?php echo $player_id; ?>() {
                        var check_preview = jQuery.cookie('check_preview_<?php echo $player_id; ?>');
                        console.log('onSeek');
                        player<?php echo $player_id; ?>.api('getCurrentTime', function (value,id) {
                            var mvplayer_social_shared = jQuery.cookie('mvplayer_social_lockdown_shared<?php echo $player_id; ?>');
                            if('<?php echo $social; ?>'=='1' && '<?php echo $socialbtn_duration; ?>'=='0' && '<?php echo $socialbtn_dur_end; ?>'=='0' && mvplayer_social_shared == null && !show_socialbtn<?php echo $player_id; ?> && check_preview != null)
                            {
                                if(value > <?php echo $socialbtn_durations; ?>.000)
                                {
                                    player<?php echo $player_id; ?>.api('pause');
                                    isplaying<?php echo $player_id; ?> = false;
                                    <?php echo 'sociallock_' . $player_id . '();'; ?>
                                }
                            }
                            var mvplayer_cta_shared = jQuery.cookie('mvplayer_cta_lockdown_shared<?php echo $player_id; ?>');
                            if('<?php echo $cta; ?>'=='1' && '<?php echo $ctabtn_dur; ?>'=='0' && '<?php echo $ctabtn_dur_end; ?>'=='0' && mvplayer_cta_shared == null && !show_ctabtn<?php echo $player_id; ?> && check_preview != null)
                            {
                                if(value > <?php echo $ctabtn_durs; ?>.000)
                                {
                                    player<?php echo $player_id; ?>.api('pause');
                                    isplaying<?php echo $player_id; ?> = false;
                                    <?php echo 'ctabtn_' . $player_id . '();'; ?>
                                }
                            }

                            if('<?php echo $content_dur_end; ?>'=='0' && '<?php echo $content_duration; ?>'=='0' && !show_content<?php echo $player_id; ?> && check_preview != null)
                            {
                                if(value > <?php echo $content_durations; ?>.000)
                                {
                                    jQuery('#mvplayer_video_content<?php echo $player_id; ?>').show();
                                    show_content<?php echo $player_id; ?> = true;
                                }
                            }
                            if('<?php echo $OptinBox; ?>'=='yes' && '<?php echo $optin_duration; ?>'=='0' && '<?php echo $optin_dur_end; ?>'=='0' && !show_optin<?php echo $player_id; ?> && check_preview != null)
                            {
                                if(value > <?php echo $optin_durations; ?>.000)
                                {
                                    player<?php echo $player_id; ?>.api('pause');
                                    isplaying<?php echo $player_id; ?> = false;
                                    <?php echo 'optinShowIt_' . $player_id . '();'; ?>
                                }
                            }
                            if('<?php echo $Popup; ?>'=='yes' && '<?php echo $popup_duration; ?>'=='0' && '<?php echo $popup_dur_end; ?>'=='0' && !show_popup<?php echo $player_id; ?> && check_preview != null)
                            {
                                if(value > <?php echo $popup_durations; ?>.000)
                                {
                                    player<?php echo $player_id; ?>.api('pause');
                                    isplaying<?php echo $player_id; ?> = false;
                                    <?php echo 'popupShowIt_' . $player_id . '();'; ?>
                                }
                            }
                            if('<?php echo $content_duration; ?>'=='1' && check_preview != null)
                            {
                                jQuery('#mvplayer_video_content<?php echo $player_id; ?>').show();
                            }
                            if('<?php echo $OptinBox; ?>'=='yes' && '<?php echo $optin_duration; ?>'=='1' && !show_optin<?php echo $player_id; ?> && check_preview != null)
                            {
                                player<?php echo $player_id; ?>.api('pause');
                                isplaying<?php echo $player_id; ?> = false;
                                <?php echo 'optinShowIt_' . $player_id . '();'; ?>
                            }
                            if('<?php echo $Popup; ?>'=='yes' && '<?php echo $popup_duration; ?>'=='1' && !show_popup<?php echo $player_id; ?> && check_preview != null)
                            {
                                player<?php echo $player_id; ?>.api('pause');
                                isplaying<?php echo $player_id; ?> = false;
                                <?php echo 'popupShowIt_' . $player_id . '();'; ?>
                            }
                            var mvplayer_social_shared = jQuery.cookie('mvplayer_social_lockdown_shared<?php echo $player_id; ?>');
                            if('<?php echo $social; ?>'=='1' && '<?php echo $socialbtn_duration; ?>'=='1' && mvplayer_social_shared == null && check_preview != null)
                            {
                                player<?php echo $player_id; ?>.api('pause');
                                isplaying<?php echo $player_id; ?> = false;
                                <?php echo 'sociallock_' . $player_id . '();'; ?>
                            }
                            var mvplayer_cta_shared = jQuery.cookie('mvplayer_cta_lockdown_shared<?php echo $player_id; ?>');
                            if('<?php echo $cta; ?>'=='1' && '<?php echo $ctabtn_dur; ?>'=='1' && mvplayer_cta_shared == null && check_preview != null)
                            {
                                player<?php echo $player_id; ?>.api('pause');
                                isplaying<?php echo $player_id; ?> = false;
                                <?php echo 'ctabtn_' . $player_id . '();'; ?>
                            }
                        });
                    }
                    function onPlayProgress<?php echo $player_id; ?>(data,id) {
                        var check_preview = jQuery.cookie('check_preview_<?php echo $player_id; ?>');
                        console.log('onPlayProgress');

                        if('<?php echo $auto; ?>'=='true' && '<?php echo $optin_duration; ?>'=='0' && '<?php echo $popup_duration; ?>'=='0' && '<?php echo $socialbtn_duration; ?>'=='0' && check_preview != null && isplaying<?php echo $player_id; ?>)
                        {
                            jQuery('#ico_img<?php echo $player_id; ?>').hide();
                            player<?php echo $player_id; ?>.api('play');
                            isplaying<?php echo $player_id; ?>=true;
                        }
                        if('<?php echo $content_duration; ?>'=='1' && check_preview != null && isplaying<?php echo $player_id; ?>)
                        {
                            jQuery('#mvplayer_video_content<?php echo $player_id; ?>').show();
                        }
                        if('<?php echo $OptinBox; ?>'=='yes' && '<?php echo $optin_duration; ?>'=='1' && !show_optin<?php echo $player_id; ?> && check_preview != null && isplaying<?php echo $player_id; ?>)
                        {
                            player<?php echo $player_id; ?>.api('pause');
                            isplaying<?php echo $player_id; ?> = false;
                            <?php echo 'optinShowIt_' . $player_id . '();'; ?>
                        }
                        if('<?php echo $Popup; ?>'=='yes' && '<?php echo $popup_duration; ?>'=='1' && !show_popup<?php echo $player_id; ?> && check_preview != null && isplaying<?php echo $player_id; ?>)
                        {
                            player<?php echo $player_id; ?>.api('pause');
                            isplaying<?php echo $player_id; ?> = false;
                            <?php echo 'popupShowIt_' . $player_id . '();'; ?>
                        }
                        var mvplayer_social_shared = jQuery.cookie('mvplayer_social_lockdown_shared<?php echo $player_id; ?>');
                        if('<?php echo $social; ?>'=='1' && '<?php echo $socialbtn_duration; ?>'=='1' && mvplayer_social_shared == null && check_preview != null && isplaying<?php echo $player_id; ?>)
                        {
                            player<?php echo $player_id; ?>.api('pause');
                            isplaying<?php echo $player_id; ?> = false;
                            <?php echo 'sociallock_' . $player_id . '();'; ?>
                        }
                        var mvplayer_cta_shared = jQuery.cookie('mvplayer_cta_lockdown_shared<?php echo $player_id; ?>');
                        if('<?php echo $cta; ?>'=='1' && '<?php echo $ctabtn_dur; ?>'=='1' && mvplayer_cta_shared == null && check_preview != null && isplaying<?php echo $player_id; ?>)
                        {
                            player<?php echo $player_id; ?>.api('pause');
                            isplaying<?php echo $player_id; ?> = false;
                            <?php echo 'ctabtn_' . $player_id . '();'; ?>
                        }

                        if(parseInt(data.seconds)==<?php echo $content_durations; ?> && '<?php echo $content_dur_end; ?>'=='0' && '<?php echo $content_duration; ?>'=='0' && !show_content<?php echo $player_id; ?> && check_preview != null)
                        {
                            jQuery('#mvplayer_video_content<?php echo $player_id; ?>').show();
                            show_content<?php echo $player_id; ?> = true;
                        }
                        if(parseInt(data.seconds)==<?php echo $optin_durations; ?> && '<?php echo $OptinBox; ?>'=='yes' && '<?php echo $optin_duration; ?>'=='0' && '<?php echo $optin_dur_end; ?>'=='0' && !show_optin<?php echo $player_id; ?> && check_preview != null)
                        {
                            player<?php echo $player_id; ?>.api('pause');
                            isplaying<?php echo $player_id; ?> = false;
                            <?php echo 'optinShowIt_' . $player_id . '();'; ?>
                        }
                        if(parseInt(data.seconds)==<?php echo $popup_durations; ?> && '<?php echo $Popup; ?>'=='yes' && '<?php echo $popup_duration; ?>'=='0' && '<?php echo $popup_dur_end; ?>'=='0' && !show_popup<?php echo $player_id; ?> && check_preview != null)
                        {
                            player<?php echo $player_id; ?>.api('pause');
                            isplaying<?php echo $player_id; ?> = false;
                            <?php echo 'popupShowIt_' . $player_id . '();'; ?>
                        }
                        var mvplayer_social_shared = jQuery.cookie('mvplayer_social_lockdown_shared<?php echo $player_id; ?>');
                        if(parseInt(data.seconds)==<?php echo $socialbtn_durations; ?> && '<?php echo $social; ?>'=='1' && '<?php echo $socialbtn_duration; ?>'=='0' && '<?php echo $socialbtn_dur_end; ?>'=='0' && mvplayer_social_shared == null && !show_socialbtn<?php echo $player_id; ?> && check_preview != null)
                        {
                            player<?php echo $player_id; ?>.api('pause');
                            isplaying<?php echo $player_id; ?> = false;
                            <?php echo 'sociallock_' . $player_id . '();'; ?>
                        }
                        var mvplayer_cta_shared = jQuery.cookie('mvplayer_cta_lockdown_shared<?php echo $player_id; ?>');
                        if(parseInt(data.seconds)==<?php echo $ctabtn_durs; ?> && '<?php echo $cta; ?>'=='1' && '<?php echo $ctabtn_dur; ?>'=='0' && '<?php echo $ctabtn_dur_end; ?>'=='0' && mvplayer_cta_shared == null && !show_ctabtn<?php echo $player_id; ?> && check_preview != null)
                        {
                            player<?php echo $player_id; ?>.api('pause');
                            isplaying<?php echo $player_id; ?> = false;
                            <?php echo 'ctabtn_' . $player_id . '();'; ?>
                        }
                    }
                    jQuery(window).scroll(function() {
                        var pos<?php echo $player_id; ?> = jQuery('#main-parent-<?php echo $player_id; ?>').offset().top;
                        var wintop<?php echo $player_id; ?> = jQuery(window).scrollTop();

                        if(<?php echo $allowscroll; ?>==1){
                            if(pos<?php echo $player_id; ?> > 0){
                                if(wintop<?php echo $player_id; ?> > pos<?php echo $player_id; ?> && isplaying<?php echo $player_id; ?>){
                                    jQuery('#wrapper-<?php echo $player_id; ?>').addClass('pip-vimeo-video');
                                    jQuery('.skinFrame').addClass('skin-dim');
                                    jQuery('#main-parent-<?php echo $player_id; ?>').css('min-height','400px');
                                }else{
                                    jQuery('#wrapper-<?php echo $player_id; ?>').removeClass('pip-vimeo-video');
                                    jQuery('.skinFrame').removeClass('skin-dim');
                                    jQuery('#main-parent-<?php echo $player_id; ?>').css('min-height','0px');
                                }
                            }
                        }
                    });
                    jQuery(document).on("click","#play-icon-<?php echo $player_id; ?>", function(){
                        jQuery("#play-overlay-<?php echo $player_id; ?>").hide();
                        player<?php echo $player_id; ?>.api('play',1);
                        player<?php echo $player_id; ?>.api("seekTo", 0);
                        isplaying<?php echo $player_id; ?>=true;
                        // player<?php echo $player_id; ?>.api("setMuted", 0);
                        jQuery.cookie('check_preview_<?php echo $player_id; ?>', '1', { expires: 30, path: '/' });
                    })
                }
            });
            function mvplayer_social_lockdown_plusone(plusone) {
                if (plusone.state == "on") {
                    var data = {post: "<?php echo $whichpost; ?>", action: "mvplayer_social_lockdown", source: "google"};
                    jQuery.post("<?php echo admin_url('admin-ajax.php'); ?>", data, function(response) {
                        if(current_player_id=='<?php echo $player_id; ?>')
                        {
                            <?php echo 'sociallock_hide_' . $player_id . '();'; ?>
                        }
                    });
                }
            }
            jQuery('#ico_img<?php echo $player_id; ?>').on('click',function(){
                jQuery(this).hide();
                var iframe<?php echo $player_id; ?> = jQuery('#player<?php echo $player_id; ?>')[0],player<?php echo $player_id; ?> = $f(iframe<?php echo $player_id; ?>);
                player<?php echo $player_id; ?>.api('play');
                isplaying<?php echo $player_id; ?>=true;
            });

            jQuery(document).ready(function() {
                FB.Event.subscribe("edge.create", function(href) {
                    var data = {post: "<?php echo $whichpost; ?>", action: "mvplayer_social_lockdown", source: "facebook"};
                    jQuery.post("<?php echo admin_url('admin-ajax.php'); ?>", data, function(response) {
                        jQuery(".fb_edge_comment_widget.fb_iframe_widget").remove();
                        if(current_player_id=='<?php echo $player_id; ?>')
                        {
                            <?php echo 'sociallock_hide_' . $player_id . '();'; ?>
                        }
                    });
                });
            });
            twttr.ready(function (twttr) {
                twttr.events.bind("tweet", function(event) {
                    var data = {post: "<?php echo $whichpost; ?>", action: "mvplayer_social_lockdown", source: "twitter"};
                    jQuery.post("<?php echo admin_url('admin-ajax.php'); ?>", data, function(response) {
                        if(current_player_id=='<?php echo $player_id; ?>')
                        {
                            <?php echo 'sociallock_hide_' . $player_id . '();'; ?>
                        }
                    });
                });
            });
            jQuery('.allsharebtn<?php echo $player_id; ?>').on('click',function(){
                console.log('4073');
                current_player_id = '<?php echo $player_id; ?>';
                jQuery('.social_btn').hide();
                <?php echo 'sociallock_hide_' . $player_id . '();'; ?>
            });

            jQuery('.allsharebtn<?php echo $player_id; ?>').on('mouseover',function(){
                current_player_id = '<?php echo $player_id; ?>';
            });
            function sociallock_<?php echo $player_id; ?>()
            {
                console.log('Upload Case Social Modal 2');
                on_ps<?php echo $player_id; ?> = true;
                jQuery('#show_allbtn<?php echo $player_id; ?>').hide();
                jQuery('#show_allbtnleft<?php echo $player_id; ?>').hide();
                jQuery('#show_iframe<?php echo $player_id; ?>').hide();
                jQuery('#show_htmlcode<?php echo $player_id; ?>').hide();
                jQuery('#show_maploc<?php echo $player_id; ?>').hide();
                jQuery('#wrapper-<?php echo $player_id; ?>').children('.show_post').hide();
                jQuery('#wrapper-<?php echo $player_id; ?>').children('.show_page').hide();
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').show();
                jQuery('#social_button<?php echo $player_id; ?>').css('display','flex');
                jQuery('#cta_section<?php echo $player_id; ?>').hide();
            }
            function ctabtn_<?php echo $player_id; ?>()
            {
                // console.log('time to show cta btn for vimeo');
                on_ps<?php echo $player_id; ?> = true;
                jQuery('#show_allbtn<?php echo $player_id; ?>').hide();
                jQuery('#show_allbtnleft<?php echo $player_id; ?>').hide();
                jQuery('#show_iframe<?php echo $player_id; ?>').hide();
                jQuery('#show_htmlcode<?php echo $player_id; ?>').hide();
                jQuery('#show_maploc<?php echo $player_id; ?>').hide();
                jQuery('#wrapper-<?php echo $player_id; ?>').children('.show_post').hide();
                jQuery('#wrapper-<?php echo $player_id; ?>').children('.show_page').hide();
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').show();
                jQuery('#social_button<?php echo $player_id; ?>').hide();
                jQuery('#cta_section<?php echo $player_id; ?>').css('display','flex');
            }
            function sociallock_hide_<?php echo $player_id; ?>()
            {
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                jQuery('#social_button<?php echo $player_id; ?>').hide();
                jQuery.cookie('mvplayer_social_lockdown_shared<?php echo $player_id; ?>', '1', { expires: 30, path: '/' });
                on_ps<?php echo $player_id; ?> = false;
                jQuery('#show_allbtn<?php echo $player_id; ?>').show();
                jQuery('#ico_img<?php echo $player_id; ?>').hide();
                var iframe<?php echo $player_id; ?> = jQuery('#player<?php echo $player_id; ?>')[0],player<?php echo $player_id; ?> = $f(iframe<?php echo $player_id; ?>);
                player<?php echo $player_id; ?>.api('pause');
                                isplaying<?php echo $player_id; ?> = false;
                show_socialbtn<?php echo $player_id; ?> = true;
            }
            function ctabtn_hide_<?php echo $player_id; ?>()
            {
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                jQuery('#cta_section<?php echo $player_id; ?>').hide();
                jQuery.cookie('mvplayer_cta_lockdown_shared<?php echo $vid; ?>', '1', { expires: 30, path: '/' });
                on_ps<?php echo $player_id; ?> = false;
                jQuery('#show_allbtn<?php echo $player_id; ?>').show();
                jQuery('#ico_img<?php echo $player_id; ?>').hide();
                var iframe<?php echo $player_id; ?> = jQuery('#player<?php echo $player_id; ?>')[0],player<?php echo $player_id; ?> = $f(iframe<?php echo $player_id; ?>);
                player<?php echo $player_id; ?>.api('pause');
                                isplaying<?php echo $player_id; ?> = false;
                show_ctabtn<?php echo $player_id; ?> = true;
            }
            function optinShowIt_<?php echo $player_id; ?>()
            {
                on_ps<?php echo $player_id; ?> = true;
                jQuery('#show_allbtn<?php echo $player_id; ?>').hide();
                jQuery('#show_allbtnleft<?php echo $player_id; ?>').hide();
                jQuery('#show_iframe<?php echo $player_id; ?>').hide();
                jQuery('#show_htmlcode<?php echo $player_id; ?>').hide();
                jQuery('#show_maploc<?php echo $player_id; ?>').hide();
                jQuery('#wrapper-<?php echo $player_id; ?>').children('.show_post').hide();
                jQuery('#wrapper-<?php echo $player_id; ?>').children('.show_page').hide();
                if ( document.getElementById("show_optinbox_<?php echo $player_id; ?>") ){
                    document.getElementById("show_optinbox_<?php echo $player_id; ?>").style.display = "flex";
                }
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').show();
            }
            function popupShowIt_<?php echo $player_id; ?>()
            {
                on_ps<?php echo $player_id; ?> = true;
                jQuery('#show_allbtn<?php echo $player_id; ?>').hide();
                jQuery('#show_allbtnleft<?php echo $player_id; ?>').hide();
                jQuery('#show_iframe<?php echo $player_id; ?>').hide();
                jQuery('#show_htmlcode<?php echo $player_id; ?>').hide();
                jQuery('#show_maploc<?php echo $player_id; ?>').hide();
                jQuery('#wrapper-<?php echo $player_id; ?>').children('.show_post').hide();
                jQuery('#wrapper-<?php echo $player_id; ?>').children('.show_page').hide();
                if ( document.getElementById("show_popupbox_<?php echo $player_id; ?>") ){
                    document.getElementById("show_popupbox_<?php echo $player_id; ?>").style.display = "block";
                }
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').show();
            }
            jQuery('#popuplink<?php echo $player_id; ?>').on('click',function(){
                if ( document.getElementById("show_popupbox_<?php echo $player_id; ?>") ){
                    document.getElementById("show_popupbox_<?php echo $player_id; ?>").style.display = "none";
                }
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                show_popup<?php echo $player_id; ?> = true;
                on_ps<?php echo $player_id; ?> = false;
                jQuery('#show_allbtn<?php echo $player_id; ?>').show();
                jQuery('#ico_img<?php echo $player_id; ?>').hide();
                var iframe<?php echo $player_id; ?> = jQuery('#player<?php echo $player_id; ?>')[0],player<?php echo $player_id; ?> = $f(iframe<?php echo $player_id; ?>);
                player<?php echo $player_id; ?>.api('play');
                isplaying<?php echo $player_id; ?>=true;
            });

            function optinHideIt_<?php echo $player_id; ?>()
            {
                if ( document.getElementById("show_optinbox_<?php echo $player_id; ?>") ){
                    document.getElementById("show_optinbox_<?php echo $player_id; ?>").style.display = "none";
                }

                oncuepoint_<?php echo $player_id; ?> = true;
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                show_optin<?php echo $player_id; ?> = true;
                on_ps<?php echo $player_id; ?> = false;
                jQuery('#show_allbtn<?php echo $player_id; ?>').show();
                jQuery('#ico_img<?php echo $player_id; ?>').hide();
                var iframe<?php echo $player_id; ?> = jQuery('#player<?php echo $player_id; ?>')[0],player<?php echo $player_id; ?> = $f(iframe<?php echo $player_id; ?>);
                player<?php echo $player_id; ?>.api('play');
                isplaying<?php echo $player_id; ?>=true;
            }
            function socialHideIt_<?php echo $player_id; ?>()
            {
                if ( document.getElementById("social_button<?php echo $player_id; ?>") ){
                    document.getElementById("social_button<?php echo $player_id; ?>").style.display = "none";
                }
                jQuery.cookie('mvplayer_social_lockdown_shared<?php echo $player_id; ?>', '1', { expires: 30, path: '/' });
                oncuepoint_<?php echo $player_id; ?> = true;
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                social_lock<?php echo $player_id; ?> = true;
                on_ps<?php echo $player_id; ?> = false;
                jQuery('#show_allbtn<?php echo $player_id; ?>').show();
                jQuery('#ico_img<?php echo $player_id; ?>').hide();
                var iframe<?php echo $player_id; ?> = jQuery('#player<?php echo $player_id; ?>')[0],player<?php echo $player_id; ?> = $f(iframe<?php echo $player_id; ?>);
                player<?php echo $player_id; ?>.api('play');
                isplaying<?php echo $player_id; ?>=true;
            }

            function ctaHideIt_<?php echo $player_id; ?>()
            {
                if ( document.getElementById("cta_section<?php echo $player_id; ?>") ){
                    document.getElementById("cta_section<?php echo $player_id; ?>").style.display = "none";
                }
                jQuery.cookie('mvplayer_cta_lockdown_shared<?php echo $player_id; ?>', '1', { expires: 30, path: '/' });
                oncuepoint_<?php echo $player_id; ?> = true;
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                cta_lock<?php echo $player_id; ?> = true;
                on_ps<?php echo $player_id; ?> = false;
                jQuery('#show_allbtn<?php echo $player_id; ?>').show();
                jQuery('#ico_img<?php echo $player_id; ?>').hide();
                var iframe<?php echo $player_id; ?> = jQuery('#player<?php echo $player_id; ?>')[0],player<?php echo $player_id; ?> = $f(iframe<?php echo $player_id; ?>);
                player<?php echo $player_id; ?>.api('play');
                isplaying<?php echo $player_id; ?>=true;
            }
            function redirectAndCtaHideIt_<?php echo $player_id; ?>()
            {
                if(jQuery(".cta-redirect-<?php echo $player_id; ?>").data('redirect_link') != undefined){
                    window.open(
                        jQuery(".cta-redirect-<?php echo $player_id; ?>").data("redirect_link"),
                        '_blank'
                    );
                }
                if ( document.getElementById("cta_section<?php echo $player_id; ?>") ){
                    document.getElementById("cta_section<?php echo $player_id; ?>").style.display = "none";
                }
                jQuery.cookie('mvplayer_cta_lockdown_shared<?php echo $player_id; ?>', '1', { expires: 30, path: '/' });
                oncuepoint_<?php echo $player_id; ?> = true;
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                cta_lock<?php echo $player_id; ?> = true;
                on_ps<?php echo $player_id; ?> = false;
                jQuery('#show_allbtn<?php echo $player_id; ?>').show();
                jQuery('#ico_img<?php echo $player_id; ?>').hide();
                player<?php echo $player_id; ?>.api('play');
                isplaying<?php echo $player_id; ?>=true;
            }

            //all video data script
            jQuery(document).ready(function($){
                //morebutton
                $(document).on("click", '#morebtnlink<?php echo $player_id; ?>', function () {
                    $('#show_allbtnleft<?php echo $player_id; ?>').show();
                    $('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').show();
                    $('#show_allbtn<?php echo $player_id; ?>').hide();
                    var iframe<?php echo $player_id; ?> = jQuery('#player<?php echo $player_id; ?>')[0],player<?php echo $player_id; ?> = $f(iframe<?php echo $player_id; ?>);
                    player<?php echo $player_id; ?>.api('pause');
                    isplaying<?php echo $player_id; ?> = false;
                });

                $(document).on("click",'#close_btn_iframe<?php echo $player_id; ?>', function () {
                    $(this).parents('#show_iframe<?php echo $player_id; ?>').hide();
                    $('#show_allbtn<?php echo $player_id; ?>').show();
                    $('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                    jQuery('#ico_img<?php echo $player_id; ?>').hide();
                    var iframe<?php echo $player_id; ?> = jQuery('#player<?php echo $player_id; ?>')[0],player = $f(iframe<?php echo $player_id; ?>);
                    player<?php echo $player_id; ?>.api('play');
                    isplaying<?php echo $player_id; ?>=true;
                });

                $(document).on("click",'#close_btn_relatedvideos<?php echo $player_id; ?>', function () {
                    $(this).parents('#show_all_relatedvideo<?php echo $player_id; ?>').hide();
                    $(this).parents('#show_all_relatedvideo<?php echo $player_id; ?>').children('.singlevideo').remove();
                    $('#show_allbtn<?php echo $player_id; ?>').show();
                    $('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                    jQuery('#ico_img<?php echo $player_id; ?>').hide();
                    var iframe<?php echo $player_id; ?> = jQuery('#player<?php echo $player_id; ?>')[0],player = $f(iframe<?php echo $player_id; ?>);
                    player<?php echo $player_id; ?>.api('play');
                    isplaying<?php echo $player_id; ?>=true;
                });

                $(document).on("click",'#close_btn_htmlcode<?php echo $player_id; ?>', function () {
                    $(this).parents('#show_htmlcode<?php echo $player_id; ?>').hide();
                    $('#show_allbtn<?php echo $player_id; ?>').show();
                    $('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                    jQuery('#ico_img<?php echo $player_id; ?>').hide();
                    var iframe<?php echo $player_id; ?> = jQuery('#player<?php echo $player_id; ?>')[0],player = $f(iframe<?php echo $player_id; ?>);
                    player<?php echo $player_id; ?>.api('play');
                    isplaying<?php echo $player_id; ?>=true;
                });

                $(document).on("click", '#close_btn_map<?php echo $player_id; ?>', function () {
                    $(this).parents('#show_maploc<?php echo $player_id; ?>').hide();
                    $('#show_allbtn<?php echo $player_id; ?>').show();
                    $('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                    jQuery('#ico_img<?php echo $player_id; ?>').hide();
                    var iframe<?php echo $player_id; ?> = jQuery('#player<?php echo $player_id; ?>')[0],player = $f(iframe<?php echo $player_id; ?>);
                    player<?php echo $player_id; ?>.api('play');
                    isplaying<?php echo $player_id; ?>=true;
                });

                $(document).on("click", '#close_allbtn<?php echo $player_id; ?>', function () {
                    $(this).parents('#show_allbtnleft<?php echo $player_id; ?>').hide();
                    $('#show_allbtn<?php echo $player_id; ?>').show();
                    $('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                    jQuery('#ico_img<?php echo $player_id; ?>').hide();
                    var iframe<?php echo $player_id; ?> = jQuery('#player<?php echo $player_id; ?>')[0],player = $f(iframe<?php echo $player_id; ?>);
                    player<?php echo $player_id; ?>.api('play');
                    isplaying<?php echo $player_id; ?>=true;
                });

                $(document).on("click", '#close_post<?php echo $player_id; ?>', function () {
                    $(this).parents('.show_post').hide();
                    $('#show_allbtn<?php echo $player_id; ?>').show();
                    $('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                    jQuery('#ico_img<?php echo $player_id; ?>').hide();
                    var iframe<?php echo $player_id; ?> = jQuery('#player<?php echo $player_id; ?>')[0],player = $f(iframe<?php echo $player_id; ?>);
                    player<?php echo $player_id; ?>.api('play');
                    isplaying<?php echo $player_id; ?>=true;
                });
                $(document).on("click", "#close_page<?php echo $player_id; ?>", function () {
                    $(`#wrapper-<?php echo $player_id; ?> .pagedesc iframe`).remove();
                    $(this).parents('.show_page').hide();
                    $('#show_allbtn<?php echo $player_id; ?>').show();
                    $('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                    jQuery('#ico_img<?php echo $player_id; ?>').hide();
                    var iframe<?php echo $player_id; ?> = jQuery('#player<?php echo $player_id; ?>')[0],player = $f(iframe<?php echo $player_id; ?>);
                    player<?php echo $player_id; ?>.api('play');
                    isplaying<?php echo $player_id; ?>=true;
                });
                //click on single button in left side
                $(document).on('click','#front_btnleft<?php echo $player_id; ?>',function(){
                    console.log("you clicked");
                    $('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                    $(this).parents('#show_allbtnleft<?php echo $player_id; ?>').hide();
                    var btn_type =$(this).children('#btn_type<?php echo $player_id; ?>').val();
                    var btn_maptitle =$(this).children('#btn_maptitle<?php echo $player_id; ?>').val();
                    var btn_maploc =$(this).children('#btn_maploc<?php echo $player_id; ?>').val();
                    var btn_maplat =$(this).children('.btn_maplat').val();
                    var btn_maplng =$(this).children('.btn_maplng').val();
                    var btn_iframeurl =$(this).children('#btn_iframeurl<?php echo $player_id; ?>').val();
                    var btn_htmlcode =$(this).children('#btn_htmlcode<?php echo $player_id; ?>').val();
                    var btn_relatedvideo_url =$(this).children('#btn_relatedvideo_url<?php echo $player_id; ?>').val();
                    var btn_relatedvideo_thumb =$(this).children('#btn_relatedvideo_thumb<?php echo $player_id; ?>').val();
                    var btn_postdivid =$(this).children('.btn_postdivid').val();
                    var btn_pagedivid =$(this).children('.btn_pagedivid').val();
                    if(btn_type=='iframe')
                    {
                        $('#show_iframe<?php echo $player_id; ?>').show();
                        $('#show_iframe<?php echo $player_id; ?>').children('iframe').attr('src',btn_iframeurl);
                    }
                    else if(btn_type=='related_video')
                    {
                        $('#show_all_relatedvideo<?php echo $player_id; ?>').show();
                        var btn_relatedvideo_urlarray = btn_relatedvideo_url.split(",") ;
                        var btn_relatedvideo_thumbarray = btn_relatedvideo_thumb.split(",") ;
                        for(var a=0;a<btn_relatedvideo_urlarray.length;a++)
                        {
                            $('#show_all_relatedvideo<?php echo $player_id; ?>').append('<div class="singlevideo"><a target="_blank" href="'+btn_relatedvideo_urlarray[a]+'"><img src="'+btn_relatedvideo_thumbarray[a]+'"></a></div>');
                        }
                    }
                    else if(btn_type=='post')
                    {
                        $('#wrapper-<?php echo $player_id; ?>').children(btn_postdivid).show();
                    }
                    else if(btn_type=='page')
                    {
                        // $('#wrapper-<?php echo $player_id; ?>').children(btn_pagedivid).show();
                        var plink = $(`#wrapper-<?php echo $player_id; ?> ${btn_pagedivid} #pagelink`).val();
                        if($(`#wrapper-<?php echo $player_id; ?> `+btn_pagedivid+ ' .pagedesc').children().length == 1){
                            $(`#wrapper-<?php echo $player_id; ?> `+btn_pagedivid+ ' .pagedesc').append("<iframe id='page_iframe' src='"+plink+"' height='100%' width='100%'></iframe>");
                        }
                        $(`#wrapper-<?php echo $player_id; ?>`).children(btn_pagedivid).show();
                    }
                    else if(btn_type=='htmlcode')
                    {
                        if($('#show_htmlcode<?php echo $player_id; ?> label').children().length == 0){
                            $('#show_htmlcode<?php echo $player_id; ?> label').html(btn_htmlcode);
                        }
                        $('#show_htmlcode<?php echo $player_id; ?>').show();
                    }
                    else if(btn_type=='map')
                    {
                        //latest code
                        $('#show_maploc<?php echo $player_id; ?>').show();
                        var country = null;
                        $(".btn_maploc<?php echo $player_id; ?>").each(function(){
                            // Test if the div element is empty
                            if($(this).val() != "" && $(this).val() != null){
                                console.log('loop is running');
                                country = $(this).val();
                            }
                        });
                        // var country = $("#btn_maploc<?php echo $player_id; ?>").val();
                        console.log("country: "+"btn_maploc<?php echo $player_id; ?>");
                        console.log("country: "+country);
                        if(country){
                            $("#show_map<?php echo $player_id; ?>").html(`<iframe id='country_iframe' src='https://maps.google.com/maps?q=${country}&output=embed' height='100%' width='100%'></iframe>`);
                        }
                    }
                });

                $(document).on("click", "#front_btn<?php echo $player_id; ?>", function () {
                    console.log('2');
                    var iframe<?php echo $player_id; ?> = jQuery('#player<?php echo $player_id; ?>')[0],player<?php echo $player_id; ?> = $f(iframe<?php echo $player_id; ?>);
                    player<?php echo $player_id; ?>.api('pause');
                    isplaying<?php echo $player_id; ?> = false;
                    var btn_type =$(this).parents('#btn_data<?php echo $player_id; ?>').children('#btn_type<?php echo $player_id; ?>').val();
                    var btn_maptitle =$(this).parents('#btn_data<?php echo $player_id; ?>').children('#btn_maptitle<?php echo $player_id; ?>').val();
                    var btn_maploc =$(this).parents('#btn_data<?php echo $player_id; ?>').children('#btn_maploc<?php echo $player_id; ?>').val();
                    var btn_maplat =$(this).parents('#btn_data<?php echo $player_id; ?>').children('.btn_maplat').val();
                    var btn_maplng =$(this).parents('#btn_data<?php echo $player_id; ?>').children('.btn_maplng').val();
                    var btn_iframeurl =$(this).parents('#btn_data<?php echo $player_id; ?>').children('#btn_iframeurl<?php echo $player_id; ?>').val();
                    var btn_htmlcode =$(this).parents('#btn_data<?php echo $player_id; ?>').children('#btn_htmlcode<?php echo $player_id; ?>').val();
                    var btn_relatedvideo_url =$(this).parents('#btn_data<?php echo $player_id; ?>').children('#btn_relatedvideo_url<?php echo $player_id; ?>').val();
                    var btn_relatedvideo_thumb =$(this).parents('#btn_data<?php echo $player_id; ?>').children('#btn_relatedvideo_thumb<?php echo $player_id; ?>').val();
                    var btn_postdivid =$(this).parents('#btn_data<?php echo $player_id; ?>').children('.btn_postdivid').val();
                    var btn_pagedivid =$(this).parents('#btn_data<?php echo $player_id; ?>').children('.btn_pagedivid').val();
                    if(btn_type=='iframe')
                    {
                        $('#show_iframe<?php echo $player_id; ?>').show();
                        $('#show_iframe<?php echo $player_id; ?>').children('iframe').attr('src',btn_iframeurl);
                    }
                    else if(btn_type=='related_video')
                    {
                        $('#show_all_relatedvideo<?php echo $player_id; ?>').show();
                        var btn_relatedvideo_urlarray = btn_relatedvideo_url.split(",") ;
                        var btn_relatedvideo_thumbarray = btn_relatedvideo_thumb.split(",") ;
                        for(var a=0;a<btn_relatedvideo_urlarray.length;a++)
                        {
                            $('#show_all_relatedvideo<?php echo $player_id; ?>').append('<div class="singlevideo"><a target="_blank" href="'+btn_relatedvideo_urlarray[a]+'"><img src="'+btn_relatedvideo_thumbarray[a]+'"></a></div>');
                        }
                    }
                    else if(btn_type=='post')
                    {
                        $('#wrapper-<?php echo $player_id; ?>').children(btn_postdivid).show();
                    }
                    else if(btn_type=='page')
                    {
                        var plink = $(`#wrapper-<?php echo $player_id; ?> ${btn_pagedivid} #pagelink`).val();
                        if($(`#wrapper-<?php echo $player_id; ?> `+btn_pagedivid+ ' .pagedesc').children().length == 1){
                            $(`#wrapper-<?php echo $player_id; ?> `+btn_pagedivid+ ' .pagedesc').append("<iframe id='page_iframe' src='"+plink+"' height='100%' width='100%'></iframe>");
                        }
                        $(`#wrapper-<?php echo $player_id; ?>`).children(btn_pagedivid).show();
                    }
                    else if(btn_type=='htmlcode')
                    {
                        console.log("btn_htmlcode: ");
                        console.log(btn_htmlcode);
                        if($('#show_htmlcode<?php echo $player_id; ?> label').children().length == 0){
                            $('#show_htmlcode<?php echo $player_id; ?> label').html(btn_htmlcode);
                        }
                        $('#show_htmlcode<?php echo $player_id; ?>').show();
                    }
                    else if(btn_type=='map')
                    {
                        //latest code
                        $('#show_maploc<?php echo $player_id; ?>').show();
                        var country = null;
                        $(".btn_maploc<?php echo $player_id; ?>").each(function(){
                            // Test if the div element is empty
                            if($(this).val() != "" && $(this).val() != null){
                                console.log('loop is running');
                                country = $(this).val();
                            }
                        });
                        // var country = $("#btn_maploc<?php echo $player_id; ?>").val();
                        console.log("country: "+"btn_maploc<?php echo $player_id; ?>");
                        console.log("country: "+country);
                        if(country){
                            $("#show_map<?php echo $player_id; ?>").html(`<iframe id='country_iframe' src='https://maps.google.com/maps?q=${country}&output=embed' height='100%' width='100%'></iframe>`);
                        }
                    }
                    $('#show_allbtn<?php echo $player_id; ?>').hide();
                });
            });
        </script>
        <?php
if ($videocontrols == 'show') {
            echo "<style> #hide_controls{$player_id}  { display: none;}</style>";
        }
        $return .= ob_get_clean();
        $return .= "<div class='mv_player_video_overlap' style='width:{$width}px; height:{$height}px;display:none;'></div>
            </div></div><div id='mvplayer_video_content" . $player_id . "' style='display:none;margin-top:30px;'>" . $videocontent . "</div></div>";
        return $return;
    } else {
        // $container_width=  $width+300;
        $scroll_class = '';
        if ($info->PlayerSkin == 'skin25') {
            $container_width = $container_width + 30;
            $scroll_class = 'skin_scroll';
        }
        $main_style = "max-width:{$width}px!important;min-height:{$height}px;";
        if ($video_align == "left") {
            $main_style .= "float: left!important;";
        } else if ($video_align == "center") {
            $main_style .= "margin: 0 auto!important;";
        } else if ($video_align == "right") {
            $main_style .= "float: right!important;";
        }
        $return = "<div class='main-wrapper {$scroll_class}' data-v_type='mp4' data-player_id='{$player_id}' id='main-wrapper-{$player_id}' style='$main_style'><div id='mv_player_loader{$player_id}' class='mv_player_loader'></div>
                    <style>
                        #optinsubmit{
                            background-color: #1da900;
                            color: #FFF;
                            padding: 5px 15px;
                            font-size: 14px;
                            text-transform: capitalize!important;
                            border-radius:4px;
                            margin-top: 8px;
                            display: inline-block;
                            cursor:pointer;
                        }
                    </style>
                    <div id='main-parent-{$player_id}' >
                        <div id='wrapper-{$player_id}' style='position:relative;display: inline-block;transition:0.3s'>";
        if ($image != '') {
            $image = 'background-image:url(' . $image . ');';
        } else {
            $image = '';
        }
        if ($info->PlayerSkin == 'skin1') //anujm1
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/1-skin.png';
            $return .= "
                    <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
                    <div style=''>
                        <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                        position: absolute;
                        left: 3.6%;
                        top: 5%;
                        background-size: cover;
                        width: 93.2%;
                        height: 90.2%;'>
                            <video {$autoplay}>
                                <source type='video/mp4' src='{$video}'>
                            </video>
                        </div>
                        <style>
                                #wrapper-{$player_id} .mv_player_video_overlap,
                                #show_all_relatedvideo{$player_id}
                                {
                                        margin-left: 28px;
                                        margin-top: 28px;
                                }
                                #show_allbtn{$player_id}{ margin-right: 28px;margin-top:53px; }
                                @media screen and (max-width: {$width}px) {
                                    .img-767{
                                        height:100% !important;
                                        // width:100% !important;
                                    }
                                }
                            }
                        </style>
                    </div>";
        } elseif ($info->PlayerSkin == 'skin2') //anujm2
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/2-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                    left: 0.4%;
                    top: 0.5%;
                    background-size: cover;
                    width: 99.2%;
                    height: 99.2%;
                }'>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                        #wrapper-{$player_id} .mv_player_video_overlap,
                        #show_all_relatedvideo{$player_id}
                        {
                                margin-left: 28px;
                                margin-top: 28px;
                        }
                        #show_allbtn{$player_id}{ margin-right: 28px;margin-top:53px; }
                            @media screen and (max-width: {$width}px) {
                            .img-767{
                                height:100% !important;
                                // width:100% !important;
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                        }
                    }
                </style>
            </div>";
        } elseif ($info->PlayerSkin == 'skin3') //anujm3
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/3-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                left: 3.6%;
                top: 5%;
                background-size: cover;
                width: 93.2%;
                height: 90.2%;'>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                        #wrapper-{$player_id} .mv_player_video_overlap,
                        #show_all_relatedvideo{$player_id}
                        {
                                margin-left: 28px;
                                margin-top: 28px;
                        }
                        #show_allbtn{$player_id}{ margin-right: 28px;margin-top:53px; }
                        @media screen and (max-width: {$width}px) {
                            .img-767{
                                height:100% !important;
                                // width:100% !important;
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                        }
                </style>
            </div>";
        } elseif ($info->PlayerSkin == 'skin4') //anujm4
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/4-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                left: 6.8%;
                top: 3.8%;
                background-size: cover;
                width: 86.8%;
                height: 92.2%;
                '>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                #wrapper-{$player_id} .mv_player_video_overlap,
                #show_all_relatedvideo{$player_id}
                {
                        margin-left: 28px;
                        margin-top: 28px;
                }
                #show_allbtn{$player_id}{
                    margin-right: 7%;
                    margin-top: 2%;
                }
                @media screen and (max-width: {$width}px) {
                    .img-767{
                        height:100% !important;
                        // width:100% !important;
                    }
                    .main-wrapper{
                        height: 100% !important;
                    }
                }
                </style>
            </div>";
        } elseif ($info->PlayerSkin == 'skin5') //anujm5
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/5-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                    position: absolute;
                    left: 2.5%;
                    top: 3.5%;
                    background-size: cover;
                    width: 95.2%;
                    height: 92.5%;'>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                    #wrapper-{$player_id} .mv_player_video_overlap,
                    #show_all_relatedvideo{$player_id}
                    {
                            margin-left: 28px;
                            margin-top: 28px;
                    }
                    #show_allbtn{$player_id}{ margin-right: 28px;margin-top:53px; }
                    @media screen and (max-width: {$width}px) {
                        .img-767{
                            height:100% !important;
                            // width:100% !important;
                        }
                        .main-wrapper{
                            height: 100% !important;
                        }
                    }
                </style>
            </div>";
        } else if ($info->PlayerSkin == 'skin6') //anujm6
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/6-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' alt='Marketers Video Player: MVP' style='display:block;height:{$height}px;width:{$width}px;'>
            <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
            position: absolute;
            left: 3.6%;
            top: 5%;
            background-size: cover;
            width: 93.2%;
            height: 90.2%;'>
                <video {$autoplay}>
                    <source type='video/mp4' src='{$video}'>
                </video>
            </div>
            <style>
                #wrapper-{$player_id} .mv_player_video_overlap,
                #show_all_relatedvideo{$player_id}
                {
                        margin-left: 28px;
                        margin-top: 28px;
                }
                #show_allbtn{$player_id}{ margin-right: 28px;margin-top:53px; }
                @media screen and (max-width: {$width}px) {
                    .img-767{
                        height:100% !important;
                        width:100% !important;
                    }
                }
            </style>";
        } else if ($info->PlayerSkin == 'skin7') //anujm7
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/7-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                left: 3.6%;
                top: 5%;
                background-size: cover;
                width: 93.2%;
                height: 90.2%;'>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                        #wrapper-{$player_id} .mv_player_video_overlap,
                        #show_all_relatedvideo{$player_id}
                        {
                                margin-left: 28px;
                                margin-top: 28px;
                        }
                        #show_allbtn{$player_id}{ margin-right: 28px;margin-top:53px; }
                        @media screen and (max-width: {$width}px) {
                            .img-767{
                                height:100% !important;
                                // width:100% !important;
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                        }
                </style>
            </div>";
        } else if ($info->PlayerSkin == 'skin8') //anujm8
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/8-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                    left: 3.2%;
                top: 5%;
                background-size: cover;
                width: 94.2%;
                height: 89%;'>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                    #wrapper-{$player_id} .mv_player_video_overlap,
                    #show_all_relatedvideo{$player_id}
                    {
                            margin-left: 28px;
                            margin-top: 28px;
                    }
                    #show_allbtn{$player_id}{ margin-right: 28px;margin-top:53px; }
                    @media screen and (max-width: {$width}px) {
                        .img-767{
                            height:100% !important;
                            // width:100% !important;
                        }
                        .main-wrapper{
                            height: 100% !important;
                        }
                    }
                </style>
            </div>";
        } else if ($info->PlayerSkin == 'skin9') //anujm9
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/9-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                left: 3.6%;
                top: 5%;
                background-size: cover;
                width: 93.2%;
                height: 90.2%;'>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                    #wrapper-{$player_id} .mv_player_video_overlap,
                    #show_all_relatedvideo{$player_id}
                    {
                            margin-left: 28px;
                            margin-top: 28px;
                    }
                    #show_allbtn{$player_id}{ margin-right: 28px;margin-top:53px; }
                    @media screen and (max-width: {$width}px) {
                        .img-767{
                            height:100% !important;
                            // width:100% !important;
                        }
                        .main-wrapper{
                            height: 100% !important;
                        }
                    }
                </style>
            </div>";
        } else if ($info->PlayerSkin == 'skin10') //anujm10
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div> ";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/10-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                left: 3.6%;
                top: 5%;
                background-size: cover;
                width: 93.2%;
                height: 90.2%;'>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                    #wrapper-{$player_id} .mv_player_video_overlap,
                    #show_all_relatedvideo{$player_id}
                    {
                            margin-left: 28px;
                            margin-top: 28px;
                    }
                    #show_allbtn{$player_id}{ margin-right: 28px;margin-top:53px; }
                    @media screen and (max-width: {$width}px) {
                        .img-767{
                            height:100% !important;
                            // width:100% !important;
                        }
                        .main-wrapper{
                            height: 100% !important;
                        }
                    }
                </style>
            </div>";
        } else if ($info->PlayerSkin == 'skin11') //anujm11
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/11-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                left: 3.6%;
                top: 5%;
                background-size: cover;
                width: 93.2%;
                height: 90.2%;'>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                    #wrapper-{$player_id} .mv_player_video_overlap,
                    #show_all_relatedvideo{$player_id}
                    {
                            margin-left: 28px;
                            margin-top: 28px;
                    }
                    #show_allbtn{$player_id}{ margin-right: 28px;margin-top:53px; }
                    @media screen and (max-width: {$width}px) {
                        .img-767{
                            height:100% !important;
                            // width:100% !important;
                        }
                        .main-wrapper{
                            height: 100% !important;
                        }
                    }
                </style>
            </div>";
        } else if ($info->PlayerSkin == 'skin12') //anujm12
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/12-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='gold new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                left: 3.2%;
                top: 5%;
                background-size: cover;
                    width: 93.8%;
                    height: 90.2%;'>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                    #wrapper-{$player_id} .mv_player_video_overlap,
                    #show_all_relatedvideo{$player_id}
                    {
                            margin-left: 28px;
                            margin-top: 28px;
                    }
                    #show_allbtn{$player_id}{ margin-right: 28px;margin-top:53px; }
                    @media screen and (max-width: {$width}px) {
                        .img-767{
                            height:100% !important;
                            // width:100% !important;
                        }
                        .main-wrapper{
                            height: 100% !important;
                        }
                    }
                </style>
            </div>";
        } else if ($info->PlayerSkin == 'skin13') //anujm13
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/13-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                left: 3.6%;
                top: 5%;
                background-size: cover;
                width: 93.2%;
                height: 90.2%;'>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                    #wrapper-{$player_id} .mv_player_video_overlap,
                    #show_all_relatedvideo{$player_id}
                    {
                            margin-left: 28px;
                            margin-top: 28px;
                    }
                    #show_allbtn{$player_id}{ margin-right: 28px;margin-top:53px; }
                    @media screen and (max-width: {$width}px) {
                        .img-767{
                            height:100% !important;
                        }
                        .main-wrapper{
                            height: 100% !important;
                        }
                    }
                </style>
            </div>";
        } else if ($info->PlayerSkin == 'skin14') //anujm14
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/14-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                left: 3.6%;
                top: 5%;
                background-size: cover;
                width: 93.2%;
                height: 90.2%;'>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                    #wrapper-{$player_id} .mv_player_video_overlap,
                    #show_all_relatedvideo{$player_id}
                    {
                            margin-left: 28px;
                            margin-top: 28px;
                    }
                    #show_allbtn{$player_id}{ margin-right: 28px;margin-top:53px; }
                    @media screen and (max-width: {$width}px) {
                        .img-767{
                            height:100% !important;
                            // width:100% !important;
                        }
                        .main-wrapper{
                            height: 100% !important;
                        }
                    }
                </style>
            </div>";
        } else if ($info->PlayerSkin == 'skin15') //anujm15
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/15-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                left: 3.5%;
                top: 5%;
                background-size: cover;
                width: 93.3%;
                height: 90.2%;'>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                    #wrapper-{$player_id} .mv_player_video_overlap,
                    #show_all_relatedvideo{$player_id}
                    {
                            margin-left: 28px;
                            margin-top: 28px;
                    }
                    #show_allbtn{$player_id}{ margin-right: 28px;margin-top:53px; }
                    @media screen and (max-width: {$width}px) {
                        .img-767{
                            height:100% !important;
                            // width:100% !important;
                        }
                        .main-wrapper{
                            height: 100% !important;
                        }
                    }
                </style>
            </div>";
        } else if ($info->PlayerSkin == 'skin16') //anujm16
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/16-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                left: 3.4%;
                top: 5%;
                background-size: cover;
                width: 93.8%;
                height: 90.2%;'>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                    #wrapper-{$player_id} .mv_player_video_overlap,
                    #show_all_relatedvideo{$player_id}
                    {
                            margin-left: 28px;
                            margin-top: 28px;
                    }
                    #show_allbtn{$player_id}{ margin-right: 28px;margin-top:53px; }
                    @media screen and (max-width: {$width}px) {
                        .img-767{
                            height:100% !important;
                        }
                        .main-wrapper{
                            height: 100% !important;
                        }
                    }
                </style>
            </div>";
        } else if ($info->PlayerSkin == 'skin17') //anujm17
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/17-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                left: 3.4%;
                top: 5%;
                background-size: cover;
                width: 93.8%;
                height: 90.2%;'>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                    #wrapper-{$player_id} .mv_player_video_overlap,
                    #show_all_relatedvideo{$player_id}
                    {
                            margin-left: 28px;
                            margin-top: 28px;
                    }
                    #show_allbtn{$player_id}{ margin-right: 28px;margin-top:53px; }
                    @media screen and (max-width: {$width}px) {
                        .img-767{
                            height:100% !important;
                            // width:100% !important;
                        }
                        .main-wrapper{
                            height: 100% !important;
                        }
                    }
                </style>
            </div>";
        } else if ($info->PlayerSkin == 'skin18') //anujm18
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/18-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                left: 3.4%;
                top: 5%;
                background-size: cover;
                width: 93.8%;
                height: 90.2%;'>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                    #wrapper-{$player_id} .mv_player_video_overlap,
                    #show_all_relatedvideo{$player_id}
                    {
                            margin-left: 28px;
                            margin-top: 28px;
                    }
                    #show_allbtn{$player_id}{ margin-right: 28px;margin-top:53px; }
                    @media screen and (max-width: {$width}px) {
                        .img-767{
                            height:100% !important;
                            // width:100% !important;
                        }
                        .main-wrapper{
                            height: 100% !important;
                        }
                    }
                </style>
            </div>";
        } else if ($info->PlayerSkin == 'skin19') //anujm19
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/19-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                left: 3.4%;
                top: 5%;
                background-size: cover;
                width: 93.8%;
                height: 90.2%;'>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                    #wrapper-{$player_id} .mv_player_video_overlap,
                    #show_all_relatedvideo{$player_id}
                    {
                            margin-left: 28px;
                            margin-top: 28px;
                    }
                    #show_allbtn{$player_id}{ margin-right: 28px;margin-top:53px; }
                    @media screen and (max-width: {$width}px) {
                        .img-767{
                            height:100% !important;
                            // width:100% !important;
                        }
                        .main-wrapper{
                            height: 100% !important;
                        }
                    }
                </style>
            </div>";
        } else if ($info->PlayerSkin == 'skin20') //anujm20
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                            <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                                <i class='fa fa-play'></i>
                                            </div>
                                        </div>
                                    ";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/20-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                left: 3.4%;
                top: 5%;
                background-size: cover;
                width: 93.8%;
                height: 90.2%;'>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                        #wrapper-{$player_id} .mv_player_video_overlap,
                        #show_all_relatedvideo{$player_id}
                        {
                                margin-left: 28px;
                                margin-top: 28px;
                        }
                        #show_allbtn{$player_id}{ margin-right: 28px;margin-top:53px; }
                        @media screen and (max-width: {$width}px) {
                            .img-767{
                                height:100% !important;
                                // width:100% !important;
                            }
                            .main-wrapper{
                                height: 100% !important;
                            }
                        }
                </style>
            </div>";
        } else if ($info->PlayerSkin == 'skin21') //anujm21
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 89%;width: 99.4%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/21-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                left: 2.2%;
                top: 3.5%;
                background-size: cover;
                width: 94.8%;
                    height: 82.5%;
                }
                '>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                    #wrapper-{$player_id} .mv_player_video_overlap,
                    #show_all_relatedvideo{$player_id}
                    {
                            margin-left: 28px;
                            margin-top: 28px;
                    }
                    #show_allbtn{$player_id}{ margin-right: 28px;margin-top:53px; }
                    .left-controls {
                        height: 89% !important;
                        width: 99% !important;
                    }
                    @media screen and (max-width: {$width}px) {
                        .img-767{
                            height:100% !important;
                            // width:100% !important;
                        }
                        .main-wrapper{
                            height: 100% !important;
                        }
                    }
                </style>
            </div>";
        } else if ($info->PlayerSkin == 'skin22') //anujm22
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 91%;width: 75%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;left: 12.6%;border-top-left-radius: 20px;border-top-right-radius: 20px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/22-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                left: 15.7%;
                top: 5.6%;
                background-size: cover;
                width: 68.4%;
                height: 80.8%;
                '>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                    #wrapper-{$player_id} .mv_player_video_overlap,
                    #show_all_relatedvideo{$player_id}
                    {
                            margin-left: 28px;
                            margin-top: 28px;
                    }
                    #show_allbtn{$player_id}{
                        margin-right: 17%;
                        margin-top: 5%;
                    }
                    @media screen and (max-width: {$width}px) {
                        .img-767{
                            height:100% !important;
                            // width:100% !important;
                        }
                        .main-wrapper{
                            height: 100% !important;
                        }
                    }
                </style>
            </div>";
        } else if ($info->PlayerSkin == 'skin23') //anujm23
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 91%;width: 80.9%;display: flex;justify-content: center;align-items: center;background-color: #ffffff75;position: absolute;z-index: 333;border-radius: 5px;left: 9.8%;border-top-left-radius: 20px;border-top-right-radius: 20px;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/23-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                left: 13.7%;
                top: 5.6%;
                background-size: cover;
                width: 73%;
                height: 76.8%;
                '>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                    #wrapper-{$player_id} .mv_player_video_overlap,
                    #show_all_relatedvideo{$player_id}
                    {
                            margin-left: 28px;
                            margin-top: 28px;
                    }
                    #show_allbtn{$player_id}{
                        margin-right: 14%;
                        margin-top: 5%;
                    }
                    @media screen and (max-width: {$width}px) {
                        .img-767{
                            height:100% !important;
                            // width:100% !important;
                        }
                        .main-wrapper{
                            height: 100% !important;
                        }
                    }
                </style>
            </div>";
        } else if ($info->PlayerSkin == 'skin24') //anujm24
        {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 88.8%;width: 90.8%;display: flex;justify-content: center;align-items: center;background-color: #0a0a0a94;position: absolute;z-index: 333;border-radius: 35px;left: 8.8%;top: 1.3%;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/24-skin.png';
            $return .= "
            <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;'>
            <div style=''>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                left: 13.7%;
                top: 5.6%;
                background-size: cover;
                width: 81%;
                height: 80.8%;
                '>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                    #wrapper-{$player_id} .mv_player_video_overlap,
                    #show_all_relatedvideo{$player_id}
                    {
                            margin-left: 28px;
                            margin-top: 28px;
                    }
                    #show_allbtn{$player_id}{
                        margin-right: 6%;
                        margin-top: 5%;
                    }
                    @media screen and (max-width: {$width}px) {
                        .img-767{
                            height:100% !important;
                            // width:100% !important;
                        }
                        .main-wrapper{
                            height: 100% !important;
                        }
                    }
                </style>
            </div>";
        } else if ($info->PlayerSkin == 'none') {
            if ($autoplay == "autoplay") {
                $return .= "<div class='play-overlay' id='play-overlay-{$player_id}' style='height: 100%;width: 100%;display: flex;justify-content: center;align-items: center;background-color: #0a0a0a94;position: absolute;z-index: 333;border-radius: 5px;left: 0%;top: 0%;'>
                                    <div class='play-icon' id='play-icon-{$player_id}' style='background-image: linear-gradient(180deg, #3980e4cf 0%, #002963d1 100%);color: white;height: 60px;width: 70px;line-height: 3.3;'>
                                        <i class='fa fa-play'></i>
                                    </div>
                                </div>";
            }
            $skingImg = get_site_url() . '/wp-content/plugins/wp_mvplayer/image/newSkins/6-skin.png';
            $return .= "
                        <img src ='{$skingImg}' class='img-767 img-767_{$player_id}' style='display:block;height:{$height}px;width:{$width}px;visibility:hidden;'>
            <div>
                <div class='new-class-flow player{$player_id}' style='{$image} background-repeat:no-repeat;
                position: absolute;
                left: 0%;
                top: 0%;
                background-size: cover;
                width: 100%;
                height: 100%;
                '>
                    <video {$autoplay}>
                        <source type='video/mp4' src='{$video}'>
                    </video>
                </div>
                <style>
                    #wrapper-{$player_id} .mv_player_video_overlap,
                    #show_all_relatedvideo{$player_id}
                    {
                            margin-left: 28px;
                            margin-top: 28px;
                    }
                    #show_allbtn{$player_id}{
                        margin-right: 6%;
                        margin-top: 5%;
                    }
                    @media screen and (max-width: {$width}px) {
                        .img-767{
                            height:100% !important;
                            // width:100% !important;
                        }
                        .main-wrapper{
                            height: 100% !important;
                        }
                    }
                </style>
            </div>";
        } else {
            $return .= "
            <div class='player{$player_id}' style='float:left;height:{$height}px;width:{$width}px;{$image} background-repeat: repeat-y;'>
                <video {$autoplay} id='player{$player_id}'>
                    <source type='video/mp4' src='{$video}'>
                </video>
            </div>";
        }
        $return .= "
                <script>
                    jQuery(document).ready(function(){
                        document.cookie = 'mvplayer_social_lockdown_shared{$player_id}=; expires=Thu, 01 Jan 1970 00:00:00 UTC ;path=/;';
                        document.cookie = 'mvplayer_cta_lockdown_shared{$player_id}=; expires=Thu, 01 Jan 1970 00:00:00 UTC ;path=/;';
                        document.cookie = 'check_preview_{$player_id}=; expires=Thu, 01 Jan 1970 00:00:00 UTC ;path=/;';
                    });

                    jQuery('.player{$player_id} video').css('background','black');
                    var oncuepoint_{$player_id} = false;
                    var oncuepointcta_{$player_id} = false;
                    var on_ps{$player_id} = false;
                    var on_ps_cta{$player_id} = false;
                    var index{$player_id} = false;
                    var show_optin{$player_id} = false;
                    var show_popup{$player_id} = false;
                    var current_player_id = false;
                    var isplaying{$player_id} = true;
                    jQuery(document).ready(function(){

                        if('{$autoplay}' == 'autoplay'){
                            isplaying{$player_id} = true;
                        }else{
                            isplaying{$player_id} = false;
                            jQuery.cookie('check_preview_{$player_id}', '1', { expires: 30, path: '/' });
                        }
                    });
                    var api =jQuery('.player{$player_id}').flowplayer({
                        cuepoints: [{time:{$socialbtn_durations},socialbtn:'button show'},
                                    {time:{$ctabtn_durs},ctabtn:'cta btn show'},
                                    {time:{$content_durations},content:'content show'},
                                    {time:{$optin_durations},optin:'optin show'},
                                    {time:{$popup_durations},popup:'popup show'}]
                    });
                    var player = flowplayer('.player{$player_id}', {})
                    console.log('player Start:');
                    player.bind('cuepoint', function (e, api, cuepoint) {
                        console.log('cuepoint');
                        console.log(cuepoint);
                        var mvplayer_social_shared = jQuery.cookie('mvplayer_social_lockdown_shared{$player_id}');
                        var mvplayer_cta_shared = jQuery.cookie('mvplayer_cta_lockdown_shared{$player_id}');
                        var check_preview = jQuery.cookie('check_preview_{$player_id}');
                        if(cuepoint.socialbtn){
                            var mvplayer_social_shared = jQuery.cookie('mvplayer_social_lockdown_shared{$player_id}');
                            var mvplayer_cta_shared = jQuery.cookie('mvplayer_cta_lockdown_shared{$player_id}');
                            if({$social}==1 && {$socialbtn_duration}==0 && {$socialbtn_dur_end}==0 && !oncuepoint_{$player_id} && mvplayer_social_shared == null && check_preview != null)
                            {
                                    on_ps{$player_id} = true;
                                    api.pause();
                                    isplaying{$player_id} = false;
                                    sociallock_{$player_id}();
                            }
                            else
                            {
                                // console.log('social: {$social}');
                                // console.log('socialbtn_duration: {$socialbtn_duration}');
                                // console.log('socialbtn_dur_end: {$socialbtn_dur_end}');
                                // console.log(oncuepoint_{$player_id});
                                // console.log('mvplayer_social_shared: '+mvplayer_social_shared);
                                // console.log('check_preview: '+check_preview);
                                api.play();
                                isplaying{$player_id} = true;
                            }
                        }else if(cuepoint.content){
                            if({$content_dur_end}==0 && {$content_duration}==0 && check_preview != null)
                            {
                                    jQuery('#mvplayer_video_content{$player_id}').show();
                            }
                        }else if(cuepoint.optin){
                            if('{$OptinBox}'=='yes' && {$optin_duration}==0 && {$optin_dur_end}==0 && !show_optin{$player_id} && check_preview != null)
                            {
                                    on_ps{$player_id} = true;
                                    api.pause();
                                    isplaying{$player_id} = false;
                                    optinShowIt_{$player_id}();
                            }
                        }else if(cuepoint.popup){
                            if('{$Popup}'=='yes' && {$popup_duration}==0 && {$popup_dur_end}==0 && !show_popup{$player_id} && check_preview != null)
                            {
                                    on_ps{$player_id} = true;
                                    api.pause();
                                    isplaying{$player_id} = false;
                                    popupShowIt_{$player_id}();
                            }
                        }else if(cuepoint.ctabtn){
                            if({$cta}==1 && {$ctabtn_dur}==0 && {$ctabtn_dur_end}==0 && !oncuepointcta_{$player_id} && mvplayer_cta_shared == null && check_preview != null)
                            {
                                console.log('i m here');
                                    on_ps{$player_id} = true;
                                    api.pause();
                                    isplaying{$player_id} = false;
                                console.log('cuepoint is added');
                                    ctabtn_{$player_id}();
                            }else{
                                // console.log('i m here: {$cta}');
                                // console.log('i m here: {$ctabtn_dur}');
                                // console.log('i m here: {$ctabtn_dur_end}');
                                // console.log('i m here: '+oncuepoint_{$player_id});
                                // console.log('mvplayer_cta_shared: '+mvplayer_cta_shared);
                            }
                        }
                        if('{$autoplay}' == 'autoplay' && check_preview == null && api.playing){
                            api.volume(0.0, function() {});
                        }else{api.volume(1.0, function() {});}
                    });
                    console.log('player End:');
                    api.bind('pause', function () {
                        if('{$allowpause}'=='1')
                        {
                            if(!on_ps{$player_id})
                            {
                                on_ps{$player_id} = false;
                                return flowplayer(jQuery('.player{$player_id}')).play();
                            }
                        }
                    });
                    api.bind('seek',function(time,callback){
                        setTimeout(function(){
                            console.log('seeking is working');
                            console.log('right seeking is done');
                            var mvplayer_social_shared = jQuery.cookie('mvplayer_social_lockdown_shared{$player_id}');
                            var check_preview = jQuery.cookie('check_preview_{$player_id}');
                            if({$social}==1 && {$socialbtn_duration}==0 && {$socialbtn_dur_end}==0 && mvplayer_social_shared == null && check_preview != null)
                            {
                                if(flowplayer('.player{$player_id}').video.time>{$socialbtn_durations} && check_preview == 1)
                                {
                                    on_ps{$player_id} = true;
                                    flowplayer(jQuery('.player{$player_id}')).pause();
                                    sociallock_{$player_id}();
                                }
                            }
                            if({$content_dur_end}==0 && {$content_duration}==0 && check_preview != null)
                            {
                                if(flowplayer('.player{$player_id}').video.time>{$content_durations} && check_preview == 1)
                                {
                                    jQuery('#mvplayer_video_content{$player_id}').show();
                                }
                            }
                            if('{$OptinBox}'=='yes' && {$optin_duration}==0 && {$optin_dur_end}==0 && !show_optin{$player_id} && check_preview != null)
                            {
                                if(flowplayer('.player{$player_id}').video.time>{$optin_durations} && check_preview == 1)
                                {
                                    on_ps{$player_id} = true;
                                    flowplayer(jQuery('.player{$player_id}')).pause();
                                    optinShowIt_{$player_id}();
                                }
                            }
                            if('{$Popup}'=='yes' && {$popup_duration}==0 && {$popup_dur_end}==0 && !show_popup{$player_id} && check_preview != null)
                            {
                                if(flowplayer('.player{$player_id}').video.time>{$popup_durations} && check_preview == 1)
                                {
                                    on_ps{$player_id} = true;
                                    flowplayer(jQuery('.player{$player_id}')).pause();
                                    popupShowIt_{$player_id}();
                                }
                            }
                            var mvplayer_cta_shared = jQuery.cookie('mvplayer_cta_lockdown_shared{$player_id}');
                            if({$cta}==1 && {$ctabtn_dur}==0 && {$ctabtn_dur_end}==0 && mvplayer_cta_shared == null && check_preview != null)
                            {
                                if(flowplayer('.player{$player_id}').video.time>{$ctabtn_durs} && check_preview == 1)
                                {
                                    console.log('when seeking is done: '+ mvplayer_cta_shared);
                                    console.log('video time: '+ flowplayer('.player{$player_id}').video.time);
                                    console.log('check_preview: '+ check_preview);
                                    on_ps{$player_id} = true;
                                    flowplayer(jQuery('.player{$player_id}')).pause();
                                    ctabtn_{$player_id}();
                                }
                            }
                            jQuery('.player{$player_id} video').css('background','black');
                            if({$content_duration}==1 && check_preview != null)
                            {
                                    jQuery('#mvplayer_video_content{$player_id}').show();
                            }
                            if('{$OptinBox}'=='yes' && {$optin_duration}==1 && !show_optin{$player_id} && check_preview != null)
                            {
                                on_ps{$player_id} = true;
                                flowplayer(jQuery('.player{$player_id}')).pause();
                                optinShowIt_{$player_id}();
                            }else{
                                console.log('1: {$OptinBox}');
                                console.log('1: {$optin_duration}');
                                console.log('1: show_optin{$player_id}');
                                console.log('1: '+check_preview);
                            }
                            if('{$Popup}'=='yes' && {$popup_duration}==1 && !show_popup{$player_id} && check_preview != null)
                            {
                                on_ps{$player_id} = true;
                                flowplayer(jQuery('.player{$player_id}')).pause();
                                popupShowIt_{$player_id}();
                            }
                            var mvplayer_social_shared = jQuery.cookie('mvplayer_social_lockdown_shared{$player_id}');
                            console.log(oncuepoint_{$player_id});
                            if({$social}==1 && !oncuepoint_{$player_id} && {$socialbtn_duration}==1 && mvplayer_social_shared == null && check_preview != null)
                            {
                                // alert('resume-s-lock');
                                on_ps{$player_id} = true;
                                flowplayer(jQuery('.player{$player_id}')).pause();
                                sociallock_{$player_id}();
                            }
                            var mvplayer_cta_shared = jQuery.cookie('mvplayer_cta_lockdown_shared{$player_id}');
                            if({$cta}==1 && !oncuepointcta_{$player_id} && {$ctabtn_dur}==1 && mvplayer_cta_shared == null && check_preview != null)
                            {
                                console.log('when video is resumed');
                                on_ps{$player_id} = true;
                                flowplayer(jQuery('.player{$player_id}')).pause();
                                ctabtn_{$player_id}();
                            }
                        },600);
                    });
                    api.bind('resume', function () {
                        var check_preview = jQuery.cookie('check_preview_{$player_id}');
                        console.log('resume-5738:');
                        jQuery('.main-wrapper').each(function(index,item){
                            var elem = jQuery(item).data('player_id');
                            var v_type = jQuery(item).data('v_type');
                            var check = jQuery.cookie('check_preview_'+elem);
                            console.log('check if the video'+elem+' is playing or not: '+check);
                            if(elem == '${player_id}'){
                                if(v_type == 'yt'){
                                    window['player'.concat(elem)].playVideo();
                                }else if(v_type == 'mp4'){
                                    flowplayer(jQuery('.player'+elem)).play();
                                }else if(v_type == 'vimeo'){
                                    window['player'.concat(elem)].api('play');
                                }
                                    window['isplaying'.concat(elem)] = true;
                            }else{
                                if(v_type == 'yt' && check != null){
                                    window['player'.concat(elem)].pauseVideo();
                                }else if(v_type == 'mp4' && check != null){
                                    flowplayer(jQuery('.player'+elem)).pause();
                                }else if(v_type == 'vimeo' && check != null){
                                    window['player'.concat(elem)].api('pause');
                                }
                                    window['isplaying'.concat(elem)] = false;
                            }
                        })
                        jQuery('.player{$player_id} video').css('background','black');
                        if({$content_duration}==1 && check_preview != null)
                        {
                                jQuery('#mvplayer_video_content{$player_id}').show();
                        }
                        if('{$OptinBox}'=='yes' && {$optin_duration}==1 && !show_optin{$player_id} && check_preview != null)
                        {
                                on_ps{$player_id} = true;
                                flowplayer(jQuery('.player{$player_id}')).pause();
                                optinShowIt_{$player_id}();
                        }
                        if('{$Popup}'=='yes' && {$popup_duration}==1 && !show_popup{$player_id} && check_preview != null)
                        {
                            on_ps{$player_id} = true;
                            flowplayer(jQuery('.player{$player_id}')).pause();
                            popupShowIt_{$player_id}();
                        }
                        var mvplayer_social_shared = jQuery.cookie('mvplayer_social_lockdown_shared{$player_id}');
                        console.log(oncuepoint_{$player_id});
                        if({$social}==1 && !oncuepoint_{$player_id} && {$socialbtn_duration}==1 && mvplayer_social_shared == null && check_preview != null)
                        {
                                // alert('resume-s-lock');
                                on_ps{$player_id} = true;
                                flowplayer(jQuery('.player{$player_id}')).pause();
                                sociallock_{$player_id}();
                        }
                        var mvplayer_cta_shared = jQuery.cookie('mvplayer_cta_lockdown_shared{$player_id}');
                        if({$cta}==1 && !oncuepointcta_{$player_id} && {$ctabtn_dur}==1 && mvplayer_cta_shared == null && check_preview != null)
                        {
                                console.log('when video is resumed');
                                on_ps{$player_id} = true;
                                flowplayer(jQuery('.player{$player_id}')).pause();
                                ctabtn_{$player_id}();
                        }
                    });
                    api.bind('finish', function () {
                        var check_preview = jQuery.cookie('check_preview_{$player_id}');
                        if({$content_dur_end}==1 && check_preview != null)
                        {
                            jQuery('#mvplayer_video_content{$player_id}').show();
                        }
                        if('{$OptinBox}'=='yes' && {$optin_dur_end}==1 && !show_optin{$player_id} && check_preview != null)
                        {
                            optinShowIt_{$player_id}();
                        }
                        if('{$Popup}'=='yes' && {$popup_dur_end}==1 && !show_popup{$player_id} && check_preview != null)
                        {
                            popupShowIt_{$player_id}();
                        }
                        var mvplayer_social_shared = jQuery.cookie('mvplayer_social_lockdown_shared{$player_id}');
                        if({$social}==1 && {$socialbtn_dur_end}==1 && mvplayer_social_shared == null && check_preview != null)
                        {
                            sociallock_{$player_id}();
                        }
                        var mvplayer_cta_shared = jQuery.cookie('mvplayer_cta_lockdown_shared{$player_id}');
                        if({$cta}==1 && {$ctabtn_dur_end}==1 && mvplayer_cta_shared == null && check_preview != null)
                        {
                            console.log('when video is finished');
                            ctabtn_{$player_id}();
                        }
                    });

                    jQuery(window).scroll(function() {
                        var pos{$player_id} = jQuery('#main-parent-{$player_id}').offset().top;
                        var wintop{$player_id} = jQuery(window).scrollTop();
                        if($allowscroll==1){
                            if(pos{$player_id} > 0){
                                if((wintop{$player_id} > pos{$player_id}) && isplaying{$player_id}){
                                    var api = flowplayer(jQuery('.player{$player_id}',{}));
                                    jQuery('#wrapper-{$player_id}').addClass('pip-video');
                                    jQuery('.img-767_{$player_id}').addClass('skin-dim');
                                    jQuery('#main-parent-{$player_id}').css('min-height','400px');
                                }else{
                                    jQuery('#wrapper-{$player_id}').removeClass('pip-video');
                                    jQuery('.img-767_{$player_id}').removeClass('skin-dim');
                                    jQuery('#main-parent-{$player_id}').css('min-height','0px');
                                }
                            }
                        }
                    });
                </script>
                <div class='mv_player_video_overlap' style='width:{$width}px; height:{$height}px;display:none;'></div>";
        ob_start();
        echo "<div id='show_maploc{$player_id}' class='show_maploc map-loc-page' style='display:none;'>
                <div id='show_map{$player_id}' class='' style='width:100%;height:100%;'></div>
                <a class='close_btn_map' id='close_btn_map{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a></div>";
        echo "<div class='show_allbtn' id='show_allbtn{$player_id}' style='height:{$height}px;'>";
        $k = 1;
        foreach ($buttons as $button) {
            if ($k < 4) {
                echo "<div class='btn_data' id='btn_data{$player_id}'>
                    <a class='front_btn' id='front_btn{$player_id}'><img src=" . $button->Icon . ">    <span class='label'>" . $button->Label . "</span></a>
                            <!--img class='btn_ico' id='btn_ico{$player_id}' src=" . $button->Icon . "-->
                        <input type='hidden' id='btn_type{$player_id}' value='" . $button->Type . "'>
                        <input type='hidden' id='btn_iframeurl{$player_id}' value='" . $button->IframeUrl . "'>
                        <input type='hidden' id='btn_htmlcode{$player_id}' value='" . htmlspecialchars($button->HtmlCode) . "'>
                        <input type='hidden' id='btn_postcat{$player_id}' value='" . $button->PostCategory . "'>
                        <input type='hidden' id='btn_postno{$player_id}' value='" . $button->PostNo . "'>
                        <input type='hidden' id='btn_page{$player_id}' value='" . $button->Page . "'>
                        <input type='hidden' id='btn_relatedvideo_url{$player_id}' value='" . $button->RelatedVideoUrls . "'>
                        <input type='hidden' id='btn_relatedvideo_thumb{$player_id}' value='" . $button->RelatedVideoThumbs . "'>";
                if ($button->PostCategory) {
                    echo "<input type='hidden' id='btn_postdivid{$k}' class='btn_postdivid' value='#show_post" . $k . $player_id . "'>";
                } else {echo "<input type='hidden' id='btn_postdivid{$k}' class='btn_postdivid'>";}
                if ($button->Page) {
                    echo "<input type='hidden' id='btn_pagedivid{$k}' class='btn_pagedivid' value='#show_page" . $k . $player_id . "'>";
                } else {echo "<input type='hidden' id='btn_pagedivid{$k}' class='btn_pagedivid'>";}
                if ($button->MapLocation) {
                    echo "<input type='hidden' id='btn_maploc{$player_id}' class='btn_maploc{$player_id}' value='" . $button->MapLocation . "'>";
                } else {
                    echo "<input type='hidden' id='btn_maplat{$k}' class='btn_maplat'><input type='hidden' id='btn_maplng{$k}' class='btn_maplng'>";
                }
                echo "</div>";
                $k++;
            }
            if ($k == 4) {
                echo "<div id='morebtndiv{$player_id}' class='morebtndiv'><a id='morebtnlink{$player_id}' class='morebtnlink'>more..</a><label id='morebtn{$player_id}' class='morebtn'>..</label></div>";
                $k++;
            }
        }
        echo "</div>";
        echo "<div id='show_allbtnleft{$player_id}' class='show_allbtnleft left-controls' >
                <a class='close_allbtn' id='close_allbtn{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a>";
        $k = 1;
        foreach ($buttons as $button) {
            $j = $k + 3;
            $w = $width - 50;
            echo "<div class='front_btnleft' id='front_btnleft{$player_id}' ><img src=" . $button->Icon . ">    " . $button->Label . "
                    <input type='hidden' id='btn_type{$player_id}' value='" . $button->Type . "'>
                    <input type='hidden' id='btn_maploc{$player_id}' class='btn_maploc{$player_id}' value='" . $button->MapLocation . "'>
                    <input type='hidden' id='btn_iframeurl{$player_id}' value='" . $button->IframeUrl . "'>
                    <input type='hidden' id='btn_htmlcode{$player_id}' value='" . htmlspecialchars($button->HtmlCode) . "'>
                    <input type='hidden' id='btn_postcat{$player_id}' value='" . $button->PostCategory . "'>
                    <input type='hidden' id='btn_postno{$player_id}' value='" . $button->PostNo . "'>
                    <input type='hidden' id='btn_page{$player_id}' value='" . $button->Page . "'>
                    <input type='hidden' id='btn_relatedvideo_url{$player_id}' value='" . $button->RelatedVideoUrls . "'>
                    <input type='hidden' id='btn_relatedvideo_thumb{$player_id}' value='" . $button->RelatedVideoThumbs . "'>";

            if ($button->PostCategory) {
                echo "<input type='hidden' id='btn_postdivid{$j}' class='btn_postdivid' value='#show_post" . $j . $player_id . "'>";
            } else {echo "<input type='hidden' id='btn_postdivid{$j}' class='btn_postdivid'>";}
            if ($button->Page) {
                echo "<input type='hidden' id='btn_pagedivid{$j}' class='btn_pagedivid' value='#show_page" . $j . $player_id . "'>";
            } else {echo "<input type='hidden' id='btn_pagedivid{$j}' class='btn_pagedivid'>";}
            if ($button->MapLocation) {
                echo "<input type='hidden' id='btn_maploc{$player_id}' class='btn_maploc{$player_id}' value='" . $button->MapLocation . "'>";
            } else {
                echo "<input type='hidden' id='btn_maplat{$j}' class='btn_maplat'>
                            <input type='hidden' id='btn_maplng{$j}' class='btn_maplng'>";
            }
            echo "</div>";
            $k++;
        }
        echo "</div>";
        $postdiv_count = 1;
        $postdiv_countleft = 4;
        foreach ($buttons as $button) {
            if ($button->Page) {
                if ($button->Page) {
                    echo "<div class='show_page eml-page' id='show_page{$postdiv_count}{$player_id}'>
                        <a class='close_page' id='close_page{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a>";
                    $page = get_post($button->Page);
                    echo "      <div class='pagedesc' style='height:100%;'>";
                    $plink = get_permalink($page->ID);
                    echo "          <input id='pagelink' value='" . $plink . "' hidden/>";
                    echo "      </div>";
                    echo "</div>";
                    echo "<div class='show_page eml-page' id='show_page{$postdiv_countleft}{$player_id}'>
                        <a class='close_page' id='close_page{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a>";
                    $page = get_post($button->Page);
                    echo "      <div class='pagedesc' style='height:100%;'>";
                    $plink = get_permalink($page->ID);
                    echo "          <input id='pagelink' value='" . $plink . "' hidden/>";
                    echo "      </div>";
                    echo "</div>";
                }
            }
            if ($button->PostCategory) {
                echo "<div class='show_post' id='show_post{$postdiv_count}{$player_id}' style='    top: 0px !important;left: 0px !important;width: 100% !important;height: 100%!important;box-shadow: rgb(255 0 0 / 67%) 0px 0px 5px 3px !important;'>
                            <a class='close_post' id='close_post{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a>";
                $args = array('post_type' => 'post', 'tax_query' => array(
                    array('taxonomy' => 'category', 'field' => 'term_id', 'terms' => $button->PostCategory,
                    )));
                $posts = get_posts($args);
                $post_cnt = 1;
                foreach ($posts as $post) {
                    if ($button->PostNo >= $post_cnt) {
                        echo "<div class='postdesc'><div class='posttitle'>" . $post->post_title . "</div>";
                        echo "<div class='postcontent'>";
                        $content = $post->post_content;
                        if (strlen($content) > 100) {
                            echo trim(substr($content, 0, 100)) . '...';
                        } else {
                            echo trim(substr($content, 0, 50));
                        }
                        ?><a class="readmore" href='<?php echo get_permalink($post->ID); ?>'>Read More</a> <?php
echo "</div></div>";
                        $post_cnt++;
                    }
                }
                echo "</div>";
                echo "<div class='show_post' id='show_post{$postdiv_countleft}{$player_id}' style='    top: 0px !important;left: 0px !important;width: 100% !important;height: 100%!important;box-shadow: rgb(255 0 0 / 67%) 0px 0px 5px 3px !important;'>
                            <a class='close_post' id='close_post{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a>";
                $args = array('post_type' => 'post', 'tax_query' => array(
                    array('taxonomy' => 'category', 'field' => 'term_id', 'terms' => $button->PostCategory,
                    )));
                $posts = get_posts($args);
                $post_cnt = 1;
                foreach ($posts as $post) {
                    if ($button->PostNo >= $post_cnt) {
                        echo "<div class='postdesc'><div class='posttitle'>" . $post->post_title . "</div>";
                        echo "<div class='postcontent'>";
                        $content = $post->post_content;
                        if (strlen($content) > 100) {
                            echo trim(substr($content, 0, 100)) . '...';
                        } else {
                            echo trim(substr($content, 0, 50));
                        }
                        ?><a class="readmore" href='<?php echo get_permalink($post->ID); ?>'>Read More</a> <?php
echo "</div></div>";
                        $post_cnt++;
                    }
                }
                echo "</div>";
            }
            $postdiv_count++;
            $postdiv_countleft++;
        }
        echo "<div id='show_all_relatedvideo{$player_id}' class='show_all_relatedvideo' style='width:{$width}px; height:{$height}px;'><a class='close_btn_relatedvideos' id='close_btn_relatedvideos{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a></div>";
        echo "<div class='show_iframe' id='show_iframe{$player_id}' style='width:{$width}px; height:{$height}px;'><a class='close_btn_iframe' id='close_btn_iframe{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a><iframe id='if1' name='I1'  height='{$height}px' width='{$width}px'></iframe></div>";
        echo "<div class='show_htmlcode shw-html-page' id='show_htmlcode{$player_id}' style='width:100%; height:100%;overflow: auto;'><a class='close_btn_htmlcode' id='close_btn_htmlcode{$player_id}'><img src='" . MV_PLAYER_URL . "image/close1.png'></a><label></label></div>";
        require MV_PLAYER_PATH . 'includes/social-lock/socialbtn.php';
        require MV_PLAYER_PATH . 'includes/optin-popup.php';
        require MV_PLAYER_PATH . 'includes/popup.php';
        require MV_PLAYER_PATH . 'includes/ctabtn.php';
        $whichpost = get_the_ID();
        ?>
        <script>
            jQuery(document).ready(function($){
                if('<?php echo $info->PlayerSkin; ?>'=='skin21'){
                    $("#show_allbtnleft<?php echo $player_id; ?>").addClass('allbtn22');
                    $("#show_optinbox_<?php echo $player_id; ?>").addClass('optin21');
                    $("#social_button<?php echo $player_id; ?>").addClass('social21');
                    $("#cta_section<?php echo $player_id; ?>").addClass('ctabtn21');
                }else if('<?php echo $info->PlayerSkin; ?>'=='skin22'){
                    $("#show_allbtnleft<?php echo $player_id; ?>").addClass('allbtn22');
                    $("#show_allbtn<?php echo $player_id; ?>").addClass('mainallbtn22');
                    $("#show_optinbox_<?php echo $player_id; ?>").addClass('optin22');
                    $("#social_button<?php echo $player_id; ?>").addClass('social22');
                }else if('<?php echo $info->PlayerSkin; ?>'=='skin23'){
                    $("#show_allbtn<?php echo $player_id; ?>").addClass('mainallbtn23');
                    $("#show_allbtnleft<?php echo $player_id; ?>").addClass('allbtn23');
                    $("#show_optinbox_<?php echo $player_id; ?>").addClass('optin23');
                    $("#social_button<?php echo $player_id; ?>").addClass('social23');
                }else if('<?php echo $info->PlayerSkin; ?>'=='skin24'){
                    $("#show_allbtnleft<?php echo $player_id; ?>").addClass('allbtn24');
                    $("#show_optinbox_<?php echo $player_id; ?>").addClass('optin24');
                    $("#social_button<?php echo $player_id; ?>").addClass('social24');
                }
                $(document).on("click","#play-icon-<?php echo $player_id; ?>", function(){
                    $("#play-overlay-<?php echo $player_id; ?>").hide();
                    var api = flowplayer(jQuery('.player<?php echo $player_id; ?>',{currentTime: 0.00}));
                    if(api.finished){
                        console.log('condition 1');
                        // api.seek(0.0, function() {});
                        // api.volume(1.0, function() {});
                        jQuery.cookie('check_preview_<?php echo $player_id; ?>', '2', { expires: 30, path: '/' });
                    api.play();
                    isplaying<?php echo $player_id; ?> = true;
                    }else{
                        console.log('condition 2');
                        // flowplayer(jQuery('.player<?php echo $player_id; ?>')).pause();
                        // api.seek(0.0, function() {console.log('video is seeking to beginning')});
                        api.seekTo(0.0, function() {console.log('video is seeking to beginning')});
                        api.volume(1.0, function() {});
                        jQuery.cookie('check_preview_<?php echo $player_id; ?>', '1', { expires: 30, path: '/' });
                        jQuery.cookie('begin<?php echo $player_id; ?>', '1', { expires: 30, path: '/' });
                        // flowplayer(jQuery('.player<?php echo $player_id; ?>')).play();
                    }
                })
                //morebutton
                $('#morebtnlink<?php echo $player_id; ?>').on('click',function(){
                        $('#show_allbtnleft<?php echo $player_id; ?>').show();
                        $('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').show();
                        $('#show_allbtn<?php echo $player_id; ?>').hide();
                        var api = flowplayer(jQuery('.player<?php echo $player_id; ?>'));
                        api.pause();
                isplaying<?php echo $player_id ?> = false;
                });
                $('#close_btn_iframe<?php echo $player_id; ?>').on('click',function(){
                            $(this).parents('#show_iframe<?php echo $player_id; ?>').hide();
                            $('#show_allbtn<?php echo $player_id; ?>').show();
                            $('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                            var api = flowplayer(jQuery('.player<?php echo $player_id; ?>'));
                            api.play();
                isplaying<?php echo $player_id; ?> = true;
                });
                $('#close_btn_relatedvideos<?php echo $player_id; ?>').on('click',function(){
                            $(this).parents('#show_all_relatedvideo<?php echo $player_id; ?>').hide();
                            $(this).parents('#show_all_relatedvideo<?php echo $player_id; ?>').children('.singlevideo').remove();
                            $('#show_allbtn<?php echo $player_id; ?>').show();
                            $('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                            var api = flowplayer(jQuery('.player<?php echo $player_id; ?>'));
                            api.play();
                isplaying<?php echo $player_id; ?> = true;
                });
                $('#close_btn_htmlcode<?php echo $player_id; ?>').on('click',function(){
                            $(this).parents('#show_htmlcode<?php echo $player_id; ?>').hide();
                            $('#show_allbtn<?php echo $player_id; ?>').show();
                            $('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                            var api = flowplayer(jQuery('.player<?php echo $player_id; ?>'));
                            api.play();
                isplaying<?php echo $player_id; ?> = true;
                });
                $('#close_btn_map<?php echo $player_id; ?>').on('click',function(){
                            $(this).parents('#show_maploc<?php echo $player_id; ?>').hide();
                            $('#show_allbtn<?php echo $player_id; ?>').show();
                            $('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                            var api = flowplayer(jQuery('.player<?php echo $player_id; ?>'));
                            api.play();
                isplaying<?php echo $player_id; ?> = true;
                });
                $('#close_allbtn<?php echo $player_id; ?>').on('click',function(){
                            $(this).parents('#show_allbtnleft<?php echo $player_id; ?>').hide();
                            $('#show_allbtn<?php echo $player_id; ?>').show();
                            $('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                            var api = flowplayer(jQuery('.player<?php echo $player_id; ?>'));
                            api.play();
                isplaying<?php echo $player_id; ?> = true;
                });
                $('#close_post<?php echo $player_id; ?>').on('click',function(){
                            $(this).parents('.show_post').hide();
                            $('#show_allbtn<?php echo $player_id; ?>').show();
                            $('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                            var api = flowplayer(jQuery('.player<?php echo $player_id; ?>'));
                            api.play();
                isplaying<?php echo $player_id; ?> = true;
                });
                //$('#close_page<?php echo $player_id; ?>').on('click',function(){
                $(document).on("click", "#close_page<?php echo $player_id; ?>", function () {
                            $(`#wrapper-<?php echo $player_id; ?> .pagedesc iframe`).remove();
                            $(this).parents('.show_page').hide();
                            $('#show_allbtn<?php echo $player_id; ?>').show();
                            $('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                            var api = flowplayer(jQuery('.player<?php echo $player_id; ?>'));
                            api.play();
                isplaying<?php echo $player_id; ?> = true;
                });
                //click on single button in left side
                $(document).on('click','#front_btnleft<?php echo $player_id; ?>',function(){
                            console.log("you clicked 2");
                            $('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                            $(this).parents('#show_allbtnleft<?php echo $player_id; ?>').hide();
                            var btn_type =$(this).children('#btn_type<?php echo $player_id; ?>').val();
                            var btn_maptitle =$(this).children('#btn_maptitle<?php echo $player_id; ?>').val();
                            var btn_maploc =$(this).children('#btn_maploc<?php echo $player_id; ?>').val();
                            var btn_maplat =$(this).children('.btn_maplat').val();
                            var btn_maplng =$(this).children('.btn_maplng').val();
                            var btn_iframeurl =$(this).children('#btn_iframeurl<?php echo $player_id; ?>').val();
                            var btn_htmlcode =$(this).children('#btn_htmlcode<?php echo $player_id; ?>').val();
                            var btn_relatedvideo_url =$(this).children('#btn_relatedvideo_url<?php echo $player_id; ?>').val();
                            var btn_relatedvideo_thumb =$(this).children('#btn_relatedvideo_thumb<?php echo $player_id; ?>').val();
                            var btn_postdivid =$(this).children('.btn_postdivid').val();
                            var btn_pagedivid =$(this).children('.btn_pagedivid').val();
                            if(btn_type=='iframe')
                            {
                                $('#show_iframe<?php echo $player_id; ?>').show();
                                $('#show_iframe<?php echo $player_id; ?>').children('iframe').attr('src',btn_iframeurl);
                            }
                            else if(btn_type=='related_video')
                            {
                                $('#show_all_relatedvideo<?php echo $player_id; ?>').show();
                                var btn_relatedvideo_urlarray = btn_relatedvideo_url.split(",") ;
                                var btn_relatedvideo_thumbarray = btn_relatedvideo_thumb.split(",") ;
                                for(var a=0;a<btn_relatedvideo_urlarray.length;a++)
                                {
                                    $('#show_all_relatedvideo<?php echo $player_id; ?>').append('<div class="singlevideo"><a target="_blank" href="'+btn_relatedvideo_urlarray[a]+'"><img src="'+btn_relatedvideo_thumbarray[a]+'"></a></div>');
                                }
                            }
                            else if(btn_type=='post')
                            {
                                $('#wrapper-<?php echo $player_id; ?>').children(btn_postdivid).show();
                            }
                            else if(btn_type=='page')
                            {
                                // $('#wrapper-<?php echo $player_id; ?>').children(btn_pagedivid).show();
                                console.log(btn_pagedivid);
                                var plink = $(`#wrapper-<?php echo $player_id; ?> ${btn_pagedivid} #pagelink`).val();
                                console.log(plink);
                                if($(`#wrapper-<?php echo $player_id; ?> `+btn_pagedivid+ ' .pagedesc').children().length == 1){
                                    $(`#wrapper-<?php echo $player_id; ?> `+btn_pagedivid+ ' .pagedesc').append("<iframe id='page_iframe' src='"+plink+"' height='100%' width='100%'></iframe>");
                                }
                                $(`#wrapper-<?php echo $player_id; ?>`).children(btn_pagedivid).show();
                            }
                            else if(btn_type=='htmlcode')
                            {
                                    if($('#show_htmlcode<?php echo $player_id; ?> label').children().length == 0){
                                    $('#show_htmlcode<?php echo $player_id; ?> label').html(btn_htmlcode);
                                }
                                $('#show_htmlcode<?php echo $player_id; ?>').show();
                            }
                            else if(btn_type=='map')
                            {
                                $('#show_maploc<?php echo $player_id; ?>').show();
                                // function initialize(btn_maplat,btn_maplng)
                                // {
                                //     var latlng = new google.maps.LatLng(btn_maplat,btn_maplng);
                                //     var myOptions = {
                                //         zoom: 14,
                                //         center: latlng,
                                //         mapTypeId: google.maps.MapTypeId.ROADMAP
                                //     };
                                //     var map = new google.maps.Map(document.getElementById("show_map<?php echo $player_id; ?>"),
                                //     myOptions);
                                // }
                                // initialize(btn_maplat,btn_maplng);
                                var country = null;
                                $(".btn_maploc<?php echo $player_id; ?>").each(function(){
                                    // Test if the div element is empty
                                    if($(this).val() != "" && $(this).val() != null){
                                        console.log('loop is running');
                                        country = $(this).val();
                                    }
                                });
                                // var country = $("#btn_maploc<?php echo $player_id; ?>").val();
                                console.log("country: "+"btn_maploc<?php echo $player_id; ?>");
                                console.log("country: "+country);
                                if(country){
                                    $("#show_map<?php echo $player_id; ?>").html(`<iframe id='country_iframe' src='https://maps.google.com/maps?q=${country}&output=embed' height='100%' width='100%'></iframe>`);
                                }
                            }
                });
                //click on single button in right side
                //$('#front_btn<?php echo $player_id; ?>').on('click',function(){
                $(document).on("click", "#front_btn<?php echo $player_id; ?>", function () {
                            console.log('3');
                            var api = flowplayer(jQuery('.player<?php echo $player_id; ?>'));
                            api.pause();
                            isplaying<?php echo $player_id ?> = false;
                            var btn_type =$(this).parents('#btn_data<?php echo $player_id; ?>').children('#btn_type<?php echo $player_id; ?>').val();
                            var btn_maptitle =$(this).parents('#btn_data<?php echo $player_id; ?>').children('#btn_maptitle<?php echo $player_id; ?>').val();
                            var btn_maploc =$(this).parents('#btn_data<?php echo $player_id; ?>').children('#btn_maploc<?php echo $player_id; ?>').val();
                            var btn_maplat =$(this).parents('#btn_data<?php echo $player_id; ?>').children('.btn_maplat').val();
                            var btn_maplng =$(this).parents('#btn_data<?php echo $player_id; ?>').children('.btn_maplng').val();
                            var btn_iframeurl =$(this).parents('#btn_data<?php echo $player_id; ?>').children('#btn_iframeurl<?php echo $player_id; ?>').val();
                            var btn_htmlcode =$(this).parents('#btn_data<?php echo $player_id; ?>').children('#btn_htmlcode<?php echo $player_id; ?>').val();
                            var btn_relatedvideo_url =$(this).parents('#btn_data<?php echo $player_id; ?>').children('#btn_relatedvideo_url<?php echo $player_id; ?>').val();
                            var btn_relatedvideo_thumb =$(this).parents('#btn_data<?php echo $player_id; ?>').children('#btn_relatedvideo_thumb<?php echo $player_id; ?>').val();
                            var btn_postdivid =$(this).parents('#btn_data<?php echo $player_id; ?>').children('.btn_postdivid').val();
                            var btn_pagedivid =$(this).parents('#btn_data<?php echo $player_id; ?>').children('.btn_pagedivid').val();
                            if(btn_type=='iframe')
                            {
                                $('#show_iframe<?php echo $player_id; ?>').show();
                                $('#show_iframe<?php echo $player_id; ?>').children('iframe').attr('src',btn_iframeurl);
                            }
                            else if(btn_type=='related_video')
                            {
                                $('#show_all_relatedvideo<?php echo $player_id; ?>').show();
                                var btn_relatedvideo_urlarray = btn_relatedvideo_url.split(",") ;
                                var btn_relatedvideo_thumbarray = btn_relatedvideo_thumb.split(",") ;
                                console.log('btn_relatedvideo_thumbarray: ');
                                console.log(btn_relatedvideo_thumbarray);
                                for(var a=0;a<btn_relatedvideo_urlarray.length;a++)
                                {
                                    $('#show_all_relatedvideo<?php echo $player_id; ?>').append('<div class="singlevideo"><a target="_blank" href="'+btn_relatedvideo_urlarray[a]+'"><img src="'+btn_relatedvideo_thumbarray[a]+'"></a></div>');
                                }
                            }
                            else if(btn_type=='post')
                            {
                                $('#wrapper-<?php echo $player_id; ?>').children(btn_postdivid).show();
                            }
                            else if(btn_type=='page')
                            {
                                // $('#wrapper-<?php echo $player_id; ?>').children(btn_pagedivid).show();
                                var plink = $(`#wrapper-<?php echo $player_id; ?> ${btn_pagedivid} #pagelink`).val();
                                if($(`#wrapper-<?php echo $player_id; ?> `+btn_pagedivid+ ' .pagedesc').children().length == 1){
                                    $(`#wrapper-<?php echo $player_id; ?> `+btn_pagedivid+ ' .pagedesc').append("<iframe id='page_iframe' src='"+plink+"' height='100%' width='100%'></iframe>");
                                }
                                $(`#wrapper-<?php echo $player_id; ?>`).children(btn_pagedivid).show();
                            }
                            else if(btn_type=='htmlcode')
                            {
                                if($('#show_htmlcode<?php echo $player_id; ?> label').children().length == 0){
                                    $('#show_htmlcode<?php echo $player_id; ?> label').html(btn_htmlcode);
                                }
                                $('#show_htmlcode<?php echo $player_id; ?>').show();
                            }
                            else if(btn_type=='map')
                            {
                                // $('#show_maploc<?php echo $player_id; ?>').show();
                                // function initialize(btn_maplat,btn_maplng)
                                // {
                                //     var latlng = new google.maps.LatLng(btn_maplat,btn_maplng);
                                //     var myOptions = {
                                //         zoom: 14,
                                //         center: latlng,
                                //         mapTypeId: google.maps.MapTypeId.ROADMAP
                                //     };
                                //     var map = new google.maps.Map(document.getElementById("show_map<?php echo $player_id; ?>"),
                                //     myOptions);
                                // }
                                // initialize(btn_maplat,btn_maplng);
                                //new code
                                $('#show_maploc<?php echo $player_id; ?>').show();
                                // function initialize(btn_maplat,btn_maplng)
                                // {
                                //     var latlng = new google.maps.LatLng(btn_maplat,btn_maplng);
                                //     var myOptions = {
                                //         zoom: 14,
                                //         center: latlng,
                                //         mapTypeId: google.maps.MapTypeId.ROADMAP
                                //     };
                                //     var map = new google.maps.Map(document.getElementById("show_map<?php echo $player_id; ?>"),
                                //     myOptions);
                                // }
                                // initialize(btn_maplat,btn_maplng);
                                var country = null;
                                $(".btn_maploc<?php echo $player_id; ?>").each(function(){
                                    // Test if the div element is empty
                                    if($(this).val() != "" && $(this).val() != null){
                                        console.log('loop is running');
                                        country = $(this).val();
                                    }
                                });
                                // var country = $("#btn_maploc<?php echo $player_id; ?>").val();
                                console.log("country: "+"btn_maploc<?php echo $player_id; ?>");
                                console.log("country: "+country);
                                if(country){
                                    $("#show_map<?php echo $player_id; ?>").html(`<iframe id='country_iframe' src='https://maps.google.com/maps?q=${country}&output=embed' height='100%' width='100%'></iframe>`);
                                }
                            }
                            $('#show_allbtn<?php echo $player_id; ?>').hide();
                });
            });
            function mvplayer_social_lockdown_plusone(plusone) {
                if (plusone.state == "on") {
                    var data = {post: "<?php echo $whichpost; ?>", action: "mvplayer_social_lockdown", source: "google"};
                    jQuery.post("<?php echo admin_url('admin-ajax.php'); ?>", data, function(response) {
                            if(current_player_id=='<?php echo $player_id; ?>')
                            {
                                <?php echo 'sociallock_hide_' . $player_id . '();'; ?>
                            }
                    });
                }
            }
            jQuery(document).ready(function() {
                FB.Event.subscribe("edge.create", function(href) {
                    var data = {post: "<?php echo $whichpost; ?>", action: "mvplayer_social_lockdown", source: "facebook"};
                    jQuery.post("<?php echo admin_url('admin-ajax.php'); ?>", data, function(response) {
                            jQuery(".fb_edge_comment_widget.fb_iframe_widget").remove();
                            if(current_player_id=='<?php echo $player_id; ?>')
                            {
                                <?php echo 'sociallock_hide_' . $player_id . '();'; ?>
                            }
                    });
                });
            });
            twttr.ready(function (twttr) {
                twttr.events.bind("tweet", function(event) {
                    var data = {post: "<?php echo $whichpost; ?>", action: "mvplayer_social_lockdown", source: "twitter"};
                    jQuery.post("<?php echo admin_url('admin-ajax.php'); ?>", data, function(response) {
                        if(current_player_id=='<?php echo $player_id; ?>')
                        {
                            <?php echo 'sociallock_hide_' . $player_id . '();'; ?>
                        }
                    });
                });
            });
            jQuery('.allsharebtn<?php echo $player_id; ?>').on('click',function(){
                console.log('6220');
                current_player_id = '<?php echo $player_id; ?>';
                jQuery('.social_btn').hide();
                <?php echo 'sociallock_hide_' . $player_id . '();'; ?>
                isplaying<?php echo $player_id; ?> = true;
            });
            jQuery('.allsharebtn<?php echo $player_id; ?>').on('mouseover',function(){
                current_player_id = '<?php echo $player_id; ?>';
            });
            function sociallock_<?php echo $player_id; ?>()
            {
                console.log('Upload Case Social Modal 3');
                jQuery('#show_allbtn<?php echo $player_id; ?>').hide();
                jQuery('#show_allbtnleft<?php echo $player_id; ?>').hide();
                jQuery('#show_iframe<?php echo $player_id; ?>').hide();
                jQuery('#show_htmlcode<?php echo $player_id; ?>').hide();
                jQuery('#show_maploc<?php echo $player_id; ?>').hide();
                jQuery('#wrapper-<?php echo $player_id; ?>').children('.show_post').hide();
                jQuery('#wrapper-<?php echo $player_id; ?>').children('.show_page').hide();
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').show();
                jQuery('#social_button<?php echo $player_id; ?>').css('display','flex');
                if(document.getElementById("cta_section<?php echo $player_id; ?>").style.display == "flex"){
                    jQuery('#cta_section<?php echo $player_id; ?>').show();
                }else{
                    jQuery('#cta_section<?php echo $player_id; ?>').hide();
                }
            }
            function ctabtn_<?php echo $player_id; ?>()
            {
                console.log('time to show cta btn');
                jQuery('#show_allbtn<?php echo $player_id; ?>').hide();
                jQuery('#show_allbtnleft<?php echo $player_id; ?>').hide();
                jQuery('#show_iframe<?php echo $player_id; ?>').hide();
                jQuery('#show_htmlcode<?php echo $player_id; ?>').hide();
                jQuery('#show_maploc<?php echo $player_id; ?>').hide();
                jQuery('#wrapper-<?php echo $player_id; ?>').children('.show_post').hide();
                jQuery('#wrapper-<?php echo $player_id; ?>').children('.show_page').hide();
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').show();
                if(document.getElementById("social_button<?php echo $player_id; ?>").style.display == "flex"){
                    jQuery('#social_button<?php echo $player_id; ?>').show();
                }else{
                    jQuery('#social_button<?php echo $player_id; ?>').hide();
                }
                jQuery('#cta_section<?php echo $player_id; ?>').css('display','flex');
            }
            function sociallock_hide_<?php echo $player_id; ?>()
            {
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                jQuery('#social_button<?php echo $player_id; ?>').hide();
                jQuery.cookie('mvplayer_social_lockdown_shared<?php echo $vid; ?>', '1', { expires: 30, path: '/' });
                oncuepoint_<?php echo $player_id; ?> = true;
                on_ps<?php echo $player_id; ?> = false;
                jQuery('#show_allbtn<?php echo $player_id; ?>').show();
                var api = flowplayer(jQuery('.player<?php echo $player_id; ?>'));
                api.pause();
                isplaying<?php echo $player_id ?> = false;
            }
            function ctabtn_hide_<?php echo $player_id; ?>()
            {
                console.log('ctabtn_hide_');
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                jQuery('#cta_section<?php echo $player_id; ?>').hide();
                jQuery.cookie('mvplayer_cta_lockdown_shared<?php echo $vid; ?>', '1', { expires: 30, path: '/' });
                oncuepointcta_<?php echo $player_id; ?> = true;
                on_ps<?php echo $player_id; ?> = false;
                jQuery('#show_allbtn<?php echo $player_id; ?>').show();
                var api = flowplayer(jQuery('.player<?php echo $player_id; ?>'));
                api.pause();
                isplaying<?php echo $player_id ?> = false;
            }
            function popupShowIt_<?php echo $player_id; ?>()
            {
                jQuery('#show_allbtn<?php echo $player_id; ?>').hide();
                jQuery('#show_allbtnleft<?php echo $player_id; ?>').hide();
                jQuery('#show_iframe<?php echo $player_id; ?>').hide();
                jQuery('#show_htmlcode<?php echo $player_id; ?>').hide();
                jQuery('#show_maploc<?php echo $player_id; ?>').hide();
                jQuery('#wrapper-<?php echo $player_id; ?>').children('.show_post').hide();
                jQuery('#wrapper-<?php echo $player_id; ?>').children('.show_page').hide();
                if ( document.getElementById("show_popupbox_<?php echo $player_id; ?>") ){
                    document.getElementById("show_popupbox_<?php echo $player_id; ?>").style.display = "block";
                }
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').show();
            }
            jQuery('#popuplink<?php echo $player_id; ?>').on('click',function(){
                if ( document.getElementById("show_popupbox_<?php echo $player_id; ?>") ){
                    document.getElementById("show_popupbox_<?php echo $player_id; ?>").style.display = "none";
                }
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                show_popup<?php echo $player_id; ?> = true;
                on_ps<?php echo $player_id; ?> = false;
                jQuery('#show_allbtn<?php echo $player_id; ?>').show();
                var api = flowplayer(jQuery('.player<?php echo $player_id; ?>'));
                api.play();
                isplaying<?php echo $player_id; ?> = true;
            });
            function optinShowIt_<?php echo $player_id; ?>()
            {
                jQuery('#show_allbtn<?php echo $player_id; ?>').hide();
                jQuery('#show_allbtnleft<?php echo $player_id; ?>').hide();
                jQuery('#show_iframe<?php echo $player_id; ?>').hide();
                jQuery('#show_htmlcode<?php echo $player_id; ?>').hide();
                jQuery('#show_maploc<?php echo $player_id; ?>').hide();
                jQuery('#wrapper-<?php echo $player_id; ?>').children('.show_post').hide();
                jQuery('#wrapper-<?php echo $player_id; ?>').children('.show_page').hide();
                if ( document.getElementById("show_optinbox_<?php echo $player_id; ?>") ){
                    document.getElementById("show_optinbox_<?php echo $player_id; ?>").style.display = "flex";
                }
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').show();
            }
            function optinHideIt_<?php echo $player_id; ?>()
            {
                if ( document.getElementById("show_optinbox_<?php echo $player_id; ?>") ){
                    document.getElementById("show_optinbox_<?php echo $player_id; ?>").style.display = "none";
                }
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                show_optin<?php echo $player_id; ?> = true;
                on_ps<?php echo $player_id; ?> = false;
                jQuery('#show_allbtn<?php echo $player_id; ?>').show();
                var api = flowplayer(jQuery('.player<?php echo $player_id; ?>'));
                api.play();
                isplaying<?php echo $player_id; ?> = true;
            }
            function socialHideIt_<?php echo $player_id; ?>()
            {
                if ( document.getElementById("social_button<?php echo $player_id; ?>") ){
                    document.getElementById("social_button<?php echo $player_id; ?>").style.display = "none";
                }
                jQuery.cookie('mvplayer_social_lockdown_shared<?php echo $player_id; ?>', '1', { expires: 30, path: '/' });
                oncuepoint_<?php echo $player_id; ?> = true;
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                social_lock<?php echo $player_id; ?> = true;
                on_ps<?php echo $player_id; ?> = false;
                jQuery('#show_allbtn<?php echo $player_id; ?>').show();
                jQuery('#ico_img<?php echo $player_id; ?>').hide();
                var api = flowplayer(jQuery('.player<?php echo $player_id; ?>'));

                if ( document.getElementById("cta_section<?php echo $player_id; ?>") && document.getElementById("cta_section<?php echo $player_id; ?>").style.display == "flex" ){
                    api.pause();
                    isplaying<?php echo $player_id; ?> = false;
                }else{
                    api.play();
                    isplaying<?php echo $player_id; ?> = true;
                }
            }
            function ctaHideIt_<?php echo $player_id; ?>()
            {
                if ( document.getElementById("cta_section<?php echo $player_id; ?>") ){
                    document.getElementById("cta_section<?php echo $player_id; ?>").style.display = "none";
                }
                jQuery.cookie('mvplayer_cta_lockdown_shared<?php echo $player_id; ?>', '1', { expires: 30, path: '/' });
                oncuepointcta_<?php echo $player_id; ?> = true;
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                cta_lock<?php echo $player_id; ?> = true;
                on_ps<?php echo $player_id; ?> = false;
                jQuery('#show_allbtn<?php echo $player_id; ?>').show();
                jQuery('#ico_img<?php echo $player_id; ?>').hide();
                var api = flowplayer(jQuery('.player<?php echo $player_id; ?>'));
                if ( document.getElementById("social_button<?php echo $player_id; ?>") && document.getElementById("social_button<?php echo $player_id; ?>").style.display == "flex" ){
                    api.pause();
                    isplaying<?php echo $player_id; ?> = false;
                }else{
                    api.play();
                    isplaying<?php echo $player_id; ?> = true;
                }
                // api.play();
                // isplaying<?php echo $player_id; ?> = true;
            }
            function redirectAndCtaHideIt_<?php echo $player_id; ?>()
            {
                if(jQuery(".cta-redirect-<?php echo $player_id; ?>").data('redirect_link') != undefined){
                    window.open(
                        jQuery(".cta-redirect-<?php echo $player_id; ?>").data("redirect_link"),
                        '_blank' // <- This is what makes it open in a new window.
                    );
                }
                if ( document.getElementById("cta_section<?php echo $player_id; ?>") ){
                    document.getElementById("cta_section<?php echo $player_id; ?>").style.display = "none";
                }
                jQuery.cookie('mvplayer_cta_lockdown_shared<?php echo $player_id; ?>', '1', { expires: 30, path: '/' });
                oncuepointcta_<?php echo $player_id; ?> = true;
                jQuery('#wrapper-<?php echo $player_id; ?> .mv_player_video_overlap').hide();
                cta_lock<?php echo $player_id; ?> = true;
                on_ps<?php echo $player_id; ?> = false;
                jQuery('#show_allbtn<?php echo $player_id; ?>').show();
                jQuery('#ico_img<?php echo $player_id; ?>').hide();
                var api = flowplayer(jQuery('.player<?php echo $player_id; ?>'));
                if ( document.getElementById("social_button<?php echo $player_id; ?>") ){
                    if (document.getElementById("social_button<?php echo $player_id; ?>").style.display == "flex") {
                        api.pause();
                        isplaying<?php echo $player_id; ?> = false;
                    }
                }else{
                    api.play();
                    isplaying<?php echo $player_id; ?> = true;
                }
                // api.play();
                // isplaying<?php echo $player_id; ?> = true;
            }
        </script>
        <?php
if ($videocontrols == 'hide') {
            echo "<style>.player{$player_id} .fp-ui .fp-controls,.player{$player_id} .fp-ui .fp-time{ display: none;}</style>";
        }
        echo "</div></div><div id='mvplayer_video_content" . $player_id . "' style='display:none;margin-top:30px;'>" . $videocontent . "</div></div>";
        $return .= ob_get_clean();
        return $return;
    }
}
add_shortcode('MVP', 'mvplayer');