add jquery to targ_rep, rewrite javascript