clean up jquery arrow direction change function so it's called on document ready