added graying effect, and resize on selection