A port of jQuery post message plug-in from http://benalman.com/projects/jquery-postmessage-plugin/