Update some snippets for Symfony 2.3. Add jQuery each function