Moving anonymous function closure to wrap entire plugin, attaching plugin object to the window object to make available outside of closure.