var info = [ '#product-1-info', '#product-2-info', '#product-3-info' ];
var positions = [ '75px', '244px', '413px' ];
var selected = 0;

function selectElement(idx) {
	$("#indicator").stop().animate({ left: positions[idx] }, "fast");
	
	$(info[selected]).hide();
	$(info[idx]).show();
	
	selected = idx;
}

$(document).ready(function() {
	selectElement(1); // todo: will update description
	$("#product-1").click(function(){ selectElement(0) });
	$("#product-2").click(function(){ selectElement(1) });
	$("#product-3").click(function(){ selectElement(2) });
});

