Your IP : 216.73.216.95


Current Path : /var/www/ljmtc/cbt/admin/tool/policy/amd/build/
Upload File :
Current File : /var/www/ljmtc/cbt/admin/tool/policy/amd/build/jquery-eu-cookie-law-popup.min.js

define ("tool_policy/jquery-eu-cookie-law-popup",["jquery"],function(a){if(!window.console)window.console={};if(!window.console.log)window.console.log=function(){};a.fn.euCookieLawPopup=function(){var b=this;b.params={cookiePolicyUrl:"/?cookie-policy",popupPosition:"top",colorStyle:"default",compactStyle:!1,popupTitle:"This website is using cookies",popupText:"We use cookies to ensure that we give you the best experience on our website. If you continue without changing your settings, we'll assume that you are happy to receive all cookies on this website.",buttonContinueTitle:"Continue",buttonLearnmoreTitle:"Learn&nbsp;more",buttonLearnmoreOpenInNewWindow:!0,agreementExpiresInDays:30,autoAcceptCookiePolicy:!1,htmlMarkup:null};b.vars={INITIALISED:!1,HTML_MARKUP:null,COOKIE_NAME:"EU_COOKIE_LAW_CONSENT"};var c=function(c,d,e){if(c){var f=a(c).attr("class")?a(c).attr("class"):"";if(-1<f.indexOf("eupopup-top")){b.params.popupPosition="top"}else if(-1<f.indexOf("eupopup-fixedtop")){b.params.popupPosition="fixedtop"}else if(-1<f.indexOf("eupopup-bottomright")){b.params.popupPosition="bottomright"}else if(-1<f.indexOf("eupopup-bottomleft")){b.params.popupPosition="bottomleft"}else if(-1<f.indexOf("eupopup-bottom")){b.params.popupPosition="bottom"}else if(-1<f.indexOf("eupopup-block")){b.params.popupPosition="block"}if(-1<f.indexOf("eupopup-color-default")){b.params.colorStyle="default"}else if(-1<f.indexOf("eupopup-color-inverse")){b.params.colorStyle="inverse"}if(-1<f.indexOf("eupopup-style-compact")){b.params.compactStyle=!0}}if(d){b.params.htmlMarkup=d}if(e){if("undefined"!=typeof e.cookiePolicyUrl){b.params.cookiePolicyUrl=e.cookiePolicyUrl}if("undefined"!=typeof e.popupPosition){b.params.popupPosition=e.popupPosition}if("undefined"!=typeof e.colorStyle){b.params.colorStyle=e.colorStyle}if("undefined"!=typeof e.popupTitle){b.params.popupTitle=e.popupTitle}if("undefined"!=typeof e.popupText){b.params.popupText=e.popupText}if("undefined"!=typeof e.buttonContinueTitle){b.params.buttonContinueTitle=e.buttonContinueTitle}if("undefined"!=typeof e.buttonLearnmoreTitle){b.params.buttonLearnmoreTitle=e.buttonLearnmoreTitle}if("undefined"!=typeof e.buttonLearnmoreOpenInNewWindow){b.params.buttonLearnmoreOpenInNewWindow=e.buttonLearnmoreOpenInNewWindow}if("undefined"!=typeof e.agreementExpiresInDays){b.params.agreementExpiresInDays=e.agreementExpiresInDays}if("undefined"!=typeof e.autoAcceptCookiePolicy){b.params.autoAcceptCookiePolicy=e.autoAcceptCookiePolicy}if("undefined"!=typeof e.htmlMarkup){b.params.htmlMarkup=e.htmlMarkup}}},d=function(){if(b.params.htmlMarkup){return b.params.htmlMarkup}var a="<div class=\"eupopup-container eupopup-container-"+b.params.popupPosition+(b.params.compactStyle?" eupopup-style-compact":"")+" eupopup-color-"+b.params.colorStyle+"\"><div class=\"eupopup-head\">"+b.params.popupTitle+"</div><div class=\"eupopup-body\">"+b.params.popupText+"</div><div class=\"eupopup-buttons\"><a href=\"#\" class=\"eupopup-button eupopup-button_1\">"+b.params.buttonContinueTitle+"</a><a href=\""+b.params.cookiePolicyUrl+"\""+(b.params.buttonLearnmoreOpenInNewWindow?" target=_blank ":"")+" class=\"eupopup-button eupopup-button_2\">"+b.params.buttonLearnmoreTitle+"</a><div class=\"clearfix\"></div></div><a href=\"#\" class=\"eupopup-closebutton\">x</a></div>";return a},e=function(c){var e=new Date,d=1e3*(60*(60*(24*b.params.agreementExpiresInDays)));e.setTime(e.getTime()+d);var f="expires="+e.toGMTString();document.cookie=b.vars.COOKIE_NAME+"="+c+"; "+f+";path=/";a(document).trigger("user_cookie_consent_changed",{consent:c})},f=function(){for(var a=!1,d=document.cookie.split(";"),e=0,f;e<d.length;e++){f=d[e].trim();if(-1!==f.indexOf(b.vars.COOKIE_NAME)){a=f.substring(b.vars.COOKIE_NAME.length+1,f.length)}}return a},g=function(){a(".eupopup-container").animate({opacity:0,height:0},200,function(){a(".eupopup-container").hide(0)})};return{init:function init(h){c(a(".eupopup").first(),a(".eupopup-markup").html(),h);if(f()){a(document).trigger("user_cookie_already_accepted",{consent:!0});return}if(b.vars.INITIALISED){return}b.vars.INITIALISED=!0;b.vars.HTML_MARKUP=d();if(0<a(".eupopup-block").length){a(".eupopup-block").append(b.vars.HTML_MARKUP)}else{a("BODY").append(b.vars.HTML_MARKUP)}a(".eupopup-button_1").click(function(){e(!0);g();return!1});a(".eupopup-closebutton").click(function(){e(!0);g();return!1});a(".eupopup-container").show();if(b.params.autoAcceptCookiePolicy){e(!0)}}}}});
//# sourceMappingURL=jquery-eu-cookie-law-popup.min.js.map