Moved carousel home script to js file