// OCDI hover image html 
var DemoBtnContainers = [
    `<div class="ptocdi-btn-container">
        <div class="ptocdi-btn-parent">
            <div class="ptocdi-btn-link"><a href="/wp-admin/themes.php?page=one-click-demo-import&step=import&import=0" class="ptocdi-btn-logo" data-name="buildpress classic"><img src="${BuildPressAdminVars.pathToTheme}/assets/images/site-origin-demo.png" width="160" height="30" alt="PT" class="ptocdi-siteorigin-logo" /></a></div>
            <div class="ptocdi-btn-link ptocdi-btn-related-demo-link"><a href="/wp-admin/themes.php?page=one-click-demo-import&step=import&import=4" class="ptocdi-btn-logo relative" data-name="buildpress classic-elementor"><img src="${BuildPressAdminVars.pathToTheme}/assets/images/elementor-demo.png" width="150" height="30" alt="PT" class="ptocdi-elementor-logo" /></a></div>
        </div>
        <div class="ptocdi-description"> <p> Choose page builder </p> </div>
    </div>`,
    `<div class="ptocdi-btn-container">
        <div class="ptocdi-btn-parent">
            <div class="ptocdi-btn-link"><a href="/wp-admin/themes.php?page=one-click-demo-import&step=import&import=1" class="ptocdi-btn-logo" data-name="buildpress classic"><img src="${BuildPressAdminVars.pathToTheme}/assets/images/site-origin-demo.png" width="160" height="30" alt="PT" class="ptocdi-siteorigin-logo" /></a></div>
		    <div class="ptocdi-btn-link ptocdi-btn-related-demo-link"><a href="/wp-admin/themes.php?page=one-click-demo-import&step=import&import=5" class="ptocdi-btn-logo relative" data-name="buildpress light-elementor"><img src="${BuildPressAdminVars.pathToTheme}/assets/images/elementor-demo.png" width="150" height="30" alt="PT" class="ptocdi-elementor-logo" /></a></div>
        </div>
		<div class="ptocdi-description"> <p> Choose page builder </p> </div>
    </div>`,
    `<div class="ptocdi-btn-container">
        <div class="ptocdi-btn-parent">
            <div class="ptocdi-btn-link"><a href="/wp-admin/themes.php?page=one-click-demo-import&step=import&import=2" class="ptocdi-btn-logo" data-name="buildpress Landscape"><img src="${BuildPressAdminVars.pathToTheme}/assets/images/site-origin-demo.png" width="160" height="30" alt="PT" class="ptocdi-siteorigin-logo" /></a></div>
            <div class="ptocdi-btn-link ptocdi-btn-related-demo-link"><a href="/wp-admin/themes.php?page=one-click-demo-import&step=import&import=6" class="ptocdi-btn-logo relative" data-name="buildpress landscape-elementor"><img src="${BuildPressAdminVars.pathToTheme}/assets/images/elementor-demo.png" width="150" height="30" alt="PT" class="ptocdi-elementor-logo" /></a></div>
        </div>
        <div class="ptocdi-description"> <p> Choose page builder </p> </div>
    </div>`,
    `<div class="ptocdi-btn-container">
        <div class="ptocdi-btn-parent">
            <div class="ptocdi-btn-link"><a href="/wp-admin/themes.php?page=one-click-demo-import&step=import&import=3" class="ptocdi-btn-logo" data-name="buildpress RTL"><img src="${BuildPressAdminVars.pathToTheme}/assets/images/site-origin-demo.png" width="160" height="30" alt="PT" class="ptocdi-siteorigin-logo" /></a></div>
            <div class="ptocdi-btn-link ptocdi-btn-related-demo-link"><a href="/wp-admin/themes.php?page=one-click-demo-import&step=import&import=7" class="ptocdi-btn-logo relative" data-name="buildpress rtl-elementor"><img src="${BuildPressAdminVars.pathToTheme}/assets/images/elementor-demo.png" width="150" height="30" alt="PT" class="ptocdi-elementor-logo" /></a></div>
        </div>
        <div class="ptocdi-description"> <p> Choose page builder </p> </div>
    </div>`,
];

(function () {
    // OCDI remove elementor demos
    jQuery('.ocdi .ocdi__gl-item.js-ocdi-gl-item').each(function () {
        var dataName = jQuery(this).data('name');
        if (dataName && dataName.toLowerCase().indexOf('elementor') !== -1) {
            jQuery(this).remove();
        }
    });

    // OCDI remove default import buttons
    jQuery('.ocdi .ocdi__gl-item-footer .button-primary').each(function () {
        jQuery(this).remove();
    });

    // OCDI add html on hover over demo options
    jQuery('.ocdi .ocdi__gl-item.js-ocdi-gl-item').each(function (index) {
        jQuery(this).find('.ocdi__gl-item-image-container').after(DemoBtnContainers[index]);
    });
})();
