Add in opposite_position fucntion

This adds in a function called $opposite_position() that will return the opposite postions.

So $opposite_position(left) will be right, $opposite_position(top) is bottom, so on.