// Script for controlling the slider

$(function()  {
	$("#slider").slider({
		range: true,   // creates displayable range element between the two handles
		min: 1000,
		max: 1914,
		values: [1250, 1750],
		slide: function(event, ui)  {
			$("#amount").val(ui.values[0] + ' - ' + ui.values[1]);   // sets the display of years
		},
		stop: function(event, ui)  {
			ajaxFunction();  // update the timeline once the slider has stopped
		}
	});
	$("#amount").val($("#slider").slider("values", 0) + ' - ' + $("#slider").slider("values", 1));
});
