implement custom javascript transitions