
FB.copy('XD',{_origin:null,_transport:null,_callbacks:{},init:function(){if(FB.XD._origin){return;}
FB.XD._origin=(window.location.protocol+'//'+
window.location.host+'/'+
FB.guid());if(window.addEventListener&&window.postMessage){FB.XD.PostMessage.init();FB.XD._transport='postmessage';}else if(FB.Flash.hasMinVersion()){FB.XD.Flash.init();FB.XD._transport='flash';}else{FB.XD._transport='fragment';}},handler:function(cb,relation){FB.XD.init();var
xdProxy=FB._domain.cdn+'connect/xd_proxy.php#?=&',id=FB.guid();if(FB.XD._transport=='fragment'){xdProxy=window.location.toString();var poundIndex=xdProxy.indexOf('#');if(poundIndex>0){xdProxy=xdProxy.substr(0,poundIndex);}
xdProxy+='?&fb_xd_bust#?=&'+FB.XD.Fragment._magic;}
FB.XD._callbacks[id]=cb;return xdProxy+FB.QS.encode({cb:id,origin:FB.XD._origin,relation:relation||'opener',transport:FB.XD._transport});},recv:function(data){if(typeof data=='string'){data=FB.QS.decode(data);}
var cb=FB.XD._callbacks[data.cb];delete FB.XD._callbacks[data.cb];cb&&cb(data);},PostMessage:{init:function(){var H=FB.XD.PostMessage.onMessage;window.addEventListener?window.addEventListener('message',H,false):window.attachEvent('onmessage',H);},onMessage:function(event){FB.XD.recv(event.data);}},Flash:{init:function(){FB.Flash.onReady(function(){document.XdComm.postMessage_init('FB.XD.Flash.onMessage',FB.XD._origin);});},onMessage:function(message){FB.XD.recv(decodeURIComponent(message));}},Fragment:{_magic:'fb_xd_fragment;',checkAndDispatch:function(){var
loc=window.location.toString(),fragment=loc.substr(loc.indexOf('#')+1),magicIndex=fragment.indexOf(FB.XD.Fragment._magic);if(magicIndex>0){FB.init=FB.getLoginStatus=FB.api=function(){};document.body.style.display='none';fragment=fragment.substr(magicIndex+FB.XD.Fragment._magic.length);var params=FB.QS.decode(fragment);window[params.relation].FB.XD.recv(fragment);}}}});FB.XD.Fragment.checkAndDispatch();
