embed functions js