$(document).ready(function() {
	
	$(document).on('click', '.option-custom-select input[type="radio"]', function(event) {
		event.stopPropagation();

		var optionName = $(this).parent().attr('optionName');
		var valueId = $(this).parent().attr('valueId');

		$('.option-select[optionName="'+optionName+'"]').val(valueId);	
		$('.option-select[optionName="'+optionName+'"]').change();
	});

	$(document).on('click', '.option-custom-select', function() {
		$(this).children('input[type="radio"]').prop('checked', true);

		var optionName = $(this).attr('optionName');
		var valueId = $(this).attr('valueId');

		$('.option-select[optionName="'+optionName+'"]').val(valueId);
		$('.option-select[optionName="'+optionName+'"]').change();

		return false;
	});
	
});