condense directional function into one slide function

there was too much repetition in the direction slide functions. moving
forward it makes sense to have only one function for each kind of
animation that might be configurable.