add fade and animation function

run jshint