move some javascript to "on document ready" to speed up main load