(function( $ ) {
	'use strict';
    
    $(document).ready(function() {

        const buttonsWrapper = $('.olympus-multiple-booking-pages-buttons-wrap').first();
        buttonsWrapper.find('.wp-block-button__link').each(function(){
            const button = $(this);
            $(this).on('click',function(){
                buttonsWrapper.fadeOut(100);
                const bookingPageWrap = $('#olympus-multiple-booking-pages-booking-page-wrap').first();
                bookingPageWrap.html('<div id="podium-integration"></div>');
                bookingPageWrap.append(atob(button.data('script')));
            });

        });

    });

})( jQuery );