jQuery(document).ready(function(){	
	// Drawer contact
	jQuery("#drawer-form>form").submit(function(){
		// 'this' refers to the current submitted form
		var str = jQuery(this).serialize();
		jQuery.ajax({
			type: "POST",
			url: jQuery("#blog-url").attr("value"),
			data: str,
			success: function(msg){
				if(msg == "OK"){ // Message Sent? Show the 'Thank You' message and hide the form
				    jQuery("#drawer-form>form").html('<div class="drawer_notification_ok">Your message has been sent. Thank you!</div>');
				} else {
				    alert(msg.replace("<br />", "\n").replace("<br />", "\n").replace("<div class=\"notification_error\">", "").replace("</div>", ""));
				}
			}
		});
		return false;
	});
});