only a small part is a copy. Both have some differences. The jquery code doesn't make it nice to work with. There is no real view encapsulation and most of the code use variables from the javascript scope implicitly. Will check to refactor at least the popup handling part.