Improve selectors, jQuery style.
Use event delegation.

This way, we avoid binding the event handler to all lines. Instead, we
bind to the container and simply pass on control to the targeted frame.