document.addEventListener("DOMContentLoaded", function () {
const calculateBtn = document.getElementById("calculateBtn");
const servicesSelect = document.getElementById("services");
const quoteResult = document.getElementById("quoteResult");
calculateBtn.addEventListener("click", function () {
const selectedServices = Array.from(servicesSelect.selectedOptions).map(option => option.value);
// Define the cost for each service
const serviceCosts = {
photographs: 100,
drone: 150,
video: 200,
virtualTour: 250,
floorPlan: 50,
};
// Calculate the total cost based on selected services
const totalCost = selectedServices.reduce((acc, service) => {
return acc + serviceCosts[service];
}, 0);
// Display the quote
quoteResult.innerHTML = `<p>Your customized quote: $${totalCost}</p>`;
});
});