JavaScript: jQuery initialization function boilerplate