﻿
var Prices = {
  ItemSelector: ''
};

function ResetRadioValues(item, val, valDiscount, valEquipment) {

  jQuery(Prices.ItemSelector).each(function () {

    if (this != item) {

      this.checked = false;
      jQuery(jQuery(this).parent()).removeClass('active');
    }
    else {

      jQuery(jQuery(this).parent()).addClass('active');
    }
  });
}

function ResetCheckboxValues(item, val, valDiscount, valEquipment) {

  jQuery(Prices.ItemSelector).each(function () {

    if (!this.checked) {

      jQuery(jQuery(this).parent()).removeClass('active');
    }
    else if (this == item){

      jQuery(jQuery(this).parent()).addClass('active');
    }
  });
}

function ValidateRadios(source, arguments) {

  arguments.IsValid = jQuery(Prices.ItemSelector + ':checked').length > 0;
}
