
	var build = "1.0.7-0417";
	
	function startNewsletter() {
		$("#newsletter1").attr("id", function() {
			$.ajax({
				type: "POST", url: "apps/newsletter/newsletter.app.php", data: "action=form",
				context: this,
				complete: function(data) {
					$(this).html(data.responseText);
					$(this).find("form input[name=email]").each(function() {
						value = this.value;
						$(this).focus(function() {
							if(this.value == value) {
								this.value = "";
							}
							$(this).addClass('focus');
						});
						$(this).blur(function() {
							if(this.value == "") {
								this.value = value;
							}
							$(this).removeClass('focus');
						});
					});
					$(this).find("form").submit(add);
				}
			});
			return "#newsletter_eartz_"+build;
		});
	}
	
	function form() {
	}

	function add() {
		var email = $(this).find("input[name=email]").attr("value");
		$.ajax({
			type: "POST", url: "apps/newsletter/newsletter.app.php", data: "action=add&email=" + email,
			context: this,
			complete: function(data) {
				$(this).parent().html(data.responseText);
			}
		});
		return false;
	}
