added js code for colorswitcher