took javascript references out of views and put them into application layouts. Does not work on local machine.