<!-- Popper -->
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<!-- Boostrap -->
<script src="/assets/frontend/thirdparty/bootstrap/js/bootstrap.min.js"></script>
<!-- Cookie consent -->
<script src="/assets/frontend/thirdparty/cookieconsent/js/cookieconsent.min.js" data-cfasync="false"></script>
<script>
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#aab4b9"
},
"button": {
"background": "#e45a09"
}
},
"content": {
"href": "/privacy-policy"
}
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$(".carousel").carousel();
// Focus on quote input
$('.quote-input .form-control').focus(function() {
$(this).parents('.quote-input').addClass('active');
});
// Leave quote input
$('.quote-input .form-control').focusout(function() {
$(this).parents('.quote-input').removeClass('active');
});
// Handle recaptcha form
$('[data-action="handle-recaptcha-form"]').click(function(e){
e.preventDefault();
let button = $(this);
grecaptcha.ready(function() {
grecaptcha.execute('{{ config_helper.value('recaptcha_sitekey') }}', {action: 'submit'}).then(function(token) {
// Embed the token
button.parents('form').first().append('<input type="hidden" name="recaptcha_token" value="' + token + '"/>');
// Embed the button action
button.parents('form').first().append('<input type="hidden" name="' + button.attr("name") + '" value="' + button.attr("value") + '"/>');
// Submit the form
button.parents('form').first().trigger("submit");
});
});
});
})
</script>