(function(n){n.cookiesDirective=function(u){var f=n.extend({explicitConsent:!0,position:"top",duration:10,limit:0,message:null,cookieScripts:null,privacyPolicyUri:"privacy.html",scriptWrapper:function(){},customDialogSelector:null,fontFamily:"helvetica",fontColor:"#FFFFFF",fontSize:"13px",backgroundColor:"#000000",backgroundOpacity:"80",linkColor:"#CA0000",positionOffset:"0",privacyPolicy:"privacy policy",HintAcceptText:'You must tick the "I accept cookies from this site" box to accept',AcceptText:"I accept cookies from this site"},u),e;t("cookiesDirective")?f.scriptWrapper.call():(f.limit>0?(t("cookiesDisclosureCount")?(e=t("cookiesDisclosureCount"),e++,i("cookiesDisclosureCount",e,1)):i("cookiesDisclosureCount",1,1),f.limit>=t("cookiesDisclosureCount")&&r(f)):r(f),f.explicitConsent||f.scriptWrapper.call())};n.cookiesDirective.loadScript=function(t){var r=n.extend({uri:"",appendTo:"body"},t),u=String(r.appendTo),i=document.createElement("script");i.src=r.uri;i.type="text/javascript";i.onload=i.onreadystatechange=function(){!i.readyState||i.readyState==="loaded"||i.readyState==="complete"};switch(r.appendTo){case"head":n("head").append(i);break;case"body":n("body").append(i);break;default:n("#"+u).append(i)}};var t=function(n){for(var t,r=n+"=",u=document.cookie.split(";"),i=0;i<u.length;i++){for(t=u[i];t.charAt(0)===" ";)t=t.substring(1,t.length);if(t.indexOf(r)===0)return t.substring(r.length,t.length)}return null},i=function(n,t,i){var u="",r;i&&(r=new Date,r.setTime(r.getTime()+i*864e5),u="; expires="+r.toGMTString());document.cookie=n+"="+t+u+"; path=/; samesite=none; secure"},u=function(){var n,i,r,t;return navigator.appName==="Microsoft Internet Explorer"?(i=navigator.userAgent,r=new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})"),r.exec(i)!==null&&(n=parseFloat(RegExp.$1)),n<=8?!0:n===9?document.compatMode==="BackCompat"?(t=document.createElement("meta"),t.content="IE=EmulateIE8",document.getElementsByTagName("head")[0].appendChild(t),!0):!1:!1):!1},r=function(t){var r=t,h,a,f,c,e,s,o;if(r.css="fixed",u()&&(r.position="top",r.css="absolute"),h="",r.cookieScripts){var l=r.cookieScripts.split(","),v=l.length,y="";if(v>1){for(a=0;a<v-1;a++)y+=l[a]+", ";h=" We use "+y.substring(0,y.length-2)+" and "+l[v-1]+" scripts, which all set cookies. "}else h=" We use a "+l[0]+" script which sets cookies."}r.customDialogSelector?(c=n("#cookie-dialog"),e=c.find("#cookiesdirective"),r.explicitConsent?(e.find("#epdnotick").length===0&&(e.append('<div id="epdnotick" style="display: none;">You must tick the "I accept cookies from this site" box to accept<\/div>'),console.warn('cookiesDirective: Element with ID "epdnotick" does not exist in custom dialog, so automatically added')),e.find("input#epdagree").length===0&&(e.append('<input type="checkbox" id="epdagree" />'),console.warn('cookiesDirective: Checkbox with ID "epdagree" does not exist in custom dialog, so automatically added')),e.find("input#explicitsubmit").length===0&&(e.append('<input type="submit" id="explicitsubmit" value="Continue" />'),console.warn('cookiesDirective: Submit button with ID "explicitsubmit" does not exist in custom dialog, so automatically added'))):e.find("input#impliedsubmit").length===0&&(e.append('<input type="submit" id="impliedsubmit" value="Do not show this message again" />'),console.warn('cookiesDirective: Submit button with ID "impliedsubmit" does not exist in custom dialog, so automatically added')),c.find("#epdnotick").css("display","none"),c.css("display")!=="none"&&console.error('cookiesDirective: Custom dialog element should have CSS style display: "none".'),e.css(r.position,"-300px"),e.css({position:r.css,left:"0px",width:"100%",height:"auto","text-align":"center","z-index":"1000"}),c.show()):(n("#cookiesdirective").remove(),f="",f+='<div id="epd">',f+='<div id="cookiesdirective" style="position:'+r.css+";"+r.position+":-300px;left:0px;width:100%;",f+="height:auto;background:"+r.backgroundColor+";opacity:."+r.backgroundOpacity+";",f+="-ms-filter: “alpha(opacity="+r.backgroundOpacity+")”; filter: alpha(opacity="+r.backgroundOpacity+");",f+="-khtml-opacity: ."+r.backgroundOpacity+"; -moz-opacity: ."+r.backgroundOpacity+";",f+="color:"+r.fontColor+";font-family:"+r.fontFamily+";font-size:"+r.fontSize+";",f+='text-align:center;z-index:1000;">',f+='<div style="position:relative;height:auto;width:90%;padding:10px;margin-left:auto;margin-right:auto;">',r.message||(r.explicitConsent?(r.message="This site uses cookies. Some of the cookies we ",r.message+="use are essential for parts of the site to operate and have already been set."):r.message="We have placed cookies on your computer to help make this website better."),f+=r.message,r.explicitConsent?(f+=h+' <a style="color:'+r.linkColor+";font-weight:bold;",f+="font-family:"+r.fontFamily+";font-size:"+r.fontSize+';" href="'+r.privacyPolicyUri+'">'+r.privacyPolicy+"<\/a>.<br/>",f+='<div id="epdnotick" style="color:#ca0000;display:none;margin:2px;"><span style="background:#cecece;padding:2px;">'+r.HintAcceptText+"<\/span><\/div>",f+='<div style="margin-top:5px;">'+r.AcceptText+' <input type="checkbox" name="epdagree" id="epdagree" />&nbsp;',f+='<input type="submit" name="explicitsubmit" id="explicitsubmit" value="Continue"/><br/><\/div><\/div>'):(f+=h+' More details can be found in our <a style="color:'+r.linkColor+";",f+="font-weight:bold;font-family:"+r.fontFamily+";font-size:"+r.fontSize+';" href="'+r.privacyPolicyUri+'">privacy policy<\/a>.',f+='<div style="margin-top:5px;"><input type="submit" name="impliedsubmit" id="impliedsubmit" value="Do not show this message again"/><\/div><\/div>'),f+="<\/div><\/div><\/div>",n("body").append(f));s=r.position.toLowerCase();s!=="top"&&s!=="bottom"&&(s="top");o={"in":null,out:null};s==="top"?(o.in={top:r.positionOffset},o.out={top:"-300"}):(o.in={bottom:r.positionOffset},o.out={bottom:"-300"});n("#cookiesdirective").animate(o.in,1e3,function(){r.explicitConsent?n("#explicitsubmit").click(function(){n("#epdagree").is(":checked")?(i("cookiesDirective",1,365),n("#cookiesdirective").animate(o.out,1e3,function(){n("#cookiesdirective").remove();location.reload(!0)})):n("#epdnotick").css("display","")}):n("#impliedsubmit").click(function(){i("cookiesDirective",1,365);n("#cookiesdirective").animate(o.out,1e3,function(){n("#cookiesdirective").remove()})});r.duration>0&&setTimeout(function(){n("#cookiesdirective").animate({opacity:"0"},2e3,function(){n("#cookiesdirective").css(s,"-300px")})},r.duration*1e3)})}})(jQuery)