On your question #2..
The two language that you wrote are just a scripting language that will run on a client side (Browser Side)
Web Application are commonly compose of common approach (Client --> Server)
for server side application, if you want free go to PHP but if you have money and you can pay go to asp.net
Server side application process on the server side when it is needed to process information that is came from the client such as saving information you get from the client to a database
If you use PHP use mysql as your database server or if asp.net go to MSSQL.
For your question #1 thee is a counterpart code for jquery and its more easy to implement please google jquery colorbox