window.addEvent('domready',function(){
	var nS6 = new noobSlide({
		autoPlay: true,
		interval: 4000,
		mode: 'horizontal',
		box: $('box6'),
		items: $$('#box6>span'),
		size: 450,
		handles: $$('#handles6_1 img'),
		handle_event: 'click',
		fxOptions: {
			duration: 1000,
			transition: Fx.Transitions.Back.easeOut,
			wait: false
		},
		onWalk: function(currentItem,currentHandle){
			this.handles.set('opacity',0.5);
			currentHandle.set('opacity',1);
		}
	});
	
	var n_email = $('n_email');
	var n_email_v = $('n_email').value;	
	
	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();
	});	

	
});
