added selected and selected-item classes for selected elements