/* update variables when header is on dark background*/
.on-dark-bg {
   --header-bg: var(--current-header-bg);
   --chevron-clr: white;
   --menu-item-clr: white;
   --menu-item-hover-bg: #172235;
   --menu-item-hover-clr: #bc92e6;
   --menu-toggle-clr: var(--menu-item-clr);
   --dropdown-content-border: solid 1px rgb(220 220 220 / 20%);
   --mobile-menu-bg: var(--header-bg);
 }

 .on-light-bg {
   --menu-item-clr: black;
   /* update variables when header is on light background*/
 }


 /* update variable when on dark or light background */
 .on-dark-bg,
 .on-light-bg {
   --overlay-header-bg-active: var(--current-header-bg);
   --dropdown-content-bg: var(--current-header-bg);
 }

 .on-video-section {
   /* update variables when header is on video section*/
   --menu-item-clr: white;
   --chevron-clr: white;
   --menu-item-hover-bg: rgb(0 0 0 / 30%);
   --menu-item-hover-clr: #bc92e6;
   --dropdown-content-bg: rgb(0 0 0 / 70%);
   --overlay-header-bg: rgb(0 0 0 / 25%);
   --overlay-header-bg-active: var(--dropdown-content-bg);
   --dropdown-content-border: solid 1px rgb(220 220 220 / 20%);
   --current-header-bg: rgb(0 0 0 / 14%) !important;
   --header-bg: rgb(0 0 0 / 70%);
   --menu-toggle-clr: white;
   --mobile-menu-bg: rgb(0 0 0 / 95%);
   --menu-cta-border: var(--dropdown-content-border)
 }


 .on-hero-section {
   /* update variables when header is on hero section*/
 }

 /* header bg blure when on video section */
 html:not(.dwc-mobile) .dwc-nest-header.on-video-section {
   backdrop-filter: blur(var(--overlay-header-blur));
 }

 /* overlay header border when on video section or dark background*/
 .dwc-nest-header:is(.on-dark-bg, .on-video-section)[data-overlay-header="true"] {
   border: 1px solid rgba(255, 255, 255, 0.2);
 }

 /* header bottom border when on dark background or video section*/
 .dwc-nest-header:is(.on-dark-bg, .on-video-section) {
   border-bottom: 1px solid rgba(255, 255, 255, 0.2);
 }


 /* logo color when on dark background*/
 .on-dark-bg .dwc-nest-menu__logo path {
   fill: white;
 }

 /* logo color when on light background*/
 .on-dark-bg .dwc-nest-menu__logo path {
   /*define svg fill when logo is on light background */
 }

 /* logo color when on video background*/
 .on-video-section .dwc-nest-menu__logo path {
   fill: white;
 }

/*custom */

.on-dark-bg .mega-menu-magic__menu-icon-large{
   background-color: var(--current-header-bg);
    fill: #bc92e6;
    color: #bc92e6;
}

.on-video-section .mega-menu-magic__menu-icon-large{
   background-color: var(--current-header-bg);
    fill: #bc92e6;
    color: #bc92e6;
}

.on-video-section .mega-menu-magic__dropdown-title,
.on-dark-bg .mega-menu-magic__dropdown-title{
    color: rgb(210 210 210);   
}
// Constants
const BREAKPOINT_DESKTOP = 0;
const DEBOUNCE_DELAY = 50;

// Configuration object for all header-related selectors
const HEADER_CONFIG = {
  // Main header element
  headerElement: '.dwc-nest-header',
  // Wrapper element selectors (can be classes, IDs, or data attributes)
  wrapperSelectors: [
    // '.dwc-nest-header__container'
  ],
  // Elements to monitor for header styling (can include any CSS selector)
  // Default monitors sections, but you can add footer, divs, or any element
  monitoredElements: 'section, [data-header-zone]',
  // Store original header background color
  originalHeaderBgColor: null
};

