refactor 3 level linkage with jquery ui