refactoring, less jquery magic