amp-web-push-widget button.amp-subscribe { display: inline-flex; align-items: center; border-radius: 5px; border: 0; box-sizing: border-box; margin: 0; padding: 10px 15px; cursor: pointer; outline: none; font-size: 15px; font-weight: 500; background: #4A90E2; margin-top: 7px; color: white; box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.5); -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .amp-logo amp-img{width:190px} .amp-menu input{display:none;}.amp-menu li.menu-item-has-children ul{display:none;}.amp-menu li{position:relative;display:block;}.amp-menu > li a{display:block;} /* Inline styles */ div.acss0f1bf{display:none;} .icon-widgets:before {content: "\e1bd";}.icon-search:before {content: "\e8b6";}.icon-shopping-cart:after {content: "\e8cc";}
Calculate the cost of your beach day and compare it to average beach expenses worldwide. Get tips for saving money on your next beach vacation!
function calculateBeachPrice() { const location = document.getElementById('location').value; const people = parseInt(document.getElementById('people').value);
// Default prices for different locations (in USD) const locationPrices = { average: { umbrella: 10, chair: 8, parking: 15, food: 20, activities: 25 }, usa: { umbrella: 20, chair: 15, parking: 25, food: 30, activities: 40 }, europe: { umbrella: 15, chair: 12, parking: 20, food: 25, activities: 35 }, caribbean: { umbrella: 25, chair: 20, parking: 30, food: 40, activities: 50 }, asia: { umbrella: 5, chair: 3, parking: 2, food: 10, activities: 15 }, australia: { umbrella: 18, chair: 15, parking: 22, food: 28, activities: 35 } };
let prices; if (location === 'custom') { prices = { umbrella: parseFloat(document.getElementById('umbrella').value), chair: parseFloat(document.getElementById('chair').value), parking: parseFloat(document.getElementById('parking').value), food: parseFloat(document.getElementById('food').value), activities: parseFloat(document.getElementById('activities').value), other: parseFloat(document.getElementById('other').value) }; } else { prices = locationPrices[location]; prices.other = 0; }
// Calculate total cost const umbrellaCost = prices.umbrella; const chairCost = prices.chair * people; const parkingCost = prices.parking; const foodCost = prices.food * people; const activitiesCost = prices.activities * people; const otherCost = prices.other;
const totalCost = umbrellaCost + chairCost + parkingCost + foodCost + activitiesCost + otherCost;
// Display results document.getElementById('price-index').textContent = `$${totalCost.toFixed(2)}`;
// Create comparison let comparisonText = `
Cost breakdown for ${people} ${people === 1 ? 'person' : 'people'}:
`; comparisonText += `
`; comparisonText += `
`; comparisonText += `
`; comparisonText += `
`; if (otherCost > 0) { comparisonText += `
`; } comparisonText += `
`;
document.getElementById('comparison').innerHTML = comparisonText; document.getElementById('result').style.display = 'block';
// Scroll to results
document.getElementById('result').scrollIntoView({ behavior: 'smooth' });
}