$(
	function()
	{
		$(".ClassWebHostingSubmit").click(
			function()
			{
				var YourName	=	$("input#YourName").val();
				if( (YourName == "") || (YourName == "Your name (mandatory)") )
				{
					alert("Please insert your name correctly.");
					$("input#YourName").focus();
					return false;
				}
				var Company	=	$("input#Company").val();
				if( Company == "Company" )
				{
					Company	=	"";
				}
				var Telephone	=	$("input#Telephone").val();
				if( (Telephone == "") || (Telephone == "Telephone number (mandatory)") )
				{
					alert("Please insert the telephone number correctly.");
					$("input#Telephone").focus();
					return false;
				}
				var EmailAddress	=	$("input#EmailAddress").val();
				if( (EmailAddress == "") || (EmailAddress == "Valid e-mail address (mandatory)") )
				{
					alert("Please insert a valid email.");
					$("input#EmailAddress").focus();
					return false;
				}
				if( Validate_Email_jquery(EmailAddress,"Please insert a valid email address.") == false )
				{
					$("input#EmailAddress").focus();
					return false;
				}
				var DomainType	=	'';
				if ( $("#DomainType1").attr('checked') )
				{
					DomainType	=	$("#DomainType1").val();
				}
				else if ( $("#DomainType2").attr('checked') )
				{
					DomainType	=	$("#DomainType2").val();
				}
				var URL_Domain	=	$("input#URL_Domain").val();
				if( URL_Domain == "URL / Domain" )
				{
					URL_Domain	=	"";
				}
				var WithWebsite	=	'';
				if ( $("#WithWebsite").attr('checked') )
				{
					WithWebsite		=	$("input#WithWebsite").val();
				}
				var WithEmail	=	'';
				if ( $("#WithEmail").attr('checked') )
				{
					WithEmail		=	$("input#WithEmail").val();
				}
				var WithDatabase	=	'';
				if ( $("#WithDatabase").attr('checked') )
				{
					WithDatabase		=	$("input#WithDatabase").val();
				}
				var WithBackOffice	=	'';
				if ( $("#WithBackOffice").attr('checked') )
				{
					WithBackOffice		=	$("input#WithBackOffice").val();
				}
				var WithCloud	=	'';
				if ( $("#WithCloud").attr('checked') )
				{
					WithCloud		=	$("input#WithCloud").val();
				}
				var Comments		=	$("textarea#Comments").val();
				if( (Comments == "") || (Comments == "Comments / Requirements (mandatory)") )
				{
					alert("Please insert the message correctly.");
					$("textarea#Comments").focus();
					return false;
				}
				var dataString	=	'YourName='+YourName+'&Company='+Company+'&Telephone='+Telephone+'&EmailAddress='+EmailAddress+'&DomainType='+DomainType+'&URL_Domain='+URL_Domain+'&WithWebsite='+WithWebsite+'&WithEmail='+WithEmail+'&WithDatabase='+WithDatabase+'&WithBackOffice='+WithBackOffice+'&WithCloud='+WithCloud+'&Comments='+Comments;
				$.ajax(
					{
						type: "POST",
						url: "ajax_web_hosting.php",
						enctype: 'multipart/form-data',
						data: dataString,
						success: function(html)
						{
							$('#web_hosting_form').html("<div id='message'></div>");
							$('#message').html("<h2>Web Hosting Form Submitted!</h2><p>We will be in touch soon.</p>").hide().fadeIn(500);
						}
					}
				);
				return false;
			}
		);
	}
);

