(function(e){"use strict";if(typeof define==="function"&&define.amd){define(["jquery"],e)}else{e(window.jQuery)}})(function(p){"use strict";var t=0,c=["accepts","cache","contents","contentType","crossDomain","data","dataType","headers","ifModified","mimeType","password","processData","timeout","traditional","type","url","username"],e=function(e){return e};p.ajaxSetup({converters:{"postmessage text":e,"postmessage json":e,"postmessage html":e}});p.ajaxTransport("postmessage",function(s){if(s.postMessage&&window.postMessage){var i,e=p("<a>").prop("href",s.postMessage)[0],r=e.protocol+"//"+e.host,d=s.xhr().upload;return{send:function(e,n){t+=1;var a={id:"postmessage-transport-"+t},o="message."+a.id;i=p('<iframe style="display:none;" src="'+s.postMessage+'" name="'+a.id+'"></iframe>').bind("load",function(){p.each(c,function(e,t){a[t]=s[t]});a.dataType=a.dataType.replace("postmessage ","");p(window).bind(o,function(e){e=e.originalEvent;var t=e.data,s;if(e.origin===r&&t.id===a.id){if(t.type==="progress"){s=document.createEvent("Event");s.initEvent(t.type,false,true);p.extend(s,t);d.dispatchEvent(s)}else{n(t.status,t.statusText,{postmessage:t.result},t.headers);i.remove();p(window).unbind(o)}}});i[0].contentWindow.postMessage(a,r)}).appendTo(document.body)},abort:function(){if(i){i.remove()}}}}})});