Create switching.js