// Unified section type configuration
// Add new data attributes here - they will be automatically mapped to header classes
const SECTION_TYPES = {
  'data-hero': 'on-hero-section',
  'data-video': 'on-video-section',
  'data-custom': 'on-custom-section',
  'data-sticky': 'on-media-section'
  // Add new: 'data-feature': 'on-feature-section'
};

// Configuration for excluded sections
const EXCLUSION_CONFIG = {
  // Data attribute that identifies sections to exclude from header styling
  sectionAttribute: 'data-exclude-header'
};

// Text color classes
const TEXT_CLASSES = {
  light: 'on-dark-bg',
  dark: 'on-light-bg'
};

// Generate classes to remove dynamically from SECTION_TYPES and text classes
const ALL_CLASSES_TO_REMOVE = [
  // Add all header classes from section types
  ...Object.values(SECTION_TYPES),
  // Add text color classes
  TEXT_CLASSES.light,
  TEXT_CLASSES.dark
];

// Performance optimization: Cache DOM elements and computed values
const CACHE = {
  headerElement: null,
  wrapperElement: null,
  sections: [],
  sectionsData: new Map(),
  colorCache: new Map(),
  tempColorElement: null,
  lastKnownSection: null,
  isUpdating: false,
  pendingColorUpdate: false
};

// Initialize cache
function initializeCache() {
  // Cache header elements
  CACHE.headerElement = document.querySelector(HEADER_CONFIG.headerElement);
  
  // Try each wrapper selector until one is found
  for (const selector of HEADER_CONFIG.wrapperSelectors) {
    CACHE.wrapperElement = document.querySelector(selector);
    if (CACHE.wrapperElement) break;
  }
  
  // Cache sections and their positions
  CACHE.sections = Array.from(document.querySelectorAll(HEADER_CONFIG.monitoredElements));
  
  // Create reusable element for color calculations
  CACHE.tempColorElement = document.createElement('div');
  CACHE.tempColorElement.style.position = 'absolute';
  CACHE.tempColorElement.style.visibility = 'hidden';
  CACHE.tempColorElement.style.pointerEvents = 'none';
  document.body.appendChild(CACHE.tempColorElement);
  
  // Cache section metadata
  updateSectionsCache();
}

// Update sections cache (call when DOM changes)
function updateSectionsCache() {
  CACHE.sections = Array.from(document.querySelectorAll(HEADER_CONFIG.monitoredElements));
  CACHE.sectionsData.clear();
  
  CACHE.sections.forEach((section, index) => {
    const sectionData = {
      index,
      isExcluded: section.hasAttribute(EXCLUSION_CONFIG.sectionAttribute)
    };
    
    // Dynamically check for all section types defined in SECTION_TYPES
    Object.keys(SECTION_TYPES).forEach(attribute => {
      sectionData[attribute] = section.hasAttribute(attribute);
    });
    
    CACHE.sectionsData.set(section, sectionData);
  });
}

// Function to remove all section classes from :root only
function removeAllSectionClasses() {
  const rootElement = document.documentElement;
  
  // Remove classes from :root only
  rootElement.classList.remove(...ALL_CLASSES_TO_REMOVE);
}

// Function to update the CSS variable on :root
function updateRootBackgroundVariable(color) {
  document.documentElement.style.setProperty('--current-header-bg', color);
}

// Function to apply classes to :root only
function applyClassesToRoot(headerClass, textClass) {
  const rootElement = document.documentElement;
  
  // Apply header class to :root only
  if (headerClass) {
    rootElement.classList.add(headerClass);
  }
  
  // Apply text class to :root only
  if (textClass) {
    rootElement.classList.add(textClass);
  }
}

// Optimized color conversion using cached temp element
function getRGBValues(color) {
  const cacheKey = color;
  if (CACHE.colorCache.has(cacheKey)) {
    return CACHE.colorCache.get(cacheKey);
  }
  
  CACHE.tempColorElement.style.color = color;
  const computedColor = window.getComputedStyle(CACHE.tempColorElement).color;
  
  // Extract RGB values
  const match = computedColor.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);
  const result = match ? {
    r: parseInt(match[1]),
    g: parseInt(match[2]),
    b: parseInt(match[3])
  } : { r: 255, g: 255, b: 255 };
  
  // Cache the result
  CACHE.colorCache.set(cacheKey, result);
  return result;
}

