<!-- FORM VALIDATION -->

$(document).ready(function(){

$("#subform").validate({ 
rules: { 
wpnewsletter_email: {// compound rule 
required: true, 
email: true 
}
} 
}); 
					
						   
<!-- contact -->

$("#yorkform").submit(function(){

var str = $(this).serialize();
   $.ajax({
   type: "POST",
   url: "http://www.yorkjewellers.com.au/php/contactForm.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
{
window.location = "http://www.yorkjewellers.com.au/dev/thanks/"
}
else
{
result = msg;
}
$(this).html(result);
});
}
});
return false;
});
<!-- end contact -->
<!-- appointment -->

$("#appform").submit(function(){

var str = $(this).serialize();
   $.ajax({
   type: "POST",
   url: "http://www.yorkjewellers.com.au/php/appForm.php",
   data: str,
   success: function(msg){
$("#noter").ajaxComplete(function(event, request, settings){
if(msg == 'OK') // Message Sent? Show the 'Thank You' message and hide the form
{
$("#contact_form").hide();
$("#confirmed").show();
$("#noter").hide();
}
else
{
result = msg;
}
$(this).html(result);
});
}
});
return false;
});
<!-- end appointment -->
<!-- promotion -->

$("#promform").submit(function(){

var str = $(this).serialize();
   $.ajax({
   type: "POST",
   url: "http://www.yorkjewellers.com.au/php/promoForm.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
{
$("#contact_form").hide();
$("#confirmed").show();
$("#note").hide();
}
else
{
result = msg;
}
$(this).html(result);
});
}
});
return false;
});
<!-- end promotion -->


<!-- pre-order -->

$("#preform").submit(function(){
$('input[type=submit]', this).attr('disabled', 'disabled');
var str = $(this).serialize();
   $.ajax({
   type: "POST",
   url: "http://www.yorkjewellers.com.au/php/ordform.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
{
$("#preform").hide();
$("#pretext").hide();
$("#confirmed").show();
$("#note").hide();
}
else
{
result = msg;
$('input[type=submit]').removeAttr('disabled');
}
$(this).html(result);
});
}
});
return false;
});
<!-- end pre-order -->


});

<!-- END FORM VALIDATION -->
