Вы находитесь на странице: 1из 38

/*1308172592,176820407*/ if (window.CavalryLogger) { CavalryLogger.start_js(["fbhRl"]); } function hasArrayNature(a){return (!!a&&(typeof a=='object' typeof a=='function ')&&('length' in a)&&!('setInterval' in a)&&(Object.prototype.toString.

call(a)== ="[object Array]" ('callee' in a) ('item' in a)));}function $A(b){if(!hasArray Nature(b))return [b];if(b.item){var a=b.length,c=new Array(a);while(a--)c[a]=b[a ];return c;}return Array.prototype.slice.call(b);} function eval_global(c){if('string'!=typeof(c)){throw new Error('JS sent to eval _global is not a string. Only strings '+'are permitted.');}else if(''==c)return ;var d=document.createElement('script');d.type='text/javascript';try{d.appendChi ld(document.createTextNode(c));}catch(a){d.text=c;}var b=(document.getElementsBy TagName("head")[0] document.documentElement);b.appendChild(d);b.removeChild(d); } function copy_properties(b,c){b=b {};c=c {};for(var a in c)b[a]=c[a];if(c.hasO wnProperty&&c.hasOwnProperty('toString')&&(typeof c.toString!='undefined')&&(b.t oString!==c.toString))b.toString=c.toString;return b;}function add_properties(a, b){return copy_properties(window[a] (window[a]={}),b);}function is_empty(b){if( b instanceof Array){return b.length==0;}else if(b instanceof Object){for(var a i n b)return false;return true;}else return !b;} if(!window.async_callback)window.async_callback=function(a,b){return a;};functio n Arbiter(){copy_properties(this,{_listeners:[],_events:{},_callbacks:{},_last_i d:1,_listen:{},_index:{}});copy_properties(this,Arbiter);}copy_properties(Arbite r,{SUBSCRIBE_NEW:'new',SUBSCRIBE_ALL:'all',BEHAVIOR_EVENT:'event',BEHAVIOR_PERSI STENT:'persistent',BEHAVIOR_STATE:'state',LIVEMESSAGE:'livemessage',BOOTLOAD:'bo otload',FUNCTION_EXTENSION:'function_ext',CONTEXT_CHANGE:'ui/context-change',PAG ECACHE_INVALIDATE:'pagecache/invalidate',NEW_NOTIFICATIONS:'chat/new_notificatio ns',LIST_EDITOR_LISTS_CHANGED:'listeditor/friend_lists_changed',subscribe:functi on(k,b,i){if(!k k.length==0)return null;k=$A(k);var a=Arbiter._getInstance(this );a._listeners.push({callback:b,types:k});var h=a._listeners.length-1;for(var d= 0;d<k.length;d++)if(a._index[k[d]]){a._index[k[d]].push(h);}else a._index[k[d]]= [h];i=i Arbiter.SUBSCRIBE_ALL;if(i==Arbiter.SUBSCRIBE_ALL){var c,j,g;for(var e= 0;e<k.length;e++){j=k[e];if(j in a._events)for(var f=0;f<a._events[j].length;f++ ){c=a._events[j][f];g=b.apply(null,[j,c]);if(g===false){a._events[j].splice(f,1) ;f--;}}}}return {subscriberID:h};},unsubscribe:function(e){var a=Arbiter._getIns tance(this);var c=a._listeners[e.subscriberID];for(var d=0;d<c.types.length;d++) {var f=c.types[d];if(a._index[f])for(var b=0;b<a._index[f].length;b++)if(a._inde x[f][b]==e.subscriberID){a._index[f].splice(b,1);if(a._index[f].length==0)delete a._index[f];break;}}delete a._listeners[e.subscriberID];},inform:function(i,c,b ){var l=hasArrayNature(i);var k=$A(i);var a=Arbiter._getInstance(this);var h={}; b=b Arbiter.BEHAVIOR_EVENT;for(var e=0;e<k.length;e++){var i=k[e],d=null;if(b== Arbiter.BEHAVIOR_PERSISTENT){d=a._events.length;if(!(i in a._events))a._events[i ]=[];a._events[i].push(c);a._events[i]._stateful=false;}else if(b==Arbiter.BEHAV IOR_STATE){d=0;a._events[i]=[c];a._events[i]._stateful=true;}else if(i in a._eve nts)a._events[i]._stateful=false;window.ArbiterMonitor&&ArbiterMonitor.log('even t',i,c,a);var g;if(a._index[i]){var j=$A(a._index[i]);for(var f=0;f<j.length;f++ ){g=a._listeners[j[f]].callback.apply(null,[i,c]);if(g===false){if(d!==null)a._e vents[i].splice(d,1);break;}}}a._updateCallbacks(i,c);window.ArbiterMonitor&&Arb iterMonitor.log('done',i,c,a);h[i]=g;}return l?h:h[k[0]];},query:function(b){var a=Arbiter._getInstance(this);if(!(b in a._events))return null;if(a._events[b].l ength)return a._events[b][0];return null;},_instance:null,_getInstance:function( a){if(a instanceof Arbiter)return a;if(!Arbiter._instance)Arbiter._instance=new Arbiter();return Arbiter._instance;},registerCallback:function(b,d){var h,c=0,a= Arbiter._getInstance(this),g=false;if(typeof b=='function'){h=a._last_id;a._last _id++;g=true;}else{if(!a._callbacks[b])return null;h=b;}if(hasArrayNature(d)){va r i={};for(var f=0;f<d.length;f++)i[d[f]]=1;d=i;}for(var j in d){try{if(a.query( j))continue;}catch(e){}c+=d[j];if(a._listen[j]===undefined)a._listen[j]={};a._li sten[j][h]=(a._listen[j][h] 0)+d[j];}if(c==0&&g){b();return null;}if(!g){a._cal lbacks[h].depnum+=c;}else a._callbacks[h]={callback:async_callback(b,'arbiter'),

depnum:c};return h;},_updateCallbacks:function(d,c){if(c===null !this._listen[d ])return;for(var b in this._listen[d]){this._listen[d][b]--;if(this._listen[d][b ]<=0)delete this._listen[d][b];this._callbacks[b].depnum--;if(this._callbacks[b] .depnum<=0){var a=this._callbacks[b].callback;delete this._callbacks[b];a();}}}} ); Function.prototype.deferUntil=function(a,h,b,i){var f=a();if(f){this(f);return;} var e=this,d=null,g=(+new Date());var c=function(){f=a();if(!f)if(h&&(new Date() -g)>=h){i&&i();}else return;d&&clearInterval(d);e(f);};d=setInterval(c,20,b);ret urn d;};var Bootloader=window.Bootloader=(window.Bootloader&&window.Bootloader.r ealBootloader)?window.Bootloader:(function(a){return {realBootloader:true,config urePage:function(b){var h={};var g=this.resolveResources(b);for(var c=0;c<g.leng th;c++){h[g[c].src]=g[c];this.requested(g[c].name);this._startCSSPoll(g[c].name) ;}var e=document.getElementsByTagName('link');for(var c=0;c<e.length;++c){if(e[c ].rel!='stylesheet')continue;for(var d in h)if(e[c].href.indexOf(d)!==-1){var f= h[d].name;this._cssLinkMap[f]={link:e[c]};if(h[d].permanent)this._permanent[f]=t rue;delete h[d];break;}}},loadComponents:function(d,b){d=$A(d);var g=[];for(var e=0;e<d.length;++e){if(!d[e])continue;var c=this._componentMap[d[e]];if(!!c)for( var f=0;f<c.length;++f)g.push(c[f]);}return this.loadResources(g,b);},loadResour ces:function(h,b,g,k){h=Bootloader.resolveResources($A(h));if(g){var e={};for(va r c=0;c<h.length;++c)e[h[c].name]=true;for(var d in this._requested)if(!(d in th is._permanent)&&!(d in e)&&!(d in this._earlyResources))this._unloadResource(d); this._earlyResources={};}var l=[];var f=[];for(var c=0;c<h.length;++c){var i=h[c ];if(i.permanent)this._permanent[i.name]=true;var j=Arbiter.BOOTLOAD+'/'+i.name; if(Arbiter.query(j)!==null)continue;if(!i.nonblocking)f.push(j);if(!this._reques ted[i.name]){this.requested(i.name);l.push(i);window.CavalryLogger&&CavalryLogge r.getInstance().measureResources(i,k);}}if(b)b=Arbiter.registerCallback(b,f);for (var c=0;c<l.length;++c)this.requestResource(l[c].type,l[c].src,l[c].name);retur n b;},requestResource:function(k,h,f){var c=this.getHardpoint();if(k=='js'){var g=document.createElement('script');g.src=h;g.type='text/javascript';g.async=true ;var b=function(){Bootloader.done([f]);};g.onload=g.onerror=b;g.onreadystatechan ge=function(){if(this.readyState in {loaded:1,complete:1})b();};c.appendChild(g) ;}else if(k=='css'){if(document.createStyleSheet){var i=this._styleTags,j=-1;for (var d=0;d<i.length;d++)if(i[d].imports.length<25){j=d;break;}if(j==-1){i.push(d ocument.createStyleSheet());j=i.length-1;}i[j].addImport(h);this._cssLinkMap[f]= {tagIdx:j,href:h};}else{var e=document.createElement('link');e.rel="stylesheet"; e.type="text/css";e.media="all";e.href=h;this._cssLinkMap[f]={link:e};c.appendCh ild(e);}this._startCSSPoll(f);}},_activeCSSPolls:{},_expireTime:null,_runCSSPoll s:function(){var g=(+new Date());if(g>=this._expireTime){if(window.send_error_si gnal)if(Math.random()<.01)send_error_signal('js_timeout_and_exception','00001:er ror:CSS timeout.');var d=[];for(var f in this._activeCSSPolls)d.push(f);Bootload er.done(d,true);this._activeCSSPolls={};}else{var e=Bootloader._CSS_EXPECTED_HEI GHT;var b;var d=[];for(var f in this._activeCSSPolls){var c=this._activeCSSPolls [f];var h=c.offsetHeight==e c.currentStyle&&c.currentStyle.height==e+'px' wind ow.getComputedStyle&&(b=document.defaultView.getComputedStyle(c,null))&&b.getPro pertyValue('height')==e+'px';if(h){d.push(f);c.parentNode.removeChild(c);delete this._activeCSSPolls[f];}}if(!is_empty(d)){Bootloader.done(d,true);this._expireT ime=g+Bootloader._CSS_POLL_EXPIRATION;}}return is_empty(this._activeCSSPolls);}, _startCSSPoll:function(d){var c='bootloader_'+d.replace(/[^a-z0-9]/ig,'_');var b =bagofholding;bind(this,function(){var e=document.createElement('div');e.id=c;do cument.body.appendChild(e);this._expireTime=(+new Date())+Bootloader._CSS_POLL_E XPIRATION;var g=is_empty(this._activeCSSPolls);this._activeCSSPolls[d]=e;if(g)va r f=setInterval(bind(this,function(){if(this._runCSSPolls())f&&clearInterval(f); }),20,false);}).deferUntil(function(){return document.body;},5000,false,b.curry( "Still no DOM"));},done:function(f,c){var g=(a&&a._preloaded) [];(a {})._prelo aded=[];f=f.concat(g);this.requested(f);if(!c){var e={sender:this};Arbiter.infor m(Arbiter.BOOTLOAD,e,Arbiter.BEHAVIOR_EVENT);}for(var b=0;b<f.length;++b){var d= f[b];Arbiter.inform(Arbiter.BOOTLOAD+'/'+d,true,Arbiter.BEHAVIOR_STATE);}},reque sted:function(c){c=$A(c);for(var b=0;b<c.length;++b)this._requested[c[b]]=true;} ,enableBootload:function(b){for(var c in b)if(!this._componentMap[c])this._compo nentMap[c]=b[c];},_unloadResource:function(e){if(e in this._cssLinkMap){var c=th

is._cssLinkMap[e],d=c.link;if(d){d.parentNode.removeChild(d);}else{var f=this._s tyleTags[c.tagIdx];for(var b=0;b<f.imports.length;b++)if(f.imports[b].href==c.hr ef){f.removeImport(b);break;}}delete this._cssLinkMap[e];delete this._requested[ e];Arbiter.inform(Arbiter.BOOTLOAD+'/'+e,null,Arbiter.BEHAVIOR_STATE);}},getHard point:function(){if(!this._hardpoint){var c,b=document.getElementsByTagName('hea d');if(b.length){c=b[0];}else c=document.body;this._hardpoint=c;}return this._ha rdpoint;},setResourceMap:function(c){if(!c)return;for(var b in c){if(!c[b].name) c[b].name=b;this._resources[b]=c[b];}},resolveResources:function(e,b){if(!e)retu rn;var d=new Array(e.length);for(var c=0;c<e.length;++c)if(!e[c].type&&e[c] in t his._resources){d[c]=this._resources[e[c]];if(b&&(b in d[c]))d[c]=d[c][b];}else d[c]=e[c];return d;},loadEarlyResources:function(d){this.setResourceMap(d);var c =[];for(var b in d)c.push(this._resources[b]);this.loadResources(c);for(var b in d){var e=this._resources[b];if(!e.permanent)this._earlyResources[e.name]=e;}},_ requested:{},_permanent:{},_componentMap:{},_cssLinkMap:{},_styleTags:[],_hardpo int:null,_resources:{},_earlyResources:{},_CSS_POLL_EXPIRATION:5000,_CSS_EXPECTE D_HEIGHT:42};})(window.Bootloader); (function(){if(window!=window.top)return;var j='_e_',k=(window.name '').toStrin g();k=(k.length==7&&j==k.substr(0,3))?k.substr(3):(window.name=j+window._EagleEy eSeed).substr(3);var h=j+k+'_',f=new Date(+new Date()+604800000).toGMTString(),d =window.location.hostname.replace(/^.*(facebook\..*)$/i,'$1'),e='; expires='+f+' ;path=/; domain='+d,c=0,g=false,l=false,i=[];function b(m){return h+(c++)+'='+en codeURIComponent(m)+e;}function a(o){var p=document.cookie.search(j)>=0;while(i. length>0){var q=b(i[0]);if(p&&((document.cookie.length+q.length)>3500 document. cookie.split(';').length>19))break;document.cookie=q;p=true;i.shift();}if(!!o ! g&&p&&((document.cookie.length>2500 document.cookie.split(';').length>15))&&(l (window.Arbiter&&window.OnloadEvent&&Arbiter.query(OnloadEvent.ONLOAD)))){var n =new Image();g=true;n.onload=function(){g=false;a();};var m=window._EagleEyeDoma in (window.Env&&Env.tracking_domain) '';n.src=m+'/ajax/nectar.php?asyncSignal= '+(Math.floor(Math.random()*10000)+1)+'&'+(!o?'':'s=')+(+new Date());}}window.Ea gleEye={log:function(o,m,n){var p=[k,+new Date(),o].concat(m);p.push(p.length);B ootloader.loadComponents('json',function(){var q=JSON.stringify(p);if(!n){i.push (q);}else document.cookie=b(q);a(n);});},createLogger:function(o,m){m=m==undefin ed?100:m;var n=function(p,q){if(n.enabled)EagleEye.log(o,p,q);};n.enabled=false; Bootloader.loadComponents('string-extensions',function(){n._key=((window.Env&&En v.user) Math.random())+o;n.enabled=(n._key.hash32()%65535/65535)<=m;});return n ;},loaded:function(){l=true;}};})(); function set_ue_cookie(a){document.cookie="act="+encodeURIComponent(a)+"; path=/ ; domain="+window.location.hostname.replace(/^.*(\.facebook\..*)$/i,'$1');}var u ser_action=(function(){var l=(!window.ArbiterMonitor)?'r':'a',n=0,m,e,f,o=0,k,i, b,c,h=[0,0,0,0],d=function(){if(!!i){var q={profile_minifeed:1,info_tab:1,gb_con tent_and_toolbar:1,gb_muffin_area:1,ego:1,bookmarks_menu:1,jewelBoxNotif:1,jewel Notif:1,BeeperBox:1,navSearch:1};for(var p=i;p&&p!=document.body;p=p.parentNode) {if(!p.id typeof p.id!=='string')continue;if(p.id.substr(0,8)=='pagelet_')retur n p.id.substr(8);if(p.id.substr(0,8)=='box_app_')return p.id;if(q[p.id])return p .id;}}return '-';},g=function(q){if(!ge('content'))return [0,0,0,0];var p=$('con tent');var r=window.Vector2?Vector2.getEventPosition(q):{x:0,y:0};return [r.x,r. y,p.offsetLeft,p.clientWidth];},j=function(){n++;var q=o+'/'+n;set_ue_cookie(q); var p={};if(window.collect_data_attribs){p=collect_data_attribs(i,['ft','gt']);c opy_properties(p.ft,c.ft {});copy_properties(p.gt,c.gt {});}if(l=='a'){Arbiter Monitor.initUE(q);f=ArbiterMonitor.getInternRef(i);}window.EagleEye&&EagleEye.lo g('act',[o,n,e '-',b,m '-',f d(i),l,window.URI?URI.getRequestURI(true,true).g etUnqualifiedURI().toString():location.pathname+location.search+location.hash,p] .concat(h));k=true;},a=function(t,p,r,s,q){if(!!r){m=r.type;if(m=='click'&&ge('c ontent'))h=g(r);var s=0;r.ctrlKey&&(s+=1);r.shiftKey&&(s+=2);r.altKey&&(s+=4);r. metaKey&&(s+=8);if(s)m+=s;}if(!t&&r)t=r.getTarget();if(!!t){e=(t.getAttribute&&( t.getAttribute('ajaxify') t.getAttribute('data-endpoint')) t.action t.href t .name);i=t;}if(!!p&&!b)b=p;if(!!q)c=q;if(s=='FORCE' e)j();};return function(t,p ,r,s,q){var u=(+new Date());Bootloader.loadComponents('dom-collect',function(){i f(u-o<10){!k&&a(t,p,r,s,q);return;}if(s=='INDIRECT')return;m=e=f=i=b=null;c={};k =false;o=u;a(t,p,r,s,q);});};})();

