This script is exactly what I want to my website but I'm having problems to apply it to other container and not window