Search
Hotline: (0361) 300 3030
EN
- About Us
- About Us
- Vision
- Mission
- Our Journey
- Career
- Our Hospitals
- Our Hospital
- Kasih Ibu Hospital – Denpasar
- Kasih Ibu Hospital – Kedonganan
- Kasih Ibu Hospital – Tabanan
- Kasih Ibu Hospital – Saba
- Services
- Services
- Dialysis
- Eye
- Medical Check Up for Visa
- Oncology
- Urology
- Facilities
- Facilities
- Intensive Care Unit
- Operating Room
- Inpatient
- Outpatient
- Delivery Room
- Radiology
- Laboratory
- Centre of Excellence
- Centre of Excellence
- Bali Dental and Implants Centre (BDIC)
- Bali Fertility Centre (BFC)
- Kasih Ibu Pre Hospital Centre (PHC)
- International Patient
- International Patient
- Before Your Visit
- In The Hospital
- Post-Care Services
- Our Team
- What’s New
- Insurance
✕
- About Us
- Our Hospitals
- Services
- Facilities
- Centre of Excellence
- International Patient
- What’s New
- Insurance
'); $(".info-left").clone().appendTo(".menu-header-left"); $(".info-right").clone().appendTo(".menu-header-left"); $(".column_header_icon").clone().appendTo(".menu-header-right"); $(".footer-menu").clone().appendTo(".mfn-header-tmpl-menu-sidebar .mfn-header-tmpl-menu-sidebar-wrapper"); // header search popup $(".btn-search").click(function() { $('.search-popup, .popup-overlay').addClass('active'); }); // home // find doctor $(".select-left").click(function() { $(".select-right").removeClass('active'); $(".option-box").removeClass('active'); $(this).toggleClass('active'); $(this).hasClass('active') ? $(".option-wrapper-1").addClass('active') : $(".option-wrapper-1").removeClass('active'); $('.option-slider').slick('setPosition'); }); $(".option-wrapper-1 .option-item").click(function() { $(".option-box").removeClass('active'); $(".doctor-wrapper-1").addClass('active'); $(".custom-select-trigger").text('ALL'); // Run the click event again after 5 seconds // setTimeout(function() { triggerDoctorPopupClick(); // }, 5000); }); // checker by organ $(".select-right").click(function() { $(".select-left").removeClass('active'); $(".option-box").removeClass('active'); $(this).toggleClass('active'); $(this).hasClass('active') ? $(".option-wrapper-2").addClass('active') : $(".option-wrapper-2").removeClass('active'); $('.option-slider').slick('setPosition'); }); $(".option-wrapper-2 .option-item").click(function() { $(".option-box").removeClass('active'); $(".checker-wrapper").addClass('active'); }); $(".symptom-item").click(function() { $(".checker-wrapper").removeClass('active'); $(".doctor-wrapper-2").addClass('active'); // Run the click event again after 5 seconds // setTimeout(function() { triggerDoctorPopupClick(); // }, 5000); }); // option slider if ($(window).width() > 768) { $(".option-slider").slick({ dots: false, infinite: false, speed: 1000, slidesToShow: 4, slidesToScroll: 1, autoplay: false, focusOnSelect: false, centerMode: false, variableWidth: true, prevArrow: '

', nextArrow: '

', }); } else { $(".option-slider").slick({ dots: false, infinite: true, speed: 1000, slidesToShow: 1, slidesToScroll: 1, autoplay: false, focusOnSelect: false, centerMode: false, variableWidth: true, prevArrow: '

', nextArrow: '

