better js. no hoping that jquery was loaded at the right time