ge=$=function(a){return typeof a=='string'?document.getElementById(a):a;}; CSS=window.CSS {hasClass:function(b,a){b=$(b);return (' '+b.className+' ').inde xOf(' '+a+' ')>-1;},addClass:function(b,a){b=$(b);if(a&&!CSS.hasClass(b,a))b.cla ssName=b.className+' '+a;return b;},removeClass:function(b,a){b=$(b);b.className =b.className.replace(new RegExp('(^ \\s)'+a+'(?:\\s $)','g'),'$1');return b;},to ggleClass:function(b,a){return CSS.conditionClass(b,a,!CSS.hasClass(b,a));},cond itionClass:function(c,b,a){return (a?CSS.addClass:CSS.removeClass)(c,b);},show:f unction(a){CSS.removeClass(a,'hidden_elem');},hide:function(a){CSS.addClass(a,'h idden_elem');},conditionShow:function(b,a){CSS.conditionClass(b,'hidden_elem',!a );}}; var Parent={byTag:function(a,b){b=b.toUpperCase();while(a&&a.nodeName!=b)a=a.par entNode;return a;},byClass:function(b,a){while(b&&!CSS.hasClass(b,a))b=b.parentN ode;return b;}}; !function(){if(window.__primer)return;window.__primer=true;var a=null;document.d ocumentElement.onclick=function(d){d=d window.event;a=d.target d.srcElement;va r e=Parent.byTag(a,'A');if(!e)return;var b=e.getAttribute('ajaxify');var f=e.hre f;var i=b f;i&&user_action(e,'a',d);if(b&&f&&!(/#$/).test(f)){var g=d.which&&d. which!=1;var h=d.altKey d.ctrlKey d.metaKey d.shiftKey;if(g h)return;}var c= ['dialog'];switch(e.rel){case 'dialog-pipe':c.push('ajaxpipe');case 'dialog':cas e 'dialog-post':Bootloader.loadComponents(c,function(){Dialog.bootstrap(i,null,e .rel=='dialog',null,null,e);});break;case 'async':case 'async-post':Bootloader.l oadComponents('async',function(){AsyncRequest.bootstrap(i,e);});break;case 'thea ter':Bootloader.loadComponents('PhotoTheater',function(){PhotoTheater.bootstrap( i,e);});break;case 'cstage':Bootloader.loadComponents('PhotoSnowbox',function(){ PhotoSnowbox.bootstrap(i,e);});break;case 'toggle':CSS.toggleClass(e.parentNode, 'openToggler');Bootloader.loadComponents('Toggler',function(){Toggler.bootstrap( e);});break;default:return;}return false;};document.documentElement.onsubmit=fun ction(b){b=b window.event;var c=b.target b.srcElement;if(c&&c.nodeName=='FORM' &&c.getAttribute('rel')=='async'){user_action(c,'f',b);var d=a;Bootloader.loadCo mponents('dom-form',function(){Form.bootstrap(c,d);});return false;}};}(); var ua={ie:function(){return ua._populate() this._ie;},firefox:function(){retur n ua._populate() this._firefox;},opera:function(){return ua._populate() this._ opera;},safari:function(){return ua._populate() this._safari;},chrome:function( ){return ua._populate() this._chrome;},windows:function(){return ua._populate() this._windows;},osx:function(){return ua._populate() this._osx;},linux:functi on(){return ua._populate() this._linux;},iphone:function(){return ua._populate( ) this._iphone;},_populated:false,_populate:function(){if(ua._populated)return; ua._populated=true;var a=/(?:MSIE.(\d+\.\d+)) (?:(?:Firefox GranParadiso Iceweas el).(\d+\.\d+)) (?:Opera(?:.+Version. .)(\d+\.\d+)) (?:AppleWebKit.(\d+(?:\.\d+) ?))/.exec(navigator.userAgent);var c=/(Mac OS X) (Windows) (Linux)/.exec(navigat or.userAgent);var b=/\b(iPhone iP[ao]d)/.exec(navigator.userAgent);if(a){ua._ie= a[1]?parseFloat(a[1]):NaN;if(ua._ie>=8&&!window.HTMLCollection)ua._ie=7;ua._fire fox=a[2]?parseFloat(a[2]):NaN;ua._opera=a[3]?parseFloat(a[3]):NaN;ua._safari=a[4 ]?parseFloat(a[4]):NaN;if(ua._safari){a=/(?:Chrome\/(\d+\.\d+))/.exec(navigator. userAgent);ua._chrome=a&&a[1]?parseFloat(a[1]):NaN;}else ua._chrome=NaN;}else ua ._ie=ua._firefox=ua._opera=ua._chrome=ua._safari=NaN;if(c){ua._osx=!!c[1];ua._wi ndows=!!c[2];ua._linux=!!c[3];}else ua._osx=ua._windows=ua._linux=false;ua._ipho ne=b;}}; if(!window.skipDomainLower&&navigator&&navigator.userAgent&&document.domain.toLo werCase().match(/(^ \.)facebook\..*/)&&!(parseInt((/Gecko\/([0-9]+)/.exec(naviga tor.userAgent) []).pop(),10)<=20060508))document.domain=window.location.hostnam e.replace(/^.*(facebook\..*)$/i,'$1');window.onloadhooks=window.onloadhooks []; window.onloadRegister=window.onloadRegister function(a){onloadhooks.push(a);};w indow.onafterloadhooks=window.onafterloadhooks [];window.onafterloadRegister=wi ndow.onafterloadRegister function(a){onafterloadhooks.push(a);};function run_if _loaded(a,b){return window.loaded&&b.call(a);}function run_with(b,a,c){Bootloade r.loadComponents(a,bind(b,c));return false;}function wait_for_load(c,b,e){e=bind (c,e,b);if(window.loaded)return e();switch((b event).type){case 'load':case 'fo cus':onafterloadRegister(e);return;case 'click':var d=c.style,a=document.body.st yle;d.cursor=a.cursor='progress';onafterloadRegister(function(){d.cursor=a.curso

r='';if(c.tagName.toLowerCase()=='a'){if(false!==e()&&c.href)window.location.hre f=c.href;}else if(c.click)c.click();});break;}return false;}function bind(c,b){v ar a=Array.prototype.slice.call(arguments,2);return function(){var e=c (this==w indow?false:this),d=a.concat(Array.prototype.slice.call(arguments));if(typeof(b) =="string"){if(e[b])return e[b].apply(e,d);}else return b.apply(e,d);};}var curr y=bind(null,bind,null);function env_get(a){return window.Env&&Env[a];}window.__D EV__=window.__DEV__ 0;window.__rm={};document.documentElement.className=documen t.documentElement.className.replace('no_js',''); var Mixins={Arbiter:{_getArbiterInstance:function(){return this._arbiter (this. _arbiter=new Arbiter());},inform:function(c,b,a){return this._getArbiterInstance ().inform(c,b,a);},subscribe:function(c,a,b){return this._getArbiterInstance().s ubscribe(c,a,b);},unsubscribe:function(a){this._getArbiterInstance().unsubscribe (a);}}}; Function.prototype.extend=function(a){if(!Metaprototype._arbiterHandle)Metaproto type._arbiterHandle=Arbiter.subscribe(Arbiter.BOOTLOAD,Metaprototype._onbootload .bind(Metaprototype));Metaprototype._queue(this,a);};function Metaprototype(){}c opy_properties(Metaprototype,{makeFinal:function(a){},_pending:{},_queue:functio n(b,c){b.__class_extending=true;var a=Arbiter.registerCallback(bind(Metaprototyp e,Metaprototype._apply,b,c),[Arbiter.FUNCTION_EXTENSION+'/'+c,Arbiter.BOOTLOAD]) ;if(a!==null)this._pending[c]=true;},_onbootload:function(b,a){this._update();}, _update:function(){for(var a in this._pending)if(!!window[a]){delete this._pendi ng[a];if(!window[a].__class_extending){Arbiter.inform(Arbiter.FUNCTION_EXTENSION +'/'+a,true,Arbiter.BEHAVIOR_STATE);}else window[a].__class_name=a;}},_apply:fun ction(a,c){delete a.__class_extending;var d=__metaprototype(window[c],0);var b=_ _metaprototype(a,d.prototype.__level+1);b.parent=d;if(!!a.__class_name)Arbiter.i nform(Arbiter.FUNCTION_EXTENSION+'/'+a.__class_name,true,Arbiter.BEHAVIOR_STATE) ;}});function __metaprototype(c,a){if(c.__metaprototype)return c.__metaprototype ;var b=new Function();b.construct=__metaprototype_construct;b.prototype.construc t=__metaprototype_wrap(c,a,true);b.prototype.__level=a;b.base=c;c.prototype.pare nt=b;c.__metaprototype=b;return b;}function __metaprototype_construct(a){__metap rototype_init(a.parent);var c=[];var b=a;while(b.parent){c.push(new_obj=new b.pa rent());new_obj.__instance=a;b=b.parent;}a.parent=c[1];c.reverse();c.pop();a.__p arents=c;a.__instance=a;return a.parent.construct.apply(a.parent,arguments);}fun ction __metaprototype_init(d){if(d.initialized)return;var a=d.base.prototype;if( d.parent){__metaprototype_init(d.parent);var e=d.parent.prototype;for(var b in e )if(b!='__level'&&b!='construct'&&a[b]===undefined)a[b]=d.prototype[b]=e[b];}d.i nitialized=true;var c=d.prototype.__level;for(var b in a)if(b!='parent')a[b]=d.p rototype[b]=__metaprototype_wrap(a[b],c);}function __metaprototype_wrap(c,b,d){i f(typeof c!='function' c.__prototyped)return c;var a=function(){var g=this.__in stance;if(g){var h=g.parent;g.parent=b?g.__parents[b-1]:null;if(d){var e=[];for( var f=1;f<arguments.length;f++)e.push(arguments[f]);var i=c.apply(g,e);}else var i=c.apply(g,arguments);g.parent=h;return i;}else return c.apply(this,arguments) ;};a.__prototyped=true;return a;}Function.prototype.mixin=function(){var a=[this .prototype].concat(Array.prototype.slice.call(arguments));Function.mixin.apply(n ull,a);};Function.mixin=function(){for(var b=1,a=arguments.length;b<a;++b)copy_p roperties(arguments[0],Mixins[arguments[b]] arguments[b]);};Function.prototype. bind=function(b){var a=[b,this].concat(Array.prototype.slice.call(arguments,1)); return bind.apply(null,a);};Function.prototype.curry=Function.prototype.bind.bin d(null,null);Function.prototype.shield=function(b){if(typeof this!='function')th row new TypeException();var a=this.bind.apply(this,$A(arguments));return functio n(){return a();};};Function.prototype.defer=function(b,a){if(typeof this!='funct ion')throw new TypeError();b=b 0;return setTimeout(this,b,a);};Function.prototy pe.recur=function(b,a){if(typeof this!='function')throw new TypeError();return s etInterval(this,b,a);};function bagofholding(){}function bagof(a){return functio n(){return a;};}function abstractMethod(){throw new Error('You must implement th is function in your base class.');} function HTML(a){if(a&&a.__html)a=a.__html;if(this===window){if(a instanceof HTM L)return a;return new HTML(a);}this._content=a;this._defer=false;this._extra_act ion='';this._nodes=null;this._inline_js=bagofholding;this._has_option_elements=f alse;return this;}HTML.isHTML=function(a){return a&&(a instanceof HTML a.__html

!==undefined);};HTML.replaceJSONWrapper=function(a){return a&&a.__html!==undefin ed?new HTML(a.__html):a;};copy_properties(HTML.prototype,{toString:function(){va r 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(){t his._inline_js();eval_global(this._extra_action);}.bind(this);if(this.getDeferre d()){return a.defer.bind(a);}else return a;},setDeferred:function(a){this._defer =!!a;return this;},getDeferred:function(){return this._defer;},getContent:functi on(){return this._content;},getNodes:function(){this._fillCache();return this._n odes;},getRootNode:function(){return this.getNodes()[0];},hasOptionElements:func tion(){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().t oLowerCase(),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 tb ody 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></t body></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.removeChil d(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.lengt h-1;f>=0;--f)if(i[f].nodeName&&i[f].nodeName.toLowerCase()=='tbody'&&i[f].childN odes.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.requ estResource.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;}}); function muffinize(d){var c='a';var b='d';var a=[c,b].join('');return d.replace( /muffin/g,a);}window.Util=window.Util {warn:bagofholding,error:bagofholding,inf o:bagofholding,log:bagofholding,stack:bagofholding};if(typeof console=='undefine d')console={log:bagofholding}; function object(b){var a=new Function();a.prototype=b;return new a();}function i s_scalar(a){return (/string number boolean/).test(typeof a);}function keys(c){va r b=[];for(var a in c)b.push(a);return b;}function values(b){var c=[];for(var a in b)c.push(b[a]);return c;}function count(c){var a=0;for(var b in c)a++;return a;}function are_equal(a,b){return JSON.stringify(a)==JSON.stringify(b);}function merge(){var b={};for(var a=0;a<arguments.length;a++)copy_properties(b,arguments [a]);return b;}Object.from=function(c,e){var d={};var b=hasArrayNature(e);if(typ eof e=='undefined')e=true;for(var a=c.length;a--;)d[c[a]]=b?e[a]:e;return d;};fu nction coalesce(){for(var a=0;a<arguments.length;++a)if(arguments[a]!=null)retur n arguments[a];return null;} var DOM={find:function(a,c){var b=DOM.scry(a,c);return b[0];},scry:function(j,v) {if(!j)return [];var w=v.split(' ');var d=[j];var i=j===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 z d=false;if(u.charAt(0)=='^')if(m==0){zd=true;u=u.slice(1);}else return;u=u.repla ce(/\./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){va r k=[];var g=d[o].parentNode;var a=za=='*';while(DOM.isNode(g,DOM.NODE_TYPES.ELE MENT)){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]);}f or(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.hasCla ss(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)!=z e){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';return 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.select ion;if(b){return b()+'';}else if(a)return a.createRange().text;return null;},cre ate: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.t oLowerCase().indexOf('on')==0){if(!(typeof a[d]!='function'))if(window.Event&&Ev ent.listen){Event.listen(c,d.substr(2),a[d]);}else c[d]=a[d];delete a[d];}copy_p roperties(c,a);}if(b!=undefined)DOM.setContent(c,b);return c;},prependContent:fu nction(c,b){if(!DOM.isNode(c))throw new Error('DOM.prependContent: reference ele ment is not a node');var a=function(d){if(c.firstChild){c.insertBefore(d,c.first Child);}else c.appendChild(d);};return DOM._addContent(b,a,c);},insertAfter:func tion(c,b){if(!DOM.isNode(c) !c.parentNode)throw new Error('DOM.insertAfter: ref erence 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._ad dContent(b,a,c.parentNode);},insertBefore:function(b,c){if(!DOM.isNode(c) !c.pa rentNode)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);};r eturn DOM._addContent(b,a,c.parentNode);},setContent:function(b,a){if(!DOM.isNod e(b))throw new Error('DOM.setContent: reference element is not a node');DOM.empt y(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=f unction(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 ele ment must be a node with a'+' parent');var a=function(d){c.parentNode.replaceChi ld(d,c);};return DOM._addContent(b,a,c.parentNode);},remove:function(a){a=$(a);i f(a.parentNode)a.parentNode.removeChild(a);},empty:function(a){a=$(a);while(a.fi rstChild)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')){r eturn 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){re turn !!(b.compareDocumentPosition(a)&16);}else return false;},getRootElement:fun ction(){var a=null;if(window.Quickling&&Quickling.isActive())a=ge('content');ret urn a document.body;},isNode:function(d,e){if(typeof(Node)=='undefined')Node=nu ll;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){retur n (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,AT TRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCT ION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION_NODE:1 2},_addContent:function(d,a,m){d=HTML.replaceJSONWrapper(d);if(d instanceof HTML &&-1==d.toString().indexOf('<scr'+'ipt')&&''==m.innerHTML){var g=ua.ie();if(!g (g>7&&!DOM.isNode(m,['table','tbody','thead','tfoot','tr','select','fieldset'])) ){var h=g?"<div style=\"display:none;\">&nbsp;</div>":"";m.innerHTML=h+d;g&&m.re moveChild(m.firstChild);return $A(m.childNodes);}}else if(DOM.isNode(m,DOM.NODE_ TYPES.TEXT)){m.data=d;return [d];}var j,e=[],b=[];var f=document.createDocumentF ragment();if(!(d instanceof Array))d=[d];for(var i=0;i<d.length;i++){j=HTML.repl aceJSONWrapper(d[i]);if(j instanceof HTML){b.push(j.getAction());var l=j.getNode s(),c;for(var k=0;k<l.length;k++){c=(ua.safari() (ua.ie()&&j.hasOptionElements( )))?l[k]:l[k].cloneNode(true);e.push(c);f.appendChild(c);}}else if(is_scalar(j)) {var n=document.createTextNode(j);e.push(n);f.appendChild(n);}else if(DOM.isNode

(j)){e.push(j);f.appendChild(j);}else if(!(j instanceof Array))j!==null;}a(f);fo r(var i=0;i<b.length;i++)b[i]();return e;}};function $N(c,a,b){if(typeof a!='obj ect' DOM.isNode(a) a instanceof Array HTML.isHTML(a)){b=a;a=null;}return DOM. create(c,a,b);}var $$=function _$$(a){return DOM.scry.apply(null,[document].conc at($A(arguments)));}; function URI(a){if(a===window)return;if(this===window)return new URI(a window.l ocation.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.PageTransitio ns&&PageTransitions.isInitialized()){return PageTransitions.getMostRecentURI().g etQualifiedURI();}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.decodeCompo nent(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.len gth-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;v ar 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(UR I.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] '',po rt:a[6] '',path:a[7] '',query_s:a[9] '',fragment:a[11] ''});return this;},se tProtocol:function(a){this.protocol=a;return this;},getProtocol:function(){retur n this.protocol;},setQueryData:function(a){this.query_s=URI.implodeQuery(a);retu rn this;},addQueryData:function(a){return this.setQueryData(copy_properties(this .getQueryData(),a));},removeQueryData:function(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.quer y_s);},setFragment:function(a){this.fragment=a;return this;},getFragment:functio n(){return this.fragment;},setDomain:function(a){this.domain=a;return this;},get Domain:function(){return this.domain;},setPort:function(a){this.port=a;return th is;},getPort:function(){return this.port;},setPath:function(a){this.path=a;retur n this;},getPath:function(){return this.path.replace(/^\/+/,'/');},toString:func tion(){var a='';this.protocol&&(a+=this.protocol+'://');this.domain&&(a+=this.do main);this.port&&(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:f unction(){if(!URI._facebookURIRegex)URI._facebookURIRegex=new RegExp('(^ \\.)fac ebook\\.com([^.]*)$','i');return (!this.domain URI._facebookURIRegex.test(this. domain));},isQuicklingEnabled:function(){return window.Quickling&&Quickling.isAc tive()&&Quickling.isPageActive(this);},getRegisteredDomain:function(){if(!this.d omain)return '';if(!this.isFacebookURI())return null;var b=this.domain.split('.' );var a=b.indexOf('facebook');return b.slice(a).join('.');},getUnqualifiedURI:fu nction(){return new URI(this).setProtocol(null).setDomain(null).setPort(null);}, getQualifiedURI:function(){var b=new URI(this);if(!b.getDomain()){var a=URI();b. setProtocol(a.getProtocol()).setDomain(a.getDomain()).setPort(a.getPort());}retu rn 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.getPro tocol())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:funct ion(){if(!this.getDomain())return '';var a=this.getDomain().split('.');if(a.leng th<=2){return '';}else return a[0];},setSecure:function(a){return this.setProtoc ol(a?'https':'http');},isSecure:function(){return this.getProtocol()=='https';}} ); var XD={_callbacks:[],_opts:{autoResize:false,allowShrink:true,channelUrl:null,h ideOverflow:false,newResizeMethod:false,resizeTimeout:100,resizeWidth:false,expe ctResizeAck:false,resizeAckTimeout:6000},_lastResizeAckId:0,_resizeCount:0,_resi zeTimestamp:0,init:function(a){this._opts=copy_properties(copy_properties({},thi s._opts),a);if(this._opts.autoResize)this._startResizeMonitor();Arbiter.subscrib e('Connect.Unsafe.resize.ack',function(c,b){if(!b.id)b.id=this._resizeCount;if(b .id>this._lastResizeAckId)this._lastResizeAckId=b.id;}.bind(this),Arbiter.BEHAVI OUR_PERSISTANT);},send:function(b,a){a=a this._opts.channelUrl;if(!a)return;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(document.cre ateElement('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){(functi on(){c.parentNode.removeChild(c);}).defer(3000);delete XD._callbacks[d];}};if(ua .ie()){var e=('<iframe '+' src="'+h+'"'+' onload="XD._callbacks.'+d+'()"'+'></if rame>');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=true;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.offse tHeight,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(this._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.fo rced_min_width)h=Math.max(h,XD.forced_min_width);if(e.clientLeft>0)h+=(e.clientL eft*2);if(e.clientTop>0)f+=(e.clientTop*2);}return {width:h,height:f};},_startRe sizeMonitor:function(){var b,a=document.documentElement;if(this._opts.hideOverfl ow){a.style.overflow='hidden';document.body.style.overflow='hidden';}(function() {var f=this._computeSize();var g=new Date().getTime();var c=this._lastResizeAckI d<this._resizeCount&&(g-this._resizeTimestamp)>this._opts.resizeAckTimeout;if(!b (this._opts.expectResizeAck&&c) (this._opts.allowShrink&&b.width!=f.width) ( !this._opts.allowShrink&&b.width<f.width) (this._opts.allowShrink&&b.height!=f. height) (!this._opts.allowShrink&&b.height<f.height)){b=f;this._resizeCount++;t his._resizeTimestamp=g;var e={type:'resize',height:f.height,ackData:{id:this._re sizeCount}};if(f.width&&f.width!=0)e.width=f.width;try{if(URI(document.referrer) .isFacebookURI()&&window.parent!=window&&window.name&&window.parent.location&&UR I(window.parent.location).isFacebookURI()){var iframes=window.parent.document.ge tElementsByTagName('iframe');for(var i=0;i<iframes.length;i=i+1)if(iframes[i].na me==window.name){if(this._opts.resizeWidth)iframes[i].style.width=e.width+'px';i frames[i].style.height=e.height+'px';}}this.send(e);}catch(d){this.send(e);}}}). bind(this).recur(this._opts.resizeTimeout);}};var UnverifiedXD=copy_properties({ },XD); WindowComm={_callbacks:{},makeHandler:function(a,c){c=c 'opener';var b='f'+(Mat h.random()*(1<<30)).toString(16).replace('.','');WindowComm._callbacks[b]=a;retu rn new URI('/connect/window_comm.php').setQueryData({_id:b,_relation:c}).getQual ifiedURI().toString();},_recv:function(b){var a=new URI(b).getQueryData();Window Comm._callbacks[a._id](a);}}; DataStore=window.DataStore {_storage:{},_elements:{},_tokenCounter:1,_NOT_IN_DO M_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];DataStor e._elements[b]=a;}return DataStore._storage[b] (DataStore._storage[b]={});},_sh

ouldDeleteData:function(a){if(!a.nodeName)return false;try{if(null!=a.offsetPare nt)return false;}catch(b){}if(document.documentElement.contains){return !documen t.documentElement.contains(a);}else return (document.documentElement.compareDocu mentPosition(a)&DataStore._NOT_IN_DOM_CONST);},set:function(c,b,d){var a=DataSto re._getStorage(c);a[b]=d;return c;},get:function(e,d,c){var b=DataStore._getStor age(e),f=b[d];if(typeof f==='undefined'&&e.getAttribute){var a=e.getAttribute('d ata-'+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=DataStor e._elements[b];if(DataStore._shouldDeleteData(a)){delete DataStore._storage[b];d elete DataStore._elements[b];}}}}; window.Event=window.Event function(){};Event.__inlineSubmit=function(b,event){v ar a=Event.__getHandler&&Event.__getHandler(b,'submit');return a?null:Event.__bu bbleSubmit(b,event);};Event.__bubbleSubmit=function(a,event){if(document.documen tElement.attachEvent){var b;while(b!==false&&(a=a.parentNode))b=a.onsubmit?a.ons ubmit(event):Event.__fire&&Event.__fire(a,'submit',event);return b;}}; Event.DATASTORE_KEY='Event.listeners';if(!Event.prototype)Event.prototype={};fun ction $E(a){a=a window.event {};if(!a._inherits_from_prototype)for(var c in Ev ent.prototype)try{a[c]=Event.prototype[c];}catch(b){}return a;}(function(){copy_ properties(Event.prototype,{_inherits_from_prototype:true,stop:function(){this.c ancelBubble=true;this.stopPropagation&&this.stopPropagation();return this;},prev ent:function(){this.returnValue=false;this.preventDefault&&this.preventDefault() ;return this;},kill:function(){this.stop().prevent();return false;},getTarget:fu nction(){var g=this.target this.srcElement;return g?$(g):null;},getRelatedTarge t:function(){var g=this.relatedTarget this.fromElement;return g?$(g):null;},get Modifiers:function(){var g={control:!!this.ctrlKey,shift:!!this.shiftKey,alt:!!t his.altKey,meta:!!this.metaKey};g.access=ua.osx()?g.control:g.alt;g.any=g.contro l 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.NO RMAL;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;},stop:func tion(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:r eturn null;case 63276:return 33;case 63277:return 34;}if(event.shiftKey)switch(e vent.keyCode){case 33:case 34:case 37:case 38:case 39:case 40:return null;}retur n event.keyCode;},getPriorities:function(){if(!e){var g=values(Event.Priority);g .sort(function(h,i){return h-i;});e=g;}return e;},__fire:function(g,i,event){var h=Event.__getHandler(g,i);if(h)return h($E(event));},__getHandler:function(g,h) {return DataStore.get(g,Event.DATASTORE_KEY+h);}});var e=null,b=Event.DATASTORE_ KEY;var c=function(g){return function(h){if(!DOM.contains(this,h.getRelatedTarge t()))return g.call(this,h);};};var f={mouseenter:{base:'mouseover',wrap:c},mouse leave:{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.addE ventListener(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.TRADITI ONAL);}if(g.nodeName==='FORM'&&l==='submit')Event.listen(g,l,Event.__bubbleSubmi t.curry(g),Event.Priority._BUBBLE);};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');user_ac tion(i,n,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.cancelBubbl e)return event.stop();}}}return event.returnValue;};})();Event.Priority={URGENT: -20,TRADITIONAL:-10,NORMAL:0,_BUBBLE:1000};function EventHandlerRef(b,a,c){this.

_handler=b;this._container=a;this._index=c;}EventHandlerRef.prototype={remove:fu nction(){delete this._handler;delete this._container[this._index];},fire:functio n(a,event){return this._handler.call(a,event);}}; function Vector2(b,c,a){copy_properties(this,{x:parseFloat(b),y:parseFloat(c),do main:a 'pure'});}copy_properties(Vector2.prototype,{toString:function(){return '('+this.x+', '+this.y+')';},add:function(c,d){if(arguments.length==1){if(c.doma in!='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).ma gnitude();},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 V ector2(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(b,a){a=a 'document';var c=this.convertTo(a );b.style.left=parseInt(c.x)+'px';b.style.top=parseInt(c.y)+'px';return this;},s etElementDimensions:function(a){return this.setElementWidth(a).setElementHeight( a);},setElementWidth:function(a){a.style.width=parseInt(this.x,10)+'px';return t his;},setElementHeight:function(a){a.style.height=parseInt(this.y,10)+'px';retur n this;},scrollElementBy:function(a){if(a==document.body){window.scrollBy(this.x ,this.y);}else{a.scrollLeft+=this.x;a.scrollTop+=this.y;}return this;}});copy_pr operties(Vector2,{getEventPosition:function(b,a){a=a 'document';b=$E(b);var d=b .pageX (b.clientX+(document.documentElement.scrollLeft document.body.scrollLef t));var e=b.pageY (b.clientY+(document.documentElement.scrollTop document.body .scrollTop));var c=new Vector2(d,e,'document');return c.convertTo(a);},getScroll Position:function(a){a=a 'document';var b=document.body.scrollLeft document.do cumentElement.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))re turn new Vector2(0,0,'document');var e=c.getBoundingClientRect(),a=document.docu mentElement,d=Math.round(e.left)-a.clientLeft,f=Math.round(e.top)-a.clientTop;re turn new Vector2(d,f,'viewport').convertTo(b);},getElementDimensions:function(a) {return new Vector2(a.offsetWidth 0,a.offsetHeight 0);},getViewportDimensions: function(){var a=(window&&window.innerWidth) (document&&document.documentElemen t&&document.documentElement.clientWidth) (document&&document.body&&document.bod y.clientWidth) 0;var b=(window&&window.innerHeight) (document&&document.docume ntElement&&document.documentElement.clientHeight) (document&&document.body&&doc ument.body.clientHeight) 0;return new Vector2(a,b,'viewport');},getDocumentDime nsions:function(){var a=(document&&document.documentElement&&document.documentEl ement.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');},deserialize:function(b){var a=b.split(',');return new Vector2(a[0], a[1]);}});var operaIgnoreScroll={table:true,'inline-table':true,inline:true};fun ction elementX(a){return Vector2.getElementPosition(a,'document').x;}function el ementY(a){return Vector2.getElementPosition(a,'document').y;} var PopupResizer={_opts:{allowShrink:true,timeout:100},init:function(a){copy_pro perties(PopupResizer._opts,a);PopupResizer._resizeCheck.recur(PopupResizer._opts .timeout);},_resizeCheck:function(){var e=Vector2.getViewportDimensions(),a=Popu pResizer._getDocumentSize(),c=a.y-e.y,d=a.x-e.x;if(d<0)d=0;if(!PopupResizer._opt s.allowShrink&&c<0)c=0;if(c d)try{window.resizeBy(d,c);if(d)window.moveBy(d/-2, 0);}catch(b){}},_getDocumentSize:function(){var a={x:ua.firefox()?document.docum entElement.scrollWidth:document.body.scrollWidth,y:document.body.scrollHeight};i f(a.x<=0 a.x>document.documentElement.scrollWidth)a.x=document.documentElement. scrollWidth;if(a.y<=0 a.y>document.documentElement.scrollHeight)a.y=document.do cumentElement.scrollHeight;if(window.Dialog&&Dialog.max_bottom&&Dialog.max_botto m>a.y)a.y=Dialog.max_bottom;return a;},open:function(i,b,j){var f=typeof window.

screenX!='undefined'?window.screenX:window.screenLeft,g=typeof window.screenY!=' undefined'?window.screenY:window.screenTop,e=typeof window.outerWidth!='undefine d'?window.outerWidth:document.body.clientWidth,d=typeof window.outerHeight!='und efined'?window.outerHeight:(document.body.clientHeight-22),c=parseInt(f+((e-j)/2 ),10),h=parseInt(g+((d-b)/2.5),10),a=('width='+j+',height='+b+',left='+c+',top=' +h);return window.open(i,'_blank',a);}}; function DOMControl(a){this.root=$(a);this.updating=false;DataStore.set(a,'DOMCo ntrol',this);}DOMControl.prototype={getRoot:function(){return this.root;},beginU pdate:function(){if(this.updating)return false;this.updating=true;return true;}, endUpdate:function(){this.updating=false;},update:function(a){if(!this.beginUpda te())return this;this.onupdate(a);this.endUpdate();}};DOMControl.getInstance=fun ction(a){return DataStore.get(a,'DOMControl');}; add_properties('Input',{focus:function(a){try{a.focus();}catch(b){}},isEmpty:fun ction(a){return !(/\S/).test(a.value '') CSS.hasClass(a,'DOMControl_placeholde r');},getValue:function(a){return Input.isEmpty(a)?'':a.value;},setValue:functio n(b,c){CSS.removeClass(b,'DOMControl_placeholder');b.value=c;var a=DOMControl.ge tInstance(b);a&&a.resetHeight&&a.resetHeight();},setPlaceholder:function(a,b){a. setAttribute('title',b);a.setAttribute('placeholder',b);if(a==document.activeEle ment)return;if(Input.isEmpty(a)){CSS.conditionClass(a,'DOMControl_placeholder',b );a.value=b;}},reset:function(a){Input.setValue(a,'');var b=a.getAttribute('plac eholder');b&&Input.setPlaceholder(a,b);a.style.height='';},setSubmitOnEnter:func tion(a,b){CSS.conditionClass(a,'enter_submit',b);},getSubmitOnEnter:function(a){ return CSS.hasClass(a,'enter_submit');}}); OnloadEvent={ONLOAD:'onload/onload',ONLOAD_CALLBACK:'onload/onload_callback',ONL OAD_DOMCONTENT:'onload/dom_content_ready',ONLOAD_DOMCONTENT_CALLBACK:'onload/dom content_callback',ONBEFOREUNLOAD:'onload/beforeunload',ONUNLOAD:'onload/unload'} ;function _include_quickling_events_default(){return !window.loading_page_chrome ;}function onbeforeunloadRegister(a,b){if(b===undefined)b=_include_quickling_eve nts_default();b?_addHook('onbeforeleavehooks',a):_addHook('onbeforeunloadhooks', a);}function onunloadRegister(a){if(!window.onunload)window.onunload=function(){ Arbiter.inform(OnloadEvent.ONUNLOAD,true,Arbiter.BEHAVIOR_STATE);};_addHook('onu nloadhooks',a);}function onleaveRegister(a){_addHook('onleavehooks',a);}function _addHook(b,a){window[b]=(window[b] []).concat(a);}function removeHook(a){windo w[a]=[];}function _domcontentready(){Arbiter.inform(OnloadEvent.ONLOAD_DOMCONTEN T,true,Arbiter.BEHAVIOR_STATE);}function _bootstrapEventHandlers(){var a=documen t,e=window;if(a.addEventListener){if(ua.safari()<525){var d=setInterval(function (){if(/loaded complete/.test(a.readyState)){_domcontentready();clearInterval(d); }},10);}else a.addEventListener("DOMContentLoaded",_domcontentready,true);}else{ var c='javascript:void(0)';if(e.location.protocol=='https:')c='//:';a.write('<sc ript onreadystatechange="if (this.readyState==\'complete\') {'+'this.parentNode. removeChild(this);_domcontentready();}" '+'defer="defer" src="'+c+'"><\/script\> ');}var b=e.onload;e.onload=function(){e.CavalryLogger&&CavalryLogger.getInstanc e().setTimeStamp('t_layout');b&&b();Arbiter.inform(OnloadEvent.ONLOAD,true,Arbit er.BEHAVIOR_STATE);};e.onbeforeunload=function(){var f={};Arbiter.inform(OnloadE vent.ONBEFOREUNLOAD,f,Arbiter.BEHAVIOR_STATE);if(!f.warn)Arbiter.inform('onload/ exit',true);return f.warn;};}onload_callback=Arbiter.registerCallback(function() {window.CavalryLogger&&CavalryLogger.getInstance().setTimeStamp('t_onload');Arbi ter.inform(OnloadEvent.ONLOAD_CALLBACK,true,Arbiter.BEHAVIOR_STATE);},[OnloadEve nt.ONLOAD]);domcontent_callback=Arbiter.registerCallback(function(){window.Caval ryLogger&&CavalryLogger.getInstance().setTimeStamp('t_domcontent');Arbiter.infor m(OnloadEvent.ONLOAD_DOMCONTENT_CALLBACK,true,Arbiter.BEHAVIOR_STATE);},[OnloadE vent.ONLOAD_DOMCONTENT]);if(!window._eventHandlersBootstrapped){_eventHandlersBo otstrapped=true;_bootstrapEventHandlers();} function KeyEventController(){this.handlers={};document.onkeyup=this.onkeyevent. bind(this,'onkeyup');document.onkeydown=this.onkeyevent.bind(this,'onkeydown');d ocument.onkeypress=this.onkeyevent.bind(this,'onkeypress');}copy_properties(KeyE ventController,{instance:null,getInstance:function(){return KeyEventController.i nstance (KeyEventController.instance=new KeyEventController());},defaultFilter: function(event,a){event=$E(event);return KeyEventController.filterEventTypes(eve nt,a)&&KeyEventController.filterEventTargets(event,a)&&KeyEventController.filter

EventModifiers(event,a);},filterEventTypes:function(event,a){if(a==='onkeydown') return true;return false;},filterEventTargets:function(event,b){var a=event.getT arget();return !DOM.isNode(a,KeyEventController._interactiveElements) (a.type i n KeyEventController._uninterestingTypes) (DOM.isNode(a,['input','textarea'])&& a.value.length===0&&event.keyCode in KeyEventController._controlKeys);},filterEv entModifiers:function(event,a){if(event.ctrlKey event.altKey event.metaKey ev ent.repeat)return false;return true;},registerKey:function(f,a,d,g){if(d===undef ined)d=KeyEventController.defaultFilter;var b=KeyEventController.getInstance();v ar 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.han dlers[f].push({callback:a,filter:d});}},keyCodeMap:{BACKSPACE:[8],TAB:[9],RETURN :[13],ESCAPE:[27],LEFT:[37,63234],UP:[38,63232],RIGHT:[39,63235],DOWN:[40,63233] ,DELETE:[46],COMMA:[188],PERIOD:[190],'`':[192],'[':[219],']':[221]},_interactiv eElements:['input','select','textarea','object','embed'],_uninterestingTypes:{ch eckbox:1,radio:1,submit:1},_controlKeys:{8:1,9:1,13:1,27:1,37:1,63234:1,38:1,632 32:1,39:1,63235:1,40:1,63233:1,46:1}});copy_properties(KeyEventController.protot ype,{mapKey:function(a){if(typeof(a)=='number')return [48+a,96+a];var b=KeyEvent Controller.keyCodeMap[a.toUpperCase()];if(b)return b;return [a.toUpperCase().cha rCodeAt(0)];},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].filte r;try{if(!f f(c,i)){var node=null;if(window.Parent&&Parent.byTag&&c.getTarget)n ode=Parent.byTag(c.getTarget(),'a');user_action(node,'key',c);a=b(c,i);if(a===fa lse)return Event.kill(c);}}catch(e){}}return true;},resetHandlers:function(){thi s.handlers={};}}); String.prototype.trim=function(){if(this==window)return null;return this.replace (/^\s* \s*$/g,'');};function trim(b){try{return String(b.toString()).trim();}cat ch(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.hash32=function(){var a=2166136261;for(v ar b=0,c=this.length;b<c;++b)a=(a^this.charCodeAt(b))*16777619;a+=a<<13;a^=a>>7; a+=a<<3;a^=a>>17;a+=a<<5;return (a 0)+2147483648;};String.prototype.split=(funct ion(a){return function(h,e){var b="";if(h===null e===null){return [];}else if(t ypeof 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().replac e(/^[\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("^"+separato r1.source+"$",b));if(e===undefined e<0){e=false;}else{e=Math.floor(e);if(!e)ret urn [];}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(sepa rator1.lastIndex>d){if(f.length>1)f[0].replace(i,function(){for(var j=1;j<argume nts.length-2;j++)if(arguments[j]===undefined)f[j]=undefined;});g=g.concat(this.s ubstring(d,f.index),(f.index===this.length?[]:f.slice(1)));d=separator1.lastInde x;}if(f[0].length===0)separator1.lastIndex++;}return (d===this.length)?(separato r1.test("")?g:g.concat("")):(e?g:g.concat(this.substring(d)));}else return a.cal l(this,h,e);};})(String.prototype.split); add_properties('CSS',{shown:function(a){return !CSS.hasClass(a,'hidden_elem');}, toggle:function(a){CSS.conditionShow(a,!CSS.shown(a));},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*1 00+')';break;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){var a=window.getComputedStyle(b,nul l);if(a)return a.getPropertyValue(c(d));}if(document.defaultView&&document.defau ltView.getComputedStyle){var a=document.defaultView.getComputedStyle(b,null);if( a)return a.getPropertyValue(c(d));if(d=="display")return "none";}if(b.currentSty le)return b.currentStyle[d];return b.style[d];},getOpacity:function(a){a=$(a);va r b=CSS.getStyle(a,'filter');var c=null;if(b&&(c=/(\d+(?:\.\d+)?)/.exec(b))){ret urn parseFloat(c.pop())/100;}else if(b=CSS.getStyle(a,'opacity')){return parseFl

oat(b);}else return 1;}}); function animation(a){if(a==undefined)return;if(this==window){return new animati on(a);}else{this.obj=a;this._reset_state();this.queue=[];this.last_attr=null;}}a nimation.resolution=20;animation.offset=0;animation.prototype._reset_state=funct ion(){this.state={attrs:{},duration:500};};animation.prototype.stop=function(){t his._reset_state();this.queue=[];return this;};animation.prototype._build_contai ner=function(){if(this.container_div){this._refresh_container();return;}if(this. obj.firstChild&&this.obj.firstChild.__animation_refs){this.container_div=this.ob j.firstChild;this.container_div.__animation_refs++;this._refresh_container();ret urn;}var b=document.createElement('div');b.style.padding='0px';b.style.margin='0 px';b.style.border='0px';b.__animation_refs=1;var a=this.obj.childNodes;while(a. length)b.appendChild(a[0]);this.obj.appendChild(b);this._orig_overflow=this.obj. style.overflow;this.obj.style.overflow='hidden';this.container_div=b;this._refre sh_container();};animation.prototype._refresh_container=function(){this.containe r_div.style.height='auto';this.container_div.style.width='auto';this.container_d iv.style.height=this.container_div.offsetHeight+'px';this.container_div.style.wi dth=this.container_div.offsetWidth+'px';};animation.prototype._destroy_container =function(){if(!this.container_div)return;if(!--this.container_div.__animation_r efs){var a=this.container_div.childNodes;while(a.length)this.obj.appendChild(a[0 ]);this.obj.removeChild(this.container_div);}this.container_div=null;this.obj.st yle.overflow=this._orig_overflow;};animation.ATTR_TO=1;animation.ATTR_BY=2;anima tion.ATTR_FROM=3;animation.prototype._attr=function(a,d,c){a=a.replace(/-[a-z]/g i,function(e){return e.substring(1).toUpperCase();});var b=false;switch(a){case 'background':this._attr('backgroundColor',d,c);return this;case 'margin':d=anima tion.parse_group(d);this._attr('marginBottom',d[0],c);this._attr('marginLeft',d[ 1],c);this._attr('marginRight',d[2],c);this._attr('marginTop',d[3],c);return thi s;case 'padding':d=animation.parse_group(d);this._attr('paddingBottom',d[0],c);t his._attr('paddingLeft',d[1],c);this._attr('paddingRight',d[2],c);this._attr('pa ddingTop',d[3],c);return this;case 'backgroundColor':case 'borderColor':case 'co lor':d=animation.parse_color(d);break;case 'opacity':d=parseFloat(d,10);break;ca se 'height':case 'width':if(d=='auto'){b=true;}else d=parseInt(d,10);break;case 'borderWidth':case 'lineHeight':case 'fontSize':case 'marginBottom':case 'margin Left':case 'marginRight':case 'marginTop':case 'paddingBottom':case 'paddingLeft ':case 'paddingRight':case 'paddingTop':case 'bottom':case 'left':case 'right':c ase 'top':case 'scrollTop':case 'scrollLeft':d=parseInt(d,10);break;default:thro w new Error(a+' is not a supported attribute!');}if(this.state.attrs[a]===undefi ned)this.state.attrs[a]={};if(b)this.state.attrs[a].auto=true;switch(c){case ani mation.ATTR_FROM:this.state.attrs[a].start=d;break;case animation.ATTR_BY:this.s tate.attrs[a].by=true;case animation.ATTR_TO:this.state.attrs[a].value=d;break;} };animation._get_box_width=function(c){var d=parseInt(CSS.getStyle(c,'paddingLef t'),10),e=parseInt(CSS.getStyle(c,'paddingRight'),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=functi on(c){var e=parseInt(CSS.getStyle(c,'paddingTop'),10),d=parseInt(CSS.getStyle(c, 'paddingBottom'),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._att r(this.last_attr,a,animation.ATTR_TO);}else{this._attr(a,b,animation.ATTR_TO);th is.last_attr=a;}return this;};animation.prototype.by=function(a,b){if(b===undefi ned){this._attr(this.last_attr,a,animation.ATTR_BY);}else{this._attr(a,b,animati on.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.ATTR_FROM);this.last_attr=a;}return this;};animation.protot ype.duration=function(a){this.state.duration=a?a:0;return this;};animation.proto type.checkpoint=function(b,a){if(b===undefined)b=1;this.state.checkpoint=b;this. queue.push(this.state);this._reset_state();this.state.checkpointcb=a;return this ;};animation.prototype.blind=function(){this.state.blind=true;return this;};anim ation.prototype.hide=function(){this.state.hide=true;return this;};animation.pro totype.show=function(){this.state.show=true;return this;};animation.prototype.ea se=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.que ue.length;a++){this.queue[a].start=b-animation.offset;if(this.queue[a].checkpoin t)b+=this.queue[a].checkpoint*this.queue[a].duration;}animation.push(this);retur n this;};animation.prototype._show=function(){CSS.show(this.obj);};animation.pro totype._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._callbac k(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=animatio n.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.att rs[a].value[2]=Math.min(255,Math.max(0,b.attrs[a].value[2]+m[2]));}break;case 'o pacity':var m=CSS.getOpacity(this.obj);if(b.attrs[a].by)b.attrs[a].value=Math.mi n(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;case 'width':var m= animation._get_box_width(this.obj);if(b.attrs[a].by)b.attrs[a].value+=m;break;ca se 'scrollLeft':case 'scrollTop':var m=(this.obj==document.body)?(document.docum entElement[a] document.body[a]):this.obj[a];if(b.attrs[a].by)b.attrs[a].value+= m;b['last'+a]=m;break;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.height& &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,borderL eftWidth: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.auto)b.attrs.width.value=animation._get_box_width(thi s.obj);}b.started=true;if(b.blind)this._build_container();}var h=(l-b.start)/b.d uration;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.parentN ode;var g=this.obj.nextSibling;i.removeChild(this.obj);}for(var a in b.attrs)swi tch(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)+','+animati on.calc_tween(j,b.attrs[a].start[2],b.attrs[a].value[2],true)+')';break;case 'op acity':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.att rs[a].auto?'auto':animation.calc_tween(j,b.attrs[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.at trs[a].value,true)-m;if(!f){this.obj[a]=c+m;}else if(a=='scrollLeft'){window.scr ollBy(c,0);}else window.scrollBy(0,c);b['last'+a]=c+m;}break;default:this.obj.st yle[a]=animation.calc_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){th is.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=fun ction(a,b,c,d){return (d?parseInt:parseFloat)((c-b)*a+b,10);};animation.parse_co lor=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 r eturn [a[0],a[0],a[0],a[0]];};animation.push=function(a){if(!animation.active)an imation.active=[];animation.active.push(a);if(!animation.timeout)animation.timeo ut=setInterval(animation.animate.bind(animation),animation.resolution,false);ani mation.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++)t ry{if(!animation.active[b]._frame(d))animation.active.splice(b--,1);}catch(a){an imation.active.splice(b--,1);}if(animation.active.length==0){clearInterval(anima tion.timeout);animation.timeout=null;}};animation.ease={};animation.ease.begin=f unction(a){return Math.sin(Math.PI/2*(a-1))+1;};animation.ease.end=function(a){r eturn Math.sin(.5*Math.PI*a);};animation.ease.both=function(a){return .5*Math.si n(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();}; !function(){function a(b){return function(){if(this===window)throw new TypeError ();return b.apply(this,arguments);};}copy_properties(Array.prototype,{map:functi on(c,b){if(this===window typeof c!='function')throw new TypeError();var d;var e =this.length;var f=new Array(e);for(d=0;d<e;++d)if(d in this)f[d]=c.call(b,this[ d],d,this);return f;},forEach:function(c,b){this.map(c,b);return this;},filter:f unction(c,b){c=c function(h){return h;};if(this===window typeof c!='function') throw new TypeError();var d,g,e=this.length,f=[];for(d=0;d<e;++d)if(d in this){g =this[d];if(c.call(b,g,d,this))f.push(g);}return f;},every:function(d,c){var b=t his.filter(function(){return 1;});return (this.filter(d,c).length==b.length);},s ome:function(c,b){return (this.filter(c,b).length>0);},reduce:null,reduceRight:n ull,sort:a(Array.prototype.sort),reverse:a(Array.prototype.reverse),concat:a(Arr ay.prototype.concat),slice:a(Array.prototype.slice),indexOf:a(Array.prototype.in dexOf function(d,b){var c=this.length;b =0;if(b<0)b+=c;for(;b<c;b++)if(b in thi s&&this[b]===d)return b;return -1;}),contains:function(b){return this.indexOf(b) !=-1;},remove:function(c){var b=this.indexOf(c);if(b!=-1)this.splice(b,1);}});Ar ray.prototype.each=Array.prototype.forEach;Array.prototype.clone=Array.prototype .slice;}(); add_properties('CSS',{supportsBorderRadius:function(){var c=['KhtmlBorderRadius' ,'OBorderRadius','MozBorderRadius','WebkitBorderRadius','msBorderRadius','border Radius'];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 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<argumen ts.length;b++){var a=ge(arguments[b]);if(a&&a.style)a.style.display='none';}retu rn false;}function shown(a){a=ge(a);return (a.style.display!='none'&&!(a.style.d isplay==''&&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';}return false;}function toggleDisplayNone(){for(var b=0;b<argument s.length;b++){var a=$(arguments[b]);if(shown(a)){hide(a);}else show(a);}return f alse;} function tx(b,a){if(typeof _string_table=='undefined')return;b=_string_table[b]; return _tx(b,a);}function intl_ends_in_punct(a){if(typeof a!='string')return fal se;return a.match(new RegExp(intl_ends_in_punct.punct_char_class+'['+')"'+"'"+'\ u00BB'+'\u0F3B'+'\u0F3D'+'\u2019'+'\u201D'+'\u203A'+'\u3009'+'\u300B'+'\u300D'+' \u300F'+'\u3011'+'\u3015'+'\u3017'+'\u3019'+'\u301B'+'\u301E'+'\u301F'+'\uFD3F'+ '\uFF07'+'\uFF09'+'\uFF3D'+'\s'+']*$'));}intl_ends_in_punct.punct_char_class='[' +'.!?'+'\u3002'+'\uFF01'+'\uFF1F'+'\u0964'+'\u2026'+'\u0EAF'+'\u1801'+'\u0E2F'+' \uFF0E'+']';function intl_render_list_separator(){return _tx("{previous-items}, {next-items}",{'previous-items':'','next-items':''});}function intl_phonological _rules(e){var c,b=e,d=window.intl_locale_rewrites;try{if(d){var pats=[],reps=[]; for(var p in d.patterns){var pat=p,rep=d.patterns[p];for(var m in d.meta){c=new RegExp(m.slice(1,-1),'g');pat=pat.replace(c,d.meta[m]);rep=rep.replace(c,d.meta[ m]);}pats[pats.length]=pat;reps[reps.length]=rep;}for(var ii=0;ii<pats.length;ii ++){c=new RegExp(pats[ii].slice(1,-1),'g');if(reps[ii]=='javascript'){if(m=new S

tring(e.match(c)))e=e.replace(c,m.slice(1).toLowerCase());}else e=e.replace(c,re ps[ii]);}}}catch(a){e=b;}c=new RegExp('\x01','g');e=e.replace(c,'');return e;}fu nction _tx(e,a){if(!a)return e;var d;for(var c in a){if(intl_ends_in_punct(a[c]) ){d=new RegExp('\\{'+c+'\\}'+intl_ends_in_punct.punct_char_class+'*','g');}else d=new RegExp('\\{'+c+'\\}','g');var b='';if(a[c][0]!='~')b='\x01';e=e.replace(d, b+a[c]+b);}e=intl_phonological_rules(e);return e;} function intl_locale_is_rtl(){return ('rtl'==CSS.getStyle(document.body,'directi on'));} var KEYS={BACKSPACE:8,TAB:9,RETURN:13,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,LE FT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188}; function AsyncSignal(b,a){this.data=a {};if(window.Env&&Env.tracking_domain&&b. charAt(0)=='/')b=Env.tracking_domain+b;this.uri=b;this.handler=null;}AsyncSignal .prototype.setHandler=function(a){this.handler=a;return this;};AsyncSignal.proto type.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.random ()*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(env_get('no_cookies')&&a!='tpa')return;if(d){var f=new Date();var c=new Date();c.setTime(f.getTime()+d);}document.cookie=a+"="+en codeURIComponent(b)+"; "+(d?"expires="+c.toGMTString()+"; ":"")+"path="+(e '/') +"; domain="+window.location.hostname.replace(/^.*(\.facebook\..*)$/i,'$1');}fun ction 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));}r eturn null;} function goURI(b,a){b=b.toString();if(!a&&window.PageTransitions&&PageTransition s.isInitialized()){PageTransitions.go(b);}else if(window.location.href==b){windo w.location.reload();}else window.location.href=b;}function loadExternalJavascrip t(f,b,a){if(f instanceof Array){var e=f.shift(0);if(e){loadExternalJavascript(e, function(){if(f.length){loadExternalJavascript(f,b,a);}else b&&b();},a);}else if (b)b();}else{var c=a?document.body:document.getElementsByTagName('head')[0];var d=document.createElement('script');d.type='text/javascript';d.src=f;if(b){d.oner ror=d.onload=b;d.onreadystatechange=function(){if(this.readyState=="complete" t his.readyState=="loaded")b();};}c.appendChild(d);return d;}}function invoke_call backs(b,d){if(b)for(var c=0;c<b.length;c++)try{(new Function(b[c])).apply(d);}ca tch(a){}} var ErrorDialog={showAsyncError:function(b){try{return ErrorDialog.show(b.getErr orSummary(),b.getErrorDescription());}catch(a){alert(b);}},show:function(d,c,b,a ){return (new Dialog()).setTitle(d).setBody(c).setButtons([Dialog.OK]).setStacka ble(true).setClassName('errorDialog').setModal(true).setHandler(b bagofholding) .setButtonsMessage(a '').show();}}; add_properties('Form',{getInputs:function(a){a=a document;return [].concat($A(D OM.scry(a,'input')),$A(DOM.scry(a,'select')),$A(DOM.scry(a,'textarea')),$A(DOM.s cry(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.op tions[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:f unction(a){return $A(a.tagName=='FORM'?a.elements:Form.getInputs(a));},getAttrib ute:function(b,a){return (b.getAttributeNode(a) {}).value null;},setDisabled:f unction(b,a){Form.getElements(b).forEach(function(c){if(c.disabled!=undefined){v ar d=DataStore.get(c,'origDisabledState');if(a){if(d===undefined)DataStore.set(c ,'origDisabledState',c.disabled);c.disabled=a;}else{if(d!==true)c.disabled=false ;DataStore.remove(c,'origDisabledState');}}});},bootstrap:function(d,e){var f=(F orm.getAttribute(d,'method') 'GET').toUpperCase();e=Parent.byTag(e,'button') e ;var g=DOMPath.findNodePath(d);var i=Parent.byClass(e,'stat_elem') d;if(CSS.has Class(i,'async_saving'))return;if(e&&(e.form!==d (e.nodeName!='INPUT'&&e.nodeNa

me!='BUTTON') e.type!='submit')){var j=DOM.scry(d,'.enter_submit_target')[0];va r b=e;j&&(e=j);}var c=Form.serialize(d,e);Form.setDisabled(d,true);var a=Form.ge tAttribute(d,'ajaxify') Form.getAttribute(d,'action');var h=new AsyncRequest(a) ;h.setData(c).setNectarModuleDataSafe(d).setReadOnly(f=='GET').setMethod(f).setR elativeTo(d).setStatusElement(i).setHandler(function(k){if(k.isReplay())h.setRel ativeTo(DOMPath.resolveNodePath(g));}).setFinallyHandler(Form.setDisabled.bind(n ull,d,false)).send();},serialize:function(b,c){var a={};Form.getElements(b).forE ach(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.t ype=='hidden' d.tagName=='TEXTAREA'){Form._serializeHelper(a,d.name,Input.getVa lue(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&& c.name&&'submit'==c.type&&DOM.contains(b,c)&&DOM.isNode(c,['input','button']))Fo rm._serializeHelper(a,c.name,c.value);return Form._serializeFix(a);},_serializeH elper: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 Obj ect)a[b]=Form._serializeFix(a[b]);e.push(b);}var d=0,c=true;e.sort().each(functi on(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.display='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.hre f);Form.createHiddenInputs(b,a);DOM.getRootElement().appendChild(a);a.submit();r eturn false;},createHiddenInputs:function(g,a,d,f){d=d {};var c;var h=URI.implo deQuery(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:'hidd en',name:e,value:k});d[e]=c;a.appendChild(c);}}return d;},getFirstElement:functi on(b){var f=['input[type="text"]','textarea','input[type="password"]','input[typ e="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&&element X(d)>0)return d;}catch(a){}}return null;},focusFirst:function(b){var a=Form.getF irstElement(b);if(a){a.focus();return true;}return false;}});var DOMPath={findNo dePath: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;},resolv eNodePath:function(a){var b=ge(a.id) document.documentElement;return DOMPath._r esolveNodePathChildren(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){this._show_loading=true;this._loading_was_shown=false;this._a uto_focus=true;this._fade_enabled=true;this._onload_handlers=[];this._top=125;th is._uniqueID='dialog_'+Dialog._globalCount++;this._content=null;this._obj=null;t his._popup=null;this._overlay=null;this._shim=null;this._hidden_objects=[];this. _causal_elem=null;if(a)this._setFromModel(a);}Metaprototype.makeFinal(Dialog);co py_properties(Dialog,{OK:{name:'ok',label:_tx("Okay")},CANCEL:{name:'cancel',lab el:_tx("Cancel"),className:'inputaux'},CLOSE:{name:'close',label:_tx("Close")},N EXT:{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")},_globalCount:0,_bottoms:[0],max_bot tom:0,_updateMaxBottom:function(){Dialog.max_bottom=Math.max.apply(Math,Dialog._ bottoms);}});copy_properties(Dialog,{OK_AND_CANCEL:[Dialog.OK,Dialog.CANCEL],_ST ANDARD_BUTTONS:[Dialog.OK,Dialog.CANCEL,Dialog.CLOSE,Dialog.SAVE,Dialog.SUBMIT,D ialog.CONFIRM,Dialog.DELETE],SHOULD_HIDE_OBJECTS:!ua.windows(),_useCSSBorders:CS S.supportsBorderRadius() ua.ie()<=6,SIZE:{WIDE:555,STANDARD:445},_HALO_WIDTH:10 ,_BORDER_WIDTH:1,_PADDING_WIDTH:10,MODALITY:{DARK:'dark',WHITE:'white'},dialogSt ack:null,newButton:function(e,d,b,c){var a={name:e,label:d};if(b)a.className=b;i f(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(i,a,f,d,e,c){a= a {};var j=c&&c.rel=='dialog-pipe';copy_properties(a,new URI(i).getQueryData()) ;d=d (f?'GET':'POST');var h=Parent.byClass(c,'stat_elem') c;if(h&&CSS.hasClass (h,'async_saving'))return false;var g;if(j){g=new AjaxPipeRequest();}else g=new AsyncRequest().setReadOnly(!!f).setMethod(d).setRelativeTo(c).setStatusElement(h );g.setURI(i).setNectarModuleDataSafe(c).setData(a);var b=new Dialog(e).setCausa lElement(c).setAsync(g,j);b.show();return false;},_basicMutator:function(a){retu rn 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;},_keyD ownFilter:function(event,a){return a=='onkeydown'&&KeyEventController.filterEven tModifiers(event,a);},_tearDown:function(){Dialog._hideAll();Dialog.dialogStack= null;},_hideAll:function(){if(Dialog.dialogStack!==null&&Dialog.dialogStack.leng th){var b=Dialog.dialogStack.clone();Dialog.dialogStack=null;for(var a=b.length1;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_mod al;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 fal se;}else if(c){a=c;}else if(b.length==1){a=b[0];}else return true;d._handleButto n(a);return false;},call_or_eval:function(obj,func,args){if(!func)return undefin ed;args=args {};if(typeof(func)=='string'){var params=keys(args).join(', ');fun c=eval('({f: function('+params+') { '+func+'}})').f;}return func.apply(obj,value s(args));}});copy_properties(Dialog.prototype,{show:function(a){this._showing=tr ue;if(a){if(this._overlay)this._overlay.style.display='';if(this._fade_enabled)C SS.setStyle(this._obj,'opacity',1);this._obj.style.display='';}else this._dirty( );return this;},showLoading:function(){this._loading_was_shown=true;this._render Dialog($N('div',{className:'dialog_loading'},_tx("Loading...")));return this;},h ide:function(a){if(!this._showing)return this;this._showing=false;if(this._autoh ide_timeout){clearTimeout(this._autohide_timeout);this._autohide_timeout=null;}i f(this._fade_enabled&&(!Dialog.dialogStack Dialog.dialogStack.length<=1)){this. _fadeOut(a);}else this._hide(a);return this;},cancel:function(){if(!this._cancel Handler this._cancelHandler()!==false)this.hide();},getRoot:function(){return t his._obj;},getBody:function(){return DOM.scry(this._obj,'div.dialog_body')[0];}, getButtonElement:function(a){if(typeof a=='string')a=Dialog._findButton(this._bu ttons,a);if(!a !a.name)return null;var b=DOM.scry(this._popup,'input');var c=fu nction(d){return d.name==a.name;};return b.filter(c)[0] null;},getContentNode:f unction(){return DOM.find(this._content,'div.dialog_content');},getFormData:func tion(){return Form.serialize(this.getContentNode());},setShowing:function(){this .show();return this;},setHiding:function(){this.hide();return this;},setTitle:Di alog._basicMutator('_title'),setBody:Dialog._basicMutator('_body'),setExtraData: Dialog._basicMutator('_extra_data'),setReturnData:Dialog._basicMutator('_return_ data'),setShowLoading:Dialog._basicMutator('_show_loading'),setFullBleed:Dialog. _basicMutator('_full_bleed'),setImmediateRendering:function(a){this._immediate_r endering=a;return this;},setCausalElement:function(a){this._causal_elem=a;return this;},setUserData:Dialog._basicMutator('_user_data'),getUserData:function(){re turn this._user_data;},setAutohide:function(a){if(a){if(this._showing){this._aut ohide_timeout=setTimeout(this.hide.shield(this),a);}else this._autohide=a;}else{ this._autohide=null;if(this._autohide_timeout){clearTimeout(this._autohide_timeo ut);this._autohide_timeout=null;}}return this;},setSummary:Dialog._basicMutator( '_summary'),setButtons:function(a){var c;if(!(a instanceof Array)){c=$A(argument s);}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]);c[d]=b;}this._buttons=c;this._updateBu ttons();return this;},setButtonsMessage:Dialog._basicMutator('_buttons_message') ,setClickButtonOnEnter:function(b,a){this._clickButtonOnEnter=a;this._clickButto nOnEnterInputName=b;return this;},setStackable:function(b,a){this._is_stackable= b;this._shown_while_stacked=b&&a;return this;},setHandler:function(a){this._hand ler=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:functi on(){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.setH

andler(function(){Form.post(b,this.getFormData());this.hide();}.bind(this));retu rn this;},setGetURI:function(a){this.setHandler(this._submitForm.bind(this,'GET' ,a));return this;},setModal:function(a,b){if(a===undefined)a=true;if(a&&b)switch (b){case Dialog.MODALITY.DARK:this._modal_class='dark';break;case Dialog.MODALIT Y.WHITE:this._modal_class='white';break;}this._modal=a;return this;},setSemiModa l:function(a){if(a===undefined)a=true;if(a)this.setModal(true,Dialog.MODALITY.DA RK);this._semi_modal=a;return this;},setWideDialog:Dialog._basicMutator('_wide_d ialog'),setContentWidth:Dialog._basicMutator('_content_width'),setTitleLoading:f unction(b){if(b===undefined)b=true;var a=DOM.find(this._popup,'h2.dialog_title') ;if(a)CSS.conditionClass(a,'loading',b);return this;},setSecure:Dialog._basicMut ator('_secure'),setClassName:Dialog._basicMutator('_class_name'),setFadeEnabled: Dialog._basicMutator('_fade_enabled'),setFooter:Dialog._basicMutator('_footer'), setAutoFocus:Dialog._basicMutator('_auto_focus'),setTop:Dialog._basicMutator('_t op'),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));},setAs ync:function(a,f){var c=function(j){if(this._async_request!=a)return;this._async _request=null;var i=j.getPayload();var g=i;var h=function(){if(typeof g=='string '){this.setBody(g);}else this._setFromModel(g);this._update(true);}.bind(this);i f(f){g=i.dialog;Bootloader.setResourceMap(i.resource_map);Bootloader.loadResourc es(i.css,h);}else h();}.bind(this);var b=a.getData();b.__d=1;a.setData(b);var d= bind(this,'hide');var e;if(f){a.setFirstResponseHandler(c);e=a.getAsyncRequest() ;}else{a.setHandler(chain(a.getHandler(),c));e=a;}e.setErrorHandler(chain(d,e.ge tErrorHandler())).setTransportErrorHandler(chain(d,e.getTransportErrorHandler()) );a.send();this._async_request=a;this._dirty();return this;},_dirty:function(){i f(!this._is_dirty){this._is_dirty=true;if(this._immediate_rendering){this._updat e();}else bind(this,'_update',false).defer();}},_format:function(a){if(typeof a= ='string'){a=HTML(a);}else a=HTML.replaceJSONWrapper(a);if(a instanceof HTML)a.s etDeferred(true);return a;},_update:function(d){if(!this._is_dirty&&d!==true)ret urn;this._is_dirty=false;if(!this._showing)return;if(this._autohide&&!this._asyn c_request&&!this._autohide_timeout)this._autohide_timeout=setTimeout(bind(this,' hide'),this._autohide);if(!this._async_request !this._show_loading){if(this._lo ading_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(th is._title){var g=$N('span',this._format(this._title));var h=$N('h2',{className:' dialog_title',id:'title_'+this._uniqueID},g);CSS.conditionClass(h,'secure',this. _secure);b=[h,b];}else b=[b];this._renderDialog(b);CSS.conditionClass(this.getRo ot(),'omitDialogFooter',!a.length);if(this._clickButtonOnEnterInputName&&this._c lickButtonOnEnter&&ge(this._clickButtonOnEnterInputName))Event.listen(ge(this._c lickButtonOnEnterInputName),'keypress',function(i){if(Event.getKeyCode(i)==KEYS. RETURN)this._handleButton(this._clickButtonOnEnter);return true;}.bind(this));fo r(var f=0;f<this._onload_handlers.length;++f)try{this._onload_handlers[f]();}cat ch(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(t his._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=th is._getButtonContent();var c=null;if(!this.getRoot())this._buildDialog();CSS.con ditionClass(this.getRoot(),'omitDialogFooter',!b.length);if(b.length)c=$N('div', {className:'dialog_buttons clearfix'},b);var d=DOM.scry(this._content,'div.dialo g_buttons')[0] null;if(!d){if(!c)return;var a=this.getBody();if(a)DOM.insertAft er(a,c);}else if(c){DOM.replace(d,c);}else DOM.remove(d);},_getButtonContent:fun ction(){var b=[];if((this._buttons&&this._buttons.length>0) this._buttons_messa ge){if(this._buttons_message)b.push($N('div',{className:'dialog_buttons_msg'},th is._format(this._buttons_message)));if(this._buttons)for(var e=0;e<this._buttons .length;e++){var a=this._buttons[e];var c=$N('input',{type:'button',name:a.name

'',value:a.label});var d=$N('label',{className:'uiButton uiButtonLarge uiButton Confirm'},c);if(a.className){a.className.split(/\s+/).each(function(f){CSS.addCl ass(d,f);});if(CSS.hasClass(d,'inputaux')){CSS.removeClass(d,'inputaux');CSS.rem oveClass(d,'uiButtonConfirm');}}if(a.icon)DOM.prependContent(d,$N('img',{src:a.i con,className:'img mrs'}));Event.listen(c,'click',this._handleButton.bind(this,a .name));b.push(d);}}return b;},_renderDialog:function(b){if(Dialog.dialogStack== =null){KeyEventController.registerKey('ESCAPE',Dialog._handleEscapeKey,Dialog._k eyDownFilter);onleaveRegister(Dialog._tearDown);Arbiter.subscribe('page_transiti on',Dialog._tearDown);}if(!this._obj)this._buildDialog();if(this._class_name)CSS .addClass(this._obj,this._class_name);CSS.conditionClass(this._obj,'full_bleed', this._full_bleed);if(typeof b=='string')b=HTML(b).setDeferred(this._immediate_re ndering!==true);DOM.setContent(this._content,b);this._showDialog();if(this._auto _focus)Form.focusFirst.bind(this,this._content).defer();var a=Vector2.getElement Dimensions(this._content).y+Vector2.getElementPosition(this._content).y;Dialog._ bottoms.push(a);this._bottom=a;Dialog._updateMaxBottom();return this;},_buildDia log:function(){this._obj=$N('div',{className:'generic_dialog',tabIndex:'0'});thi s._obj.setAttribute('role','alertdialog');this._obj.setAttribute('aria-labelledb y','title_'+this._uniqueID);this._obj.style.display='none';DOM.getRootElement(). appendChild(this._obj);if(!this._popup)this._popup=$N('div',{className:'generic_ dialog_popup'});this._popup.style.left=this._popup.style.top='';this._obj.append Child(this._popup);if(ua.ie()<7&&!this._shim)Bootloader.loadComponents('iframe-s him',function(){this._shim=new IframeShim(this._popup);});this._buildDialogConte nt();},_showDialog:function(){if(this._modal)if(this._overlay){this._overlay.sty le.display='';}else this._buildOverlay();if(this._obj&&this._obj.style.display){ this._obj.style.visibility='hidden';this._obj.style.display='';this.resetDialogP osition();this._obj.style.visibility='';this._obj.dialog=this;}else this.resetDi alogPosition();clearInterval(this.active_hiding);this.active_hiding=setInterval( this._activeResize.bind(this),500);Arbiter.inform('new_layer');if(!Dialog.dialog Stack)Dialog.dialogStack=[];var c=Dialog.dialogStack;if(c.length){var a=c[c.leng th-1];if(a!=this&&(!a._is_stackable (a._show_loading&&a._loading_was_shown)))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;},_updateShim: function(){return this._shim&&this._shim.show();},_activeResize:function(){if(th is.last_offset_height!=this._content.offsetHeight){this.last_offset_height=this. _content.offsetHeight;this._updateShim();}},_buildDialogContent:function(){CSS.a ddClass(this._obj,'pop_dialog');if(intl_locale_is_rtl())CSS.addClass(this._obj,' pop_dialog_rtl');var a;if(Dialog._useCSSBorders){a='<div class="pop_container_ad vanced">'+'<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_t opright"></div>'+'<div class="pop_bottomright"></div>'+'<div class="pop_bottomle ft"></div>'+'<div class="pop_content pop_content_old" id="pop_content"></div>'+' </div>';DOM.setContent(this._popup,HTML(a));this._frame=DOM.find(this._popup,'di v.pop_content');this._content=this._frame;},_buildOverlay:function(){this._overl ay=$N('div',{id:'generic_dialog_overlay'});if(this._modal_class)CSS.addClass(thi s._overlay,this._modal_class);if(this._semi_modal){var a=function(b){if(b.getTar get()==this._obj b.getTarget()==this._overlay)this.hide();}.bind(this);Event.li sten(this._obj,'click',a);Event.listen(this._overlay,'click',a);}if(ua.ie()<7)th is._overlay.style.height=Vector2.getDocumentDimensions().y+'px';onloadRegister(f unction(){document.body.appendChild(this._overlay);}.bind(this));},resetDialogPo sition:function(){if(!this._popup)return;this._resetDialogObj();this._updateShim ();},_resetDialogObj:function(){var a=DOM.find(this._popup,'div.pop_content');va r d=Vector2.getScrollPosition().y;var f=20;var g=Vector2.getViewportDimensions() .y;var b=Vector2.getElementDimensions(a).y+f;var e=d+this._top+'px';if(this._top +b>g){var c=Math.max(g-b,0);e=((c/2)+d)+'px';}this._popup.style.top=e;},_fadeOut :function(b){if(!this._popup)return;try{animation(this._obj).duration(0).checkpo int().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.displa y='none';if(this._overlay)if(d){this._overlay.style.display='none';}else{DOM.rem ove(this._overlay);this._overlay=null;}this._updateShim();if(this.timeout){clear

Timeout(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.visibil ity='';this._hidden_objects=[];}clearInterval(this.active_hiding);if(this._botto m){var a=Dialog._bottoms;a.splice(a.indexOf(this._bottom),1);Dialog._updateMaxBo ttom();}if(d)return;this.destroy();},destroy:function(){if(Dialog.dialogStack&&D ialog.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._o bj){DOM.remove(this._obj);this._obj=null;this._shim&&this._shim.hide();this._shi m=null;}if(this._close_handler)this._close_handler({return_data:this._return_dat a});},_handleButton:function(a){if(typeof a=='string')a=Dialog._findButton(this. _buttons,a);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,{butto n:a})!==false)this.hide();},_submitForm:function(d,e,b){var c=this.getFormData() ;if(b)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).setNectarModuleDataSa fe(this._causal_elem).setReadOnly(d=='GET');this.setAsync(a);return false;},_set FromModel:function(c){var a={};copy_properties(a,c);if(a.immediateRendering){thi s.setImmediateRendering(a.immediateRendering);delete a.immediateRendering;}for(v ar d in a){if(d=='onloadRegister'){this.onloadRegister(a[d]);continue;}var b=thi s['set'+d.substr(0,1).toUpperCase()+d.substr(1)];b.apply(this,$A(a[d]));}},_upda teBottom:function(){var a=Vector2.getElementDimensions(this._content).y+Vector2. getElementPosition(this._content).y;Dialog._bottoms[Dialog._bottoms.length-1]=a; Dialog._updateMaxBottom();}}); function AsyncRequest(uri){var dispatchResponse=bind(this,function(asyncResponse ){try{this.clearStatusIndicator();this._measureSaved&&this._measureSaved();if(th is._isPrefetch){this._isPrefetch=false;return;}if(!this.isRelevant()){invokeErro rHandler(1010);return;}if(this.initialHandler(asyncResponse)!==false){clearTimeo ut(this.timer);asyncResponse.jscc&&invoke_callbacks([asyncResponse.jscc]);if(thi s.handler)try{var suppress_onload=this.handler(asyncResponse);}catch(exception){ asyncResponse.is_last&&this.finallyHandler(asyncResponse);throw exception;}async Response.is_last&&this.finallyHandler(asyncResponse);if(suppress_onload!==AsyncR equest.suppressOnloadToken){var onload=asyncResponse.onload;if(onload)for(var ii =0;ii<onload.length;ii++)try{(new Function(onload[ii])).apply(this);}catch(excep tion){}if(this.lid&&!asyncResponse.isReplay())Arbiter.inform('tti_ajax',{s:this. lid,d:[this._sendTimeStamp 0,(this._sendTimeStamp&&this._responseTime)?(this._r esponseTime-this._sendTimeStamp):0]},Arbiter.BEHAVIOR_EVENT);var onafterload=asy ncResponse.onafterload;if(onafterload)for(var ii=0;ii<onafterload.length;ii++)tr y{(new Function(onafterload[ii])).apply(this);}catch(exception){}}var invalidate _cache=asyncResponse.invalidate_cache;if(!this.getOption('suppressCacheInvalidat ion')&&invalidate_cache&&invalidate_cache.length)Arbiter.inform(Arbiter.PAGECACH E_INVALIDATE,invalidate_cache);}if(asyncResponse.cacheObservation&&typeof(TabCon soleCacheobserver)!='undefined'&&TabConsoleCacheobserver.instance)TabConsoleCach eobserver.getInstance().addAsyncObservation(asyncResponse.cacheObservation);}cat ch(exception){}});var replayResponses=bind(this,function(){if(is_empty(this._asy ncResponses))return;this.setNewSerial();for(var ii=0;ii<this._asyncResponses.len gth;++ii){var r=this._asyncResponses[ii];invokeResponseHandler(r,true);}});var d ispatchErrorResponse=bind(this,function(asyncResponse,isTransport){try{this.clea rStatusIndicator();var async_error=asyncResponse.getError();if(this._sendTimeSta mp){var _duration=(+new Date())-this._sendTimeStamp;var xfb_ip=this._xFbServer '-';asyncResponse.logError('async_error',_duration+':'+xfb_ip);}else asyncRespon se.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._displayServer Dialog(payload.__dialog,is_confirmation);}else if(this.initialHandler(asyncRespo nse)!==false){clearTimeout(this.timer);try{if(isTransport){this.transportErrorHa ndler(asyncResponse);}else this.errorHandler(asyncResponse);}catch(exception){th is.finallyHandler(asyncResponse);throw exception;}this.finallyHandler(asyncRespo nse);}}catch(exception){}});var _interpretTransportResponse=bind(this,function() {if(this.getOption('suppressEvaluation')){var r=new AsyncResponse(this,this.tran

sport);return {asyncResponse:r};}var _sendError=function(p,error_code,str){if(!w indow.send_error_signal)return;if(this._xFbServer){error_code='1008_'+error_code ;}else error_code='1012_'+error_code;send_error_signal('async_xport_resp',error_ code+':'+(this._xFbServer '-')+':'+p.getURI()+':'+str.length+':'+str.substr(0,1 600));};var shield="for (;;);";var shieldlen=shield.length;var text=this.transpo rt.responseText;if(text.length<=shieldlen){_sendError(this,'empty',text);return {transportError:'Response too short on async to '+this.getURI()};}var offset=0;w hile(text.charAt(offset)==" " text.charAt(offset)=="\n")offset++;offset&&text.s ubstring(offset,offset+shieldlen)==shield;var safeResponse=text.substring(offset +shieldlen);try{var response=eval('('+safeResponse+')');}catch(exception){_sendE rror(this,'excep',text);return {transportError:'eval() failed on async to '+this .getURI()};}return interpretResponse(response);});var interpretResponse=bind(thi s,function(response){if(response.redirect)return {redirect:response.redirect};va r r=new AsyncResponse(this);if(response.__ar!=1){r.payload=response;}else{copy_p roperties(r,response);if(response.tplts)if(window.DynaTemplate)DynaTemplate.regi sterTemplates(response.tplts);}return {asyncResponse:r};});var invokeResponseHan dler=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_glo bal(r.inlinejs);if(r.lid){this._responseTime=(+new Date());if(window.CavalryLogg er)this.cavalry=CavalryLogger.getInstance(r.lid);this.lid=r.lid;}if(r.getError() &&!r.getErrorIsWarning()){var fn=dispatchErrorResponse;}else{var fn=dispatchResp onse;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=fn.defer.bind(fn);var is_transitional=false;if(this.preBoot loadHandler)is_transitional=this.preBootloadHandler(r);r.css=r.css [];r.js=r.js [];Bootloader.loadResources(r.css.concat(r.js),fn,is_transitional,this.getURI( ));}else if(typeof(interp.transportError)!='undefined'){if(this._xFbServer){invo keErrorHandler(1008);}else invokeErrorHandler(1012);}else invokeErrorHandler(100 7);});var invokeErrorHandler=bind(this,function(explicitError){try{if(!window.lo aded&&!this.getOption('handleErrorAfterUnload'))return;}catch(ex){return;}var r= new AsyncResponse(this);var err;try{err=explicitError this.transport.status 10 04;}catch(ex){err=1005;}if(this._requestAborted)err=1011;try{if(this.responseTex t=='')err=1002;}catch(ignore){}if(this.transportErrorHandler){var desc,summary;v ar silent=true;if(false===navigator.onLine){summary=_tx("No Network Connection") ;desc=_tx("Your browser appears to be offline. Please check your internet connec tion and try again.");err=1006;}else if(err>=300&&err<=399){summary=_tx("Redirec tion");desc=_tx("Your access to Facebook was redirected or blocked by a third pa rty at this time, please contact your ISP or reload. ");redir_url=this.transport .getResponseHeader("Location");if(redir_url)goURI(redir_url,true);silent=true;}e lse{summary=_tx("Oops!");desc=_tx("Something went wrong. We're working on gettin g this fixed as soon as we can. You may be able to try again.");}!this.getOption ('suppressErrorAlerts');copy_properties(r,{error:err,errorSummary:summary,errorD escription:desc,silentError:silent});dispatchErrorResponse(r,true);}});var handl eResponse=function(response){var asyncResponse=this.interpretResponse(response); this.invokeResponseHandler(asyncResponse);};var onStateChange=function(){try{if( this.transport.readyState==4){AsyncRequest._inflightPurge();try{if(typeof(this.t ransport.getResponseHeader)!='undefined'&&this.transport.getResponseHeader('X-FB -Server'))this._xFbServer=this.transport.getResponseHeader('X-FB-Server');}catch (ex){}if(this.transport.status>=200&&this.transport.status<300){invokeResponseHa ndler(_interpretTransportResponse());}else if(ua.safari()&&(typeof(this.transpor t.status)=='undefined')){invokeErrorHandler(1002);}else if(window.send_error_sig nal&&window.Env&&window.Env.retry_ajax_on_network_error&&this.transport.status i n {0:1,12029:1,12030:1,12031:1,12152:1}&&this.remainingRetries>0){--this.remaini ngRetries;delete this.transport;this.send(true);return;}else invokeErrorHandler( );if(this.getOption('asynchronous')!==false)delete this.transport;}}catch(except ion){try{if(!window.loaded)return;}catch(ex){return;}delete this.transport;if(th

is.remainingRetries>0){--this.remainingRetries;this.send(true);}else{!this.getOp tion('suppressErrorAlerts');if(window.send_error_signal)send_error_signal('async _xport_resp','1007:'+(this._xFbServer '-')+':'+this.getURI()+':'+exception.mess age);invokeErrorHandler(1007);}}};var onJSONPResponse=function(data,more_chunked _response){var is_first=(this.is_first===undefined);this.is_first=is_first;if(th is.transportIframe&&!more_chunked_response)(function(x){document.body.removeChil d(x);}).bind(null,this.transportIframe).defer();if(ua.ie()>=9&&window.JSON)data= window.JSON.parse(window.JSON.stringify(data));var r=this.interpretResponse(data );r.asyncResponse.is_first=is_first;r.asyncResponse.is_last=!more_chunked_respon se;this.invokeResponseHandler(r);return more_chunked_response;};copy_properties( this,{onstatechange:onStateChange,onjsonpresponse:onJSONPResponse,replayResponse s:replayResponses,invokeResponseHandler:invokeResponseHandler,interpretResponse: interpretResponse,handleResponse:handleResponse,transport:null,method:'POST',uri :'',timeout:null,timer:null,initialHandler:bagofholding,handler:null,errorHandle r:null,transportErrorHandler:null,timeoutHandler:null,finallyHandler:bagofholdin g,serverDialogCancelHandler:bagofholding,relativeTo:null,statusElement:null,stat usClass:'',data:{},context:{},readOnly:false,writeRequiredParams:['post_form_id' ],remainingRetries:0,option:{asynchronous:true,suppressCacheInvalidation:false,s uppressErrorHandlerWarning:false,suppressEvaluation:false,suppressErrorAlerts:fa lse,retries:0,jsonp:false,bundle:false,useIframeTransport:false,tfbEndpoint:true ,handleErrorAfterUnload:false},_replayable:undefined,_replayKey:'',_isPrefetch:f alse});this.errorHandler=AsyncResponse.defaultErrorHandler;this.transportErrorHa ndler=bind(this,'errorHandler');if(uri!=undefined)this.setURI(uri);return this;} Arbiter.subscribe("page_transition",function(b,a){AsyncRequest._id_threshold=a.i d;});copy_properties(AsyncRequest,{receiveJSONPResponse:function(b,a,c){if(this. _JSONPReceivers[b]){if(!this._JSONPReceivers[b](a,c))delete this._JSONPReceivers [b];}else if(window.send_error_signal&&!c){var d=(a.payload&&a.payload.uri) ''; send_error_signal('js_timeout_and_exception','00002:WrongSessionID:error:'+b+':' +d);}},_hasBundledRequest:function(){return AsyncRequest._allBundledRequests.len gth>0;},stashBundledRequest:function(){var a=AsyncRequest._allBundledRequests;As yncRequest._allBundledRequests=[];return a;},setBundledRequestProperties:functio n(b){var c=null;if(b.stashedRequests)AsyncRequest._allBundledRequests=AsyncReque st._allBundledRequests.concat(b.stashedRequests);if(!AsyncRequest._hasBundledReq uest()){var a=b.callback;a&&a();}else{copy_properties(AsyncRequest._bundledReque stProperties,b);if(b.start_immediately)c=AsyncRequest._sendBundledRequests();}re turn c;},_bundleRequest:function(b){if(b.getOption('jsonp') b.getOption('useIfr ameTransport')){b.setOption('bundle',false);return false;}else if(!b.uri.isFaceb ookURI()){b.setOption('bundle',false);return false;}else if(!b.getOption('asynch ronous')){b.setOption('bundle',false);return false;}var a=b.uri.getPath();if(!As yncRequest._bundleTimer)AsyncRequest._bundleTimer=setTimeout(function(){AsyncReq uest._sendBundledRequests();},0);AsyncRequest._allBundledRequests.push([a,b]);re turn true;},_sendBundledRequests:function(){clearTimeout(AsyncRequest._bundleTim er);AsyncRequest._bundleTimer=null;var a=AsyncRequest._allBundledRequests;AsyncR equest._allBundledRequests=[];var e={};copy_properties(e,AsyncRequest._bundledRe questProperties);AsyncRequest._bundledRequestProperties={};if(is_empty(e)&&a.len gth==1){var g=a[0][1];g.setOption('bundle',false).send();return g;}var d=functio n(){e.callback&&e.callback();};if(a.length===0){d();return null;}var b=[];for(va r c=0;c<a.length;c++)b.push([a[c][0],URI.implodeQuery(a[c][1].data)]);var f={dat a:b};if(e.extra_data)copy_properties(f,e.extra_data);var g=new AsyncRequest();g. setURI('/ajax/proxy.php').setData(f).setMethod('POST').setInitialHandler(e.onIni tialResponse bagof(true)).setAllowCrossPageTransition(true).setHandler(function (l){var k=l.getPayload();var n=k.responses;if(n.length!=a.length){return;}else f or(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 requ est to '+j});continue;}var h=m.interpretResponse(n[i][1]);m.invokeResponseHandle r(h);}}).setTransportErrorHandler(function(m){var k=[];var i={transportError:m.e rrorDescription};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(function(h){d() ;}).send();return g;},bootstrap:function(c,b,d){var e='GET';var f=true;var a={}; if(d (b&&b.rel=='async-post')){e='POST';f=false;if(c){c=URI(c);a=c.getQueryData

();c.setQueryData({});}}var g=Parent.byClass(b,'stat_elem') b;if(g&&CSS.hasClas s(g,'async_saving'))return false;new AsyncRequest(c).setReadOnly(f).setMethod(e) .setData(a).setNectarModuleDataSafe(b).setStatusElement(g).setRelativeTo(b).send ();return false;},post:function(b,a){new AsyncRequest(b).setReadOnly(false).setM ethod('POST').setData(a).send();return false;},clearCache:function(){AsyncReques t._reqsCache={};},getLastId:function(){return AsyncRequest._last_id;},_JSONPRece ivers:{},_allBundledRequests:[],_bundledRequestProperties:{},_bundleTimer:null,s uppressOnloadToken:{},REPLAYABLE_AJAX:'ajax/replayable',_last_id:2,_id_threshold :2,_reqsCache:{},_inflight:[],_inflightAdd:bagofholding,_inflightPurge:bagofhold ing,_inflightEnable:function(){if(ua.ie()){copy_properties(AsyncRequest,{_inflig htAdd:function(a){this._inflight.push(a);},_inflightPurge:function(){AsyncReques t._inflight=AsyncRequest._inflight.filter(function(a){return a.transport&&a.tran sport.readyState<4;});}});onunloadRegister(function(){AsyncRequest._inflight.eac h(function(a){if(a.transport&&a.transport.readyState<4){a.transport.abort();dele te a.transport;}});});}}});copy_properties(AsyncRequest.prototype,{setMethod:fun ction(a){this.method=a.toString().toUpperCase();return this;},getMethod:function (){return this.method;},setData:function(a){this.data=a;return this;},getData:fu nction(){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);i f(this.getOption('useIframeTransport')&&!b.isFacebookURI())return this;if(!this. getOption('jsonp')&&!this.getOption('useIframeTransport')&&!b.isSameOrigin())ret urn this;if(!a b.toString()===''){if(window.send_error_signal&&window.get_error _stack){send_error_signal('async_error','1013:-:0:-:'+window.location.href);send _error_signal('async_xport_stack','1013:'+window.location.href+'::'+get_error_st ack());}return this;}this.uri=b;return this;},getURI:function(){return this.uri. toString();},setInitialHandler:function(a){this.initialHandler=a;return this;},s etHandler:function(a){if(!(typeof(a)!='function'))this.handler=a;return this;},g etHandler:function(){return this.handler;},setErrorHandler:function(a){if(!(type of(a)!='function'))this.errorHandler=a;return this;},setTransportErrorHandler:fu nction(a){this.transportErrorHandler=a;return this;},getErrorHandler:function(){ return this.errorHandler;},getTransportErrorHandler:function(){return this.trans portErrorHandler;},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.t imer);this.timer=null;}else{this.timeout=a;clearTimeout(this.timer);this.timer=t his._handleTimeout.bind(this).defer(this.timeout);}return this;},_handleTimeout: function(){this.abandon();this.timeoutHandler(this);},setNewSerial:function(){th is.id=++AsyncRequest._last_id;return this;},setFinallyHandler:function(a){this.f inallyHandler=a;return this;},setServerDialogCancelHandler:function(a){this.serv erDialogCancelHandler=a;return this;},setPreBootloadHandler:function(a){this.pre BootloadHandler=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;},setRelat iveTo:function(a){this.relativeTo=a;return this;},getRelativeTo:function(){retur n 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(this._allow CrossPageTransition)return true;if(!this.id)return true;return this.id>AsyncRequ est._id_threshold;},clearStatusIndicator:function(){var a=this.getStatusElement( );if(a){CSS.removeClass(a,'async_saving');CSS.removeClass(a,this.statusClass);}} ,addStatusIndicator:function(){var a=this.getStatusElement();if(a){CSS.addClass( a,'async_saving');CSS.addClass(a,this.statusClass);}},specifiesWriteRequiredPara ms:function(){return this.writeRequiredParams.every(function(a){this.data[a]=thi s.data[a] Env[a] (ge(a) {}).value;if(this.data[a]!==undefined)return true;ret urn false;},this);},setReplayable:function(b,a){this._replayable=b;this._replayK ey=a '';return this;},setOption:function(a,b){if(typeof(this.option[a])!='undef ined')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 .setTransportErrorHandler(bagofholding);this._requestAborted=1;this.transport.ab

ort();this.setTransportErrorHandler(a);}},abandon:function(){clearTimeout(this.t imer);this.setOption('suppressErrorAlerts',true).setHandler(bagofholding).setErr orHandler(bagofholding).setTransportErrorHandler(bagofholding);if(this.transport ){this._requestAborted=1;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===u ndefined)this.data.nctr={};copy_properties(this.data.nctr,a);}return this;},setN ectarModuleDataSafe:function(a){if(this.setNectarModuleData)this.setNectarModule Data(a);return this;},setNectarImpressionIdSafe:function(){if(this.setNectarImpr essionId)this.setNectarImpressionId();return this;},setPrefetch:function(a){this ._isPrefetch=a;this.setAllowCrossPageTransition(true);return this;},setAllowCros sPageTransition:function(a){this._allowCrossPageTransition=!!a;return this;},sen d:function(c){if(this._checkCache&&this._checkCache())return true;c=c false;if( !this.uri)return false;!this.errorHandler&&!this.getOption('suppressErrorHandler Warning');if(this.getOption('jsonp')&&this.method!='GET')this.setMethod('GET');i f(this.getOption('useIframeTransport')&&this.method!='GET')this.setMethod('GET') ;this.timeoutHandler!==null&&(this.getOption('jsonp') this.getOption('useIframe Transport'));if(!this.getReadOnly()){if(!this.specifiesWriteRequiredParams())ret urn false;if(this.method!='POST')return false;}if(this.method=='POST'&&this.getO ption('tfbEndpoint')){this.data.fb_dtsg=Env.fb_dtsg;this.data.lsd=getCookie('lsd ');}this._replayable=(!this.getReadOnly()&&this._replayable!==false) this._repl ayable;if(this._replayable)Arbiter.inform(AsyncRequest.REPLAYABLE_AJAX,this);if( !is_empty(this.context)&&this.getOption('tfbEndpoint')){copy_properties(this.dat a,this.context);this.data.ajax_log=1;}if(!this.getReadOnly()&&this.getOption('tf bEndpoint')&&this.method=='POST'&&this.data.post_form_id_source===undefined)this .data.post_form_id_source='AsyncRequest';if(this.getOption('bundle')&&AsyncReque st._bundleRequest(this))return true;this.setNewSerial();if(this.getOption('tfbEn dpoint'))this.uri.addQueryData({__a:1});this.finallyHandler=async_callback(this. finallyHandler,'final');var h,d;if(this.method=='GET'){h=this.uri.addQueryData(t his.data).toString();d='';}else{h=this.uri.toString();d=URI.implodeQuery(this.da ta);}if(this.getOption('jsonp') this.getOption('useIframeTransport')){h=this.ur i.addQueryData({__a:this.id}).toString();AsyncRequest._JSONPReceivers[this.id]=a sync_callback(bind(this,'onjsonpresponse'),'json');if(this.getOption('jsonp')){( function(){document.body.appendChild($N('script',{src:h,type:"text/javascript"}) );}).bind(this).defer();}else{var e={position:'absolute',top:'-1000px',left:'-10 00px',width:'80px',height:'80px'};this.transportIframe=$N('iframe',{src:"javascr ipt:''",style:e});document.body.appendChild(this.transportIframe);this.transport Iframe.src=h;}return true;}if(this.transport)return false;var g=null;try{g=new X MLHttpRequest();}catch(b){}if(!g)try{g=new ActiveXObject("Msxml2.XMLHTTP");}catc h(b){}if(!g)try{g=new ActiveXObject("Microsoft.XMLHTTP");}catch(b){}if(!g)return false;g.onreadystatechange=async_callback(bind(this,'onstatechange'),'xhr');if( !c)this.remainingRetries=this.getOption('retries');if(window.send_error_signal window.ArbiterMonitor)this._sendTimeStamp=this._sendTimeStamp (+new Date());thi s.transport=g;try{this.transport.open(this.method,h,this.getOption('asynchronous '));}catch(a){return false;}var f=env_get('svn_rev');if(f)this.transport.setRequ estHeader('X-SVN-Rev',String(f));if(this.method=='POST')this.transport.setReques tHeader('Content-Type','application/x-www-form-urlencoded');this.addStatusIndica tor();this.transport.send(d);if(this.timeout!==null)this.resetTimeout(this.timeo ut);AsyncRequest._inflightAdd(this);return true;},_displayServerDialog:function( c,b){var a=new Dialog(c);if(b)a.setHandler(this._displayConfirmationHandler.bind (this,a));a.setCancelHandler(function(){this.serverDialogCancelHandler.apply(thi s,arguments);this.finallyHandler.apply(this,arguments);}.bind(this)).setCloseHan dler(this.finallyHandler.bind(this)).show();},_displayConfirmationHandler:functi on(a){this.data.confirmed=1;copy_properties(this.data,a.getFormData());this.send ();}});function AsyncResponse(b,a){copy_properties(this,{error:0,errorSummary:nu ll,errorDescription:null,onload:null,replay:false,payload:a null,request:b nul l,silentError:false,is_last:true});return this;}copy_properties(AsyncResponse,{d efaultErrorHandler:function(b){try{if(!b.silentError){AsyncResponse.verboseError Handler(b);}else b.logErrorByGroup('silent',10);}catch(a){alert(b);}},verboseErr

orHandler:function(b){try{var summary=b.getErrorSummary();var desc=b.getErrorDes cription();b.logErrorByGroup('popup',10);if(b.silentError&&desc=='')desc=_tx("So mething went wrong. We're working on getting this fixed as soon as we can. You m ay be able to try again.");ErrorDialog.show(summary,desc);}catch(a){alert(b);}}} );copy_properties(AsyncResponse.prototype,{getRequest:function(){return this.req uest;},getPayload:function(){return this.payload;},getError:function(){return th is.error;},getErrorSummary:function(){return this.errorSummary;},setErrorSummary :function(a){a=(a===undefined?null:a);this.errorSummary=a;return this;},getError Description:function(){return this.errorDescription;},getErrorIsWarning:function (){return this.errorIsWarning;},setReplay:function(a){a=(a===undefined?true:a);t his.replay=!!a;return this;},isReplay:function(){return this.replay;},logError:f unction(a,c){if(window.send_error_signal){c=(c===undefined?'':(':'+c));var d=thi s.request.getURI();var b=this.error+':'+(env_get('vip') '-')+c+':'+(d '-');if( d&&d.indexOf('scribe_endpoint.php')!=-1)a='async_error_double';send_error_signal (a,b);}},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 th is.logError('async_error_logic_'+b);}}); ConnectLogin={init:function(a){this.appID=a.appID;this.oneClick=a.oneClick;XD.in it(a);},login:function(a,c,b){if(this.oneClick&&!c){this._oneClick(a);}else this ._openPopup(a,c,b);},logout:function(){XD.send({type:'logout'});},_oneClick:func tion(a){new AsyncRequest().setURI('/ajax/api/tos.php').setData({app_id:this.appI D,grant_perm:1}).setHandler(function(b){ConnectLogin._refreshLoginStatus();a&&a( );}).send();},_openPopup:function(c,e,d){d=d {};var b=WindowComm.makeHandler(fu nction(h){ConnectLogin._closePopup();if(ConnectLogin.appID)ConnectLogin._refresh LoginStatus();c&&c();}),a=WindowComm.makeHandler(function(h){ConnectLogin._close Popup();}),g=new URI('/login.php');g.setQueryData({api_key:this.appID,next:b,cha nnel_url:a,cancel_url:a,req_perms:e,v:'1.0',fbconnect:1,display:'popup'});g.addQ ueryData(d);var f=this._getSize(d);this._popup=PopupResizer.open(g.toString(),f. height,f.width);},_closePopup:function(){if(this._popup){this._popup.close();thi s._popup=null;}},_refreshLoginStatus:function(){XD.send({type:'refreshLoginStatu s'});},_getSize:function(a){if(a.social_plugin=='registration'){return {width:64 0,height:370};}else return {width:610,height:280};}}; if(!this.JSON)this.JSON=function(){function f(n){return n<10?'0'+n:n;}Date.proto type.toJSON=function(){return this.getUTCFullYear()+'-'+f(this.getUTCMonth()+1)+ '-'+f(this.getUTCDate())+'T'+f(this.getUTCHours())+':'+f(this.getUTCMinutes())+' :'+f(this.getUTCSeconds())+'Z';};var m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\ \f','\r':'\\r','"':'\\"','\\':'\\\\'};function stringify(value,whitelist){var a, i,k,l,v;switch(typeof value){case 'string':return (new RegExp('[\x00-\x1f\\\\"]' )).test(value)?'"'+value.replace(/[\x00-\x1f\\"]/g,function(a){var c=m[a];if(c)r eturn c;c=a.charCodeAt();return '\\u00'+Math.floor(c/16).toString(16)+(c%16).toS tring(16);})+'"':'"'+value+'"';case 'number':return isFinite(value)?String(value ):'null';case 'boolean':return String(value);case 'null':return 'null';case 'obj ect':if(DOM.isNode(value))return null;if(!value)return 'null';if(typeof value.to JSON==='function')return stringify(value.toJSON());a=[];if(typeof value.length== ='number'&&!(propertyIsEnumerable(value,'length'))){l=value.length;for(i=0;i<l;i +=1)a.push(stringify(value[i],whitelist) 'null');return '['+a.join(',')+']';}if (whitelist){l=whitelist.length;for(i=0;i<l;i+=1){k=whitelist[i];if(typeof k==='s tring'){v=stringify(value[k],whitelist);if(v)a.push(stringify(k)+':'+v);}}}else for(k in value)if(typeof k==='string'){v=stringify(value[k],whitelist);if(v)a.pu sh(stringify(k)+':'+v);}return '{'+a.join(',')+'}';}}return {stringify:stringify ,parse:function(text,filter){var j;function walk(k,v){var i,n;if(v&&typeof v===' object')for(i in v)if(Object.prototype.hasOwnProperty.apply(v,[i])){n=walk(i,v[i ]);if(n!==undefined)v[i]=n;}return filter(k,v);}if(text&&/^[\],:{}\s]*$/.test(te xt.replace(/\\./g,'@').replace(/"[^"\\\n\r]*" true false null -?\d+(?:\.\d*)?(:? [eE][+\-]?\d+)?/g,']').replace(/(?:^ : ,)(?:\s*\[)+/g,''))){j=eval('('+text+')') ;return typeof filter==='function'?walk('',j):j;}throw new SyntaxError('decodeJS ON');}};}();function propertyIsEnumerable(a,b){if(a.propertyIsEnumerable)return a.propertyIsEnumerable(b);for(var c in a)if(c==b)return true;return false;} InitialJSLoader={INITIAL_JS_READY:'BOOTLOAD/JSREADY',load:function(a){InitialJSL oader.callback=Bootloader.loadResources(a,InitialJSLoader.callback);},callback:A

rbiter.registerCallback(function(){Arbiter.inform(InitialJSLoader.INITIAL_JS_REA DY,true,Arbiter.BEHAVIOR_STATE);},[OnloadEvent.ONLOAD_DOMCONTENT_CALLBACK])}; window.onloadRegister=function(a){window.loaded?_runHook(a):_addHook('onloadhook s',a);};function onafterloadRegister(a){window.afterloaded?setTimeout(function() {_runHook(a);},0):_addHook('onafterloadhooks',a);}function _onloadHook(){!window .loaded&&window.CavalryLogger&&CavalryLogger.getInstance().setTimeStamp('t_preho oks');_runHooks('onloadhooks');!window.loaded&&window.CavalryLogger&&CavalryLogg er.getInstance().setTimeStamp('t_hooks');window.loaded=true;Arbiter.inform('uipa ge_onload',true,Arbiter.BEHAVIOR_STATE);}function _onafterloadHook(){_runHooks(' onafterloadhooks');window.afterloaded=true;}function _runHook(b){try{return b(); }catch(a){}}function _runHooks(b){var d=b=='onbeforeleavehooks' b=='onbeforeunl oadhooks';var e=null;do{var a=window[b];if(!d)window[b]=null;if(!a)break;for(var c=0;c<a.length;c++)if(d){e=e _runHook(a[c]);}else _runHook(a[c]);if(d)break;}w hile(window[b]);if(d&&e)return e;}function keep_window_set_as_loaded(){if(window .loaded==false){window.loaded=true;_runHooks('onloadhooks');}if(window.afterload ed==false){window.afterloaded=true;_runHooks('onafterloadhooks');}}Arbiter.regis terCallback(_onloadHook,[OnloadEvent.ONLOAD_DOMCONTENT_CALLBACK,InitialJSLoader. INITIAL_JS_READY]);Arbiter.registerCallback(_onafterloadHook,[OnloadEvent.ONLOAD _DOMCONTENT_CALLBACK,OnloadEvent.ONLOAD_CALLBACK,InitialJSLoader.INITIAL_JS_READ Y]);Arbiter.subscribe(OnloadEvent.ONBEFOREUNLOAD,function(b,a){a.warn=_runHooks( 'onbeforeleavehooks') _runHooks('onbeforeunloadhooks');if(!a.warn){window.loade d=false;window.afterloaded=false;}},Arbiter.SUBSCRIBE_NEW);Arbiter.subscribe(Onl oadEvent.ONUNLOAD,function(b,a){_runHooks('onunloadhooks');},Arbiter.SUBSCRIBE_N EW); var PlatformOptInPopup=function(){};copy_properties(PlatformOptInPopup,{DIALOG_U RL:'/connect/uiserver.php',DIALOG_WIDTH:420,DIALOG_HEIGHT:450,APP_ID:12776008723 7610,open:function(d,c,a){if(!d)d='generic';if(!c)c='opt.in';var b=new URI(Platf ormOptInPopup.DIALOG_URL);b.addQueryData({social_plugin:d,method:c,display:'popu p',secure:URI.getRequestURI().isSecure(),app_id:PlatformOptInPopup.APP_ID});if(a )b.addQueryData(a);return PopupResizer.open(b.toString(),PlatformOptInPopup.DIAL OG_WIDTH,PlatformOptInPopup.DIALOG_HEIGHT);}}); WidgetArbiter={_findSiblings:function(){if(WidgetArbiter._siblings)return;Widget Arbiter._siblings=[];for(var b=parent.frames.length-1;b>=0;b--)try{if(parent.fra mes[b]&&parent.frames[b].Arbiter&&parent.frames[b].Arbiter.inform)WidgetArbiter. _siblings.push(parent.frames[b].Arbiter);}catch(a){}},inform:function(){WidgetAr biter._findSiblings();var a=$A(arguments);WidgetArbiter._siblings.each(function( b){b.inform.apply(b,a);});}}; var Button=(function(){var a='uiButtonDisabled';var c='button:blocker';var b='hr ef';function d(i,h){var g=DataStore.get(i,c);if(h){if(g){g.remove();DataStore.re move(i,c);}}else if(!g)DataStore.set(i,c,Event.listen(i,'click',bagof(false),Eve nt.Priority.URGENT));}function e(g){var h=Parent.byClass(g,'uiButton');if(!h)thr ow new Error('invalid use case');return h;}function f(g){return DOM.isNode(g,'a' );}return {getInputElement:function(g){g=e(g);if(f(g))throw new Error('invalid u se case');return DOM.find(g,'input');},isEnabled:function(g){return !CSS.hasClas s(e(g),a);},setEnabled:function(j,g){j=e(j);CSS.conditionClass(j,a,!g);if(f(j)){ var h=j.href;var k=DataStore.get(j,b,'#');if(g){if(!h)j.href=k;}else{if(h&&h!==k )DataStore.set(j,b,h);j.removeAttribute('href');}d(j,g);}else{var i=Button.getIn putElement(j);i.disabled=!g;d(i,g);}},setLabel:function(h,g){h=e(h);if(f(h)){var i=DOM.find(h,'span.uiButtonText');DOM.setContent(i,g);}else Button.getInputElem ent(h).value=g;CSS.conditionClass(h,'uiButtonNoText',!g);},setIcon:function(h,g) {if(!DOM.isNode(g))return;CSS.addClass(g,'customimg');h=e(h);var i=DOM.scry(h,'. img')[0];if(i){DOM.replace(i,g);}else DOM.prependContent(h,g);}};})(); var ExternalNodeConnectWidget=function(i){copy_properties(this,{widgetID:i.widge tID,widget:$(i.widgetID),viewerID:i.viewer,nodeType:i.nodeType,viewerIsAdmin:i.v iewerIsAdmin&&!i.userOptedOut,adminUrl:i.adminUrl,popupOptInParams:{locale:i.loc ale},nodeUri:new URI(i.nodeURL),externalUrl:i.externalURL,pageId:i.pageId,layout :i.layout,edgeType:i.edgeType,error:i.error,errorURI:new URI('/home.php'),alread yConnected:i.alreadyConnected,usingConnectLibrary:!!i.channelURL,commentWidgetMa rkup:i.commentWidgetMarkup,commentWidgetOpen:false,commentWidgetVisible:false,us erProfile:null,connectStoryFbid:0,isAmbiguousText:i.isAmbiguousText,socialBar:i.

socialbar,useDisconnectLink:i.useDisconnectLink,showError:i.showError,showConfir m:i.showConfirm,showFaces:i.showFaces,connectText:i.connectText,ref:i.ref,userOp tedOut:i.userOptedOut,usingInlineCommenting:i.usingInlineCommenting,supportComme nting:!!i.channelURL i.usingInlineCommenting,inlineCommentListenersInitialized: false,forceCommentHooks:i.forceCommentHooks,nux:i.nux,iframeReferer:i.iframeRefe rer,isBlocked:i.isBlocked,isPersonalized:i.isPersonalized,confirmedConnect:i.con firmedConnect,hasSend:i.send,colorScheme:i.colorScheme,grayOut:i.grayOut});if(th is.usingConnectLibrary)UnverifiedXD.init({autoResize:i.autoResize,channelUrl:i.c hannelURL,resizeWidth:i.autoResize&&i.layout!==ExternalNodeConnectWidget.STANDAR D_LAYOUT});this.unwrappedMarkup=[];this.connectButtonSlider=DOM.scry(this.widget ,'div.connect_button_slider');this.connectButtonContainer=null;if(this.connectBu ttonSlider.length){this.connectButtonSlider=this.connectButtonSlider[0];this.con nectButtonContainer=DOM.find(this.connectButtonSlider,'div.connect_button_contai ner');}else this.connectButtonSlider=null;this.connectButton=DOM.find(this.widge t,'a.connect_widget_like_button');if(this.grayOut)this.tombstoneCross=DOM.find(t his.widget,'.tombstone_cross');this.connectedMessage=DOM.scry(this.widget,'span. connect_widget_connected_text');this.connectedMessage=this.connectedMessage.leng th?this.connectedMessage[0]:null;this.notConnectedMessage=DOM.scry(this.widget,' span.connect_widget_not_connected_text');this.notConnectedMessage=this.notConnec tedMessage.length?this.notConnectedMessage[0]:null;this.adminSpans=DOM.scry(this .widget,'span.connect_widget_admin_span');if(this.adminSpans.length>0){this.admi nLinks=[];for(var a=0;a<this.adminSpans.length;a++)this.adminLinks[a]=DOM.find(t his.adminSpans[a],'a.connect_widget_admin_option');}if(this.layout==ExternalNode ConnectWidget.STANDARD_LAYOUT){this.confirmationCell=DOM.find(this.widget,'div.c onnect_confirmation_cell');this.userActionTextSpan=DOM.find(this.confirmationCel l,'span.connect_widget_user_action');this.summaryTextSpan=DOM.find(this.confirma tionCell,'span.connect_widget_summary');this.summaryText=DOM.find(this.confirmat ionCell,'div.connect_widget_text_summary');var j=DOM.scry(this.widget,'div.conne ct_widget_sample_connections');this.sampleConnections=j.length>0?j[0]:null;if(i. showFaces&&i.viewer>0){var e=DOM.scry(this.widget,'div.connect_widget_logged_in_ user');this.loggedInUserPhotoDiv=e.length>0?e[0]:null;}}if(this.layout===Externa lNodeConnectWidget.SIMPLE_LAYOUT){this.originalButtonWidth=this.computeButtonDim ensions().width;this.summaryIncluding=DOM.find(this.widget,'td.connect_widget_si mple_including');this.supportCommenting=false;this.usingInlineCommenting=false;} this.setQueryData();if(this.pageId)copy_properties(this.popupOptInParams,{connec t_id:this.pageId});this.errorSpans=DOM.scry(this.widget,'span.connect_widget_err or_span');if(this.errorSpans.length>0){this.errorLinks=[];for(var b=0;b<this.err orSpans.length;b++)this.errorLinks[b]=DOM.find(this.errorSpans[b],'a.connect_wid get_error_text');}this.confirmSpans=DOM.scry(this.widget,'span.connect_widget_co nfirm_span');if(this.confirmSpans.length>0){this.confirmLinks=[];for(var d=0;d<t his.confirmSpans.length;d++)this.confirmLinks[d]=DOM.find(this.confirmSpans[d],' a.connect_widget_confirm_link');}this.unlikeSpans=DOM.scry(this.widget,'span.unl ike_span');this.unlikeLinks=[];for(var c=0;c<this.unlikeSpans.length;c++){this.u nlikeLinks[c]=DOM.find(this.unlikeSpans[c],'a.connect_widget_unlike_link');Event .listen(this.unlikeLinks[c],'click',this.connectToNodeOnClick.bind(this));}var h =DOM.scry(this.widget,'div.connect_widget_number_cloud');if(h.length==1){this.nu mberCloud=h[0];this.numberCloudNub=DOM.find(this.widget,'div.connect_widget_numb er_cloud_nub');this.numberCloudExtension=DOM.find(this.numberCloud,'div.connect_ widget_number_cloud_extension');this.sizeNumberCloud();this.numberCloudUnlikeSpa n=DOM.find(this.numberCloudExtension,'span.unlike_span');this.numberCloudReminde rSpan=DOM.find(this.numberCloudExtension,'span.like_reminder');this.inAnimation= false;this.reminderIsVisible=CSS.hasClass(this.numberCloudUnlikeSpan,'hidden_ele m');Event.listen(this.numberCloud,'mouseleave',this.restoreReminderSpan.bind(thi s));Event.listen(this.numberCloudExtension,'mouseleave',this.restoreReminderSpan .bind(this));Event.listen(this.numberCloudExtension,'mouseenter',this.exposeUnli keSpan.bind(this));Event.listen(this.numberCloud,'mouseenter',this.exposeUnlikeS pan.bind(this));Event.listen(this.numberCloudExtension,'mouseleave',function(eve nt){this.requiresMouseLeaveEvent=false;}.bind(this));}if(this.usingInlineComment ing&&!this.showFaces){this.shareCommentSpans=DOM.scry(this.widget,'span.connect_ widget_share_comment_span');for(var f=0;f<this.shareCommentSpans.length;f++){var

k=DOM.find(this.shareCommentSpans[f],'a.connect_widget_share_comment_option');E vent.listen(k,'click',function(event){for(var l=0;l<this.shareCommentSpans.lengt h;l++)CSS.addClass(this.shareCommentSpans[l],'hidden_elem');this.presentCommenti ngOption();}.bind(this));}}if(this.layout===ExternalNodeConnectWidget.BUTTON_COU NT_LAYOUT){XD.forced_min_width=this.getButtonCountWidgetWidth();this.numberExclu ding=DOM.find(this.widget,'td.connect_widget_button_count_excluding');this.summa ryIncluding=DOM.find(this.widget,'td.connect_widget_button_count_including');thi s.thumbsUpIcon=DOM.find(this.summaryIncluding,'div.thumbs_up');this.undoRegion=D OM.find(this.summaryIncluding,'div.undo');this.originalButtonWidth=this.computeB uttonDimensions().width;Event.listen(this.thumbsUpIcon,'mouseenter',function(eve nt){this.unwrapMarkup('undo-wrap');this.undoButton=DOM.find(this.undoRegion,'lab el.undo_button input');Event.listen(this.undoButton,'click',this.connectToNodeOn Click.bind(this));CSS.addClass(this.thumbsUpIcon,'hidden_elem');CSS.removeClass( this.undoRegion,'hidden_elem');}.bind(this));Event.listen(this.undoRegion,'mouse leave',function(event){CSS.removeClass(this.thumbsUpIcon,'hidden_elem');CSS.addC lass(this.undoRegion,'hidden_elem');}.bind(this));}if(!this.isBlocked){Event.lis ten(this.connectButton,'click',this.primaryLikeButtonOnClick.bind(this));if(this .grayOut)Event.listen(this.tombstoneCross,'click',this.connectToNodeOnClick.bind (this));}if(this.adminLinks)for(var a=0;a<this.adminLinks.length;a++)Event.liste n(this.adminLinks[a],'click',this.presentAdminPage.bind(this));if(this.errorLink s)for(var a=0;a<this.errorLinks.length;a++)Event.listen(this.errorLinks[a],'clic k',this.presentErrorDialog.bind(this));if(this.confirmLinks)for(var g=0;g<this.c onfirmLinks.length;g++)Event.listen(this.confirmLinks[g],'click',this.presentCon firmDialog.bind(this));if(i.showCaptcha){this.showCaptcha=true;this.connectToNod e(true);}if(this.forceCommentHooks)this.setupCommentHooks($(this.forceCommentHoo ks));this.textInputMarginWithButton=5;this.widthSyncArbiter=Arbiter.subscribe('p latform/socialplugins/send/resize',this.syncSendWidgetWidth.bind(this));Arbiter. inform('platform/socialplugins/like/resize',{button_width:this.computeButtonDime nsionsWithPadding().width,widget_width:Vector2.getElementDimensions(this.widget) .x,layout:this.layout},Arbiter.BEHAVIOR_STATE);Arbiter.subscribe('platform/socia lplugins/dialog',function(m,l){if(l.controllerID!==this.widgetID)this.otherComme ntWidgetOpen=(l.event=='open');}.bind(this));this.subscribeToSync(i);};copy_prop erties(ExternalNodeConnectWidget,{STANDARD_LAYOUT:'standard',BOX_COUNT_LAYOUT:'b ox_count',BUTTON_COUNT_LAYOUT:'button_count',SIMPLE_LAYOUT:'simple',COLOR_DARK:0 ,COLOR_LIGHT:1,OPT_IN_FACEBOOK_APP_ID:'127760087237610',updateLoggedInUser:funct ion(b){var a=ExternalNodeConnectWidget.controllerManagingLogin;a.setLoggedIn(b); a.connectToNode(true);a.userOptedOut=false;delete ExternalNodeConnectWidget.cont rollerManagingLogin;Arbiter.inform('platform/socialplugins/login',{user:b.user}, Arbiter.BEHAVIOR_STATE);WidgetArbiter.inform('platform/socialplugins/login',{use r:b.user},Arbiter.BEHAVIOR_STATE);},onCommentWidgetLoaded:function(a){var b=Exte rnalNodeConnectWidget.self;delete ExternalNodeConnectWidget.self;b.injectComment WidgetMarkup(a);}});copy_properties(ExternalNodeConnectWidget.prototype,{getSync EndpointName:function(){},getConnectionEndpointName:function(){},getPluginName:f unction(){},subscribeToSync:function(a){Arbiter.subscribe('platform/socialplugin s/login',function(c,b){if(this.viewerID&&b.user!==this.viewerID)document.locatio n.reload();}.bind(this));Arbiter.subscribe(this.getSyncEndpointName(),function(c ,b){if(b.externalUrl==a.externalURL){this.userOptedOut=false;this.updateWidget(b .opts,true);}}.bind(this));},setQueryData:function(){copy_properties(this.popupO ptInParams,{protocol:window.location.protocol,external_page_url:this.externalUrl });if(this.nux)copy_properties(this.popupOptInParams,{nux:this.nux,referer:this. iframeReferer});},updateWidget:function(e,d,b){var a=(this.alreadyConnected!=e.n owConnected) (this.showConfirm!=e.showConfirm);if(!d)Arbiter.inform(this.getCon nectionEndpointName(),e,Arbiter.BEHAVIOR_STATE);this.alreadyConnected=e.nowConne cted;this.viewerIsAdmin=e.isAdmin;this.showError=e.showError;this.showConfirm=e. showConfirm;this.adminUrl=e.adminUrl;this.userProfile=e.userProfile;this.connect StoryFbid=e.connectStoryFbid;this.error=e.error;if(!e.nowConnected)this.closeCom mentWidget();if(a&&!d b){var c=e.nowConnected?'edgeCreated':'edgeRemoved';Unver ifiedXD.send({type:c});}if(a this.error)this.syncWidgetDisplay();if(!d b)Widge tArbiter.inform(this.getSyncEndpointName(),{externalUrl:this.externalUrl,opts:e} ,Arbiter.BEHAVIOR_STATE);},presentOptIn:function(){ExternalNodeConnectWidget.con

trollerManagingLogin=this;PlatformOptInPopup.open(this.getPluginName(),'opt.inli ke',this.popupOptInParams);UnverifiedXD.send({type:'authPrompted'});},setLoggedI n:function(a){this.viewerID=a.user;this.newProfilePic=a.profilePic;this.placeFor mUserCheck(a.formUserCheck,a.fbDtsg);},placeFormUserCheck:function(b,a){window.E nv.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:fun ction(c){var b=c.getPayload();if(b.requires_login){this.updateWidget({nowConnect ed:false,isAdmin:false},false);this.presentOptIn();return;}var a={nowConnected:b .success&&b.already_connected,isAdmin:b.is_admin,showError:b.show_error,showConf irm:b.show_confirm,adminUrl:b.admin_url,userProfile:b.user_profile,connectStoryF bid:b.story_fbid,error:b.error_info};this.updateWidget(a,!b.success,b.success);i f(b.success&&this.showCaptcha){window.opener.location.reload();window.close();}} ,getButtonCountWidgetWidth:function(){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.getCollapsedNumb erCloudHeight();this.expandedNumberCloudHeight=this.collapsedNumberCloudHeight+t his.getNumberCloudExtensionHeight();if(this.alreadyConnected)CSS.setStyle(this.n umberCloud,'height',this.expandedNumberCloudHeight+'px');Bootloader.loadComponen ts(['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,'visibility','visible ');animation(this.numberCloud).from('opacity',0).to('opacity',1).duration(100).g o();}));},getCollapsedNumberCloudHeight:function(){var b=Vector2.getElementDimen sions(this.numberCloud).y;var d=parseInt(CSS.getStyle(this.numberCloud,'paddingT op'),10);var c=parseInt(CSS.getStyle(this.numberCloud,'paddingBottom'),10);var a =parseInt(CSS.getStyle(this.numberCloud,'border'),10);return b-d-c-2;},getNumber CloudExtensionHeight:function(){CSS.addClass(this.numberCloudExtension,'connect_ widget_offscreen');if(!this.alreadyConnected)CSS.removeClass(this.numberCloudExt ension,'hidden_elem');var a=Vector2.getElementDimensions(this.numberCloudExtensi on).y;if(!this.alreadyConnected)CSS.addClass(this.numberCloudExtension,'hidden_e lem');CSS.removeClass(this.numberCloudExtension,'connect_widget_offscreen');retu rn a;},restoreReminderSpan:function(event){if(this.reminderIsVisible this.inAni mation)return;this.animateReminderSpanReappearance();},animateReminderSpanReappe arance:function(){if(this.reminderIsVisible this.inAnimation)return;this.inAnim ation=true;CSS.addClass(this.numberCloudUnlikeSpan,'hidden_elem');CSS.setStyle(t his.numberCloudReminderSpan,'opacity',0);CSS.removeClass(this.numberCloudReminde rSpan,'hidden_elem');animation(this.numberCloudReminderSpan).to('opacity',1).dur ation(100).ondone(function(){this.inAnimation=false;this.reminderIsVisible=true; }.bind(this)).go();},exposeUnlikeSpan:function(event){if(!this.alreadyConnected this.requiresMouseLeaveEvent !this.reminderIsVisible this.inAnimation)return; this.inAnimation=true;CSS.addClass(this.numberCloudReminderSpan,'hidden_elem');C SS.setStyle(this.numberCloudUnlikeSpan,'opacity',0);CSS.removeClass(this.numberC loudUnlikeSpan,'hidden_elem');animation(this.numberCloudUnlikeSpan).to('opacity' ,1).duration(100).ondone(function(){this.inAnimation=false;this.reminderIsVisibl e=false;}.bind(this)).go();},conditionallyActivateButton:function(event){this.co mmentButtonIsActive=this.inlineCommentInput.value.trim().length>0;},updateConnec tionWithComment:function(event){Event.kill(event);if(this.commentButtonIsActive) {this.postInlineComment();this.resetInlineComment();this.closeInlineComment();}} ,postInlineComment:function(){this.postUserComment(this.inlineCommentInput.value .trim());},resetInlineComment:function(){this.concealCommentButton();var a=this. inlineCommentInput.getAttribute('placeholder');this.inlineCommentInput.value=a;} ,showInlineComment:function(event){Event.kill(event);if(!this.inlineCommentFlyou tOpen this.inlineCommentFlyoutVisible this.showConfirm this.error)return;this .inlineCommentFlyoutVisible=true;CSS.show(this.inlineCommentFlyout);},hideInline Comment:function(event){Event.kill(event);if(!this.inlineCommentFlyoutOpen !thi s.inlineCommentFlyoutVisible)return;if(DOM.contains(this.inlineCommentFlyout,eve nt.getRelatedTarget()))return;var b=this.inlineCommentInput.value.trim();var a=t his.inlineCommentInput.getAttribute('placeholder');if(b.length>0&&b!=a)return;th is.inlineCommentFlyoutVisible=false;CSS.hide(this.inlineCommentFlyout);},closeIn lineComment:function(){this.inlineCommentFlyoutVisible=false;this.inlineCommentF

lyoutOpen=false;CSS.hide(this.inlineCommentFlyout);this.resetInlineComment();},c oncealCommentButton:function(){CSS.addClass(this.inlineCommentButton,'hidden_ele m');CSS.setStyle(this.inlineCommentInput,'width',this.textInputWidthWithoutButto n+'px');CSS.setStyle(this.inlineCommentInput,'margin-right',0);},positionInlineC ommentFlyout:function(){CSS.addClass(this.inlineCommentFlyout,'comment_widget_of fscreen');CSS.removeClass(this.inlineCommentFlyout,'hidden_elem');var b=0;var a= this.computeButtonDimensions();var e=a.height;var d=this.grayOut?b:b+20;var g=in tl_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':'paddin gLeft';var l=CSS.getStyle(k,h);d=this.grayOut?b:b+parseInt(l,10);var i=Vector2.g etElementDimensions(this.sampleConnections).y;e=i-3;}var j=Vector2.getElementDim ensions(this.summaryText).y;if(j>15)e+=2;CSS.setStyle(this.inlineCommentFlyout,g ,d+'px');CSS.setStyle(this.inlineCommentFlyout,'top',(-e)+'px');var n=Vector2.ge tElementPosition(this.widget,'document').x;var m=Vector2.getElementDimensions(th is.widget).x;var o=n+m-d-5;CSS.setStyle(this.inlineCommentFlyout,'width',o+'px') ;CSS.removeClass(this.inlineCommentButton,'hidden_elem');var f=Vector2.getElemen tDimensions(this.inlineCommentButton).x;CSS.addClass(this.inlineCommentButton,'h idden_elem');var c=(this.inlineCommentClose)?15:0;this.textInputWidthWithoutButt on=o-24-c;this.textInputWidthWithButton=this.textInputWidthWithoutButton-f-this. textInputMarginWithButton-1;CSS.setStyle(this.inlineCommentInput,'width',this.te xtInputWidthWithoutButton+'px');CSS.setStyle(this.inlineCommentInput,'margin-rig ht',0);CSS.removeClass(this.inlineCommentFlyout,'comment_widget_offscreen');CSS. addClass(this.inlineCommentFlyout,'hidden_elem');},postUserComment:function(a){v ar b={href:this.externalUrl,node_type:this.nodeType,edge_type:this.edgeType,page _id:this.pageId,connect_text:this.connectText,story_fbid:this.connectStoryFbid,c omment:a};Bootloader.loadComponents(['async','async-postlude'],function(){new As yncRequest().setURI(this.getCommentAjaxEndpoint()).setData(b).setNectarModuleDat aSafe().setNectarImpressionIdSafe().send();}.bind(this));this.closeCommentWidget ();},closeCommentWidget:function(){if(this.commentWidgetOpen){delete this.inGrac ePeriod;delete this.commentWidgetIsExpanded;this.commentWidgetVisible=false;this .commentWidgetOpen=false;UnverifiedXD.send({type:'dismissEdgeCommentDialog'});}} ,presentAdminPage:function(){var a='_blank';window.open(this.adminUrl.toString() ,a);},presentErrorDialog:function(){var c='_blank';var b='toolbar=0, status=0, w idth=960, height=300';var a=new URI('/connect/connect_to_node_error.php');a.addQ ueryData({title:this.error.brief,body:this.error.full});window.open(a.toString() ,c,b);},presentConfirmDialog:function(){var b='_blank';var a='toolbar=0,status=0 ,width=450,height=200,scrollbars=0,location=0,menubar=0';if(!window.confirmDialo gReturn)window.confirmDialogReturn={};window.confirmDialogReturn[this.widgetID]= this;var c=this.getConfirmURL();window.open(c,b,a);},returnFromConfirmDialog:fun ction(a){if(a){this.showConfirm=null;this.confirmedConnect=a;this.connectToNode( !this.alreadyConnected);}else this.updateWidget({nowConnected:this.alreadyConnec ted,showConfirm:null,isAdmin:this.viewerIsAdmin},false);},syncWidgetDisplay:func tion(){var a=this.alreadyConnected;this.setButtonState(a);this.showElementIf(thi s.connectedMessage,a);this.showElementIf(this.notConnectedMessage,!a);if(this.ad minSpans)for(var b=0;b<this.adminSpans.length;b++)this.showElementIf(this.adminS pans[b],this.viewerIsAdmin);if(this.errorSpans)for(var c=0;c<this.errorSpans.len gth;c++)this.showElementIf(this.errorSpans[c],this.error&&(this.viewerIsAdmin t his.showError));for(var f=0;f<this.confirmSpans.length;f++)this.showElementIf(th is.confirmSpans[f],!this.alreadyConnected&&this.showConfirm);for(var d=0;d<this. unlikeSpans.length;d++)this.showElementIf(this.unlikeSpans[d],this.alreadyConnec ted);if(this.shareCommentSpans)for(var e=0;e<this.shareCommentSpans.length;e++)t his.showElementIf(this.shareCommentSpans[e],a);if(this.layout!==ExternalNodeConn ectWidget.BOX_COUNT_LAYOUT)this.showElementIf(this.connectButton,(!this.useDisco nnectLink !a)&&!this.showConfirm);if(this.layout===ExternalNodeConnectWidget.BO X_COUNT_LAYOUT){this.manageBoxCountButtonAnimation(a);}else if(this.layout===Ext ernalNodeConnectWidget.BUTTON_COUNT_LAYOUT){this.manageButtonCountButtonAnimatio n(a);}else if(this.layout===ExternalNodeConnectWidget.SIMPLE_LAYOUT){this.manage SimpleButtonAnimation(a);}else this.manageStandardButtonAnimation(a);if(!this.lo ggedInUserPhotoDiv)return;if(a){this.slideUserPhotoIn(this.loggedInUserPhotoDiv) ;}else this.slideUserPhotoOut(this.loggedInUserPhotoDiv);},manageStandardButtonA

nimation:function(a){if(this.grayOut)return;if(this.alreadyConnected this.showC onfirm){this.hideButton(true);}else this.hideButton(false);},setButtonState:func tion(a){if(a){CSS.removeClass(this.connectButton,'like_button_no_like');CSS.addC lass(this.connectButton,'like_button_like');this.fixIEButtonDoubleLineBug();}els e{CSS.addClass(this.connectButton,'like_button_no_like');CSS.removeClass(this.co nnectButton,'like_button_like');}},fixIEButtonDoubleLineBug:function(){if(this.l ayout===ExternalNodeConnectWidget.STANDARD_LAYOUT&&ua.ie()<=7&&!this.hasBeenFixe d){var a=this.computeButtonDimensionsWithPadding();CSS.setStyle(this.connectButt on,'width',a.width+1);this.hasBeenFixed=true;}},hideButton:function(a){if(this.l ayout!=='standard')return;if(this.oAnimateBlind)this.oAnimateBlind.stop();this.o AnimateBlind=animation(this.connectButtonSlider).duration(150);var c=1,b=intl_lo cale_is_rtl(),d=b?'marginRight':'marginLeft',e=b?'marginLeft':'marginRight';if(a ){CSS.addClass(this.connectButtonContainer,'hidden');this.oAnimateBlind.ondone(f unction(){CSS.setStyle(this.connectButtonContainer,d,'2px');CSS.setStyle(this.co nnectButtonContainer,'visibility','hidden');CSS.addClass(this.confirmationCell,' connect_confirmation_cell_like');CSS.removeClass(this.confirmationCell,'connect_ confirmation_cell_no_like');this.oAnimateBlind=null;}.bind(this));}else{CSS.setS tyle(this.connectButtonContainer,d,'0px');c=Vector2.getElementDimensions(this.co nnectButton).x;this.oAnimateBlind.ondone(function(){CSS.setStyle(this.connectBut tonSlider,'overflow','visible');CSS.setStyle(this.connectButtonSlider,'width','a uto');CSS.removeClass(this.confirmationCell,'connect_confirmation_cell_like');CS S.addClass(this.confirmationCell,'connect_confirmation_cell_no_like');CSS.setSty le(this.connectButtonContainer,'visibility','visible');CSS.removeClass(this.conn ectButtonContainer,'hidden');this.oAnimateBlind=null;}.bind(this));}this.oAnimat eBlind.to('width',c).blind().go();},showElementIf: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_wi dget_user_not_connected');animation(b).to('width',a).duration(100).checkpoint(). to('opacity',1).duration(400).go();},slideUserPhotoOut:function(a){if(CSS.hasCla ss(a,'connect_widget_user_not_connected'))return;animation(a).to('opacity',0).du ration(100).checkpoint(.25).to('width',0).duration(100).ondone(function(){CSS.ad dClass(a,'connect_widget_user_not_connected');CSS.setStyle(a,'width',null);}).go ();},primaryLikeButtonOnClick:function(event){if(this.grayOut&&this.alreadyConne cted)return;this.connectToNodeOnClick(event);},_clickLocked:false,connectToNodeO nClick:function(event){Event.kill(event);if(!this._clickLocked){this._clickLocke d=true;setTimeout(function(){this._clickLocked=false;}.bind(this),1000);if(this. viewerID==0 this.userOptedOut){this.presentOptIn();}else this.connectToNode(!th is.alreadyConnected);}},connectToNode:function(d){if(!d){if(this.layout===Extern alNodeConnectWidget.SIMPLE_LAYOUT)return;if(this.layout===ExternalNodeConnectWid get.STANDARD_LAYOUT&&!this.usingConnectLibrary){CSS.addClass(this.userActionText Span,'hidden_elem');CSS.removeClass(this.summaryTextSpan,'hidden_elem');CSS.setS tyle(this.summaryTextSpan,'opacity',1);}if(this.shareCommentSpans)for(var b=0;b< this.shareCommentSpans.length;b++)CSS.addClass(this.shareCommentSpans[b],'hidden _elem');if(this.commentWidgetOpen){this.closeCommentWidget();}else if(this.inlin eCommentFlyoutOpen)this.closeInlineComment();}this.updateWidget({nowConnected:!t his.alreadyConnected,isAdmin:this.viewerIsAdmin},true);var a={href:this.external Url,node_type:this.nodeType,edge_type:this.edgeType,page_id:this.pageId,layout:t his.layout,is_personalized:this.isPersonalized,show_captcha:this.showCaptcha,con nect_text:this.connectText,ref:this.ref,now_connected:d,post_form_id:$('post_for m_id').value,iframe_referer:this.iframeReferer};if(this.confirmedConnect)a.confi rm=1;Bootloader.loadComponents(['async','async-postlude'],function(){new AsyncRe quest().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.requiresMouseLeaveEvent=true;if(this.layout===ExternalNodeConnectWidget.STA NDARD_LAYOUT&&!this.usingConnectLibrary){CSS.setStyle(this.userActionTextSpan,'o pacity',1);CSS.removeClass(this.userActionTextSpan,'hidden_elem');CSS.addClass(t his.summaryTextSpan,'hidden_elem');Event.listen(this.widget,'mouseleave',this.tr ansitionBetweenMessages.bind(this));}if(this.shareCommentSpans){for(var c=0;c<th

is.shareCommentSpans;c++)CSS.removeClass(this.shareCommentSpans[c],'hidden_elem' );}else if(this.supportCommenting)this.presentCommentingOption();this.reposition FacepileVertically();}},transitionBetweenMessages:function(event){if(!this.alrea dyConnected CSS.hasClass(this.userActionTextSpan,'hidden_elem'))return;animatio n(this.userActionTextSpan).to('opacity',0).duration(500).ondone(function(){CSS.a ddClass(this.userActionTextSpan,'hidden_elem');CSS.setStyle(this.summaryTextSpan ,'opacity',0);CSS.removeClass(this.summaryTextSpan,'hidden_elem');animation(this .summaryTextSpan).to('opacity',1).duration(500).ondone(function(){this.repositio nFacepileVertically();}.bind(this)).go();this.positionInlineCommentFlyout();}.bi nd(this)).go();},presentCommentingOption:function(){Arbiter.inform('platform/soc ialplugins/dialog',{controllerID:this.widgetID,event:'open'});if(this.usingConne ctLibrary){ExternalNodeConnectWidget.self=this;var a={type:'presentEdgeCommentDi alog',masterFrameName:window.name,version:2};if(this.layout==ExternalNodeConnect Widget.BOX_COUNT_LAYOUT){a.preComputedWidthOffset=this.computeButtonDimensionsWi thPadding().width;if(!intl_locale_is_rtl())a.preComputedWidthOffset+=8;}if(this. socialBar){a.left=parseInt(CSS.getStyle(document.getElementById('profile'),'widt h'),10)+1;}else if(this.hasSend&&this.layout==ExternalNodeConnectWidget.STANDARD _LAYOUT)a.preComputedWidthOffset=this.invertedButtons?0:65;UnverifiedXD.send(a); this.commentWidgetOpen=true;this.commentWidgetVisible=true;this.commentWidgetExp anded=true;}else if(this.usingInlineCommenting)if(!this.inlineCommentListenersIn itialized){this.unwrapMarkup('connect-widget-comment-box-markup');this.initializ eInlineCommentListeners();this.openInlineCommentFlyout();this.positionInlineComm entFlyout();this.inlineCommentListenersInitialized=true;}else{this.positionInlin eCommentFlyout();this.openInlineCommentFlyout();}},unwrapMarkup:function(a){if(t his.unwrappedMarkup[a])return;var c=$(a),b=c.innerHTML;b=b.substr(4,b.length-7); c.innerHTML=b;this.unwrappedMarkup[a]=true;},initializeInlineCommentListeners:fu nction(){this.inlineCommentFlyout=DOM.find(this.widget,'.connect_widget_comment_ box');this.inlineCommentInput=DOM.find(this.inlineCommentFlyout,'.connect_widget _comment_textinput');this.inlineCommentButton=DOM.find(this.inlineCommentFlyout, '.connect_widget_comment_button');this.inlineCommentClose=DOM.scry(this.inlineCo mmentFlyout,'.connect_widget_comment_close_button');if(this.inlineCommentClose.l ength>0)this.inlineCommentClose=this.inlineCommentClose[0];this.commentButtonIsA ctive=false;Event.listen(this.inlineCommentInput,'keyup',this.conditionallyActiv ateButton.bind(this));Event.listen(this.inlineCommentInput,'focus',this.exposeCo mmentButton.bind(this));Event.listen(this.inlineCommentButton,'click',this.updat eConnectionWithComment.bind(this));Event.listen(this.widget,'mouseout',this.hide InlineComment.bind(this));Event.listen(this.widget,'mouseover',this.showInlineCo mment.bind(this));if(this.inlineCommentClose)Event.listen(this.inlineCommentClos e,'click',function(event){for(var a=0;a<this.shareCommentSpans.length;a++)CSS.re moveClass(this.shareCommentSpans[a],'hidden_elem');this.closeInlineComment();}.b ind(this));},exposeCommentButton:function(event){if(!CSS.hasClass(this.inlineCom mentButton,'hidden_elem'))return;CSS.removeClass(this.inlineCommentButton,'hidde n_elem');CSS.setStyle(this.inlineCommentInput,'width',this.textInputWidthWithBut ton+'px');CSS.setStyle(this.inlineCommentInput,'margin-right',this.textInputMarg inWithButton+'px');},openInlineCommentFlyout:function(){CSS.show(this.inlineComm entFlyout);this.inlineCommentFlyoutOpen=true;this.inlineCommentFlyoutVisible=tru e;},manageBoxCountButtonAnimation:function(a){if(a&&!this.showConfirm){this.anim ateBoxCountButtonDisappearance();}else this.animateBoxCountButtonReappearance(); },animateBoxCountButtonDisappearance:function(){if(this.grayOut)return;CSS.addCl ass(this.connectButton,'hidden_elem');CSS.setStyle(this.numberCloudExtension,'op acity',0);CSS.removeClass(this.numberCloudExtension,'hidden_elem');CSS.addClass( this.numberCloudNub,'hidden_elem');CSS.addClass(this.numberCloudUnlikeSpan,'hidd en_elem');CSS.removeClass(this.numberCloudReminderSpan,'hidden_elem');animation( this.numberCloud).to('height',this.expandedNumberCloudHeight).duration(100).ondo ne(function(){animation(this.numberCloudExtension).from('opacity',0).to('opacity ',1).duration(100).go();}.bind(this)).go();},animateBoxCountButtonReappearance:f unction(){CSS.addClass(this.numberCloudExtension,'hidden_elem');animation(this.n umberCloud).to('height',this.collapsedNumberCloudHeight).duration(75).ondone(fun ction(){if(this.showConfirm){for(var a=0;a<this.confirmSpans.length;a++)CSS.remo veClass(this.confirmSpans[a],'hidden_elem');}else{CSS.setStyle(this.connectButto

n,'opacity',0);CSS.removeClass(this.connectButton,'hidden_elem');animation(this. connectButton).from('opacity',0).to('opacity',1).duration(75).ondone(function(){ CSS.setStyle(this.numberCloudNub,'opacity',0);CSS.removeClass(this.numberCloudNu b,'hidden_elem');animation(this.numberCloudNub).from('opacity',0).to('opacity',1 ).duration(50).go();}.bind(this)).go();}}.bind(this)).go();},manageButtonCountBu ttonAnimation:function(a){if(a&&!this.showConfirm){this.animateButtonCountButton Disappearance();}else this.animateButtonCountButtonReappearance();if(!this.grayO ut){CSS.removeClass(this.thumbsUpIcon,'hidden_elem');CSS.addClass(this.undoRegio n,'hidden_elem');}},manageSimpleButtonAnimation:function(a){if(this.grayOut)retu rn;if(a&&!this.showConfirm){this.animateSimpleButtonDisappearance();}else this.a nimateSimpleButtonReappearance();},animateButtonCountButtonDisappearance:functio n(){if(!this.grayOut)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(); animation(this.numberExcluding).from('opacity',1).to('opacity',0).duration(100). ondone(function(){CSS.addClass(this.numberExcluding,'hidden_elem');CSS.setStyle( this.summaryIncluding,'opacity',0);CSS.removeClass(this.summaryIncluding,'hidden _elem');animation(this.summaryIncluding).from('opacity',0).to('opacity',1).durat ion(100).go();}.bind(this)).go();for(var a=0;a<this.confirmSpans.length;a++)CSS. addClass(this.confirmSpans[a],'hidden_elem');if(this.grayOut)CSS.removeClass(thi s.connectButton,'hidden_elem');},animateSimpleButtonDisappearance:function(){ani mation(this.connectButton).from('opacity',1).to('opacity',0).from('width',this.o riginalButtonWidth).to('width','0px').ondone(function(){CSS.addClass(this.connec tButton,'hidden_elem');CSS.setStyle(this.summaryIncluding,'opacity',0);CSS.remov eClass(this.summaryIncluding,'hidden_elem');animation(this.summaryIncluding).fro m('opacity',0).to('opacity',1).duration(100).go();}.bind(this)).duration(50).go( );for(var a=0;a<this.confirmSpans.length;a++)CSS.addClass(this.confirmSpans[a],' hidden_elem');if(this.grayOut)CSS.removeClass(this.connectButton,'hidden_elem'); },computeButtonDimensions:function(){var c=CSS.hasClass(this.connectButton,'hidd en_elem');if(c){CSS.addClass(this.connectButton,'connect_widget_offscreen');CSS. removeClass(this.connectButton,'hidden_elem');}var a=Vector2.getElementDimension s(this.connectButton);var d=a.x;var b=a.y;var f=parseInt(CSS.getStyle(this.conne ctButton,'paddingLeft'),10);var g=parseInt(CSS.getStyle(this.connectButton,'padd ingRight'),10);var h=parseInt(CSS.getStyle(this.connectButton,'paddingTop'),10); var e=parseInt(CSS.getStyle(this.connectButton,'paddingBottom'),10);if(c){CSS.ad dClass(this.connectButton,'hidden_elem');CSS.removeClass(this.connectButton,'con nect_widget_offscreen');}return {width:d-f-g-2,height:b};},computeButtonDimensio nsWithPadding:function(){var c=CSS.hasClass(this.connectButton,'hidden_elem');if (c){CSS.addClass(this.connectButton,'connect_widget_offscreen');CSS.removeClass( this.connectButton,'hidden_elem');}var a=Vector2.getElementDimensions(this.conne ctButton);var d=a.x;var b=a.y;if(ua.ie())d+=3;if(c){CSS.addClass(this.connectBut ton,'hidden_elem');CSS.removeClass(this.connectButton,'connect_widget_offscreen' );}return {width:d,height:b};},animateButtonCountButtonReappearance:function(){i f(this.showConfirm){for(var a=0;a<this.confirmSpans.length;a++)CSS.removeClass(t his.confirmSpans[a],'hidden_elem');}else if(!this.grayOut){CSS.removeClass(this. connectButton,'hidden_elem');animation(this.connectButton).from('width','0px').t o('width',this.originalButtonWidth).from('opacity',0).to('opacity',1).duration(1 00).go();}CSS.setStyle(this.summaryIncluding,'opacity',1);animation(this.summary Including).from('opacity',1).to('opacity',0).duration(100).ondone(function(){CSS .addClass(this.summaryIncluding,'hidden_elem');CSS.setStyle(this.numberExcluding ,'opacity',0);CSS.removeClass(this.numberExcluding,'hidden_elem');animation(this .numberExcluding).from('opacity',0).to('opacity',1).duration(100).go();}.bind(th is)).go();},animateSimpleButtonReappearance:function(){if(this.showConfirm){for( var a=0;a<this.confirmSpans.length;a++)CSS.removeClass(this.confirmSpans[a],'hid den_elem');}else{CSS.removeClass(this.connectButton,'hidden_elem');animation(thi s.connectButton).from('width','0px').to('width',this.originalButtonWidth).from(' opacity',0).to('opacity',1).duration(100).go();}CSS.setStyle(this.summaryIncludi ng,'opacity',1);animation(this.summaryIncluding).from('opacity',1).to('opacity', 0).duration(100).ondone(function(){CSS.addClass(this.summaryIncluding,'hidden_el em');}.bind(this)).go();},injectCommentWidgetMarkup:function(a){this.commentDocu

ment=a;this.commentDocument.body.innerHTML=this.commentWidgetMarkup;this.transfe rCSSStyles();if(this.newProfilePic){var c=DOM.find(this.commentDocument,'img.con nect_comment_widget_user_pic');c.src=this.newProfilePic;delete this.newProfilePi c;}if(ua.ie()){var f=DOM.scry(this.commentDocument,'.connect_comment_share_previ ew_pic');if(f.length>0){f=f[0];var e=50;var d=Vector2.getElementDimensions(f);va r g=e/d.x;if(g<1){CSS.setStyle(f,'width',e);CSS.setStyle(f,'height',d.y*g);}}}th is.setupCommentHooks(this.commentDocument);this.commentWidgetIsExpanded=!this.in lineUnlikeLink;var b=this.getCommentActivatingComponent();b.onmouseout=this.hide CommentWidget.bind(this);b.onmouseover=this.showCommentWidget.bind(this);this.co mmentDocument.body.onmouseout=this.hideCommentWidget.bind(this);this.commentDocu ment.body.onmouseover=this.showCommentWidget.bind(this);this.inGracePeriod=false ;},setupCommentHooks:function(a){this.placeholderInputRegion=DOM.find(a,'div.con nect_comment_widget_placeholder_input_region');this.placeholderInput=DOM.find(th is.placeholderInputRegion,'input.connect_comment_widget_placeholder_input');this .fullInputRegion=DOM.find(a,'div.connect_comment_widget_full_input_region');this .fullInputTextarea=DOM.find(this.fullInputRegion,'textarea.connect_comment_widge t_full_input_textarea');this.widgetButtonRegion=DOM.find(a,'div.connect_comment_ widget_button_region');this.postToFacebookButton=DOM.find(this.widgetButtonRegio n,'.connect_comment_widget_post_button input');this.inlineUnlikeLink=DOM.scry(a, 'a.connect_comment_widget_unlike_link');if(this.inlineUnlikeLink.length>0)this.i nlineUnlikeLink=this.inlineUnlikeLink[0];this.defaultInputText=this.placeholderI nput.value;this.placeholderInput.onfocus=this.transitionToFullInputMode.bind(thi s);this.fullInputTextarea.onfocus=this.removePlaceholderText.bind(this);this.ful lInputTextarea.onblur=this.restorePlaceholderText.bind(this);this.postToFacebook Button.onclick=this.updateUserComment.bind(this);if(this.inlineUnlikeLink)this.i nlineUnlikeLink.onclick=this.connectToNodeOnClick.bind(this);},getCommentActivat ingComponent:function(){if(this.layout===ExternalNodeConnectWidget.BOX_COUNT_LAY OUT this.layout===ExternalNodeConnectWidget.BUTTON_COUNT_LAYOUT){return this.wi dget;}else if(this.layout===ExternalNodeConnectWidget.SIMPLE_LAYOUT){return this .widget;}else if(this.grayOut){return DOM.find(this.widget,'table.connect_widget _interactive_area');}else return this.confirmationCell;},showCommentWidget:funct ion(event){if(this.otherCommentWidgetOpen)return false;this.inGracePeriod=true;t his.killCloseThread();if(this.commentWidgetOpen&&!this.commentWidgetVisible){thi s.commentWidgetVisible=true;CSS.show(this.commentDocument.body);UnverifiedXD.sen d({type:'showEdgeCommentDialog'});}return false;},hideCommentWidget:function(eve nt){if(this.otherCommentWidgetOpen)return false;this.inGracePeriod=false;if(this .commentWidgetOpen&&this.commentWidgetVisible){var a=function(){if(!this.inGrace Period&&this.shouldHideExpandedWidget()){this.fullInputTextarea.blur();this.comm entWidgetVisible=false;if(!this.socialBar)CSS.hide(this.commentDocument.body);Un verifiedXD.send({type:'hideEdgeCommentDialog'});}this.inGracePeriod=false;this.k illCloseThread();}.bind(this);this.closeThreadID=setTimeout(a,100);}return false ;},shouldHideExpandedWidget:function(){return !this.commentWidgetIsExpanded thi s.fullInputTextarea.value==='' this.fullInputTextarea.value===this.defaultInput Text;},killCloseThread:function(){if(this.closeThreadID){clearTimeout(this.close ThreadID);delete this.closeThreadID;}},transferCSSStyles:function(){var d=DOM.sc ry(window.document,'link');var e=DOM.scry(window.document,'style');var c=DOM.fin d(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=='style sheet'){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)ResourceBu ndler.applyCSSToDocument(this.commentDocument);g.id=c.id;g.className=c.className ;this.commentDocument.body.className=window.document.body.className;},transition ToFullInputMode:function(event){this.commentWidgetIsExpanded=true;CSS.hide(this. placeholderInputRegion);CSS.show(this.fullInputRegion);CSS.show(this.widgetButto nRegion);this.fullInputTextarea.focus();return false;},removePlaceholderText:fun ction(event){if(CSS.hasClass(this.fullInputTextarea,'connect_comment_widget_disa bled')){CSS.removeClass(this.fullInputTextarea,'connect_comment_widget_disabled' );this.fullInputTextarea.value='';}return false;},restorePlaceholderText:functio n(event){if(this.fullInputTextarea.value.trim()==''){this.fullInputTextarea.valu e=this.defaultInputText;CSS.addClass(this.fullInputTextarea,'connect_comment_wid

get_disabled');}return false;},updateUserComment:function(event){var a=this.full InputTextarea.value.trim();if(a!=''&&a!=this.defaultInputText)this.postUserComme nt(a);return false;},dismissCommentWidget:function(event){this.closeCommentWidge t();return false;},getAjaxEndpoint:function(){return '/ajax/connect/external_nod e_connect.php';},getCommentAjaxEndpoint:function(){return '/ajax/connect/externa l_edge_comment.php';},getConfirmURL:function(){var a={href:this.externalUrl,page _id:this.pageId,node_type:this.nodeType,edge_type:this.edgeType,widget_id:this.w idgetID};if(this.ref)a.ref=this.ref;return URI('/plugins/like_confirm.php').addQ ueryData(a).toString();},updateLoggedInUser:function(b,a){ExternalNodeConnectWid get.updateLoggedInUser(b,a);},syncSendWidgetWidth:function(i,b){var a=this.compu teButtonDimensionsWithPadding().width;var c=b.button_width-a;if(this.layout===Ex ternalNodeConnectWidget.BOX_COUNT_LAYOUT&&c>0&&c<=5){CSS.setStyle(this.connectBu tton,'width',(b.button_width-parseInt(CSS.getStyle(this.connectButton,'paddingLe ft'))-parseInt(CSS.getStyle(this.connectButton,'paddingRight'))-parseInt(CSS.get Style(this.connectButton,'borderLeftWidth'))-parseInt(CSS.getStyle(this.connectB utton,'borderRightWidth')))+'px');this.sizeNumberCloud();}if(this.layout===Exter nalNodeConnectWidget.STANDARD_LAYOUT){var d=Vector2.getElementDimensions(this.wi dget).y;CSS.setStyle(this.widget,'height',(d+5)+'px');var e=ua.firefox();var f=u a.ie();var g=intl_locale_is_rtl();var h=g?'right':'left';if(f&&f<9){CSS.setStyle (this.connectButton,'position','absolute');CSS.setStyle(this.connectButton,h,-(b .button_width+10)+'px');}else{CSS.setStyle(this.connectButton,'position','fixed' );CSS.setStyle(this.connectButton,h,'0px');}if(f&&this.connectButtonSlider){CSS. setStyle(this.connectButtonSlider,h,b.button_width+'px');if(f<=7)this.fixIEButto nDoubleLineBug();}CSS.setStyle(this.confirmationCell,'position','absolute');CSS. setStyle(this.confirmationCell,h,(b.button_width+a+5)+'px');CSS.setStyle(this.co nfirmationCell,'top','5px');if(this.sampleConnections){CSS.setStyle(this.sampleC onnections,'position','fixed');CSS.setStyle(this.sampleConnections,h,'0');}this. invertedButtons=true;this.repositionFacepileVertically();}},repositionFacepileVe rtically:function(){if(this.invertedButtons&&this.sampleConnections){var a=Vecto r2.getElementDimensions(this.summaryText).y;CSS.setStyle(this.sampleConnections, 'margin-top',(5+a+5)+'px');}}}); var ExternalPageLikeWidget=function(a){a.edgeType='like';this.parent.construct(t his,a);this.unactionLink=DOM.scry(this.widget,'span.unlike_link')[0];if(this.una ctionLink)Event.listen(this.unactionLink,'click',this.connectToNodeOnClick.bind( this));this.hasShowedInsights=false;this.showInsights();};ExternalPageLikeWidget .extend('ExternalNodeConnectWidget');copy_properties(ExternalPageLikeWidget.prot otype,{getSyncEndpointName:function(){return 'platform/like/sync';},getConnectio nEndpointName:function(){return 'platform/like/connection';},getPluginName:funct ion(){return 'like';},presentInsightsPage:function(){var a=this.adminUrl.split(' /');var b=a[a.length-1];window.open('/insights/?sk=po_'+b,'_blank');},showInsigh ts:function(){if(this.hasShowedInsights)return;var b=DOM.scry(this.widget,'a.con nect_widget_insights_link');if(b)for(var a=0;a<b.length;a++){CSS.show(b[a].paren tNode);Event.listen(b[a],'click',this.presentInsightsPage.bind(this));}this.hasS howedInsights=true;},repositionFacepileVertically:function(){this.showInsights() ;this.parent.repositionFacepileVertically();}}); function SendButton(b){var a=$(b.divID);copy_properties(this,{button:DOM.find(a, 'a.btnLink'),channel:b.channel,div:a,divID:b.divID,loggedIn:!!b.userID,nodeImage URL:b.nodeImageURL,nodeTitle:b.nodeTitle,nodeURL:b.nodeURL,nodeSummary:b.nodeSum mary,error:b.error,initFormOpen:b.initFormOpen,likeButtonLayout:b.likeButtonLayo ut});this.init();}copy_properties(SendButton.prototype,{init:function(){this.for mIsOpen=false;this.formIsShown=false;this.pendingFormShow=false;Arbiter.subscrib e('platform/socialplugins/send/sent',function(b,a){if(a.controllerID===this.divI D)this.closeForm();}.bind(this),Arbiter.SUBSCRIBE_NEW);Arbiter.subscribe('platfo rm/socialplugins/send/cancel',function(b,a){if(a.controllerID===this.divID)this. hideForm();}.bind(this),Arbiter.SUBSCRIBE_NEW);this.buttonWidth=Vector2.getEleme ntDimensions(this.button).x;this.widthSyncArbiter=Arbiter.subscribe('platform/so cialplugins/like/resize',this.syncLikeWidgetWidth.bind(this));Arbiter.inform('pl atform/socialplugins/send/resize',{button_width:this.buttonWidth},Arbiter.BEHAVI OR_STATE);Arbiter.subscribe('platform/socialplugins/dialog',function(b,a){if(a.c ontrollerID!==this.divID&&a.event=='open')this.closeForm();}.bind(this));Unverif

iedXD.init({channelUrl:this.channel,autoResize:true,resizeWidth:true});Event.lis ten(this.button,'click',this.toggleFormVisibility.bind(this));if(this.initFormOp en)onafterloadRegister(this.toggleFormVisibility.bind(this));},syncLikeWidgetWid th:function(d,a){var b=a.button_width-this.buttonWidth;if(a.layout==='box_count' &&b>0&&b<=5)CSS.setStyle(this.div,'width',(a.button_width-parseInt(CSS.getStyle( this.button,'paddingLeft'))-parseInt(CSS.getStyle(this.button,'paddingRight'))-p arseInt(CSS.getStyle(this.button,'borderLeftWidth'))-parseInt(CSS.getStyle(this. button,'borderRightWidth')))+'px');if(a.layout==='standard'){var c=intl_locale_i s_rtl()?'right':'left';CSS.setStyle(this.div,'position','absolute');CSS.setStyle (this.div,c,(a.button_width+5)+'px');this.invertedButtons=true;}this.likeWidgetW idth=a.widget_width;this.likeButtonWidth=a.button_width;},toggleFormVisibility:f unction(a){if(!this.loggedIn){a.kill();PlatformOptInPopup.open('send');return;}i f(!this.formIsOpen){this.openForm();}else if(this.formIsShown){this.hideForm();} else this.showForm();},hideForm:function(){if(this.formIsShown){this.formIsShown =false;UnverifiedXD.send({type:'hideEdgeCommentDialog'});CSS.removeClass(this.di v,'fbSendButtonSelected');}},showForm:function(){if(!this.formIsShown){CSS.addCl ass(this.div,'fbSendButtonSelected');this.formIsShown=true;UnverifiedXD.send({ty pe:'showEdgeCommentDialog'});}},closeForm:function(){Arbiter.inform('platform/so cialplugins/dialog',{controllerID:this.divID,event:'close'});if(this.formIsOpen) {this.formIsOpen=this.formIsShown=false;UnverifiedXD.send({type:'dismissEdgeComm entDialog'});CSS.removeClass(this.div,'fbSendButtonSelected');}return this;},ope nForm:function(){Arbiter.inform('platform/socialplugins/dialog',{controllerID:th is.divID,event:'open'});if(!this.formIsOpen){CSS.addClass(this.div,'fbSendButton Selected');this.formIsOpen=this.formIsShown=true;var a={type:'presentEdgeComment Dialog',nodeImageURL:this.nodeImageURL,nodeTitle:this.nodeTitle,nodeURL:this.nod eURL,nodeSummary:this.nodeSummary,controllerID:this.divID,error:this.error,widge t_type:'send'};if(this.likeButtonLayout=='button_count'){a.preComputedWidthOffse t=this.likeWidgetWidth?this.likeWidgetWidth+10:91;}else if(this.likeButtonLayout =='box_count'){a.preComputedHeightOffset=65;a.preComputedWidthOffset=this.button Width?this.buttonWidth+7:60;a.siderender=true;}else if(this.likeButtonLayout=='s imple'){a.preComputedWidthOffset=100;}else if(this.likeButtonLayout=='standard'& &this.invertedButtons)a.preComputedWidthOffset=this.likeButtonWidth?this.likeBut tonWidth+5:69;UnverifiedXD.send(a);}return this;}});

Вам также может понравиться