Update custom.js

Improved fadein-fadeout effect.