// Function to check if a background color is transparent or empty
function isBackgroundTransparent(color) {
  if (!color) return true;
  
  const transparentValues = [
    'transparent',
    'rgba(0, 0, 0, 0)',
    'rgba(0,0,0,0)',
    'initial',
    'inherit',
    ''
  ];
  
  return transparentValues.includes(color.toLowerCase().replace(/\s/g, ''));
}

// Function to determine if a color is dark or light
function isColorDark(color) {
  if (color === 'transparent' || color === 'rgba(0, 0, 0, 0)') {
    return false;
  }
  
  const rgb = getRGBValues(color);
  const luminance = (0.299 * rgb.r + 0.587 * rgb.g + 0.114 * rgb.b) / 255;
  return luminance < 0.5;
}

// Optimized section detection using cached data
function getCurrentSection() {
  if (!CACHE.headerElement || CACHE.sections.length === 0) return null;
  
  const headerHeight = CACHE.headerElement.offsetHeight;
  
  // Quick check if we're still in the same section
  if (CACHE.lastKnownSection) {
    const rect = CACHE.lastKnownSection.getBoundingClientRect();
    if (rect.top <= headerHeight && rect.bottom > headerHeight) {
      return CACHE.lastKnownSection;
    }
  }
  
  // Binary search would be ideal here, but simple loop is sufficient for most cases
  for (const section of CACHE.sections) {
    const rect = section.getBoundingClientRect();
    if (rect.top <= headerHeight && rect.bottom > headerHeight) {
      CACHE.lastKnownSection = section;
      return section;
    }
  }
  
  const firstSection = CACHE.sections[0] || null;
  CACHE.lastKnownSection = firstSection;
  return firstSection;
}

// Function to get computed background color with caching
function getComputedBackgroundColor(element) {
  const cacheKey = element;
  if (CACHE.colorCache.has(cacheKey)) {
    return CACHE.colorCache.get(cacheKey);
  }
  
  const bgColor = window.getComputedStyle(element).backgroundColor;
  CACHE.colorCache.set(cacheKey, bgColor);
  return bgColor;
}

// Function to initialize original header background color
function initializeOriginalHeaderBgColor() {
  if (CACHE.headerElement) {
    HEADER_CONFIG.originalHeaderBgColor = window.getComputedStyle(CACHE.headerElement).backgroundColor;
  }
}

// Function to determine header style configuration based on section
function determineHeaderConfig(section) {
  if (!section) return null;
  
  const sectionData = CACHE.sectionsData.get(section);
  if (!sectionData) return null;
  
  // If section is excluded, return null to skip styling
  if (sectionData.isExcluded) {
    return null;
  }
  
  // Dynamically check for any section type defined in SECTION_TYPES
  for (const [attribute, headerClass] of Object.entries(SECTION_TYPES)) {
    if (sectionData[attribute]) {
      return {
        backgroundColor: null,
        headerClass: headerClass,
        needsWhiteText: null,
        isSpecialSection: true
      };
    }
  }
  
  // Get the actual background color of the section
  const sectionBgColor = getComputedBackgroundColor(section);
  
  if (isBackgroundTransparent(sectionBgColor)) {
    return {
      backgroundColor: HEADER_CONFIG.originalHeaderBgColor || 'rgb(255, 255, 255)',
      headerClass: null,
      needsWhiteText: isColorDark(HEADER_CONFIG.originalHeaderBgColor || 'rgb(255, 255, 255)'),
      isSpecialSection: false
    };
  }
  
  const needsWhiteText = isColorDark(sectionBgColor);
  
  return {
    backgroundColor: sectionBgColor,
    headerClass: null,
    needsWhiteText: needsWhiteText,
    isSpecialSection: false
  };
}

