window.addEvent('domready', function() {
	var s_text = $('s_text');
	var s_text_v = $('s_text').value;
	
	s_text.addEvents({
		focus: function(e){
			e.stop;
			if (this.value==s_text_v) this.value= '';
		},
		blur: function(e){
			e.stop;
			if (this.value=='') this.value = s_text_v;
		}	
	});		
	
	
	
	
	var n_name = $('n_name');
	var n_email = $('n_email');
	var n_name_v = $('n_name').value;
	var n_email_v = $('n_email').value;	
	
	n_name.addEvents({
		focus: function(e){
			e.stop;
			if (this.value==n_name_v) this.value= '';
		},
		blur: function(e){
			e.stop;
			if (this.value=='') this.value = n_name_v;
		}	
	});	
	
	n_email.addEvents({
		focus: function(e){
			e.stop;
			if (this.value==n_email_v) this.value= '';
		},
		blur: function(e){
			e.stop;
			if (this.value=='') this.value = n_email_v;
		}	
	});		
	
	$('newsletter').addEvent('submit', function(e) {
		e.stop();
	 
		var log = $('n_response');
		log.empty();
		log.set('html', 'Trwa wysyłanie...');
		//Set the options of the form's Request handler. 
		this.set('send', {onComplete: function(response) { 
			log.empty();
			log.set('html', response);
		}});
		this.send();
	});	

});