window.addEvent('domready', function() {

	var scroll = new Fx.Scroll(window, {
			wait: false,
			duration: 600,
			link:'chain',
			offset: {'x': 0, 'y': -20},
			transition: Fx.Transitions.Quad.easeInOut
		});

	/*$$(".learnMore").each(function(link) {
		link.addEvent('click', function(e) { 
			e.stop();
			scroll.toElement('ContactForm'); })
			});*/

	var detailsSlide = new Fx.Slide('ContactDetails', {duration:500, wait: false, mode: 'vertical'});
	$('jsPost').set('value', '');
	if(!$('contactId').value.length)
	{
		detailsSlide.hide();
		$('GetStarted').set('style', '');
	}
	
	
	$('GetStarted').addEvent('click', function(e) {	
		e.stop();
		detailsSlide.slideIn().chain(function() { scroll.toElement('ContactDetails') });
		$('GetStarted').set('style', 'display:none;');
		$('jsPost').set('value', 'true');
		
		$('ContactForm').set('send', {onComplete: function(response) { 
			$('contactId').set('value', response);
		}}).send();
		
		$('jsPost').set('value', '');
	});

	$('Submit').addEvent('click', function(e) {
		$('jsPost').set('value', '');
	});

});
