modified the hide and show functions to fadeOut and fadeIn