Good day, I am creating a website to a client which has a website full of visual effects. She uses HTML5 and lots of plugins in the intranet area. They have a nice system with a beautiful webdesign but it's really slow since it has about 20 JS libraries imported in the <head>.

So, I was told to recreate their webdesign without changing any HTML cause they say it uses a complex algorithm to generate it and they were afraid that if I change something in the HTML it may break the whole system. Said that, I could only manipulate the images and CSS classes to avoid any problem. I optimized several images, created sprites, expanded their CSS classes into more meaningful names and tried to make the code cleaner and easy to understand. It was all working fine when today I presented the webdesign to my client and she showed me many JS errors in the console. I could not believe since I did only change the CSS and images. My client's company is full of programmer but none of them are designers that's why they told me to recreate the design. I am a webdesigner and have really few knowledge in JS so I have no idea how to fix the errors since my client told me it was my responsability and I should fix it by myself.

I can see actually 30 error messages but most of them are the same, changing only the name of the class. For example:

Could not find selector $(".criacao-site") on 389th line at sitepor500.com.br in debugger mode.

OR

Could not find selector $(".florianopolis > site") on 1705th line at sitepor500.com.br in debugger mode.

What does this mean? Could I really break a JS code only changing the images and the CSS? I swear I did not change any HTML and JS only the styles of elements, name of classes, images...