JS init function changed to jQuery

JS initialization stopped working on deals detail. jQuery initialization fix that.
Also:
* Deal dates are formatted at datatable
* Click on popovers doesn't skip to the top of the page.
* JS functions are commented so it is easier to find out what they do.