/*! * jQuery Cookie Plugin v1.4.1 * https://github.com/carhartl/jquery-cookie * * Copyright 2013 Klaus Hartl * Released under the MIT license */ (function (a) { if (typeof define === "function" && define.amd) { define(["jquery"], a) } else { if (typeof exports === "object") { a(require("jquery")) } else { a(jQuery) } } }(function (f) { var a = /\+/g; function d(i) { return b.raw ? i : encodeURIComponent(i) } function g(i) { return b.raw ? i : decodeURIComponent(i) } function h(i) { return d(b.json ? JSON.stringify(i) : String(i)) } function c(i) { if (i.indexOf('"') === 0) { i = i.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\") } try { i = decodeURIComponent(i.replace(a, " ")); return b.json ? JSON.parse(i) : i } catch (j) { } } function e(j, i) { var k = b.raw ? j : c(j); return f.isFunction(i) ? i(k) : k } var b = f.cookie = function (q, p, v) { if (p !== undefined && !f.isFunction(p)) { v = f.extend({}, b.defaults, v); if (typeof v.expires === "number") { var r = v.expires, u = v.expires = new Date(); u.setTime(+u + r * 86400000) } return (document.cookie = [d(q), "=", h(p), v.expires ? "; expires=" + v.expires.toUTCString() : "", v.path ? "; path=" + v.path : "", v.domain ? "; domain=" + v.domain : "", v.secure ? "; secure" : ""].join("")) } var w = q ? undefined : {}; var s = document.cookie ? document.cookie.split("; ") : []; for (var o = 0, m = s.length; o < m; o++) { var n = s[o].split("="); var j = g(n.shift()); var k = n.join("="); if (q && q === j) { w = e(k, p); break } if (!q && (k = e(k)) !== undefined) { w[j] = k } } return w }; b.defaults = {}; f.removeCookie = function (j, i) { if (f.cookie(j) === undefined) { return false } f.cookie(j, "", f.extend({}, i, {expires: -1})); return !f.cookie(j) } }));(function(e,c,a,g){var d="cookieDisclaimer",f={layout:"bar",position:"top",style:"dark",title:"Cookie Disclaimer",text:"To browse this site you need to accept our cookie policy.",cssPosition:"fixed",onAccepted:"",acceptBtn:{text:"I Accept",cssClass:"cdbtn cookie",cssId:"cookieAcceptBtn",onAfter:""},policyBtn:{active:true,text:"Read More",link:"#",linkTarget:"_blank",cssClass:"cdbtn privacy",cssId:"policyPageBtn",onClick:""},cookie:{name:"cookieDisclaimer",val:"confirmed",path:"/",expire:365}};function b(i,h){this.element=i;this.settings=e.extend(true,f,h);this._defaults=f;this._name=d;this.init()}e.extend(b.prototype,{init:function(){this.cookieHunter();this.cookieKillerButton();if(this.settings.policyBtn.onClick!=""){this.policyOnClick()}},makeBarMarkup:function(){switch(this.settings.layout){case"bar":var h='
';h+='
'+this.settings.text+"
";h+='
';if(this.settings.policyBtn.active!=false){h+=' '+this.settings.policyBtn.text+""}h+=' ";h+="
";h+="
";break;case"modal":var h='
';h+='
';h+='
';h+='
';h+="

"+this.settings.title+"

";h+="

"+this.settings.text+"

";h+="
";h+='
';if(this.settings.policyBtn.active!=false){h+=' '+this.settings.policyBtn.text+""}h+=' ";h+="
";h+="
";h+="
";h+="
";break}if(this.settings.position=="bottom"){e("body").append(h)}else{e("body").prepend(h)}this.cookieListner()},cookieHunter:function(){if(e.cookie(this.settings.cookie.name)!=this.settings.cookie.val){this.makeBarMarkup()}else{if(this.settings.onAccepted!=""){this.settings.onAccepted()}}},cookieListner:function(){var h=this;e(".cdbar-cookie-accept").on("click",function(i){i.preventDefault();e.cookie(h.settings.cookie.name,h.settings.cookie.val,{expires:h.settings.cookie.expire,path:h.settings.cookie.path});e("#jQueryCookieDisclaimer").fadeOut();e("#jQueryCookieDisclaimer").promise().done(function(){h.settings.acceptBtn.onAfter()})})},policyOnClick:function(){var h=this;e("#"+h.settings.policyBtn.cssId).on("click",function(i){i.preventDefault();h.settings.policyBtn.onClick()})},cookiesList:function(j,l){var n=a.cookie.split(";"),m=a.cookie,h="";switch(j){case"array":h=n;break;case"string":h=m;break;case"html":h='";if(l!=g&&l!=""){e(l).html(h);return true}break;default:h=n;break}console.log("cookieList as "+j+" : "+h);return h},cookieKiller:function(){if(e.cookie(this.settings.cookie.name)!=g){e.removeCookie(this.settings.cookie.name,{path:this.settings.cookie.path});this.cookieHunter()}else{alert("Sorry, but there are no cookie named "+this.settings.cookie.name)}},cookieKillerButton:function(){var h=this;e(".cdbar-cookie-kill").on("click",function(i){i.preventDefault();h.cookieKiller()})}});e.fn[d]=function(h){return this.each(function(){if(!e.data(this,"plugin_"+d)){e.data(this,"plugin_"+d,new b(this,h))}})}})(jQuery,window,document);$(document).ready(function() { $('body').cookieDisclaimer({ // top,middle,bottom position: "bottom", // dark,light style: "dark", // "bar" and "modal" text text: "

Tento web používá k poskytování služeb, personalizaci reklam a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tím souhlasíte.

", // accept button options acceptBtn: { text: "Souhlasím" // accept btn text }, // policy button options policyBtn: { active: false }, // jQuery cookie plugin options cookie: { name: "cookieDisclaimer", val: "confirmed", path: "/", expire: 365 } }); });