/* giorgioarmanibeauty.eshops.hk *//* cookie-loreal.php *//* loreal-buys/en *//* 220111 */if(typeof $ != "undefined"){ $(document).ready(function(){ $('head').append($(document.createElement('style')).html('.cookie-disclaimer-box { /* position: fixed; */ bottom: 0; left: 0; width: 100%; box-sizing: border-box; background-color: #e0e0e0; line-height: normal; z-index: 100; } .cookie-disclaimer-box .disclaimer-table { padding: 5px 0 10px 0; padding: 2px 0; margin: 0 auto; border-collapse: separate; } .cookie-disclaimer-box td { padding: 0 5px; font-family: arial, sans-serif; color: #333333; font-size: 12px; text-align: left; line-height: 12px; } .cookie-disclaimer-box .button { white-space: nowrap; background: #ffffff; padding: 5px 15px; border-radius: 2px; border: 1px solid #bbbbbb; font-family: arial, sans-serif; color: #333333; display: inline-block; cursor: pointer; text-decoration: none; margin: 2px; display: inline-flex; /* min-width: 80px; height: 30px; */ justify-content: center; align-items: center; } .site--brand .cookie-disclaimer-box button.button { min-width: 80px; height: 30px; } .cookie-disclaimer-box .button:hover { text-decoration: none; } .cookie-disclaimer-box .td-1 { padding-right: 0; } .cookie-disclaimer-box .td-2 { text-align: left; } @media (max-width: 768px){ .cookie-disclaimer-box .td-2 { display: block; } } @media (max-width: 480px){ .cookie-disclaimer-box .td-1 { display: block; padding-right: 10px; } .cookie-disclaimer-box .td-1 table { margin-left: auto; margin-right: auto; } .cookie-disclaimer-box .td-2 { display: table-cell; padding-top: 0; } }')); }); }if(typeof $ != "undefined"){ function getCookieDisclaimerCookie(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie); var ca = decodedCookie.split(';'); for(var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); } } return ""; } function cookie_box_resize(reset){ if(window.fs_cookie_footer_clear){ $(':root').css('--cookie-disclaimer-height', '0px'); return; } $(':root').css('--cookie-disclaimer-height', ($('.cookie-disclaimer-box').length ? $('.cookie-disclaimer-box').outerHeight() : 0)+'px'); if($('.checkdiv').length){ $('.checkdiv').css({ 'padding-bottom': reset ? 0 : $('.cookie-disclaimer-box').outerHeight() }); } if(window.fs_cookie_footer){ for(var i in window.fs_cookie_footer){ for(var j in window.fs_cookie_footer[i]){ switch(j){ case 'transition-duration': $(i).css(j, reset ? window.fs_cookie_footer[i][j] : '0.4s'); break; default: $(i).css(j, window.fs_cookie_footer[i][j]+(reset ? 0 : parseInt($('.cookie-disclaimer-box').outerHeight()))); } } } } if(reset){ $('.cookie-disclaimer-box').slideToggle(400, function(){ $(':root').css('--cookie-disclaimer-height', '0px'); $('.cookie-disclaimer-box').remove(); }); window.fs_cookie_footer_clear = true; } } $(function(){ setTimeout(function(){ cookie_box_resize() }, 400); $(window).resize(function(){ cookie_box_resize(); }); if(getCookieDisclaimerCookie("cookie_brand_disclaimer_giorgioarmanibeauty_eshops_hk")){ return; } var cookie_container = $('body'); var cookie_css_change = {}; if($('#bottom_box').length){ cookie_container = $('#bottom_box'); cookie_css_change['padding-bottom'] = parseInt($('#bottom_box .bottom_box_text').css('padding-bottom')) - 10; }else if($('footer').length){ cookie_container = $('footer'); window.fs_cookie_footer = { }; window.fs_cookie_footer['.page-content'] = { }; window.fs_cookie_footer['.page-content']['padding-bottom'] = parseInt($('.page-content').css('padding-bottom')); window.fs_cookie_footer['.page-content']['transition-duration'] = parseInt($('.page-content').css('transition-duration')); window.fs_cookie_footer['footer'] = { }; window.fs_cookie_footer['footer']['padding-bottom'] = parseInt($('footer').css('padding-bottom')); window.fs_cookie_footer['footer']['transition-duration'] = parseInt($('footer').css('transition-duration')); cookie_css_change['position'] = 'fixed'; }else if($('.footer').length){ window.fs_cookie_footer = { }; window.fs_cookie_footer['.footer'] = { }; window.fs_cookie_footer['.footer']['margin-bottom'] = parseInt($('.footer').css('margin-bottom')); window.fs_cookie_footer['.footer']['transition-duration'] = parseInt($('.footer').css('transition-duration')); cookie_css_change['position'] = 'fixed'; }else{ cookie_css_change['position'] = 'fixed'; } if($('.whatsapp_img').length){ window.fs_cookie_footer['.whatsapp_img'] = { }; window.fs_cookie_footer['.whatsapp_img']['margin-bottom'] = parseInt($('.whatsapp_img').css('margin-bottom')); window.fs_cookie_footer['.whatsapp_img']['transition-duration'] = parseInt($('.whatsapp_img').css('transition-duration')); } if($('.footer-float-img-container').length){ window.fs_cookie_footer['.footer-float-img-container'] = { }; window.fs_cookie_footer['.footer-float-img-container']['margin-bottom'] = parseInt($('.footer-float-img-container').css('margin-bottom')); window.fs_cookie_footer['.footer-float-img-container']['transition-duration'] = parseInt($('.footer-float-img-container').css('transition-duration')); }else if($('.float-img-container').length){ window.fs_cookie_footer['.float-img-container'] = { }; window.fs_cookie_footer['.float-img-container']['margin-bottom'] = parseInt($('.float-img-container').css('margin-bottom')); window.fs_cookie_footer['.float-img-container']['transition-duration'] = parseInt($('.float-img-container').css('transition-duration')); } if($('.buys_hk-support-div').length){ window.fs_cookie_footer['.buys_hk-support-div'] = { }; window.fs_cookie_footer['.buys_hk-support-div']['margin-bottom'] = parseInt($('.buys_hk-support-div').css('margin-bottom')); window.fs_cookie_footer['.buys_hk-support-div']['transition-duration'] = parseInt($('.buys_hk-support-div').css('transition-duration')); } if($('.buys_hk-support-div').length){ window.fs_cookie_footer['.buys_hk-support-div'] = { }; window.fs_cookie_footer['.buys_hk-support-div']['margin-bottom'] = parseInt($('.buys_hk-support-div').css('margin-bottom')); window.fs_cookie_footer['.buys_hk-support-div']['transition-duration'] = parseInt($('.buys_hk-support-div').css('transition-duration')); } if($('.sticky-bottom').length){ window.fs_cookie_footer['.sticky-bottom'] = { }; window.fs_cookie_footer['.sticky-bottom']['bottom'] = parseInt($('.sticky-bottom').css('bottom')); window.fs_cookie_footer['.sticky-bottom']['transition-duration'] = parseInt($('.sticky-bottom').css('transition-duration')); } if($('.btn-back-to-top').length){ window.fs_cookie_footer['.btn-back-to-top'] = { }; window.fs_cookie_footer['.btn-back-to-top']['bottom'] = parseInt($('.btn-back-to-top').css('bottom')); window.fs_cookie_footer['.btn-back-to-top']['transition-duration'] = parseInt($('.btn-back-to-top').css('transition-duration')); } cookie_css_change['padding-bottom'] = cookie_css_change['padding-bottom'] < 0 ? 0 : cookie_css_change['padding-bottom']; cookie_container.append('
Cookie Consent by clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, assist in our marketing efforts and analyze site usage with ESHOPS.HK and brand partner L’OREAL HONG KONG LTD.
Learn More
'); $('.cookie-disclaimer-box').css(cookie_css_change); setTimeout(function(){ if(typeof resizefunction == 'function'){ resizefunction(); } if(typeof wrapperResize == 'function'){ wrapperResize(); } }, 400); $('.cookie-ok').click(function(event){ event.preventDefault(); if(!$(this).hasClass('clicked')){ $(this).addClass('clicked'); //$('.cookie-disclaimer-box').slideToggle(400, function(){ cookie_box_resize(1); }); cookie_box_resize(1); var cookie_expire = new Date(); cookie_expire.setTime(parseInt('1812137584')*1000); document.cookie = "cookie_brand_disclaimer_giorgioarmanibeauty_eshops_hk=1; expires="+cookie_expire.toUTCString()+"; path=/; domain=giorgioarmanibeauty.eshops.hk; secure; "; } setTimeout(function(){ if(typeof resizefunction == 'function'){ resizefunction(); } if(typeof wrapperResize == 'function'){ wrapperResize(); } if(typeof onResizeEvent == 'function'){ onResizeEvent(); } }, 400); }); if($('.cookie-disclaimer-box a').length){ if($('meta[name="site_url"]').length && $('meta[name="lingual_url"]').length){ $('.cookie-disclaimer-box a').each(function(){ let temp_href = $(this).attr('data-href') ? $(this).attr('data-href') : $(this).attr('href'); temp_href = temp_href.replace('{site_url}', $('meta[name="site_url"]').attr('content')); temp_href = temp_href.replace('{lingual_url}', $('meta[name="lingual_url"]').attr('content')); $(this).attr('href', temp_href); }); } $('.cookie-disclaimer-box .cdb-pp-btn').removeAttr('data-href'); } /* setTimeout(function(){ cookie_box_resize() }, 400); $(window).resize(function(){ cookie_box_resize(); }); */ }); }