$(document).ready(function(){
	function setupResolution() {
		var lblMin = $('#resolution span.min');
		var lblMax = $('#resolution span.max');
		$('#resolution div.slider').sliderx({
			init: function (slider) {
				NAVSTATE.sliders.resolution = slider;
			},
			change : function ( value, selection) {
				NAVSTATE.selection.resolution.min = selection[0] ;
				NAVSTATE.selection.resolution.max = selection[1] ;
				$.historyLoad(NAVSTATE.getNavState());
			},
			slide : function ( value, selection) {
				lblMin.text(Math.round(value[0]));
				lblMax.text(Math.round(value[1]));
			},
			steps : [5,10,15,20],
			rangeMin : 0,
			rangeMax : 100
		});
	}

	setupResolution();
})