asdasd
// requests the language from static page
function receiveMessage(event) {
var formStrings = event.data;
function mapFormStrings() {
function changeStrings() {
$('#interaction_name').siblings('.form_label').text(formStrings.your_name);
$('#interaction_name').siblings('.invalid').text(formStrings.errors.name);
$('#interaction_email').siblings('.form_label').text(formStrings.your_email);
$('#interaction_email').siblings('.invalid').text(formStrings.errors.email);
$('#email_subject').siblings('.form_label').text(formStrings.subject);
$('#email_subject').siblings('.invalid').text(formStrings.errors.subject);
$('#email_body').siblings('.form_label').text(formStrings.your_message);
$('#email_body').siblings('.invalid').text(formStrings.errors.message);
$('#email_submit').val(formStrings.submit);
}
setTimeout(function() {
changeStrings();
}, 50);
changeStrings();
}
//mapFormStrings();
$('input').on('blur', mapFormStrings);
$('form').on('submit', mapFormStrings);
$(document).on('keydown keyup', mapFormStrings);
mapFormStrings();
}
window.addEventListener("message", receiveMessage, false);
window.parent.postMessage("need the language", "http://immo.dev");