// Function to apply styles (background color to header, classes to :root only)
function applyHeaderStyles(config) {
  if (!CACHE.headerElement || !config) return;
  
  const elementsToStyle = [CACHE.headerElement, CACHE.wrapperElement].filter(Boolean);
  
  // Use requestAnimationFrame for smooth visual updates
  requestAnimationFrame(() => {
    // First, remove all section classes and text classes from :root only
    removeAllSectionClasses();
    
    // Update the root CSS variable with background color
    if (config.backgroundColor !== null) {
      const appliedBgColor = config.backgroundColor || '';
      updateRootBackgroundVariable(appliedBgColor);
    } else {
      updateRootBackgroundVariable('');
    }
    
    // Determine text class to apply
    const textClass = config.needsWhiteText !== null 
      ? (config.needsWhiteText ? TEXT_CLASSES.light : TEXT_CLASSES.dark)
      : null;
    
    // Apply classes to :root only
    applyClassesToRoot(config.headerClass, textClass);
    
    // Handle background color on header elements only
    elementsToStyle.forEach(element => {
      if (config.backgroundColor !== null) {
        const appliedBgColor = config.backgroundColor || '';
        element.style.backgroundColor = appliedBgColor;
      } else {
        element.style.backgroundColor = '';
      }
    });
    
    // For special sections, allow CSS to apply first, then get computed background color
    if (config.isSpecialSection && config.headerClass) {
      // Use setTimeout(0) to ensure CSS has been applied, but batch multiple calls
      if (!CACHE.pendingColorUpdate) {
        CACHE.pendingColorUpdate = true;
        setTimeout(() => {
          // Process all elements that need color updates in this batch
          elementsToStyle.forEach(el => {
            // Check if element has any of the section classes (though they're not applied anymore)
            const hasSectionClass = Object.values(SECTION_TYPES).some(className => 
              el.classList.contains(className)
            );
            
            if (hasSectionClass) {
              const computedBgColor = getComputedBackgroundColor(el);
              updateRootBackgroundVariable(computedBgColor);
            }
          });
          CACHE.pendingColorUpdate = false;
        }, 50);
      }
    }
    
    CACHE.isUpdating = false;
  });
}

// Throttled update function using requestAnimationFrame
function updateHeaderStyles() {
  // Prevent multiple updates in the same frame
  if (CACHE.isUpdating) return;
  
  // Apply only on screens larger than the breakpoint
  if (window.innerWidth <= BREAKPOINT_DESKTOP) {
    return;
  }
  
  CACHE.isUpdating = true;
  
  const currentSection = getCurrentSection();
  if (!currentSection) {
    CACHE.isUpdating = false;
    return;
  }
  
  const headerConfig = determineHeaderConfig(currentSection);
  if (!headerConfig) {
    CACHE.isUpdating = false;
    return;
  }
  
  applyHeaderStyles(headerConfig);
}

// Debounce function for resize events (less frequent)
function debounce(func, wait) {
  let timeout;
  return function executedFunction(...args) {
    const later = () => {
      clearTimeout(timeout);
      func(...args);
    };
    clearTimeout(timeout);
    timeout = setTimeout(later, wait);
  };
}

// RAF-based throttle for scroll events
let rafId = null;
function throttleWithRAF(func) {
  return function(...args) {
    if (rafId) return;
    
    rafId = requestAnimationFrame(() => {
      func.apply(this, args);
      rafId = null;
    });
  };
}

// Initialize everything
function initialize() {
  initializeCache();
  initializeOriginalHeaderBgColor();
  updateHeaderStyles();
}

// Cleanup function
function cleanup() {
  if (CACHE.tempColorElement && CACHE.tempColorElement.parentNode) {
    CACHE.tempColorElement.parentNode.removeChild(CACHE.tempColorElement);
  }
  if (rafId) {
    cancelAnimationFrame(rafId);
  }
}

