var aLangKeys = new Array();
aLangKeys['en'] = new Array();
aLangKeys['es'] = new Array();

// Inglés (Holder Information)
aLangKeys['en']['holder-info'] = 'Holder Information'; 
aLangKeys['en']['full-name'] = 'Full Name';
aLangKeys['en']['name'] = 'Name';
aLangKeys['en']['middle-name'] = 'Middle Name';
aLangKeys['en']['last-name'] = 'Last Name';
aLangKeys['en']['birth-date'] = 'DOB';
aLangKeys['en']['age'] = 'Age';
aLangKeys['en']['birth-country'] = 'Birth Country';
aLangKeys['en']['marital-status'] = 'Marital status';
aLangKeys['en']['language'] = 'Language';
aLangKeys['en']['address'] = 'Address';
aLangKeys['en']['city'] = 'City';
aLangKeys['en']['state'] = 'State';
aLangKeys['en']['zip-code'] = 'Zip code';
aLangKeys['en']['country'] = 'Country';
aLangKeys['en']['phone'] = 'Phone';
aLangKeys['en']['email'] = 'Email';
aLangKeys['en']['nationality'] = 'Nationality';


// Español (Inforamción del Títular)
aLangKeys['es']['holder-info'] = 'Información del Títular';
aLangKeys['es']['name'] = 'Nombre';
aLangKeys['es']['full-name'] = 'Nombre Completo';
aLangKeys['es']['middle-name'] = 'Segundo Nombre';
aLangKeys['es']['last-name'] = 'Apellido';
aLangKeys['es']['birth-date'] = 'Fecha de Nacimiento';
aLangKeys['es']['age'] = 'Edad';
aLangKeys['es']['birth-country'] = 'Pais de Nacimiento';
aLangKeys['es']['marital-status'] = 'Estado Civil';
aLangKeys['es']['language'] = 'Idioma';
aLangKeys['es']['address'] = 'Dirección';
aLangKeys['es']['city'] = 'Ciudad';
aLangKeys['es']['state'] = 'Estado';
aLangKeys['es']['zip-code'] = 'Zona Postal';
aLangKeys['es']['country'] = 'País';
aLangKeys['es']['phone'] = 'Teléfono';
aLangKeys['es']['email'] = 'Correo Electrónico';
aLangKeys['es']['nationality'] = 'Nacionalidad';

/// Beneficiaries Inglés
aLangKeys['en']['city/state'] = 'City/State';
aLangKeys['en']['first-name'] = 'First Name';
aLangKeys['en']['relationship'] = 'Relationship';
aLangKeys['en']['beneficiaries'] = 'Beneficiaries';
aLangKeys['en']['residence'] = 'Residence'; 
aLangKeys['en']['wait-time'] = 'Wait Time';

/// Beneficiarios Español
aLangKeys['es']['city/state'] = 'Ciudad/Estado';
aLangKeys['es']['first-name'] = 'Nombre';
aLangKeys['es']['relationship'] = 'Parentesco';
aLangKeys['es']['beneficiaries'] = 'Beneficiarios';
aLangKeys['es']['residence'] = 'Residencia';
aLangKeys['es']['wait-time'] = 'Tiempo de Espera'; 


/// Pets
/// ingles
aLangKeys['en']['pets'] = 'Pets';
aLangKeys['en']['numbers'] = 'Numbers';
aLangKeys['en']['type'] = 'Type';
aLangKeys['en']['race'] = 'Race';
aLangKeys['en']['age'] = 'Age';
aLangKeys['en']['weight'] = 'Weight (lbs)';
aLangKeys['en']['name-pets'] = 'Name';


/// Mascotas
/// español
aLangKeys['es']['pets'] = 'Mascotas';
aLangKeys['es']['numbers'] = 'Número de Mascotas';
aLangKeys['es']['type'] = 'Tipo';
aLangKeys['es']['race'] = 'Raza';
aLangKeys['es']['age'] = 'Edad';
aLangKeys['es']['weight'] = 'Peso (lbs)';
aLangKeys['es']['name-pets'] = 'Nombre de la mascota';


