modify javascript loading to Rails Way while fixing jqueryujs bug -- redo