// Initialize on page load
if (document.readyState === 'loading') {
  document.addEventListener('DOMContentLoaded', initialize);
} else {
  initialize();
}

// Create optimized event handlers
const throttledUpdateHeaderStyles = throttleWithRAF(updateHeaderStyles);
const debouncedUpdateHeaderStyles = debounce(() => {
  updateSectionsCache(); // Refresh cache on resize
  updateHeaderStyles();
}, DEBOUNCE_DELAY);

// Add event listeners with passive option for better performance
window.addEventListener('scroll', throttledUpdateHeaderStyles, { passive: true });
window.addEventListener('resize', debouncedUpdateHeaderStyles, { passive: true });

// Cleanup on page unload
window.addEventListener('beforeunload', cleanup);

Standard Terms & Conditions

ACCEPTANCE – Buyer accepts these terms and conditions by paying any portion of the sale­­s price.

ENTIRE AGREEMENT – This document, together with the Advantage Sport & Fitness, Inc. quotation signed by the Buyer and accepted by Advantage Sport & Fitness, Inc. (i.e. the “Quotation”), and any attachments, constitutes the entire agreement between the parties and supersedes all prior agreements: no understanding, modification, trade custom or prior course at dealing at variance with these terms and conditions will bind Advantage Sport & Fitness, Inc. This document may only be amended in writing signed by both parties. In the case that these terms conflict with the Quotation, the Quotation shall apply, except that Advantage Sport & Fitness, Inc. reserves the right to correct typographical errors in the Quotation at any time.

PRICE PROTECTION – Prices quoted are guaranteed for 30 days from the date quoted in writing unless stated otherwise. This applies to all quotes. Advantage Sport & Fitness, Inc. reserves the right to correct typographical errors in the Quotation prices at any time.

DELIVERY OF EQUIPMENT – All equipment ordered from Advantage Sport & Fitness, Inc. or its vendors is shipped F.O.B. Buyer’s “ship to” address. Buyer must guarantee Advantage Sport & Fitness, Inc. access to the “ship to” address on the delivery date in order to ensure proper delivery and installation.

TERMS – Unless otherwise stated, Buyer will pay a minimum non refundable deposit of 50% of the sale price. The outstanding sales balance will be due at delivery. All payments must be made by cash, cashiers check, or wire transfer. Advantage Sport & Fitness, Inc. or its agents will not accept a personal or business check unless so noted in writing on the Quotation.

DELAY IN PERFORMANCE – Advantage Sport & Fitness, Inc. will exercise its best efforts to deliver the equipment in a timely manner, but Buyer acknowledges that the estimate of shipment and delivery is approximate only and Advantage Sport & Fitness, Inc. shall have no liability for loss of use or for any direct, indirect or consequential damages resulting from any delay in shipment or delivery. Advantage Sport & Fitness, Inc. is not responsible for any delay, failure or omission due to any cause beyond its control, such as labor strikes, shortage of materials, inclement weather, interruption in electrical service, acts of God, war or similar events.

INSPECTION – Buyer must inspect the equipment upon delivery and provide Advantage Sport & Fitness, Inc. with written notice of any defects. Otherwise Buyer waives its right to object to the condition of the equipment.

CLEARED AREA/DEBRIS – Buyer agrees to clear an area where the equipment is to be delivered and installed. The installation area shall be clean and free of all debris, construction dust, etc. prior to the delivery date. Advantage Sport and Fitness, Inc will not deliver into an area undergoing construction, e.g. “hard-hat” area.

INSTALLATION AREA – The equipment is designed to operate on a smooth, level, immovable surface. An unleveled floor or shift in the structure housing the equipment may cause equipment malfunctions. Advantage Sport & Fitness, Inc. will not be liable for any damage associated with an unleveled surface or structural movement.

