var officeCity = new Array('moscow','kazan','kiev')

function cityAddress(id)
{
	var ids = []
	var $childs = $('#cities').children()
	var initial = $('#cities').children(".active").length

	for (var i=0; i<officeCity.length; i++){
		if (id != officeCity[i]){
			$($childs[i]).removeClass('active')
			ids.push('#'+officeCity[i])
		} else {
			$($childs[i]).addClass('active')
		}
	}

	$(ids.join(',')).animate({'opacity':'hide'}, 300)
	setTimeout(function(){$('#'+id).animate({'opacity':'show'}, 300)}, initial?0:310)

	return false
}

