Adding template and jQuery