/* 

	HTML5 Modal Contact Form
	Version:    1.0
	Created By: Tyler Colwell
	Website:    http://tyler.tc/
	
	Copyright © 2010 Tyler Colwell
	
*/
(function(a){a.fn.html5ModalContact=function(e){var h={method:"post",action:"process_form.php",};var e=a.extend(h,e);getPopHTML=function(){var j='<div id="modal-form-bg"></div><div id="modal-form"><img src="images/close.png" id="close-modal-form" /><form action="'+e.action+'" method="'+e.method+'" name="html5-contact-box" id="html5-contact-box" ><div id="modal-form-right"><label for="subject">Subject</label><select class="input_field" required="required" name="subject" id="subject"><option value="General">General</option><option value="Technical">Technical</option><option value="Feedback">Feedback</option><option value="Other Comments">Other Comments</option><option value="Support / Help">Support / Help</option></select><label for="message">Message</label><textarea name="message" cols="50" rows="5" class="input_field" id="message" required="required"></textarea><br /><input name="contact" value="Send" id="contact" type="submit" /></div><label for="name">Name</label><input name="name" type="text" class="input_field" id="name" size="26" required="required" placeholder="Your Name" /><label for="email">Email</label><input name="email" type="email" size="26" class="input_field" id="email" required="required" placeholder="Your Email Address" /><label>Phone <small style="font-size:10px;">(Optional)</small></label><input name="phone" type="tel" size="26" class="input_field" placeholder="Your Phone Number" /></form></div>';return j};var d=getPopHTML();a("body").append(d);var f=document.documentElement.clientWidth;var i=document.documentElement.clientHeight;var c=a("#modal-form-bg");var b=a("#modal-form");c.css({height:i});c.css({opacity:"0.4"});c.fadeIn("slow");b.fadeIn("slow");a("#close-modal-form").bind("click",g);function g(){c.fadeOut("slow");b.fadeOut("slow");c.remove();b.remove()}a("#html5-contact-box").submit(function(){var j=a(this).serialize();a.ajax({type:e.method,url:e.action,data:j,success:function(k){a("#modal-form").html(k);a("#close-modal-form").bind("click",g)}});return false})}})(jQuery);
