Fix #138: Enhancements to jQuery script init