__twttrlr(function(using, provide, loadrunner, define) {provide("tfw/util/env",function(e){using("util/params",function(t){function r(){var e=36e5,r=t.combined(document.location)._;return n!==undefined?n:(n=!1,r&&/^\d+$/.test(r)&&(n=+(new Date)-parseInt(r)<e),n)}var n;e({isDynamicWidget:r})})});
provide("xd/detection",function(e){function t(){try{return!!navigator.plugins["Shockwave Flash"]||!!(new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))}catch(e){return!1}}e({getFlashEnabled:t,hasPostMessage:!!window.postMessage,isIE:!!navigator.userAgent.match("MSIE")})});
provide("util/widgetrpc",function(e){using("xd/detection","tfw/util/env",function(t,n){function l(){if(s)return s;if(!n.isDynamicWidget())return;var e=0,r=parent.frames.length,o;try{s=parent.frames[i];if(s)return s}catch(u){}if(!t.isIE)return;for(;e<r;e++)try{o=parent.frames[e];if(o&&typeof o.openIntent=="function")return s=o}catch(u){}}function c(){var e={};(typeof arguments[0]).toLowerCase()==="function"?e.success=arguments[0]:e=arguments[0];var t=e.success||function(){},r=e.timeout||function(){},i=e.nohub||function(){},s=e.complete||function(){},h=e.attempt!==undefined?e.attempt:f;if(!n.isDynamicWidget()||o)return i(),s(),!1;var p=l();h--;try{if(p&&p.trigger){t(p),s();return}}catch(d){}if(h<=0){o=!0,r(),s();return}if(+(new Date)-u>a*f){o=!0,i();return}window.setTimeout(function(){c({success:t,timeout:r,nohub:i,attempt:h,complete:s})},a)}var r="twttrHubFrameSecure",i=document.location.protocol=="http:"?"twttrHubFrame":r,s,o,u=+(new Date),a=100,f=20;e({withHub:c,contextualHubId:i,secureHubId:r})})});
provide("xd/jsonrpc",function(e){using("util/util","util/events",function(t,n){function i(e){this.con=e}function s(){this.id=s.id++}function o(){e(function(e){return new i(e)})}var r=function(e){return JSON&&JSON.parse?JSON.parse(e):JSON&&JSON.decode?JSON.decode(e):(new Function("return "+e))()};t.aug(i.prototype,{expose:function(e){this.con.bind("message",this._handleRequest(e))},call:function(e){var t=this;this._requests||(this._requests={},this.con.bind("message",function(e){var n;try{e=r(e)}catch(i){return}if(!e.callback)return;typeof e.id=="number"&&(n=t._requests[e.id])&&(e.error?n.trigger("error",e):n.trigger("success",e),delete t._requests[e.id])}));var n=new s;return this._requests[n.id]=n,n.send(this.con,e,Array.prototype.slice.call(arguments,1))},_handleRequest:function(e){var t=this;return function(i){var s,o;try{i=r(i)}catch(u){return}if(i.callback)return;typeof i.id=="number"&&typeof e[i.method]=="function"&&(o=t._responseCallbacks(i.id),s=e[i.method].apply(e,i.params.concat(o)),typeof s!="undefined"&&o[0](s))}},_responseCallbacks:function(e){var t=this.con;return[function(r){t.send(JSON.stringify({id:e,result:r,callback:!0}))},function n(n){t.send(JSON.stringify({id:e,error:n,callback:!0}))}]}}),s.id=0,t.aug(s.prototype,n.Emitter,{send:function(e,t,n){return e.send(JSON.stringify({id:this.id,method:t,params:n})),this},success:function(e){return this.bind("success",e),this},error:function(e){return this.bind("error",e),this}}),typeof JSON=="undefined"?using("$xd/json2.js",function(){o()}):o()})});
provide("xd/flash",function(e){function t(e,t){var n=t||Math.floor(Math.random()*100),r=['<object id="xdflashshim'+n+'" name="xdflashshim'+n+'"','type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"','width="1" height="1" style="position:absolute;left:-9999px;top:-9999px;">','<param name="movie" value="'+e+"&debug="+window.__XDDEBUG__+'"/>','<param name="wmode" value="window"/>','<param name="allowscriptaccess" value="always"/>',"</object>"].join(" ");return r}e({object:t})});
provide("xd/base",function(e){using("util/util","util/events",function(t,n){function r(){}t.aug(r.prototype,n.Emitter,{transportMethod:"",init:function(){},send:function(e){var t;this._ready?this._performSend(e):t=this.bind("ready",function(){this.unbind("ready",t),this._performSend(e)})},ready:function(){this.trigger("ready",this),this._ready=!0},isReady:function(){return!!this._ready},receive:function(e){this.trigger("message",e)}}),e({Connection:r})})});
provide("xd/parent",function(e){using("xd/base","util/util","xd/detection",function(t,n,r){function u(e){var t=[];for(var n in e)t.push(n+"="+e[n]);return t.join(",")}function a(){}var i="__ready__",s=0,o;a.prototype=new t.Connection,n.aug(a.prototype,{_createChild:function(){this.options.window?this._createWindow():this._createIframe()},_createIframe:function(){var e={allowTransparency:!0,frameBorder:"0",scrolling:"no",tabIndex:"0",name:this._name()},t,i,s,u=n.aug(n.aug({},e),this.options.iframe);window.postMessage?(o||(o=document.createElement("iframe")),t=o.cloneNode(!1)):t=document.createElement('<iframe name="'+u.name+'">'),t.id=u.name;for(var a in u)a!="style"&&t.setAttribute(a,u[a]);var f=t.getAttribute("style");f&&typeof f.cssText!="undefined"?f.cssText=u.style:t.style.cssText=u.style;var l=this,c=function(){l.child=t.contentWindow,l._ready||l.init()};if(!t.addEventListener){var h=!1;t.attachEvent("onload",function(){if(h)return;h=!0,c()})}else t.addEventListener("load",c,!1);t.src=this._source(),(i=this.options.appendTo)?i.appendChild(t):(s=this.options.replace)?(i=s.parentNode,i&&i.replaceChild(t,s)):document.body.insertBefore(t,document.body.firstChild),r.isIE&&this.transportMethod&&this.transportMethod==="Flash"&&(t.src=t.src)},_createWindow:function(){var e={width:550,height:450,personalbar:"0",toolbar:"0",scrollbars:"1",resizable:"1"},t,r,i,s=n.aug(n.aug({},e),this.options.window),o=screen.width,a=screen.height;s.left=s.left||Math.round(o/2-s.width/2),s.top=s.top||Math.round(a/2-s.height/2),a<s.height&&(s.top=0,s.height=a);var f=this._name();t=window.open(this._source(),f,u(s)),t&&t.focus(),this.child=t,this.init()},_source:function(){return this.options.src},_name:function(){var e="_xd_"+s++;return window.parent&&window.parent!=window&&window.name&&(e=window.name+e),e}});var f=function(e){this.transportMethod="PostMessage",this.options=e,this._createChild()};f.prototype=new a,n.aug(f.prototype,{init:function(){function t(t){t.source===e.child&&(!e._ready&&t.data===i?e.ready():e.receive(t.data))}var e=this;window.addEventListener?window.addEventListener("message",t,!1):window.attachEvent("onmessage",t)},_performSend:function(e){this.child.postMessage(e,this.options.src)}});var l=function(e){this.transportMethod="Flash",this.options=e,this.token=Math.random().toString(16).substring(2),this._setup()};l.prototype=new a,n.aug(l.prototype,{_setup:function(){var e=this;using("xd/flash",function(t){window["__xdcb"+e.token]={receive:function(t){!e._ready&&t===i?e.ready():e.receive(t)},loaded:function(){}};var n=document.createElement("div");n.innerHTML=t.object("https://tfw-current.s3.amazonaws.com/xd/ft.swf?&token="+e.token+"&parent=true&callback=__xdcb"+e.token+"&xdomain="+e._host(),e.token),document.body.insertBefore(n,document.body.firstChild),e.proxy=n.firstChild,e._createChild()})},init:function(){},_performSend:function(e){this.proxy.send(e)},_host:function(){return this.options.src.replace(/https?:\/\//,"").split(/(:|\/)/)[0]},_source:function(){return this.options.src+(this.options.src.match(/\?/)?"&":"?")+"xd_token="+escape(this.token)}});var c=function(e){this.transportMethod="Fallback",this.options=e,this._createChild()};c.prototype=new a,n.aug(c.prototype,{init:function(){},_performSend:function(e){}}),e({connect:function(e){var t;return r.hasPostMessage?r.isIE&&e.window?r.getFlashEnabled()&&(t=new l(e)):t=new f(e):r.isIE&&r.getFlashEnabled()&&(t=new l(e)),t||(t=new c(e)),t}})})});
provide("tfw/hub/client",function(e){using("xd/parent","xd/jsonrpc","tfw/widget/base","util/widgetrpc",function(t,n,r,i){function s(e,i){var s=t.connect({src:e,iframe:{name:i,style:"position:absolute;top:-9999em;width:10px;height:10px"}});return n(s).expose({trigger:function(e,t,n){t=t||{};var i=t.region;delete t.region,twttr.events.trigger(e,{target:r.find(n),data:t,region:i,type:e})},initXPHub:function(){u(twttr.widgets.config,!0)}}),s}function o(e){return e?i.secureHubId:i.contextualHubId}function u(e,t){var n=e.assetUrl(t)+"/widgets/hub.html",r=o(t);if(document.getElementById(r))return;return s(n,r)}function a(e,r){var i=t.connect({window:{width:550,height:450},src:e});n(i).expose({trigger:function(e,t){twttr.events.trigger(e,{target:r,region:"intent",type:e,data:t})}})}e({init:u,openIntent:a})})})});