/*! * ihavecookies - jQuery plugin for displaying cookie/privacy message * v0.3.2 * * Copyright (c) 2018 Ketan Mistry (https://iamketan.com.au) * Licensed under the MIT license: * http://www.opensource.org/licenses/mit-license.php * */ !function(p){p.fn.ihavecookies=function(e,o){var i=p(this),t=p.extend({cookieTypes:[{type:"Site Preferences",value:"preferences",description:"These are cookies that are related to your site preferences, e.g. remembering your username, site colours, etc."},{type:"Analytics",value:"analytics",description:"Cookies related to site visits, browser types, etc."},{type:"Marketing",value:"marketing",description:"Cookies related to marketing, e.g. newsletters, social media, etc"}],title:"Cookies & Privacy",message:"Cookies enable you to use shopping carts and to personalize your experience on our sites, tell us which parts of our websites people have visited, help us measure the effectiveness of ads and web searches, and give us insights into user behavior so we can improve our communications and products.",link:"/privacy-policy",delay:2e3,expires:30,moreInfoLabel:"More information",acceptBtnLabel:"Accept Cookies",advancedBtnLabel:"Customise Cookies",cookieTypesTitle:"Select cookies to accept",fixedCookieTypeLabel:"Necessary",fixedCookieTypeDesc:"These are cookies that are essential for the website to work correctly.",onAccept:function(){},uncheckBoxes:!1},e),n=u("cookieControl"),c=u("cookieControlPrefs");if(n&&c&&"reinit"!=o){var r=!0;"false"==n&&(r=!1),d(r,t.expires)}else{p("#gdpr-cookie-message").remove();var a='
  • ";preferences=JSON.parse(c),p.each(t.cookieTypes,function(e,o){if(""!==o.type&&""!==o.value){var i="";!1!==o.description&&(i=' title="'+o.description+'"'),a+='
  • "}});var s='";setTimeout(function(){p(i).append(s),p("#gdpr-cookie-message").hide().fadeIn("slow",function(){"reinit"==o&&(p("#gdpr-cookie-advanced").trigger("click"),p.each(preferences,function(e,o){p("input#gdpr-cookietype-"+o).prop("checked",!0)}))})},t.delay),p("body").on("click","#gdpr-cookie-accept",function(){d(!0,t.expires),p('input[name="gdpr[]"][data-auto="on"]').prop("checked",!0);var i=[];p.each(p('input[name="gdpr[]"]').serializeArray(),function(e,o){i.push(o.value)}),l("cookieControlPrefs",encodeURIComponent(JSON.stringify(i)),365),t.onAccept.call(this)}),p("body").on("click","#gdpr-cookie-advanced",function(){p('input[name="gdpr[]"]:not(:disabled)').attr("data-auto","off").prop("checked",!1),p("#gdpr-cookie-types").slideDown("fast",function(){p("#gdpr-cookie-advanced").prop("disabled",!0)})})}!0===t.uncheckBoxes&&p('input[type="checkbox"].ihavecookies').prop("checked",!1)},p.fn.ihavecookies.cookie=function(){var e=u("cookieControlPrefs");return JSON.parse(e)},p.fn.ihavecookies.preference=function(e){var o=u("cookieControl"),i=u("cookieControlPrefs");return i=JSON.parse(i),!1!==o&&(!1!==i&&-1!==i.indexOf(e))};var d=function(e,o){l("cookieControl",e,o),p("#gdpr-cookie-message").fadeOut("fast",function(){p(this).remove()})},l=function(e,o,i){var t=new Date;t.setTime(t.getTime()+24*i*60*60*1e3);var n="expires="+t.toUTCString();return document.cookie=e+"="+o+";"+n+";path=/",u(e)},u=function(e){for(var o=e+"=",i=decodeURIComponent(document.cookie).split(";"),t=0;t