The reason I wanted to do this because I feel that the menus, buttons which come together with krpano package is quite not-good-looking and not easy to customize.
They are pretty easy to modify, IMO. Just create your own buttons, etc, which you would have to do anyway, and use those instead of stock versions. Everything else can be accomplished by modifying the template file(s). In the end, I think you would find that easier than what you are contemplating and you would have guaranteed compatibility.
Also, consider some of the custom templates available elsewhere on