Refactored jQuery code

Now jQuery does not wait until document:ready to apply event handlers.
This is possible because we use live events and it requires only
document object to be loaded.