use jQuery for window.onload if exists