/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  February 9th 2010 10:57:46 PM PST                            */
/*      Machine:  10.16.139.106                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/1fp0mjs98xq844wk.pkg.js h:12m85ypa                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/1fp0mjs98xq844wk.pkg.js                                   */

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

var Configurable={getOption:function(opt){if(typeof(this.option[opt])=='undefined'){Util.warn('Failed to get option %q; it does not exist.',opt);return null;}return this.option[opt];},setOption:function(opt,v){if(typeof(this.option[opt])=='undefined'){Util.warn('Failed to set option %q; it does not exist.',opt);}else this.option[opt]=v;return this;},getOptions:function(){return this.option;}};
function Nectar(){}copy_properties(Nectar,{linkHandler:function(_L0,_L1){var _L2=Nectar.getNectarParams();_L2['ia']=1;var url=_L1.href;if(!url){url=URI.getRequestURI().toString();_L2['err']=1;}_L2['url']=url;var uri='/ajax/nectar.php'+'?'+URI.implodeQuery({'nctr':_L2})+'&';new AsyncSignal(uri,{}).send();return _L0;},getNectarParams:function(){var _L0={};var _L1=env_get('nctrlid');if(_L1)_L0['id']=_L1;var _L2=env_get('nctrlnid');if(_L2)_L0['nid']=_L2;if(_L1||_L2)_L0['ct']=(new Date()).getTime();copy_properties(_L0,Nectar.extraData.get_query_data());return _L0;},extraData:function(){var _L0={};var _L1=[];return {set_item:function(_L2,_L3,_L4){var _L5=_L0[_L2];if(_L5===undefined){if(_L4)_L1.push(_L2);_L5=[];_L0[_L2]=_L5;}return _L5.push(_L3);},get_item:function(_L2){return _L0[_L2]||[];},get_query_data:function(){var ii,_L3,_L4,_L5={};for(ii=0;ii<_L1.length;ii++){_L4=_L1[ii];_L3=_L0[_L4];if(_L3)_L5[_L4]=_L3.join(',');}_L0=[];_L1=[];return _L5;}};}()});
var PhotostreamConstants={ShowPhoto:'photostream/showPhoto'};
function NectarPhotosLog(){}copy_properties(NectarPhotosLog,{PHOTOS_BUF_LEN:20,showPhotoHandler:function(_L0,_L1){var pid,_L3,aid,ss;_L3=_L1.node;pid=_L1.pid;aid=_L1.aid;ss=_L1.ss;var _L6=Nectar.extraData.get_item('pts');if(pid!==undefined){if(_L6.length==0){Nectar.extraData.set_item('url',_L3.href,false);Nectar.extraData.set_item('aid',aid,true);Nectar.extraData.set_item('ss',ss,false);}Nectar.extraData.set_item('pts',pid,true);}_L6=Nectar.extraData.get_item('pts');if(_L6.length>=NectarPhotosLog.PHOTOS_BUF_LEN)NectarPhotosLog.flushLog();return false;},flushLog:function(){var _L0=Nectar.extraData.get_item('pts');if(_L0.length>0){var url=Nectar.extraData.get_item('url')[0];Nectar.linkHandler(false,{'href':url});}return false;}});onloadRegister(function(){Arbiter.subscribe(PhotostreamConstants.ShowPhoto,NectarPhotosLog.showPhotoHandler);});onbeforeunloadRegister(function(){NectarPhotosLog.flushLog();},false);
function Task(_L0,_L1){copy_properties(this,{task:_L0,option:{synchronous:!!_L1},status:Task.WAITING,result:null,queue:null});}copy_properties(Task,{WAITING:0,READY:1,RUNNING:2,DONE:3,ERROR:4});copy_properties(Task.prototype,Configurable);copy_properties(Task.prototype,{run:function(){this.status=Task.RUNNING;try{var _L0=this.task();}catch(exception){this.status=Task.ERROR;exception._task=this;throw exception;}if(this.getOption('synchronous'))this.didComplete(_L0);},didComplete:function(_L0){this.result=_L0;this.status=Task.DONE;if(this.queue)this.queue.didCompleteTask(this);return this;}});function TaskQueue(){copy_properties(this,{queue:[],executingTasks:0,executionDepth:0,option:{synchronous:true,concurrency:2}});}copy_properties(TaskQueue.prototype,Configurable);copy_properties(TaskQueue.prototype,{addTask:function(_L0){this.queue.push(_L0);_L0.queue=this;return _L0;},didCompleteTask:function(_L0){this.executingTasks--;this.reapQueue();if(!this.executionDepth)this.start();},runTask:function(_L0){this.executingTasks++;if(this.getOption('synchronous')){try{_L0.run();}catch(exception){Util.error('Exception thrown while running task: %x.',exception);this.didCompleteTask();}}else setTimeout(bind(_L0,'run'),10);},reapQueue:function(){var _L0;var ii,len;for(ii=0,len=this.queue.length;ii<len;ii++){_L0=this.queue[ii].status;if(_L0!=Task.DONE&&_L0!=Task.ERROR)break;}if(ii)this.queue=this.queue.slice(ii);},start:function(){this.executionDepth++;while(this.executingTasks<this.getOption('concurrency')){for(var ii=0,len=this.queue.length;ii<len;ii++)if(this.queue[ii].status==Task.READY){this.runTask(this.queue[ii]);break;}if(ii==len)break;}this.executionDepth--;},ready:function(n){n=n||1;for(var ii=0,len=this.queue.length;ii<len;ii++)if(this.queue[ii].status==Task.WAITING){this.queue[ii].status=Task.READY;if(!(--n))break;}this.start();}});
var PhotoPageTags={removeCallback:function(_L0,_L1){var _L2=ge('phototags');if(_L2&&undefined!==_L1.tag_html)_L2.setContent(HTML(_L1.tag_html));PhotoTagViewer.getInstance('myphoto').hideTag();PhotoPageTags.resetInstructions();},addCallback:function(_L0,_L1){var _L2=ge('phototags');if(_L2&&undefined!==_L1.tag_html)_L2.setContent(HTML(_L1.tag_html));var _L3=htmlize(_L0.getText());var _L4=htmlize(_L1.photoOwnerName);var _L5='';if(_L1.tag_success){_L5='<b>';if(!_L1.tags_need_approval){if(_L1.user==_L0.getTaggeeId()){_L5+=_tx("\u7167\u7247\u6807\u7b7e\u5df2\u4fdd\u5b58");}else _L5+=_tx("{name}\u7684\u6807\u7b7e\u5df2\u4fdd\u5b58",{'name':_L3});}else if(_L1.user==_L0.getTaggeeId()){_L5+=_tx("\u6807\u8bb0\u60a8\u7684\u8bf7\u6c42\u5c06\u4f1a\u53d1\u7ed9 {photo-owner} \u6279\u51c6\u3002",{'photo-owner':_L4});}else _L5+=_tx("\u6807\u8bb0 {name} \u7684\u8bf7\u6c42\u5c06\u4f1a\u53d1\u7ed9 {photo-owner} \u6279\u51c6\u3002",{'name':_L3,'photo-owner':_L4});_L5+='</b>.<br/>';}else _L5='<b style="color:red">'+_tx("\u6807\u7b7e\u7167\u7247\u7684\u65f6\u5019\u51fa\u73b0\u4e86\u9519\u8bef\u3002\u8bf7\u7a0d\u540e\u91cd\u8bd5\u3002")+'</b><br />';if(_L1.invite_sent)_L5+='<b style="color: green">'+_tx("\u9080\u8bf7\u548c\u52a0\u4e3a\u670b\u53cb\u8bf7\u6c42\u5df2\u53d1\u9001\u81f3{name}",{name:_L3})+'</b><br/>';if(!_L1.tags_need_approval){_L5+=_tx("\u4f60\u53ef\u4ee5\u7ee7\u7eed\u6807\u8bb0\u4e0b\u5217\u7167\u7247\u3002");}else _L5+=_tx("\u60a8\u53ef\u4ee5\u7ee7\u7eed\u7ed9\u4e0b\u9762\u7684\u7167\u7247\u6dfb\u52a0\u6807\u7b7e\u3002");_L5+='<br/>'+_tx("\u5b8c\u6210\u540e\uff0c\u70b9\u51fb\u300c\u6807\u8bb0\u5b8c\u6210\u300d\u6309\u94ae\u7ee7\u7eed\u6d4f\u89c8\u3002");hide('tagging_instructions_default_message');set_inner_html($('tagging_instructions_status_message'),_L5);PhotoPageTags.focusInstructions();},showTaggingUI:function(){window['photocrop']&&window['photocrop'].destroy();PhotoTagController.getInstance('myphoto').enableTagging(PhotoPageTags.addCallback);show('tagging_instructions');PhotoPageTags.resetInstructions();PhotoPageTags.focusInstructions();},resetInstructions:function(){if(!ge('tagging_instructions_status_message'))return;$('tagging_instructions_status_message').empty();show('tagging_instructions_default_message');},hideTaggingUI:function(){hide('tagging_instructions');if(PhotoTagController.getInstance('myphoto'))PhotoTagController.getInstance('myphoto').disableTagging();},focusInstructions:function(){var _L0=Vector2.getElementPosition($('tagging_instructions'));if(Vector2.getScrollPosition().y>_L0.y)DOMScroll.scrollTo(_L0.sub(0,8));}};

if (window.Bootloader) { Bootloader.done(["js\/1fp0mjs98xq844wk.pkg.js"]); }