fixed default button colour in iOS 7
added staticOffsetBlock, and fixed message deallocation
fixed bugs with the events not fired correctly when popup/popdown occurs