Added a switch statement in JS file

To sync the titles with pics and quotes