Added sine effect to fade function.