function ValidaMail(obj) {
	disallowed="!\"£$%^&*()+={}[]:;\'#<>,?/|\\ "
	valid=true;
	if (obj.indexOf('@')<1) valid=false;
	if (obj.indexOf('.')==0) valid=false;
	for (var i=0;i<28;i++) {
		if (obj.indexOf(disallowed.substring(i,i+1))!=-1) valid=false;
	}
	copy=obj.substring(obj.indexOf('@')+1,obj.length);
	if (copy.indexOf('@')!=-1) valid=false;
	if (copy.indexOf(".")<1) valid=false;
	if (copy.lastIndexOf(".")+1==copy.length) valid=false;
	copy=obj;
	while (copy.indexOf('.')!=-1) {
		copy=copy.substring(copy.indexOf('.')+1,copy.length);
		if (copy.indexOf('.')==0) valid=false;
	}
	return valid
}

$(document).ready(function() {
	$('form input[type="text"]').each(function(){
   		$(this).attr('value', $(this).prev().text());
   		$(this).prev().hide();
   	}); 	
   	$('form input[type="text"]').focus(function(){
   		$(this).attr('value', '');
   	});   	
   	$('form input[type="text"]').blur(function(){
   		if ($(this).val()=='') {
   			$(this).attr('value', $(this).prev().text());
   		}
   	}); 	   	
   	$('#form1').submit(function(e){
   		var check = ValidaMail($('#userMail').val());
   		if (!check) {
   			$('#response').text('Check your e-mail').show();
   			return false;
   		}
   	});
   	$('.slider').imNotSlider();
});
