<meta name=\"facebook-domain-verification\" content=\"8pffn7ksq9e29yccpsqv8n54587xjr\" />

<!-- Meta Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version=\'2.0\';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,\'script\',
\'https://connect.facebook.net/en_US/fbevents.js\');
fbq(\'init\', \'956032458545199\');
fbq(\'track\', \'PageView\');
</script>
<noscript><img height=\"1\" alt=\"\" width=\"1\" style=\"display:none\"
src=\"https://www.facebook.com/tr?id=956032458545199&ev=PageView&noscript=1\"
/></noscript>
<!-- End Meta Pixel Code -->

<script src=\"https://f001.backblazeb2.com/file/buonzz-assets/jquery.ph-locations-v1.0.0.js\"></script>

<script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.js\"></script>

<script>
jQuery(document).ready(function($) {
  $(\'.other-request\').hide();

  $(document).on(\'change\', \'.wpcf7-field-group input[type=\"radio\"]\', function() {
    var $radioButton = $(this);
    var $fieldGroup = $radioButton.closest(\'.wpcf7-field-group\');
    var $otherRequestDiv = $fieldGroup.find(\'.other-request\');

    var selectedValue = $radioButton.val();

    if (selectedValue === \'Others\') {
      $otherRequestDiv.show();
    } else {
      $otherRequestDiv.hide();
      $otherRequestDiv.find(\'input[type=\"text\"]\').val(\'\');
    }
  });
});
</script>


<script>
jQuery(document).ready(function($) {
  $(\'.ace-express, .ace-hardware, .all-home, .b-warehouse, .cebu-home, .handyman, .home-depot, .true-value, .wilcon, .sales-agent\').hide();

  var $selectedParentDiv = $();

  $(document).on(\'change\', \'.wpcf7-field-group .purchased-from-wrap select\', function() {
    var $selectField = $(this);
    var $fieldGroup = $selectField.closest(\'.wpcf7-field-group\');
    var $selectedDiv;

    var selectedValue = $selectField.val();

    switch (selectedValue) {
      case \'ACE EXPRESS\':
        $selectedDiv = $fieldGroup.find(\'.ace-express\');
        break;
      case \'ACE HARDWARE\':
        $selectedDiv = $fieldGroup.find(\'.ace-hardware\');
        break;
      case \'ALL HOME\':
        $selectedDiv = $fieldGroup.find(\'.all-home\');
        break;
      case \'BUILDERS WAREHOUSE\':
        $selectedDiv = $fieldGroup.find(\'.b-warehouse\');
        break;
      case \'CEBU HOME AND BUILDERS CENTRE\':
        $selectedDiv = $fieldGroup.find(\'.cebu-home\');
        break;
      case \'HANDYMAN\':
        $selectedDiv = $fieldGroup.find(\'.handyman\');
        break;
      case \'HOME DEPOT\':
        $selectedDiv = $fieldGroup.find(\'.home-depot\');
        break;
      case \'TRUE VALUE\':
        $selectedDiv = $fieldGroup.find(\'.true-value\');
        break;
      case \'WILCON\':
        $selectedDiv = $fieldGroup.find(\'.wilcon\');
        break;
      case \'OTHERS: SALES AGENT\':
        $selectedDiv = $fieldGroup.find(\'.sales-agent\');
        break;
      default:
        $selectedDiv = $();
        break;
    }

    $selectedParentDiv = $selectedDiv;

    $fieldGroup.find(\'.ace-express, .ace-hardware, .all-home, .b-warehouse, .cebu-home, .handyman, .home-depot, .true-value, .wilcon, .sales-agent\').not($selectedParentDiv).hide();

    if ($selectedDiv.length) {
      $selectedDiv.show();
    }

    var $selectBranchDiv = $fieldGroup.find(\'.select-branch\');
    if ($selectBranchDiv.css(\'display\') === \'none\') {
      $selectBranchDiv.find(\'select\').prop(\'selectedIndex\', 0);
    }
  });
});
</script>

<script>
$(document).ready(function() {
  $(\'.model-cat-trigger, .model-name-trigger\').hide();
  $(\'.custom-cat-1, .custom-cat-2, .custom-cat-3, .custom-cat-4, .custom-cat-5, .custom-cat-6, .custom-cat-7, .custom-cat-8, .custom-cat-9\').hide();



  $(document).on(\'change\', \'.model-trigger select\', function() {
    var selectedValue = $(this).val();
    var fieldGroupContainer = $(this).closest(\'.wpcf7-field-group\');

    // Hide all sub-categories initially
    fieldGroupContainer.find(\'.sub-cat-1, .sub-cat-2, .sub-cat-3, .sub-cat-4, .sub-cat-5, .sub-cat-6, .sub-cat-7, .sub-cat-8, .sub-cat-9, .sub-cat-10, .sub-cat-11, .sub-cat-12, .sub-cat-13, .sub-cat-14, .sub-cat-15, .sub-cat-16, .sub-cat-17, .sub-cat-18, .sub-cat-19, .sub-cat-20, .sub-cat-21, .sub-cat-22, .sub-cat-23, .sub-cat-24, .sub-cat-25, .sub-cat-26, .sub-cat-27, .sub-cat-28\').hide();

    // Show sub-categories based on selected value
    if (selectedValue === \'Air Purifier\') {
      fieldGroupContainer.find(\'.custom-cat-1\').show();
      fieldGroupContainer.find(\'.custom-cat-1 select\').off(\'change\').on(\'change\', function() {
        var subSelectedValue = $(this).val();

        fieldGroupContainer.find(\'.sub-cat-1\').toggle(subSelectedValue === \'Megafresh Air Purifier\');
        fieldGroupContainer.find(\'.sub-cat-2\').toggle(subSelectedValue === \'Megafresh Air Filter\');
        fieldGroupContainer.find(\'.sub-cat-3\').toggle(subSelectedValue === \'Bionaire Air Purifier\');
        fieldGroupContainer.find(\'.sub-cat-4\').toggle(subSelectedValue === \'Bionaire Air Filter\');
        fieldGroupContainer.find(\'.sub-cat-5\').toggle(subSelectedValue === \'Humidifier\');
        fieldGroupContainer.find(\'.sub-cat-6\').toggle(subSelectedValue === \'Dehumidifier\');
      });
    } else {
      fieldGroupContainer.find(\'.custom-cat-1\').hide();
    }

    if (selectedValue === \'Essential Oil Diffusers and Oils\') {
      fieldGroupContainer.find(\'.custom-cat-2\').show();
      fieldGroupContainer.find(\'.custom-cat-2 select\').off(\'change\').on(\'change\', function() {
        var subSelectedValue = $(this).val();

        fieldGroupContainer.find(\'.sub-cat-7\').toggle(subSelectedValue === \'Essential Oil Diffuser\');
        fieldGroupContainer.find(\'.sub-cat-8\').toggle(subSelectedValue === \'Essential Oil Scent\');
      });
    } else {
      fieldGroupContainer.find(\'.custom-cat-2\').hide();
    }

    if (selectedValue === \'Water Purifier\') {
      fieldGroupContainer.find(\'.custom-cat-3\').show();
      fieldGroupContainer.find(\'.custom-cat-3 select\').off(\'change\').on(\'change\', function() {
        var subSelectedValue = $(this).val();

        fieldGroupContainer.find(\'.sub-cat-9\').toggle(subSelectedValue === \'Healthy pH Series\');
        fieldGroupContainer.find(\'.sub-cat-10\').toggle(subSelectedValue === \'Alpha & Alpha Slim Series\');
        fieldGroupContainer.find(\'.sub-cat-11\').toggle(subSelectedValue === \'Bravo & Lite Series\');
        fieldGroupContainer.find(\'.sub-cat-12\').toggle(subSelectedValue === \'Reverse Osmosis\');
        fieldGroupContainer.find(\'.sub-cat-13\').toggle(subSelectedValue === \'Hydrogen-Water\');
        fieldGroupContainer.find(\'.sub-cat-14\').toggle(subSelectedValue === \'Mini Purifier\');
      });
    } else {
      fieldGroupContainer.find(\'.custom-cat-3\').hide();
    }

    if (selectedValue === \'Water Filter\') {
      fieldGroupContainer.find(\'.custom-cat-4\').show();
      fieldGroupContainer.find(\'.custom-cat-4 select\').off(\'change\').on(\'change\', function() {
        var subSelectedValue = $(this).val();

        fieldGroupContainer.find(\'.sub-cat-15\').toggle(subSelectedValue === \'10inch Filter\');
        fieldGroupContainer.find(\'.sub-cat-16\').toggle(subSelectedValue === \'20inch Filter\');
        fieldGroupContainer.find(\'.sub-cat-17\').toggle(subSelectedValue === \'Big 10inch Filter\');
        fieldGroupContainer.find(\'.sub-cat-18\').toggle(subSelectedValue === \'Big 20inch Filter\');
        fieldGroupContainer.find(\'.sub-cat-19\').toggle(subSelectedValue === \'Special Filter\');
      });
    } else {
      fieldGroupContainer.find(\'.custom-cat-4\').hide();
    }

    if (selectedValue === \'Mainline Filtration\') {
      fieldGroupContainer.find(\'.custom-cat-5\').show();
      fieldGroupContainer.find(\'.custom-cat-5 select\').off(\'change\').on(\'change\', function() {
        var subSelectedValue = $(this).val();

        fieldGroupContainer.find(\'.sub-cat-20\').toggle(subSelectedValue === \'Housing 10inch and 20inch\');
        fieldGroupContainer.find(\'.sub-cat-21\').toggle(subSelectedValue === \'Multimedia Filter\');
      });
    } else {
      fieldGroupContainer.find(\'.custom-cat-5\').hide();
    }
    
    // Show .custom-cat-6 and .custom-cat-7 based on selected value
    fieldGroupContainer.find(\'.model-trigger select\').off(\'change\').on(\'change\', function() {
      var selectedModelValue = $(this).val();
      
      fieldGroupContainer.find(\'.custom-cat-6\').toggle(selectedModelValue === \'UV Water Sterilizer\');
      fieldGroupContainer.find(\'.custom-cat-7\').toggle(selectedModelValue === \'Mineral Pot\');
    });
    
    if (selectedValue === \'Parts & Accessories\') {
      fieldGroupContainer.find(\'.custom-cat-8\').show();
      fieldGroupContainer.find(\'.custom-cat-8 select\').off(\'change\').on(\'change\', function() {
        var subSelectedValue = $(this).val();

        fieldGroupContainer.find(\'.sub-cat-22\').toggle(subSelectedValue === \'Diverter,Adaptors,Hose, & Scrubber\');
        fieldGroupContainer.find(\'.sub-cat-23\').toggle(subSelectedValue === \'O-ring Gasket,Spanner, & Bracket\');
        fieldGroupContainer.find(\'.sub-cat-24\').toggle(subSelectedValue === \'Vessel / Housing, Base & Spout\');
        fieldGroupContainer.find(\'.sub-cat-25\').toggle(subSelectedValue === \'Fittings / Connectors\');
      });
    } else {
      fieldGroupContainer.find(\'.custom-cat-8\').hide();
    }

    if (selectedValue === \'Other Filter\') {
      fieldGroupContainer.find(\'.custom-cat-9\').show();
      fieldGroupContainer.find(\'.custom-cat-9 select\').off(\'change\').on(\'change\', function() {
        var subSelectedValue = $(this).val();

        fieldGroupContainer.find(\'.sub-cat-26\').toggle(subSelectedValue === \'Water Purifier\');
        fieldGroupContainer.find(\'.sub-cat-27\').toggle(subSelectedValue === \'Water Filter\');
        fieldGroupContainer.find(\'.sub-cat-28\').toggle(subSelectedValue === \'Parts & Accessories\');
      });
    } else {
      fieldGroupContainer.find(\'.custom-cat-9\').hide();
    }

    // Set value of select fields in hidden .model-cat-trigger divs to first option
  $(\'.model-cat-trigger\').each(function() {
    if ($(this).css(\'display\') === \'none\') {
      $(this).find(\'select\').prop(\'selectedIndex\', 0);
    }
  });

  $(\'.model-name-trigger\').each(function() {
    if ($(this).css(\'display\') === \'none\') {
      $(this).find(\'select\').prop(\'selectedIndex\', 0);
    }
  });

  });
});
</script>

<script>
	$(document).ready(function() {
  if ($(\'.uacf7_conditional\').css(\'display\') === \'none\') {
    $(\'.uacf7_conditional select\').prop(\'selectedIndex\', 0);
  }
});
</script>