restructuring code from tests with jquery no conflict; creating local version of jquery in var  to use in widget