function disablePaymentMethod(method){
    $('#choosePaymentMethodForm :radio').attr('disabled', 'disabled');
    $('#choosePaymentMethodForm label').addClass('disableLabel');
    $('#choosePaymentMethodForm span').addClass('paymentPriceDisable');
    $('#choosePaymentMethodBack').attr('disabled', 'disabled');
    $(".button:has('#choosePaymentMethodBack')").hide();
    getPaymentMethodDescription(method)
}

function enablePaymentMethod(method){
    $('#choosePaymentMethodBack').removeAttr("disabled");
    $('#choosePaymentMethodForm :radio').removeAttr("disabled");
    $(".button:has('#choosePaymentMethodBack')").show();
    $('#choosePaymentMethodForm label').removeClass('disableLabel');
    $('#choosePaymentMethodForm span').removeClass('paymentPriceDisable');
    $('#paymentMethodDescription').html('');
    $.get(mainURL + 'npayments/cancelPayment.do', {
        'paymentModuleCodename': method
    });
}

function getPaymentMethodDescription(method){
    $('#paymentMethodDescription').html('<div class="preloader">&nbsp;</div>');

    $.ajax({
        url     :    mainURL+'npayments/submitChooseMethod.do',
        type    :   'GET',
        data    :   {
            paymentModuleCodename:method,
            confirmPayment:'false',
            partial:'true'
        },
        success :   function(msg){
            $('#paymentMethodDescription').html(msg);
        }
    })
}
