/**
 * This file is contain a map core functionality
 *
 *
 * jQuery Version 1.4.2
 *
 * LICENSE: This source code is copyright Alongkot Karpchai with knowledge that BUZZWOO! GbR will
 * receive all rights to the source code, including changing all comment header blocks and source code.
 *
 * @author      	Alongkot Karpchai <alongkot1981@gmail.com>
 * @copyright 	Buzzwoo.
 * @license      	See Above
 * @version    	0.9
 * @since      		0.7
 */
//will load when page loaded
$(document).ready(function(){
	
		$("form").submit(function(){
			var str = $("form").serialize();
			 $.ajax({
			 type: "POST",
			 url: "contactform/contact.php",
			 data: str,
			 success: function(msg){
				$("#note").ajaxComplete(function(event, request, settings){
						if(msg == 'OK'){ // Message Sent? Show the 'Thank You' message and hide the form
							  result = '<div class="notification_ok">Your message has been sent. Thank you!</div>';
							  $("#fields").hide();
						}else{
							  result = msg;
				  }
			   $(this).html(result);
				  });
				 }});
			   return false;
				});
			 });

