/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.5.2
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2019 MH Sub I, LLC dba vBulletin. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.precache=$.merge(window.vBulletin.options.precache,["block_eu_visitors","enable_privacy_guest","privacy_consent_cookie_name","privacyurl"]);(function(D){var A={cookieName:"",cookieExpireDays:3650,};function G(N){var M=D(N.target).closest(".js-privacy-consent-banner__banner");if(!M.length){N.preventDefault()}}var H=D.debounce(100,function(M){B(D(".js-privacy-consent-banner__banner"))});function B(N){var M=Math.max(document.documentElement.clientWidth,window.innerWidth||0);h=Math.max(document.documentElement.clientHeight,window.innerHeight||0);if(((M&&M<=415)||(h&&h<=415))||(M&&h&&M<=650&&h<=650)){var O="b-modal-banner__banner--top b-modal-banner__banner--center b-modal-banner__banner--bottom b-modal-banner__banner--cover";if(!N.data("restore-position-class")){D.each(O.split(" "),function(P,Q){if(N.is("."+Q)){N.data("restore-position-class",Q)}})}N.removeClass(O).addClass("b-modal-banner__banner--cover")}else{N.removeClass("b-modal-banner__banner--cover").addClass(N.data("restore-position-class"))}}function J(){var M=D(".js-privacy-consent-banner__banner"),N=D(".js-privacy-consent-banner__overlay");B(M);M.removeClass("h-hide-imp");N.removeClass("h-hide-imp");D("html, body").addClass("b-modal-banner--disabled");try{document.addEventListener("touchmove",G,{capture:true,passive:false})}catch(O){}D(window).off("resize orientationchange",H).on("resize orientationchange",H)}function I(){var M=D(".js-privacy-consent-banner__banner"),N=D(".js-privacy-consent-banner__overlay");M.remove();N.remove();D("html, body").removeClass("b-modal-banner--disabled");try{document.removeEventListener("touchmove",G,{capture:true,passive:false})}catch(O){}D(window).off("resize orientationchange",H)}function K(){var M=Math.round((new Date()).getTime()/1000);D.cookie(A.cookieName,"INEUCONSENTED:"+M,{path:pageData.cookie_path,domain:pageData.cookie_domain,expires:A.cookieExpireDays});I();vBulletin.AJAX({call:"/ajax/api/user/updateGuestPrivacyConsent",data:{consent:1},success:function(){}});return false}function C(M){M.stopPropagation()}function E(){if(!vBulletin.options.get("enable_privacy_guest")){return }if(pageData.userid>0){return }var O=vBulletin.options.get("privacy_consent_cookie_name");if(O!=""){A.cookieName=O}else{A.cookieName=pageData.cookie_prefix+"privacy_consent_guest"}if(D.cookie(A.cookieName)){return }var M=vBulletin.options.get("privacyurl");if(M){if(vBulletin.getAbsoluteUrl(M)==vBulletin.getAbsoluteUrl(document.location.href)){return }}if(pageData.eustatus=="1"||pageData.eustatus=="0"){D(".js-privacy-consent-banner__banner .js-privacy-consent-banner__button").off("click",K).on("click",K);D(".js-privacy-consent-banner__banner").off("click",C).on("click",C);D(".js-privacy-consent-banner__overlay").off("click",C).on("click",C);J()}else{var N=Math.round((new Date()).getTime()/1000);D.cookie(A.cookieName,"NOTINEU:"+N,{path:pageData.cookie_path,domain:pageData.cookie_domain,expires:A.cookieExpireDays})}}function F(){if(!vBulletin.options.get("block_eu_visitors")){return false}if(pageData.eustatus=="1"){D(".js-privacy-consent-banner__banner").off("click",C).on("click",C);D(".js-privacy-consent-banner__overlay").off("click",C).on("click",C);J();return true}return false}function L(){var M=F();if(!M){E()}}L()})(jQuery);