(function ($) {
$.cookieCuttr = function (options) {
var defaults = {
cookieCutter: false, // you'd like to enable the div/section/span etc. hide feature? change this to true
cookieCutterDeclineOnly: false, // you'd like the CookieCutter to only hide when someone has clicked declined set this to true
cookieAnalytics: true, // just using a simple analytics package? change this to true
cookieDeclineButton: false, // this will disable non essential cookies
cookieAcceptButton: true, // this will disable non essential cookies
cookieResetButton: false,
cookieOverlayEnabled: false, // don't want a discreet toolbar? Fine, set this to true
cookiePolicyLink: '/privacy-policy/', // if applicable, enter the link to your privacy policy here...
cookieMessage: 'Uporabljamo piškotke, zato da omogočimo nekatere vtičnike spletne strani in za spremljanje obiska. S sprejetjem piškotkov srinjate z uporabo piškotkov.',
cookieAnalyticsMessage: 'Uporabljamo piškotke, zato da omogočimo nekatere vtičnike spletne strani in za spremljanje obiska. S sprejetjem piškotkov se strinjate z uporabo piškotkov.',
cookieErrorMessage: "We\'re sorry, this feature places cookies in your browser and has been disabled.
To continue using this functionality, please",
cookieWhatAreTheyLink: "http://www.allaboutcookies.org/",
cookieDisable: '',
cookieExpires: 365,
cookieAcceptButtonText: "SPREJMI PIŠKOTKE",
cookieDeclineButtonText: "ZAVRNI PIŠKOTKE",
cookieResetButtonText: "IZBRIŠI PIŠKOTKE ZA TO SPLETNO STRAN",
cookieWhatAreLinkText: "Kaj so piškotki?",
cookieNotificationLocationBottom: true, // top or bottom - they are your only options, so true for bottom, false for top
cookiePolicyPage: false,
cookiePolicyPageMessage: 'Please read the information below and then choose from the following options',
cookieDiscreetLink: false,
cookieDiscreetReset: false,
cookieDiscreetLinkText: "Cookies?",
cookieDiscreetPosition: "bottomleft", //options: topleft, topright, bottomleft, bottomright
cookieNoMessage: false, // change to true hide message from all pages apart from your policy page
cookieDomain: ""
};
var options = $.extend(defaults, options);
var message = defaults.cookieMessage.replace('{{cookiePolicyLink}}', defaults.cookiePolicyLink);
defaults.cookieMessage = 'We use cookies on this website, you can read about them here. To use the website as intended please...';
//convert options
var cookiePolicyLinkIn = options.cookiePolicyLink;
var cookieCutter = options.cookieCutter;
var cookieCutterDeclineOnly = options.cookieCutterDeclineOnly;
var cookieAnalytics = options.cookieAnalytics;
var cookieDeclineButton = options.cookieDeclineButton;
var cookieAcceptButton = options.cookieAcceptButton;
var cookieResetButton = options.cookieResetButton;
var cookieOverlayEnabled = options.cookieOverlayEnabled;
var cookiePolicyLink = options.cookiePolicyLink;
var cookieMessage = message;
var cookieAnalyticsMessage = options.cookieAnalyticsMessage;
var cookieErrorMessage = options.cookieErrorMessage;
var cookieDisable = options.cookieDisable;
var cookieWhatAreTheyLink = options.cookieWhatAreTheyLink;
var cookieExpires = options.cookieExpires;
var cookieAcceptButtonText = options.cookieAcceptButtonText;
var cookieDeclineButtonText = options.cookieDeclineButtonText;
var cookieResetButtonText = options.cookieResetButtonText;
var cookieWhatAreLinkText = options.cookieWhatAreLinkText;
var cookieNotificationLocationBottom = options.cookieNotificationLocationBottom;
var cookiePolicyPage = options.cookiePolicyPage;
var cookiePolicyPageMessage = options.cookiePolicyPageMessage;
var cookieDiscreetLink = options.cookieDiscreetLink;
var cookieDiscreetReset = options.cookieDiscreetReset;
var cookieDiscreetLinkText = options.cookieDiscreetLinkText;
var cookieDiscreetPosition = options.cookieDiscreetPosition;
var cookieNoMessage = options.cookieNoMessage;
// cookie identifier
var $cookieAccepted = $.cookie('cc_cookie_accept') == "cc_cookie_accept";
$.cookieAccepted = function () {
return $cookieAccepted;
};
var $cookieDeclined = $.cookie('cc_cookie_decline') == "cc_cookie_decline";
$.cookieDeclined = function () {
return $cookieDeclined;
};
// write cookie accept button
if (cookieAcceptButton) {
var cookieAccept = ' ' + cookieAcceptButtonText + ' ';
} else {
var cookieAccept = "";
}
// write cookie decline button
if (cookieDeclineButton) {
var cookieDecline = ' ' + cookieDeclineButtonText + ' ';
} else {
var cookieDecline = "";
}
// write extra class for overlay
if (cookieOverlayEnabled) {
var cookieOverlay = 'cc-overlay';
} else {
var cookieOverlay = "";
}
// to prepend or append, that is the question?
if ((cookieNotificationLocationBottom) || (cookieDiscreetPosition == "bottomright") || (cookieDiscreetPosition == "bottomleft")) {
var appOrPre = true;
} else {
var appOrPre = false;
}
if (($cookieAccepted) || ($cookieDeclined)) {
// write cookie reset button
if ((cookieResetButton) && (cookieDiscreetReset)) {
if (appOrPre) {
$('body').append('