function autocompleteCity(idSuffix, lang) {
	$("#city_" + idSuffix + "_name").autocomplete('/' + lang + '/route/getcitiesajax/?foo=bar',
		{ 
			minChars: 3,
			max: 50,
			formatItem: function(data, i, n, value) { return String(data).split('%')[0] } 
		}
	);
	$("#city_" + idSuffix + "_name").result(function(event, data, formatted) { /*$("#city_" + idSuffix + "_id")[0].value = (String(data).split('%')[1]);*/ });
}

function clearField(idSuffix) {
	$("#city_" + idSuffix + "_name").change( function() { if (!(Boolean($("#city_" + idSuffix + "_name")[0].value))) { /*$("#city_" + idSuffix + "_id")[0].value = "";*/} } );
}