A simple model for f-d transitions of rare-earth ions in crystals