function confirmDelete()
{
	if (!confirm("Are you sure you want to delete this item?"))
	{
		return(false);
	}
}

 $(document).ready(function() {
    //$('td.dob_label').hide();
    var lastRow = null;

    $(":radio[name='type']").click(function(){
    
       
        var t = $(this).val();
        if(t == '5.0')
        {
            $("#dob_label1").css("display","none");
            $("#dob_label2").css("display","block");
        }
        else if(t == '15.0')
        {
            $("#dob_label2").css("display","none");
            $("#dob_label1").css("display","block");
        
        }
        else
        {
            $("#dob_label1").css("display","none");
            $("#dob_label2").css("display","none");
        
        }
        /*
        if (lastRow != null){
           lastRow.toggle();
        }
        lastRow = $(this).parent().next();
        lastRow.toggle();*/
    });

    //$('td.gift_aid').hide();
    var lastRowGift = null;

    //$('.gift_aid').hide();
    $(":checkbox[name='AllowGiftAid']").click(function(){
      if ($(".gift_aid_checkbox").is(":checked"))
        {
            //show the hidden div
            $("#gift-table").show("fast");
        }
        else
        {
            //otherwise, hide it
            $("#gift-table").hide("fast");
        }
    });

    //$('.existing_customer').hide();
    $(":checkbox[name='membership']").click(function(){
    
    
      if ($(".existing_checkbox").is(":checked"))
        {
            //show the hidden div
            $(".existing_customer").show("fast");
        }
        else
        {
            //otherwise, hide it
            $(".existing_customer").hide("fast");
        }
    });

    $(function() {
        $('#gift_title').val($('#title').val());
        $('#title').change(function() {
            $('#gift_title').val($(this).val());
        });
    });

//    $(function() {
//        $('#gift_email').val($('#email_address').val());
//        $('#email_address').change(function() {
//            $('#gift_email').val($(this).val());
//        });
//    });
    
    $('#BillingFirstnames').change(function() {
    $('#gift_firstname').val($(this).val());});

    $('#BillingSurname').change(function() {
    $('#gift_lastname').val($(this).val());});

    $('#BillingAddress1').change(function() {
    $('#gift_address_1').val($(this).val());});

    $('#address2').change(function() {
    $('#gift_address_2').val($(this).val());});

    $('#BillingPhone').change(function() {
    $('#gift_telephone').val($(this).val());});

    $('#CustomerEMail').change(function() {
    $('#gift_email').val($(this).val());});

    $('#BillingPostCode').change(function() {
    $('#gift_postcode').val($(this).val());});

    $('#BillingCity').change(function() {
    $('#gift_city').val($(this).val());});

var $unique = $('input.unique');
$unique.click(function() {
    $unique.filter(':checked').not(this).removeAttr('checked');
});

var $type = $('input.type');
$type.click(function() {
    $type.filter(':checked').not(this).removeAttr('checked');
});

 });	