/// Inglés (Co-Holder)
aLangKeys['en']['co-holder'] = 'Co-Holder';


/// Inglés (Co-Propietario)
aLangKeys['es']['co-holder'] = 'Co-Títular';


/// Inglés (Contacto de emergencia)
aLangKeys['en']['emergency_contact'] = 'Emergency Contact';
/// Español (Contacto de emergencia)
aLangKeys['es']['emergency_contact'] = 'Contacto de emergencia';


/// Payment Method
/// Ingles
aLangKeys['en']['pay-method'] = 'Pay Method';
aLangKeys['en']['plan'] = 'Plan';
aLangKeys['en']['date'] = 'Payment Date';
aLangKeys['en']['pay-date'] = 'Payment Date';
aLangKeys['en']['payment'] = 'Payment Date';
aLangKeys['en']['card-name'] = "Card holder's name";
aLangKeys['en']['different'] = 'Use a different card holder?';
aLangKeys['en']['card-number'] = 'Card Number';
aLangKeys['en']['type'] = 'Type';
aLangKeys['en']['cvv'] = 'CVV';
aLangKeys['en']['agent-code'] = 'Code';
aLangKeys['en']['agent-name'] = 'Name';
aLangKeys['en']['agent-email'] = 'Email';
aLangKeys['en']['observations'] = 'Observations';
aLangKeys['en']['method'] = 'Payment method';
aLangKeys['en']['plan-type'] = 'Plan Type';

aLangKeys['en']['account-number'] = 'Account Number';
aLangKeys['en']['bank_name'] = 'Bank Name';

/// Payment Method
/// Español
aLangKeys['es']['pay-method'] = 'Forma de Pago';
aLangKeys['es']['plan'] = 'Tipo de Plan';
aLangKeys['es']['date'] = 'Fecha de Pago';
aLangKeys['es']['payment'] = 'Fecha de Pago';
aLangKeys['es']['card-name'] = 'Nombre del titular';
aLangKeys['es']['card-number'] = 'Número de Tarjeta';
aLangKeys['es']['type'] = 'Tipo';
aLangKeys['es']['cvv'] = 'CVV';
aLangKeys['es']['expiration'] = 'Fecha de Vencimiento';
aLangKeys['es']['agent-code'] = 'Código del Agente';
aLangKeys['es']['agent-name'] = 'Nombre del Agente';
aLangKeys['es']['agent-email'] = 'Email del Agente';
aLangKeys['es']['observations'] = 'Observaciones';
aLangKeys['es']['method'] = 'Forma de Pago';
aLangKeys['es']['plan-type'] = 'Tipo de Plan';

aLangKeys['es']['account-number'] = 'Numero de cuenta';
aLangKeys['es']['bank_name'] = 'Nombre del banco';

/// Medical Questions
/// Ingles

aLangKeys['en']['questions'] = 'Medical Questions';
aLangKeys['en']['diagnosed'] = 'Has any of the beneficiaries been diagnosed with a terminal illness or  suffers from an illness that may provoke an imminent death? (including covid-19).';
aLangKeys['en']['yes'] = 'yes';
aLangKeys['en']['who'] = 'Who/Name';
aLangKeys['en']['illness'] = 'Illness/Date';
aLangKeys['en']['currently'] = 'Are any of the beneficiaries currently hospitalized or in a hospice?.';
aLangKeys['en']['incarcerated'] = 'Are any of the beneficiaries currently incarcerated? (in jail).';
aLangKeys['en']['suffered'] = 'Does any of the beneficiaries suffer or had suffered or has been diagnosed from any of the following illnesses or medical conditions? Cancer in the past 5 years, heart attack, renal insufficiency, dialysis, stroke, arteriosclerosis, or organ transplant in the past 3 years, among others) or any other disabling medical condition that may provoke the imminent death of the beneficiary in the next 15 months.';


