You are on page 1of 35

/*

HTTP Host: static.ak.fbcdn.net


Generated: October 8th 2010 4:02:18 PM PDT
Machine: 10.138.16.185
*/

if (window.CavalryLogger)
{ CavalryLogger.start_js(["js\/7z5eqkor2t8g884k.pkg.js"]); }

function object(b){var a=new Function();a.prototype=b;return new a();}function


is_scalar(a){return /string|number|boolean/.test(typeof a);}function keys(c)
{if(hasArrayNature(c))throw new TypeError('keys() was passed an array.');var
b=[];for(var a in c)b.push(a);return b;}function values(b)
{if(hasArrayNature(b))throw new TypeError('values() was passed an array; use
$A().');var c=[];for(var a in b)c.push(b[a]);return c;}function count(c)
{if(hasArrayNature(c))throw new TypeError('count() was passed an array.');var
a=0;for(var b in c)a++;return a;}function are_equal(a,b){return
JSON.encode(a)==JSON.encode(b);}function merge(){var b={};for(var
a=0;a<arguments.length;a++)copy_properties(b,arguments[a]);return b;}function
head(b){for(var a in b)return b[a];return null;}Object.from=function(c,e){if(!
hasArrayNature(c))throw new TypeError('Must pass an array of keys.');var d={};var
b=hasArrayNature(e);if(typeof e=='undefined')e=true;for(var
a=c.length;a--;)d[c[a]]=b?e[a]:e;return d;};function coalesce(){for(var
a=0;a<arguments.length;++a)if(arguments[a]!=null)return arguments[a];return null;}
Array.prototype.map=function(a,e){if(this==window)throw new
TypeError();if(typeof(a)!=="function")throw new TypeError();var b;var
c=this.length;var d=new Array(c);for(b=0;b<c;++b)if(b in
this)d[b]=a.call(e,this[b],b,this);return d;};Array.prototype.forEach=function(a,b)
{this.map(a,b);return this;};Array.prototype.each=function(a,b){return
this.forEach.apply(this,arguments);};Array.prototype.filter=function(a,e){a=a||
identity;if(this==window)throw new TypeError();if(typeof(a)!=="function")throw new
TypeError();var b,f,c=this.length,d=[];for(b=0;b<c;++b)if(b in this)
{f=this[b];if(a.call(e,f,b,this))d.push(f);}return
d;};Array.prototype.every=function(a,b){return
(this.filter(a,b).length==this.length);};Array.prototype.some=function(a,b){return
(this.filter(a,b).length>0);};Array.prototype.pull=function(b)
{if(this==window)throw new TypeError();if(typeof(b)=='string'){var c=b;b=function()
{return this[c];};}if(typeof(b)!=='function')throw new TypeError();var
a=Array.prototype.slice.call(arguments,1);var e=this.length;var f=new
Array(e);for(var d=0;d<e;++d)if(d in this)f[d]=b.apply(this[d],a);return
f;};Array.prototype.reduce=null;Array.prototype.reduceRight=null;Array.prototype.so
rt=(function(a){return function(b){return (this==window)?null:(b?
a.call(this,function(c,d){return b(c,d);}):a.call(this));};})
(Array.prototype.sort);Array.prototype.reverse=(function(a){return function()
{return (this==window)?null:a.call(this);};})
(Array.prototype.reverse);Array.prototype.concat=(function(a){return function()
{return (this==window)?null:a.apply(this,arguments);};})
(Array.prototype.concat);Array.prototype.slice=(function(a){return function()
{return (this==window)?null:a.apply(this,arguments);};})
(Array.prototype.slice);Array.prototype.clone=Array.prototype.slice;if(Array.protot
ype.indexOf){Array.prototype.indexOf=(function(a){return function(c,b){return
(this==window)?null:a.apply(this,arguments);};})(Array.prototype.indexOf);}else
Array.prototype.indexOf=function(d,b){if(this==window)throw new TypeError();var
c=this.length;var a=Number(b)||0;a=(a<0)?
Math.ceil(a):Math.floor(a);if(a<0)a+=c;for(;a<c;a++)if(a in
this&&this[a]===d)return a;return -1;};Array.prototype.contains=function(a){return
this.indexOf(a)!=-1;};Array.prototype.remove=function(b){var
a=this.indexOf(b);if(a!=-1)this.splice(a,1);};function mapToInt(a){return
a.map(function(c,b){return parseInt(c,10);});}function unique(a){var c={};var
d=[];for(var b=0;b<a.length;b++){var e=a[b];if(!c[e])d.push(e);c[e]=1;}return
d;}function array_set_add(a,b){if(!a.contains(b))a.push(b);return a;}function
array_intersect(a,b){var d=[];for(var c=0;c<a.length;c+
+)if(b.contains(a[c]))d.push(a[c]);return d;}
function muffinize(d){var c='a';var b='d';var a=[c,b].join('');return
d.replace(/muffin/g,a);}var Util=window.Util||{isDevelopmentEnvironment:function()
{return
env_get('dev');},warn:bagofholding,error:bagofholding,info:bagofholding,group:bagof
holding,groupEnd:bagofholding,dir:bagofholding,log:bagofholding,stack:bagofholding,
trace:bagofholding,slog:bagofholding};if(typeof
console=='undefined')console={log:bagofholding};
function URI(a){if(a===window)return;if(this===window)return new URI(a||
window.location.href);this.parse(a||'');}copy_properties(URI,
{getRequestURI:function(a,b){a=a===undefined||
a;if(a&&window.PageTransitions&&PageTransitions.isInitialized()){return
PageTransitions.getCurrentURI(!!b).getQualifiedURI();}else return new
URI(window.location.href);},getMostRecentURI:function()
{if(window.PageTransitions&&PageTransitions.isInitialized()){return
PageTransitions.getMostRecentURI().getQualifiedURI();}else return new
URI(window.location.href);},expression:/(((\w+):\/\/)([^\/:]*)(:(\d+))?)?([^#?]*)
(\?([^#]*))?(#(.*))?/,arrayQueryExpression:/^(\w+)((?:\[\w*\])+)=?
(.*)/,explodeQuery:function(g){if(!g)return {};var
h={};g=g.replace(/%5B/ig,'[').replace(/%5D/ig,']');g=g.split('&');for(var
b=0,d=g.length;b<d;b++){var e=g[b].match(URI.arrayQueryExpression);if(!e){var
j=g[b].split('=');h[URI.decodeComponent(j[0])]=j[1]===undefined?
null:URI.decodeComponent(j[1]);}else{var c=e[2].split(/\]\[|\[|\]/).slice(0,-1);var
f=e[1];var k=URI.decodeComponent(e[3]||'');c[0]=f;var i=h;for(var a=0;a<c.length-
1;a++)if(c[a]){if(i[c[a]]===undefined)if(c[a+1]&&!c[a+1].match(/\d+$/))
{i[c[a]]={};}else i[c[a]]=[];i=i[c[a]];}else{if(c[a+1]&&!c[a+1].match(/\d+$/))
{i.push({});}else i.push([]);i=i[i.length-1];}if(i instanceof Array&&c[c.length-
1]==''){i.push(k);}else i[c[c.length-1]]=k;}}return
h;},implodeQuery:function(f,e,a){e=e||'';if(a===undefined)a=true;var
g=[];if(f===null||f===undefined){g.push(a?URI.encodeComponent(e):e);}else if(f
instanceof Array){for(var c=0;c<f.length;++c)try{if(f[c]!
==undefined)g.push(URI.implodeQuery(f[c],e?(e+'['+c+']'):c));}catch(b){}}else
if(typeof(f)=='object'){if(DOM.isNode(f)){g.push('{node}');}else for(var d in
f)try{if(f[d]!==undefined)g.push(URI.implodeQuery(f[d],e?
(e+'['+d+']'):d));}catch(b){}}else if(a){g.push(URI.encodeComponent(e)
+'='+URI.encodeComponent(f));}else g.push(e+'='+f);return
g.join('&');},encodeComponent:function(d){var c=String(d).split(/([\[\]])/);for(var
a=0,b=c.length;a<b;a+=2)c[a]=window.encodeURIComponent(c[a]);return
c.join('');},decodeComponent:function(a){return
window.decodeURIComponent(a.replace(/\+/g,' '));}});copy_properties(URI.prototype,
{parse:function(b){var a=b.toString().match(URI.expression);copy_properties(this,
{protocol:a[3]||'',domain:a[4]||'',port:a[6]||'',path:a[7]||'',query_s:a[9]||'',fra
gment:a[11]||''});return this;},setProtocol:function(a){this.protocol=a;return
this;},getProtocol:function(){return this.protocol;},setQueryData:function(a)
{this.query_s=URI.implodeQuery(a);return this;},addQueryData:function(a){return
this.setQueryData(copy_properties(this.getQueryData(),a));},removeQueryData:functio
n(b){if(!(b instanceof Array))b=[b];var d=this.getQueryData();for(var
a=0,c=b.length;a<c;++a)delete d[b[a]];return
this.setQueryData(d);},getQueryData:function(){return
URI.explodeQuery(this.query_s);},setFragment:function(a){this.fragment=a;return
this;},getFragment:function(){return this.fragment;},setDomain:function(a)
{this.domain=a;return this;},getDomain:function(){return
this.domain;},setPort:function(a){this.port=a;return this;},getPort:function()
{return this.port;},setPath:function(a){this.path=a;return
this;},getPath:function(){return
this.path.replace(/^\/+/,'/');},toString:function(){var
a='';this.protocol&&(a+=this.protocol+'://');this.domain&&(a+=this.domain);this.por
t&&(a+=':'+this.port);if(this.domain&&!
this.path)a+='/';this.path&&(a+=this.path);this.query_s&&(a+='?'+this.query_s);this
.fragment&&(a+='#'+this.fragment);return a;},valueOf:function(){return
this.toString();},isFacebookURI:function(){if(!
URI._facebookURIRegex)URI._facebookURIRegex=new RegExp('(^|\.)facebook\.
('+env_get('tlds').join('|')+')([^.]*)$','i');return !this.domain||
URI._facebookURIRegex.test(this.domain);},isQuicklingEnabled:function(){return
window.Quickling&&Quickling.isActive()&&Quickling.isPageActive(this);},getRegistere
dDomain:function(){if(!this.domain)return '';if(!this.isFacebookURI())return
null;var b=this.domain.split('.');var a=b.indexOf('facebook');return
b.slice(a).join('.');},getTld:function(f){if(!this.domain)return '';var
d=this.domain.split('.');var e=d[d.length-1];if(f)return e;var
c=env_get('tlds');if(c.indexOf(e)==-1)for(var a=0;a<c.length;++a){var b=c[a];if(new
RegExp(b+'$').test(this.domain)){e=b;break;}}return
e;},getUnqualifiedURI:function(){return new
URI(this).setProtocol(null).setDomain(null).setPort(null);},getQualifiedURI:functio
n(){var b=new URI(this);if(!b.getDomain()){var
a=URI();b.setProtocol(a.getProtocol()).setDomain(a.getDomain()).setPort(a.getPort()
);}return b;},isSameOrigin:function(a){var b=a||window.location.href;if(!(b
instanceof URI))b=new URI(b.toString());if(this.getProtocol()&&this.getProtocol()!
=b.getProtocol())return false;if(this.getDomain()&&this.getDomain()!
=b.getDomain())return false;return true;},go:function(a)
{goURI(this,a);},setSubdomain:function(b){var c=new URI(this).getQualifiedURI();var
a=c.getDomain().split('.');if(a.length<=2){a.unshift(b);}else a[0]=b;return
c.setDomain(a.join('.'));},getSubdomain:function(){if(!this.getDomain())return
'';var a=this.getDomain().split('.');if(a.length<=2){return '';}else return
a[0];},isSecure:function(){return this.getProtocol()=='https';}});
window.aiert=(function(a){var b=function _aiert(c){if(window.last_alert)
{(window.alerts=window.alerts||[]).push((new Date()).getTime()-
window.last_alert);window.alerts.splice(0,window.alerts.length-
3);if(window.alerts.length==3&&window.alerts[0]+window.alerts[1]+window.alerts[2]<2
00){if(!confirm(c+'\n\nThis page may be caught in an infinite loop. Press "Cancel"
to abort, or "Ok" to continue.'))window.aiert=bagofholding;window.last_alert=(new
Date()).getTime();return;}}a(c);window.last_alert=(new Date()).getTime();};return
b;})(window.alert);window.alert=function _alert(a){if(typeof a!='undefined'){new
Image().src=URI('/ajax/typeahead_callback.php').addQueryData({l:document.location.h
ref,m:a,t:Env&&Math.round((new Date()-Env.start)/100),d:typeof fbpd!='undefined'?
JSON.encode(fbpd):'',ai:window.aiert,al:window.alert}).toString();return
window.aiert(a);}};
window.onloadRegister=function(a){window.loaded?
_runHook(a):_addHook('onloadhooks',a);};function onafterloadRegister(a)
{window.afterloaded?setTimeout(function()
{_runHook(a);},0):_addHook('onafterloadhooks',a);}function _onloadHook(){!
window.loaded&&window.CavalryLogger&&CavalryLogger.getInstance().setTimeStamp('t_pr
ehooks');_runHooks('onloadhooks');!
window.loaded&&window.CavalryLogger&&CavalryLogger.getInstance().setTimeStamp('t_ho
oks');window.loaded=true;Arbiter.inform('uipage_onload',true,Arbiter.BEHAVIOR_STATE
);if(window.logOnloadData)aggregate_js_onload('onloadRegister');}function
_onafterloadHook()
{_runHooks('onafterloadhooks');window.afterloaded=true;if(window.logOnloadData)aggr
egate_js_onload('onafterloadRegister');}function _runHook(b){try{b();}catch(a)
{}}function _runHooks(d){var f=d=='onbeforeleavehooks'||
d=='onbeforeunloadhooks';var h=null;if(window.logOnloadData){var g=new
Date().getTime();window.totalHookTime=window.totalHookTime||{};}do{var
c=window[d];if(!f)window[d]=null;if(!c)break;for(var e=0;e<c.length;e++)try{if(f)
{h=h||c[e]();}else c[e]();}catch(b)
{}if(f)break;}while(window[d]);if(window.logOnloadData){var a=new
Date().getTime();window.totalHookTime[d]=a-g;}if(f&&h)return h;}function
keep_window_set_as_loaded(){if(window.loaded==false)
{window.loaded=true;_runHooks('onloadhooks');}if(window.afterloaded==false)
{window.afterloaded=true;_runHooks('onafterloadhooks');}}function
log_js_onload(b,d,c){window.logOnloadData=window.logOnloadData||
{};window.logOnloadData[b]=window.logOnloadData[b]||{};var
a=window.logOnloadData[b];if(a[c]){a[c].count+
+;a[c].total_time+=d;}else{a[c]={};a[c]={count:1,total_time:d};}}function
aggregate_js_onload(d){var c=window.logOnloadData[d];var a=[];var f=0;for(var e in
c){f+=c[e].total_time;a.push(parseInt(c[e].total_time,10)+'ms :
'+parseInt(c[e].count,10)+' calls : '+e.replace('Task_','(Task) '));}if(!
a.length)return;a.sort().reverse();var b;if(d=='onloadRegister')
{b='onloadhooks';}else b='onafterloadhooks';a.each(function(g)
{});window.logOnloadData[d]={};}Arbiter.registerCallback(_onloadHook,
[OnloadEvent.ONLOAD_DOMCONTENT_CALLBACK,InitialJSLoader.INITIAL_JS_READY]);Arbiter.
registerCallback(_onafterloadHook,
[OnloadEvent.ONLOAD_DOMCONTENT_CALLBACK,OnloadEvent.ONLOAD_CALLBACK,InitialJSLoader
.INITIAL_JS_READY]);Arbiter.subscribe(OnloadEvent.ONBEFOREUNLOAD,function(b,a)
{a.warn=_runHooks('onbeforeleavehooks')||_runHooks('onbeforeunloadhooks');if(!
a.warn)
{window.loaded=false;window.afterloaded=false;}},Arbiter.SUBSCRIBE_NEW);Arbiter.sub
scribe(OnloadEvent.ONUNLOAD,function(b,a)
{_runHooks('onunloadhooks');},Arbiter.SUBSCRIBE_NEW);
function chain(d,e){var b,a=[];for(var c=0;c<arguments.length;c+
+)a.push(arguments[c]);b=function(event){event=event||window.event;for(var
f=0;f<a.length;f++)if(a[f]&&a[f].apply(this,arguments)===false){return false;}else
if(event&&event.cancelBubble)return true;return true;};b.toString=function(){return
chain._toString(a);};return b;}if(!chain._toString)chain._toString=function(b){var
d='chained fns',a=b.filter();for(var c=0;c<b.length;c+
+)d+='\n'+b[c].toString();return d;};
void(0);
function HTML(a){if(this===window){if(a instanceof HTML)return a;return new
HTML(a);}this._content=a;this._defer=false;this._extra_action='';this._nodes=null;t
his._inline_js=bagofholding;this._has_option_elements=false;return
this;}copy_properties(HTML.prototype,{toString:function(){var
a=this._content;if(this._extra_action)a+='<script
type="text/javascript">'+this._extra_action+'</scr'+'ipt>';return
a;},setAction:function(a){this._extra_action=a;return this;},getAction:function()
{this._fillCache();var a=function()
{this._inline_js();eval_global(this._extra_action);}.bind(this);if(this.getDeferred
()){return a.defer.bind(a);}else return a;},setDeferred:function(a){this._defer=!!
a;return this;},getDeferred:function(){return this._defer;},getContent:function()
{return this._content;},getNodes:function(){this._fillCache();return
this._nodes;},getRootNode:function(){return this.getNodes()
[0];},hasOptionElements:function(){this._fillCache();return
this._has_option_elements;},_fillCache:function(){if(null!==this._nodes)return;var
d=this._content;if(!d){this._nodes=[];return;}d=d.replace(/(<(\w+)
[^>]*?)\/>/g,function(l,m,n){return n.match(/^(abbr|br|col|img|input|link|meta|
param|hr|area|embed)$/i)?l:m+'></'+n+'>';});var
h=d.trim().toLowerCase(),k=document.createElement('div'),b=false;var j=(!
h.indexOf('<opt')&&[1,'<select multiple="multiple"
class="__WRAPPER">','</select>'])||(!h.indexOf('<leg')&&[1,'<fieldset
class="__WRAPPER">','</fieldset>'])||(h.match(/^<(thead|tbody|tfoot|colg|
cap)/)&&[1,'<table class="__WRAPPER">','</table>'])||(!
h.indexOf('<tr')&&[2,'<table><tbody class="__WRAPPER">','</tbody></table>'])||((!
h.indexOf('<td')||!h.indexOf('<th'))&&[3,'<table><tbody><tr
class="__WRAPPER">','</tr></tbody></table>'])||(!
h.indexOf('<col')&&[2,'<table><tbody></tbody><colgroup
class="__WRAPPER">','</colgroup></table>'])||null;if(null===j)
{k.className='__WRAPPER';if(ua.ie()){j=[0,'<span
style="display:none">&nbsp;</span>',''];b=true;}else
j=[0,'',''];}k.innerHTML=j[1]+d+j[2];while(j[0]--)k=k.lastChild;if(b)k.removeChild(
k.firstChild);k.className!='__WRAPPER';if(0!
=k.getElementsByTagName('option').length)this._has_option_elements=true;if(ua.ie())
{var i;if(!h.indexOf('<table')&&-1==h.indexOf('<tbody'))
{i=k.firstChild&&k.firstChild.childNodes;}else if(j[1]=='<table>'&&-
1==h.indexOf('<tbody')){i=k.childNodes;}else i=[];for(var f=i.length-1;f>=0;--
f)if(i[f].nodeName&&i[f].nodeName.toLowerCase()=='tbody'&&i[f].childNodes.length==0
)i[f].parentNode.removeChild(i[f]);}var g=k.getElementsByTagName('script');var
a=[];for(var e=0;e<g.length;e++)if(g[e].src)
{a.push(Bootloader.requestResource.bind(Bootloader,'js',g[e].src));}else
a.push(eval_global.bind(null,g[e].innerHTML));for(var e=g.length-
1;e>=0;e--)g[e].parentNode.removeChild(g[e]);var c=function(){for(var
l=0;l<a.length;l++)a[l]();};this._nodes=$A(k.childNodes);this._inline_js=c;}});
var DOM={find:function(a,c){var b=DOM.scry(a,c);if(1!=b.length)return null;return
b[0];},scry:function(j,v){var w=v.split(' ');var d=[j||document];var
i=d[0]==document;for(var m=0;m<w.length;m++)
{if(d.length==0)break;if(w[m]=='')continue;var u=w[m];var s=[];var
zd=false;if(u.charAt(0)=='^')if(m==0){zd=true;u=u.slice(1);}else
return;u=u.replace(/\./g,' .');u=u.replace(/\#/g,' #');u=u.replace(/\[/g,' [');var
z=u.split(' ');var za=z[0]||'*';var n=z[1]&&z[1].charAt(0)=='#';if(n){var
h=ge(z[1].slice(1),true);if(h&&('*'==za||h.tagName.toLowerCase()==za))for(var
q=0;q<d.length;q++)if(zd&&DOM.contains(h,d[q])){s=[h];break;}else
if(document==d[q]||DOM.contains(d[q],h)){s=[h];break;}}else{var zc=[];var
c=d.length;for(var o=0;o<c;o++){if(zd){var k=[];var g=d[o].parentNode;var
a=za=='*';while(DOM.isNode(g,DOM.NODE_TYPES.ELEMENT)){if(a||
g.tagName.toLowerCase()==za)k.push(g);g=g.parentNode;}}else var
k=d[o].getElementsByTagName(za);var l=k.length;for(var r=0;r<l;r+
+)zc.push(k[r]);}for(var x=1;x<z.length;x++){var y=z[x];var p=y.charAt(0)=='.';var
e=y.substring(1);for(var o=0;o<zc.length;o++){var zb=zc[o];if(!zb)continue;if(p)
{if(!CSS.hasClass(zb,e))delete zc[o];continue;}else{var f=y.slice(1,y.length-
1);if(f.indexOf('=')==-1){if(zb.getAttribute(f)===null){delete
zc[o];continue;}}else{var t=f.split('=');var b=t[0];var
ze=t[1];ze=ze.slice(1,ze.length-1);if(zb.getAttribute(b)!=ze){delete
zc[o];continue;}}}}}for(var o=0;o<zc.length;o++)if(zc[o])
{s.push(zc[o]);if(zd)break;}}d=s;}return d;},getText:(function(){var
a=document.createElement('div'),b=a.innerText==null?'textContent':'innerText';retur
n function(c){if(!c){return '';}else if(DOM.isNode(c,DOM.NODE_TYPES.TEXT)){return
c.data;}else return c[b];};})(),getSelection:function(){var
b=window.getSelection,a=document.selection;if(b){return b()+'';}else if(a)return
a.createRange().text;return null;},create:function(c,a,b)
{c=document.createElement(c);if(a){a=copy_properties({},a);if(a.style)
{copy_properties(c.style,a.style);delete a.style;}for(var d in
a)if(d.toLowerCase().indexOf('on')==0){if(!(typeof a[d]!
='function'))if(window.Event&&Event.listen){Event.listen(c,d.substr(2),a[d]);}else
c[d]=a[d];delete a[d];}copy_properties(c,a);}if(b!
=undefined)DOM.setContent(c,b);return c;},prependContent:function(c,b){if(!
DOM.isNode(c))throw new Error('DOM.prependContent: reference element is not a
node');var a=function(d){if(c.firstChild){c.insertBefore(d,c.firstChild);}else
c.appendChild(d);};return DOM._addContent(b,a,c);},insertAfter:function(c,b){if(!
DOM.isNode(c)||!c.parentNode)throw new Error('DOM.insertAfter: reference element is
not a node');var a=function(d){if(c.nextSibling)
{c.parentNode.insertBefore(d,c.nextSibling);}else
c.parentNode.appendChild(d);};return
DOM._addContent(b,a,c.parentNode);},insertBefore:function(b,c){if(!DOM.isNode(c)||!
c.parentNode)throw new Error('DOM.insertBefore: reference element is not a node or
'+'does not have a parent.');var a=function(d)
{c.parentNode.insertBefore(d,c);};return
DOM._addContent(b,a,c.parentNode);},setContent:function(b,a){if(!
DOM.isNode(b))throw new Error('DOM.setContent: reference element is not a
node');DOM.empty(b);return DOM.appendContent(b,a);},appendContent:function(c,b)
{if(!DOM.isNode(c))throw new Error('DOM.appendContent: reference element is not a
node');var a=function(d){c.appendChild(d);};return
DOM._addContent(b,a,c);},replace:function(c,b){if(!DOM.isNode(c)||!
c.parentNode)throw new Error('DOM.replace: reference element must be a node with
a'+' parent');var a=function(d){c.parentNode.replaceChild(d,c);};return
DOM._addContent(b,a,c.parentNode);},remove:function(a){a=$
(a);if(a.parentNode)a.parentNode.removeChild(a);},empty:function(a){a=$
(a);while(a.firstChild)DOM.remove(a.firstChild);},contains:function(b,a)
{b=ge(b);a=ge(a);if(!b||!a){return false;}else if(b===a){return true;}else
if(DOM.isNode(b,'#text')){return false;}else if(DOM.isNode(a,'#text')){return
DOM.contains(b,a.parentNode);}else if(b.contains){return b.contains(a);}else
if(b.compareDocumentPosition){return !!(b.compareDocumentPosition(a)&16);}else
return false;},getRootElement:function(){var
a=null;if(window.Quickling&&Quickling.isActive())a=ge('content');return a||
document.body;},isNode:function(d,e)
{if(typeof(Node)=='undefined')Node=null;try{if(!d||!((Node!=undefined&&d instanceof
Node)||d.nodeName))return false;}catch(a){return false;}if(typeof(e)!=='undefined')
{e=$A(e).map(function(g){return (g+'').toUpperCase();});var c,f;try{c=new
String(d.nodeName).toUpperCase();f=d.nodeType;}catch(a){return false;}for(var
b=0;b<e.length;b++)try{if(c==e[b]||f==e[b])return true;}catch(a){}return
false;}return true;},NODE_TYPES:
{ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSIN
G_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION
_NODE:12},_addContent:function(d,a,l){if(d instanceof HTML&&-
1==d.toString().indexOf('<scr'+'ipt')&&''==l.innerHTML){var g=ua.ie();if(!g||
(g>7&&!DOM.isNode(l,['table','tbody','thead','tfoot','tr','select','fieldset'])))
{l.innerHTML=d;return;}}else if(DOM.isNode(l,DOM.NODE_TYPES.TEXT))
{l.data=d;return;}var i,e=[],b=[];var f=document.createDocumentFragment();if(!(d
instanceof Array))d=[d];for(var h=0;h<d.length;h++){i=d[h];if(i instanceof HTML)
{b.push(i.getAction());var k=i.getNodes(),c;for(var j=0;j<k.length;j++)
{c=(ua.safari()||(ua.ie()&&i.hasOptionElements()))?
k[j]:k[j].cloneNode(true);e.push(c);f.appendChild(c);}}else if(is_scalar(i)){var
m=document.createTextNode(i);e.push(m);f.appendChild(m);}else if(DOM.isNode(i))
{e.push(i);f.appendChild(i);}else if(!(i instanceof Array))i!==null;}a(f);for(var
h=0;h<b.length;h++)b[h]();return e;}};function $N(c,a,b){if(typeof a!='object'||
DOM.isNode(a)||a instanceof Array||a instanceof HTML){b=a;a=null;}return
DOM.create(c,a,b);}var $$=function _$$(a){return DOM.scry.apply(null,
[document].concat($A(arguments)));};
String.prototype.trim=function(){if(this==window)return null;return
this.replace(/^\s*|\s*$/g,'');};function trim(b){try{return
String(b.toString()).trim();}catch(a){return
'';}}String.prototype.startsWith=function(a){if(this==window)return null;return
this.substring(0,a.length)==a;};String.prototype.endsWith=function(a)
{if(this==window)return null;return
this.length>=a.length&&this.substring(this.length-
a.length)==a;};String.prototype.split=(function(a){return function(h,e){var
b="";if(h===null||e===null){return [];}else if(typeof h=='string'){return
a.call(this,h,e);}else if(h===undefined){return [this.toString()];}else if(h
instanceof RegExp){if(!h._2||!h._1){b=h.toString().replace(/^[\S\s]+\//,"");if(!
h._1)if(!h.global){h._1=new RegExp(h.source,"g"+b);}else
h._1=1;}separator1=h._1===1?h:h._1;var i=(h._2?h._2:h._2=new
RegExp("^"+separator1.source+"$",b));if(e===undefined||e<0)
{e=false;}else{e=Math.floor(e);if(!e)return [];}var f,g=[],d=0,c=0;while((e?c+
+<=e:true)&&(f=separator1.exec(this)))
{if((f[0].length===0)&&(separator1.lastIndex>f.index))separator1.lastIndex--;if(sep
arator1.lastIndex>d){if(f.length>1)f[0].replace(i,function(){for(var
j=1;j<arguments.length-2;j+
+)if(arguments[j]===undefined)f[j]=undefined;});g=g.concat(this.substring(d,f.index
),(f.index===this.length?
[]:f.slice(1)));d=separator1.lastIndex;}if(f[0].length===0)separator1.lastIndex+
+;}return (d===this.length)?(separator1.test("")?g:g.concat("")):(e?
g:g.concat(this.substring(d)));}else return a.call(this,h,e);};})
(String.prototype.split);
add_properties('CSS',{shown:function(a){return !
CSS.hasClass(a,'hidden_elem');},setClass:function(b,a){$(b).className=a||'';return
b;},setStyle:function(a,b,d){switch(b){case 'opacity':var
c=(d==1);a.style.opacity=c?'':''+d;a.style.filter=c?'':'alpha(opacity='+d*100+')';b
reak;case
'float':a.style.cssFloat=a.style.styleFloat=d;break;default:b=b.replace(/-
(.)/g,function(e,f){return f.toUpperCase();});a.style[b]=d;}return
a;},getStyle:function(b,d){b=$(b);function c(e){return e.replace(/([A-Z])/g,'-
$1').toLowerCase();}if(window.getComputedStyle)return
window.getComputedStyle(b,null).getPropertyValue(c(d));if(document.defaultView&&doc
ument.defaultView.getComputedStyle){var
a=document.defaultView.getComputedStyle(b,null);if(a)return
a.getPropertyValue(c(d));if(d=="display")return "none";}if(b.currentStyle)return
b.currentStyle[d];return b.style[d];},getOpacity:function(a){a=$(a);var
b=CSS.getStyle(a,'filter');var c=null;if(b&&(c=/(\d+(?:\.\d+)?)/.exec(b))){return
parseFloat(c.pop())/100;}else if(b=CSS.getStyle(a,'opacity')){return
parseFloat(b);}else return 1;}});
function animation(a){if(a==undefined)return;if(this==window){return new
animation(a);}else{this.obj=a;this._reset_state();this.queue=[];this.last_attr=null
;}}animation.resolution=20;animation.offset=0;animation.prototype._reset_state=func
tion(){this.state={attrs:{},duration:500};};animation.prototype.stop=function()
{this._reset_state();this.queue=[];return
this;};animation.prototype._build_container=function(){if(this.container_div)
{this._refresh_container();return;}if(this.obj.firstChild&&this.obj.firstChild.__an
imation_refs)
{this.container_div=this.obj.firstChild;this.container_div.__animation_refs+
+;this._refresh_container();return;}var
b=document.createElement('div');b.style.padding='0px';b.style.margin='0px';b.style.
border='0px';b.__animation_refs=1;var
a=this.obj.childNodes;while(a.length)b.appendChild(a[0]);this.obj.appendChild(b);th
is.obj.style.overflow='hidden';this.container_div=b;this._refresh_container();};ani
mation.prototype._refresh_container=function()
{this.container_div.style.height='auto';this.container_div.style.width='auto';this.
container_div.style.height=this.container_div.offsetHeight+'px';this.container_div.
style.width=this.container_div.offsetWidth+'px';};animation.prototype._destroy_cont
ainer=function(){if(!this.container_div)return;if(!--
this.container_div.__animation_refs){var
a=this.container_div.childNodes;while(a.length)this.obj.appendChild(a[0]);this.obj.
removeChild(this.container_div);}this.container_div=null;};animation.ATTR_TO=1;anim
ation.ATTR_BY=2;animation.ATTR_FROM=3;animation.prototype._attr=function(a,d,c)
{a=a.replace(/-[a-z]/gi,function(e){return e.substring(1).toUpperCase();});var
b=false;switch(a){case 'background':this._attr('backgroundColor',d,c);return
this;case
'margin':d=animation.parse_group(d);this._attr('marginBottom',d[0],c);this._attr('m
arginLeft',d[1],c);this._attr('marginRight',d[2],c);this._attr('marginTop',d[3],c);
return this;case
'padding':d=animation.parse_group(d);this._attr('paddingBottom',d[0],c);this._attr(
'paddingLeft',d[1],c);this._attr('paddingRight',d[2],c);this._attr('paddingTop',d[3
],c);return this;case 'backgroundColor':case 'borderColor':case
'color':d=animation.parse_color(d);break;case
'opacity':d=parseFloat(d,10);break;case 'height':case 'width':if(d=='auto')
{b=true;}else d=parseInt(d,10);break;case 'borderWidth':case 'lineHeight':case
'fontSize':case 'marginBottom':case 'marginLeft':case 'marginRight':case
'marginTop':case 'paddingBottom':case 'paddingLeft':case 'paddingRight':case
'paddingTop':case 'bottom':case 'left':case 'right':case 'top':case
'scrollTop':case 'scrollLeft':d=parseInt(d,10);break;default:throw new Error(a+' is
not a supported
attribute!');}if(this.state.attrs[a]===undefined)this.state.attrs[a]={};if(b)this.s
tate.attrs[a].auto=true;switch(c){case
animation.ATTR_FROM:this.state.attrs[a].start=d;break;case
animation.ATTR_BY:this.state.attrs[a].by=true;case
animation.ATTR_TO:this.state.attrs[a].value=d;break;}};animation._get_box_width=fun
ction(c){var
d=parseInt(CSS.getStyle(c,'paddingLeft'),10),e=parseInt(CSS.getStyle(c,'paddingRigh
t'),10),a=parseInt(CSS.getStyle(c,'borderLeftWidth'),10),b=parseInt(CSS.getStyle(c,
'borderRightWidth'),10);return c.offsetWidth-(d?d:0)-(e?e:0)-(a?a:0)-(b?
b:0);};animation._get_box_height=function(c){var
e=parseInt(CSS.getStyle(c,'paddingTop'),10),d=parseInt(CSS.getStyle(c,'paddingBotto
m'),10),a=parseInt(CSS.getStyle(c,'borderTopWidth'),10),b=parseInt(CSS.getStyle(c,'
borderBottomWidth'),10);return c.offsetHeight-(e?e:0)-(d?d:0)-(a?a:0)-(b?
b:0);};animation.prototype.to=function(a,b){if(b===undefined)
{this._attr(this.last_attr,a,animation.ATTR_TO);}else{this._attr(a,b,animation.ATTR
_TO);this.last_attr=a;}return this;};animation.prototype.by=function(a,b)
{if(b===undefined)
{this._attr(this.last_attr,a,animation.ATTR_BY);}else{this._attr(a,b,animation.ATTR
_BY);this.last_attr=a;}return this;};animation.prototype.from=function(a,b)
{if(b===undefined)
{this._attr(this.last_attr,a,animation.ATTR_FROM);}else{this._attr(a,b,animation.AT
TR_FROM);this.last_attr=a;}return this;};animation.prototype.duration=function(a)
{this.state.duration=a?a:0;return
this;};animation.prototype.checkpoint=function(b,a)
{if(b===undefined)b=1;this.state.checkpoint=b;this.queue.push(this.state);this._res
et_state();this.state.checkpointcb=a;return
this;};animation.prototype.blind=function(){this.state.blind=true;return
this;};animation.prototype.hide=function(){this.state.hide=true;return
this;};animation.prototype.show=function(){this.state.show=true;return
this;};animation.prototype.ease=function(a){this.state.ease=a;return
this;};animation.prototype.go=function(){var b=(new
Date()).getTime();this.queue.push(this.state);for(var a=0;a<this.queue.length;a++)
{this.queue[a].start=b-
animation.offset;if(this.queue[a].checkpoint)b+=this.queue[a].checkpoint*this.queue
[a].duration;}animation.push(this);return
this;};animation.prototype._show=function()
{CSS.show(this.obj);};animation.prototype._hide=function()
{CSS.hide(this.obj);};animation.prototype._frame=function(l){var d=true;var
k=false;var n=false;for(var e=0;e<this.queue.length;e++){var
b=this.queue[e];if(b.start>l){d=false;continue;}if(b.checkpointcb)
{this._callback(b.checkpointcb,l-
b.start);b.checkpointcb=null;}if(b.started===undefined)
{if(b.show)this._show();for(var a in b.attrs){if(b.attrs[a].start!
==undefined)continue;switch(a){case 'backgroundColor':case 'borderColor':case
'color':var
m=animation.parse_color(CSS.getStyle(this.obj,a=='borderColor'?'borderLeftColor':a)
);if(b.attrs[a].by)
{b.attrs[a].value[0]=Math.min(255,Math.max(0,b.attrs[a].value[0]+m[0]));b.attrs[a].
value[1]=Math.min(255,Math.max(0,b.attrs[a].value[1]+m[1]));b.attrs[a].value[2]=Mat
h.min(255,Math.max(0,b.attrs[a].value[2]+m[2]));}break;case 'opacity':var
m=CSS.getOpacity(this.obj);if(b.attrs[a].by)b.attrs[a].value=Math.min(1,Math.max(0,
b.attrs[a].value+m));break;case 'height':var
m=animation._get_box_height(this.obj);if(b.attrs[a].by)b.attrs[a].value+=m;break;ca
se 'width':var
m=animation._get_box_width(this.obj);if(b.attrs[a].by)b.attrs[a].value+=m;break;cas
e 'scrollLeft':case 'scrollTop':var m=(this.obj==document.body)?
(document.documentElement[a]||
document.body[a]):this.obj[a];if(b.attrs[a].by)b.attrs[a].value+=m;b['last'+a]=m;br
eak;default:var m=parseInt(CSS.getStyle(this.obj,a),10)||
0;if(b.attrs[a].by)b.attrs[a].value+=m;break;}b.attrs[a].start=m;}if((b.attrs.heigh
t&&b.attrs.height.auto)||(b.attrs.width&&b.attrs.width.auto))
{if(ua.firefox()<3)n=true;this._destroy_container();for(var a in
{height:1,width:1,fontSize:1,borderLeftWidth:1,borderRightWidth:1,borderTopWidth:1,
borderBottomWidth:1,paddingLeft:1,paddingRight:1,paddingTop:1,paddingBottom:1})if(b
.attrs[a])this.obj.style[a]=b.attrs[a].value+(typeof
b.attrs[a].value=='number'?'px':'');if(b.attrs.height&&b.attrs.height.auto)b.attrs.
height.value=animation._get_box_height(this.obj);if(b.attrs.width&&b.attrs.width.au
to)b.attrs.width.value=animation._get_box_width(this.obj);}b.started=true;if(b.blin
d)this._build_container();}var h=(l-b.start)/b.duration;if(h>=1)
{h=1;if(b.hide)this._hide();}else d=false;var j=b.ease?b.ease(h):h;if(!k&&h!
=1&&b.blind)k=true;if(n&&this.obj.parentNode){var i=this.obj.parentNode;var
g=this.obj.nextSibling;i.removeChild(this.obj);}for(var a in b.attrs)switch(a){case
'backgroundColor':case 'borderColor':case
'color':this.obj.style[a]='rgb('+animation.calc_tween(j,b.attrs[a].start[0],b.attrs
[a].value[0],true)
+','+animation.calc_tween(j,b.attrs[a].start[1],b.attrs[a].value[1],true)
+','+animation.calc_tween(j,b.attrs[a].start[2],b.attrs[a].value[2],true)
+')';break;case
'opacity':CSS.setStyle(this.obj,'opacity',animation.calc_tween(j,b.attrs[a].start,b
.attrs[a].value));break;case 'height':case
'width':this.obj.style[a]=j==1&&b.attrs[a].auto?'auto':animation.calc_tween(j,b.att
rs[a].start,b.attrs[a].value,true)+'px';break;case 'scrollLeft':case
'scrollTop':var f=this.obj==document.body;var m=(f)?(document.documentElement[a]||
document.body[a]):this.obj[a];if(b['last'+a]!=m){delete b.attrs[a];}else{var
c=animation.calc_tween(j,b.attrs[a].start,b.attrs[a].value,true)-m;if(!f)
{this.obj[a]=c+m;}else if(a=='scrollLeft'){window.scrollBy(c,0);}else
window.scrollBy(0,c);b['last'+a]=c+m;}break;default:this.obj.style[a]=animation.cal
c_tween(j,b.attrs[a].start,b.attrs[a].value,true)+'px';break;}if(h==1)
{this.queue.splice(e--,1);this._callback(b.ondone,l-b.start-
b.duration);}}if(n)i[g?'insertBefore':'appendChild'](this.obj,g);if(!
k&&this.container_div)this._destroy_container();return !
d;};animation.prototype.ondone=function(a){this.state.ondone=a;return
this;};animation.prototype._callback=function(a,b){if(a)
{animation.offset=b;a.call(this);animation.offset=0;}};animation.calc_tween=functio
n(a,b,c,d){return (d?parseInt:parseFloat)((c-
b)*a+b,10);};animation.parse_color=function(a){var b=/^#([a-f0-9]{1,2})([a-f0-9]
{1,2})([a-f0-9]{1,2})$/i.exec(a);if(b){return [parseInt(b[1].length==1?
b[1]+b[1]:b[1],16),parseInt(b[2].length==1?
b[2]+b[2]:b[2],16),parseInt(b[3].length==1?b[3]+b[3]:b[3],16)];}else{var c=/^rgba?
*\(([0-9]+), *([0-9]+), *([0-9]+)(?:, *([0-9]+))?\)$/.exec(a);if(c){if(c[4]==='0')
{return [255,255,255];}else return
[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10)];}else if(a=='transparent')
{return [255,255,255];}else throw 'Named color attributes are not
supported.';}};animation.parse_group=function(a){var a=trim(a).split(/
+/);if(a.length==4){return a;}else if(a.length==3){return
[a[0],a[1],a[2],a[1]];}else if(a.length==2){return [a[0],a[1],a[0],a[1]];}else
return [a[0],a[0],a[0],a[0]];};animation.push=function(a){if(!
animation.active)animation.active=[];animation.active.push(a);if(!
animation.timeout)animation.timeout=setInterval(animation.animate.bind(animation),a
nimation.resolution,false);animation.animate(true);};animation.animate=function(c)
{var d=(new Date()).getTime();for(var b=c===true?animation.active.length-
1:0;b<animation.active.length;b++)try{if(!
animation.active[b]._frame(d))animation.active.splice(b--,1);}catch(a){animation
.active.splice(b--,1);}if(animation.active.length==0)
{clearInterval(animation.timeout);animation.timeout=null;}};animation.ease={};anima
tion.ease.begin=function(a){return Math.sin(Math.PI/2*(a-1))
+1;};animation.ease.end=function(a){return
Math.sin(.5*Math.PI*a);};animation.ease.both=function(a){return .
5*Math.sin(Math.PI*(a-.5))+.5;};animation.prependInsert=function(b,a)
{animation.insert(b,a,DOM.prependContent);};animation.appendInsert=function(b,a)
{animation.insert(b,a,DOM.appendContent);};animation.insert=function(c,a,b)
{CSS.setStyle(a,'opacity',0);b(c,a);animation(a).from('opacity',0).to('opacity',1).
duration(400).go();};
var XD={_callbacks:[],_opts:
{autoResize:false,allowShrink:true,channelUrl:null,hideOverflow:false,newResizeMeth
od:false,resizeTimeout:100,resizeWidth:false},init:function(a)
{this._opts=copy_properties(copy_properties({},this._opts),a);if(this._opts.autoRes
ize)this._startResizeMonitor();},send:function(b,a){a=a||
this._opts.channelUrl;if(a.substr(0,4)!='http')return;var
h=a+'&'+URI.implodeQuery(b),d='f'+
(Math.random()*(1<<30)).toString(16).replace('.',''),c=document.body.appendChild(do
cument.createElement('div')),g=false;c.style.position='absolute';c.style.top='-
10000px';c.style.width='1px';c.style.height='1px';XD._callbacks[d]=function(){if(g)
{(function(){c.parentNode.removeChild(c);}).defer(3000);delete
XD._callbacks[d];}};if(ua.ie()){var e=('<iframe '+' src="'+h+'"'+'
onload="XD._callbacks.'+d+'()"'+'></iframe>');c.innerHTML='<iframe
src="javascript:false"></iframe>';g=true;(function()
{c.innerHTML=e;}).defer();}else{var
f=document.createElement('iframe');f.onload=XD._callbacks[d];c.appendChild(f);g=tru
e;f.src=h;}},_computeSize:function(){var
a=document.body,e=document.documentElement,h=0,f;if(this._opts.newResizeMethod)
{f=Math.max(Math.max(a.offsetHeight,a.scrollHeight)
+a.offsetTop,Math.max(e.offsetHeight,e.scrollHeight)+e.offsetTop);}else{if(ua.ie())
{f=Math.max(a.offsetHeight,a.scrollHeight)+a.offsetTop;}else
f=e.offsetHeight+e.offsetTop;if(window.Dialog)f=Math.max(f,Dialog.max_bottom);}if(t
his._opts.resizeWidth){if(a.offsetWidth<a.scrollWidth)
{h=a.scrollWidth+a.offsetLeft;}else{var d=a.childNodes;for(var g=0;g<d.length;g++)
{var b=d[g];var
c=b.offsetWidth+b.offsetLeft;if(c>h)h=c;}}if(XD.forced_min_width)h=Math.max(h,XD.fo
rced_min_width);if(e.clientLeft>0)h+=(e.clientLeft*2);if(e.clientTop>0)f+=(e.client
Top*2);}return {width:h,height:f};},_startResizeMonitor:function(){var
b,a=document.documentElement;if(this._opts.hideOverflow)a.style.overflow='hidden';
(function(){var e=this._computeSize();if(!b||(this._opts.allowShrink&&b.width!
=e.width)||(!this._opts.allowShrink&&b.width<e.width)||
(this._opts.allowShrink&&b.height!=e.height)||(!
this._opts.allowShrink&&b.height<e.height)){b=e;var
d={type:'resize',height:e.height};if(e.width&&e.width!
=0)d.width=e.width;try{if(URI(document.referrer).isFacebookURI()&&window.parent!
=window&&window.name&&window.parent.location&&URI(window.parent.location).isFaceboo
kURI()){var iframes=window.parent.document.getElementsByTagName('iframe');for(var i
in iframes)if(iframes[i].name==window.name)
{if(this._opts.resizeWidth)iframes[i].width=d.width;iframes[i].height=d.height;}}el
se this.send(d);}catch(c)
{this.send(d);}}}).bind(this).recur(this._opts.resizeTimeout);}};var
UnverifiedXD=copy_properties({},XD);
DataStore=window.DataStore||{_storage:{},_elements:
{},_tokenCounter:1,_NOT_IN_DOM_CONST:1,_getStorage:function(a){var b;if(typeof
a=='string'){b='str_'+a;}else{b='elem_'+(a.__FB_TOKEN||
(a.__FB_TOKEN=[DataStore._tokenCounter++]))[0];DataStore._elements[b]=a;}return
DataStore._storage[b]||(DataStore._storage[b]={});},_shouldDeleteData:function(a)
{if(!a.nodeName)return false;try{if(null!=a.offsetParent)return false;}catch(b)
{}if(document.documentElement.contains){return !
document.documentElement.contains(a);}else return
(document.documentElement.compareDocumentPosition(a)&DataStore._NOT_IN_DOM_CONST);}
,set:function(c,b,d){var a=DataStore._getStorage(c);a[b]=d;return
c;},get:function(e,d,c){var b=DataStore._getStorage(e),f=b[d];if(typeof
f==='undefined'&&e.getAttribute){var a=e.getAttribute('data-'+d);f=(null===a)?
undefined:a;}if((c!==undefined)&&(f===undefined))f=b[d]=c;return
f;},remove:function(c,b){var a=DataStore._getStorage(c),d=a[b];delete a[b];return
d;},cleanup:function(){var b,a;for(b in DataStore._elements)
{a=DataStore._elements[b];if(DataStore._shouldDeleteData(a)){delete
DataStore._storage[b];delete DataStore._elements[b];}}}};
window.Event=window.Event||function(){};Event.DATASTORE_KEY='Event.listeners';if(!
Event.prototype)Event.prototype={};function $E(a){a=a||window.event||{};if(!
a._inherits_from_prototype)for(var c in
Event.prototype)try{a[c]=Event.prototype[c];}catch(b){}return a;}(function()
{copy_properties(Event.prototype,{_inherits_from_prototype:true,stop:function()
{this.cancelBubble=true;this.stopPropagation&&this.stopPropagation();return
this;},prevent:function()
{this.returnValue=false;this.preventDefault&&this.preventDefault();return
this;},kill:function(){this.stop().prevent();return false;},getTarget:function()
{var g=this.target||this.srcElement;return g?$
(g):null;},getRelatedTarget:function(){var g=this.relatedTarget||
this.fromElement;return g?$(g):null;},getModifiers:function(){var g={control:!!
this.ctrlKey,shift:!!this.shiftKey,alt:!!this.altKey,meta:!!
this.metaKey};g.access=ua.osx()?g.control:g.alt;g.any=g.control||g.shift||g.alt||
g.meta;return g;}});copy_properties(Event,{listen:function(h,p,j,m){if(typeof
h=='string')h=$(h);if(typeof m=='undefined')m=Event.Priority.NORMAL;if(typeof
p=='object'){var i={};for(var o in p)i[o]=Event.listen(h,o,p[o],m);return
i;}if(p.match(/^on/i))throw new TypeError("Bad event name `"+event+"': use `click',
not `onclick'.");p=p.toLowerCase();var k=DataStore.get(h,b,{});if(f[p]){var
g=f[p];p=g.base;j=g.wrap(j);}a(h,p);var q=k[p];if(!(m in q))q[m]=[];var
l=q[m].length,n=new EventHandlerRef(j,q[m],l);q[m].push(n);return
n;},fire:function(g,i,event){var
h=DataStore.get(g,Event.DATASTORE_KEY+i);if(h)return
h($E(event));},stop:function(g){return $E(g).stop();},prevent:function(g){return
$E(g).prevent();},kill:function(g){return $E(g).kill();},getKeyCode:function(event)
{event=$E(event);if(!event)return false;switch(event.keyCode){case 63232:return
38;case 63233:return 40;case 63234:return 37;case 63235:return 39;case 63272:case
63273:case 63275:return null;case 63276:return 33;case 63277:return
34;}if(event.shiftKey)switch(event.keyCode){case 33:case 34:case 37:case 38:case
39:case 40:return null;}return event.keyCode;},getPriorities:function(){if(!e){var
g=values(Event.Priority);g.sort(function(h,i){return h-i;});e=g;}return e;}});var
e=null,b=Event.DATASTORE_KEY;var c=function(g){return function(h){if(!
DOM.contains(this,h.getRelatedTarget()))return g.call(this,h);};};var
f={mouseenter:{base:'mouseover',wrap:c},mouseleave:{base:'mouseout',wrap:c}};var
a=function(g,l){var h='on'+l;var k=d.bind(g);var j=DataStore.get(g,b);if(l in
j)return;j[l]={};if(g.addEventListener){g.addEventListener(l,k,false);}else
if(g.attachEvent)g.attachEvent(h,k);DataStore.set(g,b+l,k);if(g[h]){var
i=g[h];g[h]=null;Event.listen(g,l,i,Event.Priority.TRADITIONAL);}};var
d=function(event){event=$E(event);var n=event.type;if(!DataStore.get(this,b))throw
new Error("Bad listenHandler context.");var o=DataStore.get(this,b)[n];if(!o)throw
new Error("No registered handlers for `"+n+"'.");if(n=='click'){var
i=Parent.byTag(event.getTarget(),'a');if(i&&i.getAttribute&&i.getAttribute('href',2
))user_action(i,'click',event);}var k=Event.getPriorities();for(var
j=0;j<k.length;j++){var l=k[j];if(l in o){var g=o[l];for(var h=0;h<g.length;h++)
{if(!g[h])continue;var m=g[h].fire(this,event);if(m===false){return
event.kill();}else if(event.cancelBubble)return event.stop();}}}return
event.returnValue;};})();Event.Priority={URGENT:-20,TRADITIONAL:-
10,NORMAL:0};function EventHandlerRef(b,a,c)
{this._handler=b;this._container=a;this._index=c;}EventHandlerRef.prototype={remove
:function(){delete this._handler;delete
this._container[this._index];},fire:function(a,event){return
this._handler.call(a,event);}};
WidgetArbiter={_findSiblings:function()
{if(WidgetArbiter._siblings)return;WidgetArbiter._siblings=[];for(var
b=parent.frames.length-
1;b>=0;b--)try{if(parent.frames[b]&&parent.frames[b].Arbiter&&parent.frames[b].Arbi
ter.inform)WidgetArbiter._siblings.push(parent.frames[b].Arbiter);}catch(a)
{}},inform:function(){WidgetArbiter._findSiblings();var
a=$A(arguments);WidgetArbiter._siblings.each(function(b){b.inform.apply(b,a);});}};
function show(){for(var b=0;b<arguments.length;b++){var
a=ge(arguments[b]);if(a&&a.style)a.style.display='';}return false;}function hide()
{for(var b=0;b<arguments.length;b++){var
a=ge(arguments[b]);if(a&&a.style)a.style.display='none';}return false;}function
shown(a){a=ge(a);return (a.style.display!='none'&&!
(a.style.display==''&&a.offsetWidth==0));}function toggle(){for(var
b=0;b<arguments.length;b++){var a=$
(arguments[b]);a.style.display=CSS.getStyle(a,"display")=='block'?'none':'block';}r
eturn false;}function toggleDisplayNone(){for(var b=0;b<arguments.length;b++){var
a=$(arguments[b]);if(shown(a)){hide(a);}else show(a);}return false;}
function AsyncSignal(b,a){this.data=a||
{};if(window.Env&&Env.tracking_domain&&b.charAt(0)=='/')b=Env.tracking_domain+b;thi
s.uri=b;this.handler=null;}AsyncSignal.prototype.setHandler=function(a)
{this.handler=a;return this;};AsyncSignal.prototype.send=function(){var
c=this.handler,b=this.data,g=this.uri,f=[],d=new
Image(),a=document.getElementById('post_form_id');b.asyncSignal=Math.floor(Math.ran
dom()*10000)+1;if(a)b.post_form_id=a.value;for(var e in
b)f.push(encodeURIComponent(e)+'='+encodeURIComponent(b[e]));if(g.indexOf('?')==-
1)g+='?';g+=f.join('&');if(c)d.onload=d.onerror=(function(i,h){return function()
{h((i.height==1));};})(d,c);d.src=g;return this;};
function setCookie(a,b,d,e){if(d){var f=new Date();var c=new
Date();c.setTime(f.getTime()+d);}document.cookie=a+"="+encodeURIComponent(b)+"; "+
(d?"expires="+c.toGMTString()+"; ":"")+"path="+(e||'/')+";
domain="+window.location.hostname.replace(/^.*(\.facebook\..*)$/i,'$1');}function
clearCookie(a){document.cookie=a+"=; expires=Sat, 01 Jan 2000 00:00:00 GMT;
"+"path=/; domain="+window.location.hostname.replace(/^.*(\.facebook\..*)
$/i,'$1');}function getCookie(d){var e=d+"=";var
b=document.cookie.split(';');for(var c=0;c<b.length;c++){var
a=b[c];while(a.charAt(0)==' ')a=a.substring(1,a.length);if(a.indexOf(e)==0)return
decodeURIComponent(a.substring(e.length,a.length));}return null;}
add_properties('Input',{isEmpty:function(a){return (a.value||'').match(/^\s*$/)||
CSS.hasClass(a,'DOMControl_placeholder');},getValue:function(a){return
Input.isEmpty(a)?'':a.value;},setValue:function(a,b)
{CSS.removeClass(a,'DOMControl_placeholder');a.value=b;},setPlaceholder:function(a,
b){a.setAttribute('title',b);a.setAttribute('placeholder',b);if(Input.isEmpty(a))
{CSS.addClass(a,'DOMControl_placeholder');a.value=b;}},reset:function(a)
{Input.setValue(a,'');var
b=a.getAttribute('placeholder');b&&Input.setPlaceholder(a,b);}});
function Vector2(b,c,a){copy_properties(this,
{x:parseFloat(b),y:parseFloat(c),domain:a||'pure'});}copy_properties(Vector2.protot
ype,{toString:function(){return '('+this.x+', '+this.y+')';},add:function(c,d)
{if(arguments.length==1){if(c.domain!='pure')c=c.convertTo(this.domain);return
this.add(c.x,c.y);}var a=parseFloat(c);var b=parseFloat(d);return new
Vector2(this.x+a,this.y+b,this.domain);},mul:function(a,b)
{if(typeof(b)=="undefined")b=a;return new
Vector2(this.x*a,this.y*b,this.domain);},sub:function(a,b){if(arguments.length==1)
{return this.add(a.mul(-1));}else return this.add(-a,-b);},distanceTo:function(a)
{return this.sub(a).magnitude();},magnitude:function(){return
Math.sqrt((this.x*this.x)+(this.y*this.y));},convertTo:function(a){if(a!='pure'&&a!
='viewport'&&a!='document')return new Vector2(0,0);if(a==this.domain)return new
Vector2(this.x,this.y,this.domain);if(a=='pure')return new
Vector2(this.x,this.y);if(this.domain=='pure')return new Vector2(0,0);var
b=Vector2.getScrollPosition('document');var
c=this.x,d=this.y;if(this.domain=='document'){c-=b.x;d-
=b.y;}else{c+=b.x;d+=b.y;}return new
Vector2(c,d,a);},setElementPosition:function(a){var
b=this.convertTo('document');a.style.left=parseInt(b.x)
+'px';a.style.top=parseInt(b.y)+'px';return this;},setElementDimensions:function(a)
{return this.setElementWidth(a).setElementHeight(a);},setElementWidth:function(a)
{a.style.width=parseInt(this.x,10)+'px';return this;},setElementHeight:function(a)
{a.style.height=parseInt(this.y,10)+'px';return this;},scrollElementBy:function(a)
{if(a==document.body)
{window.scrollBy(this.x,this.y);}else{a.scrollLeft+=this.x;a.scrollTop+=this.y;}ret
urn this;}});copy_properties(Vector2,{compass:
{east:'e',west:'w',north:'n',south:'s',center:'center',northeast:'ne',northwest:'nw
',southeast:'se',southwest:'sw'},getEventPosition:function(b,a)
{a=a||'document';b=$E(b);var d=b.pageX||(b.clientX+
(document.documentElement.scrollLeft||document.body.scrollLeft));var e=b.pageY||
(b.clientY+(document.documentElement.scrollTop||document.body.scrollTop));var c=new
Vector2(d,e,'document');return c.convertTo(a);},getScrollPosition:function(a)
{a=a||'document';var b=document.body.scrollLeft||
document.documentElement.scrollLeft;var c=document.body.scrollTop||
document.documentElement.scrollTop;return new
Vector2(b,c,'document').convertTo(a);},getElementPosition:function(c,b)
{b=b||'document';if(!c)return;if(!('getBoundingClientRect' in c))return new
Vector2(0,0,'document');var
e=c.getBoundingClientRect(),a=document.documentElement,d=Math.round(e.left)-
a.clientLeft,f=Math.round(e.top)-a.clientTop;return new
Vector2(d,f,'viewport').convertTo(b);},getElementDimensions:function(a){return new
Vector2(a.offsetWidth||0,a.offsetHeight||0);},getElementCompassPoint:function(c,e)
{e=e||Vector2.compass.southeast;var d=Vector2.getElementPosition(c);var
b=Vector2.getElementDimensions(c);var a=Vector2.compass;switch(e){case
a.east:return d.add(b.x,b.y*.5);case a.west:return d.add(0,b.y*.5);case
a.north:return d.add(b.x*.5,0);case a.south:return d.add(b.x*.5,b.y);case
a.center:return d.add(b.mul(.5));case a.northwest:return d;case a.northeast:return
d.add(b.x,0);case a.southwest:return d.add(0,b.y);case a.southeast:return
d.add(b);}return d;},getViewportDimensions:function(){var
a=(window&&window.innerWidth)||
(document&&document.documentElement&&document.documentElement.clientWidth)||
(document&&document.body&&document.body.clientWidth)||0;var
b=(window&&window.innerHeight)||
(document&&document.documentElement&&document.documentElement.clientHeight)||
(document&&document.body&&document.body.clientHeight)||0;return new
Vector2(a,b,'viewport');},getDocumentDimensions:function(){var
a=(document&&document.documentElement&&document.documentElement.scrollWidth)||
(document&&document.body&&document.body.scrollWidth)||0;var
b=(document&&document.documentElement&&document.documentElement.scrollHeight)||
(document&&document.body&&document.body.scrollHeight)||0;return new
Vector2(a,b,'document');},scrollIntoView:function(a){var b=a.offsetParent;var
d=Rect(a);var
c=d.boundWithin(Rect(b)).getPositionVector();d.getPositionVector().sub(c).scrollEle
mentBy(b);}});var operaIgnoreScroll={table:true,'inline-
table':true,inline:true};function elementX(a){return
Vector2.getElementPosition(a,'document').x;}function elementY(a){return
Vector2.getElementPosition(a,'document').y;}
function KeyEventController(){copy_properties(this,{handlers:
{}});document.onkeyup=this.onkeyevent.bind(this,'onkeyup');document.onkeydown=this.
onkeyevent.bind(this,'onkeydown');document.onkeypress=this.onkeyevent.bind(this,'on
keypress');}copy_properties(KeyEventController,
{instance:null,getInstance:function(){return KeyEventController.instance||
(KeyEventController.instance=new
KeyEventController());},defaultFilter:function(event,a){event=$E(event);return
KeyEventController.filterEventTypes(event,a)&&KeyEventController.filterEventTargets
(event,a)&&KeyEventController.filterEventModifiers(event,a);},filterEventTypes:func
tion(event,a){if(a==='onkeydown')return true;return
false;},filterEventTargets:function(event,b){var
a=$E(event).getTarget();if(DOM.isNode(a,
['input','select','textarea','object','embed']))if(a.type!='checkbox'&&a.type!
='radio'&&a.type!='submit')return false;return a.getAttribute('contentEditable')!
='true';},filterEventModifiers:function(event,a){if(event.ctrlKey||event.altKey||
event.metaKey||event.repeat)return false;return
true;},registerKey:function(f,a,d,g)
{if(d===undefined)d=KeyEventController.defaultFilter;var
b=KeyEventController.getInstance();var
c=b.mapKey(f);if(is_empty(b.handlers))onleaveRegister(b.resetHandlers.bind(b));for(
var e=0;e<c.length;e++){f=c[e];if(!b.handlers[f]||
g)b.handlers[f]=[];b.handlers[f].push({callback:a,filter:d});}},keyCodeMap:{'[':
[219],']':[221],'`':[192],LEFT:[KEYS.LEFT,63234],RIGHT:[KEYS.RIGHT,63235],RETURN:
[KEYS.RETURN],TAB:[KEYS.TAB],DOWN:[KEYS.DOWN,63233],UP:[KEYS.UP,63232],ESCAPE:
[KEYS.ESC],BACKSPACE:[KEYS.BACKSPACE],DELETE:
[KEYS.DELETE]}});copy_properties(KeyEventController.prototype,{mapKey:function(a)
{if(typeof(a)=='number')return
[48+a,96+a];if(KeyEventController.keyCodeMap[a.toUpperCase()])return
KeyEventController.keyCodeMap[a.toUpperCase()];var
b=a.toUpperCase().charCodeAt(0);return [b];},onkeyevent:function(i,c){c=$E(c);var
d=null;var g=this.handlers[c.keyCode];var b,f,a;if(g)for(var h=0;h<g.length;h++)
{b=g[h].callback;f=g[h].filter;try{if(!f||f(c,i)){var
node=null;if(window.Parent&&Parent.byTag&&c.getTarget)node=Parent.byTag(c.getTarget
(),'a');user_action(node,'key',c);a=b(c,i);if(a===false)return
Event.kill(c);}}catch(e){}}return true;},resetHandlers:function()
{this.handlers={};}});
add_properties('CSS',{supportsBorderRadius:function(){var
c=['KhtmlBorderRadius','OBorderRadius','MozBorderRadius','WebkitBorderRadius','msBo
rderRadius','borderRadius'];var d=false,a=document.createElement('div');for(var
b=c.length;b>=0;b--)if(d=a.style[c[b]]!
==undefined)break;CSS.supportsBorderRadius=bagof(d);return d;}});
function intl_set_xmode(a){(new
AsyncRequest()).setURI('/ajax/intl/save_xmode.php').setData({xmode:a}).setHandler(f
unction(){document.location.reload();}).send();}function intl_set_cmode(a){(new
AsyncRequest()).setURI('/ajax/intl/save_xmode.php').setData({cmode:a}).setHandler(f
unction(){document.location.reload();}).send();}function intl_set_vmode(a){(new
AsyncRequest()).setURI('/ajax/intl/save_xmode.php').setData({vmode:a}).setHandler(f
unction(){document.location.reload();}).send();}function intl_set_amode(a){(new
AsyncRequest()).setURI('/ajax/intl/save_xmode.php').setData({amode:a,app:false}).se
tHandler(function(){document.location.reload();}).send();}function
intl_set_pmode(a){CSS.toggleClass($('translations_nub'),'pnub');if(a==0)
{CSS.addClass($('progress_check'),'progress_hidden');CSS.removeClass($
('progress_check'),'progress_shown');}else{CSS.addClass($
('progress_check'),'progress_shown');CSS.removeClass($
('progress_check'),'progress_hidden');}(new
AsyncRequest()).setURI('/ajax/intl/save_xmode.php').setData({pmode:a}).setHandler(f
unction(){}).send();}function intl_set_locale(c,d,b,a){if(!b)var
b=c.options[c.selectedIndex].value;intl_save_locale(b,true,null,d,a);}function
intl_save_locale(b,d,c,e,a){new
AsyncRequest().setURI('/ajax/intl/save_locale.php').setData({aloc:b,source:e,app_on
ly:a}).setHandler(function(f){if(d){document.location.reload();}else
goURI(c);}).send();}function intl_toggle_beta_locale_install(a){if(a.checked)
{show($('beta_locale_install'));}else hide($('beta_locale_install'));}function
intl_set_cookie_locale(a,d,c){var b=getCookie('locale');new
AsyncRequest().setURI('/ajax/intl/save_locale_cookie_logging.php').setData({new_loc
ale:a,old_locale:b,source:c}).setReadOnly(true).send();setCookie('locale',a,7*24*36
00000);goURI(d);}function intl_disable_rooster_save(b){var
c=document.getElementById('install_translation_app');c.disabled=!b.checked;var
a=document.getElementById('install_container');if(b.checked)
{a.style.display='block';}else a.style.display='none';}function
intl_confirm_rooster_and_install_app(b,a){goURI('/add.php?
api_key=efa7a7045708fcadede8d705e39b1642');}function intl_locale_is_rtl(){return
('rtl'==CSS.getStyle(document.body,'direction'));}function intl_is_left_click(a)
{if(a.which==null){if(a.button<2&&!a.ctrlKey)return true;}else if(a.which<2&&!
a.ctrlKey)return true;return false;}function intl_left_click_cancelBubble(a)
{if(intl_is_left_click(a))a.cancelBubble=true;}
add_properties('Form',{getInputs:function(a){a=a||document;return
[].concat($A(DOM.scry(a,'input')),$A(DOM.scry(a,'select')),
$A(DOM.scry(a,'textarea')),$A(DOM.scry(a,'button')));},getSelectValue:function(a)
{return a.options[a.selectedIndex].value;},setSelectValue:function(b,c){for(var
a=0;a<b.options.length;++a)if(b.options[a].value==c)
{b.selectedIndex=a;break;}},getRadioValue:function(b){for(var a=0;a<b.length;a+
+)if(b[a].checked)return b[a].value;return null;},getElements:function(a){return
$A(a.tagName=='FORM'?a.elements:Form.getInputs(a));},setDisabled:function(b,a)
{Form.getElements(b).forEach(function(c){if(c.disabled!=undefined)if(a)
{DataStore.set(c,'origDisabledState',c.disabled);c.disabled=a;}else{if(DataStore.ge
t(c,'origDisabledState')!
==true)c.disabled=false;DataStore.remove(c,'origDisabledState');}});},bootstrap:fun
ction(b,c){var d=b.method.toUpperCase();c=Parent.byTag(c,'button')||c;var
a=Form.serialize(b,c);Form.setDisabled(b,true);var e=DOMPath.findNodePath(b);var
g=Parent.byClass(c,'stat_elem')||b;var f=new
AsyncRequest(b.getAttribute('action'));f.setData(a).setNectarModuleDataSafe(b).setR
eadOnly(d=='GET').setMethod(d).setRelativeTo(b).setStatusElement(g).setHandler(func
tion(h)
{if(h.isReplay())f.setRelativeTo(DOMPath.resolveNodePath(e));}).setFinallyHandler(F
orm.setDisabled.bind(null,b,false)).send();},serialize:function(b,c){var
a={};Form.getElements(b).forEach(function(d){if(d.name&&!d.disabled&&d.type!
='submit')if(!d.type||((d.type=='radio'||d.type=='checkbox')&&d.checked)||
d.type=='text'||d.type=='password'||d.type=='hidden'||d.tagName=='TEXTAREA')
{Form._serializeHelper(a,d.name,Input.getValue(d));}else
if(d.tagName=='SELECT')for(var e=0,f=d.options.length;e<f;++e){var
g=d.options[e];if(g.selected)Form._serializeHelper(a,d.name,g.value);}});if(c&&'sub
mit'==c.type&&DOM.contains(b,c)&&DOM.isNode(c,
['input','button']))Form._serializeHelper(a,c.name,c.value);return
Form._serializeFix(a);},_serializeHelper:function(a,d,e){var c=/([^\]]+)\
[([^\]]*)\](.*)/.exec(d);if(c){a[c[1]]=a[c[1]]||{};if(c[2]==''){var
b=0;while(a[c[1]][b]!=undefined)b++;}else b=c[2];if(c[3]==''){a[c[1]][b]=e;}else
Form._serializeHelper(a[c[1]],b.concat(c[3]),e);}else
a[d]=e;},_serializeFix:function(a){var e=[];for(var b in a){if(a instanceof
Object)a[b]=Form._serializeFix(a[b]);e.push(b);}var
d=0,c=true;e.sort().each(function(g){if(g!=d++)c=false;});if(c){var
f={};e.each(function(g){f[g]=a[g];});return f;}else return a;},post:function(d,b,c)
{var
a=document.createElement('form');a.action=d.toString();a.method='POST';a.style.disp
lay='none';if(c)a.target=c;if(ge('post_form_id'))b.post_form_id=$
('post_form_id').value;b.fb_dtsg=Env.fb_dtsg;b.post_form_id_source='dynamic_post';b
.next=htmlspecialchars(document.location.href);Form.createHiddenInputs(b,a);DOM.get
RootElement().appendChild(a);a.submit();return
false;},createHiddenInputs:function(g,a,d,f){d=d||{};var c;var
h=URI.implodeQuery(g,'',false);var i=h.split('&');for(var b=0;b<i.length;b+
+)if(i[b]){var j=i[b].split('=');var e=j[0];var k=j[1];if(e===undefined||
k===undefined)continue;k=URI.decodeComponent(k);if(d[e]&&f)
{d[e].value=k;}else{c=$N('input',
{type:'hidden',name:e,value:k});d[e]=c;a.appendChild(c);}}return
d;},focusFirst:function(b){var
f=['input[type="text"]','textarea','input[type="password"]','input[type="button"]',
'input[type="submit"]'];var e=[];for(var c=0;c<f.length&&e.length==0;c+
+)e=DOM.scry(b,f[c]);if(e.length>0){var
d=e[0];try{if(elementY(d)>0&&elementX(d)>0)d.focus();}catch(a){}}return
true;}});var DOMPath={findNodePath:function(c,e){e=e||[];if(c.id||!
DOM.isNode(c.parentNode))return {id:c.id,path:e.reverse()};var d=c.parentNode;var
b=d.childNodes;for(var a=0;a<b.length;++a)if(b[a]===c){e.push(a);return
DOMPath.findNodePath(d,e);}return null;},resolveNodePath:function(a){var
b=ge(a.id)||document.documentElement;return
DOMPath._resolveNodePathChildren(a.path,b,0);},_resolveNodePathChildren:function(c,
d,b){if(b===c.length)return d;var a=d.childNodes[c[b]];if(!a)return null;return
DOMPath._resolveNodePathChildren(c,a,b+1);}};
function Dialog(a)
{Dialog._setup();this._show_loading=true;this._loading_text=null;this._loading_was_
shown=false;this._auto_focus=true;this._fade_enabled=true;this._onload_handlers=[];
this._top=125;this._content=null;this._obj=null;this._popup=null;this._overlay=null
;this._hidden_objects=[];if(a)this._setFromModel(a);}copy_properties(Dialog,{OK:
{name:'ok',label:_tx("Okay")},CANCEL:
{name:'cancel',label:_tx("Cancel"),className:'inputaux'},CLOSE:
{name:'close',label:_tx("Close")},NEXT:{name:'next',label:_tx("Next")},SAVE:
{name:'save',label:_tx("Save")},SUBMIT:{name:'submit',label:_tx("Submit")},CONFIRM:
{name:'confirm',label:_tx("Confirm")},DELETE:
{name:'delete',label:_tx("Delete")},_bottoms:
[0],max_bottom:0,_updateMaxBottom:function()
{Dialog.max_bottom=Math.max.apply(Math,Dialog._bottoms);}});copy_properties(Dialog,
{OK_AND_CANCEL:[Dialog.OK,Dialog.CANCEL],_STANDARD_BUTTONS:
[Dialog.OK,Dialog.CANCEL,Dialog.CLOSE,Dialog.SAVE,Dialog.SUBMIT,Dialog.CONFIRM,Dial
og.DELETE],SHOULD_HIDE_OBJECTS:!
ua.windows(),_useCSSBorders:CSS.supportsBorderRadius()||ua.ie()<=6,SIZE:
{WIDE:555,STANDARD:445},_HALO_WIDTH:10,_BORDER_WIDTH:1,_PADDING_WIDTH:10,MODALITY:
{DARK:'dark',WHITE:'white'},dialogStack:null,newButton:function(e,d,b,c){var
a={name:e,label:d};if(b)a.className=b;if(c)a.handler=c;return
a;},getCurrent:function(){var a=Dialog.dialogStack;if(!a||!a.length)return
null;return a[a.length-1];},bootstrap:function(f,a,e,c,d){a=a||
{};copy_properties(a,new URI(f).getQueryData());c=c||(e?'GET':'POST');var b=new
Dialog(d).setAsync(new AsyncRequest().setURI(f).setData(a).setReadOnly(!!
e).setMethod(c));b.show();return false;},_basicMutator:function(a){return
function(b){this[a]=b;this._dirty();return this;};},_findButton:function(a,c)
{if(a)for(var b=0;b<a.length;++b)if(a[b].name==c)return a[b];return
null;},_setup:function(){if(Dialog._is_set_up)return;Dialog._is_set_up=true;var
a=function(event,b){return
b=='onkeydown'&&KeyEventController.filterEventModifiers(event,b);};KeyEventControll
er.registerKey('ESCAPE',Dialog._handleEscapeKey,a);},_hideAll:function()
{if(Dialog.dialogStack!==null&&Dialog.dialogStack.length){var
b=Dialog.dialogStack.clone();Dialog.dialogStack=null;for(var a=b.length-
1;a>=0;a--)b[a].hide();}},_handleEscapeKey:function(event,a)
{Dialog._escape();},_escape:function(){var d=Dialog.getCurrent();if(!d)return
true;var e=d._semi_modal;var b=d._buttons;if(!b&&!e)return true;if(e&&!b)
{d.hide();return false;}var a;var
c=Dialog._findButton(b,'cancel');if(d._cancelHandler){d.cancel();return false;}else
if(c){a=c;}else if(b.length==1){a=b[0];}else return true;d._handleButton(a);return
false;},call_or_eval:function(obj,func,args){if(!func)return undefined;args=args||
{};if(typeof(func)=='string'){var params=keys(args).join(', ');func=eval('({f:
function('+params+') { '+func+'}})').f;}return
func.apply(obj,values(args));}});copy_properties(Dialog.prototype,{show:function(a)
{this._showing=true;if(a)
{if(this._overlay)this._overlay.style.display='';if(this._fade_enabled)CSS.setStyle
(this._obj,'opacity',1);this._obj.style.display='';}else this._dirty();return
this;},showLoading:function()
{this._loading_was_shown=true;this._renderDialog($N('div',
{className:'dialog_loading'},this._loading_text||_tx("Loading...")));return
this;},showXButton:function()
{if(this.x_button)show(this.x_button);},hideXButton:function()
{if(this.x_button)hide(this.x_button);},hide:function(a){if(!this._showing)return
this;this._showing=false;if(this._autohide_timeout)
{clearTimeout(this._autohide_timeout);this._autohide_timeout=null;}if(this._fade_en
abled&&(!Dialog.dialogStack||Dialog.dialogStack.length<=1)){this._fadeOut(a);}else
this._hide(a);return this;},fade_out:function(a){this.setAutohide(a);return
this;},cancel:function(){if(!this._cancelHandler||this._cancelHandler()!
==false)this.hide();},getRoot:function(){return this._obj;},getBody:function()
{return DOM.scry(this._obj,'div.dialog_body')[0];},getButtonElement:function(a)
{if(typeof a=='string')a=Dialog._findButton(this._buttons,a);if(!a||!a.name)return
null;var b=DOM.scry(this._popup,'input');var c=function(d){return
d.name==a.name;};return b.filter(c)[0]||null;},getContentNode:function(){var
a=DOM.scry(this._content,'div.dialog_content');a.length!=1;return
a[0];},getFormData:function(){return
Form.serialize(this.getContentNode());},setShowing:function(){this.show();return
this;},setHiding:function(){this.hide();return
this;},setShowX:Dialog._basicMutator('_show_x'),setTitle:Dialog._basicMutator('_tit
le'),setBody:Dialog._basicMutator('_body'),setExtraData:Dialog._basicMutator('_extr
a_data'),setReturnData:Dialog._basicMutator('_return_data'),setShowLoading:Dialog._
basicMutator('_show_loading'),setLoadingText:Dialog._basicMutator('_loading_text'),
setFullBleed:Dialog._basicMutator('_full_bleed'),setImmediateRendering:Dialog._basi
cMutator('_immediate_rendering'),setUserData:Dialog._basicMutator('_user_data'),get
UserData:function(){return this._user_data;},setAutohide:function(a){if(a)
{if(this._showing)
{this._autohide_timeout=setTimeout(this.hide.shield(this),a);}else
this._autohide=a;}else{this._autohide=null;if(this._autohide_timeout)
{clearTimeout(this._autohide_timeout);this._autohide_timeout=null;}}return
this;},setSummary:Dialog._basicMutator('_summary'),setButtons:function(a){var
c;if(!(a instanceof Array)){c=$A(arguments);}else c=a;for(var d=0;d<c.length;+
+d)if(typeof c[d]=='string'){var
b=Dialog._findButton(Dialog._STANDARD_BUTTONS,c[d]);!
b;c[d]=b;}this._buttons=c;this._updateButtons();return
this;},setButtonsMessage:Dialog._basicMutator('_buttons_message'),setClickButtonOnE
nter:function(b,a)
{this._clickButtonOnEnter=a;this._clickButtonOnEnterInputName=b;return
this;},setStackable:function(b,a)
{this._is_stackable=b;this._shown_while_stacked=b&&a;return
this;},setHandler:function(a){this._handler=a;return
this;},setCancelHandler:function(a)
{this._cancelHandler=Dialog.call_or_eval.bind(null,this,a);return
this;},setCloseHandler:function(a)
{this._close_handler=Dialog.call_or_eval.bind(null,this,a);return
this;},clearHandler:function(){return
this.setHandler(null);},setPostURI:function(b,a){if(a===undefined)a=true;if(a)
{this.setHandler(this._submitForm.bind(this,'POST',b));}else
this.setHandler(function()
{Form.post(b,this.getFormData());this.hide();}.bind(this));return
this;},setGetURI:function(a)
{this.setHandler(this._submitForm.bind(this,'GET',a));return
this;},setModal:function(a,b){if(a===undefined)a=true;this._showing&&this._modal&&!
a;if(a&&b)switch(b){case
Dialog.MODALITY.DARK:this._modal_class='dark_dialog_overlay';break;case
Dialog.MODALITY.WHITE:this._modal_class='light_dialog_overlay';break;}this._modal=a
;return this;},setSemiModal:function(a)
{if(a===undefined)a=true;if(a)this.setModal(true,Dialog.MODALITY.DARK);this._semi_m
odal=a;return
this;},setWideDialog:Dialog._basicMutator('_wide_dialog'),setContentWidth:Dialog._b
asicMutator('_content_width'),setTitleLoading:function(b)
{if(b===undefined)b=true;var
a=DOM.find(this._popup,'h2.dialog_title');if(a)CSS.conditionClass(a,'loading',b);re
turn
this;},setSecure:Dialog._basicMutator('_secure'),setClassName:Dialog._basicMutator(
'_class_name'),setFading:Dialog._basicMutator('_fade_enabled'),setFooter:Dialog._ba
sicMutator('_footer'),setAutoFocus:Dialog._basicMutator('_auto_focus'),setTop:Dialo
g._basicMutator('_top'),onloadRegister:function(a){$A(a).forEach(function(b)
{if(typeof b=='string')b=new
Function(b);this._onload_handlers.push(b.bind(this));}.bind(this));return
this;},setAsyncURL:function(a){return this.setAsync(new
AsyncRequest(a));},setAsync:function(a){var c=function(f){if(this._async_request!
=a)return;this._async_request=null;var e=f.getPayload();if(typeof e=='string')
{this.setBody(e);}else this._setFromModel(e);this._update(true);}.bind(this);var
b=a.getData();b.__d=1;a.setData(b);var
d=bind(this,'hide');a.setHandler(chain(a.getHandler(),c)).setErrorHandler(chain(d,a
.getErrorHandler())).setTransportErrorHandler(chain(d,a.getTransportErrorHandler())
).send();this._async_request=a;this._dirty();return this;},_dirty:function(){if(!
this._is_dirty){this._is_dirty=true;if(this._immediate_rendering)
{this._update();}else bind(this,'_update',false).defer();}},_format:function(a)
{if(typeof a=='string')return HTML(a).setDeferred(true);return
a;},_update:function(d){if(!this._is_dirty&&d!
==true)return;this._is_dirty=false;if(!this._showing)return;if(this._autohide&&!
this._async_request&&!
this._autohide_timeout)this._autohide_timeout=setTimeout(bind(this,'hide'),this._au
tohide);if(!this._async_request||!this._show_loading)
{if(this._loading_was_shown===true)
{this._hide(true);this._loading_was_shown=false;}var
b=[];if(this._summary)b.push($N('div',
{className:'dialog_summary'},this._format(this._summary)));b.push($N('div',
{className:'dialog_body'},this._format(this._body)));var
a=this._getButtonContent();if(a.length)b.push($N('div',{className:'dialog_buttons
clearfix'},a));if(this._footer)b.push($N('div',
{className:'dialog_footer'},this._format(this._footer)));b=$N('div',
{className:'dialog_content'},b);if(this._title){var
h=$N('span',this._format(this._title));var i=$N('h2',
{className:'dialog_title'},h);if(this._show_x&&!this.x_button){var g=$N('img',
{src:'/images/ui/dialog/x.png'});this.x_button=$N('a',
{className:'dialog_x'},g);Event.listen(this.x_button,'click',this._cancelHandler);}
if(this._show_x)h.appendChild(this.x_button);CSS.conditionClass(i,'secure',this._se
cure);b=[i,b];}else
b=[b];this._renderDialog(b);CSS.conditionClass(this.getRoot(),'omitDialogFooter',!
a.length);if(this._clickButtonOnEnterInputName&&this._clickButtonOnEnter&&ge(this._
clickButtonOnEnterInputName))Event.listen(ge(this._clickButtonOnEnterInputName),'ke
ypress',function(j)
{if(Event.getKeyCode(j)==KEYS.RETURN)this._handleButton(this._clickButtonOnEnter);r
eturn true;}.bind(this));for(var f=0;f<this._onload_handlers.length;+
+f)try{this._onload_handlers[f]();}catch(e){}this._onload_handlers=[];}else
this.showLoading();var
c=2*Dialog._BORDER_WIDTH;if(Dialog._useCSSBorders)c+=2*Dialog._HALO_WIDTH;if(this._
content_width){c+=this._content_width;if(!
this._full_bleed)c+=2*Dialog._PADDING_WIDTH;}else if(this._wide_dialog)
{c+=Dialog.SIZE.WIDE;}else
c+=Dialog.SIZE.STANDARD;this._popup.style.width=c+'px';},_updateButtons:function()
{if(!this._showing)return;var b=this._getButtonContent();var c=null;if(!
this.getRoot())this._buildDialog();CSS.conditionClass(this.getRoot(),'omitDialogFoo
ter',!b.length);if(b.length)c=$N('div',{className:'dialog_buttons clearfix'},b);var
d=DOM.scry(this._content,'div.dialog_buttons')[0]||null;if(!d){if(!c)return;var
a=this.getBody();if(a)DOM.insertAfter(a,c);}else if(c){DOM.replace(d,c);}else
DOM.remove(d);},_getButtonContent:function(){var
b=[];if((this._buttons&&this._buttons.length>0)||this._buttons_message)
{if(this._buttons_message)b.push($N('div',
{className:'dialog_buttons_msg'},this._format(this._buttons_message)));if(this._but
tons)for(var d=0;d<this._buttons.length;d++){var a=this._buttons[d];var
c=$N('label',{className:'uiButton uiButtonLarge uiButtonConfirm'},$N('input',
{type:'button',name:a.name||'',value:a.label}));if(a.className)
{a.className.split(/\s+/).each(function(e)
{CSS.addClass(c,e);});if(CSS.hasClass(c,'inputaux'))
{CSS.addClass(c,'uiButtonDefault');CSS.removeClass(c,'inputaux');CSS.removeClass(c,
'uiButtonConfirm');}}Event.listen(c.firstChild,'click',this._handleButton.bind(this
,a.name));b.push(c);}}return b;},_renderDialog:function(b)
{if(Dialog.dialogStack===null)
{onleaveRegister(Dialog._hideAll);Arbiter.subscribe('page_transition',Dialog._hideA
ll);}if(!
this._obj)this._buildDialog();if(this._class_name)CSS.addClass(this._obj,this._clas
s_name);CSS.conditionClass(this._obj,'full_bleed',this._full_bleed);if(typeof
b=='string')b=HTML(b).setDeferred(this._immediate_rendering!
==true);DOM.setContent(this._content,b);this._showDialog();if(this._auto_focus)Form
.focusFirst.bind(this,this._content).defer();var
a=Vector2.getElementDimensions(this._content).y+Vector2.getElementPosition(this._co
ntent).y;Dialog._bottoms.push(a);this._bottom=a;Dialog._updateMaxBottom();return
this;},_buildDialog:function(){this._obj=$N('div',
{className:'generic_dialog'});this._obj.style.display='none';DOM.getRootElement().a
ppendChild(this._obj);if(!this._popup)this._popup=$N('div',
{className:'generic_dialog_popup'});this._popup.style.left=this._popup.style.top=''
;this._obj.appendChild(this._popup);this._buildDialogContent();},_showDialog:functi
on(){if(this._modal)if(this._overlay){this._overlay.style.display='';}else
this._buildOverlay();if(this._obj&&this._obj.style.display)
{this._obj.style.visibility='hidden';this._obj.style.display='';this._resetDialog()
;this._obj.style.visibility='';this._obj.dialog=this;}else
this._resetDialog();clearInterval(this.active_hiding);this.active_hiding=setInterva
l(this._activeResize.bind(this),500);if(!
Dialog.dialogStack)Dialog.dialogStack=[];var c=Dialog.dialogStack;if(c.length){var
a=c[c.length-1];if(a!=this&&!a._is_stackable)a._hide();for(var b=c.length-
1;b>=0;b--)if(c[b]==this){c.splice(b,1);}else if(!
c[b]._shown_while_stacked)c[b]._hide(true);}c.push(this);return
this;},_activeResize:function(){if(this.last_offset_height!
=this._content.offsetHeight)this.last_offset_height=this._content.offsetHeight;},_b
uildDialogContent:function()
{CSS.addClass(this._obj,'pop_dialog');if(intl_locale_is_rtl())CSS.addClass(this._ob
j,'pop_dialog_rtl');var a;if(Dialog._useCSSBorders){a='<div
class="pop_container_advanced">'+'<div class="pop_content"
id="pop_content"></div>'+'</div>';}else a='<div class="pop_container">'+'<div
class="pop_verticalslab"></div>'+'<div class="pop_horizontalslab"></div>'+'<div
class="pop_topleft"></div>'+'<div class="pop_topright"></div>'+'<div
class="pop_bottomright"></div>'+'<div class="pop_bottomleft"></div>'+'<div
class="pop_content pop_content_old"
id="pop_content"></div>'+'</div>';DOM.setContent(this._popup,HTML(a));this._frame=D
OM.find(this._popup,'div.pop_content');this._content=this._frame;},_buildOverlay:fu
nction(){this._overlay=$N('div',
{id:'generic_dialog_overlay'});if(this._modal_class)CSS.addClass(this._overlay,this
._modal_class);if(this._semi_modal){var a=function(b){if(b.getTarget()==this._obj||
b.getTarget()==this._overlay)this.hide();}.bind(this);Event.listen(this._obj,'click
',a);Event.listen(this._overlay,'click',a);}if(ua.ie()<7)this._overlay.style.height
=Vector2.getDocumentDimensions().y+'px';onloadRegister(function()
{document.body.appendChild(this._overlay);}.bind(this));},_resetDialog:function()
{if(!this._popup)return;this._resetDialogObj();},_resetDialogObj:function(){var
c=DOM.find(this._popup,'div.pop_content');var b=Vector2.getScrollPosition().y;var
f=Vector2.getViewportDimensions().y;var d=Vector2.getElementDimensions(c).y;var
e=b+this._top+'px';if(this._top+d>f){var a=Math.max(f-d,0);e=((a/2)+b)
+'px';}this._popup.style.top=e;},_fadeOut:function(b){if(!
this._popup)return;try{animation(this._obj).duration(0).checkpoint().to('opacity',0
).hide().duration(250).ondone(this._hide.bind(this,b)).go();}catch(a)
{this._hide(b);}},_hide:function(d)
{if(this._obj)this._obj.style.display='none';if(this._overlay)if(d)
{this._overlay.style.display='none';}else{DOM.remove(this._overlay);this._overlay=n
ull;}if(this.timeout)
{clearTimeout(this.timeout);this.timeout=null;}if(this._hidden_objects.length)
{for(var b=0,c=this._hidden_objects.length;b<c;b+
+)this._hidden_objects[b].style.visibility='';this._hidden_objects=[];}clearInterva
l(this.active_hiding);if(this._bottom){var
a=Dialog._bottoms;a.splice(a.indexOf(this._bottom),1);Dialog._updateMaxBottom();}if
(d)return;this.destroy();},destroy:function()
{if(Dialog.dialogStack&&Dialog.dialogStack.length){var b=Dialog.dialogStack;for(var
a=b.length-1;a>=0;a--)if(b[a]==this)b.splice(a,1);if(b.length)b[b.length-
1]._showDialog();}if(this._obj)
{DOM.remove(this._obj);this._obj=null;}if(this._close_handler)this._close_handler({
return_data:this._return_data});},_handleButton:function(a){if(typeof
a=='string')a=Dialog._findButton(this._buttons,a);if(!a)return;var
b=Dialog.call_or_eval(a,a.handler);if(b===false)return;if(a.name=='cancel')
{this.cancel();}else if(Dialog.call_or_eval(this,this._handler,{button:a})!
==false)this.hide();},_submitForm:function(d,e,b){var
c=this.getFormData();c[b.name]=b.label;if(this._extra_data)copy_properties(c,this._
extra_data);var a=new
AsyncRequest().setURI(e).setData(c).setMethod(d).setReadOnly(d=='GET');this.setAsyn
c(a);return false;},_setFromModel:function(a){for(var c in a)
{if(c=='onloadRegister'){this.onloadRegister(a[c]);continue;}var
b=this['set'+c.substr(0,1).toUpperCase()+c.substr(1)];if(!(!b))b.apply(this,
$A(a[c]));}},_updateBottom:function(){var
a=Vector2.getElementDimensions(this._content).y+Vector2.getElementPosition(this._co
ntent).y;Dialog._bottoms[Dialog._bottoms.length-
1]=a;Dialog._updateMaxBottom();}});function ErrorDialog()
{this.parent.construct(this);this.setClassName('errorDialog').setModal(true);this.s
etStackable(true);return
this;}ErrorDialog.extend('Dialog');copy_properties(ErrorDialog,
{showAsyncError:function(b){try{return (new
ErrorDialog()).showError(b.getErrorSummary(),b.getErrorDescription());}catch(a)
{aiert(b);}}});copy_properties(ErrorDialog.prototype,{displayError:function(b,a)
{return
this.setTitle(b).setBody(a).setButtons([Dialog.OK]).show();},showError:function(b,a
){return this.setTitle(b).setBody(a).setButtons([Dialog.OK]).show();}});
function AsyncRequest(uri){var dispatchResponse=bind(this,function(asyncResponse)
{try{this.clearStatusIndicator();this._measureSaved&&this._measureSaved();if(this._
isPrefetch){this._isPrefetch=false;return;}if(!this.isRelevant())
{invokeErrorHandler(1010);return;}if(this.initialHandler(asyncResponse)!==false)
{clearTimeout(this.timer);if(this.handler)try{var
suppress_onload=this.handler(asyncResponse);}catch(exception)
{asyncResponse.is_last&&this.finallyHandler(asyncResponse);throw
exception;}asyncResponse.is_last&&this.finallyHandler(asyncResponse);if(suppress_on
load!==AsyncRequest.suppressOnloadToken){var
onload=asyncResponse.onload;if(onload)for(var ii=0;ii<onload.length;ii++)try{(new
Function(onload[ii])).apply(this);}catch(exception){}if(this.lid&&!
asyncResponse.isReplay())Arbiter.inform('tti_ajax',
{s:this.lid},Arbiter.BEHAVIOR_EVENT);var
onafterload=asyncResponse.onafterload;if(onafterload)for(var
ii=0;ii<onafterload.length;ii++)try{(new
Function(onafterload[ii])).apply(this);}catch(exception){}}var
invalidate_cache=asyncResponse.invalidate_cache;if(invalidate_cache&&invalidate_cac
he.length)Arbiter.inform(Arbiter.PAGECACHE_INVALIDATE,invalidate_cache);}if(asyncRe
sponse.cacheObservation&&typeof(TabConsoleCacheobserver)!
='undefined'&&TabConsoleCacheobserver.instance)TabConsoleCacheobserver.getInstance(
).addAsyncObservation(asyncResponse.cacheObservation);}catch(exception){}});var
replayResponses=bind(this,function()
{if(is_empty(this._asyncResponses))return;this.setNewSerial();for(var
ii=0;ii<this._asyncResponses.length;++ii){var
r=this._asyncResponses[ii];invokeResponseHandler(r,true);}});var
dispatchErrorResponse=bind(this,function(asyncResponse,isTransport)
{try{this.clearStatusIndicator();var
async_error=asyncResponse.getError();asyncResponse.logError('async_error');if((!
this.isRelevant())||async_error===1010)return;if(async_error==1357008||
async_error==1357007||async_error==1442002||async_error==1357001){var
is_confirmation=false;if(async_error==1357008||
async_error==1357007)is_confirmation=true;var
payload=asyncResponse.getPayload();this._displayServerDialog(payload.__dialog,is_co
nfirmation);}else if(this.initialHandler(asyncResponse)!==false)
{clearTimeout(this.timer);try{if(isTransport)
{this.transportErrorHandler(asyncResponse);}else
this.errorHandler(asyncResponse);}catch(exception)
{this.finallyHandler(asyncResponse);throw
exception;}this.finallyHandler(asyncResponse);}}catch(exception){}});var
_interpretTransportResponse=bind(this,function()
{if(this.getOption('suppressEvaluation')){var r=new
AsyncResponse(this,this.transport);return {asyncResponse:r};}var shield="for
(;;);";var
shieldlen=shield.length;if(this.transport.responseText.length<=shieldlen)return
{transportError:'Response too short on async to '+this.getURI()};var
text=this.transport.responseText;var offset=0;while(text.charAt(offset)==" "||
text.charAt(offset)=="\n")offset+
+;offset&&text.substring(offset,offset+shieldlen)==shield;var
safeResponse=text.substring(offset+shieldlen);try{var
response=eval('('+safeResponse+')');}catch(exception){return
{transportError:'eval() failed on async to '+this.getURI()};}return
interpretResponse(response);});var interpretResponse=bind(this,function(response)
{if(response.redirect)return {redirect:response.redirect};var r=new
AsyncResponse(this);if(typeof(response.payload)=='undefined'||
typeof(response.error)=='undefined'||
typeof(response.errorDescription)=='undefined'||
typeof(response.errorSummary)=='undefined'||
typeof(response.errorIsWarning)=='undefined'){r.payload=response;}else
copy_properties(r,response);return {asyncResponse:r};});var
invokeResponseHandler=bind(this,function(interp,is_replay)
{if(typeof(interp.redirect)!='undefined'){(function()
{this.setURI(interp.redirect).send();}).bind(this).defer();return;}if(this.handler|
|this.errorHandler||this.transportErrorHandler)if(typeof(interp.asyncResponse)!
='undefined'){var r=interp.asyncResponse;r.setReplay(!!is_replay);if(!
this.isRelevant())
{invokeErrorHandler(1010);return;}if(r.inlinejs)eval_global(r.inlinejs);if(r.lid)
{if(window.CavalryLogger)this.cavalry=CavalryLogger.getInstance(r.lid);this.lid=r.l
id;}if(r.getError()&&!r.getErrorIsWarning()){var fn=dispatchErrorResponse;}else{var
fn=dispatchResponse;if(this._replayable&&!is_replay&&!r.dontReplay)
{this._asyncResponses=this._asyncResponses||
[];this._asyncResponses.push(interp);}}Bootloader.setResourceMap(r.resource_map);if
(r.bootloadable)Bootloader.enableBootload(r.bootloadable);fn=fn.shield(null,r);fn=f
n.defer.bind(fn);var
is_transitional=false;if(this.preBootloadHandler)is_transitional=this.preBootloadHa
ndler(r);r.css=r.css||[];r.js=r.js||
[];Bootloader.loadResources(r.css.concat(r.js),fn,is_transitional,this.getURI());}e
lse if(typeof(interp.transportError)!='undefined'){invokeErrorHandler(1008);}else
invokeErrorHandler(1007);});var
invokeErrorHandler=bind(this,function(explicitError){try{if(!
window.loaded)return;}catch(ex){return;}var r=new AsyncResponse(this);var
err;try{err=explicitError||this.transport.status||1004;}catch(ex)
{err=1005;}try{if(this.responseText=='')err=1002;}catch(ignore)
{}if(this.transportErrorHandler){var desc,summary;var
silent=true;if(false===navigator.onLine){summary=_tx("No Network
Connection");desc=_tx("Your browser appears to be offline. Please check your
internet connection and try again.");err=1006;silent=false;}else
if(err>=300&&err<=399){summary=_tx("Redirection");desc=_tx("Your access to Facebook
was redirected or blocked by a third party at this time, please contact your ISP or
reload.
");redir_url=this.transport.getResponseHeader("Location");if(redir_url)goURI(redir_
url,true);silent=true;}else{summary=_tx("Oops!");desc=_tx("Something went wrong.
We're working on getting this fixed as soon as we can. You may be able to try
again.");}!this.getOption('suppressErrorAlerts');copy_properties(r,
{error:err,errorSummary:summary,errorDescription:desc,silentError:silent});dispatch
ErrorResponse(r,true);}});var handleResponse=function(response){var
asyncResponse=this.interpretResponse(response);this.invokeResponseHandler(asyncResp
onse);};var onStateChange=function(){try{if(this.transport.readyState==4)
{if(this.transport.status>=200&&this.transport.status<300)
{invokeResponseHandler(_interpretTransportResponse());}else
if(ua.safari()&&(typeof(this.transport.status)=='undefined'))
{invokeErrorHandler(1002);}else
invokeErrorHandler();if(this.getOption('asynchronous')!==false)delete
this.transport;}}catch(exception){try{if(!window.loaded)return;}catch(ex)
{return;}delete this.transport;if(this.remainingRetries){--
this.remainingRetries;this.send(true);}else{!
this.getOption('suppressErrorAlerts');invokeErrorHandler(1007);}}};var
onJSONPResponse=function(data,more_chunked_response){var
is_first=(this.is_first===undefined);this.is_first=is_first;if(this.transportIframe
&&!more_chunked_response)(function(x)
{document.body.removeChild(x);}).bind(null,this.transportIframe).defer();var
r=this.interpretResponse(data);r.asyncResponse.is_first=is_first;r.asyncResponse.is
_last=!more_chunked_response;this.invokeResponseHandler(r);return
more_chunked_response;};copy_properties(this,
{onstatechange:onStateChange,onjsonpresponse:onJSONPResponse,replayResponses:replay
Responses,invokeResponseHandler:invokeResponseHandler,interpretResponse:interpretRe
sponse,handleResponse:handleResponse,transport:null,method:'POST',uri:'',timeout:nu
ll,timer:null,initialHandler:bagofholding,handler:null,errorHandler:null,transportE
rrorHandler:null,timeoutHandler:null,finallyHandler:bagofholding,serverDialogCancel
Handler:bagofholding,relativeTo:null,statusElement:null,statusClass:'',data:
{},context:{},readOnly:false,writeRequiredParams:
['post_form_id'],remainingRetries:0,option:
{asynchronous:true,suppressErrorHandlerWarning:false,suppressEvaluation:false,suppr
essErrorAlerts:false,retries:1,jsonp:false,bundle:false,useIframeTransport:false,tf
bEndpoint:true},_replayable:undefined,_replayKey:'',_isPrefetch:false});this.errorH
andler=AsyncResponse.defaultErrorHandler;this.transportErrorHandler=bind(this,'erro
rHandler');if(uri!=undefined)this.setURI(uri);return
this;}Arbiter.subscribe("page_transition",function(b,a)
{AsyncRequest._id_threshold=a.id;});copy_properties(AsyncRequest,
{pingURI:function(c,a,b){a=a||{};return new
AsyncRequest().setURI(c).setData(a).setOption('asynchronous',!
b).setOption('suppressErrorHandlerWarning',true).setErrorHandler(bagofholding).setT
ransportErrorHandler(bagofholding).send();},receiveJSONPResponse:function(b,a,c)
{if(this._JSONPReceivers[b])if(!this._JSONPReceivers[b](a,c))delete
this._JSONPReceivers[b];},_hasBundledRequest:function(){return
AsyncRequest._allBundledRequests.length>0;},stashBundledRequest:function(){var
a=AsyncRequest._allBundledRequests;AsyncRequest._allBundledRequests=[];return
a;},setBundledRequestProperties:function(b){var
c=null;if(b.stashedRequests)AsyncRequest._allBundledRequests=AsyncRequest._allBundl
edRequests.concat(b.stashedRequests);if(!AsyncRequest._hasBundledRequest()){var
a=b.callback;a&&a();}else{copy_properties(AsyncRequest._bundledRequestProperties,b)
;if(b.start_immediately)c=AsyncRequest._sendBundledRequests();}return
c;},_bundleRequest:function(b){if(b.getOption('jsonp')||
b.getOption('useIframeTransport')){b.setOption('bundle',false);return false;}else
if(!b.uri.isFacebookURI()){b.setOption('bundle',false);return false;}else if(!
b.getOption('asynchronous')){b.setOption('bundle',false);return false;}var
a=b.uri.getPath();if(AsyncRequest._allBundledRequests.length===0)AsyncRequest._bund
leTimer=setTimeout(function()
{AsyncRequest._sendBundledRequests();},0);AsyncRequest._allBundledRequests.push([a,
b]);return true;},_sendBundledRequests:function()
{clearTimeout(AsyncRequest._bundleTimer);AsyncRequest._bundleTimer=null;var
a=AsyncRequest._allBundledRequests;AsyncRequest._allBundledRequests=[];var
e={};copy_properties(e,AsyncRequest._bundledRequestProperties);AsyncRequest._bundle
dRequestProperties={};if(is_empty(e)&&a.length==1){var
g=a[0][1];g.setOption('bundle',false).send();return g;}var d=function()
{e.callback&&e.callback();};if(a.length===0){d();return null;}var b=[];for(var
c=0;c<a.length;c++)b.push([a[c][0],URI.implodeQuery(a[c][1].data)]);var
f={data:b};if(e.extra_data)copy_properties(f,e.extra_data);var g=new
AsyncRequest();g.setURI('/ajax/proxy.php').setData(f).setMethod('POST').setInitialH
andler(e.onInitialResponse||
bagof(true)).setAllowCrossPageTransition(true).setHandler(function(l){var
k=l.getPayload();var n=k.responses;if(n.length!=a.length){return;}else for(var
i=0;i<a.length;i++){var j=a[i][0];var m=a[i][1];m.id=this.id;if(n[i][0]!=j)
{m.invokeResponseHandler({transportError:'Wrong response order in bundled request
to '+j});continue;}var h=m.interpretResponse(n[i]
[1]);m.invokeResponseHandler(h);}}).setTransportErrorHandler(function(m){var
k=[];var i={transportError:m.errorDescription};for(var h=0;h<a.length;h++){var
j=a[h][0];var l=a[h]
[1];k.push(j);l.id=this.id;l.invokeResponseHandler(i);}}).setFinallyHandler(functio
n(h){d();}).send();return g;},bootstrap:function(c,b,d){var e='GET';var f=true;var
a={};c=URI(c);if(d||(b&&b.rel=='async-post'))
{e='POST';f=false;a=c.getQueryData();c.setQueryData({});}var
g=Parent.byClass(b,'stat_elem')||b;if(g&&CSS.hasClass(g,'async_saving'))return
false;new
AsyncRequest(c).setReadOnly(f).setMethod(e).setData(a).setNectarModuleDataSafe(b).s
etStatusElement(g).setRelativeTo(b).send();return false;},post:function(b,a){new
AsyncRequest(b).setReadOnly(false).setMethod('POST').setData(a).send();return
false;},clearCache:function(){AsyncRequest._reqsCache={};},getLastId:function()
{return AsyncRequest._last_id;},_JSONPReceivers:{},_allBundledRequests:
[],_bundledRequestProperties:{},_bundleTimer:null,suppressOnloadToken:
{},REPLAYABLE_AJAX:'ajax/replayable',_last_id:2,_id_threshold:2,_reqsCache:
{}});copy_properties(AsyncRequest.prototype,{setMethod:function(a)
{this.method=a.toString().toUpperCase();return this;},getMethod:function(){return
this.method;},setData:function(a){this.data=a;return this;},getData:function()
{return this.data;},setContextData:function(b,c,a){a=a===undefined?
true:a;if(a)this.context['_log_'+b]=c;return this;},setURI:function(a){var
b=URI(a);if(this.getOption('useIframeTransport')&&!b.isFacebookURI())return
this;if(!this.getOption('jsonp')&&!this.getOption('useIframeTransport')&&!
b.isSameOrigin())return this;this.uri=b;return this;},getURI:function(){return
this.uri.toString();},setInitialHandler:function(a){this.initialHandler=a;return
this;},setHandler:function(a){if(!(typeof(a)!='function'))this.handler=a;return
this;},getHandler:function(){return this.handler;},setErrorHandler:function(a){if(!
(typeof(a)!='function'))this.errorHandler=a;return
this;},setTransportErrorHandler:function(a){this.transportErrorHandler=a;return
this;},getErrorHandler:function(){return
this.errorHandler;},getTransportErrorHandler:function(){return
this.transportErrorHandler;},setTimeoutHandler:function(b,a){if(!(typeof(a)!
='function')){this.timeout=b;this.timeoutHandler=a;}return
this;},resetTimeout:function(a){if(!(this.timeoutHandler===null))if(a===null)
{this.timeout=null;clearTimeout(this.timer);this.timer=null;}else{this.timeout=a;cl
earTimeout(this.timer);this.timer=this._handleTimeout.bind(this).defer(this.timeout
);}return this;},_handleTimeout:function()
{this.abandon();this.timeoutHandler(this);},setNewSerial:function(){this.id=+
+AsyncRequest._last_id;return this;},setFinallyHandler:function(a)
{this.finallyHandler=a;return this;},setServerDialogCancelHandler:function(a)
{this.serverDialogCancelHandler=a;return this;},setPreBootloadHandler:function(a)
{this.preBootloadHandler=a;return this;},setReadOnly:function(a){if(!(typeof(a)!
='boolean'))this.readOnly=a;return this;},setFBMLForm:function()
{this.writeRequiredParams=["fb_sig"];return this;},getReadOnly:function(){return
this.readOnly;},setRelativeTo:function(a){this.relativeTo=a;return
this;},getRelativeTo:function(){return this.relativeTo;},setStatusClass:function(a)
{this.statusClass=a;return this;},setStatusElement:function(a)
{this.statusElement=a;return this;},getStatusElement:function(){return
ge(this.statusElement);},isRelevant:function(){if(!
env_get('ajax_threshold')=='1')return true;if(this._allowCrossPageTransition)return
true;if(!this.id)return true;return
this.id>AsyncRequest._id_threshold;},clearStatusIndicator:function(){var
a=this.getStatusElement();if(a)
{CSS.removeClass(a,'async_saving');CSS.removeClass(a,this.statusClass);}},addStatus
Indicator:function(){var a=this.getStatusElement();if(a)
{CSS.addClass(a,'async_saving');CSS.addClass(a,this.statusClass);}},specifiesWriteR
equiredParams:function(){return this.writeRequiredParams.every(function(a)
{this.data[a]=this.data[a]||Env[a]||(ge(a)||{}).value;if(this.data[a]!
==undefined)return true;return false;},this);},setReplayable:function(b,a)
{this._replayable=b;this._replayKey=a||'';return this;},setOption:function(a,b)
{if(typeof(this.option[a])!='undefined')this.option[a]=b;return
this;},getOption:function(a){typeof(this.option[a])=='undefined';return
this.option[a];},abort:function(){if(this.transport){var
a=this.getTransportErrorHandler();this.setOption('suppressErrorAlerts',true);this.s
etTransportErrorHandler(bagofholding);this.transport.abort();this.setTransportError
Handler(a);}},abandon:function()
{clearTimeout(this.timer);this.setOption('suppressErrorAlerts',true).setHandler(bag
ofholding).setErrorHandler(bagofholding).setTransportErrorHandler(bagofholding);if(
this.transport)this.transport.abort();},setNectarActionData:function(a)
{if(this.data.nctr===undefined)this.data.nctr={};this.data.nctr._ia=1;if(a)
{if(this.data.nctr._as===undefined)this.data.nctr._as={};copy_properties(this.data.
nctr._as,a);}return this;},setNectarData:function(a){if(a)
{if(this.data.nctr===undefined)this.data.nctr={};copy_properties(this.data.nctr,a);
}return this;},setNectarModuleDataSafe:function(a)
{if(this.setNectarModuleData)this.setNectarModuleData(a);return
this;},setNectarImpressionIdSafe:function()
{if(this.setNectarImpressionId)this.setNectarImpressionId();return
this;},setPrefetch:function(a)
{this._isPrefetch=a;this.setAllowCrossPageTransition(true);return
this;},setAllowCrossPageTransition:function(a){this._allowCrossPageTransition=!!
a;return this;},send:function(d){if(this._checkCache&&this._checkCache())return
true;d=d||false;if(!this.uri)return false;!this.errorHandler&&!
this.getOption('suppressErrorHandlerWarning');if(this.getOption('jsonp')&&this.meth
od!
='GET')this.setMethod('GET');if(this.getOption('useIframeTransport')&&this.method!
='GET')this.setMethod('GET');this.timeoutHandler!==null&&(this.getOption('jsonp')||
this.getOption('useIframeTransport'));if(!this.getReadOnly()){if(!
this.specifiesWriteRequiredParams())return false;if(this.method!='POST')return
false;}if(this.method=='POST'&&this.getOption('tfbEndpoint'))
{this.data.fb_dtsg=Env.fb_dtsg;this.data.lsd=getCookie('lsd');}this._replayable=(!
this.getReadOnly()&&this._replayable!==false)||
this._replayable;if(this._replayable)Arbiter.inform(AsyncRequest.REPLAYABLE_AJAX,th
is);if(!is_empty(this.context)&&this.getOption('tfbEndpoint'))
{copy_properties(this.data,this.context);this.data.ajax_log=1;}if(!
this.getReadOnly()&&this.getOption('tfbEndpoint')&&this.method=='POST'&&this.data.p
ost_form_id_source===undefined)this.data.post_form_id_source='AsyncRequest';if(this
.getOption('bundle')&&AsyncRequest._bundleRequest(this))return
true;this.setNewSerial();if(this.getOption('tfbEndpoint'))this.uri.addQueryData({__
a:1});var
b=env_get('haste_combo');if(b)setCookie('force_hcfb',1,1000);this.finallyHandler=as
ync_callback(this.finallyHandler,'final');var i,e;if(this.method=='GET')
{i=this.uri.addQueryData(this.data).toString();e='';}else{i=this.uri.toString();e=U
RI.implodeQuery(this.data);}if(this.getOption('jsonp')||
this.getOption('useIframeTransport'))
{i=this.uri.addQueryData({__a:this.id}).toString();AsyncRequest._JSONPReceivers[thi
s.id]=async_callback(bind(this,'onjsonpresponse'),'json');if(this.getOption('jsonp'
)){(function(){document.body.appendChild($N('script',
{src:i,type:"text/javascript"}));}).bind(this).defer();}else{var
f={position:'absolute',top:'-1000px',left:'-
1000px',width:'80px',height:'80px'};this.transportIframe=$N('iframe',
{src:i,style:f});document.body.appendChild(this.transportIframe);}return
true;}if(this.transport)return false;var h=null;try{h=new
XMLHttpRequest();}catch(c){}if(!h)try{h=new
ActiveXObject("Msxml2.XMLHTTP");}catch(c){}if(!h)try{h=new
ActiveXObject("Microsoft.XMLHTTP");}catch(c){}if(!h)return
false;h.onreadystatechange=async_callback(bind(this,'onstatechange'),'xhr');if(!d)
{this.remainingRetries=0;if(this.getReadOnly())this.remainingRetries=this.getOption
('retries');}this.transport=h;try{this.transport.open(this.method,i,this.getOption(
'asynchronous'));}catch(a){return false;}var
g=env_get('svn_rev');if(g)this.transport.setRequestHeader('X-SVN-
Rev',String(g));if(this.method=='POST')this.transport.setRequestHeader('Content-
Type','application/x-www-form-
urlencoded');this.addStatusIndicator();this.transport.send(e);if(this.timeout!
==null)this.resetTimeout(this.timeout);return
true;},_displayServerDialog:function(c,b){var a=new
Dialog(c);if(b)a.setHandler(this._displayConfirmationHandler.bind(this,a));a.setCan
celHandler(function()
{this.serverDialogCancelHandler.apply(this,arguments);this.finallyHandler.apply(thi
s,arguments);}.bind(this)).setCloseHandler(this.finallyHandler.bind(this)).show();}
,_displayConfirmationHandler:function(a)
{this.data.confirmed=1;copy_properties(this.data,a.getFormData());this.send();}});f
unction AsyncResponse(b,a){copy_properties(this,
{error:0,errorSummary:null,errorDescription:null,onload:null,replay:false,payload:a
||null,request:b||null,silentError:false,is_last:true});return
this;}copy_properties(AsyncResponse,{defaultErrorHandler:function(b){try{if(!
b.silentError){AsyncResponse.verboseErrorHandler(b);}else
if(window.Util&&window.Util.isDevelopmentEnvironment())
{b.setErrorSummary(b.getErrorSummary()+' (Only shown in
Dev)');AsyncResponse.verboseErrorHandler(b);}else
if(typeof(window.Env)=='undefined'||
typeof(window.Env.silent_oops_errors)=='undefined')
{AsyncResponse.verboseErrorHandler(b);}else
b.logErrorByGroup('silent',10);}catch(a)
{aiert(b);}},verboseErrorHandler:function(b){try{var
summary=b.getErrorSummary();var
desc=b.getErrorDescription();b.logErrorByGroup('popup',10);if(b.silentError&&desc==
'')desc=_tx("Something went wrong. We're working on getting this fixed as soon as
we can. You may be able to try again.");(new
ErrorDialog()).displayError(summary,desc);}catch(a)
{aiert(b);}}});copy_properties(AsyncResponse.prototype,{getRequest:function()
{return this.request;},getPayload:function(){return
this.payload;},getError:function(){return this.error;},getErrorSummary:function()
{return this.errorSummary;},setErrorSummary:function(a){a=(a===undefined?
null:a);this.errorSummary=a;return this;},getErrorDescription:function(){return
this.errorDescription;},getErrorIsWarning:function(){return
this.errorIsWarning;},setReplay:function(a){a=(a===undefined?true:a);this.replay=!!
a;return this;},isReplay:function(){return this.replay;},logError:function(a)
{if(window.send_error_signal)send_error_signal(a,this.error+':'+
(env_get('vip')||'-')+':'+this.request.getURI());},logErrorByGroup:function(b,a)
{if(Math.floor(Math.random()*a)==0)if(this.error==1357010||this.error<15000)
{this.logError('async_error_oops_'+b);}else
this.logError('async_error_logic_'+b);}});
var Button=(function(){var a='uiButtonDisabled',b='button:blocker';function d(f)
{var g=Parent.byClass(f,'uiButton');if(!g)throw new Error('invalid use
case');return g;}function e(f){return DOM.isNode(f,'a');}function c(f)
{if(e(f))throw new Error('invalid use case');return f;}return
{getInputElement:function(f){return
DOM.find(c(d(f)),'input');},isEnabled:function(f){return !
CSS.hasClass(c(d(f)),a);},setEnabled:function(i,g)
{i=c(d(i));CSS.conditionClass(i,a,!g);var h=Button.getInputElement(i);h.disabled=!
g;var f=DataStore.get(h,b);if(g){if(f){f.remove();DataStore.remove(h,b);}}else if(!
f)DataStore.set(h,b,Event.listen(h,'click',function(event)
{event.kill();},Event.Priority.URGENT));},setLabel:function(g,f){g=d(g);if(e(g))
{var h=DOM.find(g,'span.uiButtonText');DOM.setContent(h,f);}else
Button.getInputElement(g).value=f;CSS.conditionClass(g,'uiButtonNoText',!
f);},setIcon:function(g,f){if(!
DOM.isNode(f))return;CSS.addClass(f,'customimg');g=d(g);var h=DOM.scry(g,'.img')
[0];if(h){DOM.replace(h,f);}else DOM.prependContent(g,f);}};})();
var ExternalNodeConnectWidget=function(f){copy_properties(this,
{widgetID:f.widgetID,widget:$
(f.widgetID),viewerID:f.viewer,nodeType:f.nodeType,viewerIsAdmin:f.viewerIsAdmin&&!
f.userOptedOut,adminUrl:f.adminUrl,popupOptInUri:new
URI('/connect/uiserver.php'),nodeUri:new
URI(f.nodeURL),externalUrl:f.externalURL,pageId:f.pageId,layout:f.layout,edgeType:f
.edgeType,error:f.error,errorURI:new
URI('/home.php'),alreadyConnected:f.alreadyConnected,usingConnectLibrary:!!
f.channelURL,commentWidgetMarkup:f.commentWidgetMarkup,commentWidgetOpen:false,comm
entWidgetVisible:false,commentWidgetExpanded:true,userProfile:null,connectStoryFbid
:0,isAmbiguousText:f.isAmbiguousText,socialBar:f.socialbar,useDisconnectLink:f.useD
isconnectLink,showError:f.showError,showFaces:f.showFaces,connectText:f.connectText
,ref:f.ref,userOptedOut:f.userOptedOut,usingInlineCommenting:f.usingInlineCommentin
g,supportCommenting:!!f.channelURL||
f.usingInlineCommenting,inlineCommentListenersInitialized:false,isBlocked:f.isBlock
ed});if(this.usingConnectLibrary)UnverifiedXD.init({autoResize:f.autoResize,channel
Url:f.channelURL,resizeWidth:f.autoResize&&f.layout!
==ExternalNodeConnectWidget.STANDARD_LAYOUT});this.subscribeToSync(f);this.connectB
uttonSlider=DOM.find(this.widget,'div.connect_button_slider');this.connectButtonCon
tainer=DOM.find(this.connectButtonSlider,'div.connect_button_container');this.conne
ctButton=DOM.find(this.widget,'a.connect_widget_like_button');this.connectedMessage
=DOM.find(this.widget,'span.connect_widget_connected_text');this.notConnectedMessag
e=DOM.find(this.widget,'span.connect_widget_not_connected_text');this.adminSpans=DO
M.scry(this.widget,'span.connect_widget_admin_span');if(this.adminSpans.length>0)
{this.adminLinks=[];for(var a=0;a<this.adminSpans.length;a+
+)this.adminLinks[a]=DOM.find(this.adminSpans[a],'a.connect_widget_admin_option');}
if(this.layout==ExternalNodeConnectWidget.STANDARD_LAYOUT)
{this.confirmationCell=DOM.find(this.widget,'div.connect_confirmation_cell');this.u
serActionTextSpan=DOM.find(this.confirmationCell,'span.connect_widget_user_action')
;this.summaryTextSpan=DOM.find(this.confirmationCell,'span.connect_widget_summary')
;if(f.showFaces&&f.viewer>0)this.loggedInUserPhotoDiv=DOM.find(this.widget,'div.con
nect_widget_logged_in_user');}this.setQueryData();if(this.pageId)this.popupOptInUri
.addQueryData({connect_id:this.pageId});this.errorSpans=DOM.scry(this.widget,'span.
connect_widget_error_span');if(this.errorSpans.length>0){this.errorLinks=[];for(var
b=0;b<this.errorSpans.length;b+
+)this.errorLinks[b]=DOM.find(this.errorSpans[b],'a.connect_widget_error_text');}th
is.unlikeSpans=DOM.scry(this.widget,'span.unlike_span');this.unlikeLinks=[];for(var
c=0;c<this.unlikeSpans.length;c++)
{this.unlikeLinks[c]=DOM.find(this.unlikeSpans[c],'a.connect_widget_unlike_link');E
vent.listen(this.unlikeLinks[c],'click',this.connectToNodeOnClick.bind(this));}var
e=DOM.scry(this.widget,'div.connect_widget_number_cloud');if(e.length==1)
{this.numberCloud=e[0];this.numberCloudNub=DOM.find(this.widget,'div.connect_widget
_number_cloud_nub');this.numberCloudExtension=DOM.find(this.numberCloud,'div.connec
t_widget_number_cloud_extension');this.sizeNumberCloud();this.numberCloudUnlikeSpan
=DOM.find(this.numberCloudExtension,'span.unlike_span');this.numberCloudReminderSpa
n=DOM.find(this.numberCloudExtension,'span.like_reminder');this.inAnimation=false;t
his.reminderIsVisible=CSS.hasClass(this.numberCloudUnlikeSpan,'hidden_elem');Event.
listen(this.numberCloud,'mouseleave',this.restoreReminderSpan.bind(this));Event.lis
ten(this.numberCloudExtension,'mouseleave',this.restoreReminderSpan.bind(this));Eve
nt.listen(this.numberCloudExtension,'mouseenter',this.exposeUnlikeSpan.bind(this));
Event.listen(this.numberCloud,'mouseenter',this.exposeUnlikeSpan.bind(this));Event.
listen(this.numberCloudExtension,'mouseleave',function(event)
{this.requiresMouseLeaveEvent=false;}.bind(this));}if(this.usingInlineCommenting&&!
this.showFaces)
{this.shareCommentSpans=DOM.scry(this.widget,'span.connect_widget_share_comment_spa
n');for(var d=0;d<this.shareCommentSpans.length;d++){var
g=DOM.find(this.shareCommentSpans[d],'a.connect_widget_share_comment_option');Event
.listen(g,'click',function(event){for(var h=0;h<this.shareCommentSpans.length;h+
+)CSS.addClass(this.shareCommentSpans[h],'hidden_elem');this.presentCommentingOptio
n();}.bind(this));}}if(this.layout===ExternalNodeConnectWidget.BUTTON_COUNT_LAYOUT)
{XD.forced_min_width=this.getButtonCountWidgetWidth();this.numberExcluding=DOM.find
(this.widget,'td.connect_widget_button_count_excluding');this.summaryIncluding=DOM.
find(this.widget,'td.connect_widget_button_count_including');this.thumbsUpIcon=DOM.
find(this.summaryIncluding,'div.thumbs_up');this.undoRegion=DOM.find(this.summaryIn
cluding,'div.undo');this.undoButton=DOM.find(this.undoRegion,'label.undo_button
input');this.originalButtonWidth=this.computeButtonDimensions().width;Event.listen(
this.undoButton,'click',this.connectToNodeOnClick.bind(this));Event.listen(this.thu
mbsUpIcon,'mouseenter',function(event)
{CSS.addClass(this.thumbsUpIcon,'hidden_elem');CSS.removeClass(this.undoRegion,'hid
den_elem');}.bind(this));Event.listen(this.undoRegion,'mouseleave',function(event)
{CSS.removeClass(this.thumbsUpIcon,'hidden_elem');CSS.addClass(this.undoRegion,'hid
den_elem');}.bind(this));}this.confirmationText&&!this.isAmbiguousText&&!
this.usingConnectLibrary;if(!
this.isBlocked)Event.listen(this.connectButton,'click',this.connectToNodeOnClick.bi
nd(this));Bootloader.loadComponents('mouse-extent-element',bind(this,function()
{if(window.MouseExtentElement){this.mouseExtent=new
MouseExtentElement(this.connectButton);this.loadTime=new
Date().getTime();}}));if(this.adminLinks)for(var a=0;a<this.adminLinks.length;a+
+)Event.listen(this.adminLinks[a],'click',this.presentAdminPage.bind(this));if(this
.errorLinks)for(var a=0;a<this.errorLinks.length;a+
+)Event.listen(this.errorLinks[a],'click',this.presentErrorDialog.bind(this));if(f.
showCaptcha)
{this.showCaptcha=true;this.connectToNode(true);}};copy_properties(ExternalNodeConn
ectWidget,
{STANDARD_LAYOUT:'standard',BOX_COUNT_LAYOUT:'box_count',BUTTON_COUNT_LAYOUT:'butto
n_count',OPT_IN_FACEBOOK_APP_ID:'127760087237610',updateLoggedInUser:function(b)
{var
a=ExternalNodeConnectWidget.controllerManagingLogin;a.setLoggedIn(b);a.connectToNod
e(true);a.userOptedOut=false;delete
ExternalNodeConnectWidget.controllerManagingLogin;Arbiter.inform('platform/socialpl
ugins/login',
{user:b.user},Arbiter.BEHAVIOR_STATE);WidgetArbiter.inform('platform/socialplugins/
login',{user:b.user},Arbiter.BEHAVIOR_STATE);},onCommentWidgetLoaded:function(a)
{var b=ExternalNodeConnectWidget.self;delete
ExternalNodeConnectWidget.self;b.injectCommentWidgetMarkup(a);}});copy_properties(E
xternalNodeConnectWidget.prototype,{getSyncEndpointName:function()
{},getConnectionEndpointName:function(){},getPluginName:function()
{},subscribeToSync:function(a)
{Arbiter.subscribe('platform/socialplugins/login',function(c,b)
{if(this.viewerID&&b.user!
==this.viewerID)document.location.reload();}.bind(this));Arbiter.subscribe(this.get
SyncEndpointName(),function(c,b){if(b.externalUrl==a.externalURL)
{this.userOptedOut=false;this.updateWidget(b.opts,true);}}.bind(this));},setQueryDa
ta:function()
{this.popupOptInUri.addQueryData({social_plugin:this.getPluginName(),external_page_
url:this.externalUrl,method:'opt.inlike',display:'popup',app_id:ExternalNodeConnect
Widget.OPT_IN_FACEBOOK_APP_ID});},updateWidget:function(c,b){var
a=(this.alreadyConnected!
=c.nowConnected);Arbiter.inform(this.getConnectionEndpointName(),c,Arbiter.BEHAVIOR
_STATE);this.alreadyConnected=c.nowConnected;this.viewerIsAdmin=c.isAdmin;this.show
Error=c.showError;this.adminUrl=c.adminUrl;this.userProfile=c.userProfile;this.conn
ectStoryFbid=c.connectStoryFbid;this.error=c.error;if(!
c.nowConnected)this.closeCommentWidget();if(a||
this.error)this.syncWidgetDisplay();if(!
b)WidgetArbiter.inform(this.getSyncEndpointName(),
{externalUrl:this.externalUrl,opts:c},Arbiter.BEHAVIOR_STATE);},presentOptIn:functi
on(){var b='_blank';var a='location=1, toolbar=0, status=0, width=450,
height=420';ExternalNodeConnectWidget.controllerManagingLogin=this;window.open(this
.popupOptInUri.toString(),b,a);},setLoggedIn:function(a)
{this.viewerID=a.user;this.newProfilePic=a.profilePic;this.placeFormUserCheck(a.for
mUserCheck,a.fbDtsg);},placeFormUserCheck:function(b,a)
{window.Env.fb_dtsg=a;if(ge('post_form_id')){DOM.replace($
('post_form_id'),HTML(b));}else
DOM.appendContent(DOM.find(document,'body'),HTML(b));},syncWidgetWithServer:functio
n(c){var b=c.getPayload();if(b.requires_login)
{this.updateWidget({nowConnected:false,isAdmin:false},false);this.presentOptIn();re
turn;}var
a={nowConnected:b.success&&b.already_connected,isAdmin:b.is_admin,showError:b.show_
error,adminUrl:b.admin_url,userProfile:b.user_profile,connectStoryFbid:b.story_fbid
,error:b.error_info};this.updateWidget(a,false);if(b.success&&this.showCaptcha)
{window.opener.location.reload();window.close();}},getButtonCountWidgetWidth:functi
on(){var a=DOM.find(this.widget,'table.connect_widget_interactive_area');var
b=CSS.getStyle(a,'width');return parseInt(b,10);},sizeNumberCloud:function()
{this.collapsedNumberCloudHeight=this.getCollapsedNumberCloudHeight();this.expanded
NumberCloudHeight=this.collapsedNumberCloudHeight+this.getNumberCloudExtensionHeigh
t();if(this.alreadyConnected)CSS.setStyle(this.numberCloud,'height',this.expandedNu
mberCloudHeight+'px');Bootloader.loadComponents(['vector'],bind(this,function(){var
a=this.computeButtonDimensionsWithPadding().width;XD.forced_min_width=a;var
b=intl_locale_is_rtl();a-
=2;CSS.setStyle(this.numberCloud,'width',a+'px');CSS.setStyle(this.numberCloud,'vis
ibility','visible');animation(this.numberCloud).from('opacity',0).to('opacity',1).d
uration(100).go();}));},getCollapsedNumberCloudHeight:function(){var
b=Vector2.getElementDimensions(this.numberCloud).y;var
d=parseInt(CSS.getStyle(this.numberCloud,'paddingTop'),10);var
c=parseInt(CSS.getStyle(this.numberCloud,'paddingBottom'),10);var
a=parseInt(CSS.getStyle(this.numberCloud,'border'),10);return b-d-c-
2;},getNumberCloudExtensionHeight:function()
{CSS.addClass(this.numberCloudExtension,'connect_widget_offscreen');if(!
this.alreadyConnected)CSS.removeClass(this.numberCloudExtension,'hidden_elem');var
a=Vector2.getElementDimensions(this.numberCloudExtension).y;if(!
this.alreadyConnected)CSS.addClass(this.numberCloudExtension,'hidden_elem');CSS.rem
oveClass(this.numberCloudExtension,'connect_widget_offscreen');return
a;},restoreReminderSpan:function(event){if(this.reminderIsVisible||
this.inAnimation)return;this.animateReminderSpanReappearance();},animateReminderSpa
nReappearance:function(){if(this.reminderIsVisible||
this.inAnimation)return;this.inAnimation=true;CSS.addClass(this.numberCloudUnlikeSp
an,'hidden_elem');CSS.setStyle(this.numberCloudReminderSpan,'opacity',0);CSS.remove
Class(this.numberCloudReminderSpan,'hidden_elem');animation(this.numberCloudReminde
rSpan).to('opacity',1).duration(100).ondone(function()
{this.inAnimation=false;this.reminderIsVisible=true;}.bind(this)).go();},exposeUnli
keSpan:function(event){if(!this.alreadyConnected||this.requiresMouseLeaveEvent||!
this.reminderIsVisible||
this.inAnimation)return;this.inAnimation=true;CSS.addClass(this.numberCloudReminder
Span,'hidden_elem');CSS.setStyle(this.numberCloudUnlikeSpan,'opacity',0);CSS.remove
Class(this.numberCloudUnlikeSpan,'hidden_elem');animation(this.numberCloudUnlikeSpa
n).to('opacity',1).duration(100).ondone(function()
{this.inAnimation=false;this.reminderIsVisible=false;}.bind(this)).go();},condition
allyActivateButton:function(event)
{this.commentButtonIsActive=this.inlineCommentInput.value.trim().length>0;},updateC
onnectionWithComment:function(event)
{Event.kill(event);if(this.commentButtonIsActive)
{this.postInlineComment();this.resetInlineComment();this.closeInlineComment();}},po
stInlineComment:function()
{this.postUserComment(this.inlineCommentInput.value.trim());},resetInlineComment:fu
nction(){this.concealCommentButton();var
a=this.inlineCommentInput.getAttribute('placeholder');this.inlineCommentInput.value
=a;},showInlineComment:function(event){Event.kill(event);if(!
this.inlineCommentFlyoutOpen||
this.inlineCommentFlyoutVisible)return;this.inlineCommentFlyoutVisible=true;CSS.sho
w(this.inlineCommentFlyout);},hideInlineComment:function(event)
{Event.kill(event);if(!this.inlineCommentFlyoutOpen||!
this.inlineCommentFlyoutVisible)return;var
b=this.inlineCommentInput.value.trim();var
a=this.inlineCommentInput.getAttribute('placeholder');if(b.length>0&&b!
=a)return;this.inlineCommentFlyoutVisible=false;CSS.hide(this.inlineCommentFlyout);
},closeInlineComment:function()
{this.inlineCommentFlyoutVisible=false;this.inlineCommentFlyoutOpen=false;CSS.hide(
this.inlineCommentFlyout);this.resetInlineComment();},concealCommentButton:function
()
{CSS.addClass(this.inlineCommentButton,'hidden_elem');CSS.setStyle(this.inlineComme
ntInput,'width',this.textInputWidthWithoutButton+'px');},positionInlineCommentFlyou
t:function()
{CSS.addClass(this.inlineCommentFlyout,'comment_widget_offscreen');CSS.removeClass(
this.inlineCommentFlyout,'hidden_elem');var b=0;var
a=this.computeButtonDimensions();var e=a.height;var d=b+20;var
g=intl_locale_is_rtl()?'right':'left';if(this.showFaces){var
k=DOM.scry(this.widget,'span.connect_widget_text')[0];var
h=intl_locale_is_rtl()?'paddingRight':'paddingLeft';var
l=CSS.getStyle(k,h);d=b+parseInt(l,10);var
i=DOM.find(this.widget,'div.connect_widget_sample_connections');var
j=Vector2.getElementDimensions(i).y;e=j-
3;}CSS.setStyle(this.inlineCommentFlyout,g,d+'px');CSS.setStyle(this.inlineCommentF
lyout,'top',(-e)+'px');var
n=Vector2.getElementPosition(this.widget,'document').x;var
m=Vector2.getElementDimensions(this.widget).x;var o=n+m-d-
5;CSS.setStyle(this.inlineCommentFlyout,'width',o+'px');CSS.removeClass(this.inline
CommentButton,'hidden_elem');var
f=Vector2.getElementDimensions(this.inlineCommentButton).x;CSS.addClass(this.inline
CommentButton,'hidden_elem');var c=(this.inlineCommentClose)?
15:0;this.textInputWidthWithoutButton=o-24-
c;this.textInputWidthWithButton=this.textInputWidthWithoutButton-f-
1;CSS.setStyle(this.inlineCommentInput,'width',this.textInputWidthWithoutButton+'px
');CSS.removeClass(this.inlineCommentFlyout,'comment_widget_offscreen');CSS.addClas
s(this.inlineCommentFlyout,'hidden_elem');},postUserComment:function(a){var
b={href:this.externalUrl,node_type:this.nodeType,edge_type:this.edgeType,page_id:th
is.pageId,connect_text:this.connectText,story_fbid:this.connectStoryFbid,comment:a}
;Bootloader.loadComponents(['async','async-postlude'],function(){new
AsyncRequest().setURI(this.getCommentAjaxEndpoint()).setData(b).setNectarModuleData
Safe().setNectarImpressionIdSafe().send();}.bind(this));this.closeCommentWidget();}
,closeCommentWidget:function(){if(this.commentWidgetOpen){delete
this.inGracePeriod;delete
this.commentWidgetIsExpanded;this.commentWidgetVisible=false;this.commentWidgetOpen
=false;UnverifiedXD.send({type:'dismissEdgeCommentDialog'});}},presentAdminPage:fun
ction(){var
a='_blank';window.open(this.adminUrl.toString(),a);},presentErrorDialog:function()
{var c='_blank';var b='toolbar=0, status=0, width=960, height=300';var a=new
URI('/connect/connect_to_node_error.php');a.addQueryData({title:this.error.brief,bo
dy:this.error.full});window.open(a.toString(),c,b);},syncWidgetDisplay:function()
{var
a=this.alreadyConnected;this.setButtonState(a);this.showElementIf(this.connectedMes
sage,a);this.showElementIf(this.notConnectedMessage,!a);for(var
b=0;b<this.adminSpans.length;b+
+)this.showElementIf(this.adminSpans[b],this.viewerIsAdmin);for(var
c=0;c<this.errorSpans.length;c+
+)this.showElementIf(this.errorSpans[c],this.error&&(this.viewerIsAdmin||
this.showError));for(var d=0;d<this.unlikeSpans.length;d+
+)this.showElementIf(this.unlikeSpans[d],this.alreadyConnected);if(this.shareCommen
tSpans)for(var e=0;e<this.shareCommentSpans.length;e+
+)this.showElementIf(this.shareCommentSpans[e],a);if(this.layout!
==ExternalNodeConnectWidget.BOX_COUNT_LAYOUT)this.showElementIf(this.connectButton,
!this.useDisconnectLink||!
a);if(this.layout===ExternalNodeConnectWidget.BOX_COUNT_LAYOUT)
{this.manageBoxCountButtonAnimation(a);}else
if(this.layout===ExternalNodeConnectWidget.BUTTON_COUNT_LAYOUT)
{this.manageButtonCountButtonAnimation(a);}else
this.manageStandardButtonAnimation(a);if(!this.loggedInUserPhotoDiv)return;if(a)
{this.slideUserPhotoIn(this.loggedInUserPhotoDiv);}else
this.slideUserPhotoOut(this.loggedInUserPhotoDiv);},manageStandardButtonAnimation:f
unction(a){if(this.alreadyConnected){this.hideButton(true);}else
this.hideButton(false);},setButtonState:function(a){if(a)
{CSS.removeClass(this.connectButton,'like_button_no_like');CSS.addClass(this.connec
tButton,'like_button_like');}else{CSS.addClass(this.connectButton,'like_button_no_l
ike');CSS.removeClass(this.connectButton,'like_button_like');}},hideButton:function
(a){if(this.layout!
=='standard')return;if(this.oAnimateBlind)this.oAnimateBlind.stop();this.oAnimateBl
ind=animation(this.connectButtonSlider).duration(150);var
c=1,b=intl_locale_is_rtl(),d=b?'marginRight':'marginLeft',e=b?'marginLeft':'marginR
ight';if(a){this.oAnimateBlind.ondone(function()
{CSS.setStyle(this.connectButtonContainer,d,'2px');CSS.setStyle(this.connectButtonC
ontainer,'visibility','hidden');CSS.addClass(this.confirmationCell,'connect_confirm
ation_cell_like');CSS.removeClass(this.confirmationCell,'connect_confirmation_cell_
no_like');this.oAnimateBlind=null;}.bind(this));}else{CSS.setStyle(this.connectButt
onContainer,d,'0px');c=Vector2.getElementDimensions(this.connectButton).x;this.oAni
mateBlind.ondone(function()
{CSS.setStyle(this.connectButtonSlider,'overflow','visible');CSS.setStyle(this.conn
ectButtonSlider,'width','auto');CSS.removeClass(this.confirmationCell,'connect_conf
irmation_cell_like');CSS.addClass(this.confirmationCell,'connect_confirmation_cell_
no_like');CSS.setStyle(this.connectButtonContainer,'visibility','visible');this.oAn
imateBlind=null;}.bind(this));}this.oAnimateBlind.to('width',c).blind().go();},show
ElementIf:function(a,b){if(!a)return;if(b){CSS.show(a);}else
CSS.hide(a);},slideUserPhotoIn:function(b){if(!
CSS.hasClass(b,'connect_widget_user_not_connected'))return;var
a=CSS.getStyle(b,'width');CSS.setStyle(b,'width',0);CSS.setStyle(b,'opacity',0);CSS
.removeClass(b,'connect_widget_user_not_connected');animation(b).to('width',a).dura
tion(100).checkpoint().to('opacity',1).duration(400).go();},slideUserPhotoOut:funct
ion(a)
{if(CSS.hasClass(a,'connect_widget_user_not_connected'))return;animation(a).to('opa
city',0).duration(100).checkpoint(.25).to('width',0).duration(100).ondone(function(
)
{CSS.addClass(a,'connect_widget_user_not_connected');CSS.setStyle(a,'width',null);}
).go();},_clickLocked:false,connectToNodeOnClick:function(event)
{Event.kill(event);if(!this._clickLocked)
{this._clickLocked=true;setTimeout(function()
{this._clickLocked=false;}.bind(this),1000);if(this.viewerID==0||this.userOptedOut)
{this.presentOptIn();}else this.connectToNode(!
this.alreadyConnected);}},connectToNode:function(d){if(!d)
{if(this.layout===ExternalNodeConnectWidget.STANDARD_LAYOUT&&!
this.usingConnectLibrary)
{CSS.addClass(this.userActionTextSpan,'hidden_elem');CSS.removeClass(this.summaryTe
xtSpan,'hidden_elem');CSS.setStyle(this.summaryTextSpan,'opacity',1);}if(this.share
CommentSpans)for(var b=0;b<this.shareCommentSpans.length;b+
+)CSS.addClass(this.shareCommentSpans[b],'hidden_elem');if(this.commentWidgetOpen)
{this.closeCommentWidget();}else
if(this.inlineCommentFlyoutOpen)this.closeInlineComment();}this.updateWidget({nowCo
nnected:!this.alreadyConnected,isAdmin:this.viewerIsAdmin},false);var
a={href:this.externalUrl,node_type:this.nodeType,edge_type:this.edgeType,page_id:th
is.pageId,layout:this.layout,show_captcha:this.showCaptcha,connect_text:this.connec
tText,ref:this.ref,now_connected:d,post_form_id:$
('post_form_id').value};Bootloader.loadComponents(['async','async-
postlude','vector'],function(){if(thi
s.mouseExtent)
{sizeB=Vector2.getElementDimensions(this.connectButton);extW=MouseExtentWindow.getI
nstance().getMouseExtent();extB=this.mouseExtent.getMouseExtent();a.me=[sizeB.x,siz
eB.y,extW.x,extW.y,extB.x,extB.y].join('|');a.dly=Math.round((new Date().getTime()-
this.loadTime)/1000);}new
AsyncRequest().setURI(this.getAjaxEndpoint()).setHandler(this.syncWidgetWithServer.
bind(this)).setData(a).setNectarModuleDataSafe().setNectarImpressionIdSafe().send()
;}.bind(this));if(d)
{if(this.layout===ExternalNodeConnectWidget.BOX_COUNT_LAYOUT)this.requiresMouseLeav
eEvent=true;if(this.layout===ExternalNodeConnectWidget.STANDARD_LAYOUT&&!
this.usingConnectLibrary)
{CSS.setStyle(this.userActionTextSpan,'opacity',1);CSS.removeClass(this.userActionT
extSpan,'hidden_elem');CSS.addClass(this.summaryTextSpan,'hidden_elem');Event.liste
n(this.widget,'mouseleave',this.transitionBetweenMessages.bind(this));}if(this.shar
eCommentSpans){for(var c=0;c<this.shareCommentSpans;c+
+)CSS.removeClass(this.shareCommentSpans[c],'hidden_elem');}else
if(this.supportCommenting)this.presentCommentingOption();}},transitionBetweenMessag
es:function(event){if(!this.alreadyConnected||
CSS.hasClass(this.userActionTextSpan,'hidden_elem'))return;animation(this.userActio
nTextSpan).to('opacity',0).duration(500).ondone(function()
{CSS.addClass(this.userActionTextSpan,'hidden_elem');CSS.setStyle(this.summaryTextS
pan,'opacity',0);CSS.removeClass(this.summaryTextSpan,'hidden_elem');animation(this
.summaryTextSpan).to('opacity',1).duration(500).go();}.bind(this)).go();},presentCo
mmentingOption:function(){if(this.usingConnectLibrary)
{ExternalNodeConnectWidget.self=this;var
a={type:'presentEdgeCommentDialog',masterFrameName:window.name,version:2};if(this.l
ayout==ExternalNodeConnectWidget.BOX_COUNT_LAYOUT)
{a.preComputedWidthOffset=this.computeButtonDimensionsWithPadding().width;if(!
intl_locale_is_rtl())a.preComputedWidthOffset+=8;}if(this.socialBar)a.left=parseInt
(CSS.getStyle(document.getElementById('profile'),'width'),10)+1;UnverifiedXD.send(a
);this.commentWidgetOpen=true;this.commentWidgetVisible=true;}else
if(this.usingInlineCommenting)if(!this.inlineCommentListenersInitialized)
{this.initializeInlineCommentListeners();this.openInlineCommentFlyout();this.positi
onInlineCommentFlyout();this.inlineCommentListenersInitialized=true;}else
this.openInlineCommentFlyout();},initializeInlineCommentListeners:function()
{this.inlineCommentFlyout=DOM.find(this.widget,'.connect_widget_comment_box');this.
inlineCommentInput=DOM.find(this.inlineCommentFlyout,'.connect_widget_comment_texti
nput');this.inlineCommentButton=DOM.find(this.inlineCommentFlyout,'.connect_widget_
comment_button');this.inlineCommentClose=DOM.find(this.inlineCommentFlyout,'.connec
t_widget_comment_close_button');this.commentButtonIsActive=false;Event.listen(this.
inlineCommentInput,'keyup',this.conditionallyActivateButton.bind(this));Event.liste
n(this.inlineCommentInput,'focus',this.exposeCommentButton.bind(this));Event.listen
(this.inlineCommentButton,'click',this.updateConnectionWithComment.bind(this));Even
t.listen(this.widget,'mouseout',this.hideInlineComment.bind(this));Event.listen(thi
s.widget,'mouseover',this.showInlineComment.bind(this));if(this.inlineCommentClose)
Event.listen(this.inlineCommentClose,'click',function(event){for(var
a=0;a<this.shareCommentSpans.length;a+
+)CSS.removeClass(this.shareCommentSpans[a],'hidden_elem');this.closeInlineComment(
);}.bind(this));},exposeCommentButton:function(event){if(!
CSS.hasClass(this.inlineCommentButton,'hidden_elem'))return;CSS.removeClass(this.in
lineCommentButton,'hidden_elem');CSS.setStyle(this.inlineCommentInput,'width',this.
textInputWidthWithButton+'px');},openInlineCommentFlyout:function()
{CSS.show(this.inlineCommentFlyout);this.inlineCommentFlyoutOpen=true;this.inlineCo
mmentFlyoutVisible=true;},manageBoxCountButtonAnimation:function(a){if(a)
{this.animateBoxCountButtonDisappearance();}else
this.animateBoxCountButtonReappearance();},animateBoxCountButtonDisappearance:funct
ion()
{CSS.addClass(this.connectButton,'hidden_elem');CSS.setStyle(this.numberCloudExtens
ion,'opacity',0);CSS.removeClass(this.numberCloudExtension,'hidden_elem');CSS.addCl
ass(this.numberCloudNub,'hidden_elem');CSS.addClass(this.numberCloudUnlikeSpan,'hid
den_elem');CSS.removeClass(this.numberCloudReminderSpan,'hidden_elem');animation(th
is.numberCloud).to('height',this.expandedNumberCloudHeight).duration(100).ondone(fu
nction()
{animation(this.numberCloudExtension).from('opacity',0).to('opacity',1).duration(10
0).go();}.bind(this)).go();},animateBoxCountButtonReappearance:function()
{CSS.addClass(this.numberCloudExtension,'hidden_elem');animation(this.numberCloud).
to('height',this.collapsedNumberCloudHeight).duration(75).ondone(function()
{CSS.setStyle(this.connectButton,'opacity',0);CSS.removeClass(this.connectButton,'h
idden_elem');animation(this.connectButton).from('opacity',0).to('opacity',1).durati
on(75).ondone(function()
{CSS.setStyle(this.numberCloudNub,'opacity',0);CSS.removeClass(this.numberCloudNub,
'hidden_elem');animation(this.numberCloudNub).from('opacity',0).to('opacity',1).dur
ation(50).go();}.bind(this)).go();}.bind(this)).go();},manageButtonCountButtonAnima
tion:function(a){if(a){this.animateButtonCountButtonDisappearance();}else
this.animateButtonCountButtonReappearance();CSS.removeClass(this.thumbsUpIcon,'hidd
en_elem');CSS.addClass(this.undoRegion,'hidden_elem');},animateButtonCountButtonDis
appearance:function()
{animation(this.connectButton).from('opacity',1).to('opacity',0).from('width',this.
originalButtonWidth).to('width','0px').ondone(function()
{CSS.addClass(this.connectButton,'hidden_elem');}.bind(this)).duration(100).go();an
imation(this.numberExcluding).from('opacity',1).to('opacity',0).duration(100).ondon
e(function()
{CSS.addClass(this.numberExcluding,'hidden_elem');CSS.setStyle(this.summaryIncludin
g,'opacity',0);CSS.removeClass(this.summaryIncluding,'hidden_elem');animation(this.
summaryIncluding).from('opacity',0).to('opacity',1).duration(100).go();}.bind(this)
).go();},computeButtonDimensions:function(){var
c=CSS.hasClass(this.connectButton,'hidden_elem');if(c)
{CSS.addClass(this.connectButton,'connect_widget_offscreen');CSS.removeClass(this.c
onnectButton,'hidden_elem');}var
a=Vector2.getElementDimensions(this.connectButton);var d=a.x;var b=a.y;var
f=parseInt(CSS.getStyle(this.connectButton,'paddingLeft'),10);var
g=parseInt(CSS.getStyle(this.connectButton,'paddingRight'),10);var
h=parseInt(CSS.getStyle(this.connectButton,'paddingTop'),10);var
e=parseInt(CSS.getStyle(this.connectButton,'paddingBottom'),10);if(c)
{CSS.addClass(this.connectButton,'hidden_elem');CSS.removeClass(this.connectButton,
'connect_widget_offscreen');}return {width:d-f-g-
2,height:b};},computeButtonDimensionsWithPadding:function(){var
c=CSS.hasClass(this.connectButton,'hidden_elem');if(c)
{CSS.addClass(this.connectButton,'connect_widget_offscreen');CSS.removeClass(this.c
onnectButton,'hidden_elem');}var
a=Vector2.getElementDimensions(this.connectButton);var d=a.x;var b=a.y;if(c)
{CSS.addClass(this.connectButton,'hidden_elem');CSS.removeClass(this.connectButton,
'connect_widget_offscreen');}return
{width:d,height:b};},animateButtonCountButtonReappearance:function()
{animation(this.connectButton).from('width','0px').to('width',this.originalButtonWi
dth).from('opacity',0).to('opacity',1).duration(100).go();CSS.setStyle(this.summary
Including,'opacity',1);animation(this.summaryIncluding).from('opacity',1).to('opaci
ty',0).duration(100).ondone(function()
{CSS.addClass(this.summaryIncluding,'hidden_elem');CSS.setStyle(this.numberExcludin
g,'opacity',0);CSS.removeClass(this.numberExcluding,'hidden_elem');animation(this.n
umberExcluding).from('opacity',0).to('opacity',1).duration(100).go();}.bind(this)).
go();},injectCommentWidgetMarkup:function(a)
{this.commentDocument=a;this.commentDocument.body.innerHTML=this.commentWidgetMarku
p;this.transferCSSStyles();if(this.newProfilePic){var
c=DOM.find(this.commentDocument,'img.connect_comment_widget_user_pic');c.src=this.n
ewProfilePic;delete
this.newProfilePic;}this.commentNub=DOM.find(this.commentDocument,
(this.layout===ExternalNodeConnectWidget.BUTTON_COUNT_LAYOUT?'div.side_nub':'div.nu
b'));this.placeholderInputRegion=DOM.find(this.commentDocument,'div.connect_comment
_widget_placeholder_input_region');this.placeholderInput=DOM.find(this.placeholderI
nputRegion,'input.connect_comment_widget_placeholder_input');this.fullInputRegion=D
OM.find(this.commentDocument,'div.connect_comment_widget_full_input_region');this.f
ullInputTextarea=DOM.find(this.fullInputRegion,'textarea.connect_comment_widget_ful
l_input_textarea');this.widgetButtonRegion=DOM.find(this.commentDocument,'div.conne
ct_comment_widget_button_region');this.postToFacebookButton=DOM.find(this.widgetBut
tonRegion,'.connect_comment_widget_post_button
input');this.cancelButton=DOM.find(this.widgetButtonRegion,'.connect_comment_widget
_cancel_button
input');this.inlineUnlikeLink=DOM.find(this.commentDocument,'a.connect_comment_widg
et_unlike_link');this.defaultInputText=this.placeholderInput.value;this.placeholder
Input.onfocus=this.transitionToFullInputMode.bind(this);this.fullInputTextarea.onfo
cus=this.removePlaceholderText.bind(this);this.fullInputTextarea.onblur=this.restor
ePlaceholderText.bind(this);this.postToFacebookButton.onclick=this.updateUserCommen
t.bind(this);this.cancelButton.onclick=this.dismissCommentWidget.bind(this);this.in
lineUnlikeLink.onclick=this.connectToNodeOnClick.bind(this);var
b=this.getCommentActivatingComponent();b.onmouseout=this.hideCommentWidget.bind(thi
s);b.onmouseover=this.showCommentWidget.bind(this);this.commentDocument.body.onmous
eout=this.hideCommentWidget.bind(this);this.commentDocument.body.onmouseover=this.s
howCommentWidget.bind(this);this.inGracePeriod=false;},getCommentActivatingComponen
t:function(){if(this.layout===ExternalNodeConnectWidget.BOX_COUNT_LAYOUT){return
this.numberCloud;}else
if(this.layout===ExternalNodeConnectWidget.BUTTON_COUNT_LAYOUT){return
this.widget;}else return this.confirmationCell;},showCommentWidget:function(event)
{this.inGracePeriod=true;this.killCloseThread();if(this.commentWidgetOpen&&!
this.commentWidgetVisible)
{this.commentWidgetVisible=true;CSS.show(this.commentDocument.body);UnverifiedXD.se
nd({type:'showEdgeCommentDialog'});}return
false;},hideCommentWidget:function(event)
{this.inGracePeriod=false;if(this.commentWidgetOpen&&this.commentWidgetVisible){var
a=function(){if(!this.inGracePeriod&&!this.commentWidgetIsExpanded)
{this.commentWidgetVisible=false;if(!
this.socialBar)CSS.hide(this.commentDocument.body);UnverifiedXD.send({type:'hideEdg
eCommentDialog'});}this.inGracePeriod=false;this.killCloseThread();}.bind(this);thi
s.closeThreadID=setTimeout(a,100);}return false;},killCloseThread:function()
{if(this.closeThreadID){clearTimeout(this.closeThreadID);delete
this.closeThreadID;}},transferCSSStyles:function(){var
d=DOM.scry(window.document,'link');var e=DOM.scry(window.document,'style');var
c=DOM.find(window.document,'html');var g=DOM.find(this.commentDocument,'html');var
f=DOM.find(this.commentDocument,'head');for(var a=0;a<d.length;a+
+)if(d[a].rel=='stylesheet'){var
b=this.commentDocument.createElement('link');b.rel=d[a].rel;b.href=d[a].href;b.type
=d[a].type;f.appendChild(b);}if(window.ResourceBundler)ResourceBundler.applyCSSToDo
cument(this.commentDocument);g.id=c.id;g.className=c.className;this.commentDocument
.body.className=window.document.body.className;},transitionToFullInputMode:function
(event)
{this.commentWidgetIsExpanded=true;CSS.hide(this.placeholderInputRegion);CSS.show(t
his.fullInputRegion);CSS.show(this.widgetButtonRegion);this.fullInputTextarea.focus
();return false;},removePlaceholderText:function(event)
{if(CSS.hasClass(this.fullInputTextarea,'connect_comment_widget_disabled'))
{CSS.removeClass(this.fullInputTextarea,'connect_comment_widget_disabled');this.ful
lInputTextarea.value='';}return false;},restorePlaceholderText:function(event)
{if(this.fullInputTextarea.value.trim()=='')
{this.fullInputTextarea.value=this.defaultInputText;CSS.addClass(this.fullInputText
area,'connect_comment_widget_disabled');}return
false;},updateUserComment:function(event){var
a=this.fullInputTextarea.value.trim();if(a!=''&&a!
=this.defaultInputText)this.postUserComment(a);return
false;},dismissCommentWidget:function(event){this.closeCommentWidget();return
false;},getAjaxEndpoint:function(){return
'/ajax/connect/external_node_connect.php';},getCommentAjaxEndpoint:function()
{return
'/ajax/connect/external_edge_comment.php';},updateLoggedInUser:function(b,a)
{ExternalNodeConnectWidget.updateLoggedInUser(b,a);}});
var ExternalPageLikeWidget=function(a)
{a.edgeType='like';this.parent.construct(this,a);this.unactionLink=DOM.scry(this.wi
dget,'span.unlike_link')
[0];if(this.unactionLink)Event.listen(this.unactionLink,'click',this.connectToNodeO
nClick.bind(this));};ExternalPageLikeWidget.extend('ExternalNodeConnectWidget');cop
y_properties(ExternalPageLikeWidget.prototype,{getSyncEndpointName:function()
{return 'platform/like/sync';},getConnectionEndpointName:function(){return
'platform/like/connection';},getPluginName:function(){return 'like';}});
onloadRegister(function()
{Event.listen(document.documentElement,'submit',function(b){var
a=b.getTarget().getElementsByTagName('*');for(var c=0;c<a.length;c+
+)if(a[c].getAttribute('placeholder')&&Input.isEmpty(a[c]))a[c].value='';});});
window.__UIControllerRegistry=window.__UIControllerRegistry||{};
if (window.Bootloader) { Bootloader.done(["js\/7z5eqkor2t8g884k.pkg.js"]); }

You might also like