');
} else {
jQuery('body').prepend('');
}
//add appropriate CSS depending on position chosen
if (cookieDiscreetPosition == "topleft") {
jQuery('div.cc-cookies').css("top", "0");
jQuery('div.cc-cookies').css("left", "0");
}
if (cookieDiscreetPosition == "topright") {
jQuery('div.cc-cookies').css("top", "0");
jQuery('div.cc-cookies').css("right", "0");
}
if (cookieDiscreetPosition == "bottomleft") {
jQuery('div.cc-cookies').css("bottom", "0");
jQuery('div.cc-cookies').css("left", "0");
}
if (cookieDiscreetPosition == "bottomright") {
jQuery('div.cc-cookies').css("bottom", "0");
jQuery('div.cc-cookies').css("right", "0");
}
} else if (cookieResetButton) {
if (appOrPre) {
jQuery('body').append('');
} else {
jQuery('body').prepend('');
}
} else {
var cookieResetButton = "";
}
} else {
// add message to just after opening body tag
if ((cookieNoMessage) && (!cookiePolicyPage)) {
// show no link on any pages APART from the policy page
} else if ((cookieDiscreetLink) && (!cookiePolicyPage)) { // show discreet link
if (appOrPre) {
jQuery('body').append('');
} else {
jQuery('body').prepend('');
}
//add appropriate CSS depending on position chosen
if (cookieDiscreetPosition == "topleft") {
jQuery('div.cc-cookies').css("top", "0");
jQuery('div.cc-cookies').css("left", "0");
}
if (cookieDiscreetPosition == "topright") {
jQuery('div.cc-cookies').css("top", "0");
jQuery('div.cc-cookies').css("right", "0");
}
if (cookieDiscreetPosition == "bottomleft") {
jQuery('div.cc-cookies').css("bottom", "0");
jQuery('div.cc-cookies').css("left", "0");
}
if (cookieDiscreetPosition == "bottomright") {
jQuery('div.cc-cookies').css("bottom", "0");
jQuery('div.cc-cookies').css("right", "0");
}
} else if (cookieAnalytics) { // show analytics overlay
if (appOrPre) {
jQuery('body').append('');
} else {
jQuery('body').prepend('');
}
}
if (cookiePolicyPage) { // show policy page overlay
if (appOrPre) {
jQuery('body').append('');
} else {
jQuery('body').prepend('');
}
} else if ((!cookieAnalytics) && (!cookieDiscreetLink)) { // show privacy policy option
if (appOrPre) {
jQuery('body').append('' + cookieMessage + cookieAccept + cookieDecline + '');
} else {
jQuery('body').prepend('' + cookieMessage + cookieAccept + cookieDecline + '');
}
}
}
if ((cookieCutter) && (!cookieCutterDeclineOnly) && ((jQuerycookieDeclined) || (!jQuerycookieAccepted))) {
jQuery(cookieDisable).html('');
}
if ((cookieCutter) && (cookieCutterDeclineOnly) && (jQuerycookieDeclined)) {
jQuery(cookieDisable).html('');
}
// if bottom is true, switch div to bottom if not in discreet mode
if ((cookieNotificationLocationBottom) && (!cookieDiscreetLink)) {
jQuery('div.cc-cookies').css("top", "auto");
jQuery('div.cc-cookies').css("bottom", "0");
}
if ((cookieNotificationLocationBottom) && (cookieDiscreetLink) && (cookiePolicyPage)) {
jQuery('div.cc-cookies').css("top", "auto");
jQuery('div.cc-cookies').css("bottom", "0");
}
// setting the cookies
// for top bar
jQuery('.cc-cookie-accept, .cc-cookie-decline').click(function (e) {
e.preventDefault();
if (jQuery(this).is('[hrefjQuery=#decline]')) {
jQuery.cookie("cc_cookie_accept", null, {
path: '/'
});
jQuery.cookie("cc_cookie_decline", "cc_cookie_decline", {
expires: cookieExpires,
path: '/'
});
if (options.cookieDomain) {
// kill google analytics cookies
jQuery.cookie("__utma", null, {
domain: '.' + options.cookieDomain,
path: '/'
});
jQuery.cookie("__utmb", null, {
domain: '.' + options.cookieDomain,
path: '/'
});
jQuery.cookie("__utmc", null, {
domain: '.' + options.cookieDomain,
path: '/'
});
jQuery.cookie("__utmz", null, {
domain: '.' + options.cookieDomain,
path: '/'
});
}
} else {
jQuery.cookie("cc_cookie_decline", null, {
path: '/'
});
jQuery.cookie("cc_cookie_accept", "cc_cookie_accept", {
expires: cookieExpires,
path: '/'
});
}
jQuery(".cc-cookies").fadeOut(function () {
// reload page to activate cookies
location.reload();
});
});
//reset cookies
jQuery('a.cc-cookie-reset').click(function (f) {
f.preventDefault();
jQuery.cookie("cc_cookie_accept", null, {
path: '/'
});
jQuery.cookie("cc_cookie_decline", null, {
path: '/'
});
jQuery(".cc-cookies").fadeOut(function () {
// reload page to activate cookies
location.reload();
});
});
//cookie error accept
jQuery('.cc-cookies-error a.cc-cookie-accept').click(function (g) {
g.preventDefault();
jQuery.cookie("cc_cookie_accept", "cc_cookie_accept", {
expires: cookieExpires,
path: '/'
});
jQuery.cookie("cc_cookie_decline", null, {
path: '/'
});
// reload page to activate cookies
location.reload();
});
// accept on scroll
if( cookieAcceptOnScroll ) {
jQuery(window).scroll(function () {
if( jQuery(window).scrollTop() > cookieAcceptOnScrollDistance )
jQuery('.cc-cookie-accept').click();
});
}
};
})(jQuery);
jQuery.noConflict();
jQuery(document).ready(function () {
// activate cookie cutter
jQuery.cookieCuttr({
cookieDeclineButton: false,
cookieAcceptButton: true,
cookieAcceptOnScroll: true,
cookieResetButton: false,
cookieOverlayEnabled: false,
cookieNotificationLocationBottom: false,
cookieWhatAreTheyLink: "https://www.greenme.it/privacy-policy",
cookieAnalyticsMessage: "GreenMe utilizza i cookie per analizzare il traffico, personalizzare annunci e contenuti, anche per i social media. I dati vengono condivisi con i nostri partner, i quali potrebbero combinarle con altre informazioni che hai fornito loro o che hanno raccolto in base al tuo utilizzo dei loro servizi.",
cookieMessage: "GreenMe utilizza i cookie per analizzare il traffico, personalizzare annunci e contenuti, anche per i social media. I dati vengono condivisi con i nostri partner, i quali potrebbero combinarle con altre informazioni che hai fornito loro o che hanno raccolto in base al tuo utilizzo dei loro servizi.",
cookieErrorMessage: "non sono riuscito a caricare la policy cookie",
cookieAcceptButtonText: "ok",
cookieAcceptOnScrollDistance: 200,
cookieDeclineButtonText: "Decline Cookies",
cookieResetButtonText: "Reset Cookies",
cookieWhatAreLinkText: "ulteriori informazioni",
cookieDomain: "",
cookieExpires: 365 });
});
Aggiungi commento