improved jquery helper method
added support for startup / teardown