} else { var overlay = jQuery('<div id="contactFormResultsOverlay" class="boxOverlay"></div>').prependTo($("body")); overlay.fadeTo(0.001, 0); overlay.fadeTo("slow", 0.7); var results = jQuery('<div id="contactFormResults" class="boxBox"></div>').addClass('loading').prependTo($("body")); results.hide(); results.fadeIn("slow"); $.ajax({ url: "<?php echo URL::get('ajax', array('context' => 'submit_form')); ?> ", cache: false, data: {<?php $elements = AlienContact::elements(); $i = 0; foreach ($elements as $element) { $i++; echo $element['id']; ?> : $("#contactForm_<?php echo $element['id']; ?> ").val()<?php if ($i != count($elements)) { ?> , <?php } } ?>