more snippets for global and jquery