', }); } // organ and symptoms var activeOrgan = null; $('.organ-item').click(function() { // Get the selected organ from the data-organ attribute activeOrgan = $(this).data('organ'); // Remove 'is-active' class from all organs and add it to the selected one $('.organ-item').removeClass('is-active'); $(this).addClass('is-active'); // Show symptoms that include the selected organ in data-symptom $('.symptom-col').each(function() { var symptoms = $(this).data('symptom'); if (symptoms.includes(activeOrgan)) { $(this).slideDown(); } else { $(this).slideUp(); } }); }); // Close the popup when the close button is clicked $('.close-popup').on('click', function() { $('.doctor-popup, .popup-overlay').removeClass('active'); }); // Close the popup when clicking outside of .doctor-popup $('.popup-overlay').on('click', function(e) { if (!$(e.target).closest('.doctor-popup').length) { $('.doctor-popup, .search-popup, .popup-overlay').removeClass('active'); } }); // Back button 1 $(".doctor-wrapper-1 .btn-back-filter").click(function() { $(".doctor-wrapper-1").removeClass('active'); $(".option-wrapper-1").addClass('active'); }); // Back button 2 $(".checker-wrapper .btn-back-filter").click(function() { $(".checker-wrapper").removeClass('active'); $(".option-wrapper-1").addClass('active'); }); // Back button 3 $(".doctor-wrapper-2 .btn-back-filter").click(function() { $(".doctor-wrapper-2").removeClass('active'); $(".option-wrapper-2").addClass('active'); }); // Close button $(".btn-close-filter").click(function() { $(".select-holder").removeClass('active'); $(".option-box").removeClass('active'); }); // custom select $(".btn-select select").each(function() { var classes = $(this).attr("class"), id = $(this).attr("id"), name = $(this).attr("name"); var template = '
'; template += '' + $(this).attr("placeholder") + ''; template += '
'; $(this).find("option").each(function() { template += '' + $(this).html() + ''; }); template += '
'; $(this).wrap(''); $(this).hide(); $(this).after(template); }); $(".custom-option:first-of-type").hover(function() { $(this).parents(".custom-options").addClass("option-hover"); }, function() { $(this).parents(".custom-options").removeClass("option-hover"); }); $(".custom-select-trigger").on("click", function() { $('html').one('click', function() { $(".custom-select").removeClass("opened"); }); $(this).parents(".custom-select").toggleClass("opened"); event.stopPropagation(); }); $(".custom-option").on("click", function() { $(this).parents(".custom-select-wrapper").find("select").val($(this).data("value")); $(this).parents(".custom-options").find(".custom-option").removeClass("selection"); $(this).addClass("selection"); $(this).parents(".custom-select").removeClass("opened"); $(this).parents(".custom-select").find(".custom-select-trigger").text($(this).text()); triggerDoctorPopupClick(); }); // doctor popup // When the 'Learn More' button is clicked function triggerDoctorPopupClick() { $('body').on('click', '.btn-doctor-popup', function() { // Get parent '.doc-col' element var parent = $(this).closest('.doc-col'); // Extract information from the parent element var imgSrc = parent.find('img').attr('src'); var doctorName = parent.find('h4').text(); var specialityHtml = parent.find('.doc-speciality').html(); var scheduleHtml = parent.find('.doc-schedule').html(); var docLink = parent.find('.doc-link').text(); // Set the popup content with the extracted information $('.doctor-popup-left img').attr('src', imgSrc); $('.doctor-popup-left .h3').text(doctorName); $('.doctor-popup .doctor-popup-speciality').html(specialityHtml); $('.doctor-popup .doctor-popup-schedule').html(scheduleHtml); $('.doctor-popup .btn-blue').attr('href', docLink); // Add 'active' class to both .doctor-popup and .popup-overlay $('.doctor-popup, .popup-overlay').addClass('active'); console.log('open doctor popup'); }); } // Run the click event by default (on page load) triggerDoctorPopupClick(); // hover asset $(".asset1").hover(function() { $(this).addClass('active'); }, function() { $(this).removeClass('active'); }); $(".asset2").hover(function() { $(this).addClass('active'); $(".asset1").addClass('not-active'); }, function() { $(this).removeClass('active'); $(".asset1").removeClass('not-active'); }); // product slider if ($(window).width() < 768) { $(".shop-slider .woocommerce ul.products").slick({ dots: false, infinite: true, speed: 1000, slidesToShow: 3, slidesToScroll: 1, variableWidth: true, autoplay: false, focusOnSelect: false, centerMode: false, prevArrow: '

