(function ($) {
    $.fn.showCookieInfo = function (txtColor, bgColor) {

        txtColor = typeof txtColor !== 'undefined' ? txtColor : '#000';
        bgColor = typeof bgColor !== 'undefined' ? bgColor : '#ddd';

        var cookieInfoBoxContent = "<style> #cookieInfoBox { box-sizing: border-box; opacity: 0.85; background:" + bgColor + "; filter: alpha(opacity=85); cursor: pointer; font-family: Arial; display: block; padding: 15px 35px 10px 20px; margin: 0; bottom: 0; left: 0; text-align: center; font-weight: normal; z-index: 9999; font-size: 12px; line-height: 18px; min-height: 50px; position: fixed; color:" + txtColor + "; border-top: 1px solid #aaa; width: 100%; } #cookieInfoBox:hover { opacity: 1; filter: alpha(opacity=1); } #cookieClose { position: absolute; right: 10px; top: 10px; line-height: 10px; font-size: 16px; color: " + txtColor + "; } </style> <div id='cookieInfoBox' style=''>Our websites use cookies to provide services on the highest level, adjusted to your needs and preferences.<br />Please find more information in our Privacy Policy. <div id='cookieClose'>✕</div></div>",
            cookieShowed;

        $(document).ready(function () {
            cookieShowed = $.cookie('cookieInfoBoxShowed');
            if (cookieShowed == null) { 
                $('body').prepend(cookieInfoBoxContent);
                $('#cookieInfoBox').click(function () {
                    $(this).css("display", "none");
                });
                $.cookie('cookieInfoBoxShowed', 'true', { expires: 365, path: '/' });
            }
        });
    }
})(jQuery);