creates function for script for easier manipulation of JS.  Adds unique canvas id in case multiple exist on page.  Adds $transurl and $transient_key as class variables.