', nextArrow: '

', }); } else { $(".shop-slider .woocommerce ul.products").slick({ dots: false, infinite: true, speed: 1000, slidesToShow: 1, slidesToScroll: 1, variableWidth: true, autoplay: false, focusOnSelect: false, centerMode: false, prevArrow: '

', nextArrow: '

', }); } // cart button $(".button.add_to_cart_button.ajax_add_to_cart").addClass('btn-white btn-white-border'); // about // Our Hospital var itemsToShow = 4; // Number of items to show initially and on each "See More" click var allItems = $('.hospital-item'); // Select all items var seeMoreBtn = $('.see-btn'); // Correct selector for see more button // Check if items are fewer or equal to itemsToShow if (allItems.length <= itemsToShow) { seeMoreBtn.hide(); // Hide the "See More" button } else { // Hide the extra items var hiddenItems = allItems.slice(itemsToShow).addClass('hidden'); // Click event for "See More" button seeMoreBtn.click(function() { // Show a batch of hidden items hiddenItems.slice(0, itemsToShow).slideDown().removeClass('hidden'); // Update hiddenItems to exclude those already displayed hiddenItems = $('.hospital-item.hidden'); // Hide the button if no hidden items are left if (hiddenItems.length === 0) { seeMoreBtn.hide(); } }); } // Hospitals Inner if ($('section').is('.gallery-sec')) { if ($(window).width() > 768) { gsap.timeline({ scrollTrigger: { trigger: ".gallery-sec .section_wrapper", start: "top bottom", scrub: 1, toggleActions: "play none none reverse", } }) .to(".gallery-sec .wrap:first-child", { xPercent: 15, ease: "none", }) .to(".gallery-sec .wrap:nth-child(2)", { xPercent: -15, ease: "none", }, "-=.5") } else { gsap.timeline({ scrollTrigger: { trigger: ".gallery-sec .section_wrapper", start: "top bottom", scrub: 1, toggleActions: "play none none reverse", } }) .to(".gallery-sec .wrap:first-child", { xPercent: 155, ease: "none", }) .to(".gallery-sec .wrap:nth-child(2)", { xPercent: -155, ease: "none", }, "-=.5") } } // button gallery $('.btn-gallery').on('click', function(e) { e.preventDefault(); $('.gallery-item:first a').trigger('click'); }); // footer social buttons var social = $(".social-section2").html(); $(".column_footer_menu:last-child").append('
' + social + ''); // Allow scrolling within your scrollable div $(".doc-row, .organ-row, .symptom-row, .mfn-mm-menu-vertical li .sub-menu, .mfn-header-tmpl-menu-sidebar-wrapper, .filter-holder").on('mousewheel touchmove', function(e) { e.stopPropagation(); // Prevent Lenis from interfering }); $(".bottom-curve").after(''); if ($('div').is('.gallery')) { /* Autoplay instagram looping - Instagram Feed Flow-flow*/ $('.marquee').marquee(); setTimeout(function() { $('.gallery').marquee({ duration: 20000, gap: 0, delayBeforeStart: 0, direction: 'left', duplicated: true, startVisible: true, pauseOnHover: true }); $(".gallery .js-marquee-wrapper").each(function() { $(this).hover(function() { $(this).css("-webkit-animation-play-state", "paused"); }, function() { $(this).css("-webkit-animation-play-state", "running"); }) }); // draggable + momentum // https://codepen.io/loxks/pen/KKpVvVW const slider = document.querySelector(".gallery"); let isDown = false; let startX; let scrollLeft; slider.addEventListener('mousedown', (e) => { isDown = true; slider.classList.add('active'); startX = e.pageX - slider.offsetLeft; scrollLeft = slider.scrollLeft; cancelMomentumTracking(); }); slider.addEventListener('mouseleave', () => { isDown = false; slider.classList.remove('active'); }); slider.addEventListener('mouseup', () => { isDown = false; slider.classList.remove('active'); beginMomentumTracking(); }); slider.addEventListener('mousemove', (e) => { if (!isDown) return; e.preventDefault(); const x = e.pageX - slider.offsetLeft; const walk = (x - startX) * 1; //scroll speed ex:1, 2, 3 var prevScrollLeft = slider.scrollLeft; slider.scrollLeft = scrollLeft - walk; velX = slider.scrollLeft - prevScrollLeft; }); // Momentum var velX = 0; var momentumID; slider.addEventListener('wheel', (e) => { cancelMomentumTracking(); }); function beginMomentumTracking() { cancelMomentumTracking(); momentumID = requestAnimationFrame(momentumLoop); } function cancelMomentumTracking() { cancelAnimationFrame(momentumID); } function momentumLoop() { slider.scrollLeft += velX; velX *= 0.95; if (Math.abs(velX) > 0.5) { momentumID = requestAnimationFrame(momentumLoop); } } }, 2000); } // product excerpt text limit $('.woocommerce ul.products li.product').each(function() { let fullText = $(this).find(".excerpt p").text(); let wordArray = fullText.split(' '); if (wordArray.length > 19) { let truncatedText = wordArray.slice(0, 19).join(' ') + '...'; $(this).find(".excerpt p").text(truncatedText); } }); // filter radio button $(".sf-input-radio").after(''); $(".sf-input-checkbox").after(''); // filter accordion $(".searchandfilter h4").each(function() { $(this).wrap(''); }); $(".filter-collapse").append(''); const $accordionBtns = $(".filter-collapse"); // Open the first accordion item by default $accordionBtns.first().addClass("is-open"); $accordionBtns.first().parent().find("ul").css("max-height", $accordionBtns.first().parent().find("ul").prop("scrollHeight") + "px"); // Toggle accordion items on click $accordionBtns.on("click", function() { let $content = $(this).parent().find("ul"); if ($(this).hasClass("is-open")) { // If open, close it $(this).removeClass("is-open"); $content.css("max-height", '0'); } else { // If closed, open it $(this).addClass("is-open"); $content.css("max-height", $content.prop("scrollHeight") + "px"); } }); // insurance tab // Add click event for the buttons $(".btn-insurance").on("click", function() { // Remove active class from all buttons $(".btn-insurance").removeClass("active"); // Add active class to the clicked button $(this).addClass("active"); // Hide all sections $(".toggle-section").hide(); // Show the section associated with the clicked button const sectionToShow = $(this).data("hide"); $(sectionToShow).show(); }); // product details $(".woocommerce .mfn-variations-wrapper .mfn-vr label").contents().unwrap().wrap(''); $(".woocommerce .product div.entry-summary .price").wrap(''); $(".price-holder").prepend('Cost
'); var locations = $(".location-content").html(); $(".product-location-list .column_attr").prepend(locations); // About Us Slider $(".slider-nav .column_attr").addClass("owl-carousel"); $(".historical-journey-wrap .mcb-wrap-inner").addClass("owl-carousel"); // Shared state to avoid infinite loop let syncingFlag = false; function syncSliders(mainSlider, secondarySlider) { mainSlider.on("changed.owl.carousel", function(event) { if (syncingFlag) return; syncingFlag = true; let index = event.item.index; // Calculate the correct index for the secondary slider let secondaryIndex = index - mainSlider.find('.owl-item.cloned').length / 2; secondarySlider.trigger("to.owl.carousel", [secondaryIndex, 300, true]); syncingFlag = false; }); } function updateCenterClasses(event) { var currentIndex = event.item.index; var items = $(event.target).find(".owl-item"); // Remove previous classes items.removeClass("centerPrev centerNext centerPrev2 centerNext2"); // Add new classes to prev and next items of the center item items.eq(currentIndex - 1).addClass("centerPrev"); items.eq(currentIndex + 1).addClass("centerNext"); items.eq(currentIndex - 2).addClass("centerPrev2"); items.eq(currentIndex + 2).addClass("centerNext2"); } // Initialize both sliders var $navSlider = $(".slider-nav .owl-carousel"); var $journeySlider = $(".historical-journey-wrap .owl-carousel"); // About Us Slider Initialization $navSlider .on("initialized.owl.carousel", updateCenterClasses) .on("translate.owl.carousel", updateCenterClasses) .owlCarousel({ center: true, stagePadding: 0, loop: true, margin: 0, nav: true, autoplay: false, smartSpeed: 450, singleItem: true, navText: [ '
', '
', ], responsive: { 0: { items: 1.5, }, 768: { items: 4.2, }, 1025: { items: 4.2, }, }, }); // Journey Slider Initialization $journeySlider.owlCarousel({ items: 1, center: false, loop: true, margin: 0, nav: false, smartSpeed: 450, animateOut: 'fadeOut', autoHeight: true, }); // Apply synchronization syncSliders($navSlider, $journeySlider); syncSliders($journeySlider, $navSlider); // instagram slider mobile if ($(window).width() < 768) { $('#sb_instagram #sbi_images').slick({ autoplay: true, autoplaySpeed: 0, speed: 5000, arrows: false, swipe: false, slidesToShow: 1, cssEase: 'linear', pauseOnFocus: false, pauseOnHover: false, }); } // about us animation if ($('section').is('.image-circle-sec')) { gsap.timeline({ scrollTrigger: { trigger: ".image-circle-sec", start: "top bottom", scrub: 1, toggleActions: "play none none reverse", } }) .from(".image-circle-sec .section_wrapper", { xPercent: 15, ease: "none", }) } // search insurance home if ($('#insurance-partner-search-btn').length) { $('#insurance-partner-search-btn').on('click', function(e) { e.preventDefault(); // Prevent the default action of the tag var form = $(this).closest('form'); var action = form.attr('action'); form.attr('action', action + '#insurancePartnerSection'); // Append #insurancePartnerSection to the action URL form.submit(); // Submit the form }); } // search insurance page function checkParameterDefault() { const urlParams = new URLSearchParams(window.location.search); if (urlParams.has('_sf_s')) { $('.insurance-listing .cl-layout__item').fadeIn(300); $('.insurance-listing .cl-pagination').addClass('active'); // console.log('has parameter'); } else { $('.insurance-listing .cl-layout__item').hide(); $('.insurance-listing .cl-pagination').removeClass('active'); // console.log('no parameter'); } } checkParameterDefault(); function checkParameterAfter() { setTimeout(function() { const urlParams = new URLSearchParams(window.location.search); if (urlParams.has('_sf_s')) { $('.insurance-listing .cl-layout__item').fadeIn(300); $('.insurance-listing .cl-pagination').addClass('active'); // console.log('has parameter'); } else { $('.insurance-listing .cl-layout__item').hide(); $('.insurance-listing .cl-pagination').removeClass('active'); // console.log('no parameter'); } }, 2000); } $('.insurance-partner form.searchandfilter .sf-field-submit, .cl-pagination a').on('click', function() { checkParameterAfter(); }); $(document).on('keydown', function(e) { if (e.key === 'Enter' || e.keyCode === 13) { checkParameterAfter(); } }); // cart $(".woocommerce-cart .section, .woocommerce-account .section").addClass('no-margin-h no-margin-v full-width-ex-mobile default-width'); // mobile footer menu accordion // Accordion functionality if ($(window).width() < 768) { // Add a button to toggle accordion $('.mfn-footer-menu>li.menu-item-has-children>a').wrap(''); $(".accordion-title").append(''); // Initialize the accordion $('.mfn-footer-menu .menu-item-has-children').each(function(index) { var $this = $(this); var $submenu = $this.find('.sub-menu'); if (index === 0) { // Open the first accordion by default $submenu.show(); $this.addClass('open').find('.accordion-toggle').attr('aria-expanded', 'true'); } else { // Close all other accordions $submenu.hide(); } }); // open first accordion $(".column_footer_menu").first().find('.menu-item-has-children').first().find('.accordion-title').addClass('open'); // Accordion toggle button functionality $('.mfn-footer-menu .accordion-toggle').on('click', function(e) { var $button = $(this); var $submenu = $button.parent().siblings('.sub-menu'); var $parentMenuItem = $button.parent(); // Toggle submenu visibility $submenu.slideToggle(); $parentMenuItem.toggleClass('open'); // Update the button's aria-expanded attribute var isExpanded = $button.attr('aria-expanded') === 'true'; $button.attr('aria-expanded', !isExpanded); }); // product filter $(".btn-filter-mobile").click(function() { $(".filter-holder").addClass('active'); }); $(".btn-close-filter").click(function() { $(".filter-holder").removeClass('active'); }); } //blog-happenings inner $(".news-title").appendTo(".whats-new-sticky-title"); $(".news-featured").prependTo(".whats-new-desc"); // blog-happening sticky if ($('section').is(".whats-new-content-sec")) { let sticky = document.querySelector(".whats-new-sticky-title"), parent = document.querySelector(".whats-new-title-col"), content = document.querySelector(".whats-new-desc"); if (!sticky || !parent || !content) return; let offsetTop = 220; window.addEventListener("scroll", () => { let stop = content.offsetTop + content.offsetHeight - sticky.offsetHeight + 5, scrollY = window.scrollY, fixed = scrollY >= parent.offsetTop - offsetTop && scrollY < stop; Object.assign(sticky.style, { position: fixed ? "fixed" : scrollY >= stop ? "absolute" : "relative", top: fixed ? `${offsetTop}px` : scrollY >= stop ? `${stop - parent.offsetTop}px` : "auto", width: fixed ? `${parent.offsetWidth}px` : "" }); }); } $('.facilities-moving-img-sec .mcb-wrap-inner').addClass('testtt'); $('.facilities-moving-img-sec .mcb-wrap-inner').slick({ speed: 8000, autoplay: true, autoplaySpeed: 0, centerMode: false, cssEase: 'linear', slidesToShow: 1, draggable: false, focusOnSelect: false, pauseOnFocus: false, pauseOnHover: false, slidesToScroll: 1, variableWidth: true, infinite: true, initialSlide: 1, arrows: false, buttons: false }); // inpatient slider $(".service-inc-item-slider").slick({ dots: true, infinite: true, speed: 1000, slidesToShow: 1, slidesToScroll: 1, autoplay: true, focusOnSelect: false, }); // if ($('section').is('.facilities-moving-img-sec')) { // // Autoplay loop // $('.facilities-moving-img-sec .mcb-wrap-inner').marquee({ // duration: 20000, // gap: 0, // delayBeforeStart: 0, // direction: 'left', // duplicated: true, // startVisible: true, // pauseOnHover: true // }); // $(".facilities-moving-img-sec .js-marquee-wrapper").each(function() { // $(this).hover(function() { // $(this).css("-webkit-animation-play-state", "paused"); // }, function() { // $(this).css("-webkit-animation-play-state", "running"); // }) // }); // } // ---------------------- Smooth Scroll (JS) ---------------------- // const lenis = new Lenis({ duration: 1.2, easing: (t) => Math.min(1, 1.001 - Math.pow(2.25, -10 * t)) }); function raf(time) { lenis.raf(time); requestAnimationFrame(raf); } requestAnimationFrame(raf); });});/* ]]> */