This is a perfect usage of require to actually pass to the init function the name of the background you want right ?
I'm sure you can do it with javascript....