maybe $(document).ready() will help