/** * Premier Bariatric Institute - Squarespace Embed Script * * This script creates an embeddable version of the Premier Bariatric Institute website * that can be inserted into a Squarespace code block. * * Usage: * 1. Add a "Code" block to your Squarespace page * 2. Paste this entire script into the code block * 3. Save changes and publish your Squarespace site */ // Create container div const container = document.createElement('div'); container.id = 'premier-bariatric-embed'; container.style.width = '100%'; container.style.margin = '0'; container.style.padding = '0'; container.style.fontFamily = 'Inter, Helvetica Neue, Arial, sans-serif'; // Add Google Fonts link const fontLink = document.createElement('link'); fontLink.rel = 'stylesheet'; fontLink.href = 'https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'; document.head.appendChild(fontLink); // Insert the container into the current code block document.currentScript.parentNode.insertBefore(container, document.currentScript); // Inject the compiled CSS const style = document.createElement('style'); style.textContent = ` /* Base styles */ #premier-bariatric-embed * { margin: 0; padding: 0; box-sizing: border-box; } /* Container */ #premier-bariatric-embed { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; color: #222; line-height: 1.5; } /* Typography */ #premier-bariatric-embed h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; } #premier-bariatric-embed h2 { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; } #premier-bariatric-embed h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.75rem; } #premier-bariatric-embed p { margin-bottom: 1rem; } /* Sections */ #premier-bariatric-embed section { padding: 4rem 2rem; } #premier-bariatric-embed .container { max-width: 1200px; margin: 0 auto; } /* Header & Navigation */ #premier-bariatric-embed header { position: fixed; width: 100%; top: 0; left: 0; z-index: 100; background-color: white; box-shadow: 0 2px 10px rgba(0,0,0,0.1); padding: 1rem 2rem; transition: all 0.3s ease; } #premier-bariatric-embed .nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; } #premier-bariatric-embed .logo { font-weight: 700; font-size: 1.5rem; color: #9b87f5; } #premier-bariatric-embed nav ul { display: flex; list-style: none; gap: 2rem; } #premier-bariatric-embed nav a { text-decoration: none; color: #222; font-weight: 500; transition: color 0.3s ease; } #premier-bariatric-embed nav a:hover { color: #9b87f5; } /* Hero Section */ #premier-bariatric-embed .hero { padding-top: 8rem; padding-bottom: 4rem; background: linear-gradient(to bottom, #fff, #f6f6f6); } #premier-bariatric-embed .hero-content { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; } #premier-bariatric-embed .hero-image { border-radius: 1rem; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.1); } #premier-bariatric-embed .hero-image img { width: 100%; height: auto; display: block; } /* Button */ #premier-bariatric-embed .btn { display: inline-block; background-color: #9b87f5; color: white; padding: 0.75rem 1.5rem; border-radius: 0.5rem; text-decoration: none; font-weight: 500; transition: background-color 0.3s ease, transform 0.2s ease; cursor: pointer; border: none; } #premier-bariatric-embed .btn:hover { background-color: #8a76e4; transform: translateY(-2px); } #premier-bariatric-embed .btn-outline { background-color: transparent; border: 1px solid #9b87f5; color: #9b87f5; } #premier-bariatric-embed .btn-outline:hover { background-color: #f0edfb; } /* Services Section */ #premier-bariatric-embed .services { background-color: white; padding: 4rem 2rem; } #premier-bariatric-embed .services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; margin-top: 2rem; } #premier-bariatric-embed .service-card { background: white; border-radius: 1rem; overflow: hidden; box-shadow: 0 5px 20px rgba(0,0,0,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; } #premier-bariatric-embed .service-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); } #premier-bariatric-embed .service-image { height: 200px; overflow: hidden; } #premier-bariatric-embed .service-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; } #premier-bariatric-embed .service-card:hover .service-image img { transform: scale(1.05); } #premier-bariatric-embed .service-content { padding: 1.5rem; } /* Testimonials */ #premier-bariatric-embed .testimonials { background-color: #f6f6f6; padding: 4rem 2rem; } #premier-bariatric-embed .testimonial-card { background: white; border-radius: 1rem; padding: 2rem; box-shadow: 0 5px 20px rgba(0,0,0,0.05); margin-bottom: 2rem; } /* Contact Form */ #premier-bariatric-embed .contact { background-color: white; padding: 4rem 2rem; } #premier-bariatric-embed .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; } #premier-bariatric-embed form { display: flex; flex-direction: column; gap: 1rem; } #premier-bariatric-embed .form-group { display: flex; flex-direction: column; gap: 0.5rem; } #premier-bariatric-embed label { font-weight: 500; } #premier-bariatric-embed input, #premier-bariatric-embed textarea { padding: 0.75rem; border: 1px solid #ddd; border-radius: 0.5rem; font-family: inherit; font-size: inherit; } #premier-bariatric-embed input:focus, #premier-bariatric-embed textarea:focus { outline: none; border-color: #9b87f5; box-shadow: 0 0 0 2px rgba(155, 135, 245, 0.2); } /* Footer */ #premier-bariatric-embed footer { background-color: #222; color: white; padding: 4rem 2rem 2rem; } #premier-bariatric-embed .footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; } #premier-bariatric-embed .footer-links h3 { color: white; margin-bottom: 1rem; font-size: 1.2rem; } #premier-bariatric-embed .footer-links ul { list-style: none; } #premier-bariatric-embed .footer-links li { margin-bottom: 0.5rem; } #premier-bariatric-embed .footer-links a { color: #ccc; text-decoration: none; transition: color 0.3s ease; } #premier-bariatric-embed .footer-links a:hover { color: #9b87f5; } #premier-bariatric-embed .footer-bottom { border-top: 1px solid #444; padding-top: 2rem; text-align: center; color: #999; font-size: 0.875rem; } /* Responsive */ @media (max-width: 768px) { #premier-bariatric-embed h1 { font-size: 2rem; } #premier-bariatric-embed h2 { font-size: 1.75rem; } #premier-bariatric-embed .hero-content, #premier-bariatric-embed .form-grid { grid-template-columns: 1fr; } #premier-bariatric-embed .hero-content > div:first-child { order: 1; } #premier-bariatric-embed .hero-image { order: 0; margin-bottom: 2rem; } #premier-bariatric-embed nav ul { display: none; } #premier-bariatric-embed .mobile-menu-btn { display: block; } } `; document.head.appendChild(style); // Create DOM structure for the Premier Bariatric Institute embed container.innerHTML = `

