Find Address
= "1"){
$("#instrument_1_section").show();
$('#id_form-0-DELETE').prop('checked', false);
}
else{
$("#instrument_1_section").hide();
if($("#id_form-0-id").val() != ""){
$('#id_form-0-DELETE').prop('checked', true);
}
}
if($("#id_how_many_instruments").val() >= "2"){
$("#instrument_1_section, #instrument_2_section").show();
$('#id_form-0-DELETE, #id_form-1-DELETE').prop('checked', false);
}
else{
$("#instrument_2_section").hide();
if($("#id_form-1-id").val() != ""){
$('#id_form-1-DELETE').prop('checked', true);
}
}
if($("#id_how_many_instruments").val() >= "3"){
$("#instrument_1_section, #instrument_2_section, #instrument_3_section").show();
$('#id_form-0-DELETE, #id_form-1-DELETE, #id_form-2-DELETE').prop('checked', false);
}
else{
$("#instrument_3_section").hide();
if($("#id_form-2-id").val() != ""){
$('#id_form-2-DELETE').prop('checked', true);
}
}
if($("#id_how_many_instruments").val() >= "4"){
$("#instrument_1_section, #instrument_2_section, #instrument_3_section, #instrument_4_section").show();
$('#id_form-0-DELETE, #id_form-1-DELETE, #id_form-2-DELETE, #id_form-3-DELETE').prop('checked', false);
}
else{
$("#instrument_4_section").hide();
if($("#id_form-3-id").val() != ""){
$('#id_form-3-DELETE').prop('checked', true);
}
}
}).change();
$("#id_form-0-date, #id_form-1-date, #id_form-2-date, #id_form-3-date").attr("autocomplete", "off");
$("#id_form-0-instrument_value").change(function() {
var instrument_value = $(this).val() * 0.10
$("#form-0-instrument_accessories_cover_1_label").html("Would you like to cover up to £"+parseFloat(instrument_value).toFixed(2)+" worth accessories for this instrument?");
}).change();
$("#id_form-1-instrument_value").change(function() {
var instrument_value = $(this).val() * 0.10
$("#form-1-instrument_accessories_cover_2_label").html("Would you like to cover up to £"+parseFloat(instrument_value).toFixed(2)+" worth accessories for this instrument?");
}).change();
$("#id_form-2-instrument_value").change(function() {
var instrument_value = $(this).val() * 0.10
$("#form-2-instrument_accessories_cover_3_label").html("Would you like to cover up to £"+parseFloat(instrument_value).toFixed(2)+" worth accessories for this instrument?");
}).change();
$("#id_form-3-instrument_value").change(function() {
var instrument_value = $(this).val() * 0.10
$("#form-3-instrument_accessories_cover_4_label").html("Would you like to cover up to £"+parseFloat(instrument_value).toFixed(2)+" worth accessories for this instrument?");
}).change();
});