Bookings – rubiesandglam
Rubies & Glam
.
Replace the image URLs below with your own WordPress Media Library image URLs. */(function () {
"use strict";if (document.body.classList.contains("elementor-editor-active")) {
return;
}const hero = document.querySelector("#home.header");
if (!hero || hero.dataset.rbgHeroReady === "true") {
return;
}const slides = [
{
img: "http://rubiesandglam.com/wp-content/uploads/2026/04/striking-portrait-confident-black-woman_153608-132724.jpg",
eyebrow: "Luxury makeup artistry for weddings, special occasions, and flawless everyday glam",
title: "RUBIES & GLAM",
overlay: { left: "0.62", mid: "0.46", right: "0.32", shadow: "0.36" }
},
// {
// img: "https://rubiesandglam.com/wp-content/uploads/2026/06/DSC07786-scaled.jpg",
// eyebrow: "Polished looks for birthdays, photoshoots, events, and evenings out",
// title: "SIGNATURE GLAM",
// overlay: { left: "0.70", mid: "0.60", right: "0.40", shadow: "0.48" }
// },
{
img: "https://rubiesandglam.com/wp-content/uploads/2026/06/afro-model-face-full-makeup-art-trendy-makeup-fashion-hot-attractive-face-dark-skin_893847-9085.jpg",
eyebrow: "From photoshoots to nights out, step in with a polished glow",
title: "GLAM MOMENTS",
overlay: { left: "0.64", mid: "0.48", right: "0.34", shadow: "0.38" }
}
];const subtitle = hero.querySelector(".caption h5");
const title = hero.querySelector(".caption h1");
const originalButtonText = hero.querySelector(".caption .fl-btn")?.textContent || "Book an Appointment";
let current = 0;
let timer = null;
let hasRenderedInitialSlide = false;hero.dataset.rbgHeroReady = "true";
hero.style.setProperty("--rbg-hero-current", `url("${slides[0].img}")`);
hero.style.backgroundImage = "none";
applyOverlay(slides[0]);const prevButton = document.createElement("button");
prevButton.className = "rbg-hero-nav rbg-hero-prev";
prevButton.type = "button";
prevButton.setAttribute("aria-label", "Previous hero slide");
prevButton.textContent = "\u2039";const nextButton = document.createElement("button");
nextButton.className = "rbg-hero-nav rbg-hero-next";
nextButton.type = "button";
nextButton.setAttribute("aria-label", "Next hero slide");
nextButton.textContent = "\u203a";const counter = document.createElement("div");
counter.className = "rbg-hero-counter";const dots = document.createElement("div");
dots.className = "rbg-hero-dots";slides.forEach((slide, index) => {
const dot = document.createElement("button");
dot.className = "rbg-hero-dot";
dot.type = "button";
dot.setAttribute("aria-label", `Go to hero slide ${index + 1}`);
dot.addEventListener("click", () => goToSlide(index));
dots.appendChild(dot);
});hero.append(prevButton, nextButton, counter, dots);function updateSlide() {
const slide = slides[current];hero.style.setProperty("--rbg-hero-current", `url("${slide.img}")`);
applyOverlay(slide);
hero.classList.add("rbg-hero-changing");if (subtitle) subtitle.textContent = slide.eyebrow;
if (title) title.textContent = slide.title;const button = hero.querySelector(".caption .fl-btn");
if (button) button.textContent = originalButtonText;counter.textContent = `0${current + 1} / 0${slides.length}`;
[...dots.children].forEach((dot, index) => {
dot.classList.toggle("is-active", index === current);
});if (hasRenderedInitialSlide) {
replayOriginalTitleAnimation();
} else {
hasRenderedInitialSlide = true;
}window.setTimeout(() => hero.classList.remove("rbg-hero-changing"), 900);
}function replayOriginalTitleAnimation() {
if (!title) return;title.style.animation = "none";
void title.offsetWidth;
title.style.animation = "";
}function goToSlide(index) {
current = (index + slides.length) % slides.length;
updateSlide();
restartAutoplay();
}function applyOverlay(slide) {
const overlay = slide.overlay || {};
hero.style.setProperty("--rbg-overlay-left", overlay.left || "0.62");
hero.style.setProperty("--rbg-overlay-mid", overlay.mid || "0.46");
hero.style.setProperty("--rbg-overlay-right", overlay.right || "0.32");
hero.style.setProperty("--rbg-text-shadow", overlay.shadow || "0.36");
}function nextSlide() {
goToSlide(current + 1);
}function prevSlide() {
goToSlide(current - 1);
}function restartAutoplay() {
window.clearInterval(timer);
timer = window.setInterval(nextSlide, 6500);
}prevButton.addEventListener("click", prevSlide);
nextButton.addEventListener("click", nextSlide);updateSlide();
restartAutoplay();
})();