Transform Your Life with Expert Weight Loss Solutions

Premier Bariatric Institute provides comprehensive, personalized care to help you achieve lasting weight loss and improved health.

Medical consultation

25+

Years Experience

5,000+

Satisfied Patients

98%

Success Rate

24/7

Patient Support

Our Weight Loss Solutions

We offer a comprehensive range of bariatric procedures and weight management programs tailored to meet your individual needs and health goals.

Gastric Bypass Surgery

Gastric Bypass Surgery

A surgical procedure that creates a small pouch from the stomach and connects it directly to the small intestine.

Key Benefits:

  • Significant and rapid weight loss
  • Improvement in obesity-related conditions
  • Long-term weight maintenance
Sleeve Gastrectomy

Sleeve Gastrectomy

A surgical weight-loss procedure that reduces the size of the stomach to about 15% of its original size.

Key Benefits:

  • Reduced stomach capacity
  • Decreased hunger hormones
  • Simplified surgical approach
Medical Weight Management

Medical Weight Management

A non-surgical approach to weight loss that combines medication, diet, physical activity and behavioral changes.

Key Benefits:

  • Personalized diet plans
  • Medication options
  • Ongoing support & monitoring
Revisional Surgery

Revisional Surgery

Surgical procedures to correct complications or inadequate results from a previous weight-loss surgery.

Key Benefits:

  • Address complications
  • Enhance weight loss results
  • Improve quality of life
Premier Bariatric Institute's advanced medical facility

About Premier Bariatric Institute

At Premier Bariatric Institute, we're dedicated to providing comprehensive, personalized care to help you achieve lasting weight loss and improved health.

Our team of board-certified surgeons and medical professionals has decades of combined experience in bariatric surgery and medical weight management.

🏆

Expert Team

Board-certified surgeons with specialized training

🔬

Advanced Technology

State-of-the-art facilities and equipment

❤️

Compassionate Care

Patient-centered approach and support

🛡️

Proven Results

Thousands of successful procedures

Patient Success Stories

Real results from real patients who have transformed their lives with our weight loss solutions.

"

After struggling with my weight for over 20 years, the sleeve gastrectomy at Premier Bariatric Institute completely transformed my life. I've lost 110 pounds and finally have the energy to keep up with my kids.

"

Sarah Johnson

Sleeve Gastrectomy

Lost 110 lbs
Sarah Johnson's weight loss transformation

Start Your Weight Loss Journey Today

Schedule a consultation with our experienced team to discuss personalized weight loss solutions tailored to your specific needs and goals.

1

Complete our simple consultation form

2

Meet with our weight loss specialists

3

Begin your customized treatment plan

Request Your Consultation

By submitting this form, you agree to our privacy policy and consent to be contacted regarding our services.

Ready to Transform Your Life?

Our dedicated team of healthcare professionals is here to support you every step of the way.

`; // Add basic interactivity const links = container.querySelectorAll('a[href^="#"]'); links.forEach(link => { link.addEventListener('click', (e) => { e.preventDefault(); const targetId = link.getAttribute('href'); const targetElement = document.querySelector(targetId); if (targetElement) { window.scrollTo({ top: targetElement.offsetTop - 80, behavior: 'smooth' }); } }); }); // Handle header scroll effect const header = container.querySelector('header'); window.addEventListener('scroll', () => { if (window.scrollY > 10) { header.style.padding = '0.75rem 2rem'; header.style.boxShadow = '0 2px 10px rgba(0,0,0,0.1)'; } else { header.style.padding = '1rem 2rem'; header.style.boxShadow = 'none'; } }); // Handle form submission const form = container.querySelector('form'); if (form) { form.addEventListener('submit', (e) => { e.preventDefault(); const submitBtn = form.querySelector('button[type="submit"]'); const originalText = submitBtn.textContent; submitBtn.textContent = 'Submitting...'; submitBtn.disabled = true; // Simulate form submission setTimeout(() => { alert('Your consultation request has been received! We\'ll contact you within 1-2 business days.'); form.reset(); submitBtn.textContent = originalText; submitBtn.disabled = false; }, 1500); }); }