Added jquery view events, and added map preview to _main.js

If this line is not needed, lets delete it.