	$(document).ready
	(
		function() 
		{
			 $("#emails").focus
			 (
			 	function(srcc)
			    {
			        if ($(this).val() == $(this)[0].title)
			        {
			            $(this).val("");
			        }
			    }
			);
			    
			$("#emails").blur
			(
				function()
			    {
			        if ($(this).val() == "")
			        {
			            $(this).val($(this)[0].title);
			        }
			    }
			);
			    
			$("#emails").blur();        
		

			$("#singup").validate
			(
				{
					event: "submit",
					onblur: false,
					onkeyup: false,
					onChange: false,	
					onfocusout: false, 
					onsubmit: true,
					messages: {emails: "Please enter your e-mail address."},
					showErrors: function(errorMap, errorList) 
					{ 
						if (errorList.length > 0)
						{ 
							alert(errorList[0].message);  
						}
					},
					submitHandler: function()
					{
						$.ajax
						(	
							{
								type: "POST",
								url: "../libs/streamsend.php",
								data: "email="+$('#emails').val(),
								success: function(xml)
								{
									$('#emails').val('e-mail');
									alert("Thank you for signing up for BT News!");
								}
							}
						)
					}
				}
			);
		}
	);
