(()=>{
var setCookie = function(name,value,days) {
    var expires = "";
    if (days) {
        var date = new Date();
        date.setTime(date.getTime() + (days*24*60*60*1000));
        expires = "; expires=" + date.toUTCString();
    }
    document.cookie = name + "=" + (value || "")  + expires + "; path=/";
}
var getCookie = function(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
}

if (!getCookie('tempRaife')) return;

var divchik = [
    `<style>`,
        `.popupNotifier {`,
            `position: fixed;`,
            `background-color: #2B2D33;`,
            `padding: 20px;`,
            `margin: 32px;`,
            `color: #fff;`,
            `border-radius: 8px;`,
            `bottom: 0;`,
            `right: 0;`,
            `display: flex;`,
            `z-index: 1000;`,
            `font-family: "FuturaPT-Book", sans-serif;`,
        `}`,
        `.popupNotifier .info {`,
            `background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='16px' height='16px' viewBox='0 0 16 16' version='1.1'%3E%3C!-- Generator: Sketch 55.2 (78181) - https://sketchapp.com --%3E%3Ctitle%3E16/Information-black-rgb%3C/title%3E%3Cdesc%3ECreated with Sketch.%3C/desc%3E%3Cg id='16/Information-black-rgb' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cpath d='M8,0 C10.1217319,0 12.1565632,0.842854723 13.6568542,2.34314575 C15.1571453,3.84343678 16,5.87826808 16,8 C16,12.418278 12.418278,16 8,16 C3.581722,16 0,12.418278 0,8 C0,3.581722 3.581722,0 8,0 Z M8,14.2 C11.4218823,14.1944941 14.1944941,11.4218823 14.2,8 C14.2,4.57583455 11.4241654,1.8 8,1.8 C4.57583455,1.8 1.8,4.57583455 1.8,8 C1.8,11.4241654 4.57583455,14.2 8,14.2 Z M7,3 L9,3 L9,5 L7,5 L7,3 Z M7,6 L9,6 L9,12 L7,12 L7,6 Z' id='Combined-Shape' fill='%23fff' fill-rule='nonzero'/%3E%3C/g%3E%3C/svg%3E");`,
            `background-repeat: no-repeat;`,
            `width: 20px;`,
            `height: 20px;`,
            `min-width: 20px;`,
            `margin-right: 16px;`,
        `}`,
        `.popupNotifier .close {`,
            `background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='16px' height='16px' viewBox='0 0 16 16' version='1.1'%3E%3C!-- Generator: Sketch 55.2 (78181) - https://sketchapp.com --%3E%3Ctitle%3E16/Close-black-rgb%3C/title%3E%3Cdesc%3ECreated with Sketch.%3C/desc%3E%3Cg id='16/Close-black-rgb' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cpolygon id='Path' fill='%23fff' fill-rule='nonzero' points='15.71 1.71 14.29 0.29 8 6.59 1.71 0.29 0.29 1.71 6.59 8 0.29 14.29 1.71 15.71 8 9.41 14.29 15.71 15.71 14.29 9.41 8'/%3E%3C/g%3E%3C/svg%3E");`,
            `background-repeat: no-repeat;`,
            `width: 20px;`,
            `height: 20px;`,
            `min-width: 20px;`,
            `margin-left: 16px;`,
        `}`,
        `.popupNotifier .close:hover {`,
            `cursor: pointer;`,
        `}`,
        `@media screen and (max-width: 360px) {`,
            `.popupNotifier {`,
                `padding: 12px;`,
                `margin: 20px;`,
            `}`,
        `}`,
    `</style>`,
    `<div class="popupNotifier">`,
        `<div class="info"></div>`,
        `Внимание! В&nbsp;связи с&nbsp;длительными новогодними праздниками отделения будут&nbsp;работать&nbsp;06.01.2020, а&nbsp;затем&nbsp;с&nbsp;09.01.2020`,
        `<div class="close"></div>`,
    `</div>`,
].join('');

$('body').append(divchik);

$('.popupNotifier .close').click((el)=>{
    el.currentTarget.parentNode.style.display = 'none';
    setCookie('popupNotifierClosed', 1, 7);
});
})()