This would make a great procedure (Harry Wong). Count to five or hold up one finger at a time when the class needs to refocus. Discuss what occurs for each number at the beginning of the school year and eventually the reaction will be automatic.
"Give Me Five" is a powerful classroom/behavior management system to get the attention of your students right away. This is a poster to help you use this attention grabber signal in your class visually. I have included a color and a black and white copy.