This post was originally published on 3rd party site mentioned on the title ofthis site
![image](https://www.fairobserver.com/wp-content/uploads/2024/05/Ghani-twitter-account-1.webp)
.cls-1 {
fill: none;
stroke: #fff;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 2px;
}
jQuery(document).ready(function() {
var site_url = “https://www.fairobserver.com”;
jQuery(‘.search-field’).on(‘input’, function() {
var keyword = jQuery(this).val();
if (keyword.length > 0) {
jQuery(‘.search-suggestions’).show();
jQuery(‘#suggestions-list’).html(
“
“
”
);
} else {
jQuery(‘.search-suggestions’).hide();
}
});
});
Afghanistan News
Ashraf Ghani’s Unscrupulous Bid to Regain Old Power in Afghanistan
<!–
–>
<!– –>
Kumamoto, JAPAN – Aug 26 2021 : Conceptual image 11th of Afghanistan President Mohammad Ashraf Ghani Ahmadzai twitter account on iPhone in dark mood
© Koshiro K / shutterstock.com
<!– –>
![](https://www.fairobserver.com/wp-content/themes/fo2023/assets/images/foicon-v1_print.png)
document.getElementById(‘printButton’).addEventListener(‘click’, function () {
window.print(); // Trigger the browser’s print functionality
});
In February, the Taliban refused to engage in the two-day UN-sponsored conference on Afghanistan in Doha, Qatar, and in discussions on appointing a UN envoy for Afghanistan. In light of this, exiled Afghan President Ashraf Ghani is redoubling his efforts to regain political legitimacy.
After the Taliban retook power in 2021 with a shockingly rapid advance on the capital, Kabul, Ghani fled the country. His sudden departure damaged his reputation and exacerbated the country’s already precarious situation. Afghans regarded the move as self-centered decision-making and callous, given what became of the country after Ghani left.
Since the Taliban takeover, Afghanistan’s economy, as per the World Bank, is fragile and heavily reliant on external support. The economy has shrunk by 25% over the last two years. The Taliban’s restrictive policies on women’s education and work are expected to further hinder Afghanistan’s recovery prospects. Additionally, according to the latest Women, Peace and Security (WPS) Index, Afghanistan ranks as the worst among 177 countries in terms of the status of women. Many Afghans blame Ghani for their misery.
Ghani claims his escape was necessitated by factors outside of his control. It is true that the Taliban’s advance meant Ghani’s safety was at stake. His close circle urged him to flee the country. Despite facing criticism for his actions, Ghani vigorously asserts that he is still Afghanistan’s president.
Ghani is as stubborn a pretender as he was a president
Even as his regime was collapsing, Ghan was high-handed and brooked no compromise. In his mind, the Afghan constitution empowered him to complete his term, so he would complete it. Influential figures like Zalmay Khalilzad, the senior US negotiator with the Taliban, sharply criticized Ghani. In his testimony before the House Foreign iRelations Committee, Khalilzad highlighted a last-minute success in persuading the Taliban to avoid entering Kabul and instead engage in discussions with the government to establish a transitional administration. Both sides agreed, but Ghani’s surprising departure led to the swift collapse of the now leaderless Afghan military and police. Apparently, he would rather claim his rights abroad than lay them down during negotiations in Afghanistan.
Ghani found refuge in Abu Dhabi. From this base, he has continued to leveraged any possible platforms, from diplomatic meetings to podcasts, to push his agenda. Ghani believes that Afghanistan can function as an economic bridge between West, Central, South and East Asia, and for some reason he seems to think that he has a role to play in developing that. In his podcasts, Ghani actively seeks support from both the Taliban and the broader region.
In on podcast episode, at the 18-minute mark, Ghani seamlessly transitions from technical discourse to outlining Afghanistan’s political path. He critiques militant groups opposing the Taliban and acknowledges ethnic diversity challenges within his administration. Ghani advocates for establishing a Loya Jirga (a great council of tribal leaders) to focus on the internal dimension of political legitimacy for the Taliban regime and emphasizes the importance of reforms. He aims for measures that could secure minimum acceptance from the people without necessitating unanimous national approval. Ghani promotes the idea that such minimum acceptance from the Afghan populace may pave the way for legitimizing the Taliban by the international community.
So desperate is Ghani to have a role to play in Afghan politics that he, who once fled the country rather than recognize the Taliban, now appears willing to sell his country out to the militants.
Ghani and allies play the influence game abroad
Meanwhile, former Afghan army officials appointed by Ghani are establishing overseas offices, positioning themselves as representatives of the former Afghan National Defense Forces prepared to confront the Taliban. This initiative explores potential avenues and strategically engages with the new US administration, as President Donald Trump’s hinted by floating the a possible US return to Afghanistan while speaking to a crowd in Fort Dodge, Iowa. If Afghanistan garners the attention of the new US administration, significant opportunities for such maneuvers could emerge as a bargaining chip.
With the potential for regional security cooperation on the rise, Ghani highlights Afghanistan’s regional significance and signals readiness to engage with the recently established Regional Contact Group for cooperation with Kabul. Nonetheless, Iran’s sway over specific Taliban factions presents a challenge to Ghani’s endeavors to initiate dialogue with the group. The region is marked by a lack of trust and duplicity, leading countries to cultivate relationships with all parties both within and outside Afghanistan as bargaining tools to advance their agendas. The regional contact group will encompass all Afghan groups, including Ghani, in the pursuit of inclusive solutions.
The collapse of the government unsettled Afghan elites, leading to their disengagement. However, two years later, these communities are regrouping and actively seeking a leader capable of articulating their concerns. Ghani positions himself as a leader within a specific faction of the Taliban opposition, advocating for reform and actively seeking a role in shaping Afghanistan’s future.
Despite the Taliban’s capture of power in Afghanistan, Ghani still maintains his Twitter profile as President of the Islamic Republic of Afghanistan. All administrative signs, flags, passports and other symbols of authority still belong to the exiled government. Afghan embassies, representatives in other countries and the UN continue to operate and represent the previous government.
Yet this is not the sort of government in exile that dreams of recapturing its homeland from the enemy like Charles de Gaulle did France in World War II. Instead, if Ghani can garner enough attention and support, he may consider playing his last card by joining with the Taliban, a preferable option to fading into obscurity. Such a move could benefit the Taliban by showcasing their tolerance and promoting legitimacy.
Although Ghani faces formidable challenges, the historical transformations in Afghanistan hint at potential advantages for both Ghani and the Taliban should his inclination to cooperate with them come to fruition. While a return to Afghanistan may not align with Ghani’s preferences, it offers a more favorable prospect compared to fading into obscurity in Abu Dhabi. Through astute positioning in negotiations, particularly by considering regional interests, Ghani may move closer to achieving his aspirations.
[Gwyneth Campbell edited this piece.]
The views expressed in this article are the author’s own and do not necessarily reflect Fair Observer’s editorial policy.
Support Fair Observer
We rely on your support for our independence, diversity and quality.
For more than 10 years, Fair Observer has been free, fair and independent. No billionaire
owns us, no advertisers control us. We are a reader-supported nonprofit. Unlike many other
publications, we keep our content free for readers regardless of where they live or whether
they can afford to pay. We have no paywalls and no ads.
In the post-truth era of fake news, echo chambers and filter bubbles, we publish a plurality
of perspectives from around the world. Anyone can publish with us, but everyone goes through
a rigorous editorial process. So, you get fact-checked, well-reasoned content instead of
noise.
We publish 2,500+ voices from 90+ countries. We also conduct education and training programs
on subjects ranging from digital media and journalism to writing and critical thinking. This
doesn’t come cheap. Servers, editors, trainers and web developers cost
money.
Please consider supporting us on a regular basis as a recurring donor or a
sustaining member.
Will you support FO’s journalism?
We rely on your support for our independence, diversity and quality.
Donation Cycle
Donation Amount
The IRS recognizes Fair Observer as a section 501(c)(3) registered public charity
(EIN: 46-4070943), enabling you to claim a tax deduction.
![Support Fair Observer](https://www.fairobserver.com/wp-content/themes/fo2023/assets/images/support-fo.jpg)
$(document).ready(function () {
$(‘#trigger-modal ,#trigger-modal2’).click(function () {
$(‘#modal’).show();
});
$(‘.x’).click(function () {
$(‘#screen, #modal’).hide();
});
var authorname = $(‘.multiauthor’).html();
$(‘#authorname’).html(authorname);
});
Fair Observer, 461 Harbor Blvd, Belmont, CA 94002, USA
$(“#footer-donation-form-popup .cycle-btn”).on(“click”, function(e) {
$(“#footer-donation-form-popup .cycle-btn”).removeClass(“active”);
$(this).addClass(“active”);
var cycle = $(this).data(“value”);
$(“#footer-donation-form-popup #cycle”).val(cycle);
});
$(“#footer-donation-form-popup .amount-btn”).on(“click”, function(e) {
$(“#footer-donation-form-popup .amount-btn”).removeClass(“active”);
$(this).addClass(“active”);
var amount = $(this).data(“value”);
$(“#footer-donation-form-popup #amount”).val(amount);
});
$(“#footer-donation-form-popup .custom_amount”).on(“change”, function(e) {
$(“#footer-donation-form-popup .amount-btn”).removeClass(“active”);
var amount = $(this).val();
$(“#footer-donation-form-popup #amount”).val(amount);
});
jQuery(‘.close-footer-btn’).on(‘click’, function(e) {
e.stopImmediatePropagation();
$(“#fixed-footer”).hide();
// jQuery.cookie(“isFooterDonationBannerShow”, new Date().toUTCString());
// Set the cookie using jQuery.cookie
$.cookie(“isFooterDonationBannerShow”, new Date().toUTCString(), {
path: ‘/’,
domain: ‘www.fairobserver.com’,
secure: true
});
});
// jQuery(‘.other_donation_amount’).on(‘blur’, function(e) {
// var $otherRadio = jQuery(‘#other’);
// var $otherAmountSection = jQuery(‘.other_donation_amount_section’);
// $otherAmountSection.show();
// $otherRadio.prop(‘checked’, true);
// var value = jQuery(this).val();
// jQuery(‘#donation_amount’).html(‘$’ + value);
// $otherRadio.val(value);
// jQuery(‘#amount’).val(value);
// });
async function demo(){
var initial_position = await document.getElementById(‘amp-textarea’).getBoundingClientRectAsync();
let timer = setInterval( async ()=> {
var current_position = await document.getElementById(‘amp-textarea’).getBoundingClientRectAsync();
if ((Math.ceil(initial_position.top) – Math.ceil(current_position.top)) > 1200){
document.getElementById(‘divToHide’).classList.remove(‘d-none’);
document.getElementById(‘closebtn’).addEventListener(‘click’, ()=>{
document.getElementById(‘divToHide’).classList.add(‘d-none’);
});
clearInterval(timer);
}
},2000);
}
demo();
jQuery(document).ready(function() {
jQuery(‘body .comment-reply-link’).click(function() {
var data_commentid = jQuery(this).attr(‘data-commentid’);
jQuery(‘body #comment_parent’).val(data_commentid);
});
});
document.addEventListener(“DOMContentLoaded”, function() {
function share() {
this.classList.toggle(“active”);
document.querySelector(“.social”).classList.toggle(“active”);
}
document.querySelector(“.share”).addEventListener(“click”, share);
});
var recaptchaIds = [];
var cf7srLoadRecaptcha = function() {
var widgets = document.querySelectorAll(‘.cf7sr-g-recaptcha’);
for (var i = 0; i < widgets.length; ++i) {
var widget = widgets[i];
recaptchaIds.push(
grecaptcha.render(widget.id, {
'sitekey' : "6Ld0xW8gAAAAAIdtS9lzpNHhyhi93o75R7nePPnw" })
);
}
};
function cf7srResetRecaptcha() {
for (var i = 0; i < recaptchaIds.length; i++) {
grecaptcha.reset(recaptchaIds[i]);
}
}
document.querySelectorAll('.wpcf7').forEach(function(element) {
element.addEventListener('wpcf7invalid', cf7srResetRecaptcha);
element.addEventListener('wpcf7mailsent', cf7srResetRecaptcha);
element.addEventListener('invalid.wpcf7', cf7srResetRecaptcha);
element.addEventListener('mailsent.wpcf7', cf7srResetRecaptcha);
});
document.body.classList.remove(“no-js”);
(function () {
var c = document.body.className;
c = c.replace(/woocommerce-no-js/, ‘woocommerce-js’);
document.body.className = c;
})();
var cbxwpbookmark = {“ajaxurl”:”https://www.fairobserver.com/wp-admin/admin-ajax.php”,”nonce”:”ef8a57cee9″,”cat_template”:””””,”category_delete_success”:”Category deleted successfully”,”category_delete_error”:”Unable to delete the category”,”are_you_sure_global”:”Are you sure?”,”are_you_sure_delete_desc”:”Once you delete, it’s gone forever. You can not revert it back.”,”areyousuretodeletecat”:”Are you sure you want to delete this Bookmark Category?”,”areyousuretodeletebookmark”:”Are you sure you want to delete this Bookmark?”,”bookmark_failed”:”Failed to Bookmark”,”bookmark_removed”:”Bookmark Removed”,”bookmark_removed_empty”:”All Bookmarks Removed”,”bookmark_removed_failed”:”Bookmark Removed Failed”,”error_msg”:”Error loading data. Response code = “,”category_name_empty”:”Category name can not be empty”,”add_to_head_default”:”Click Category to Bookmark”,”add_to_head_cat_list”:”Click to Edit Category”,”add_to_head_cat_edit”:”Edit Category”,”add_to_head_cat_create”:”Create Category”,”no_cats_found”:”No category found”,”add_to_head_max_cat”:”Maximum category limit reached”,”max_cat_limit”:”0″,”max_cat_limit_error”:”Sorry, you reached the maximum category limit and to create one one, please delete unnecessary categories first”,”user_current_cat_count”:”0″,”user_current_cats”:””,”user_can_create_cat”:”1″,”bookmark_mode”:”no_cat”,”bookmark_not_found”:”No bookmarks found”,”load_more”:”Load More …”,”category_default_status”:”1″,”delete_all_bookmarks_by_user_confirm”:”Are you sure to delete all of your bookmarks? This process can not be undone.”,”awn_options”:{“tip”:”Tip”,”info”:”Info”,”success”:”Success”,”warning”:”Attention”,”alert”:”Error”,”async”:”Loading”,”confirm”:”Confirmation”,”confirmOk”:”OK”,”confirmCancel”:”Cancel”},”shareurl_html”:”
“,”shareurl_trans”:{“copy”:”Copy”,”copied”:”Copied”}};
var wpcf7 = {“api”:{“root”:”https://www.fairobserver.com/wp-json/”,”namespace”:”contact-form-7/v1″},”cached”:”1″};
var themeMyLogin = {“action”:””,”errors”:[]};
var wc_order_attribution = {“params”:{“lifetime”:1.0e-5,”session”:30,”ajaxurl”:”https://www.fairobserver.com/wp-admin/admin-ajax.php”,”prefix”:”wc_order_attribution_”,”allowTracking”:true},”fields”:{“source_type”:”current.typ”,”referrer”:”current_add.rf”,”utm_campaign”:”current.cmp”,”utm_source”:”current.src”,”utm_medium”:”current.mdm”,”utm_content”:”current.cnt”,”utm_id”:”current.id”,”utm_term”:”current.trm”,”session_entry”:”current_add.ep”,”session_start_time”:”current_add.fd”,”session_pages”:”session.pgs”,”session_count”:”udata.vst”,”user_agent”:”udata.uag”}};
var ajax_object = {“ajax_url”:”https://www.fairobserver.com/wp-admin/admin-ajax.php”};
/(trident|msie)/i.test(navigator.userAgent) && document.getElementById && window.addEventListener && window.addEventListener(“hashchange”, (function() {
var t, e = location.hash.substring(1);
/^[A-z0-9_-]+$/.test(e) && (t = document.getElementById(e)) && (/^(?:a|select|input|button|textarea)$/i.test(t.tagName) || (t.tabIndex = -1), t.focus())
}), !1);
.download_product_popup_content,
.popup-block-wrp,
.popup_container,
.popup_loginmodel .dm-fo-login-box {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
text-align: center
}
.popup_loginmodel .dm-fo-login-box {
max-width: 420px !important
}
/* .single-support {
display: none
} */
jQuery(document).ready(function() {
// function display(cookieName, value) {
// var now = new Date();
// var time = now.getTime();
// var expireTime = time + 1000 * 3600000;
// now.setTime(expireTime);
// document.cookie = cookieName + ‘=’ + value + ‘;expires=’ + now.toUTCString() + ‘;path=/’;
// }
jQuery(‘.close-popup-btn-signup’).click(function() {
jQuery(‘#myModalPopUpsignup’).hide();
});
jQuery(‘#myBtn , .sign_up_heaer’).click(function() {
jQuery(‘#myModalPopUpsignup’).show();
});
var path = location.pathname;
var popup_not_allowed_in_paths = [“/fo/donate/”, “/fo/support-fo/”, “/fo/membership-account/membership-levels/”,
“/fo/membership-account/membership-checkout/?level=2”, “/fo/membership-account/membership-checkout/?level=1”,
“/fo/contact/”,”payment-success”
];
var isPopupOnPathAllowed = true;
if (popup_not_allowed_in_paths.includes(path)) {
isPopupOnPathAllowed = false;
}
if (jQuery.cookie(‘whenToShowDialog’) != “yesss” && isPopupOnPathAllowed) {
jQuery(window).scroll(function() {
var available, percentage_of_page, half_screen, height;
available = jQuery(document).height();
percentage_of_page = 0.25;
half_screen = available * percentage_of_page;
height = jQuery(window).scrollTop();
if (height > half_screen) {
if (jQuery.cookie(‘whenToShowDialog’) != “yesss”) {
jQuery(“#myModalPopUp”).css(‘display’, ‘flex’);
jQuery.cookie(“whenToShowDialog”, “yesss”);
}
}
});
} else {
jQuery(‘#myModalPopUp’).hide();
}
var dwnldbtn = jQuery(“#download_product_popup_open”);
dwnldbtn.click(() => {
console.log(‘be’);
jQuery(‘#download_product_popup’).show();
});
jQuery(‘#download_product_popup_open’).click(function() {
console.log(‘hellof’);
jQuery(‘#download_product_popup’).fadeIn();
});
jQuery(‘.download_product_popup_close’).click(function() {
jQuery(‘#download_product_popup’).fadeOut();
});
jQuery(‘.download_product_popup_close’).click(function() {
jQuery(‘#download_product_popup’).fadeOut();
});
var container = jQuery(“#download_product_popup”);
container.click((e) => {
if (e.target.id == ‘download_product_popup’) {
jQuery(‘#download_product_popup’).hide();
}
});
jQuery(‘.close-popup-btn’).click(function() {
// $.cookie(‘whenToShowDialog’, “yesss”);
display(“whenToShowDialog”, “yesss”);
jQuery(‘#myModalPopUp’).hide();
});
jQuery(‘.other_donation_amount’).keyup(function(e) {
var $otherRadio = jQuery(‘#other’);
var $otherAmountSection = jQuery(‘.other_donation_amount_section’);
$otherAmountSection.show();
$otherRadio.prop(‘checked’, true);
var value = jQuery(this).val();
jQuery(‘#donation_amount’).html(‘$’ + value);
$otherRadio.val(value);
jQuery(‘#amount’).val(value);
});
jQuery(‘#other’).change(function() {
if (jQuery(this).is(‘:checked’)) {
jQuery(‘.other_donation_amount_section’).show();
} else {
jQuery(‘.other_donation_amount_section’).hide();
}
});
});
jQuery(document).click(function() {
/* login popup */
jQuery(‘#closebtnlogin’).click(function() {
jQuery(“#loginmodal”).hide();
});
var logincontainer = jQuery(“.dm-fo-login-box”);
if (!logincontainer.is(event.target) && !logincontainer.has(event.target).length) {
jQuery(“#loginmodal”).hide();
}
var loginbtn = jQuery(“.fo-login-link”);
if (!loginbtn.is(event.target) && !loginbtn.has(event.target).length) {
} else {
jQuery(“#loginmodal”).show();
}
/* signupbutton popup */
var signupcontainer = jQuery(“#modal-content-signup”);
if (!signupcontainer.is(event.target) && !signupcontainer.has(event.target).length) {
jQuery(“#myModalPopUpsignup”).hide();
}
var signupcontainerbtn = jQuery(“#myBtn”);
if (!signupcontainerbtn.is(event.target) && !signupcontainerbtn.has(event.target).length) {
} else {
jQuery(“#myModalPopUpsignup”).css(‘display’, ‘flex’);
}
/* signupbutton onscroll popup */
var container = jQuery(“#modal-content-scroll”);
if (!container.is(event.target) && !container.has(event.target).length) {
var displayval = jQuery(‘#myModalPopUp’).css(‘display’);
if (displayval == ‘flex’) {
jQuery(“#myModalPopUp”).hide();
// $.cookie(‘whenToShowDialog’, “yesss”);
display(“whenToShowDialog”, “yesss”);
}
}
jQuery(‘#other’).click(function() {
jQuery(‘.other_donation_amount_section’).show();
});
// jQuery(‘.other_btn’).click(function(){
// jQuery(‘.other_donation_amount_section’).hide();
// });
jQuery(‘.other_donation_amount’).keyup(function(e) {
var activeElement = document.getElementsByClassName(“donation-amount-box”)[0].getElementsByClassName(“active”)[0];
if (activeElement) {
activeElement.classList.remove(‘active’);
}
var value = $(‘.other_donation_amount’).val();
jQuery(‘#other’).val(value);
jQuery(‘#donation_amount’).html(‘$’ + value);
jQuery(‘#amount’).val(value);
jQuery(‘#paypalamount’).val(value);
})
});
jQuery(document).ready(function() {
jQuery(‘.fo-login-link.btn-popup-footer a’).on(‘click’, function(e) {
e.preventDefault(); // Prevent the default behavior of the link
jQuery(‘.btn-popup-footer-login’).addClass(‘pop-active’); // Add the custom class
});
});
jQuery(document).ready(function() {
jQuery(‘.btn-popup-footer-login-close’).on(‘click’, function() {
jQuery(‘.popup_loginmodel.btn-popup-footer-login’).removeClass(‘pop-active’);
});
});
jQuery(document).ready(function() {
jQuery(‘.tml-pwd-wrap’).append(‘
‘);
jQuery(‘meta[property=”og:image:height”]’).attr(“content”, 400);
jQuery(‘meta[property=”og:image:width”]’).attr(“content”, 400);
//Open Bookmark Model
jQuery(‘#screen, #modal’).hide();
jQuery(‘#trigger-modal ,#trigger-modal2’).click(function() {
jQuery(‘#modal’).show();
});
jQuery(‘.x’).click(function() {
jQuery(‘#screen, #modal’).hide();
});
window.addEventListener(‘click’, function(e) {
if (document.getElementById(‘modal’).contains(e.target)) {
jQuery(“#modal”).hide();
} else {}
});
});
function showPassword() {
var pass = document.getElementById(“user_pass”);
if (pass.type === “password”) {
pass.type = “text”;
document.getElementById(“show_hide_div”).innerHTML = “Hide”;
} else {
pass.type = “password”;
document.getElementById(“show_hide_div”).innerHTML = “Show”;
}
}
function showPassword1() {
var pass = document.getElementById(“upassword”);
if (pass.type === “password”) {
pass.type = “text”;
document.getElementById(“show_hide_div_reg1”).innerHTML = “Hide”;
} else {
pass.type = “password”;
document.getElementById(“show_hide_div_reg1”).innerHTML = “Show”;
}
}
function showPassword2() {
var pass = document.getElementById(“upasswordconfirm”);
if (pass.type === “password”) {
pass.type = “text”;
document.getElementById(“show_hide_div_reg2”).innerHTML = “Hide”;
} else {
pass.type = “password”;
document.getElementById(“show_hide_div_reg2”).innerHTML = “Show”;
}
}
jQuery(“.emaillink”).click(function(e) {
e.preventDefault();
jQuery(“#contact_us_form”).css(‘display’, ‘flex’);
});
jQuery(‘#contact_us_form’).click((e) => {
if (e.target.id === “contact_us_form”) {
jQuery(“#contact_us_form”).css(‘display’, ‘none’);
}
});
// $(document).ready(function() {
// currLoc = $(location).attr(‘href’);
// parts = currLoc.split(“/”),
// last_part = parts[parts.length-1];
// console.log(last_part.split(“=”)[1]);
// if(last_part.split(“=”)[1] == ‘submit-post’){
// $(‘.page-header’).text(‘Submit Article’);
// }
// });
<!–
$(document).ready(function() {
$(‘#exposure-embed-new’).iFrameResize({
heightCalculationMethod: ‘max’
});
});
–>
$(window).scroll(function() {
var scrollOffset = $(window).scrollTop();
if (scrollOffset > 400) { // change 100 to the desired scroll offset
$(‘.fixed-footer-newsletter’).addClass(‘active’);
} else {
$(‘fixed-footer-newsletter’).removeClass(‘none’);
}
});
$(document).ready(function() {
$(“.up-down-toggle-btn svg”).click(function() {
$(“.fixed-footer-newsletter”).toggleClass(“hide”);
if ($(“.fixed-footer-newsletter”).hasClass(‘hide’)) {
localStorage.setItem(‘hideClass’, ‘true’);
} else {
localStorage.removeItem(‘hideClass’);
}
});
var hideClass = localStorage.getItem(‘hideClass’);
if (hideClass === ‘true’) {
$(‘.fixed-footer-newsletter’).addClass(‘hide’);
}
});
$(“.hamburger-box”).click(function() {
$(“.hamburger-box”).toggleClass(“is-active”);
});
// Default settings
var slidesToShow = 9;
// Adjust settings based on screen width
// window.innerWidth
if ($(window).width() > 991 && $(window).width() 767 && $(window).width() 575 && $(window).width() <= 767) {
slidesToShow = 2;
} else if ($(window).width() <= 575) {
slidesToShow = 2;
}
// Initialize the slider with the responsive settings
jQuery('.authorslide').slick({
slidesToShow: slidesToShow,
slidesToScroll: 1,
dots: false,
infinite: false,
focusOnSelect: false
});
/* gallery */
var galleryTop = new Swiper(“.gallery”, {
spaceBetween: 10,
grabCursor: true,
navigation: {
nextEl: “.swiper-button-next”,
prevEl: “.swiper-button-prev”
},
loop: true,
loopedSlides: 3,
autoplay: {
delay: 20000
},
// other parameters
on: {
click: function() {
/* do something */
}
},
keyboard: {
enabled: true,
onlyInViewport: false
}
});
// Default settings
var swiperslidesToShow = 3;
var spaceBetweenShow = 30;
// Adjust settings based on screen width
if (window.innerWidth > 991 && window.innerWidth 767 && window.innerWidth 575 && window.innerWidth <= 767) {
swiperslidesToShow = 2;
spaceBetweenShow = 15;
} else if (window.innerWidth <= 575) {
swiperslidesToShow = 2;
spaceBetweenShow = 15;
}
/* thumbs */
var galleryThumbs = new Swiper(".gallery-thumbs", {
spaceBetween: spaceBetweenShow,
slidesPerView: swiperslidesToShow,
touchRatio: 0.4,
slideToClickedSlide: true,
loop: true,
loopedSlides: 3,
keyboard: {
enabled: true,
onlyInViewport: false
},
initialSlide: 0
});
/* set conteoller */
galleryTop.controller.control = galleryThumbs;
galleryThumbs.controller.control = galleryTop;
/* — FO Newsletter add or remove class */
$(document).ready(function() {
$(“.newsletters-click”).on(“click”, function(e) {
$(this).addClass(‘active’);
});
});
$(document).ready(function() {
$(‘#amount_50’).click(function() {
$(‘.amount’).removeAttr(‘checked’);
$(‘#other_pay’).val(0);
$(‘#other_amount_pay’).val(0);
$(this).attr(‘checked’, ‘checked’)
});
$(‘#amount_100’).click(function() {
$(‘.amount’).removeAttr(‘checked’);
$(‘#other_pay’).val(0);
$(‘#other_amount_pay’).val(0);
$(this).attr(‘checked’, ‘checked’)
});
$(‘#amount_500’).click(function() {
$(‘.amount’).removeAttr(‘checked’);
$(‘#other_pay’).val(0);
$(‘#other_amount_pay’).val(0);
$(this).attr(‘checked’, ‘checked’)
});
$(‘#amount_1000’).click(function() {
$(‘.amount’).removeAttr(‘checked’);
$(‘#other_pay’).val(0);
$(‘#other_amount_pay’).val(0);
$(this).attr(‘checked’, ‘checked’)
});
$(‘#other_pay’).change(function() {
$(‘.amount’).removeAttr(‘checked’);
$(this).attr(‘checked’, ‘checked’)
});
// $(“#other”).on(“change”, function() {
// if ($(this).is(“:checked”)) {
// $(‘.amount’).removeAttr(‘checked’);
// $(“.other_donation_amount_section”).show();
// $(this).attr(‘checked’, ‘checked’)su
// } else {
// $(“.other_donation_amount_section”).hide();
// }
// });
});
$(document).ready(function() {
// Listen for the input event on the text input field
// $(‘#other_amount’).on(‘input’, function() {
// // $(‘.amount’).removeAttr(‘checked’);
// // $(‘.amount’).prop(‘checked’,false);
// var otherAmount = $(this).val(); // Get the value entered in the text input
// // Update the value and checked status of the radio button
// // $(‘#other’).val(otherAmount).attr(‘checked’, ‘checked’);
// $(‘#amount50’).removeAttr(‘checked’);
// $(‘#amount100’).removeAttr(‘checked’);
// $(‘#amount500’).removeAttr(‘checked’);
// $(‘#amount1000’).removeAttr(‘checked’);
// $(‘#other’).val(otherAmount);
// $(‘#other_amount’).val(otherAmount);
// $(‘#other’).attr(‘checked’, ‘checked’)
// });
$(“#other_amount_pay”).on(“input”, function() {
var inputValue = $(this).val();
if (inputValue !== “”) {
$(‘#amount_50’).removeAttr(‘checked’);
$(‘#amount_100’).removeAttr(‘checked’);
$(‘#amount_500’).removeAttr(‘checked’);
$(‘#amount_1000’).removeAttr(‘checked’);
$(‘#other_pay’).val(inputValue);
$(“#other_pay”).prop(“checked”, true);
}
});
});
/* input type number validation */
const numericInput = document.getElementById(‘other_donation_amount’);
numericInput.addEventListener(‘input’, function(e) {
// Get the current input value
const inputValue = e.target.value;
// Remove any non-numeric characters
const numericValue = inputValue.replace(/[^0-9]/g, ”);
// Update the input value with the numeric value
e.target.value = numericValue;
});
<!–
// Wait for the DOM content to be fully loaded
document.addEventListener(“DOMContentLoaded”, function() {
// Find the element with the class wpd-login-to-comment
var element = document.querySelector(‘.wpd-login-to-comment’);
// Check if the element exists
if (element) {
// Change the content of the element
// element.textContent = ‘Only Fair Observer members can comment. Please login to comment.’;
// Hide the element
element.style.display = ‘none’;
}
});
–>
/* Hide the view count by default */
.hidden {
display: none;
}
Total Views: 265
#cookie-law-info-bar,
.wt-cli-cookie-bar {
box-sizing: border-box;
font-size: 10pt;
margin: 0 auto;
padding: 10px 10px;
position: absolute;
text-align: center;
width: 100%;
z-index: 99999;
box-shadow: rgba(0, 0, 0, .5) 0px 5px 10px;
display: none;
left: 0px;
}
#cookie-law-info-again {
font-size: 10pt;
margin: 0;
padding: 5px 10px;
text-align: center;
z-index: 9999;
cursor: pointer;
box-shadow: #161616 2px 2px 5px 2px;
}
#cookie-law-info-bar span {
vertical-align: middle;
}
/** Buttons (http://papermashup.com/demos/css-buttons) */
.cli-plugin-button,
.cli-plugin-button:visited {
display: inline-block;
padding: 8px 16px 8px;
color: #fff;
text-decoration: none;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
position: relative;
cursor: pointer;
text-decoration: none;
}
.cli-accept-button {
font-family: Courier;
font-variant: small-caps;
}
.cli-plugin-main-link {}
.cli-plugin-button:hover {
background-color: #111;
color: #fff;
text-decoration: none;
}
.small.cli-plugin-button,
.small.cli-plugin-button:visited {
font-size: 11px;
}
.cli-plugin-button,
.cli-plugin-button:visited,
.medium.cli-plugin-button,
.medium.cli-plugin-button:visited {
font-size: 13px;
font-weight: 500;
line-height: 1;
}
.large.cli-plugin-button,
.large.cli-plugin-button:visited {
font-size: 14px;
padding: 8px 14px 9px;
}
.super.cli-plugin-button,
.super.cli-plugin-button:visited {
font-size: 34px;
padding: 8px 14px 9px;
}
.pink.cli-plugin-button,
.magenta.cli-plugin-button:visited {
background-color: #e22092;
}
.pink.cli-plugin-button:hover {
background-color: #c81e82;
}
.green.cli-plugin-button,
.green.cli-plugin-button:visited {
background-color: #91bd09;
}
.green.cli-plugin-button:hover {
background-color: #749a02;
}
.red.cli-plugin-button,
.red.cli-plugin-button:visited {
background-color: #e62727;
}
.red.cli-plugin-button:hover {
background-color: #cf2525;
}
.orange.cli-plugin-button,
.orange.cli-plugin-button:visited {
background-color: #ff5c00;
}
.orange.cli-plugin-button:hover {
background-color: #d45500;
}
.blue.cli-plugin-button,
.blue.cli-plugin-button:visited {
background-color: #2981e4;
}
.blue.cli-plugin-button:hover {
background-color: #2575cf;
}
.yellow.cli-plugin-button,
.yellow.cli-plugin-button:visited {
background-color: #ffb515;
}
.yellow.cli-plugin-button:hover {
background-color: #fc9200;
}
.cli-bar-popup {
-moz-background-clip: padding;
-webkit-background-clip: padding;
background-clip: padding-box;
-webkit-border-radius: 30px;
-moz-border-radius: 30px;
border-radius: 30px;
padding: 20px;
}
.cli-clearboth {
clear: both;
}
@media only screen and (max-width:768px) {
.cli-settings-mobile:hover {
box-shadow: none !important;
}
.cli-settings-desktop {
display: none;
}
.cli-col-8 {
max-width: 100% !important;
width: 100% !important;
flex: 100% !important;
-ms-flex: 100% !important;
}
.cli-accordion-plusminus {
float: right;
font-size: 22px;
line-height: 22px;
}
.cli-plugin-button {
margin: 10px;
}
}
@media only screen and (max-width:567px) {
.cli-switch .cli-slider:after {
display: none;
}
.cli-tab-header a.cli-nav-link {
font-size: 12px;
}
.cli-modal .cli-modal-close {
right: -10px;
top: -15px;
}
}
.wt-cli-iframe-placeholder {
background-image: url(../images/cli_placeholder.svg);
background-size: 80px;
max-width: 100%;
max-height: 100%;
background-position: center;
background-repeat: no-repeat;
background-color: #b2b0b059;
position: relative;
display: flex;
align-items: flex-end;
justify-content: center;
}
.wt-cli-iframe-placeholder .wt-cli-inner-text {
width: 100%;
text-align: center;
padding: 1rem 1rem;
border-radius: 400px;
}
.wt-cli-cookie-bar-container {
display: none;
}
.wt-cli-necessary-checkbox {
display: none !important;
}
a.wt-cli-ccpa-opt-out {
text-decoration: underline !important;
;
}
.gdpr-container-fluid {
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
box-sizing: border-box;
}
.gdpr-row {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin-right: -15px;
margin-left: -15px;
}
.gdpr-col-4 {
-ms-flex: 0 0 33.333333%;
flex: 0 0 33.333333%;
max-width: 33.333333%;
}
.gdpr-col-8 {
-ms-flex: 0 0 66.666667%;
flex: 0 0 66.666667%;
max-width: 66.666667%;
}
.gdpr-align-items-stretch {
-ms-flex-align: stretch !important;
align-items: stretch !important;
}
.gdpr-d-flex {
display: -ms-flexbox !important;
display: flex !important;
}
.gdpr-px-0 {
padding-left: 0;
padding-right: 0;
}
.modal-backdrop.show {
opacity: .8;
}
.modal-open {
overflow: hidden
}
.modal-open .gdpr-modal {
overflow-x: hidden;
overflow-y: auto
}
.gdpr-modal.fade .gdpr-modal-dialog {
transition: -webkit-transform .3s ease-out;
transition: transform .3s ease-out;
transition: transform .3s ease-out, -webkit-transform .3s ease-out;
-webkit-transform: translate(0, -25%);
transform: translate(0, -25%)
}
.gdpr-modal.show .gdpr-modal-dialog {
-webkit-transform: translate(0, 0);
transform: translate(0, 0)
}
.modal-backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1039;
background-color: #000
}
.modal-backdrop.fade {
opacity: 0
}
.modal-backdrop.show {
opacity: .5
}
.gdpr-modal {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1050;
display: none;
overflow: hidden;
outline: none;
}
.gdpr-modal a {
text-decoration: none;
}
.gdpr-modal .gdpr-modal-dialog {
position: relative;
width: auto;
margin: .5rem;
pointer-events: none;
font-family: -apple-system, BlinkMacSystemFont, “Segoe UI”, Roboto, “Helvetica Neue”, Arial, sans-serif, “Apple Color Emoji”, “Segoe UI Emoji”, “Segoe UI Symbol”;
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
text-align: left;
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
min-height: calc(100% – (.5rem * 2))
}
@media (min-width: 576px) {
.gdpr-modal .gdpr-modal-dialog {
max-width: 500px;
margin: 1.75rem auto;
min-height: calc(100% – (1.75rem * 2));
}
}
@media (min-width: 992px) {
.gdpr-modal .gdpr-modal-dialog {
max-width: 900px;
}
}
.gdpr-modal-content {
position: relative;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
width: 100%;
pointer-events: auto;
background-color: #fff;
background-clip: padding-box;
border: 1px solid rgba(0, 0, 0, .2);
border-radius: .3rem;
box-sizing: border-box;
outline: 0
}
.gdpr-modal .row {
margin: 0 -15px;
}
.gdpr-modal .modal-body {
padding: 0;
position: relative;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
}
.gdpr-modal .close {
position: absolute;
right: 10px;
top: 10px;
z-index: 1;
padding: 0;
background-color: transparent;
border: 0;
-webkit-appearance: none;
font-size: 1.5rem;
font-weight: 700;
line-height: 1;
color: #000;
text-shadow: 0 1px 0 #fff;
}
.gdpr-modal .close:focus {
outline: 0;
}
.gdpr-switch {
display: inline-block;
position: relative;
min-height: 1px;
padding-left: 70px;
font-size: 14px;
}
.gdpr-switch input[type=”checkbox”] {
display: none;
}
.gdpr-switch .gdpr-slider {
background-color: #e3e1e8;
height: 24px;
width: 50px;
bottom: 0;
cursor: pointer;
left: 0;
position: absolute;
right: 0;
top: 0;
transition: .4s;
}
.gdpr-switch .gdpr-slider:before {
background-color: #fff;
bottom: 2px;
content: “”;
height: 20px;
left: 2px;
position: absolute;
transition: .4s;
width: 20px;
}
.gdpr-switch input:checked+.gdpr-slider {
background-color: rgb(99, 179, 95);
}
.gdpr-switch input:checked+.gdpr-slider:before {
transform: translateX(26px);
}
.gdpr-switch .gdpr-slider {
border-radius: 34px;
}
.gdpr-switch .gdpr-slider:before {
border-radius: 50%;
}
.gdpr-tab-content>.gdpr-tab-pane {
display: none;
}
.gdpr-tab-content>.active {
display: block;
}
.gdpr-fade {
transition: opacity .15s linear;
}
.gdpr-nav-pills {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
padding-left: 0;
margin-bottom: 0;
list-style: none;
-ms-flex-direction: column !important;
flex-direction: column !important;
align-items: stretch !important;
-ms-align-items: stretch !important;
}
.nav.gdpr-nav-pills,
.gdpr-tab-content {
width: 100%;
padding: 30px;
box-sizing: border-box;
}
.nav.gdpr-nav-pills {
background: #f3f3f3;
}
.nav.gdpr-nav-pills .gdpr-nav-link {
border: 1px solid #0070ad;
margin-bottom: 10px;
color: #0070ad;
font-size: 14px;
display: block;
padding: .5rem 1rem;
border-radius: .25rem;
}
.nav.gdpr-nav-pills .gdpr-nav-link.active,
.nav.gdpr-nav-pills .show>.gdpr-nav-link {
background-color: #0070ad;
border: 1px solid #0070ad;
}
.nav.gdpr-nav-pills .gdpr-nav-link.active {
color: #ffffff;
}
.gdpr-tab-content .gdpr-button-wrapper {
padding-top: 30px;
margin-top: 30px;
border-top: 1px solid #d6d6d6;
}
.gdpr-tab-content .gdpr-button-wrapper .btn-gdpr {
background-color: #0070ad;
border-color: #0070ad;
color: #ffffff;
display: inline-block;
font-weight: 400;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
border: 1px solid transparent;
padding: .375rem .75rem;
font-size: 1rem;
line-height: 1.5;
border-radius: .25rem;
transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
box-sizing: border-box;
}
.gdpr-tab-content p {
color: #343438;
font-size: 14px;
margin-top: 0;
}
.gdpr-tab-content h4 {
font-size: 20px;
margin-bottom: .5rem;
margin-top: 0;
font-family: inherit;
font-weight: 500;
line-height: 1.2;
color: inherit;
}
.cli-container-fluid {
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}
.cli-row {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin-right: -15px;
margin-left: -15px;
}
.cli-col-4 {
-ms-flex: 0 0 33.333333%;
flex: 0 0 33.333333%;
max-width: 33.333333%;
}
.cli-col-8 {
-ms-flex: 0 0 66.666667%;
flex: 0 0 66.666667%;
max-width: 66.666667%;
flex-direction: column;
}
.cli-align-items-stretch {
-ms-flex-align: stretch !important;
align-items: stretch !important;
}
.cli-d-flex {
display: -ms-flexbox !important;
display: flex !important;
}
.cli-px-0 {
padding-left: 0;
padding-right: 0;
}
.cli-btn {
cursor: pointer;
font-size: 14px;
display: inline-block;
font-weight: 400;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
border: 1px solid transparent;
padding: .5rem 1.25rem;
line-height: 1;
border-radius: .25rem;
transition: all .15s ease-in-out;
}
.cli-btn:hover {
opacity: .8;
}
.cli-btn:focus {
outline: 0;
}
.cli-read-more-link {
cursor: pointer;
font-size: 15px;
font-weight: 500;
text-decoration: underline;
}
.cli-modal-backdrop.cli-show {
opacity: .8;
}
.cli-modal-open {
overflow: hidden
}
.cli-barmodal-open {
overflow: hidden
}
.cli-modal-open .cli-modal {
overflow-x: hidden;
overflow-y: auto
}
.cli-modal.cli-fade .cli-modal-dialog {
transition: -webkit-transform .3s ease-out;
transition: transform .3s ease-out;
transition: transform .3s ease-out, -webkit-transform .3s ease-out;
-webkit-transform: translate(0, -25%);
transform: translate(0, -25%)
}
.cli-modal.cli-show .cli-modal-dialog {
-webkit-transform: translate(0, 0);
transform: translate(0, 0)
}
.cli-modal-backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1040;
background-color: #000;
-webkit-transform: scale(0);
transform: scale(0);
transition: opacity ease-in-out 0.5s;
}
.cli-modal-backdrop.cli-fade {
opacity: 0;
}
.cli-modal-backdrop.cli-show {
opacity: .5;
-webkit-transform: scale(1);
transform: scale(1);
}
.cli-modal {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 99999;
-webkit-transform: scale(0);
transform: scale(0);
overflow: hidden;
outline: 0;
visibility: hidden;
}
.cli-modal.cli-show {
visibility: visible;
}
.cli-modal a {
text-decoration: none;
}
.cli-modal .cli-modal-dialog {
position: relative;
width: auto;
margin: .5rem;
pointer-events: none;
font-family: inherit;
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
text-align: left;
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
min-height: calc(100% – (.5rem * 2))
}
@media (min-width: 576px) {
.cli-modal .cli-modal-dialog {
max-width: 500px;
margin: 1.75rem auto;
min-height: calc(100% – (1.75rem * 2))
}
}
.cli-modal-content {
position: relative;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
width: 100%;
pointer-events: auto;
/* background-color: #fff; */
background-clip: padding-box;
border-radius: .2rem;
box-sizing: border-box;
outline: 0
}
.cli-modal .row {
margin: 0 -15px;
}
.cli-modal-footer {
position: relative;
}
.cli-modal .modal-body {
padding: 0;
position: relative;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
}
.cli-modal .cli-modal-close:focus {
outline: 0;
}
.cli-switch {
display: inline-block;
position: relative;
min-height: 1px;
padding-left: 38px;
font-size: 14px;
width: auto;
}
.cli-switch input[type=”checkbox”] {
display: block;
margin: 0;
width: 0;
position: absolute !important;
left: 0 !important;
opacity: 0 !important;
}
.cli-switch .cli-slider {
background-color: #e3e1e8;
height: 20px;
width: 38px;
bottom: 0;
cursor: pointer;
left: 0;
position: absolute;
right: 0;
top: 0;
transition: .4s;
}
.cli-switch .cli-slider:before {
bottom: 2px;
content: “”;
height: 15px;
left: 3px;
position: absolute;
transition: .4s;
width: 15px;
}
.cli-switch input:checked+.cli-slider {
background-color: #28a745;
}
.cli-switch input:checked+.cli-slider:before {
transform: translateX(18px);
}
.cli-switch .cli-slider {
border-radius: 34px;
font-size: 0;
}
.cli-switch .cli-slider:before {
border-radius: 50%;
}
.cli-tab-content {
/* background: #ffffff; */
}
.cli-nav-pills {
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
padding-left: 0;
margin-bottom: 0;
list-style: none;
-ms-flex-direction: column;
flex-direction: column;
}
.cli-nav-pills,
.cli-tab-content {
width: 100%;
padding: 5px 30px 5px 5px;
box-sizing: border-box;
}
@media (max-width: 767px) {
.cli-nav-pills,
.cli-tab-content {
padding: 30px 10px;
}
}
.cli-nav-pills {
background: #fff;
}
.cli-nav-pills .cli-nav-link {
border: 1px solid #cccccc;
margin-bottom: 10px;
color: #2a2a2a;
font-size: 14px;
display: block;
padding: .5rem 1rem;
border-radius: .25rem;
cursor: pointer
}
.cli-nav-pills .cli-nav-link.cli-active,
.cli-nav-pills .cli-show>.cli-nav-link {
background-color: #f6f6f9;
border: 1px solid #cccccc;
}
.cli-nav-pills .cli-nav-link.cli-active {
color: #2a2a2a;
}
.cli-tab-content .cli-button-wrapper {
padding-top: 30px;
margin-top: 30px;
border-top: 1px solid #d6d6d6;
}
.cli-tab-content p {
color: #343438;
font-size: 14px;
margin-top: 0;
}
.cli-tab-content h4 {
font-size: 20px;
margin-bottom: 1.5rem;
margin-top: 0;
font-family: inherit;
font-weight: 500;
line-height: 1.2;
color: inherit;
}
/* Cookie Settings In Bar */
#cookie-law-info-bar .cli-nav-pills,
#cookie-law-info-bar .cli-tab-content,
#cookie-law-info-bar .cli-nav-pills .cli-show>.cli-nav-link,
#cookie-law-info-bar a.cli-nav-link.cli-active {
background: transparent;
}
#cookie-law-info-bar .cli-nav-pills .cli-nav-link.cli-active,
#cookie-law-info-bar .cli-nav-link,
#cookie-law-info-bar .cli-tab-container p,
#cookie-law-info-bar span.cli-necessary-caption,
#cookie-law-info-bar .cli-switch .cli-slider:after {
color: inherit;
}
#cookie-law-info-bar .cli-tab-header a:before {
border-right: 1px solid currentColor;
border-bottom: 1px solid currentColor;
}
#cookie-law-info-bar .cli-row {
margin-top: 20px;
}
#cookie-law-info-bar .cli-col-4 {
-webkit-box-flex: 0;
-ms-flex: 0 0 auto;
flex: 0 0 auto;
width: auto;
max-width: none;
}
#cookie-law-info-bar .cli-col-8 {
flex-basis: 0;
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
max-width: 100%;
}
.cli-wrapper {
max-width: 100%;
float: none;
margin: 0 auto;
}
#cookie-law-info-bar .cli-tab-content h4 {
margin-bottom: 0.5rem;
}
#cookie-law-info-bar .cli-nav-pills .cli-nav-link {
padding: .2rem 0.5rem;
}
#cookie-law-info-bar .cli-tab-container {
display: none;
text-align: left;
}
/* Popup Footer Styles */
.cli-tab-footer .cli-btn {
padding: 10px 15px;
width: auto;
text-decoration: none;
}
.cli-tab-footer {
width: 100%;
text-align: right;
padding: 20px 0;
}
/* version 2.0 */
.cli-col-12 {
width: 100%;
}
.cli-tab-header {
display: flex;
justify-content: space-between;
}
.cli-tab-header a:before {
width: 10px;
height: 2px;
left: 0;
top: calc(50% – 1px);
}
.cli-tab-header a:after {
width: 2px;
height: 10px;
left: 4px;
top: calc(50% – 5px);
-webkit-transform: none;
transform: none;
}
.cli-tab-header a:before {
width: 7px;
height: 7px;
border-right: 1px solid #4a6e78;
border-bottom: 1px solid #4a6e78;
content: ” “;
transform: rotate(-45deg);
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
margin-right: 10px;
}
.cli-tab-header a.cli-nav-link {
position: relative;
display: flex;
align-items: center;
font-size: 14px;
color: #000;
text-decoration: none;
}
.cli-tab-header.cli-tab-active .cli-nav-link:before {
transform: rotate(45deg);
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.cli-tab-header {
border-radius: 5px;
padding: 12px 15px;
cursor: pointer;
transition: background-color 0.2s ease-out 0.3s, color 0.2s ease-out 0s;
background-color: #f2f2f2;
}
.cli-modal .cli-modal-close {
position: absolute;
right: 0;
top: 0;
z-index: 1;
-webkit-appearance: none;
width: 40px;
height: 40px;
padding: 0;
border-radius: 50%;
padding: 10px;
background: transparent;
border: none;
}
.cli-tab-container h4 {
font-family: inherit;
font-size: 16px;
margin-bottom: 15px;
margin: 10px 0;
}
.cli-tab-container p,
.cli-privacy-content-text {
font-size: 14px;
line-height: 1.4;
margin-top: 0;
padding: 0;
color: #000;
}
.cli-tab-content {
display: none;
}
.cli-tab-section .cli-tab-content {
padding: 10px 20px 5px 20px;
}
.cli-tab-section {
margin-top: 5px;
}
@media (min-width: 992px) {
.cli-modal .cli-modal-dialog {
max-width: 645px;
}
}
.cli-switch .cli-slider:after {
content: attr(data-cli-disable);
position: absolute;
right: 50px;
font-size: 12px;
text-align: right;
min-width: 120px;
}
.cli-switch input:checked+.cli-slider:after {
content: attr(data-cli-enable);
}
a.cli-privacy-readmore {
font-size: 12px;
margin-top: 12px;
display: inline-block;
cursor: pointer;
text-decoration: underline;
}
.cli-privacy-overview {
padding-bottom: 12px;
}
a.cli-privacy-readmore:before {
content: attr(data-readmore-text);
}
.cli-collapsed a.cli-privacy-readmore:before {
content: attr(data-readless-text);
}
.cli-collapsed .cli-privacy-content {
transition: max-height 0.25s ease-in;
}
.cli-privacy-content p {
margin-bottom: 0;
}
.cli-modal-close svg {
fill: #000;
}
span.cli-necessary-caption {
color: #000;
font-size: 12px;
}
.cli-tab-section.cli-privacy-tab {
display: none;
}
#cookie-law-info-bar .cli-tab-section.cli-privacy-tab {
display: block;
}
#cookie-law-info-bar .cli-privacy-overview {
display: none;
}
.cli-tab-container .cli-row {
max-height: 500px;
overflow-y: auto;
}
.cli-modal.cli-blowup.cli-out {
z-index: -1;
}
.cli-modal.cli-blowup {
z-index: 999999;
-webkit-transform: scale(1);
transform: scale(1);
}
.cli-modal.cli-blowup .cli-modal-dialog {
animation: blowUpModal 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
.cli-modal.cli-blowup.cli-out .cli-modal-dialog {
animation: blowUpModalTwo 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
@keyframes blowUpContent {
0% {
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
99.9% {
-webkit-transform: scale(2);
transform: scale(2);
opacity: 0;
}
100% {
-webkit-transform: scale(0);
transform: scale(0);
}
}
@keyframes blowUpContentTwo {
0% {
-webkit-transform: scale(2);
transform: scale(2);
opacity: 0;
}
100% {
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
}
@keyframes blowUpModal {
0% {
-webkit-transform: scale(0);
transform: scale(0);
}
100% {
-webkit-transform: scale(1);
transform: scale(1);
}
}
@keyframes blowUpModalTwo {
0% {
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
50% {
-webkit-transform: scale(0.5);
transform: scale(0.5);
opacity: 0;
}
100% {
-webkit-transform: scale(0);
transform: scale(0);
opacity: 0;
}
}
/* GDPR Bar Version 2 */
.cli-bar-container {
float: none;
margin: 0 auto;
justify-content: space-between;
display: flex;
align-items: center;
flex-wrap: wrap;
}
.cli-style-v2 a {
cursor: pointer;
}
.cli-style-v2 .cli-plugin-main-link {
font-weight: inherit;
}
.cli-style-v2 {
font-size: 11pt;
font-weight: normal;
}
#cookie-law-info-bar[data-cli-type=”widget”] .cli-bar-container,
#cookie-law-info-bar[data-cli-type=”popup”] .cli-bar-container {
display: block;
}
.cli-bar-message {
width: 70%;
text-align: left;
}
#cookie-law-info-bar[data-cli-type=”widget”] .cli-bar-message,
#cookie-law-info-bar[data-cli-type=”popup”] .cli-bar-message {
width: 100%;
}
#cookie-law-info-bar[data-cli-style=”cli-style-v2″] .cli_messagebar_head {
text-align: left;
margin-left: 5%;
margin-bottom: 10px;
}
@media (max-width: 985px) {
.cli-bar-message {
width: 100%;
}
.cli-bar-container {
justify-content: center;
}
}
#cookie-law-info-bar[data-cli-style=”cli-style-v2″] .wt-cli-ccpa-checkbox {
display: block;
}
/* Cookie Style Version 3 */
.wt-cli-form-group input:disabled {
opacity: 0.5;
}
.wt-cli-custom-checkbox input[type=”checkbox”] {
border: 1px solid #b4b9be;
background: #fff;
color: #555;
clear: none;
cursor: pointer;
display: inline-block !important;
line-height: 0;
height: 16px;
margin: -4px 4px 0 0;
padding: 0 !important;
text-align: center;
vertical-align: middle;
width: 16px;
min-width: 16px;
-webkit-appearance: none;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
transition: .05s border-color ease-in-out;
}
.wt-cli-custom-checkbox input[type=checkbox]:checked:before {
content: ”;
display: block;
border: solid #61a229;
width: 5px;
height: 10px;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
margin: 1px 0 0 5px;
box-sizing: border-box;
}
.wt-cli-form-group {
margin-right: 15px;
}
.cli-style-v3 .cli-bar-actions {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
}
.cli-style-v3 .cli-bar-btn_container,
.cli-style-v3 .wt-cli-category-widget {
margin-top: 10px;
}
.cli-style-v3 {
text-align: left;
}
#cookie-law-info-bar a,
.wt-cli-category-widget .wt-cli-form-group label {
cursor: pointer;
}
.wt-cli-category-widget .wt-cli-form-group label {
font-size: inherit;
}
#cookie-law-info-bar[data-template-id=”cli-style-v3″] {
padding: 10px 90px;
}
#cookie-law-info-bar[data-template-id=”cli-style-v3″][data-cli-type=”widget”] {
padding: 10px 20px;
}
#cookie-law-info-bar[data-template-id=”cli-style-v3″][data-cli-type=”popup”] {
padding: 10px 20px;
}
#cookie-law-info-bar[data-template-id=”cli-style-v3″] .wt-cli-category-widget {
display: flex;
flex-wrap: wrap;
}
#cookie-law-info-bar[data-template-id=”cli-style-v3″] {
text-align: left;
font-size: 11pt;
border: 1px solid #ffffffe6;
}
#cookie-law-info-bar[data-template-id=”cli-style-v3″] h5 {
margin: 10px 0;
}
.wt-cli-category-widget-active .cli-switch,
.wt-cli-category-widget-active .wt-cli-necessary-checkbox,
.wt-cli-category-widget-active .cli-necessary-caption {
display: none !important;
}
@media (max-width: 985px) {
#cookie-law-info-bar[data-template-id=”cli-style-v3″] {
padding: 10px 20px;
}
}
/* Cookie settings popup */
.wt-cli-sr-only {
display: none;
}
.wt-cli-cookie-bar-container.wt-cli-hide-bar {
display: none !important;
}
.wt-cli-privacy-accept-btn {
margin-left: 10px;
}
/* ADA changes */
.cli_settings_button:focus,
#cookie-law-info-again:focus,
#wt-cli-cookie-banner-title:focus,
.cli-plugin-main-link,
.cli_action_button,
.cli-privacy-readmore,
.cli-tab-header a,
.cli-switch .cli-slider,
.cli-tab-content .cli-tab-pane:focus {
outline: 0;
}
.cli-plugin-button:focus {
outline: 0;
opacity: 0.7;
}
/* Settings popup footer section */
.wt-cli-ckyes-brand-logo {
display: flex;
align-items: center;
font-size: 9px;
color: #111111;
font-weight: normal;
}
.wt-cli-ckyes-brand-logo img {
width: 65px;
margin-left: 2px;
}
.wt-cli-privacy-overview-actions {
padding-bottom: 0;
}
.cli-modal-content,
.cli-tab-content {
background-color: #ffffff;
}
.cli-privacy-content-text,
.cli-modal .cli-modal-dialog,
.cli-tab-container p,
a.cli-privacy-readmore {
color: #000000;
}
.cli-tab-header {
background-color: #f2f2f2;
}
.cli-tab-header,
.cli-tab-header a.cli-nav-link,
span.cli-necessary-caption,
.cli-switch .cli-slider:after {
color: #000000;
}
.cli-switch .cli-slider:before {
background-color: #ffffff;
}
.cli-switch input:checked+.cli-slider:before {
background-color: #ffffff;
}
.cli-switch .cli-slider {
background-color: #e3e1e8;
}
.cli-switch input:checked+.cli-slider {
background-color: #28a745;
}
.cli-modal-close svg {
fill: #000000;
}
.cli-tab-footer .wt-cli-privacy-accept-all-btn {
background-color: #00acad;
color: #ffffff
}
.cli-tab-footer .wt-cli-privacy-accept-btn {
background-color: #00acad;
color: #ffffff
}
.cli-tab-header a:before {
border-right: 1px solid #000000;
border-bottom: 1px solid #000000;
}
/* */
CLI_ACCEPT_COOKIE_NAME = (typeof CLI_ACCEPT_COOKIE_NAME !== ‘undefined’ ? CLI_ACCEPT_COOKIE_NAME : ‘viewed_cookie_policy’);
CLI_PREFERNCE_COOKIE = (typeof CLI_PREFERNCE_COOKIE !== ‘undefined’ ? CLI_PREFERNCE_COOKIE : ‘CookieLawInfoConsent’);
CLI_ACCEPT_COOKIE_EXPIRE = (typeof CLI_ACCEPT_COOKIE_EXPIRE !== ‘undefined’ ? CLI_ACCEPT_COOKIE_EXPIRE : 365);
CLI_COOKIEBAR_AS_POPUP = (typeof CLI_COOKIEBAR_AS_POPUP !== ‘undefined’ ? CLI_COOKIEBAR_AS_POPUP : false);
var CLI_Cookie = {
set: function(name, value, days) {
var domain = (Cli_Data.cookieDomain !== ” ? “;domain=” + Cli_Data.cookieDomain : ”);
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
var expires = “;expires=” + date.toGMTString();
if (days < 1) {
this.eraseCookie(name, expires);
} else {
document.cookie = name + "=" + value + expires + domain + ";path=/";
}
},
read: function(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1, c.length);
}
if (c.indexOf(nameEQ) === 0) {
return c.substring(nameEQ.length, c.length);
}
}
return null;
},
erase: function(name) {
this.set(name, "", -10);
},
eraseCookie: function(name, expires, index) {
if (this.cookieExist(name) === false) {
return false;
}
var _hostname = window.location.hostname;
var value = "";
if (typeof index === 'undefined') {
index = 0;
}
if (index === 0) {
_hostname = _hostname.substring(_hostname.lastIndexOf(".", _hostname.lastIndexOf(".") – 1));
} else if (index === 1) {
_hostname = (Cli_Data.cookieDomain !== '' ? Cli_Data.cookieDomain : '');
} else if (index === 2) {
if (_hostname.indexOf("www") != 1) {
_hostname = _hostname.replace('www', '');
}
}
index = index + 1;
document.cookie = name + "=" + value + expires + ";domain=" + _hostname + ";path=/";
if (index <= 2) {
this.eraseCookie(name, expires, index);
}
},
exists: function(name) {
return (this.read(name) !== null);
},
getallcookies: function() {
var pairs = document.cookie.split(";");
var cookieslist = {};
for (var i = 0; i 0 && this.main_link.hasClass(‘cli-minimize-bar’)) {
jQuery(‘.wt-cli-cookie-bar-container’).addClass(‘wt-cli-hide-bar’);
this.hideHeader();
this.showagain_elm.slideDown(this.settings.animate_speed_show);
return true;
}
return false;
},
settingsPopUp: function() {
jQuery(document).on(‘click keypress’, ‘.cli_settings_button’, function(e) {
var key = e.which;
e.preventDefault();
if (key === 1 || key === 13) {
if (CLI.settings.cookie_setting_popup == true) {
jQuery(‘#cliSettingsPopup’).addClass(“cli-show”).css({
‘opacity’: 0
}).animate({
‘opacity’: 1
});
jQuery(‘#cliSettingsPopup’).removeClass(‘cli-blowup cli-out’).addClass(“cli-blowup”);
jQuery(‘#cliSettingsPopup’).attr(‘aria-hidden’, false);
jQuery(‘body’).addClass(“cli-modal-open”);
jQuery(“.cli-settings-overlay”).addClass(“cli-show”);
jQuery(“#cookie-law-info-bar”).css({
‘opacity’: .1
});
jQuery(“#cliModalClose”).focus();
if (!jQuery(‘.cli-settings-mobile’).is(‘:visible’)) {
jQuery(‘#cliSettingsPopup’).find(‘.cli-nav-link:eq(0)’).click();
}
} else {
jQuery(‘#cookie-law-info-bar .cli-tab-container’).slideToggle(CLI.settings.animate_speed_show);
}
}
});
jQuery(‘#cliModalClose’).click(function() {
CLI.settingsPopUpClose();
});
jQuery(‘#cliModalClose’).keydown(function(e) {
var key = e.which
if (key === 9) {
if (e.shiftKey === true) {
e.preventDefault()
jQuery(‘#wt-cli-privacy-save-btn’).focus()
}
}
});
document.addEventListener(‘keydown’, function(e) {
var key = e.which;
if (key === 27 && jQuery(‘#cliSettingsPopup’).hasClass(‘cli-show’)) {
CLI.settingsPopUpClose();
}
});
jQuery(“#cliSettingsPopup”).click(function(e) {
if (!(document.getElementsByClassName(‘cli-modal-dialog’)[0].contains(e.target))) {
CLI.settingsPopUpClose();
}
});
jQuery(‘.cli_enable_all_btn’).click(function() {
var cli_toggle_btn = jQuery(this);
var enable_text = cli_toggle_btn.attr(‘data-enable-text’);
var disable_text = cli_toggle_btn.attr(‘data-disable-text’);
if (cli_toggle_btn.hasClass(‘cli-enabled’)) {
CLI.disableAllCookies();
cli_toggle_btn.html(enable_text);
} else {
CLI.enableAllCookies();
cli_toggle_btn.html(disable_text);
}
jQuery(this).toggleClass(‘cli-enabled’);
});
this.settingsTabbedAccordion();
this.toggleUserPreferenceCheckBox();
this.privacyReadmore();
},
settingsTabbedAccordion: function() {
jQuery(document).on(‘click keypress’, ‘.cli-tab-header’, function(e) {
if (!(jQuery(e.target).hasClass(‘cli-slider’) || jQuery(e.target).hasClass(‘cli-user-preference-checkbox’))) {
var key = e.which;
e.preventDefault();
if (key === 1 || key === 13) {
var currentElement = jQuery(this);
var tabLink = currentElement.closest(‘.cli-tab-header’).find(‘.cli-nav-link’);
if (currentElement.hasClass(“cli-tab-active”)) {
currentElement.removeClass(“cli-tab-active”);
currentElement.siblings(“.cli-tab-content”).slideUp(200);
tabLink.attr(‘aria-expanded’, false);
} else {
jQuery(“.cli-tab-header”).removeClass(“cli-tab-active”);
currentElement.addClass(“cli-tab-active”);
jQuery(“.cli-tab-content”).slideUp(200);
currentElement.siblings(“.cli-tab-content”).slideDown(200);
tabLink.attr(‘aria-expanded’, true);
}
}
}
});
},
settingsPopUpClose: function() {
jQuery(‘#cliSettingsPopup’).removeClass(‘cli-show’);
jQuery(‘#cliSettingsPopup’).addClass(‘cli-out’);
jQuery(‘#cliSettingsPopup’).attr(‘aria-hidden’, true);
jQuery(‘body’).removeClass(“cli-modal-open”);
jQuery(“.cli-settings-overlay”).removeClass(“cli-show”);
jQuery(“#cookie-law-info-bar”).css({
‘opacity’: 1
});
jQuery(“.cli_settings_button”).focus();
},
toggleUserPreferenceCheckBox: function() {
jQuery(‘.cli-user-preference-checkbox’).each(function() {
var categoryCookie = ‘cookielawinfo-‘ + jQuery(this).attr(‘data-id’);
var categoryCookieValue = CLI_Cookie.read(categoryCookie);
if (categoryCookieValue == null) {
if (jQuery(this).is(‘:checked’)) {
CLI_Cookie.set(categoryCookie, ‘yes’, CLI_ACCEPT_COOKIE_EXPIRE);
} else {
CLI_Cookie.set(categoryCookie, ‘no’, CLI_ACCEPT_COOKIE_EXPIRE);
}
} else {
if (categoryCookieValue == “yes”) {
jQuery(this).prop(“checked”, true);
} else {
jQuery(this).prop(“checked”, false);
}
}
});
jQuery(‘.cli-user-preference-checkbox’).click(function() {
var dataID = jQuery(this).attr(‘data-id’);
var currentToggleElm = jQuery(‘.cli-user-preference-checkbox[data-id=’ + dataID + ‘]’);
if (jQuery(this).is(‘:checked’)) {
CLI_Cookie.set(‘cookielawinfo-‘ + dataID, ‘yes’, CLI_ACCEPT_COOKIE_EXPIRE);
currentToggleElm.prop(‘checked’, true);
} else {
CLI_Cookie.set(‘cookielawinfo-‘ + dataID, ‘no’, CLI_ACCEPT_COOKIE_EXPIRE);
currentToggleElm.prop(‘checked’, false);
}
CLI.checkCategories();
CLI.generate_user_preference_cookie();
CLI.generateConsent();
});
},
attachEvents: function() {
jQuery(document).on(‘click keypress’, ‘.wt-cli-privacy-btn’, function(e) {
var key = e.which;
e.preventDefault();
if (key === 1 || key === 13) {
var action = jQuery(this).attr(‘data-cli-action’);
if (action === ‘accept_all’) {
CLI.enableAllCookies();
}
CLI.accept_close();
CLI.saveLog(‘accept’);
CLI.settingsPopUpClose();
}
});
jQuery(‘.wt-cli-privacy-overview-actions’).find(‘a’).last().keydown(function(e) {
var key = e.which
if (key === 9) {
if (e.shiftKey === false) {
e.preventDefault()
jQuery(‘#cliModalClose’).focus()
}
}
});
jQuery(document).on(‘click keypress’, ‘.cli_action_button’, function(e) {
var key = e.which;
e.preventDefault();
if (key === 1 || key === 13) {
var elm = jQuery(this);
var button_action = elm.attr(‘data-cli_action’);
var open_link = elm[0].hasAttribute(“href”) && elm.attr(“href”).charAt(0) !== ‘#’ ? true : false;
var new_window = false;
if (button_action == ‘accept’) {
if (e.originalEvent !== undefined) {
if (CLI.settings.accept_all == true) {
CLI.enableAllCookies();
}
} else {
CLI.settingsPopUpClose();
}
CLI.accept_close();
new_window = CLI.settings.button_1_new_win ? true : false;
} else if (button_action == ‘accept_all’) {
CLI.enableAllCookies();
CLI.accept_close();
new_window = CLI.settings.button_7_new_win ? true : false;
} else if (button_action == ‘reject’) {
CLI.disableAllCookies();
CLI.reject_close();
new_window = CLI.settings.button_3_new_win ? true : false;
}
CLI.saveLog(button_action);
if (open_link) {
if (new_window) {
window.open(elm.attr(“href”), ‘_blank’);
} else {
window.location.href = elm.attr(“href”);
}
}
}
});
jQuery(document).on(‘click’, ‘.cli_cookie_close_button’, function(e) {
e.preventDefault();
var elm = jQuery(this);
var button_action = elm.attr(‘data-cli_action’);
if (CLI.settings.accept_all == true) {
CLI.enableAllCookies();
}
CLI.accept_close();
CLI.saveLog(button_action);
});
},
saveLog: function(button_action) {
if (CLI.settings.logging_on) {
var ccpaOptedOut = cliBlocker.ccpaOptedOut();
cookies = CLI_Cookie.getallcookies();
cookies.ccpaOptout = ccpaOptedOut;
jQuery.ajax({
url: log_object.ajax_url,
type: ‘POST’,
data: {
action: ‘wt_log_visitor_action’,
wt_clicked_button_id: ”,
wt_user_action: button_action,
cookie_list: cookies
},
success: function(response) {
}
});
}
},
attachDelete: function() {
this.delete_link.click(function() {
CLI_Cookie.erase(CLI_ACCEPT_COOKIE_NAME);
for (var k in Cli_Data.nn_cookie_ids) {
CLI_Cookie.erase(Cli_Data.nn_cookie_ids[k]);
}
CLI.generate_user_preference_cookie();
CLI.generateConsent();
window.location.reload();
return false;
});
},
configButtons: function() {
//[cookie_button]
this.main_button.css(‘color’, this.settings.button_1_link_colour);
if (this.settings.button_1_as_button) {
this.main_button.css(‘background-color’, this.settings.button_1_button_colour);
this.main_button.hover(function() {
jQuery(this).css(‘background-color’, CLI.settings.button_1_button_hover);
}, function() {
jQuery(this).css(‘background-color’, CLI.settings.button_1_button_colour);
});
}
//[cookie_link]
this.main_link.css(‘color’, this.settings.button_2_link_colour);
if (this.settings.button_2_as_button) {
this.main_link.css(‘background-color’, this.settings.button_2_button_colour);
this.main_link.hover(function() {
jQuery(this).css(‘background-color’, CLI.settings.button_2_button_hover);
}, function() {
jQuery(this).css(‘background-color’, CLI.settings.button_2_button_colour);
});
}
//[cookie_reject]
this.reject_link.css(‘color’, this.settings.button_3_link_colour);
if (this.settings.button_3_as_button) {
this.reject_link.css(‘background-color’, this.settings.button_3_button_colour);
this.reject_link.hover(function() {
jQuery(this).css(‘background-color’, CLI.settings.button_3_button_hover);
}, function() {
jQuery(this).css(‘background-color’, CLI.settings.button_3_button_colour);
});
}
//[cookie_settings]
this.settings_link.css(‘color’, this.settings.button_4_link_colour);
if (this.settings.button_4_as_button) {
this.settings_link.css(‘background-color’, this.settings.button_4_button_colour);
this.settings_link.hover(function() {
jQuery(this).css(‘background-color’, CLI.settings.button_4_button_hover);
}, function() {
jQuery(this).css(‘background-color’, CLI.settings.button_4_button_colour);
});
}
//[cookie_accept_all]
this.accept_all_button.css(‘color’, this.settings.button_7_link_colour);
if (this.settings.button_7_as_button) {
this.accept_all_button.css(‘background-color’, this.settings.button_7_button_colour);
this.accept_all_button.hover(function() {
jQuery(this).css(‘background-color’, CLI.settings.button_7_button_hover);
}, function() {
jQuery(this).css(‘background-color’, CLI.settings.button_7_button_colour);
});
}
},
toggleBar: function() {
if (CLI_COOKIEBAR_AS_POPUP) {
this.barAsPopUp(1);
}
if (CLI.settings.cookie_bar_as == ‘widget’) {
this.barAsWidget(1);
}
if (this.settings.show_once_yn) {
setTimeout(function() {
if (!CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)) {
CLI.close_header();
}
}, CLI.settings.show_once);
}
this.showagain_elm.on(‘click keypress’, function(e) {
var key = e.which;
if (key === 1 || key === 13) {
e.preventDefault();
CLI.showagain_elm.slideUp(CLI.settings.animate_speed_hide, function() {
CLI.bar_elm.slideDown(CLI.settings.animate_speed_show);
CLI.refocusElement();
if (CLI_COOKIEBAR_AS_POPUP) {
CLI.showPopupOverlay();
}
});
}
});
},
configShowAgain: function() {
this.showagain_config = {
‘background-color’: this.settings.background,
‘color’: this.settings.text,
‘position’: ‘fixed’,
‘font-family’: this.settings.font_family
};
if (this.settings.border_on) {
var border_to_hide = ‘border-‘ + this.settings.notify_position_vertical;
this.showagain_config[‘border’] = ‘1px solid ‘ + this.l1hs(this.settings.border);
this.showagain_config[border_to_hide] = ‘none’;
}
var cli_win = jQuery(window);
var cli_winw = cli_win.width();
var showagain_x_pos = this.settings.showagain_x_position;
if (cli_winw 400 ? 500 : cli_winw – 20;
if (CLI_COOKIEBAR_AS_POPUP) //cookie bar as popup
{
var sa_pos = this.settings.popup_showagain_position;
var sa_pos_arr = sa_pos.split(‘-‘);
if (sa_pos_arr[1] == ‘left’) {
this.showagain_config.left = showagain_x_pos;
} else if (sa_pos_arr[1] == ‘right’) {
this.showagain_config.right = showagain_x_pos;
}
if (sa_pos_arr[0] == ‘top’) {
this.showagain_config.top = 0;
} else if (sa_pos_arr[0] == ‘bottom’) {
this.showagain_config.bottom = 0;
}
this.bar_config[‘position’] = ‘fixed’;
} else if (this.settings.cookie_bar_as == ‘widget’) {
this.showagain_config.bottom = 0;
if (this.settings.widget_position == ‘left’) {
this.showagain_config.left = showagain_x_pos;
} else if (this.settings.widget_position == ‘right’) {
this.showagain_config.right = showagain_x_pos;
}
} else {
if (this.settings.notify_position_vertical == “top”) {
this.showagain_config.top = ‘0’;
} else if (this.settings.notify_position_vertical == “bottom”) {
this.bar_config[‘position’] = ‘fixed’;
this.bar_config[‘bottom’] = ‘0’;
this.showagain_config.bottom = ‘0’;
}
if (this.settings.notify_position_horizontal == “left”) {
this.showagain_config.left = showagain_x_pos;
} else if (this.settings.notify_position_horizontal == “right”) {
this.showagain_config.right = showagain_x_pos;
}
}
this.showagain_elm.css(this.showagain_config);
},
configBar: function() {
var templateID = ”;
this.bar_config = {
‘background-color’: this.settings.background,
‘color’: this.settings.text,
‘font-family’: this.settings.font_family
};
if (jQuery(“.wt-cli-template”)[0]) {
var templateElm = jQuery(“.wt-cli-template”);
var templateClasses = templateElm.attr(‘class’);
var templateClasses = templateClasses.split(” “);
var matchingID = templateClasses.filter(function(value) {
return value.match(/bcli-style/);
});
templateID = matchingID[0];
this.bar_elm.attr(‘data-template-id’, templateID);
}
if (jQuery(“.wt-cli-category-widget”)[0]) {
this.bar_elm.addClass(‘wt-cli-category-widget-active’);
}
if (this.settings.cookie_setting_popup === false) {
this.barPopupStyle();
}
if (this.settings.notify_position_vertical == “top”) {
this.bar_config[‘top’] = ‘0’;
if (this.settings.header_fix === true) {
this.bar_config[‘position’] = ‘fixed’;
}
} else {
this.bar_config[‘bottom’] = ‘0’;
}
this.configShowAgain();
this.bar_elm.css(this.bar_config).hide();
},
l1hs: function(str) {
if (str.charAt(0) == “#”) {
str = str.substring(1, str.length);
} else {
return “#” + str;
}
return this.l1hs(str);
},
close_header: function() {
CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME, ‘yes’, CLI_ACCEPT_COOKIE_EXPIRE);
if (CLI.settings.accept_all == true) {
CLI.enableAllCookies();
}
CLI.accept_close();
this.hideHeader();
CLI.saveLog(‘accept’);
},
accept_close: function() {
this.hidePopupOverlay();
CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME, ‘yes’, CLI_ACCEPT_COOKIE_EXPIRE);
if (this.settings.notify_animate_hide) {
this.bar_elm.slideUp(this.settings.animate_speed_hide, cliBlocker.runScripts);
} else {
this.bar_elm.hide(0, cliBlocker.runScripts);
}
if (this.settings.showagain_tab) {
this.showagain_elm.slideDown(this.settings.animate_speed_show);
this.showagain_elm.focus();
}
this.generate_user_preference_cookie();
this.generateConsent();
CLI.cookieLawInfoRunCallBacks();
if (this.settings.accept_close_reload === true) {
this.reload_current_page();
}
return false;
},
reject_close: function() {
this.hidePopupOverlay();
for (var k in Cli_Data.nn_cookie_ids) {
CLI_Cookie.erase(Cli_Data.nn_cookie_ids[k]);
}
CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME, ‘no’, CLI_ACCEPT_COOKIE_EXPIRE);
if (this.settings.notify_animate_hide) {
this.bar_elm.slideUp(this.settings.animate_speed_hide, cliBlocker.runScripts);
} else {
this.bar_elm.hide(0, cliBlocker.runScripts);
}
if (this.settings.showagain_tab) {
this.showagain_elm.slideDown(this.settings.animate_speed_show);
this.showagain_elm.focus();
}
this.generate_user_preference_cookie();
CLI.generateConsent();
if (this.settings.reject_close_reload === true) {
this.reload_current_page();
}
return false;
},
generate_user_preference_cookie: function() {
var cli_user_preference_arr = new Array();
var cli_user_preference_val = ”;
if (CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)) {
cli_user_preference_arr.push(‘cli-‘ + CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME));
}
jQuery(‘.cli-user-preference-checkbox’).each(function() {
if (jQuery(this).is(‘:checked’)) {
cli_user_preference_arr.push(jQuery(this).attr(‘data-id’) + ‘-yes’);
} else {
cli_user_preference_arr.push(jQuery(this).attr(‘data-id’) + ‘-no’);
}
});
if (cli_user_preference_arr.length > 0) {
cli_user_preference_val = Cli_Data.current_lang + ‘-‘ + cli_user_preference_arr.join(‘-‘);
}
CLI_Cookie.set(‘cli_user_preference’, cli_user_preference_val, CLI_ACCEPT_COOKIE_EXPIRE);
},
isBase64: function(str) {
if (str === ” || str.trim() === ”) {
return false;
}
try {
return btoa(atob(str)) == str;
} catch (err) {
return false;
}
},
generateConsent: function() {
var preferenceCookie = CLI_Cookie.read(CLI_PREFERNCE_COOKIE);
cliConsent = {};
if (preferenceCookie !== null) {
if (CLI.isBase64(preferenceCookie)) {
cliConsent = window.atob(preferenceCookie);
} else {
cliConsent = decodeURIComponent(preferenceCookie);
}
cliConsent = JSON.parse(cliConsent);
}
cliConsent.ver = Cli_Data.consentVersion;
categories = [];
jQuery(‘.cli-user-preference-checkbox’).each(function() {
categoryVal = ”;
cli_chkbox_data_id = jQuery(this).attr(‘data-id’);
cli_chkbox_data_id = cli_chkbox_data_id.replace(‘checkbox-‘, ”);
if (jQuery(this).is(‘:checked’)) {
categoryVal = ‘true’;
} else {
categoryVal = ‘false’;
}
cliConsent[cli_chkbox_data_id] = categoryVal;
});
cliConsent = JSON.stringify(cliConsent);
cliConsent = window.btoa(cliConsent);
CLI_Cookie.set(CLI_PREFERNCE_COOKIE, cliConsent, CLI_ACCEPT_COOKIE_EXPIRE);
},
cliRenewConsent: function() {
var preferenceCookie = CLI_Cookie.read(CLI_PREFERNCE_COOKIE);
if (preferenceCookie !== null) {
if (CLI.isBase64(preferenceCookie)) {
cliConsent = window.atob(preferenceCookie);
} else {
cliConsent = decodeURIComponent(preferenceCookie);
}
cliConsent = JSON.parse(cliConsent);
consentCurrentVersion = parseInt(cliConsent.ver);
consentRenewVersion = parseInt(Cli_Data.consentVersion);
if (typeof(cliConsent.ver) !== ‘undefined’) {
if (cliConsent.ver !== Cli_Data.consentVersion) {
CLI_Cookie.erase(CLI_ACCEPT_COOKIE_NAME);
CLI_Cookie.erase(CLI_PREFERNCE_COOKIE);
CLI_Cookie.erase(‘cli_user_preference’);
for (var k in Cli_Data.nn_cookie_ids) {
CLI_Cookie.erase(Cli_Data.nn_cookie_ids[k]);
}
}
}
}
},
reload_current_page: function() {
window.location.reload();
},
add_clear_cache_url_query: function() {
var cli_rand = new Date().getTime() / 1000;
var cli_url = window.location.href;
var cli_hash_arr = cli_url.split(‘#’);
var cli_urlparts = cli_hash_arr[0].split(‘?’);
if (cli_urlparts.length >= 2) {
var cli_url_arr = cli_urlparts[1].split(‘&’);
cli_url_temp_arr = new Array();
for (var cli_i = 0; cli_i 0 ? ‘&’ : ”) + ‘cli_action=’;
} else {
cli_url = cli_hash_arr[0] + ‘?cli_action=’;
}
cli_url += cli_rand;
if (cli_hash_arr.length > 1) {
cli_url += ‘#’ + cli_hash_arr[1];
}
return cli_url;
},
closeOnScroll: function() {
if (window.pageYOffset > 100 && !CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)) {
if (CLI.settings.accept_all == true) {
CLI.enableAllCookies();
}
CLI.accept_close();
CLI.saveLog(‘accept’);
if (CLI.settings.scroll_close_reload === true) {
window.location.reload();
}
window.removeEventListener(“scroll”, CLI.closeOnScroll, false);
}
},
displayHeader: function() {
if (this.settings.notify_animate_show) {
this.bar_elm.slideDown(this.settings.animate_speed_show);
} else {
this.bar_elm.show();
CLI.refocusElement();
}
this.showagain_elm.hide();
if (CLI_COOKIEBAR_AS_POPUP) {
this.showPopupOverlay();
}
},
hideHeader: function() {
if (this.settings.showagain_tab) {
if (this.settings.notify_animate_show) {
this.showagain_elm.slideDown(this.settings.animate_speed_show);
} else {
this.showagain_elm.show();
}
} else {
this.showagain_elm.hide();
}
this.bar_elm.slideUp(this.settings.animate_speed_show);
this.hidePopupOverlay();
},
hidePopupOverlay: function() {
jQuery(‘body’).removeClass(“cli-barmodal-open”);
jQuery(“.cli-popupbar-overlay”).removeClass(“cli-show”);
},
showPopupOverlay: function() {
if (this.bar_elm.length) {
if (this.settings.popup_overlay) {
if (!(this.main_link.hasClass(‘cli-minimize-bar’))) {
jQuery(‘body’).addClass(“cli-barmodal-open”);
jQuery(“.cli-popupbar-overlay”).addClass(“cli-show”);
}
}
}
},
barAsWidget: function(a) {
var cli_elm = this.bar_elm;
cli_elm.attr(‘data-cli-type’, ‘widget’);
var cli_win = jQuery(window);
var cli_winh = cli_win.height() – 40;
var cli_winw = cli_win.width();
var cli_defw = cli_winw > 465 ? 445 : cli_winw – 60;
cli_elm.css({
‘width’: cli_defw,
‘height’: ‘auto’,
‘max-height’: cli_winh,
‘overflow’: ‘auto’,
‘position’: ‘fixed’,
‘box-shadow’: ‘rgba(0,0,0,.5) 0px 5px 10px’,
‘box-sizing’: ‘border-box’
});
if (this.settings.widget_position == ‘left’) {
cli_elm.css({
‘left’: ’30px’,
‘right’: ‘auto’,
‘bottom’: ’30px’,
‘top’: ‘auto’
});
} else {
cli_elm.css({
‘left’: ‘auto’,
‘right’: ’30px’,
‘bottom’: ’30px’,
‘top’: ‘auto’
});
}
if (a) {
this.setResize();
}
},
barAsPopUp: function(a) {
if (typeof cookie_law_info_bar_as_popup === ‘function’) {
return false;
}
var cli_elm = this.bar_elm;
cli_elm.attr(‘data-cli-type’, ‘popup’);
var cli_win = jQuery(window);
var cli_winh = cli_win.height();
var cli_defh = cli_winh > 500 ? 500 : cli_winh;
var cli_winw = cli_win.width();
var cli_defw = cli_winw > 700 ? 500 : cli_winw – 20;
//var cli_defw=cli_defw<500 ? 500 : cli_defw;
cli_elm.css({
'width': cli_defw,
'height': 'auto',
'max-height': cli_defh,
'bottom': '',
'top': '50%',
'left': '50%',
'transform': 'translate(-50%, -50%)',
'overflow': 'auto'
});
if (a) {
this.setResize();
}
},
setResize: function() {
var resizeTmr = null;
jQuery(window).resize(function() {
clearTimeout(resizeTmr);
resizeTmr = setTimeout(function() {
if (CLI_COOKIEBAR_AS_POPUP) {
CLI.barAsPopUp();
}
if (CLI.settings.cookie_bar_as == 'widget') {
CLI.barAsWidget();
}
CLI.configShowAgain();
}, 500);
});
},
isValidHex: function(color) {
if (!color || typeof color !== 'string') return false;
// Validate hex values
if (color.substring(0, 1) === '#') color = color.substring(1);
switch (color.length) {
case 3:
return /^[0-9A-F]{3}$/i.test(color);
case 6:
return /^[0-9A-F]{6}$/i.test(color);
case 8:
return /^[0-9A-F]{8}$/i.test(color);
default:
return false;
}
return false;
},
ColorLuminance: function(hex, lum) {
// validate hex string
hex = String(hex).replace(/[^0-9a-f]/gi, '');
if (hex.length < 6) {
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
}
lum = lum || 0;
// convert to decimal and change luminosity
var rgb = "#",
c, i;
for (i = 0; i store the red, green, blue values in separate variables
color = color.match(/^rgba?((d+),s*(d+),s*(d+)(?:,s*(d+(?:.d+)?))?)$/);
r = color[1];
g = color[2];
b = color[3];
} else {
// If RGB –> Convert it to HEX: http://gist.github.com/983661
color = +(“0x” + color.slice(1).replace(
color.length > 16;
g = color >> 8 & 255;
b = color & 255;
}
// HSP (Highly Sensitive Poo) equation from http://alienryderflex.com/hsp.html
hsp = Math.sqrt(
0.299 * (r * r) +
0.587 * (g * g) +
0.114 * (b * b)
);
// Using the HSP value, determine whether the color is light or dark
if (hsp > 127.5) {
return ‘light’;
} else {
return ‘dark’;
}
},
barPopupStyle: function() {
var acceptBtn = jQuery(‘.cli_action_button[data-cli_action=accept]’);
var primaryColor = this.settings.button_1_button_colour;
var primaryLinkColor = this.settings.button_1_link_colour;
var barColor = this.settings.background;
var extractedStyle = ”;
var primaryBtnStyle = this.settings.button_1_style;
Object.keys(primaryBtnStyle).forEach(function(element) {
extractedStyle += primaryBtnStyle[element][0] + ‘:’ + primaryBtnStyle[element][1] + ‘;’;
});
var shadeColor;
if (!CLI.isValidHex(barColor)) {
barColor = CLI.rgb2hex(barColor);
}
if (barColor == “#000000”) {
shadeColor = ‘#191919’;
} else {
var intensity = CLI.lightOrDark(barColor);
if (intensity == ‘light’) {
shadeColor = CLI.ColorLuminance(barColor, -0.05);
} else {
shadeColor = CLI.ColorLuminance(barColor, 0.4);
}
}
jQuery(“”)
.prop(“type”, “text/css”)
.html(”
#cookie-law-info-bar .cli-switch input:checked + .cli-slider{
background-color: ” + primaryColor + “;
}
#cookie-law-info-bar .cli-tab-header{
background-color: ” + shadeColor + ”
}
#cookie-law-info-bar .cli-switch .cli-slider:before{
background-color: ” + barColor + “;
}
#cookie-law-info-bar .cli-tab-footer .cli-btn{
background-color:” + primaryColor + “;” + extractedStyle + ”
}
“).appendTo(“head”);
},
enableAllCookies: function() {
jQuery(‘.cli-user-preference-checkbox’).each(function() {
var cli_chkbox_elm = jQuery(this);
var cli_chkbox_data_id = cli_chkbox_elm.attr(‘data-id’);
if (cli_chkbox_data_id != ‘checkbox-necessary’) {
cli_chkbox_elm.prop(‘checked’, true);
CLI_Cookie.set(‘cookielawinfo-‘ + cli_chkbox_data_id, ‘yes’, CLI_ACCEPT_COOKIE_EXPIRE);
}
});
},
disableAllCookies: function() {
jQuery(‘.cli-user-preference-checkbox’).each(function() {
var cli_chkbox_elm = jQuery(this);
var cli_chkbox_data_id = cli_chkbox_elm.attr(‘data-id’);
cliCategorySlug = cli_chkbox_data_id.replace(‘checkbox-‘, ”);
if (Cli_Data.strictlyEnabled.indexOf(cliCategorySlug) === -1) {
cli_chkbox_elm.prop(‘checked’, false);
CLI_Cookie.set(‘cookielawinfo-‘ + cli_chkbox_data_id, ‘no’, CLI_ACCEPT_COOKIE_EXPIRE);
}
});
},
privacyReadmore: function() {
var originalHtml = ”;
Trunc = {
addReadmore: function(textBlock) {
if (textBlock.html().length > Cli_Data.privacy_length) {
jQuery(‘.cli-privacy-readmore’).show();
} else {
jQuery(‘.cli-privacy-readmore’).hide();
}
},
truncateText: function(textBlock) {
var strippedText = jQuery(‘
strippedText.find(‘table’).remove();
textBlock.html(strippedText.html());
currentText = textBlock.text();
if (currentText.trim().length > Cli_Data.privacy_length) {
var newStr = currentText.substring(0, Cli_Data.privacy_length);
textBlock.empty().html(newStr).append(‘…’);
}
},
replaceText: function(textBlock, original) {
return textBlock.html(original);
}
};
jQuery(‘.cli-privacy-content .cli-privacy-content-text’).each(function() {
var el = jQuery(this);
clone = el.clone();
originalHtml = clone.html();
Trunc.addReadmore(el);
Trunc.truncateText(el);
});
jQuery(document).on(‘click keypress’, ‘a.cli-privacy-readmore’, function(e) {
var key = e.which;
e.preventDefault();
if (key === 1 || key === 13) {
var currentElement = jQuery(this);
var privacyElement = currentElement.closest(‘.cli-privacy-overview’);
var privacyContent = privacyElement.find(‘.cli-privacy-content-text’);
if (privacyElement.hasClass(‘cli-collapsed’)) {
Trunc.truncateText(privacyContent);
privacyElement.removeClass(‘cli-collapsed’);
privacyContent.css(‘height’, ‘100%’);
} else {
privacyElement.addClass(‘cli-collapsed’);
Trunc.replaceText(privacyContent, originalHtml);
}
}
});
},
checkCategories: function() {
var cliAllowedCategories = [];
var cli_categories = {};
jQuery(‘.cli-user-preference-checkbox’).each(function() {
var status = false;
cli_chkbox_elm = jQuery(this);
cli_chkbox_data_id = cli_chkbox_elm.attr(‘data-id’);
cli_chkbox_data_id = cli_chkbox_data_id.replace(‘checkbox-‘, ”);
cli_chkbox_data_id_trimmed = cli_chkbox_data_id.replace(‘-‘, ‘_’)
if (jQuery(cli_chkbox_elm).is(‘:checked’)) {
status = true;
cliAllowedCategories.push(cli_chkbox_data_id);
}
cli_categories[cli_chkbox_data_id_trimmed] = status;
});
CLI.allowedCategories = cliAllowedCategories;
CLI.consent = cli_categories;
},
cookieLawInfoRunCallBacks: function() {
this.checkCategories();
if (CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == ‘yes’) {
if (“function” == typeof CookieLawInfo_Accept_Callback) {
CookieLawInfo_Accept_Callback();
}
}
},
addStyleAttribute: function() {
var bar = this.bar_elm;
var styleClass = ”;
if (jQuery(bar).find(‘.cli-bar-container’).length > 0) {
styleClass = jQuery(‘.cli-bar-container’).attr(‘class’);
styleClass = jQuery.trim(styleClass.replace(‘cli-bar-container’, ”));
jQuery(bar).attr(‘data-cli-style’, styleClass);
}
},
getParameterByName: function(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[[]]/g, ‘$&’);
var regex = new RegExp(‘[?&]’ + name + ‘(=([^&#]*)|&|#|$)’),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return ”;
return decodeURIComponent(results[2].replace(/+/g, ‘ ‘));
},
acceptPageNavigation: function() {
if (Boolean(this.settings.accept_close_page_navigation) === true && !CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)) {
jQuery(document).on(‘click’, ‘a’, function() {
var href = jQuery(this).attr(‘href’);
if (href !== undefined) {
CLI.close_header();
}
});
}
},
refocusElement: function() {
if (this.banner_heading.length > 0) {
this.banner_heading.focus();
} else {
this.bar_elm.find(‘a’).first().focus();
}
}
}
var cliBlocker = {
blockingStatus: true,
geoIP: false,
scriptsLoaded: false,
ccpaEnabled: false,
ccpaRegionBased: false,
ccpaApplicable: false,
ccpaBarEnabled: false,
cliShowBar: true,
isBypassEnabled: CLI.getParameterByName(‘cli_bypass’),
checkPluginStatus: function(callbackA, callbackB) {
cliBlocker.ccpaEnabled = Boolean(Cli_Data.ccpaEnabled);
cliBlocker.ccpaRegionBased = Boolean(Cli_Data.ccpaRegionBased);
cliBlocker.ccpaBarEnabled = Boolean(Cli_Data.ccpaBarEnabled);
if (cliBlocker.ccpaEnabled === true) {
cliBlocker.ccpaApplicable = true;
if (Cli_Data.ccpaType === ‘ccpa’) {
cliBlocker.blockingStatus = false;
cliBlocker.cliShowBar = false;
if (cliBlocker.ccpaBarEnabled === true) {
cliBlocker.cliShowBar = true;
cliBlocker.blockingStatus = true;
}
}
}
if (Cli_Data.geoIP === ‘enabled’ || (cliBlocker.ccpaEnabled === true && cliBlocker.ccpaRegionBased === true)) {
if (Boolean(Cli_Data.use_custom_geolocation_api) === true) {
cliBlocker.tryCustomGeoLocationService(callbackA, callbackB);
} else {
jQuery.getJSON(‘https://ipapi.co/json/’, function(data) {
cliBlocker.geolocationHandler(data, callbackA, callbackB);
}).fail(function() {
cliBlocker.tryCustomGeoLocationService(callbackA, callbackB);
});
}
} else {
if (cliBlocker.isBypassEnabled === “1”) {
cliBlocker.blockingStatus = false;
}
callbackA();
callbackB();
}
},
tryCustomGeoLocationService: function(callbackA, callbackB) {
jQuery.getJSON(Cli_Data.custom_geolocation_api, function(data) {
cliBlocker.geolocationHandler(data, callbackA, callbackB);
});
},
geolocationHandler: function(data, callbackA, callbackB) {
var euCountries = Cli_Data.eu_countries;
if ((data.in_eu === false) && (euCountries.indexOf(data.country) === -1)) {
if (Cli_Data.geoIP === ‘enabled’) {
cliBlocker.blockingStatus = false;
cliBlocker.cliShowBar = false;
} else {
if (Cli_Data.ccpaType !== ‘ccpa’) {
cliBlocker.blockingStatus = true;
cliBlocker.cliShowBar = true;
}
}
} else {
jQuery(‘body’).addClass(‘wt-cli-geoip-on wt-cli-eu-country’);
}
if (cliBlocker.ccpaEnabled === true) {
if (cliBlocker.ccpaRegionBased === true && data.region_code !== ‘CA’) {
cliBlocker.ccpaApplicable = false;
if (Cli_Data.ccpaType === ‘ccpa’) {
cliBlocker.cliShowBar = false;
cliBlocker.blockingStatus = false;
}
jQuery(‘.wt-cli-ccpa-opt-out,.wt-cli-ccpa-checkbox,.wt-cli-ccpa-element’).remove();
} else {
cliBlocker.ccpaApplicable = true;
if (cliBlocker.ccpaBarEnabled === true) {
cliBlocker.cliShowBar = true;
}
}
}
if (cliBlocker.blockingStatus === false) {
if (“function” == typeof CookieLawInfo_Accept_Callback) {
CookieLawInfo_Accept_Callback();
}
jQuery(‘body’).addClass(‘wt-cli-geoip-on wt-cli-non-eu-country’);
CLI.hidePopupOverlay();
if (cliBlocker.ccpaApplicable !== true) {
cliBlocker.removeAllPreferenceCookies();
jQuery(‘.wt-cli-geoip-on.wt-cli-non-eu-country’).find(‘.wt-cli-element’).remove();
}
}
callbackA();
callbackB();
},
cookieBar: function() {
if (cliBlocker.cliShowBar === false) {
jQuery(‘.wt-cli-cookie-bar-container’).remove();
} else {
jQuery(‘.wt-cli-cookie-bar-container’).show();
if (!CLI_Cookie.exists(CLI_ACCEPT_COOKIE_NAME)) {
CLI.displayHeader();
} else {
CLI.hideHeader();
}
}
},
removeAllPreferenceCookies: function() {
cliPreferenceCookies = Cli_Data.cookielist;
for (var key in cliPreferenceCookies) {
CLI_Cookie.erase(‘cookielawinfo-checkbox-‘ + key);
}
},
removeCookieByCategory: function() {
if (cliBlocker.blockingStatus === true) {
if (CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) !== null) {
var non_necessary_cookies = Cli_Data.non_necessary_cookies;
for (var key in non_necessary_cookies) {
currentCategory = key;
if (CLI.allowedCategories.indexOf(currentCategory) === -1) {
var nonNecessaryCookies = non_necessary_cookies[currentCategory];
for (var i = 0; i < nonNecessaryCookies.length; i++) {
if (CLI_Cookie.read(nonNecessaryCookies[i]) !== null) {
CLI_Cookie.erase(nonNecessaryCookies[i]);
}
}
}
}
}
}
},
runScripts: function() {
srcReplaceableElms = ['iframe', 'IFRAME', 'EMBED', 'embed', 'OBJECT', 'object', 'IMG', 'img', 'SOURCE', 'source'];
var genericFuncs = {
renderByElement: function(callback) {
cliScriptFuncs.renderScripts();
cliHtmlElmFuncs.renderSrcElement();
callback();
cliBlocker.scriptsLoaded = true;
},
reviewConsent: function() {
jQuery(document).on('click', '.cli_manage_current_consent,.wt-cli-manage-consent-link', function() {
CLI.bar_elm.slideDown(CLI.settings.animate_speed_show);
});
}
};
var cliScriptFuncs = {
// trigger DOMContentLoaded
scriptsDone: function() {
if (Boolean(Cli_Data.triggerDomRefresh) === true) {
var DOMContentLoadedEvent = document.createEvent('Event')
DOMContentLoadedEvent.initEvent('DOMContentLoaded', true, true)
window.document.dispatchEvent(DOMContentLoadedEvent)
}
},
seq: function(arr, callback, index) {
// first call, without an index
if (typeof index === 'undefined') {
index = 0
}
arr[index](function() {
index++
if (index === arr.length) {
callback()
} else {
cliScriptFuncs.seq(arr, callback, index)
}
})
},
/* script runner */
insertScript: function($script, callback) {
var s = '';
var allowedAttributes = [
'data-cli-class',
'data-cli-label',
'data-cli-placeholder',
'data-cli-script-type',
'data-cli-src'
];
var scriptType = $script.getAttribute('data-cli-script-type');
var elementPosition = $script.getAttribute('data-cli-element-position');
var isBlock = $script.getAttribute('data-cli-block');
var blockIfCCPA = $script.getAttribute('data-cli-block-if-ccpa-optout');
var s = document.createElement('script');
var ccpaOptedOut = cliBlocker.ccpaOptedOut();
s.type = 'text/plain';
if ($script.async) {
s.async = $script.async;
}
if ($script.defer) {
s.defer = $script.defer;
}
if ($script.src) {
s.onload = callback
s.onerror = callback
s.src = $script.src
} else {
s.textContent = $script.innerText
}
if ($script.hasAttribute('data-cli-id')) {
s.id = $script.getAttribute('data-cli-id');
}
var attrs = jQuery($script).prop("attributes");
for (var ii = 0; ii 0) {
var runList = []
var typeAttr
Array.prototype.forEach.call($scripts, function($script) {
// only run script tags without the type attribute
// or with a javascript mime attribute value
typeAttr = $script.getAttribute(‘type’)
var elmType = $script.tagName;
runList.push(function(callback) {
cliScriptFuncs.insertScript($script, callback)
})
})
cliScriptFuncs.seq(runList, cliScriptFuncs.scriptsDone);
}
}
};
var cliHtmlElmFuncs = {
renderSrcElement: function() {
var blockingElms = document.querySelectorAll(‘[data-cli-class=”cli-blocker-script”]’);
var ccpaOptedOut = cliBlocker.ccpaOptedOut();
for (var i = 0; i < blockingElms.length; i++) {
var currentElm = blockingElms[i];
var elmType = currentElm.tagName;
if (srcReplaceableElms.indexOf(elmType) !== -1) {
var elmCategory = currentElm.getAttribute('data-cli-script-type');
var isBlock = currentElm.getAttribute('data-cli-block');
var blockIfCCPA = currentElm.getAttribute('data-cli-block-if-ccpa-optout');
if (cliBlocker.blockingStatus === true) {
if ((CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == 'yes' && CLI.allowedCategories.indexOf(elmCategory) !== -1) || (CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == null && isBlock === 'false')) {
if (cliBlocker.ccpaApplicable == true && blockIfCCPA === 'true' && ccpaOptedOut === true) {
this.addPlaceholder(currentElm);
} else {
this.replaceSrc(currentElm);
}
} else {
if (Cli_Data.ccpaType === 'ccpa' && blockIfCCPA !== 'true') {
this.replaceSrc(currentElm);
} else {
this.addPlaceholder(currentElm);
}
}
} else {
if (cliBlocker.ccpaApplicable == true && blockIfCCPA === 'true') {
if (ccpaOptedOut === true || CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME) == null) {
this.addPlaceholder(currentElm);
} else {
this.replaceSrc(currentElm);
}
} else {
this.replaceSrc(currentElm);
}
}
}
}
},
addPlaceholder: function(htmlElm) {
if (jQuery(htmlElm).prev('.wt-cli-iframe-placeholder').length === 0) {
var htmlElemName = htmlElm.getAttribute('data-cli-label');
var htmlElemType = htmlElm.getAttribute('data-cli-placeholder');
var htmlElemWidth = htmlElm.getAttribute('width');
var htmlElemHeight = htmlElm.getAttribute('height');
if (htmlElemWidth == null) {
htmlElemWidth = htmlElm.offsetWidth;
}
if (htmlElemHeight == null) {
htmlElemHeight = htmlElm.offsetHeight;
}
pixelPattern = /px/;
htmlElemWidth = ((pixelPattern.test(htmlElemWidth)) ? htmlElemWidth : htmlElemWidth + 'px');
htmlElemHeight = ((pixelPattern.test(htmlElemHeight)) ? htmlElemHeight : htmlElemHeight + 'px');
var addPlaceholder = '
‘;
addPlaceholder.width = htmlElemWidth;
addPlaceholder.height = htmlElemHeight;
if (htmlElm.tagName !== ‘IMG’) {
jQuery(addPlaceholder).insertBefore(htmlElm);
}
htmlElm.removeAttribute(‘src’);
htmlElm.style.display = ‘none’;
}
},
replaceSrc: function(htmlElm) {
if (!htmlElm.hasAttribute(‘src’)) {
var htmlElemSrc = htmlElm.getAttribute(‘data-cli-src’);
htmlElm.setAttribute(‘src’, htmlElemSrc);
if (jQuery(htmlElm).prev(‘.wt-cli-iframe-placeholder’).length > 0) {
jQuery(htmlElm).prev(‘.wt-cli-iframe-placeholder’).remove();
}
htmlElm.style.display = ‘block’;
}
}
};
genericFuncs.reviewConsent();
genericFuncs.renderByElement(cliBlocker.removeCookieByCategory);
},
ccpaOptedOut: function() {
var ccpaOptedOut = false;
var preferenceCookie = CLI_Cookie.read(CLI_PREFERNCE_COOKIE);
if (preferenceCookie !== null) {
if (CLI.isBase64(preferenceCookie)) {
cliConsent = window.atob(preferenceCookie);
} else {
cliConsent = decodeURIComponent(preferenceCookie);
}
cliConsent = JSON.parse(cliConsent);
if (typeof cliConsent.ccpaOptout !== ‘undefined’) {
ccpaOptedOut = cliConsent.ccpaOptout;
}
}
return ccpaOptedOut;
}
}
jQuery(document).ready(function() {
if (typeof cli_cookiebar_settings != ‘undefined’) {
CLI.set({
settings: cli_cookiebar_settings
});
cliBlocker.checkPluginStatus(cliBlocker.cookieBar, cliBlocker.runScripts);
} else {
var data = {
action: ‘cli_get_settings_json’,
};
jQuery.ajax({
url: Cli_Data.ajax_url,
data: data,
dataType: ‘json’,
type: ‘GET’,
success: function(response) {
CLI.set({
settings: response
});
cliBlocker.checkPluginStatus(cliBlocker.cookieBar, cliBlocker.runScripts);
}
});
}
});
Comment
members can comment. Please login to comment. Login