$(document).ready(function(){
 	$("#timer").hide();
  	$("#notification_ok").toggle();
  	$("#request_timer").hide();
  	$("#request_notification_ok").hide();

  });
  
  
$(document).ready(function(){


$("#ajax-contact-form").submit(function(){

var str = $(this).serialize();

   $.ajax({
   type: "POST",
   url: "components/js/subscribe.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
{
	$("#ajax-contact-form").hide();
	$("#sub_title").hide();
	$("#note").hide();
	$("#timer").toggle();
	var formdata = $('[name=email]').val();
	$('[name=more-email]').val(formdata);



	
	

	
window.setTimeout(function() {
$('#timer').empty();
$("#light").css("display", "block");
$("#fade").css("display", "block");
$("#notification_ok").show();
$("#timer").toggle();
$("#fields").hide();

}, 3000);

}


else
{
result = msg;
}

$(this).html(result);

});

}

 });

return false;

});

});


$(document).ready(function(){


$("#more-info").submit(function(){

var str = $(this).serialize();

   $.ajax({
   type: "POST",
   url: "components/js/more-info.php",
   data: str,
   success: function(msgm){
    
$("#more_note").ajaxComplete(function(event, request, settings){

if(msgm == 'OK') // Message Sent? Show the 'Thank You' message and hide the form
{
	$("#more-info").hide();
	$("#light").css("display", "none");
	$("#fade").css("display", "none");
	$("#more_note").hide();


}
else
{
result = msgm;
}

$(this).html(result);

});

}

 });

return false;

});

});





$(document).ready(function(){

$("#request-form").submit(function(){

var str = $(this).serialize();

   $.ajax({
   type: "POST",
   url: "components/js/request.php",
   data: str,
   success: function(req){
    
$("#request_note").ajaxComplete(function(event, request, settings){

if(req == 'OK') // Message Sent? Show the 'Thank You' message and hide the form
{
	$("#request-form").hide();
	$("#request_title").hide();
	$("#request_note").hide();
	$("#request_timer").toggle();

	window.setTimeout(function() {
$('#request_timer').empty();
$("#light_request").css("display", "block");
$("#fade_request").css("display", "block");
$("#request_notification_ok").show();
$("#request_timer").toggle();
$("#request_fields").hide();

}, 3000);

}


else
{
result = req;
}

$(this).html(result);

});

}

 });

return false;

});

});

;



