//This module creates a popup alert for notifying the user of cookies
// https://www.jqueryscript.net/other/GDPR-Cookie-Consent-Popup-Plugin.html

//<script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.2.0/js.cookie.min.js"></script>

// Insert cookie script
var code = "src='https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.2.0/js.cookie.min.js'";
var script = document.createElement("script");
script.setAttribute("type", "text/javascript");
script.appendChild(document.createTextNode(code));
document.body.appendChild(script);



// Create the HTML code
$('body').append('<div class="alert alert-dismissible text-center cookiealert" role="alert">' +
    '<div class="cookiealert-container">' +
    '<b>Do you like cookies?</b> &#x1F36A; We use cookies to ensure you get the best experience on our website. <a href="http://cookiesandyou.com/" target="_blank">Learn more</a>' +
    '' +
    '<button type="button" class="btn btn-primary btn-sm acceptcookies" aria-label="Close">' +
        'I agree' +
    '</button>' +
  '</div>' +
'</div>'
);