MECHANICAL/ELECTRICAL/NETWORKING/VIDEO REQUIREMENTS – Unless otherwise stated, Buyer is responsible for all utility service such as electrical connections, computer and/or Internet networking connections, video connections, etc., and must secure all necessary tradesmen required for the installation of such connections. Such services must be ready prior to the fitness equipment delivery date.

PERMITS – Buyer is responsible for obtaining all permits for the installation or operation of the equipment, for any such permits required by state, local or other lawful authorities.

TAXES – Federal, state and local taxes, (unless otherwise shown on the quotation), are not included and are Buyer’s responsibility. Advantage Sport & Fitness, Inc. may bill Buyer separately at any time for any such charge as Advantage Sport & Fitness, Inc. may be requested to collect or pay.

ADDITIONAL CHARGES – In addition to the open balance of the sales price, Buyer agrees to pay the following prior to delivery.

  1. Any actual costs Advantage Sport & Fitness, Inc. incurs transporting or storing the equipment if the Buyer fails to pay the outstanding balance upon delivery or the equipment cannot be delivered for any reason outside the control of Advantage Sport & Fitness, Inc., its agents or subcontractors.
  2. Any actual costs Advantage Sport & Fitness, Inc. incurs if the equipment cannot be delivered due to Buyer’s error, omission or lack of preparation of the installation area.
  3. A commercially reasonable charge for deliveries requested outside the normal business hours (Monday-Friday), (8:00 A.M. – 5:00 P.M.) or requiring a specific start or stop time, provided that Advantage Sport & Fitness, Inc. has agreed to perform a delivery at such a time.
  4. A commercially reasonable charge for deliveries or labor required to handle stairways, inadequate door openings, structural obstacles or long delivery routes when direct access to installation site is not available.


NEW EQUIPMENT PURCHASES – 
Limited Warranty: There is no warranty of merchantiblity or warranty that the equipment will be fit for a particular purpose. Buyer agrees that all warranties are manufacturers warranties only, and are subject to all manufacturers limitations and exclusions. No materials sold by Advantage Sport & Fitness, Inc. are warrantied by Advantage Sport & Fitness, Inc.; only manufacturers warranties apply to all sales. Warranties extend only to the buyer and automatically terminate upon transfer of business or equipment. Equipment manufacturers warranty policies, terms, and limitations only will govern warranty issues. All decisions made by the equipment manufacturers are made at the discretion of the manufacturer, not Advantage Sport & Fitness, Inc.

All claims for warranty work must be submitted in accordance with the manufacturer’s warranty claims process. Waiver of Warranty — All expressed warranties are automatically voided if buyer attempts to repair the equipment, either personally or through its employees, agents or subcontractors without first obtaining written approval from the manufacturer as to scope of work and price. Buyer’s Remedy — Buyer’s sole remedy is application of manufacturers’ warranties and limitations. Buyer also agrees that Advantage Sport & Fitness, Inc. will not be responsible for buyer’s consequential or incidental damages, costs, losses or expenses, including by way of example only, repair or replacement costs, loss of anticipated profits, loss of product, punitive/exemplary damages or non-economic damages.

ADVANTAGE SPORT & FITNESS, INC. CERTIFIED PRE-OWNED EQUIPMENT PURCHASES – Equipment parts covered under Advantage Sport & Fitness, Inc. Certified Pre-Owned equipment warranty: all parts except entertainment.

Equipment parts not covered under Advantage Sport & Fitness, Inc. Certified Pre-Owned equipment warranty: PVS, headphone jack, USB connector, iPod connector.

The 90 day warranty period begins the day the equipment is delivered to your facility. The warranty is offered directly through Advantage Sport & Fitness, Inc. There is no manufacturer’s warranty implied or expressed when purchasing Certified Pre-Owned equipment. The warranty covers parts and labor costs for equipment examined and certified through our Certified Pre-Owned inspection process. Any warranty claim must be submitted within the 90 day Certified Pre-Owned warranty window. Any claim or service request submitted after the close of the 90 day window will be subject to normal service repair charges. Certified pre-owned warranties extend only to the buyer and automatically terminate upon transfer of business or equipment.

