enqueue all scripts in footer where possible. make sure related method calls wait until document is ready.