(function(e){function s(e){return/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e)};function o(){return(('ontouchstart' in window)||(navigator.MaxTouchPoints>0)||(navigator.msMaxTouchPoints>0))};function r(n){if(typeof n==='undefined'||n===null){n=!0};e('body').addClass('noscroll');var r='We\'re retrieving your loan details, this could take up to 2-minutes.
Please don\'t refresh the page or let your device lock...',a='

'+r+'

';e('body').append(a);e('body').append('
');if(n){var t=['Checking your personal details...','Checking employment details...','Please be patient, we\'re making sure we find you a loan deal thats the right fit for you...','We help thousands of people all over the UK every day to obtain the cash they need fast...','You are under no obligation to accept the offer we show you, you will be able to review your offer before accepting...',];window.loadingMsg1=setTimeout(function(){e('#loading_msg .msg').html(t[0])},1*20000,t);window.loadingMsg2=setTimeout(function(){e('#loading_msg .msg').html(t[1])},2*20000,t);window.loadingMsg3=setTimeout(function(){e('#loading_msg .msg').html(t[2])},3*20000,t);window.loadingMsg4=setTimeout(function(){e('#loading_msg .msg').html(t[3])},4*20000,t);window.loadingMsg5=setTimeout(function(){e('#loading_msg .msg').html(t[4])},5*20000,t)}};function n(){e('body').removeClass('noscroll');e('#loading_msg, #loading_bg, #loading_animation').fadeOut(600,function(){e(this).remove()});clearTimeout(window.loadingMsg1);clearTimeout(window.loadingMsg2);clearTimeout(window.loadingMsg3);clearTimeout(window.loadingMsg4);clearTimeout(window.loadingMsg5)};function a(n){e('#loading_msg h3.msg').text(n)};function t(e,n){n-=e.toString().length;if(n>0){return new Array(n+(/\./.test(e)?2:1)).join('0')+e};return e+''};e(function(){e('img.svg').each(function(){var n=e(this),a=n.attr('id'),t=n.attr('class'),r=n.attr('src');e.get(r,function(r){var o=e(r).find('svg');if(typeof a!=='undefined'){o=o.attr('id',a)};if(typeof t!=='undefined'){o=o.attr('class',t+' replaced-svg')};o=o.removeAttr('xmlns:a');n.replaceWith(o)},'xml')});if(e('a.read-more')){e('a.read-more').on('click',function(n){n.preventDefault();e(this).hide();e(this).parent().siblings('.hidden').slideDown()})};var l=100,v=1200,h=650,k=100,N=5000,x=100;e('.slider').slider({animate:h,range:'min',value:x,min:k,max:N,step:l,slide:function(n,t){e('#header_area input[name=\'loan_amount\']').val('£'+t.value);var a=(t.value==5000)?'or more...':' ';e('#header_area #ormore').html(a)},change:function(n,t){e('#header_area input[name=\'loan_amount\']').val('£'+t.value);var a=(t.value==5000)?'or more...':' ';e('#header_area #ormore').html(a)}});e('.slider').slider('value',v);var f=v/l,D=h/f;for(var s=1;s<=f;s++){(function(n){setTimeout(function(){e('#header_area input[name=\'loan_amount\']').val('£'+(n*l))},s*D)})(s)};e('#header_area .month_list label').on('click',function(n){e(this).siblings('label').removeClass('selected');e(this).addClass('selected')});e('.slider-minus').on('click',function(n){n.preventDefault();var t=e('.slider').slider('option','value');e('.slider').slider('option','value',t-l)});e('.slider-plus').on('click',function(n){n.preventDefault();var t=e('.slider').slider('option','value');e('.slider').slider('option','value',t+l)});e('#header_area input.submit').on('click',function(n){n.preventDefault();var a=e('.slider').slider('option','value'),r=e('#header_area .month_list label.selected input[name=\'loan_term\']').val(),t='/apply-now/amount/'+a+'/'+r;window.location.href=t});var d=document.querySelectorAll('.lenders .lender');if(d.length>0){var b=d.length,g=document.querySelector('.lender-search input'),s,c;for(s=0;sul').append('');e('#nav-icon').click(function(){var n=e(this);if(e('body').hasClass('pmr-open')){e(n).removeClass('open');e('body').removeClass('pmr-open');setTimeout(function(){e('.mask').remove()},600)}else{e(n).addClass('open');e('body').addClass('pmr-open');var t=e('
').click(function(){setTimeout(function(){e('.mask').remove()},600);e('body').removeClass('pmr-open');e(n).removeClass('open')});e('body').append(t)}});e('body.page-index a[data-scrollto]').on('click',function(n){n.preventDefault();var t=e(this).attr('data-scrollto');e('html, body').animate({scrollTop:e('#'+t).offset().top-30},500);if(e(this).parents('nav.menu').length>0){e('#nav-icon').trigger('click')}});e('input[data-errormsg]').each(function(n,t){var a=e(this).data('errormsg');t.oninput=function(e){e.target.setCustomValidity('');if(e.target.validity.patternMismatch){e.target.setCustomValidity(a);if(e.target.validity.typeMismatch){e.target.setCustomValidity(a)}}};t.oninvalid=function(e){e.target.setCustomValidity(a)}});var M=e('#accordion .title').first().not('.autoclose').addClass('open');e('#accordion .content').first().siblings('.content').addClass('hide');e('#accordion .content.autoclose').addClass('hide');e('#accordion').on('click','.title',function(){e(this).toggleClass('open');e(this).siblings('.title').removeClass('open');if(e(this).next().is(':visible')){e(this).next().slideUp(200)}else{e(this).next().slideDown(200).siblings('.content').slideUp(200)}});e('.tooltip').on('click',function(e){e.preventDefault()});e('#l2g_apply_now').on('click',function(t){t.preventDefault();r(!1);e.post('process.php',{callSpecificAPI:'loans2go'},function(e){if(e.status=='success'){var t='Please wait while we redirect you...';a(t);setTimeout(function(){n();window.location.href=e.redirect_url},2000)}else{n();window.location.href='/results/decline/'}})});e('#amigo_apply_now').on('click',function(t){t.preventDefault();r(!1);e.post('process.php',{callSpecificAPI:'amigoloans'},function(e){if(e.status=='success'){var t='Please wait while we redirect you...';a(t);setTimeout(function(){n();window.location.href=e.redirect_url},2000)}else{n();window.location.href='/results/decline/'}})});if(e('#form.application_form').length){e('#form').show();e('#form_loading_message').hide();e('a').not('.logo a').attr('target','_blank');e('#to_the_top').hide();var u=/^[a-zA-Z\s]*$/,i=/^\d+$/,C=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i,T=/^[a-z0-9\s]+$/i,y=/^[a-z0-9\s,-\/\\]+$/i;e('#form :input:not(:submit):not(:button)').on('focusout change formsubmit',function(){e(this).val(e.trim(e(this).val()))});e('[name="homePhone"], [name="cellPhone"], [name="postCode"], [name="workPhone"], [name="expenseHousing"], [name="expenseAllLoans"], [name="expenseUtilities"], [name="expenseTransport"], [name="expenseFood"], [name="expenseOther"], [name="bankAccountNumber"], [name="bankSortCode"]').on('focusout change formsubmit',function(){e(this).val(e(this).val().replace(/\s/g,''))});e('[name="cellPhone"]').on('focusout change',function(){var t=e.trim(e(this).val()),n=e.trim(e('[name="homePhone"]').val());if(n==''){e('[name="homePhone"]').val(t)}});e('[name="incomeNextDate1_day"], [name="incomeNextDate1_month"], [name="incomeNextDate1_year"]').on('focusout change formsubmit',function(){var r=e('[name="incomeNextDate1_day"] option:selected').attr('value'),a=e('[name="incomeNextDate1_month"] option:selected').attr('value'),n=e('[name="incomeNextDate1_year"] option:selected').attr('value'),s=new Date(),o=s.getUTCFullYear(),i=s.getUTCMonth()+1,l=s.getUTCDate();if(r!=''&&a!=''&&n!=''){r=t(r,2);a=t(a,2);n=t(n,4);if(nDate cannot be in the past.')}else{e('[name="incomeNextDate1_day"]').parents('.group').find('.error').remove()}}});e('[name="incomeNextDate2_day"], [name="incomeNextDate2_month"], [name="incomeNextDate2_year"]').on('focusout change formsubmit',function(){var r=e('[name="incomeNextDate2_day"] option:selected').attr('value'),a=e('[name="incomeNextDate2_month"] option:selected').attr('value'),n=e('[name="incomeNextDate2_year"] option:selected').attr('value'),s=new Date(),o=s.getUTCFullYear(),i=s.getUTCMonth()+1,l=s.getUTCDate();if(r!=''&&a!=''&&n!=''){r=t(r,2);a=t(a,2);n=t(n,4);if(nDate cannot be in the past.')}else{e('[name="incomeNextDate2_day"]').parents('.group').find('.error').remove()}}});e('select.required').on('focusout change formsubmit',function(){var n=e('option:selected',this).attr('value');if(n==''){e(this).parent().find('.error').remove();e(this).parent().append('Please make a selection.')}else{e(this).parent().find('.error').remove()}});e('input.required').on('focusout change formsubmit',function(){var n=e(this).val();if(n==''){e(this).parent().find('.error').remove();e(this).parent().append('Cannot be blank.')}else{e(this).parent().find('.error').remove()}});e('[name="firstName"]').on('focusout change formsubmit',function(){var n=e(this).val(),t=u;if(n.length<2||!t.test(n)){e(this).parent().find('.error').remove();e(this).parent().append('Field may not be less than 2 letters or include numeric values/symbols.')}else{e(this).parent().find('.error').remove()}});e('[name="lastName"]').on('focusout change formsubmit',function(){var n=e(this).val(),t=u;if(n.length<2||!t.test(n)){e(this).parent().find('.error').remove();e(this).parent().append('Field may not be less than 2 letters or include numeric values/symbols.')}else{e(this).parent().find('.error').remove()}});e('[name="email"]').on('focusout change formsubmit',function(){var n=e(this).val(),t=C;if(n.length<2||!t.test(n)){e(this).parent().find('.error').remove();e(this).parent().append('Must include the \'@\' symbol and valid domain (e.g. .com, .net).')}else{e(this).parent().find('.error').remove()}});e('[name="homePhone"]').on('focusout change formsubmit',function(){var n=e(this).val(),a=i,t=n[0];if(n.length<10||n.length>11){e(this).parent().find('.error').remove();e(this).parent().append('Must be 10 or 11 numbers.')}else if(!a.test(n)||t!=0){e(this).parent().find('.error').remove();e(this).parent().append('Must only contain numeric values and should start with 0.')}else{e(this).parent().find('.error').remove()}});e('[name="cellPhone"]').on('focusout change formsubmit',function(){var n=e(this).val(),a=i,t=n.slice(0,2);if(n.length!=11||!a.test(n)||t!='07'){e(this).parent().find('.error').remove();e(this).parent().append('Must only contain numbers. Must start with 07. 11 numbers total.')}else{e(this).parent().find('.error').remove()}});e('[name="postCode"]').on('focusout change formsubmit',function(){var n=e(this).val();if(n.length<5){e(this).parent().find('.error').remove();e(this).parent().append('Field may not be less than 5 letters.')}else{e(this).parent().find('.error').remove()}});e('[name="houseName"]').on('focusout change formsubmit',function(){var n=e(this).val(),t=y;if(n.length==0||!t.test(n)){e(this).parent().find('.error').remove();e(this).parent().append('Field may not be blank. Allowed symbols are: "," and "/" and "-" and "\\".')}else{e(this).parent().find('.error').remove()}});e('[name="street"]').on('focusout change formsubmit',function(){var n=e(this).val(),t=y;if(n.length==0||!t.test(n)){e(this).parent().find('.error').remove();e(this).parent().append('Field may not be blank. Allowed symbols are: "," and "/" and "-" and "\\".')}else{e(this).parent().find('.error').remove()}});e('[name="county"]').on('focusout change formsubmit',function(){var n=e(this).val(),t=u;if(n.length==0||!t.test(n)){e(this).parent().find('.error').remove();e(this).parent().append('Field may not be blank or include numeric values/symbols.')}else{e(this).parent().find('.error').remove()}});e('[name="city"]').on('focusout change formsubmit',function(){var n=e(this).val(),t=u;if(n.length==0||!t.test(n)){e(this).parent().find('.error').remove();e(this).parent().append('Field may not be blank or include numeric values/symbols.')}else{e(this).parent().find('.error').remove()}});e('[name="workCompanyName"]').on('focusout change formsubmit',function(){var n=e(this).val(),t=u;if(n.length<2||!t.test(n)){e(this).parent().find('.error').remove();e(this).parent().append('Field may not be less than 2 letters or include numeric values/symbols.')}else{e(this).parent().find('.error').remove()}});e('[name="workPhone"]').on('focusout change formsubmit',function(){var n=e(this).val(),a=i,t=n[0];if(n.length>0&&(n.length<10||n.length>11)){e(this).parent().find('.error').remove();e(this).parent().append('Must be 10 or 11 numbers.')}else if(n.length>0&&(!a.test(n)||t!=0)){e(this).parent().find('.error').remove();e(this).parent().append('Must only contain numeric values and should start with 0.')}else{e(this).parent().find('.error').remove()}});e('[name="expenseHousing"], [name="expenseAllLoans"], [name="expenseUtilities"], [name="expenseTransport"], [name="expenseFood"], [name="expenseOther"]').on('focusout change formsubmit',function(){var n=e(this).val(),t=i;if(!t.test(n)){var a=(n.length==0)?'Cannot be blank.':'Must only contain numeric values.';e(this).parent().find('.error').remove();e(this).parent().append(''+a+'')}else{e(this).parent().find('.error').remove()}});e('[name="bankAccountNumber"]').on('focusout change formsubmit',function(){var n=e(this).val(),t=i;if(n.length!=8||!t.test(n)){var a=(n.length==0)?'Cannot be blank.':'May only include numeric values. Eight numbers.';e(this).parent().find('.error').remove();e(this).parent().append(''+a+'')}else{e(this).parent().find('.error').remove()}});e('[name="bankSortCode"]').on('focusout change formsubmit',function(){var n=e(this).val(),t=i;if(n.length!=6||!t.test(n)){var a=(n.length==0)?'Cannot be blank.':'May only include numeric values. Six numbers.';e(this).parent().find('.error').remove();e(this).parent().append(''+a+'')}else{e(this).parent().find('.error').remove()}});e('[name="incomeType"]').on('focusout change formload',function(){var r=e(this).val(),a=['unemployed','pension','disability_benefit','student'],t=e('[name="workCompanyName"]').val(),n=e('[name="workIndustry"]').val();if(a.indexOf(r)!=-1){e('[name="workIndustry"], [name="workCompanyName"]').parents('div[class^=col]').hide();e('[name="workCompanyName"]').val('other');e('[name="workIndustry"]').val('other');e('[name="workCompanyName"]').parent().find('.error').remove();e('[name="workIndustry"]').parent().find('.error').remove()}else{if(e(this).val()){e('[name="workIndustry"], [name="workCompanyName"]').parents('div[class^=col]').show()};if(t){if(e('[name="workCompanyName"]').val().length==0||e('[name="workCompanyName"]').val()=='other'){e('[name="workCompanyName"]').val('')}};if(n){if(e('[name="workIndustry"]').val().length==0||e('[name="workIndustry"]').val()=='other'){e('[name="workIndustry"]').val('')}}}});e('#form.application_form').submit(function(t){t.preventDefault();e('#form span.error').remove();e('#form .highlight_error').removeClass('highlight_error');e('#form input, #form select').trigger('formsubmit');if(e('#form .error').length>0){var o=e('#form .error').first().parent();e('html, body').animate({scrollTop:e(o).offset().top+15},0);e('html, body').animate({scrollTop:e(o).offset().top-20},800)}else if(!e('[name="consentTerms"]').is(':checked')){e('[name="consentTerms"]').parents('span').addClass('highlight_error');e('[name="consentTerms"]').parents('label').addClass('highlight_error');alert('You must accept our terms of service.');return!1}else{r();e.post('process.php',e('#form.application_form').serialize(),function(t){if(t.provider=='tdotuk'){if(t.status=='error'&&typeof t.errors!=='undefined'){e.each(t.errors,function(n,t){t=(t=='required')?'Cannot be blank.':t;t=(t=='Either this field or houseNumber is required.')?'Cannot be blank.':t;t=(t=='the input value is not a valid email address.')?'Value should be a valid email address.':t;e('#form select[name="'+n+'"]').parents('label').append(''+t+'');e('#form input[name="'+n+'"]').parents('label').append(''+t+'')})}};if(t.provider=='monevo'){if(t.status=='error'&&typeof t.errors!=='undefined'){e.each(t.errors,function(n,t){t=(t=='required')?'Cannot be blank.':t;t=(t=='Either this field or houseNumber is required.')?'Cannot be blank.':t;t=(t=='the input value is not a valid email address.')?'Value should be a valid email address.':t;e('#form select[name="'+n+'"]').parents('label').append(''+t+'');e('#form input[name="'+n+'"]').parents('label').append(''+t+'')})}else if(t.status=='error'){alert(t.message)}};if(t.status=='success'){var r='Please wait while we redirect you...';a(r);setTimeout(function(){n();window.location.href=t.redirect_url},2000)}else{n()}})}});e('#form input, #form select').trigger('formload')};if(e('#multi-step-apply-now-form').length){e('#multi-step-apply-now-form').submit(function(t){t.preventDefault();console.log(e('#multi-step-apply-now-form').serialize());r();e.post('process.php',e('#multi-step-apply-now-form').serialize(),function(t){if(t.provider=='tdotuk'){if(t.status=='error'&&typeof t.errors!=='undefined'){e.each(t.errors,function(n,t){t=(t=='required')?'Cannot be blank.':t;t=(t=='Either this field or houseNumber is required.')?'Cannot be blank.':t;t=(t=='the input value is not a valid email address.')?'Value should be a valid email address.':t;e('#form select[name="'+n+'"]').parents('label').append(''+t+'');e('#form input[name="'+n+'"]').parents('label').append(''+t+'')})}};if(t.provider=='monevo'){if(t.status=='error'&&typeof t.errors!=='undefined'){e.each(t.errors,function(n,t){t=(t=='required')?'Cannot be blank.':t;t=(t=='Either this field or houseNumber is required.')?'Cannot be blank.':t;t=(t=='the input value is not a valid email address.')?'Value should be a valid email address.':t;e('#form select[name="'+n+'"]').parents('label').append(''+t+'');e('#form input[name="'+n+'"]').parents('label').append(''+t+'')})}else if(t.status=='error'){alert(t.message)}};if(t.status=='success'){var r='Please wait while we redirect you...';a(r);setTimeout(function(){n();window.location.href=t.redirect_url},2000)}else{n()}})})}})})(jQuery);if(typeof gtag!=='undefined'&>ag!==null){(function(e,n){e(function(){if(e('#form.application_form').length){e('#form.application_form input.submit').on('click',function(){n('event','Form submit',{'event_category':'form_submit',})})}})})(jQuery,gtag)};