use jquery ready instead of window.onload; sometimes jquery-ui hasn't loaded yet