consolidated $(document).ready functions