// activates the profileswitching functions for elevation / time speed stuff
function profileswitch() {
	$('#timespeedlink').click(function(e) { e.preventDefault(); showTimeSpeed(); });
	$('#elevationlink').click(function(e) { e.preventDefault(); showElevation(); });
	showElevation();
}

function showTimeSpeed() {
	// switch image to time/speed
	var src = $('#profileimage').attr('src');
	src = src.replace('elevation-', 'time-speed-');
	$('#profileimage').attr('src', src);
	// change elements
	$('#timespeedlink').html('time/speed');
	$('#elevationlink').html("<a href='#'>distance/elevation</a>");
}

function showElevation() {
	// switch image to time/speed
	var src = $('#profileimage').attr('src');
	src = src.replace('time-speed-', 'elevation-');
	$('#profileimage').attr('src', src);
	// change elements
	$('#elevationlink').html('distance/elevation');
	$('#timespeedlink').html("<a href='#'>time/speed</a>");
}

