compatibility with safari
adds jquery, fixes selection given scroll