///Español 
aLangKeys['es']['questions'] = 'Preguntas Médicas';
aLangKeys['es']['diagnosed'] = '¿Alguno de los beneficiarios ha sido diagnosticado con una enfermedad terminal o padece alguna enfermedad que pueda provocar una muerte inminente? (Incluyendo covid-19).';
aLangKeys['es']['yes'] = 'Si';
aLangKeys['es']['who'] = 'Quién/Nombre del Beneficiario';
aLangKeys['es']['illness'] = 'Enfermedad/Fecha';
aLangKeys['es']['currently'] = '¿Alguno de los beneficiarios está actualmente hospitalizado o en un hospicio?.';
aLangKeys['es']['incarcerated'] = '¿Alguno de los beneficiarios está actualmente encarcelado? (en la cárcel).';
aLangKeys['es']['suffered'] = '¿Alguno de los beneficiarios sufre o ha sufrido o ha sido diagnosticado de alguna de las siguientes enfermedades o condiciones médicas? Cáncer en los últimos 5 años, infarto cardíaco, insuficiencia renal, diálisis, accidente cerebrovascular, arteriosclerosis o trasplante de órganos en los últimos 3 años, entre otros) o cualquier otra condición médica incapacitante que pueda provocar la muerte inminente del beneficiario en los próximos 15 meses.';


/// RESPONSIBLE STATEMENT
/// Ingles
aLangKeys['en']['statement'] = 'RESPONSIBLE STATEMENT'; 
aLangKeys['en']['declare'] = 'I hereby certify and declare that the above the information and answers to questions pertaining to the "good health" of the beneficiaries are complete, true, and correct to the best of my knowledge and belief. ';
aLangKeys['en']['understand'] = 'I understand that if at any moment the information pertaining to any of the beneficiaries is found to be false or incorrect or any misrepresentation, falsification, or omission of any facts or in the event of at any moment is given, it will disqualify all the beneficiaries of the international funeral assistance. ';
aLangKeys['en']['true-info'] = 'I declare that all the information provided is true'; 

/// DECLARACIÓN RESPONSABLE
///Español
aLangKeys['es']['statement'] = 'DECLARACIÓN RESPONSABLE';
aLangKeys['es']['declare'] = 'Por la presente certifico y declaro que la información anterior y las respuestas a las preguntas relacionadas con la "buena salud" de los beneficiarios son completas, verdaderas y correctas a mi leal saber y entender.';
aLangKeys['es']['understand'] = 'Entiendo que si en algún momento se determina que la información relativa a cualquiera de los beneficiarios es falsa o incorrecta o se da alguna tergiversación, falsificación u omisión de cualquier hecho o en caso de que en algún momento se proporcione, descalificará a todos los beneficiarios. de la asistencia funeraria internacional.';
aLangKeys['es']['true-info'] = 'Declaro que toda la información facilitada es veraz';


/// PAYMENT AUTHORIZATION:
/// Ingles
aLangKeys['en']['pay-autho'] = 'PAYMENT AUTHORIZATION'; 
aLangKeys['en']['authorize'] = 'I hereby authorize regularly scheduled charges to my credit card in the amount indicated for each billing cycle period. I understand that this authorization will remain in effect until I cancel it in writing by notifying INTERLIFE of any changes in my account information or termination of this authorization at least with 30 days prior to the next billing date. I certify that I am an authorized user of this credit or debit card and will not dispute these recurrent transactions as long as the transaction correspond to the terms indicated in this authorization form. I understand and accept that If the scheduled payment dates fall on a weekend or holiday, that payment may be executed on the previous business day. I agree that no prior notification will be provided for the recurrent charge unless the date or amount changes, in which case I will receive a notice from InterLife at least 10 days prior to charging the new payment.';
aLangKeys['en']['accept'] = 'I accept that I read and reviewed everything';
aLangKeys['en']['agree'] = 'AGREE';

