$.metadata.setType("attr", "validate");
	
setTimeout(function(){ $('.fadeout').fadeOut('slow'); }, 4000);

$(document).ready(

	function() {
	
		$('.tooltip').qtip(
			{
			style: { name: 'cream', border: { radius: 5 } },
			position : { corner: { target: 'rightMiddle', tooltip: 'leftMiddle' } }
			}
		);
		
		/*
		$('div#scroll_banner').smoothDivScroll(
			{
			scrollingSpeed: 0.5, 
			mouseDownSpeedBooster: 3, 
			autoScroll: "onstart", 
			autoScrollDirection: "endlessloop", 
			autoScrollSpeed: 1, 
			visibleHotSpots: "onstart", 
			hotSpotsVisibleTime: 9, 
			startAtElementId: "start_scroll"
			}
		);
		*/
		
		$("#scroller").simplyScroll({
			autoMode: 'loop',
			speed: 2,
		});
		
		$('#form_bike_breakfast').validate();
		$('#form_free_bus_travel').validate();
		
		// Check if the Other Option is already selected - if so show other div.
		if($("#form_bike_breakfast input[type='radio']:last").attr('checked') == true)
		{
			$('div#encourage_cycling_other').show();
		}

		// Check if selected option is other - if so show 'Other' div. 
   		$("#form_bike_breakfast input[type='radio']").change(function(){
    	
			if($("#form_bike_breakfast input[type='radio']:last").attr('checked') == true)
			{
				$('div#encourage_cycling_other').fadeIn(500);
			}	else
			{
				$('div#encourage_cycling_other').fadeOut(500);
			}
    	});
	
	
	}
	
);