CINXE.COM
Bangkok Post - The world’s window on Thailand | Breaking news, Thailand news, Latest news, World news
<!doctype html> <html lang="en"> <head> <title>Bangkok Post - The world’s window on Thailand | Breaking news, Thailand news, Latest news, World news</title> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <meta name="keywords" content="bangkokpost, breaking news, latest news, topstories, news today, english news, bangkok news, thailand news, thailand latest news, thai newspaper, thai news, expats, expats thailand news, ข่าวภาษาอังกฤษ, ข่าวด่วน, ข่าววันนี้, ข่าวเด่น" /> <meta name="description" content="All the latest top stories and breaking news. Thailand’s most credible source of Thai and international developments. In-depth business and political news, leading Lifestyle trends, broad international sports coverage, plus English language learning" /> <meta name="author" content="Bangkok Post Public Company Limited" /> <meta name="rating" content="General" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="facebook-domain-verification" content="8j201jekybttvoogrdxq5eq1bkqefn" /> <meta property="fb:pages" content="133643127712" /> <meta name="robots" content="index,follow,NOODP" /> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> <!-- Meta tag Lead DMP --> <!-- Google Tag Manager --> <script> (function(w, d, s, l, i) { w[l] = w[l] || []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' }); var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); })(window, document, 'script', 'dataLayer', 'GTM-MLF6WTD'); </script> <!-- End Google Tag Manager --> <!-- Andbeyond start remove by ad op team 2021-01-20--> <!-- Andbeyond end --> <link rel="dns-prefetch" href="//static.bangkokpost.com"> <link rel="dns-prefetch" href="//www.googletagservices.com"> <link rel="dns-prefetch" href="//lvs.truehits.in.th"> <link rel="dns-prefetch" href="//adservice.google.co.th"> <link rel="dns-prefetch" href="//adservice.google.com"> <link rel="dns-prefetch" href="//connect.facebook.net"> <link rel="dns-prefetch" href="//ads3.bangkokpost.co.th"> <link rel="dns-prefetch" href="//www.instagram.com"> <link rel="dns-prefetch" href="//widgets.outbrain.com"> <link rel="dns-prefetch" href="//platform.twitter.com"> <meta name="apple-mobile-web-app-title" content="Bangkok Post Website" /> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-status-bar-style" content="black" /> <meta name="msapplication-TileColor" content="#213c70" /> <meta name="msapplication-TileImage" content="https://bangkokpost.com/newdesign/assets/images/app_icon/icon-144x144.png" /> <meta name="theme-color" content="#213c70" /> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"> <link rel="icon" href="/favicon.ico" type="image/x-icon"> <link rel="manifest" href="/manifest.json" /> <link rel="canonical" href="" /> <link rel="shortcut icon" href="/newdesign/assets/images/bp-icon.png" type="image/x-icon"> <!-- HTML5 Shim for IE --> <!--[if IE]> <script src="/newdesign/assets/js/html5.js"></script> <![endif]--> <script type="text/javascript"> if ('serviceWorker' in navigator) { window.addEventListener('load', function() { navigator.serviceWorker.register('/service-worker.js?v=6').then(function(registration) { // Registration was successful // console.log('Registration was successful'); }, function(err) { // registration failed :( // console.log('registration failed'); }); }); } </script> <script type="text/javascript" src="/newdesign/assets/js/jquery.min.js?v=0.077"></script> <link href="/newdesign/assets/bootstrap/css/bootstrap.min.css?v=0.24" rel="stylesheet"> <script src="/newdesign/assets/bootstrap/js/bootstrap.min.js?v=0.077"></script> <link href="/newdesign/assets/css/animate.min.css?v=0.24" rel="stylesheet"> <link href="/newdesign/assets/fontawesome-5.6.3/css/all.min.css?v=0.24" rel="stylesheet"> <!-- Owl Stylesheets --> <link href="/newdesign/assets/plugins/owlcarousel/assets/owl.carousel.min.css?v=0.24" rel="stylesheet"> <link href="/newdesign/assets/plugins/owlcarousel/assets/owl.theme.default.min.css?v=0.24" rel="stylesheet"> <script defer src="/newdesign/assets/plugins/owlcarousel/owl.carousel.min.js?v=0.077"></script> <!-- smartphoto --> <link rel="stylesheet" href="/newdesign/assets/plugins/smartphoto/css/smartphoto.min.css?v=0.24" /> <script defer src="/newdesign/assets/plugins/smartphoto/js/jquery-smartphoto.min.js?v=0.077"></script> <!-- bxslider --> <link href="/newdesign/assets/plugins/bxslider/jquery.bxslider.min.css?v=0.24" rel="stylesheet" /> <script defer src="/newdesign/assets/plugins/bxslider/jquery.bxslider.min.js?v=0.077"></script> <link href="/newdesign/assets/css/custom.min.css?v=0.24" rel="stylesheet" type="text/css"> <link href="/newdesign/assets/css/component.min.css?v=0.24" rel="stylesheet" type="text/css"> <link href="/newdesign/assets/css/style.min.css?v=0.24" rel="stylesheet" type="text/css"> <!-- ceo phase2 --> <!-- ceo winner --> <!-- reader choice voting --> <!-- rca winner --> <!-- women 2022 --> <!-- world cup qatar --> <!-- APEC 2022 --> <!-- style anni75_2021 --> <!-- /style anni75_2021 --> <!-- only article --> <link href="/newdesign/assets/css/gallery.min.css?v=0.24" rel="stylesheet" type="text/css"> <link href="/newdesign/assets/css/style_custom.css?v=0.24" rel="stylesheet" type="text/css"> <script type="text/javascript" src="/newdesign/assets/js/scripts.js?v=0.077"></script> <script type="text/javascript" src="/newdesign/assets/js/moment.min.js?v=0.077"></script> <script type="text/javascript" src="/newdesign/assets/js/moment-timezone.min.js?v=0.077"></script> <script type="text/javascript" src="/newdesign/assets/custom/js/jquery.lazy.min.js?v=0.077"></script> <script> var initGPT = function() { var gads = document.createElement("script"); gads.async = true; gads.type = "text/javascript"; var useSSL = "https:" == document.location.protocol; gads.src = (useSSL ? "https:" : "http:") + "//securepubads.g.doubleclick.net/tag/js/gpt.js"; var node = document.getElementsByTagName("script")[0]; node.parentNode.insertBefore(gads, node); }; </script> <script> var time = 0; /* App nexus 2 (initial) */ var PREBID_TIMEOUT = 700; var pbjs = pbjs || {}; pbjs.que = pbjs.que || []; setTimeout(initGPT, 100); </script> <script type="text/javascript"> /** * Get the URL parameters * @param {String} url The URL * @return {Object} The URL parameters */ var getParams = function(url) { var params = {}; var parser = document.createElement('a'); parser.href = url; var query = parser.search.substring(1); var vars = query.split('&'); for (var i = 0; i < vars.length; i++) { var pair = vars[i].split('='); params[pair[0]] = decodeURIComponent(pair[1]); } return params; }; // Global variable // var g_page_type = 'article'; var g_section = ''; var g_sub_section = ''; var g_content_id = ''; var g_topic_id = ''; var g_url_path = window.location.pathname.split('/'); var g_window_width = window.innerWidth; var g_url_params = getParams(window.location.href); // Initial g_url_path index for (i = 0; i <= 5; i++) { if (typeof g_url_path[i] === 'undefined') g_url_path[i] = ''; } if (g_content_id != '') { g_page_type = 'article'; g_section = g_url_path[1]; g_sub_section = g_url_path[2]; } else if (g_url_path[1] == '') { g_page_type = 'homepage'; g_section = 'homepage'; } else if (g_url_path[2] != '') { g_page_type = 'sub_section'; g_section = g_url_path[1]; g_sub_section = g_url_path[2]; } else { g_page_type = 'section'; g_section = g_url_path[1]; } var g_ad = { ad_type: '', get_ad_type: function() { var _t = this; var _width = g_window_width; if (_width >= 950) { _t.ad_type = "desktop"; } else if (_width < 950 && _width >= 768) { _t.ad_type = "tablet"; } else if (_width < 768 && _width >= 336) { _t.ad_type = "mobile"; } else if (_width < 336) { _t.ad_type = "other"; } return _t.ad_type; }, get_gpt_slot: function(position, section) { var _t = this; var _slot = []; return _slot; }, get_ad_section: function() { ad_section = g_section; if (ad_section == 'sports') { ad_section = 'sport'; } else if (ad_section == 'vdo') { ad_section = 'video'; } else if (ad_section == 'most-recent') { ad_section = 'mostrecent'; } else if (ad_section == 'topstories') { ad_section = 'others'; } return ad_section; } } var gptadslots = []; var googletag = googletag || { cmd: [] }; var g_ad_type = g_ad.get_ad_type(); // window.googletag = window.googletag || {cmd: []}; var ad_section = g_ad.get_ad_section(); var g_obj_bp = { escape_html: function(text) { var map = { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }; return text.replace(/[&<>"']/g, function(m) { return map[m]; }); } } var g_member = { _callback_login: [], /** * 0 ยังไม่ได้ call * 1 กำลัง call * 2 call เรียบร้อยแล้ว */ _is_get_login_calling: 0, is_member_login: false, id: '', usrename: '', name: '', lastname: '', email: '', avatar: '', get_url_login: function() { return 'https://member.bangkokpost.com/login.php'; }, get_url_logout: function() { return 'https://www.bangkokpost.com/global_member/cw.php?xType=logout'; }, get_login_template: function() { var _t = this; _t.get_member_login(function() { if (_t.is_member_login) { // <a href="/member/profile"></a> // <a href="/member/profile">My profile</a> | $('#signin-container').html('<span class="box-signout"><i class="icon-sign-in"></i><span><a href="/member/profile">' + _t.usrename + '</a></span><a href="' + _t.get_url_logout() + '" id="signout">SIGN OUT</a></span>'); $('#signin-container2').html( '<div class="box-btnsingout">\ <i class="icon-sign-in"></i> <a href="/member/profile">' + _t.usrename + '</a>\ <div class="box-signout-link">\ <a href="' + _t.get_url_logout() + '">Sign out</a>\ </div>\ </div>' ); } else { $('#signin-container').html('<span class="box-signin"><i class="icon-sign-in"></i><a href="' + _t.get_url_login() + '" id="signin">SIGN IN</a></span>'); $('#signin-container2').html('<div class="box-btnsingin"><a href="https://member.bangkokpost.com/login.php" class="btn-signin" title="SIGN IN" ><i class="icon-sign-in"></i> SIGN IN</a></div>'); } }); }, get_member_login: function(_callback) { var _t = this; if (typeof _callback == 'function') { _t._callback_login.push(_callback); } // call แล้ว if (_t._is_get_login_calling == 2) { // Callback all $.each(_t._callback_login, function(k, v) { v(); }); _t._callback_login = []; return true; } if (_t._is_get_login_calling <= 0) { _t._is_get_login_calling = 1; $.get("/member/get_member_login", function(data) { if (typeof data.userID != 'undefined') { _t.id = data.userID; _t.usrename = data.user_display_name; _t.name = data.user_name; _t.lastname = data.user_surname; _t.email = data.user_email; _t.avatar = data.user_avatar; _t.is_member_login = true; } _t._is_get_login_calling = 2; // Callback all $.each(_t._callback_login, function(k, v) { v(); }); _t._callback_login = []; }, "json"); } } } g_member.get_member_login(); var g_gallery = { initial_gallery: function() { var _i = 0; $('.articl-content img').each(function(index) { var _elm = $(this); var caption_str = _elm.parent().text(); // _elm.hide(); if (typeof _elm.data('img-highlight') === 'undefined') { // Render image gallery // var _width = $(this).width(); // var _height = $(this).height(); // if (((_width - _height) / _width) * 100 < 20) { // $(this).css('width', '336px'); // } // var _img = $(this); $("<img>").attr("src", _elm.attr("src")).load(function() { // var _t = $(this); var _width = this.width; var _height = this.height; var _article_container_width = $('.article-news').width(); var _elm_caption = _elm.parent().next(); if (_width <= 336) { // console.log('<=336'); _elm.css('width', _width + 'px'); _elm_caption.css('width', _width + 'px'); // } else if (((_width - _height) / _width) * 100 < 20) { } else if (_height > _width) { // รูปแนวตั้ง _elm.css('width', '336px'); _elm_caption.css('width', '336px'); } else if (_width < _article_container_width) { // ความกว้างของรูป น้อยกว่า ความกว้างของ article container _elm.css('width', _width + 'px'); _elm_caption.css('width', _width + 'px'); } else { _elm.css('width', '100%'); _elm_caption.css('width', '100%'); } // set width caption // if (_elm.parent().next().is('p')) { // } else { // console.log('else else'); // } // _elm.parent().next().css('width', _width + 'px'); // if (_width <= 336) { // disable gallery // if (_elm.parent().is('a')) { // _elm.parent().removeClass('gallery-icon'); // _elm.unwrap(); // } // } // _elm.show(); // _elm.parent().show(); }); _elm.attr('border', 0); _elm.attr('hspace', 0); _elm.attr('vspace', 0); _elm.wrap('<a href="' + _elm.attr("src") + '" data-caption="' + caption_str + '" class="js-img-viwer gallery-icon" ></a>'); _i++; } }); $(function() { $(".js-img-viwer").SmartPhoto({ nav: false }); }); } }; /* แสดง|ซ่อน title และ social share เมื่อ scroll mouse ขึ้น|ลง */ $(function() { if ($(window).width() > 991) { var position = $('#position-set').offset(); $(window).scrPosition(function(a) { if (a == "up") { var getScrollTop = $(this).scrollTop(); if (getScrollTop > position.top) { $(".article-headline-fixed").show(); $("header.sticky .menu-list ul li:last-child").css('z-index', '-1'); } } else { $(".article-headline-fixed").hide(); $("header.sticky .menu-list ul li:last-child").css('z-index', '1'); } }); } }); (function(j, d, w) { j.fn.scrPosition = function(callback) { var position; var scrollPosition = j(this).scrollTop(); j(this).scroll(function() { var scrollTop = j(this).scrollTop(); if (scrollPosition < scrollTop) position = "up" else position = "down" scrollPosition = scrollTop; callback(position); }); }; })(jQuery, document, window); if (g_page_type == 'article') { var g_like_article = { fn_like_unlike: function(src_id, status) { if (src_id == '' && status == '') { //console.log('content :' +src_id +' >> return false '); return false; } if (typeof status === 'undefined') { // only show like/unlike (not set) //console.log('content >> undefined '); status = 99; } $.post("/ajax/_getLikeUnlike.php", { src_id: src_id, status: status, act: 'CONV3' }, function(data) { //console.log('data =>' + data); if (data != '') { $('div#like-dislike-article.f-comment').html(data); } return false; }); }, fn_show_block: function(content_id) { this.fn_like_unlike(content_id); // this.fn_like_unlike(content_id,1); // this.fn_like_unlike(content_id,0); } } } </script> <!--BEGIN WEB STAT CODE--> <script type="text/javascript"> var g_truehits_options = { strictMode: false, key: ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor"], q: { name: "queryKey", parser: /(?:^|&)([^&=]*)=?([^&]*)/g }, parser: { strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ } } var g_truehits = { var_default_name: "homepage", fn_parseUri: function(str) { var o = g_truehits_options; m = o.parser[o.strictMode ? "strict" : "loose"].exec(str); uri = {}; i = 14; while (i--) uri[o.key[i]] = m[i] || ""; uri[o.q.name] = {}; uri[o.key[12]].replace(o.q.parser, function($0, $1, $2) { if ($1) uri[o.q.name][$1] = $2; }); return uri; }, fn_decode: function(encoded) { return decodeURIComponent(encoded.replace(/\+/g, " ")); }, fn_getTruehitsName: function() { var this_url = this.fn_parseUri(window.location.href + ''); var page = ''; var paths = this.fn_decode(this_url['directory']).split('/'); var paths_length = paths.length - 2; if (paths_length > 0) { if (paths_length >= 1) { page = paths[1]; if (paths[2] != '') { if (isNaN(paths[2])) { //page = page + '_' + paths[2]; if (!isNaN(paths[3])) { page = page + "_article"; } } else { if (page == "photo") { page = page + "_view"; } else { page = page + "_article"; } } } } else { page = paths[1]; } } else { page = paths[1] || this_url['file']; } if (page == '') page = this.var_default_name || "homepage"; page = page.toUpperCase(); page = "NEWDESIGN_" + page; return page; } } // Refresh เมื่อ resize ไปมาเพื่อแก้ปัญหา ad แสดงผลผิดพลาด var g_current_ad_type = g_ad_type; /* $( window ).resize(function() { g_window_width = $( window ).width(); var _ad_type = g_ad.get_ad_type(); if (_ad_type != g_current_ad_type) { location.reload(); } }); googletag.pubads().refresh(); */ /* nexus */ function sendAdserverRequest() { if (pbjs.adserverRequestSent) return; pbjs.adserverRequestSent = true; googletag.cmd.push(function() { pbjs.que.push(function() { pbjs.setTargetingForGPTAsync(); // console.log("Refresh ad all slot!"); //googletag.pubads().refresh(); }); }); } /* end nexus */ </script> <!-- openx step 1 --> <script type="application/ld+json"> { "@context": "https://schema.org/", "@type": "WebSite", "name": "Bangkok Post", "url": "https://www.bangkokpost.com/", "potentialAction": { "@type": "SearchAction", "target": "https://search.bangkokpost.com/search/result?category=all&&q={search_term_string}", "query-input": "required name=search_term_string" } } </script> <!-- Taboola 1--> <script type="text/javascript"> if (g_page_type == 'homepage' || g_page_type == 'article' || g_page_type == 'section' || g_page_type == 'sub_section') { window._taboola = window._taboola || []; if (g_page_type == 'homepage') { _taboola.push({ homepage: 'auto' }); } else if (g_page_type == 'section' || g_page_type == 'sub_section') { _taboola.push({ category: 'auto' }); console.log('section page taboola'); } else if (g_page_type == 'article') { console.log('article page taboola'); _taboola.push({ article: 'auto' }); } ! function(e, f, u, i) { if (!document.getElementById(i)) { e.async = 1; e.src = u; e.id = i; f.parentNode.insertBefore(e, f); } }(document.createElement('script'), document.getElementsByTagName('script')[0], '//cdn.taboola.com/libtrc/bangkokpostgroup-bangkokpost/loader.js', 'tb_loader_script'); if (window.performance && typeof window.performance.mark == 'function') { window.performance.mark('tbl_ic'); } if (g_page_type == 'article') { console.log('xxxxxxx'); window._newsroom = window._newsroom || []; ! function(e, f, u) { e.async = 1; e.src = u; f.parentNode.insertBefore(e, f); }(document.createElement('script'), document.getElementsByTagName('script')[0], '//c2.taboola.com/nr/bangkokpostgroup-bangkokpost/newsroom.js'); } else { console.log('yyyyyyy'); } } </script> <script type="text/javascript"> var truehits_name = g_truehits.fn_getTruehitsName(); //console.log("truehits th_page: "+ truehits_name); var __th_page = truehits_name; (function() { var ga1 = document.createElement('script'); ga1.type = 'text/javascript'; ga1.async = true; ga1.src = "//lvs.truehits.in.th/dataa/s0028944.js"; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga1, s); })(); $(function() { var el = $("#truehits_div").detach(); el.appendTo($("#truehits_area")); el.show(); // $("#truehits_div").show(); }); </script> <!--END WEB STAT CODE--> <script> document.onkeydown = function(e) { if (event.keyCode == 123) { return false; } if (e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)) { return false; } if (e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)) { return false; } if (e.ctrlKey && e.keyCode == 'U'.charCodeAt(0)) { return false; } } document.addEventListener('contextmenu', event => event.preventDefault()); </script> </head> <body> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MLF6WTD" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> <script async src="//get.optad360.io/sf/525f6193-8c54-43c9-91be-49a33994236a/plugin.min.js"></script> <div class="turehits" style="padding-top:0;display:none;" id="truehits_div"></div> <!-- nav --> <header class="header-static"> <div class="container"> <div class="header-panel"> <div class="bp-logo2"> <h1><a href="/" title="Bangkokpost.com"><img src="/newdesign/assets/images/BangkokPost.svg" class="img-fluid" alt="BangkokPost.com"></a></h1> </div> </div> </div> </header> <!-- nav --> <!-- nav --> <div class="content-pd"></div> <!-- /2776261/bangkokpost_homepage/leaderboard :learning move down in section page--> <!-- container --> <section> <div class="container"> <div class="page-error404"> <h2>404</h2> <h3>The web page or article you tried to reach is not currently available.</h3> <p>Usually this happens because the page has been moved or it no longer exists. But don’t worry; you can search for the article above or try Google search below. If nothing works, just go back to the <a href="/" title="homepage" class="link-unterline">homepage</a>.</p> <form class="form-page404" id="form_404" name="form_404"> <input type="text" class="input-page404" placeholder="" name="q" id="q"> <button type="submit" class="btn btn-page404" >SEARCH</button> </form> <p>Other technical suggestion and troubles, please <a href="/send-suggestions" class="link-unterline">click here</a>.</p> </div> </div> </section> <!-- /container --> <script> // var url_404 = document.URL; var _pathname = window.location.pathname; var _param = window.location.search; var res = _param.split("?"); var param = ''; if(res[1]){ param = "__params__" + res[1]; } var url_404 = _pathname + param; //console.log('==>' + url_404); $.get("/newdesign/not_found", { url : url_404 }, function(data) { return false; }); </script> <!-- footer --> <!-- footer --> <footer class="footer-static"> <section class="footer-bottom"> <div class="container" id="truehits_area"> © 2024 Bangkok Post Public Company Limited </div> </section> </footer> <!-- /footer --> <div id="script_html_container"></div> <!-- /footer --> <script type="text/javascript" src="/newdesign/assets/custom/js/gdpr.js?v=0.077"></script> <script type="text/javascript" src="/newdesign/assets/custom/js/scripts.js?v=0.077"></script> <script src="/newdesign/assets/js/jquery.scrolldepth.min.js?v=0.1"></script> <script type="text/javascript"> $(document).ready(function() { // og tw //$('#page_tw_og_image').each(function() { // $(this).attr('content',$(this).attr('content').replace('static.bangkokpost.com','www.bangkokpost.com')); //}); // enewsletter-article if($('.articl-content p').eq(3).length > 0){ $('.articl-content p').eq(3).after('<p id="article-enewsletter"></p>'); } if ($('.owl-campaignboi').length) { $('.owl-campaignboi').owlCarousel({ margin: 20, loop: false, responsiveClass:true, nav:false, dots:false, mouseDrag: false, items: 3, slideBy: 1, responsive: { 0: { items: 1, stagePadding: 30, loop: false, mouseDrag: true, //dots:true, nav:false, }, 768: { items: 2, mouseDrag: true, //dots:true, nav:true, }, 992: { items: 3, } } }); //$(window).resize(function(){ $owl.trigger('refresh.owl.carousel'); }); $(".owl-campaignboi").on('initialized.owl.carousel changed.owl.carousel refreshed.owl.carousel', function (e) { if (!e.namespace) return; var carousel = e.relatedTarget, current = carousel.current(); if (current === carousel.maximum()) { $(".owl-campaignboi.owl-carousel .owl-stage").addClass("pos-right"); }else if (current === carousel.minimum()){ $(".owl-campaignboi.owl-carousel .owl-stage").removeClass("pos-right"); } if ($('.owl-campaignboi .item').length <= 1) { $(".owl-campaignboi.owl-carousel .owl-stage").addClass("item1"); } }); } if ($('.owl-recommended2').length) { $('.owl-recommended2').owlCarousel({ margin: 20, loop: false, responsiveClass:true, nav:false, dots:false, mouseDrag: false, items: 3, slideBy: 1, responsive: { 0: { items: 1, stagePadding: 30, loop: true, mouseDrag: true, //dots:true, nav:false, }, 768: { items: 3, mouseDrag: true, //dots:true, nav:true, }, 992: { items: 3, } } }); } if ($('.owl-recommended').length) { /* for section life */ // Render owl $('.owl-recommended').owlCarousel({ margin: 30, loop: false, responsiveClass: true, nav: false, dots: false, mouseDrag: false, items: 5, slideBy: 1, responsive: { 0: { items: 1, stagePadding: 30, loop: false, mouseDrag: true, //dots:true, nav: false, }, 768: { items: 3, mouseDrag: true, //dots:true, nav: true, }, 992: { items: 5, } } }); } if ($('.owl-top-columnist').length) { $('.owl-top-columnist').owlCarousel({ margin: 30, loop: false, responsiveClass: true, nav: true, dots: false, mouseDrag: false, items: 8, slideBy: 1, stagePadding: 80, responsive: { 0: { items: 1, loop: false, mouseDrag: true, stagePadding: 70, nav: false, }, 341: { items: 1, loop: false, mouseDrag: true, stagePadding: 90, nav: false, }, 414: { items: 1, loop: false, mouseDrag: true, stagePadding: 100, nav: false, }, 426: { items: 2, loop: false, mouseDrag: true, nav: false, }, 768: { items: 3, mouseDrag: true, }, 992: { items: 5, }, 1200: { items: 7, } } }); } // tab most view $('.tabs-stage div').hide(); $('.tabs-stage div:first-child').show(); $('.tabs-nav li:first-child').addClass('tab-active'); // Change tab class and display content if ($('.tabs-nav a').length) { $('.tabs-nav a').on('click', function(event) { // most comment event.preventDefault(); $('.tabs-nav li').removeClass('tab-active'); $(this).parent().addClass('tab-active'); $('.tabs-stage div').hide(); $($(this).attr('href')).show(); }); } if ($('.owl-topics2').length) { $('.owl-topics2').owlCarousel({ margin: 30, loop: false, responsiveClass: true, nav: true, dots: false, mouseDrag: false, items: 3, slideBy: 1, responsive: { 0: { items: 1, stagePadding: 30, loop: false, mouseDrag: true, dots: false, nav: false, }, 365: { items: 1, stagePadding: 50, loop: false, mouseDrag: true, dots: false, nav: false, }, 768: { items: 2, mouseDrag: true, }, 992: { items: 3, } } }); } if ($('.owl-topics').length) { $('.owl-topics').owlCarousel({ margin: 30, loop: false, responsiveClass: true, nav: true, dots: false, mouseDrag: false, items: 5, slideBy: 1, responsive: { 0: { items: 1, stagePadding: 50, loop: false, mouseDrag: true, dots: false, nav: false, }, 768: { items: 3, mouseDrag: true, }, 992: { items: 5, } } }); } if ($('.owl-diary').length) { $('.owl-diary').owlCarousel({ margin: 30, loop: false, responsiveClass: true, nav: false, dots: false, mouseDrag: true, items: 1, slideBy: 1, responsive: { 0: { items: 1, stagePadding: 30, loop: false, mouseDrag: true, dots: false, nav: false, }, 768: { items: 1, mouseDrag: true, stagePadding: 0, nav: true, } } }); } if ($('.owl-boxtab').length) { $('.owl-boxtab').owlCarousel({ margin: 20, loop: false, responsiveClass:true, nav:false, dots:false, mouseDrag: true, items: 1, slideBy: 1, responsive: { 0: { items: 1, stagePadding: 30, loop: false, mouseDrag: true, //dots:true, nav:false, }, 768: { items: 1, mouseDrag: true, stagePadding: 0, nav:true, } } }); } if ($('.bxslider').length) { if (navigator.userAgent.indexOf("Chrome") !== -1){ $('body').on('mousedown', '.bx-viewport a', function() { var ch_link = $(this); var ch_href = ch_link.attr('href'); if(ch_href) { location.href = ch_href; return false; } }); } $('.bxslider').bxSlider({ mode: 'fade', speed: 800, auto: true, autoControls: false, pager: false, controls: false }); } $(".tab-slider--body").hide(); $(".tab-slider--body:first").show(); /* for thailand megatrends*/ if ($('.owl-magatrends').length) { $('.owl-magatrends').owlCarousel({ margin: 20, loop: false, responsiveClass:true, nav:false, dots:false, mouseDrag: false, items: 5, slideBy: 1, responsive: { 0: { items: 1, stagePadding: 20, loop: false, mouseDrag: true, //dots:true, nav:false, }, 768: { items: 3, mouseDrag: true, //dots:true, nav:true, }, 992: { items: 5, } } }); $(".owl-magatrends").on('initialized.owl.carousel changed.owl.carousel refreshed.owl.carousel', function (e) { if (!e.namespace) return; var carousel = e.relatedTarget, current = carousel.current(); if (current === carousel.maximum()) { $(".owl-magatrends.owl-carousel .owl-stage").addClass("pos-right"); }else if (current === carousel.minimum()){ $(".owl-magatrends.owl-carousel .owl-stage").removeClass("pos-right"); } if ($('.owl-magatrends .item').length <= 1) { $(".owl-magatrends.owl-carousel .owl-stage").addClass("item1"); } }); // oa_show_openx(3031, 'homepage', 'campaign1'); // oa_show_openx(3034, 'homepage', 'campaign2'); } if($('.owl-campaignHoliday').length > 0){ $('.owl-campaignHoliday').owlCarousel({ margin: 20, loop: false, responsiveClass:true, nav:false, dots:false, mouseDrag: false, items: 5, slideBy: 1, responsive: { 0: { items: 1, stagePadding: 30, loop: false, mouseDrag: true, //dots:true, nav:false, }, 768: { items: 3, mouseDrag: true, //dots:true, nav:true, }, 992: { items: 4, }, 1200: { items: 4, } } }); $('.owl-campaignHoliday').on('.owl-item', function(e){ idx = e.item.index; console.log(inx); }); $(".owl-campaignHoliday").on('initialized.owl.carousel changed.owl.carousel refreshed.owl.carousel', function (e) { if (!e.namespace) return; var carousel = e.relatedTarget, current = carousel.current(); if (current === carousel.maximum()) { $(".owl-campaignHoliday.owl-carousel .owl-stage").addClass("pos-right"); }else if (current === carousel.minimum()){ $(".owl-campaignHoliday.owl-carousel .owl-stage").removeClass("pos-right"); } if ($('.owl-campaignHoliday .item').length <= 1) { $(".owl-campaignHoliday.owl-carousel .owl-stage").addClass("item1"); } }); } if($('.owl-spectial--guru').length > 0){ $('.owl-spectial--guru').owlCarousel({ margin: 20, loop: true, responsiveClass:true, nav:true, dots:false, mouseDrag: false, items: 3, slideBy: 1, responsive: { 0: { items: 1, loop: true, mouseDrag: true, dots:false, // nav:false, }, 768: { items: 2, mouseDrag: true, }, 992: { items: 3, } } }); } if ($('.bxslider2').length) { $('.bxslider2').bxSlider({ //mode: 'fade', speed: 800, auto: true, autoControls: false, pager: false, controls: false, }); } // Homepage only if ( window.location.pathname == '/' ){ g_homepagelanding.set_homepagelanding(); } //==Start learning ==// if($('#slide-counter').length > 0){ if (navigator.userAgent.indexOf("Chrome") !== -1){ $('body').on('mousedown', '.bx-viewport a', function() { var ch_link = $(this); var ch_href = ch_link.attr('href'); if(ch_href) { location.href = ch_href; return false; } }); } $('#slide-counter').prepend('<span class="current-index"></span>/'); var slider = $('.bxslider-banner').bxSlider({ //mode: 'fade', speed: 800, auto: false, autoControls: false, //pager: false, //controls: false, onSliderLoad: function (currentIndex){ $('#slide-counter .current-index').text(currentIndex + 1); }, onSlideBefore: function ($slideElement, oldIndex, newIndex){ $('#slide-counter .current-index').text(newIndex + 1); } }); $('#slide-counter').append(slider.getSlideCount()); } // slide-counter').length if($('.owl-workshop').length > 0){ $('.owl-workshop').owlCarousel({ margin: 30, loop: false, responsiveClass:true, lazyLoad: true, mouseDrag:false, nav:false, dots:false, items: 1, responsive: { 0: { items: 1, mouseDrag: true, stagePadding: 30, margin: 20, }, 576: { items: 2, stagePadding: 50, margin: 20, }, 768: { items: 3, stagePadding: 0, }, 1200: { items: 3, stagePadding: 0, } } }); $(".owl-workshop").on('initialized.owl.carousel changed.owl.carousel refreshed.owl.carousel', function (e) { if (!e.namespace) return; var carousel = e.relatedTarget, current = carousel.current(); if (current === carousel.maximum()) { $(".owl-workshop.owl-carousel .owl-stage").addClass("pos-right"); }else if (current === carousel.minimum()){ $(".owl-workshop.owl-carousel .owl-stage").removeClass("pos-right"); } if ($('.owl-workshop .item').length <= 1) { $(".owl-workshop.owl-carousel .owl-stage").addClass("item1"); } }); } // owl-workshop').length if($('.owl-scholarship').length > 0) { $('.owl-scholarship').owlCarousel({ margin: 30, loop: false, responsiveClass:true, lazyLoad: true, mouseDrag:false, nav:false, dots:false, items: 1, responsive: { 0: { items: 1, mouseDrag: true, stagePadding: 30, margin: 20, }, 576: { items: 2, stagePadding: 50, margin: 20, }, 768: { items: 3, stagePadding: 0, }, 1200: { items: 3, stagePadding: 0, } } }); $(".owl-scholarship").on('initialized.owl.carousel changed.owl.carousel refreshed.owl.carousel', function (e) { if (!e.namespace) return; var carousel = e.relatedTarget, current = carousel.current(); if (current === carousel.maximum()) { $(".owl-scholarship.owl-carousel .owl-stage").addClass("pos-right"); }else if (current === carousel.minimum()){ $(".owl-scholarship.owl-carousel .owl-stage").removeClass("pos-right"); } if ($('.owl-scholarship .item').length <= 1) { $(".owl-scholarship.owl-carousel .owl-stage").addClass("item1"); } }); } // owl-scholarship').length if($('.owl-course').length > 0){ $('.owl-course').owlCarousel({ margin: 0, loop: false, responsiveClass:true, lazyLoad: true, mouseDrag:false, nav:true, dots:false, items: 1, responsive: { 0: { items: 1, mouseDrag: true, stagePadding: 30, margin: 20, nav:false, }, 768: { items: 1, stagePadding: 0, }, 991: { items: 3, stagePadding: 0, } } }); $('.owl-course').on('.owl-item', function(e){ idx = e.item.index; console.log(inx); }); $(".owl-course").on('initialized.owl.carousel changed.owl.carousel refreshed.owl.carousel', function (e) { if (!e.namespace) return; var carousel = e.relatedTarget, current = carousel.current(); if (current === carousel.maximum()) { $(".owl-course.owl-carousel .owl-stage").addClass("pos-right"); }else if (current === carousel.minimum()){ $(".owl-course.owl-carousel .owl-stage").removeClass("pos-right"); } if ($('.owl-course .item').length <= 1) { $(".owl-course.owl-carousel .owl-stage").addClass("item1"); } }); } // owl-course').length if ($('.owl-destination').length > 0){ $('.owl-destination').owlCarousel({ margin: 40, loop: false, responsiveClass:true, lazyLoad: true, mouseDrag:false, nav:false, dots:false, items: 1, responsive: { 0: { items: 1, mouseDrag: true, stagePadding: 50, }, 576: { items: 2, stagePadding: 50, }, 768: { items: 3, stagePadding: 50, }, 991: { items: 4, stagePadding: 50, }, 1200: { items: 5, stagePadding: 0, } } }); $(".owl-destination").on('initialized.owl.carousel changed.owl.carousel refreshed.owl.carousel', function (e) { if (!e.namespace) return; var carousel = e.relatedTarget, current = carousel.current(); if (current === carousel.maximum()) { $(".owl-destination.owl-carousel .owl-stage").addClass("pos-right"); }else if (current === carousel.minimum()){ $(".owl-destination.owl-carousel .owl-stage").removeClass("pos-right"); } if ($('.owl-destination .item').length <= 1) { $(".owl-destination.owl-carousel .owl-stage").addClass("item1"); } }); } // owl-destination').length if ($('#secondary-slider').length) { // Create and mount the thumbnails slider. var secondarySlider = new Splide( '#secondary-slider', { rewind : true, fixedWidth : 200, fixedHeight : 133, isNavigation: true, gap : 20, focus : 'center', pagination : false, arrows : false, cover : true, breakpoints : { '1200': { fixedWidth : 200, fixedHeight : 133, gap : 15, }, '577': { fixedWidth : 150, fixedHeight : 100, gap : 10, } } } ).mount(); // Create the main slider. var primarySlider = new Splide( '#primary-slider', { type : 'fade', heightRatio: 0.66, pagination : false, arrows : false, cover : true, height: 0, breakpoints : { '577': { height: 0, } } } ); // Set the thumbnails slider as a sync target and then call mount. primarySlider.sync( secondarySlider ).mount(); } // secondary-slider').length //==End learning ==// }); // end ready var google_track_event_label = 'Article page'; //EVENT CLICK (function($, window, document) { // Event on mouseup is better than on click $(".track").on('mouseup', function(e) { if (typeof $(this).data('label') !== 'undefined') { dataLayer.push({'event' : 'GAEvent','eventCategory' : google_track_event_label, 'eventAction' : 'click', 'eventLabel' : $(this).data('label')}); console.log($(this).data('label')); } }); }(window.jQuery, window, document)); //EVENT SCROLL PAGE jQuery.scrollDepth({ userTiming: false, pixelDepth: false, nonInteraction: false, eventHandler: function(data) { if (data.eventLabel != '') { dataLayer.push({'event' : 'GAEvent','eventCategory' : google_track_event_label, 'eventAction' : 'ScrollDistance', 'eventLabel' : data.eventLabel}); console.log('scroll'+data.eventLabel); } } }); //start reader //end reader $(".tab-slider--nav li").click(function() { $(".tab-slider--body").hide(); var activeTab = $(this).attr("rel"); $("#" + activeTab).fadeIn(); if ($(this).attr("rel") == activeTab) { $('.tab-slider--tabs').addClass('slide'); } else { $('.tab-slider--tabs').removeClass('slide'); } $(".tab-slider--nav li").removeClass("active"); $(this).addClass("active"); // $(this).addClass("active").fadeIn("slow", 4000); //for exchange kbank if($("#tab--exchangeRate").hasClass('active')){ $(".tab-slider--nav").addClass('rate-kbank'); } else { $(".tab-slider--nav").removeClass('rate-kbank'); } }); /* หน้าดัก */ var g_homepagelanding = { /* Config */ date_begin: '2023/06/03 00:00:00 GMT+0700', date_end: '2023/06/03 23:59:59 GMT+0700', cookie_name: 'is_show_homepage_landing', domain: 'bangkokpost.com', // age: 86400, /* 1 Day */ age: 10800, /* 3 Hours */ get_cookie_homepagelanding: function() { var v = document.cookie.match('(^|;) ?' + this.cookie_name + '=([^;]*)(;|$)'); return v ? v[2] : null; }, close_homepagelanding: function() { var d = new Date(); d.setTime(d.getTime() + (this.age * 1000)); document.cookie = this.cookie_name + "=1;domain=" + this.domain + ";path=/;expires=" + d.toGMTString(); }, show_homepagelanding: function() { this.close_homepagelanding(); // location = 'https://www.bangkokpost.com/page/father-day-2020/'; location = 'https://www.bangkokpost.com/page/queen-rama-10/'; // location = 'https://www.bangkokpost.com/page/king-rama-10/'; // location = 'https://www.bangkokpost.com/page/anniversary-75-year/'; // location = 'https://www.bangkokpost.com/page/queensirikit/'; // location = 'https://www.bangkokpost.com/page/rama9/'; // location = 'https://www.bangkokpost.com/page/coronation/'; // location = 'https://www.bangkokpost.com/page/rama10/'; //location = 'https://www.bangkokpost.com/page/father-day/'; }, check_show_homepagelanding: function() { var multi_timezone_offset = 60000; var t = new Date(); var utc_now = t.getTime() + (t.getTimezoneOffset() * multi_timezone_offset); var check_date_begin = new Date(this.date_begin); var utc_begin = check_date_begin.getTime() + (check_date_begin.getTimezoneOffset() * multi_timezone_offset); var check_date_end = new Date(this.date_end); var utc_end = check_date_end.getTime() + (check_date_end.getTimezoneOffset() * multi_timezone_offset); if (utc_now > utc_begin && utc_now < utc_end) { var is_noti = this.get_cookie_homepagelanding(); if (!is_noti) { return true; } } else { return false; } }, set_homepagelanding: function() { if (this.check_show_homepagelanding()) { this.show_homepagelanding(); } } } </script> <script type="text/javascript"> if ($(".box-diary-info").length) { var elm_today_info_tab; var count_tab_today_info; var today_info_delay = 10000; var today_info_interval; (function($, window, document) { /* Jquery ready here */ elm_today_info_tab = $(".box-diary-info .tab-slider--trigger"); count_tab_today_info = elm_today_info_tab.length; today_info_interval = setInterval(slide_today_info, today_info_delay); }(window.jQuery, window, document)); function slide_today_info() { for (i = 0; i < count_tab_today_info; i++) { if (elm_today_info_tab.eq(i).hasClass('active')) { break; } } if (i >= (count_tab_today_info - 1)) { i = 0; } else { i++; } elm_today_info_tab.eq(i).trigger("click"); } $(".box-diary-info") .mouseenter(function() { clearInterval(today_info_interval); }) .mouseleave(function() { today_info_interval = setInterval(slide_today_info, today_info_delay); }); } $(function() { // @TODO: Fix outbrain gap setTimeout(function() { if ($('#ctcg_frame_65349_0').length) { $('#ctcg_frame_65349_0').hide(); } }, 3000); }); </script> <script type="text/javascript"> // Cxense article page recommended & related setTimeout(function() { // g_cxense.get_article(); }, 500); </script> <script type='text/javascript'> var is_bkp_newdesign_switched = null; function get_cookie_bkp_newdesign(name) { var v = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)'); return v ? v[2] : null; } function accept_bkp_newdesign_switched() { var d = new Date; d.setTime(d.getTime() + 31536000000); // 1 year document.cookie = "is_bkp_newdesign_switched=1;domain=bangkokpost.com;path=/;expires=" + d.toGMTString(); } function check_bkp_newdesign_switched() { var is_bkp_newdesign_switched = get_cookie_bkp_newdesign('is_bkp_newdesign_switched'); if (!is_bkp_newdesign_switched) show_bkp_newdesign_bar(); } function go_bkp_old_newdesign() { accept_bkp_newdesign_switched(); location="https://www.bangkokpost.com?olddesign=1"; } function close_bkp_newdesign_bar() { accept_bkp_newdesign_switched(); document.getElementById("beta-banner").remove(); // $('#beta-banner').fadeOut(); } function show_bkp_newdesign_bar() { $('body').append('\ <div class="beta-footer" id="beta-banner" style="display:none">\ <div class="container">\ <div class="beta-footer-content">\ <div class="beta-close"><a onclick="close_bkp_newdesign_bar();" href="javascript:;" id="beta-close"><img src="https://www.bangkokpost.com/newdesign/assets/images/beta/close.svg" alt=""></a></div>\ <div class="beta-header">YOU’RE LOOKING AT THE NEW DESIGN.</div>\ <div class="beta-btn">\ <a target="_blank" href="https://docs.google.com/forms/d/e/1FAIpQLSf7I92Q7BGfYI652QyxSQ2ofoop7HEPDQqYn9WNLzZqypx6Kg/viewform?hl=en">TELL US WHAT YOU THINK <img src="https://www.bangkokpost.com/newdesign/assets/images/beta/arrow.svg" alt=""></a>\ <!--<a class="track_newdesign" href="javascript:;" onclick="go_bkp_old_newdesign();">RETURN TO THE CURRENT DESIGN <img src="https://www.bangkokpost.com/newdesign/assets/images/beta/arrow.svg" alt=""></a>--\>\ </div>\ </div>\ </div>\ </div>\ '); // https://docs.google.com/forms/d/e/1FAIpQLSf7I92Q7BGfYI652QyxSQ2ofoop7HEPDQqYn9WNLzZqypx6Kg/viewform?usp=sf_link $(window).scroll(function() { if ($(window).scrollTop() > 200) { $('#beta-banner').fadeIn(); } else { $('#beta-banner').fadeOut(); } }); $('#beta-close').click(function() { $('#beta-banner').fadeOut(); }); } // -- remove by ratt 2019-07-23-- check_bkp_newdesign_switched(); //======live-blog var g_campaign_promote_event = { /* Config */ date_begin: '2021/09/15 00:00:01 GMT+0700', date_end: '2021/10/01 16:20:59 GMT+0700', cookie_name: 'is_show_promote', domain: 'bangkokpost.com', age: 86400, // 1 day get_cookie_promote_event: function() { var v = document.cookie.match('(^|;) ?' + this.cookie_name + '=([^;]*)(;|$)'); return v ? v[2] : null; }, close_promote_event: function() { var d = new Date; d.setTime(d.getTime() + (this.age * 1000)); document.cookie = this.cookie_name + "=1;domain=" + this.domain + ";path=/;expires=" + d.toGMTString(); // $('#bar-promote-epaper').fadeOut(); $("#bar-promote-live").remove(); }, show_promote_event: function() { // $('body').append('<div class="bar-promote-live" id="bar-promote-live" style="z-index:99999;">\ // <div class="container">\ // <div class="bar-promote-bg">\ // <div class="bar-close"><a href="javascript:;" id="bar-close"><img src="https://static.bangkokpost.com/newdesign/assets/images/close.svg" alt=""></a></div>\ // <div class="bar-promote--box promo1"><img src="https://static.bangkokpost.com/newdesign/assets/images/forum/2020/event_live/img-event.png" class="img-fluid" alt=""></div>\ // <div class="bar-promote--box promo3">\ // <span class="animate-live"></span>\ // <img src="https://static.bangkokpost.com/newdesign/assets/images/forum/2020/economic_forum2/icn-live.png" alt="">\ // </div>\ // <div class="bar-promote--box promo31">\ // <div class="box1">SPECIAL LIVE</div>\ // <div class="box2">BROADCAST</div>\ // </div>\ // <div class="bar-promote--box promo4">WEDNESDAY 25 NOVEMBER, 2020 | 13:20 hrs. onward</div>\ // <div class="bar-promote--box promo5">\ // <!-- <a href="https://bit.ly/390LFhN"><img src="https://static.bangkokpost.com/newdesign/assets/images/forum/2020/economic_forum2/icn-play.png" class="img-fluid" alt=""></a> -->\ // </div>\ // </div>\ // </div>\ // </div>'); $('body').append('<div class="bar-promote-live" id="bar-promote-live">\ <div class="container">\ <div class="bar-promote-bg">\ <div class="bar-close"><a href="javascript:;" id="bar-close"><img src="/newdesign/assets/images/close.svg" alt=""></a></div>\ <!-- <div class="bar-promote--box promo0"><img src="/newdesign/assets/images/forum/2020/economic_forum2/img-bkp74.png" class="img-fluid" alt=""></div> -->\ <div class="bar-promote--box promo1"><img src="/newdesign/assets/images/forum/2021/bkp_conference/img-event.png" class="img-fluid" alt=""></div>\ <div class="bar-promote--box promo3">\ <span class="animate-live"></span>\ <img src="/newdesign/assets/images/forum/2021/bkp_conference/icn-live.png" alt="">\ </div>\ <div class="bar-promote--box promo31">\ <div class="box1">SPECIAL <span>LIVE</span> converage</div>\ <!-- <div class="box1">SPECIAL LIVE</div>\ <div class="box2">BROADCAST</div> -->\ </div>\ <div class="bar-promote--box promo4">\ FRIDAY, OCTOBER 1, 2021 | 1PM - 4.20PM\ </div>\ <div class="bar-promote--box promo5"><a href="https://bit.ly/3mtnspR"><img src="/newdesign/assets/images/forum/2021/bkp_conference/icn-play.png" class="img-fluid" alt=""></a></div>\ <div class="bar-promote--box promo6"><img src="/newdesign/assets/images/forum/2021/bkp_conference/img-txt_forum.png" class="img-fluid" alt=""></div>\ </div>\ </div>\ </div>'); // $('body').append('<div class="bar-promote-epaper" id="bar-promote-epaper" style="z-index:999999;"><div class="container"><div class="bar-promote-bg"><div class="bar-close"><a href="javascript:;" onclick="g_campaign_promote_event.close_promote_event();" id="bar-close"><img src="https://static.bangkokpost.com/newdesign/assets/images/close.svg" alt=""></a></div><div class="promote-031"><img src="https://static.bangkokpost.com/newdesign/assets/images/campaign/wsj/landing/flashsale.svg?v=0.1" class="img-fluid" alt=""></div><div class="special-promote--epaper"><div class="promote-01"><img src="https://static.bangkokpost.com/newdesign/assets/images/campaign/wsj/landing/logo-bp-wsj_white.png" class="img-fluid" alt=""></div><div class="promote-02">Save an <span>extra 500 baht.</span> 4 days only! <a href="https://bit.ly/36VAWEg" class="btn-special-promote--subscribe">SUBSCRIBE NOW</a></div></div></div></div></div>'); }, check_show_promote_event: function() { var multi_timezone_offset = 60000; var t = new Date(); var utc_now = t.getTime() + (t.getTimezoneOffset() * multi_timezone_offset); var check_date_begin = new Date(this.date_begin); var utc_begin = check_date_begin.getTime() + (check_date_begin.getTimezoneOffset() * multi_timezone_offset); var check_date_end = new Date(this.date_end); var utc_end = check_date_end.getTime() + (check_date_end.getTimezoneOffset() * multi_timezone_offset); if (utc_now > utc_begin && utc_now < utc_end) { var is_noti = this.get_cookie_promote_event(); if (!is_noti) { return true; } } else { return false; } }, set_promote_event: function() { if (this.check_show_promote_event()) { this.show_promote_event(); } } } // $(function() { // g_campaign_promote_event.set_promote_event(); // }); //console.log('g_ad_type ' + g_ad_type); //if(g_ad_type != "mobile"){ $(function() { g_campaign_promote_event.set_promote_event(); /* $("a.btn-special-promote--subscribe").on('mouseup', function (e) { //$("div.bar-promote--box.promo5 a").on('mouseup', function (e) { g_campaign_promote_event.close_promote_event(); //dataLayer.push({'event' : 'GAEvent','eventCategory' : 'Epaper flashsale 11-11', 'eventAction' : 'click', 'eventLabel' : 'Click Epaper flashsale homepage'}); }); */ $("#bar-close").on('mouseup', function (e) { g_campaign_promote_event.close_promote_event(); //dataLayer.push({'event' : 'GAEvent','eventCategory' : 'Epaper flashsale 11-11', 'eventAction' : 'click', 'eventLabel' : 'Click close Epaper flashsale'}); }); }); //} $(window).scroll(function() { if (g_campaign_promote_event.check_show_promote_event()) { if ($(window).scrollTop() > 200) { $('#bar-promote-live').fadeIn(); } else { $('#bar-promote-live').fadeOut(); } } }); //======end live-blog // tracking $(function(){ $(".track_newdesign").on('mouseup', function (e) { ga('send', 'event', 'Bangkok post newdesign', 'click', 'click_back_to_olddesign'); }); }); </script> <script> $(".owl-topics").on('initialized.owl.carousel changed.owl.carousel refreshed.owl.carousel', function (e) { if (!e.namespace) return; var carousel = e.relatedTarget, current = carousel.current(); if (current === carousel.maximum()) { $(".owl-topics.owl-carousel .owl-stage").addClass("pos-right"); }else if (current === carousel.minimum()){ $(".owl-topics.owl-carousel .owl-stage").removeClass("pos-right"); } if ($('.owl-topics .item').length <= 1) { $(".owl-topics.owl-carousel .owl-stage").addClass("item1"); } }); /* for section life */ $(".owl-recommended").on('initialized.owl.carousel changed.owl.carousel refreshed.owl.carousel', function (e) { if (!e.namespace) return; var carousel = e.relatedTarget, current = carousel.current(); if (current === carousel.maximum()) { $(".owl-recommended.owl-carousel .owl-stage").addClass("pos-right"); }else if (current === carousel.minimum()){ $(".owl-recommended.owl-carousel .owl-stage").removeClass("pos-right"); } if ($('.owl-recommended .item').length <= 1) { $(".owl-recommended.owl-carousel .owl-stage").addClass("item1"); } }); if(g_page_type == "homepage"){ oa_show_openx(2962, 'homepage', 'recommended'); // move to cxense } $(".owl-diary").on('initialized.owl.carousel changed.owl.carousel refreshed.owl.carousel', function (e) { if (!e.namespace) return; var carousel = e.relatedTarget, current = carousel.current(); if (current === carousel.maximum()) { $(".owl-diary.owl-carousel .owl-stage").addClass("pos-right"); }else if (current === carousel.minimum()){ $(".owl-diary.owl-carousel .owl-stage").removeClass("pos-right"); } if ($('.owl-diary .item').length <= 1) { $(".owl-diary.owl-carousel .owl-stage").addClass("item1"); } }); $(".owl-boxtab").on('initialized.owl.carousel changed.owl.carousel refreshed.owl.carousel', function (e) { if (!e.namespace) return; var carousel = e.relatedTarget, current = carousel.current(); if (current === carousel.maximum()) { $(".owl-boxtab.owl-carousel .owl-stage").addClass("pos-right"); }else if (current === carousel.minimum()){ $(".owl-boxtab.owl-carousel .owl-stage").removeClass("pos-right"); } if ($('.owl-boxtab .item').length <= 1) { $(".owl-boxtab.owl-carousel .owl-stage").addClass("item1"); } }); </script> <script type="text/javascript"> // console.log('test maintenance: ok'); var g_maintenance = { /* Config */ date_begin: '2023/07/13 09:00:00 GMT+0700', date_end: '2023/07/16 23:59:59 GMT+0700', cookie_name: 'is_show_maintenance', domain: 'bangkokpost.com', age: 86400, // 1 day get_cookie_maintenance: function() { var v = document.cookie.match('(^|;) ?' + this.cookie_name + '=([^;]*)(;|$)'); return v ? v[2] : null; }, close_maintenance: function() { var d = new Date; d.setTime(d.getTime() + (this.age * 1000)); document.cookie = this.cookie_name + "=1;domain=" + this.domain + ";path=/;expires=" + d.toGMTString(); $("#box-mainten").remove(); }, show_maintenance: function() { $( "body" ).addClass( "body-maintenance" ); // $('#header-nav').before('\<div id="box-mainten" style="background-color: #333; width: 100%; padding: 10px;">\ // <div style="max-width: 730px; width: 100%; margin: 0 auto; position: relative;">\ // <img src="https://static.bangkokpost.com/newdesign/assets/images/icon/alert.svg" style="width: 35px; height: 35px; position: absolute; left: 0; top: 5px;" alt="">\ // <div class="visible-lg visible-md visible-sm" style="padding:2px 50px 0; font-size: 13px; line-height: 20px; color: #fff;">On July 20th at 23:00 - July 21th at 02:00 (UTC+7), Bangkokpost.com will be under maintenance. You will not be able to access the website. We apologize for any inconvenience.</div>\ // <div class="visible-xs" style="padding:2px 50px 0; font-size: 13px; line-height: 20px; color: #fff;">On July 20th at 23:00 - July 21th at 02:00 (UTC+7), Bangkokpost.com will be under maintenance. You will not be able to access the website. We apologize for any inconvenience.</div>\ // <a href="javascript:void(0);" onclick="g_maintenance.close_maintenance();" id="btn-close2"><img src="https://static.bangkokpost.com/newdesign/assets/images/icon/icon-close.svg" style="width: 38px; height: 38px; position: absolute; right: 0; top: 3px;" alt=""></a>\ // </div>\ // </div>'); $('#header-nav').before('\<div id="box-mainten" style="background-color: #333; width: 100%; padding: 10px;">\ <div style="max-width: 730px; width: 100%; margin: 0 auto; position: relative;">\ <img src="https://static.bangkokpost.com/newdesign/assets/images/icon/alert.svg" style="width: 35px; height: 35px; position: absolute; left: 0; top: 5px;" alt="">\ <div class="visible-lg visible-md visible-sm" style="padding:2px 50px 0; font-size: 13px; line-height: 20px; color: #fff;">On July 16 at 22:00 - July 17 at 00:00 (UTC+7), we will be implementing changes to this website. During this time, you may not be able to access the pages. We apologise for this inconvenience.</div>\ <div class="visible-xs" style="padding:2px 50px 0; font-size: 13px; line-height: 20px; color: #fff;">On July 16 at 22:00 - July 17 at 00:00 (UTC+7), we will be implementing changes to this website. During this time, you may not be able to access the pages. We apologise for this inconvenience.</div>\ <a href="javascript:void(0);" onclick="g_maintenance.close_maintenance();" id="btn-close2"><img src="https://static.bangkokpost.com/newdesign/assets/images/icon/icon-close.svg" style="width: 38px; height: 38px; position: absolute; right: 0; top: 3px;" alt=""></a>\ </div>\ </div>'); }, check_show_maintenance: function() { var multi_timezone_offset = 60000; var t = new Date(); var utc_now = t.getTime() + (t.getTimezoneOffset() * multi_timezone_offset); var check_date_begin = new Date(this.date_begin); var utc_begin = check_date_begin.getTime() + (check_date_begin.getTimezoneOffset() * multi_timezone_offset); var check_date_end = new Date(this.date_end); var utc_end = check_date_end.getTime() + (check_date_end.getTimezoneOffset() * multi_timezone_offset); if (utc_now > utc_begin && utc_now < utc_end) { var is_noti = this.get_cookie_maintenance(); if (!is_noti) { return true; } } else { return false; } }, set_maintenance: function() { if (this.check_show_maintenance()) { this.show_maintenance(); } } } $(function() { g_maintenance.set_maintenance(); }); //======= ptomote home-topics-horo if (g_page_type == 'homepage' ){ //=====scrolling $(document).ready(function() { var go =''; var hashes; var url_string = window.location.href; if(url_string.length > 0) { var url = new URL(url_string); go = url.searchParams.get("go"); hashes = "#" + go; if(hashes == "#info-topicshoro"){ setTimeout(function() { $("#go-topicshoro").trigger('click'); }, 1000); } if(hashes == "#info-homehoro"){ setTimeout(function() { $("#go-homehoro").trigger('click'); }, 1000); } } }); // end ready function device_type() { var ad_type = ''; var _width = $( window ).width(); if (_width >= 950) { ad_type = "desktop"; } else if (_width < 950 && _width >= 768) { ad_type = "tablet"; } else if (_width < 768 && _width >= 336) { ad_type = "mobile"; } else if (_width < 336) { ad_type = "other"; } return ad_type; } (function ( $ ) { $.fn.pagescroll = function(options) { var nTarget = $.extend({},$.fn.pagescroll.defaults,options); jQuery.easing['jswing'] = jQuery.easing['swing']; if(nTarget.element == "html,body") { var nPosition = this.offset().top; $(nTarget.element).animate({ scrollTop: nPosition - nTarget.padding}, nTarget.scrollSpeed, nTarget.easing); } else { $(nTarget.element).animate({ scrollTop: this.offset().top - this.parent().offset().top + this.parent().scrollTop() - nTarget.padding}, nTarget.scrollSpeed, nTarget.easing); } }; $.fn.pagescroll.defaults = { easing:"swing",scrollSpeed:2000,padding:40,element:"html,body"}; }( jQuery )); $("#go-topicshoro").on('click', function (e) { e.preventDefault(); var _device_type = device_type(); setTimeout(function() { $("#info-topicshoro").pagescroll({scrollSpeed:1000}); if(_device_type == "mobile"){ setTimeout(function() { location.href = "#info-topicshoro"; setTimeout(function() { $("#info-topicshoro").pagescroll({scrollSpeed:1000}); }, 800); $(".owl-item:nth-child(2)") .addClass("active "); $('.owl-carousel').trigger('to.owl.carousel', 2 ); }, 1000); } }, 800); }); $("#go-homehoro").on('click', function (e) { e.preventDefault(); var _device_type = device_type(); setTimeout(function() { $("#info-homehoro").pagescroll({scrollSpeed:1000}); if(_device_type == "mobile"){ setTimeout(function() { location.href = "#info-homehoro"; setTimeout(function() { $("#info-homehoro").pagescroll({scrollSpeed:1000}); }, 800); // $(".owl-item:nth-child(2)") .addClass("active "); // $('.owl-carousel').trigger('to.owl.carousel', 2 ); }, 1000); } }, 800); }); } </script> <div id='div-gpt-ad-skin-0' style='height:1px; width:1px;'> <script> // googletag.cmd.push(function() { // googletag.display('div-gpt-ad-skin-0'); // }); </script> </div> <script> //window.googletag = window.googletag || {cmd: []}; /* remove by tong 2020-07-31 if(g_section != 'business' && g_section != 'homepage' ){ //console.log('test skin ad show'); googletag.cmd.push(function() { googletag.defineOutOfPageSlot('/2776261/bp_ros_skin', 'div-gpt-ad-theme').addService(googletag.pubads()); googletag.pubads().collapseEmptyDivs(); googletag.enableServices(); }); } */ // setTimeout(initGPT, 100); </script> <!-- /2776261/BKP_homepage_test/skin --> <!-- <div id='div-gpt-ad-theme'> <script> if(g_section != 'business' && g_section != 'homepage' && g_section != 'sports' ){ googletag.cmd.push(function() { googletag.display('div-gpt-ad-theme'); }); } </script> </div> --> <!---testing echo footer : ---><script type="text/javascript" src="/newdesign/assets/js/jquery.copypaste.js"></script> <script> if (g_page_type == 'article' && g_section !="learning" && g_section !="sports" ){ // console.log('lock copy section :' + g_section ); // if($this->config->item('page_type') == 'article' && strtolower($section_name) != "learning" ) { try { $.copypaste("%copy% <br /><br />Please credit and share this article with others using this link:" + top.window.location + ". View our policies at http://goo.gl/9HgTd and http://goo.gl/ou6Ip. © Bangkok Post PCL. All rights reserved."); } catch (e) {} } else { // console.log('unlock copy section :' + g_section ); } </script> <input type="text" id="temp_section" name="temp_section" style="display:none" > <script src="https://static.bangkokpost.com/newdesign/assets/custom/validate/validator_newsletter.js?v=0.077"></script> <script src="https://static.bangkokpost.com/newdesign/assets/custom/js/sponsored.js?v=0.077"></script> <!--Taboola 3 --> <script type="text/javascript"> if (g_page_type == 'homepage' || g_page_type == 'article') { window._taboola = window._taboola || []; _taboola.push({flush: true}); } </script> </body> </html>