/// AUTORIZACIÓN DE PAGO
/// Español
aLangKeys['es']['pay-autho'] = 'AUTORIZACIÓN DE PAGO';
aLangKeys['es']['authorize'] = 'Por la presente, autorizo ​​los cargos regulares programados a mi tarjeta de crédito por el monto indicado para cada período del ciclo de facturación. Entiendo que esta autorización permanecerá vigente hasta que la cancele por escrito notificando a INTERLIFE de cualquier cambio en la información de mi cuenta o terminación de esta autorización por lo menos con 30 días de anticipación a la próxima fecha de facturación. Certifico que soy un usuario autorizado de esta tarjeta de crédito o débito y no disputaré estas transacciones recurrentes siempre que la transacción corresponda a los términos indicados en este formulario de autorización. Entiendo y acepto que si las fechas de pago programadas caen en fin de semana o feriado, dicho pago podrá ejecutarse el día hábil anterior. Acepto que no se proporcionará ninguna notificación previa para el cargo recurrente a menos que cambie la fecha o el monto, en cuyo caso recibiré una notificación de InterLife al menos 10 días antes del cargo del nuevo pago.';
aLangKeys['es']['accept'] = 'Acepto que leí y revisé todo';
aLangKeys['es']['agree'] = 'ACEPTAR';

/// Firm
/// Ingles
aLangKeys['en']['clear'] = 'Clear';
aLangKeys['en']['save'] = 'Save';
aLangKeys['en']['continue'] = 'Continue';
aLangKeys['en']['info'] = 'Information!', 'You Want To Save Your Signature?';
aLangKeys['en']['below'] = 'Please sing below';

/// Firma
/// Español
aLangKeys['es']['clear'] = 'Limpiar';
aLangKeys['es']['save'] = 'Guardar';
aLangKeys['es']['continue'] = 'Continuar';
aLangKeys['es']['info'] = '¡Información!', 'Desea guardar su firma?';
aLangKeys['es']['below'] = 'Por favor firme abajo';


///Last Step
/// Ingles
aLangKeys["en"]['request'] = 'Your request is being processed, You can now close this window';

/// Último Paso
/// Español
aLangKeys["es"]['request'] = 'Su solicitud está siendo procesada, ahora puede cerrar esta ventana';

aLangKeys["en"]['thanks'] = 'Thanks';
aLangKeys["es"]['thanks'] = 'Gracias';

aLangKeys["en"]['amount-next'] = 'Amount Next';
aLangKeys["es"]['amount-next'] = 'Próximo Pago';

aLangKeys["en"]["amount"] = "Amount Due Today";
aLangKeys["es"]["amount"] = "Total a Pagar";

aLangKeys["en"]["info-pay"] = "Payment information";
aLangKeys["es"]["info-pay"] = "Información del pago";

aLangKeys["en"]["info-card"] = "Card number - Expiration date - CVC";
aLangKeys["es"]["info-card"] = "Número de tarjeta - Fecha de caducidad - CVC";

aLangKeys["en"]["description-payment-method"] = "Payment method description (optional)";
aLangKeys["es"]["description-payment-method"] = "Descripción del metodo de pago (opcional)";

aLangKeys["en"]["payment-method-principal"] = "Principal Payment Method";
aLangKeys["es"]["payment-method-principal"] = "Metodo de pago principal";

aLangKeys["en"]["payment-method-secundary"] = "Secundary Payment Method";
aLangKeys["es"]["payment-method-secundary"] = "Metodo de pago secundario";

aLangKeys["en"]["payment-methods"] = "Payment Methods";
aLangKeys["es"]["payment-methods"] = "Metodos de pago";

//Riders
aLangKeys["en"]["riders"] = "Riders";
aLangKeys["es"]["riders"] = "Adicionales";
aLangKeys["en"]["rider"] = "Rider";
aLangKeys["es"]["rider"] = "Adicional";
//events
$(function() {

    var settingLang = sessionStorage.getItem('lang');

    if (settingLang !== null) {
        setLanguage(settingLang);
    }

});

function setLanguage(lang) {
    $('.lang').each(function(i) {
        // console.log('this >>> ', this);
        $(this).text(aLangKeys[lang][$(this).attr('key')]);
    });
}