$("#nav").ready(()=>{
$.getJSON('https://ipinfo.io?token=5584aef93c3cd6', function(data){
if(data.country === "CA" || data.country === "US"){
// north america
$(".na-contact").html('
北美: 800-210-5501');
// remove whatsapp
$("#header-whatsapp").hide();
}
})
});
window.addEventListener("load", () => {
// ip change
$.getJSON('https://ipinfo.io?token=5584aef93c3cd6', function(data){
// make sure it runs only once.
if(data.country === "CA" || data.country === "US"){
// north america
$(".na-contact").html('
北美: 800-210-5501');
// remove whatsapp
$("#header-whatsapp").hide();
}else if(data.country === "TW"){
// taiwan phone
$(".tw-contact").html('
北美: +1-800-210-5501');
$(".na-contact").html('
台灣:
002-1-800-210-5501');
// line
$("#header-line").show();
$("#header-whatsapp").hide();
}else if(data.country === "HK" || data.country === "MO"){
// hongkong / macau
$(".hk-contact").html('
北美: +1-800-210-5501');
$(".na-contact").html('
香港: 3892-8241');
}else if(data.country === "HK" || data.country === "MO"){
// Vietnam / Thailand
$(".hk-contact").html('
北美: +1-800-210-5501');
$(".na-contact").html('
香港: +852-3892-8241 ');
}else if(data.country === "JP"){
// JP
$(".jp-contact").html('
北美: +1-800-210-5501');
$(".na-contact").html('
日本: 0120-011-826');
// line
$("#header-line").show();
$("#header-whatsapp").hide();
}else if(data.country === "SG"){
// SG
$(".sg-contact").html('
北美: +1-800-210-5501');
$(".na-contact").html('
新加坡: 6797-6924');
}else if(data.country === "MY" || data.country === "ID" || data.country === "PH"){
// Malaysia MY, Indonesia ID, Philippines PH
$(".sg-contact").html('
北美: +1-800-210-5501');
$(".na-contact").html('
新加坡: 65-6797-6924');
}else if(data.timezone.includes("Europe")){
// 歐洲
$(".eu-contact").html('
北美: +1-800-210-5501');
$(".na-contact").html('
歐洲: 44-20-3923-2740');
}
else if(data.country === "AU" || data.country === "NZ"){
// AU / New Zealand
$(".au-contact").html('
北美: +1-800-210-5501');
$(".na-contact").html('
澳洲: 1800-066-099');
}else if(data.timezone.includes("America") || data.timezone.includes("Africa")){
// South America, Africa: NA phone number
// hide whatsapp
$("#header-whatsapp").hide();
}
});
// theory buttons 原理
$("#theory-button-1").click(() => {
$("#theory-button-1").text((e, text) => text === "收起" ? "點擊閱讀更多" : "收起");
$("#theory-hide-1").toggle(500);
});
$("#theory-button-2").click(() => {
$("#theory-button-2").text((e, text) => text === "收起" ? "點擊閱讀更多" : "收起");
$("#theory-hide-2").toggle(500);
});
$("#theory-button-3").click(() => {
$("#theory-button-3").text((e, text) => text === "收起" ? "點擊閱讀更多" : "收起");
$("#theory-hide-3").toggle(500);
});
$("#theory-button-4").click(() => {
$("#theory-button-4").text((e, text) => text === "收起" ? "點擊閱讀更多" : "收起");
$("#theory-hide-4").toggle(500);
});
$("#theory-button-5").click(() => {
$("#theory-button-5").text((e, text) => text === "收起" ? "點擊閱讀更多" : "收起");
$("#theory-hide-5").toggle(500);
});
$("#theory-button-6").click(() => {
$("#theory-button-6").text((e, text) => text === "收起" ? "點擊閱讀更多" : "收起");
$("#theory-hide-6").toggle(500);
});
$("#theory-button-7").click(() => {
$("#theory-button-7").text((e, text) => text === "收起" ? "點擊閱讀更多" : "收起");
$("#theory-hide-7").toggle(500);
});
$("#theory-button-8").click(() => {
$("#theory-button-8").text((e, text) => text === "收起" ? "點擊閱讀更多" : "收起");
$("#theory-hide-8").toggle(500);
});
$("#theory-button-9").click(() => {
$("#theory-button-9").text((e, text) => text === "收起" ? "點擊閱讀更多" : "收起");
$("#theory-hide-9").toggle(500);
});
// popup
$(".popupbtn").click(e => {
const olheight = window.innerHeight;
$("#overlay").height(olheight).toggle(300);
e.stopPropagation();
});
$("#overlay").click((e) => {
const olheight = window.innerHeight;
$("#overlay").height(olheight).toggle(300);
e.stopPropagation();
});
$(".pop-up").click((e) => {
e.stopPropagation();
});
});
// toggle section
$(function () {
$(".toggle-section-testimonial").on('click', function (e) {
$(this).html((e, html) => html === '
' ? '
' : '
');
$(`#${$(this).data("toggle-content")}`).stop().slideToggle(0);
// set height
// Variables
var tabWrapper = $(".tab__content");
var activeTab = tabWrapper.find(".active");
var activeTabHeight = activeTab.outerHeight();
// Set height of wrapper on page load
tabWrapper.height(activeTabHeight);
// Animate height of wrapper to new tab height
tabWrapper.stop().animate({
height: activeTabHeight,
width: ignorethis,
}, 300, function () {
activeTab.fadeIn(200);
});
});
});
// end of toggle section
html { margin-top: 0 !important; }
@media screen and ( max-width: 782px ) {
html { margin-top: 0 !important; }
}
#theory-hide-5{
display: none;
}
a.ahover:hover {
color: #843222;
}
/*p,h1,h2,h3,h4,h5,h6,div,a{*/
/* font-family: "dfliyuan", Sans-serif!important;*/
/* font-weight: 300!important;*/
/*}*/
.blei h2,
.blei div,
.blei a {
font-family: "blei", "dfliyuan", Sans-serif !important;
}
.btn {
cursor: pointer;
}
.popupbtn {
cursor: pointer;
}
.patience-desc {
background: #764C12;
color: white;
padding: 5px;
}
.border-round {
background: #660;
width: 90px !important;
height: 90px !important;
border-radius: 50%;
text-align: center;
line-height: 90px;
}
#therapy .elementor-icon i:before {
top: 50%;
}
/* buhaoshi */
#principle i:before {
top: 50px;
}
.area-phone {
color: white;
}
.desc-head {
display: block;
font-size: 1.2em;
font-weight: bold;
margin-top: 10px;
}
#testimonial-tab .elementor-toggle-title {
color: #333 !important;
}
#testimonial-tab .testimonial-tab-content {
color: #eee !important;
line-height: 1.7em !important;
font-size: 16px !important;
}
#testimonial-tab .elementor-tab-content strong {
display: block;
}
.hide {
display: none;
}
/* font awesome */
.fa-caret-down:before,
.fa-caret-up:before {
font-size: 28px;
}
@media sereen and (max-width: 1070px) {}