Waiver of Warranty All expressed warranties are automatically voided if buyer attempts to repair the equipment, either personally or through its employees, agents or subcontractors.

Buyer’s Remedy Buyer’s sole remedy is application of Advantage Sport & Fitness, Inc. Certified Pre-Owned warranty and limitations. Buyer also agrees that Advantage Sport & Fitness, Inc. will not be responsible for buyer’s consequential or incidental damages, costs, losses or expenses, including by way of example only, loss of anticipated profits, loss of product, punitive/exemplary damages or non-economic damages.

As Available We sell equipment we have in stock, have examined and certify that the equipment meets our standards. In some situations we may not have an item in stock and cannot guarantee delivery until our stock is replenished. Certified Pre-Owned equipment will be included in a sales order that contains new equipment when the equipment is available. In the event that Certified Pre-Owned equipment is not is stock; the Certified Pre- Owned equipment will be listed on a separate sales order. Customer is responsible for paying for all equipment that has been delivered. The payment for new equipment cannot be held while waiting on Certified Pre-Owned equipment, or vice versa.

Certified Pre-Owned Means – The equipment is free of major cosmetic wear or damage. The equipment is in full working condition. Our Service Technicians have completed a Certified Pre-Owned examination of the equipment. All “wear” parts have been checked and tested for defects and are in good working condition. The function and reliability of the equipment is covered under our 90 day Certified Pre-Owned Parts & Labor Warranty. Treadmills will have a new deck surface and new running belt.

“AS IS” EQUIPMENT PURCHASES – No “as is” materials sold by Advantage Sport & Fitness, Inc. are warrantied by Advantage Sport & Fitness, Inc. Buyer also agrees that Advantage Sport & Fitness, Inc. will not be responsible for buyer’s consequential or incidental damages, costs, losses or expenses, including by way of example only, repair or replacement costs, loss of anticipated profits, loss of product, punitive/exemplary damages or non-economic damages.

GOVERNING LAW – New York law shall govern any dispute between the parties pertaining to this document or the equipment.

JURISDICTION Any dispute between the parties involving this document or the equipment shall be filed in Monroe County, New York.

ADVANTAGE SPORT & FITNESS, INC. DAMAGES – Advantage Sport & Fitness, Inc. shall receive actual, consequential and incidental damages, costs, interest and attorney fees if buyer violates these terms and conditions.

CANCELLATIONS – Buyer agrees to pay 25% of sales price as a re-stocking fee on all orders, plus freight charges, if any order is cancelled.

SUBROGATION CLAUSE – Buyer agrees to purchase and maintain insurance which permits a waiver of liability and contains a waiver of subrogation. If Buyer has an insured loss, then Buyer agrees to release Advantage Sport & Fitness, Inc. and its agents for any claim for such loss to the extent of any recovery under its insured loss, and Buyer also agrees to release Advantage Sport & Fitness, Inc. and its agents for any claim for such loss to the extent of any recovery under its insurance even if Advantage Sport & Fitness, Inc.’s workmanship may have caused or contributed to the loss.

ADVANTAGE SPORT & FITNESS, INC. INSTALLATIONS – When Advantage Sport & Fitness, Inc. has been contracted to do partial or full installation, only the portion of installation contracted to be performed by Advantage Sport & Fitness, Inc. is subject to labor warranty. Such labor warranty shall be in accordance with the manufacturer’s labor warranty, or in the event that no such manufacturer’s warranty is applicable, then the labor shall be covered by a limited 30 day labor warranty. Problems that may arise from aspects of the installation not performed by Advantage Sport & Fitness, Inc. are not covered by Advantage Sport & Fitness, Inc. for any labor charges that may be incurred.

THIRD PARTY CONTRACTORS – Advantage Sport & Fitness, Inc. may subcontract its delivery and installation obligations shown on any quotation and these terms and conditions shall apply with respect to the third party as an agent of Advantage Sport & Fitness, Inc.