JavaScript function to add animation on splash screen.