Puzzle Button

You need to switch positions of adjacent items to form lines of 3 or more identical ones. Your goal is each level is to eliminate all items that have a gem inside.