Pass in objects to slidebox function