Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
/* ===============================
QUERY MODAL (SAFE)
================================ */
function openQueryModal() {
const modal = document.getElementById("queryModal");
if (modal) modal.style.display = "block";
}
function closeQueryModal() {
const modal = document.getElementById("queryModal");
if (modal) modal.style.display = "none";
}
/* Close query modal when clicking outside */
document.addEventListener("click", function (event) {
const modal = document.getElementById("queryModal");
if (modal && event.target === modal) closeQueryModal();
});
/* ===============================
MOBILE MENU
================================ */
function toggleMobileMenu() {
const menu = document.getElementById("mobileMenu");
if (!menu) return;
if (menu.style.display === "block") {
menu.style.display = "none";
document.body.style.overflow = "auto";
} else {
menu.style.display = "block";
document.body.style.overflow = "hidden";
}
}
function toggleMobileDropdown(el) {
if (el && el.parentElement) {
el.parentElement.classList.toggle("active");
}
}
// /* ===============================
// HEADER SCROLL HIDE / SHOW
// ================================ */
// let lastScroll = 0;
// const header = document.querySelector(".site-header");
// window.addEventListener("scroll", function () {
// if (!header) return;
// const currentScroll = window.pageYOffset;
// if (currentScroll > lastScroll && currentScroll > 50) {
// header.classList.add("hide-header");
// } else {
// header.classList.remove("hide-header");
// }
// lastScroll = currentScroll;
// });
/* ===============================
REVIEWS DATA
================================ */
var reviewsData = window.reviewsData || [];
var avatarColors = window.avatarColors || [];
function cleanReviewText(text) {
if (!text) return "";
text = text.replace(/<[^>]*>/g, "");
const textarea = document.createElement("textarea");
textarea.innerHTML = text;
return textarea.value.replace(/\s+/g, " ").trim();
}
/* ===============================
REVIEWS AUTO SCROLL
================================ */
let scrollPosition = 0;
let scrollSpeed = 0.5;
let maxScroll = 6000;
let isPaused = false;
function smoothScroll() {
if (!isPaused) {
scrollPosition += scrollSpeed;
if (scrollPosition >= maxScroll) scrollPosition = 0;
const list = document.getElementById("reviewsList");
if (list) {
list.style.transform = `translateY(-${scrollPosition}px)`;
}
}
requestAnimationFrame(smoothScroll);
}
document.addEventListener("DOMContentLoaded", function () {
const wrapper = document.querySelector(".testimonials-wrapper");
if (wrapper) {
wrapper.addEventListener("mouseenter", () => (isPaused = true));
wrapper.addEventListener("mouseleave", () => (isPaused = false));
}
smoothScroll();
});
/* ===============================
REVIEW MODAL
================================ */
function openReviewModal(id, name, rating, text, created_at) {
// Title
document.getElementById("reviewModalTitle").textContent =
name + "'s Review";
// Avatar initials
const words = name.split(" ");
let initials = words[0][0];
if (words[1]) initials += words[1][0];
const avatar = document.getElementById("reviewModalAvatar");
avatar.textContent = initials.toUpperCase();
avatar.style.backgroundColor = "#ccab85";
// Name
document.getElementById("reviewModalName").textContent = name;
// Stars
rating = parseInt(rating, 10);
document.getElementById("reviewModalStars").textContent =
"★".repeat(rating) + "☆".repeat(5 - rating);
// Review text
document.getElementById("reviewModalText").textContent =
`"${text}"`;
// Date
document.getElementById("reviewModalDate").textContent =
new Date(created_at).toDateString();
// Show modal
document.getElementById("reviewDisplayModal").style.display = "block";
}
function closeReviewModal() {
const modal = document.getElementById("reviewDisplayModal");
if (modal) modal.style.display = "none";
}
document.addEventListener("click", function (event) {
const modal = document.getElementById("reviewDisplayModal");
if (modal && event.target === modal) closeReviewModal();
});
/* ===============================
FESTIVAL POPUP
================================ */
window.addEventListener("load", () => {
const popup = document.getElementById("festivalPopup");
if (!popup) return;
if (!sessionStorage.getItem("festivalPopupSeen")) {
popup.classList.add("active");
document.body.style.overflow = "hidden";
}
popup.addEventListener("click", e => {
if (e.target === popup) closeFestivalPopup();
});
document.addEventListener("keydown", e => {
if (e.key === "Escape") closeFestivalPopup();
});
document.addEventListener("click", e => {
if (e.target.classList.contains("festival-close")) {
e.stopPropagation();
closeFestivalPopup();
}
});
});
function closeFestivalPopup() {
const popup = document.getElementById("festivalPopup");
if (!popup) return;
popup.classList.remove("active");
document.body.style.overflow = "auto";
sessionStorage.setItem("festivalPopupSeen", "true");
}
/* ===============================
BUTTON HANDLERS
================================ */
function handleConsultClick(event) {
const btn = event.target;
btn.style.transform = "scale(0.95)";
setTimeout(() => (btn.style.transform = "scale(1)"), 150);
alert("Consultation booking functionality would be implemented here!");
}
function handleKnowMoreClick() {
window.location.href = "about.php";
}
/* ===============================
SPARKLE EFFECT
================================ */
function createSparkle(x, y) {
const sparkle = document.createElement("div");
sparkle.style.position = "fixed";
sparkle.style.left = `${x}px`;
sparkle.style.top = `${y}px`;
sparkle.style.color = "#A5806A";
sparkle.style.fontSize = "12px";
sparkle.style.pointerEvents = "none";
sparkle.style.zIndex = "9999";
sparkle.innerHTML = "✦";
sparkle.style.animation = "sparkle 1s ease-out forwards";
document.body.appendChild(sparkle);
setTimeout(() => {
if (document.body.contains(sparkle)) {
document.body.removeChild(sparkle);
}
}, 1000);
}
/* ===============================
TESTIMONIAL CENTER HIGHLIGHT
================================ */
function updateCenterTestimonial() {
const cards = document.querySelectorAll(".testimonial");
const wrapper = document.querySelector(".testimonials-wrapper");
if (!wrapper) return;
const wrapRect = wrapper.getBoundingClientRect();
const centerY = wrapRect.top + wrapRect.height / 2;
cards.forEach(card => {
const rect = card.getBoundingClientRect();
const cardCenter = rect.top + rect.height / 2;
Math.abs(centerY - cardCenter) < 50
? card.classList.add("center")
: card.classList.remove("center");
});
}
/* ===============================
DOM READY
================================ */
document.addEventListener("DOMContentLoaded", function () {
document.querySelectorAll(".leave-query-btn").forEach(btn => {
btn.addEventListener("click", openQueryModal);
});
document.querySelectorAll(".mobile-menu-content a").forEach(link => {
link.addEventListener("click", function () {
if (!this.classList.contains("mobile-dropdown-title")) {
toggleMobileMenu();
}
});
});
const form = document.getElementById("queryForm");
if (form) {
form.addEventListener("submit", function (e) {
e.preventDefault();
const btn = this.querySelector(".submit-btn");
const oldText = btn.textContent;
btn.textContent = "Submitting...";
btn.disabled = true;
fetch("submit_query.php", {
method: "POST",
body: new FormData(this)
})
.then(res => res.json())
.then(data => {
alert((data.success ? "✓ " : "✗ ") + data.message);
if (data.success) {
this.reset();
closeQueryModal();
}
})
.catch(() => alert("✗ An error occurred. Please try again."))
.finally(() => {
btn.textContent = oldText;
btn.disabled = false;
});
});
}
document.addEventListener("mousemove", e => {
if (Math.random() < 0.05) {
createSparkle(e.clientX, e.clientY);
}
});
setInterval(updateCenterTestimonial, 100);
});
/* ===============================
RESPONSIVE CLEANUP
================================ */
window.addEventListener("resize", function () {
const menu = document.getElementById("mobileMenu");
if (menu && window.innerWidth > 768) {
menu.style.display = "none";
document.body.style.overflow = "auto";
}
});