// Simple cookie notification (function(e,t,n,r){function o(t){this.options=e.extend({},s,t);if(!n.cookie.indexOf(this.options.cookieName)){return false}this._defaults=s;this._name=i;this.create()}var i="cookieInfo",s={defaultText:"We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies.",okButton:"Ok",displayMore:true,moreButton:"More Info",moreInfo:"Cookies are small text files held on your computer. Some cookies are required to ensure that the site functions correctly, for this reason we may have already set some cookies. They also allow us to give you the best browsing experience possible and help us understand how you use our site.",moreURL:"",location:"bottom",makeSpace:false,spaceMargin:"34px",speedIn:500,speedOut:400,delay:1e3,"float":true,style:"dark",cookieExpiry:90,cookieName:"CookieInfo",ok:function(){}};o.prototype.create=function(){if(this.options.displayMore&&this.options.moreURL==""){var t='';var n=''+this.options.moreButton+""}else if(this.options.moreURL){var t="";var n=""}else{var t="";var n=""}var r='';if(!this.options.float&&this.options.location=="top"){var i="absolute"}else{var i="fixed"}if(this.options.makeSpace&&this.options.location=="top"){e("body").css("margin-top",this.options.spaceMargin)}else if(this.options.makeSpace){e("body").css("margin-bottom",this.options.spaceMargin)}e("body").append('");this.action()};o.prototype.action=function(){function r(e){var t=new RegExp(e+"=([^;]+)");var r=t.exec(n.cookie);return r!=null?unescape(r[1]):null}var t=this.options;e("#cookie-law-button-ok").click(function(r){r.preventDefault();n.cookie=t.cookieName+"=accepted;path=/;max-age="+60*60*24*t.cookieExpiry;e("#jquery-cookie-law-script").slideUp(t.speedOut);t.ok.call(t)});if(!t.moreURL){e("#cookie-law-button-more").click(function(n){n.preventDefault();e("#jquery-cookie-law-script #cookie-law-more-info").slideToggle(t.speedIn)})}e("#cookie-law-more-text-close").click(function(n){n.preventDefault();e("#jquery-cookie-law-script #cookie-law-more-info").slideUp(t.speedOut)});if(r(t.cookieName)!="accepted"){e("#jquery-cookie-law-script").delay(t.delay).slideDown(t.speedIn)}};e.fn[i]=function(e){new o(e)}})(jQuery,window,document) $(document).ready(function() { /* Prefer to use the default settings? Simply add this code only: jQuery(document).cookieInfo(); */ // The CookieInfo configuration jQuery(document).cookieInfo({ defaultText: "We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies.", okButton: "Accept", // Accept button text moreButton: "Tell me more", // More button text moreInfo: "Cookies are small text files held on your computer. Some cookies are required to ensure that the site functions correctly, for this reason we may have already set some cookies. They also allow us to give you the best browsing experience possible and help us understand how you use our site. Most websites you visit will use cookies so please dont be concerned. Due to EU law all websites within the UK are required to tell you this information. When you are ready to accept please click the Accept button.", moreURL: "", // when user click more info, take to this page... location: "bottom", // top or bottom? makeSpace: true, // push content so cookie info bar does not appear over anything? speedIn: 300, // slide in speed speedOut: 300, // slide out speed delay: 1000, // time to appear after page load float: true, // keep it sticky? style: "dark", // light or dark colour cookieExpiry: 365, // won't appear again for 90 days cookieName: "ScorchDigitalCookie", // cookie's name to detect if user has accepted ok: function(){ /* add some javascript here to run when user has clicked ok */ } }); });