Create initial function to generate sliding effect for tray and other page contents