Place embed code in javascript function