// run once the document is ready $(document).ready(function() { // initialize the contact form if ($('#contact-form').length) contactFormInit(); });