move initializations in jquery ready