/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  February 10th 2010 2:48:08 AM PST                            */
/*      Machine:  10.16.139.105                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/508dsn3bct8gw8cw.pkg.js h:blzw9xgh                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/508dsn3bct8gw8cw.pkg.js                                   */

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

function UserActivity(){}copy_properties(UserActivity,{_initialized:false,_listeners:[],initialize:function(){var _L0=function(_L2){Arbiter.inform(Arbiter.USER_ACTIVITY,_L2);};UserActivity._listeners.push(Event.listen(document.body,'mouseover',_L0));var _L1=window;if(ua.ie())_L1=document.body;UserActivity._listeners.push(Event.listen(_L1,'keydown',_L0));UserActivity._listeners.push(Event.listen(document.body,'click',_L0));UserActivity._initialized=true;},subscribe:function(_L0){if(!UserActivity._initialized)UserActivity.initialize();return Arbiter.subscribe(Arbiter.USER_ACTIVITY,_L0,Arbiter.SUBSCRIBE_NEW);},unsubscribe:function(_L0){Arbiter.unsubscribe(_L0);}});onloadRegister(UserActivity.initialize);
function OnVisible(_L0,_L1){this.targetY=Vector2.getElementPosition(_L0).y;var _L2=function(){var y=Vector2.getScrollPosition().y+Vector2.getViewportDimensions().y;if(y>this.targetY){this.remove();_L1();}return true;}.bind(this);if(DOMScroll.usingScrollWrapper()){var _L3=DOMScroll.getScrollRoot();}else var _L3=window;this.scrollListener=Event.listen(_L3,'scroll',_L2);this.resizeListener=Event.listen(window,'resize',_L2);_L2();onunloadRegister(this.remove.bind(this));}copy_properties(OnVisible.prototype,{remove:function(){if(this.scrollListener){this.scrollListener.remove();this.resizeListener.remove();this.scrollListener=this.resizeListener=null;}}});
function RecentActivityEditor(){RecentActivityEditor.instance=this;copy_properties(this,{dialog:null,showingFriendSelector:false});}copy_properties(RecentActivityEditor,{show:function(){if(RecentActivityEditor.instance)return false;return new RecentActivityEditor().showDialog();},verifyPositiveInteger:function(_L0){_L0=_L0||ge('recent_activity_settings_input_num_friends');if(!_L0)return true;var _L1=_L0.value.trim();var _L2=_L1.replace(/[^0-9]/g,'');var _L3=$('recent_activity_settings_warning');if(_L1!=_L2||_L1<=0){show(_L3);return false;}hide(_L3);return true;}});copy_properties(RecentActivityEditor.prototype,{showDialog:function(){var _L0=new AsyncRequest().setMethod('POST').setReadOnly(true).setURI('/ajax/feed/recent_activity/settings_dialog.php').setData(this.getFormData());if(!this.dialog)this.dialog=new Dialog().setHandler(this.handleResponse.bind(this)).setCloseHandler(function(){if(RecentActivityEditor.instance)delete RecentActivityEditor.instance;});this.dialog.setAsync(_L0).show();this.showingFriendSelector=false;return false;},handleResponse:function(_L0){if(_L0==Dialog.SAVE){if(!RecentActivityEditor.verifyPositiveInteger())return false;this.dialog.setLoadingText(_tx("Bezig met opslaan...")).setAsync(new AsyncRequest().setURI('/ajax/feed/recent_activity/settings_save.php').setData(this.getFormData()).setHandler(function(){window.location.reload();}));return false;}},showFriendSelectorDialog:function(){if(!RecentActivityEditor.verifyPositiveInteger())return false;this.dialog.setAsync(new AsyncRequest().setMethod('POST').setReadOnly(true).setURI('/ajax/feed/recent_activity/friend_selector_dialog.php').setData(this.getFormData()));this.showingFriendSelector=true;return false;},getFormData:function(){var _L0={};if(this.dialog){_L0=this.dialog.getFormData();if(this.showingFriendSelector)_L0.always_show=window.fs.get_selected();}return _L0;}});
var NewHigh={reset:function(){this.initialized=false;},ensureInitialized:function(){if(this.initialized)return;this.button=DOM.scry(document.body,'a.stream_header_button')[0];this.composer=DOM.scry(document.body,'div.UIComposer')[0];this.buttonArea=DOM.scry(this.composer,'div.UIComposer_ButtonArea')[0];this.initialized=true;},showComposer:function(_L0){this.ensureInitialized();if(this.composer){this.composer.removeClass('hidden_elem');UIComposer.focusInstance(this.composer.id);var _L1=UIComposer.getInstance(this.composer.id);_L1&&_L1.loadAttachment(_L0);}this.button&&this.button.addClass('hidden_elem');},hideComposer:function(_L0){this.ensureInitialized();if(this.composer){var _L1=UIComposer.getInstance(this.composer.id);if(!_L0){_L1&&_L1.initialized&&_L1.blur();this.composer.addClass('hidden_elem');this.button&&this.button.removeClass('hidden_elem');}else{_L1&&_L1.initialized&&_L1.loadAttachment(0);this.composer.removeClass('hidden_elem');this.buttonArea&&this.buttonArea.addClass('hidden_elem');}}}};
function UIIntentionalStream(_L0,_L1,_L2,_L3,_L4,_L5,_L6,_L7,_L8,_L9,_La,_Lb,_Lc){if(!_L0)throw new Error('UIIntentionalStream instantiated with no root.');copy_properties(this,{id:_L0.id,root:_L0,instanceName:_L1,newest:_L2,oldest:_L3,firstLoadIDs:_Lc,hiddenCount:_L4,hiddenIDCount:_L5,shouldShowHidden:false,storyCount:_L6,hasAdditionalStories:_L7,defaultFilter:_L8,currentFilterKey:null,sourceType:_L9,stickyFilter:_La,streamStoryCount:_Lb,isAutoRefreshing:false,hasPendingRefresh:false,storyInterval:null,lastRefresh:new Date().getTime(),presenceCheckCounter:0,unseenStoryCount:0,streamHeader:DOM.scry(document.body,'div.UIIntentionalStream_Top')[0],forceFilterKey:false,pageloadTime:new Date().getTime(),heavyRefreshCount:0,pushRefreshCount:0,pollRefreshCount:0,scrollLoadIsDone:false,error:DOM.scry(_L0,'div.UIIntentionalStream_Error')[0],pager:_L0.find('div.UIShowMore_Pager'),hiddenInfo:_L0.find('div.UIIntentionalStream_HiddenInfo'),streamContent:_L0.find('div.UIIntentionalStream_Content'),requestNum:0,forceRefresh:false,pauseAutoInsert:false});this.setUpHighlightsStreamHeader();if(this.streamStoryCount>0)this.updateLiveFeedCount(this.streamStoryCount);this.setAutoRefreshConfig({});onunloadRegister(this.unload.bind(this));this.userActivity();this.updatePager();CSS.removeClass(this.pager,'hidden_elem');this.uaToken=UserActivity.subscribe(this.userActivity.bind(this));if(!UIIntentionalStream.instances)UIIntentionalStream.instances={};UIIntentionalStream.instances[_L1]=this;UIIntentionalStream.instance=this;this.setupAutoPageRefresh();this.setupAutoInsert();}UIIntentionalStream.prototype.unload=function(){if(this.logDetail&&this.allowAutoRefresh){var _L0=new Date().getTime()-this.pageloadTime;scribe_log('nile_refresh_detail','unload_stat '+_L0+' '+this.heavyRefreshCount+' '+this.pushRefreshCount+' '+this.pollRefreshCount);}this.enableAutoRefresh(false);this.cleanupRefreshInterval();UIIntentionalStream.instance=null;UIIntentionalStream.instances[this.instanceName]=null;UserActivity.unsubscribe(this.uaToken);this.clearScrollLoader();};UIIntentionalStream.getInstance=function(_L0){return UIIntentionalStream.instances[_L0];};UIIntentionalStream.handleNewStoryMessage=function(_L0,_L1){var _L2=UIIntentionalStream.instance;if(_L2){_L2.pushRefreshCount++;_L2.updateStream();}};UIIntentionalStream.callOnInstance=function(_L0){return function(){if(UIIntentionalStream.instance){var fn=UIIntentionalStream.instance[_L0];return fn.apply(UIIntentionalStream.instance,arguments);}else return null;};};UIIntentionalStream.prototype.presenceStreamCheck=function(_L0,_L1,_L2){if(!this.allowAutoRefresh||!this.presenceLoopPerPoll)return false;if(!presenceNotifications.requiresUpdate(_L0,_L1,_L2))return false;if(!this.needsRefresh())return false;++this.presenceCheckCounter;if(this.presenceCheckCounter>=this.presenceLoopPerPoll){var _L3=this.getCurrentParams();_L3.newest=this.newest;_L3.last_refresh=this.getMSSinceLastRefresh();this.lastPresenceRequestNum=++this.requestNum;_L1['stream_query']=_L3;this.presenceCheckCounter=0;return true;}return false;};UIIntentionalStream.prototype._getUpdateInsertType=function(){if(this.isOnNewHighlights())return UIIntentionalStream.REFRESH_COUNT;return UIIntentionalStream.REFRESH_PREPEND;};UIIntentionalStream.prototype.presenceStreamResponse=function(_L0,_L1){this.lastRefresh=new Date().getTime();this.heavyRefreshCount++;this.handleResponsePayload(this.lastPresenceRequestNum,this._getUpdateInsertType(),_L0);this.lastPresenceRequestNum=0;};UIIntentionalStream.prototype.setStoryInterval=function(_L0){this.storyInterval=_L0;return this;};UIIntentionalStream.prototype.setAutoRefreshConfig=function(_L0){_L0=_L0||{};var _L1=24*60*60*1000;this.allowAutoRefresh=coalesce(_L0.allow_auto_refresh,false);this.inactiveThreshold=coalesce(_L0.inactive_threshold,0);this.activeRefreshTime=coalesce(_L0.fast_refresh_rate,_L1);this.inactiveRefreshTime=coalesce(_L0.slow_refresh_rate,_L1);this.allowPolling=coalesce(_L0.allow_polling,false);this.refreshFactor=coalesce(_L0.refresh_factor,10);this.presenceLoopPerPoll=coalesce(_L0.presence_loop_per_poll,0);this.minRefreshInterval=coalesce(_L0.min_refresh_interval,60*1000);this.logDetail=coalesce(_L0.log_detail,false);return this;};UIIntentionalStream.prototype.shouldAutoRefresh=function(){return this.isAutoRefreshing&&this.allowAutoRefresh;};UIIntentionalStream.prototype.clearPendingHighlights=function(){if(this.isOnNewHighlights()&&(this.getMSSinceLastActivity()>UIIntentionalStream.HIGHLIGHTS_REFRESH_INACTIVE_THRESHOLD))new AsyncSignal('/ajax/feed/save_view_state.php').send();};UIIntentionalStream.prototype.userActivity=function(){this.clearPendingHighlights();var _L0=this.isInactive();this.lastActivity=(new Date().getTime());this.isAutoRefreshing=true;if(_L0&&this.shouldAutoRefresh()&&this.needsRefresh()){this.updateStream();this.schedulePoll(this.getRefreshInterval());}return true;};UIIntentionalStream.prototype.getMSSinceLastActivity=function(){return (new Date().getTime())-this.lastActivity;};UIIntentionalStream.prototype.getMSSinceLastRefresh=function(){return (new Date().getTime())-this.lastRefresh;};UIIntentionalStream.prototype.isInactive=function(){return this.getMSSinceLastActivity()>this.inactiveThreshold;};UIIntentionalStream.prototype.getRefreshInterval=function(){if(this.isInactive()){return this.inactiveRefreshTime;}else if(this.storyInterval!=null){var _L0=this.storyInterval*this.refreshFactor;return Math.max(_L0,this.activeRefreshTime);}else return this.activeRefreshTime;};UIIntentionalStream.prototype.enableAutoRefresh=function(_L0,_L1){this.isAutoRefreshing=_L0;if(_L0){var _L2=_L1?0:this.getRefreshInterval();this.schedulePoll(_L2);}else this.cancelUpdate();};UIIntentionalStream.prototype.cancelUpdate=function(){if(this.updateTask){clearTimeout(this.updateTask);this.updateTask=null;}};UIIntentionalStream.prototype.schedulePoll=function(_L0){this.cancelUpdate();if(this.allowPolling)this.updateTask=setTimeout(this.runUpdatePoll.bind(this),_L0);};UIIntentionalStream.prototype.needsRefresh=function(){return !(this.hasPendingRefresh||this.getMSSinceLastRefresh()<this.minRefreshInterval);};UIIntentionalStream.prototype.runUpdatePoll=function(){this.updateTask=null;if(!this.shouldAutoRefresh())return;if(this.needsRefresh()){this.pollRefreshCount++;this.updateStream();}this.schedulePoll(this.getRefreshInterval());};UIIntentionalStream.prototype.updateStream=function(){if(!this.shouldAutoRefresh()||this.isAutoRefreshPaused())return;this.loadNewer({showLoader:false,ignoreSelf:true,insertType:this._getUpdateInsertType()});};UIIntentionalStream.prototype.clearScrollLoader=function(){if(this.currentScrollListener){this.currentScrollListener.remove();this.currentScrollListener=null;}this.scrollLoadIsDone=true;};UIIntentionalStream.prototype.loadMoreOnScroll=function(_L0,_L1,_L2){if(this.scrollLoadIsDone)return;var _L3=function(){this.clearScrollLoader();this.loadOlder({delayLoadCount:_L1,firstLoadIDs:this.firstLoadIDs,showLoader:false,queryTime:_L2});}.bind(this);if(ge(_L0)){this.currentScrollListener=new OnVisible($(_L0),_L3);}else this.scroll_handler();};UIIntentionalStream.prototype.updatePageCache=function(){this.loadNewer({bundleAsync:true,showLoader:false,ignoreReqNum:true});};UIIntentionalStream.prototype.getID=function(){return this.id;};UIIntentionalStream.prototype.showPositioned=function(_L0,_L1,_L2){if(_L1==UIIntentionalStream.REFRESH_APPEND){this.root.appendContent(_L0);}else if(_L1==UIIntentionalStream.REFRESH_PREPEND){this.root.prependContent(_L0);}else if(_L1==UIIntentionalStream.REFRESH_EXPAND)DOM.insertAfter($(_L2.expandStoryID),_L0);_L0.setStyle('display','block');if(_L0.src)_L0.src=_L0.src;};UIIntentionalStream.prototype.showHiddenStories=function(){this.shouldShowHidden=true;var _L0=this.getCurrentParams();_L0.max_stories=this.storyCount+this.hiddenCount;_L0.show_hidden=true;this.refresh(UIIntentionalStream.REFRESH_TRANSITION,_L0);DOMScroll.scrollTo($('home_stream'),false);return false;};UIIntentionalStream.prototype.showHiddenPeople=function(_L0){if(_L0==undefined)_L0=this.getCurrentFilterKey();var _L1=function(){var _L2=this.getCurrentParams();this.refresh(UIIntentionalStream.REFRESH_TRANSITION,_L2);DOMScroll.scrollTo($('home_stream'),false);}.bind(this);NewsFeedEditor.show(_L0,_L1);return false;};UIIntentionalStream.prototype.getCurrentFilterKey=function(){if(this.currentFilterKey)return this.currentFilterKey;var _L0=this.getCurrentParams();if(_L0&&_L0.filter){if(this.stickyFilter&&_L0.filter==UIIntentionalStream.FEED_FILTER_KEY_NEWS_FEED)this.currentFilterKey=this.stickyFilter;this.currentFilterKey=_L0.filter;}else if(this.defaultFilter)this.currentFilterKey=this.defaultFilter;return this.currentFilterKey;};UIIntentionalStream.prototype.loadOlder=function(_L0){_L0=_L0||{};if(!this.oldest)return;var _L1=this.getCurrentParams();_L1.oldest=this.oldest;if(this.shouldShowHidden)_L1.show_hidden=true;if(_L0.delayLoadCount){_L1.delay_load_count=_L0.delayLoadCount;}else this.logFeedTrackingEvent(ft.NF_EVENT_SEE_MORE,'page');if(_L0.firstLoadIDs)_L1.first_load_ids=_L0.firstLoadIDs;_L1.query_time=_L0.queryTime;this.refresh(UIIntentionalStream.REFRESH_APPEND,_L1,_L0);return this;};UIIntentionalStream.prototype.loadNewer=function(_L0){if(!this.newest)return;_L0=_L0||{};var _L1=this.getCurrentParams();_L1.newest=this.newest;if(_L0.ignoreSelf)_L1.ignore_self=true;_L1.load_newer=true;var _L2=coalesce(_L0.insertType,UIIntentionalStream.REFRESH_PREPEND);this.lastRefresh=new Date().getTime();this.refresh(_L2,_L1,_L0);return this;};UIIntentionalStream.prototype.getCurrentParams=function(){var _L0={};var _L1=URI.getRequestURI(true,true).getQueryData();if(_L1.sk)_L1.filter=_L1.sk;var _L2=this.getValidParams();if(_L2){_L2.forEach(function(i){_L0[i]=_L1[i];});}else _L0=_L1;_L0.hidden_count=this.hiddenCount||0;return _L0;};UIIntentionalStream.prototype.setHomeFilter=function(_L0){this._homeFilter=_L0;};UIIntentionalStream.prototype.setHomeFilterLoading=function(_L0){if(this._homeFilter)this._homeFilter.setLoading(_L0);};UIIntentionalStream.prototype.refresh=function(_L0,_L1,_L2){this.lastRefresh=new Date().getTime();if(this.forceFilterKey){_L1.force_filter_key=true;this.forceFilterKey=false;}if(_L1.filter==UIIntentionalStream.FEED_FILTER_KEY_NEWS_FEED&&this.stickyFilter)_L1.filter=this.stickyFilter;this.currentFilterKey=_L1.filter;_L2=_L2||{};var _L3=++this.requestNum;var _L4=coalesce(_L2.bundleAsync,false);var _L5=coalesce(_L2.showLoader,true);var _L6=this.instanceName;var _L7=function(_Lc){UIIntentionalStream.getInstance(_L6).handleResponse(_L3,_L0,_Lc,_L2);};var _L8=function(_Lc){UIIntentionalStream.getInstance(_L6).handleError(_L3,_L0,_Lc,_L2);};var _L9=function(_Lc){UIIntentionalStream.getInstance(_L6).handleFinally(_L0,_L1.filter,_Lc);};if(!(_L1.request_type=_L0))_L1.request_type='none';if(_L1.filter){_L2.show_hidden=_L1.show_hidden?_L1.show_hidden:false;}else _L2.show_hidden=this.shouldShowHidden;var _La=true;if(_L1.newest)_La=false;this.hasPendingRefresh=true;var _Lb;if(_L0==UIIntentionalStream.REFRESH_APPEND&&_L5)_Lb=this.pager;new AsyncRequest().setURI(this.getEndpoint()).setReadOnly(true).setOption('retries',0).setMethod(this.getRefreshMethod()).setData(_L1).setOption('bundle',_L4).setReplayable(_La).setHandler(_L7).setStatusElement(_Lb).setErrorHandler(_L8).setTransportErrorHandler(_L8).setFinallyHandler(_L9).send();if(_L0==UIIntentionalStream.REFRESH_TRANSITION){this.storyCount=0;this.hasAdditionalStories=true;hide(this.pager);this.clearScrollLoader();this.oldest=this.newest=null;}if(_L5)this.setHomeFilterLoading(true);};UIIntentionalStream.prototype.addContent=function(_L0,_L1){this.addContentPrepend(_L0,_L1);};UIIntentionalStream.prototype.addContentPrepend=function(_L0,_L1){if(_L0.length){$A(_L0).reverse().forEach(function(i){this.addContentPrepend(i,_L1);}.bind(this));return;}CSS.setStyle(_L0,'overflow','hidden');CSS.setStyle(_L0,'height','0px');CSS.setOpacity(_L0,'0');this.streamContent.prependContent(_L0);var _L2=animation(_L0).to('height','auto').to('opacity','1').duration(UIIntentionalStream.ANIMATION_DURATION).ondone(function(){CSS.setStyle(_L0,'overflow','');});_L1?setTimeout(_L2.go.bind(_L2),_L1):_L2.go();};UIIntentionalStream.prototype.addContentAppend=function(_L0){this.streamContent.appendContent(_L0);};UIIntentionalStream.prototype.unfollow=function(_L0){var _L1={value:_L0.id,action:'unfollow',filter_key:this.getCurrentFilterKey()};var _L2=function(){var _L8=UIIntentionalStream.forEachStory(_L0.id,hide);this.hiddenCount+=_L8;this.hiddenIDCount++;this.updatePager();}.bind(this);new AsyncRequest().setURI('/ajax/feed/filter_action.php').setData(_L1).setReplayable(true).setHandler(_L2).send();var _L3=$(_L0.storyID);var _L4=$N('div',{className:'unfollow_message'});var _L5=$N('a',{className:'unfollow_undo','href':'#'},HTML(_tx("Ongedaan maken")));var _L6=$N('a',{onclick:this.showHiddenPeople.shield(this)},HTML(_tx("Opties bewerken")));_L5.listen('click',this.undoUnfollow.bind(this,_L0,_L4));var _L7;if(!_L0.isApp){_L7=_tx("<strong>{name} komt niet meer voor in je nieuwsoverzicht.<\/strong><br>In de toekomst zul je via deze weg geen berichten meer ontvangen van {first_name}.",{'name':_L0.name,'first_name':_L0.firstName});}else _L7=_tx("<strong>{application} komt niet meer voor in je nieuwsoverzicht.<\/strong><br>In de toekomst zul je via deze weg geen berichten meer ontvangen van {application}.",{'application':_L0.name});msg_content=[_L5,HTML(_L7),' (',_L6,')'];_L4.setContent($N('p',msg_content));hide(_L4);DOM.insertBefore(_L4,_L3);var _L8=UIIntentionalStream.forEachStory(_L0.id,hide);CSS.setOpacity(_L4,'0');show(_L4);if(_L8>1)DOMScroll.scrollTo(_L4,false,true);animation(_L4).to('opacity','1').duration(UIIntentionalStream.ANIMATION_DURATION).ondone(function(){setTimeout(function(){animation(_L4).to('opacity','0').checkpoint().ease(animation.ease.both).to('height','0').to('padding','0').blind().duration(UIIntentionalStream.ANIMATION_DURATION).ondone(function(){if(_L4.parentNode)_L4.remove();}).go();},10*1000);}).go();return false;};UIIntentionalStream.forEachStory=function(id,fn){var _L2=UIIntentionalStream.getStoriesByAssoc(id);_L2.forEach(fn);return _L2.length;};UIIntentionalStream.prototype.undoUnfollow=function(_L0,_L1){var _L2={value:_L0.id,action:'undo_unfollow',filter_key:this.getCurrentFilterKey()};var _L3=function(){var _L4=UIIntentionalStream.forEachStory(_L0.id,show);this.hiddenCount-=_L4;this.hiddenIDCount--;this.updatePager();}.bind(this);new AsyncRequest().setURI('/ajax/feed/filter_action.php').setData(_L2).setReplayable(true).setHandler(_L3).send();var _L4=UIIntentionalStream.forEachStory(_L0.id,show);if(_L4>1)DOMScroll.scrollTo(_L1,false,true);_L1.remove();return false;};UIIntentionalStream.prototype.updatePager=function(){var _L0='';if(this.hiddenIDCount>0){var _L1=$N('a',{href:'#'},_tx("Opties bewerken"));var _L2=function(){if(this.isOnNewsFeed()){return RecentActivityEditor.show();}else return this.showHiddenPeople();}.bind(this);Event.listen(_L1,'click',_L2);_L0=[_L1];}if(!this.storyCount||!this.hasAdditionalStories){CSS.addClass(this.pager,'UIShowMore_NoMore');if(this.hiddenIDCount){show(this.pager);}else hide(this.pager);}else{CSS.removeClass(this.pager,'UIShowMore_NoMore');show(this.pager);}DOM.setContent(this.hiddenInfo,_L0);};UIIntentionalStream.getStoriesByAssoc=function(_L0){return DOM.scry(UIIntentionalStream.instance.root,'div.aid_'+_L0);};UIIntentionalStream.prototype.handleResponse=function(_L0,_L1,_L2,_L3){var _L4=_L2.isReplay()||_L3.ignoreReqNum;return this.handleResponsePayload(_L0,_L1,_L2.getPayload(),_L4,_L3);};UIIntentionalStream.prototype.handleDuplicateStories=function(_L0){var _L1=[];for(var i=0;i<_L0.length;i++){var _L3=_L0[i];var _L4=_L3.id;var _L5=ge(_L4);if(!_L5)continue;var _L6=_L5.scry("textarea.add_comment_text");if(_L6.length==1){var _L7=_L6[0];if(_L7.hasClass("DOMControl_autogrow")){var _L8=_L3.scry("textarea.add_comment_text");if(_L8.length!=0){var _L9=_L8[0];_L9.value=_L7.value;_L1.push(_L9);}}}animation(_L5).to('height','0px').to('opacity','0').duration(UIIntentionalStream.ANIMATION_DURATION).ease(animation.ease.end).ondone(function(){DOM.remove(_L5);}).go();}return _L1;};UIIntentionalStream.prototype.handleResponsePayload=function(_L0,_L1,_L2,_L3,_L4){_L4=_L4||{};if(is_empty(_L2))return;if(_L2.streamHeader){this.streamHeader.setContent(HTML(_L2.streamHeader));if(this.isOnNewHighlights()||this.isOnNewsFeed())this.setUpHighlightsStreamHeader();NewHigh.reset();}if(_L2.autoRefreshConfig)this.setAutoRefreshConfig(_L2.autoRefreshConfig);this.setHomeFilterLoading(false);if(_L1==UIIntentionalStream.REFRESH_EXPAND)$(_L4.expandStoryID).find('div.UIIntentionalStory_CollapsedStories').removeClass('UIIntentionalStory_CollapsedStoriesLoading').addClass('hidden_elem');if(this.error)hide(this.error);if(!_L3&&_L0!=this.requestNum)return;if('show_hidden' in _L4)this.shouldShowHidden=_L4.show_hidden;this.hiddenCount=_L2.hiddenCount;this.hiddenIDCount=_L2.hiddenIDCount;this.storyCount+=_L2.storyCount;if('newestStoryTime' in _L2&&_L2.newestStoryTime>this.newest)this.newest=_L2.newestStoryTime;if('oldestStoryTime' in _L2&&(!this.oldest||_L2.oldestStoryTime<this.oldest))this.oldest=_L2.oldestStoryTime;if('hasAdditionalStories' in _L2){this.hasAdditionalStories=_L2.hasAdditionalStories;}else if(_L1==UIIntentionalStream.REFRESH_APPEND&&_L2.storyCount==0)this.hasAdditionalStories=false;if('streamStoryCount' in _L2)this.updateLiveFeedCount(_L2.streamStoryCount);this.updatePager();if(_L2.html){var _L5=HTML(_L2.html).getRootNode();_L5=$A(_L5.childNodes);switch(_L1){case UIIntentionalStream.REFRESH_COUNT:if(_L2.storyCount)this.updateLiveFeedCount(_L2.storyCount,true);break;case UIIntentionalStream.REFRESH_PREPEND:this.addContentPrepend(_L5);break;case UIIntentionalStream.REFRESH_APPEND:this.addContentAppend(_L5);this.clearScrollLoader();break;case UIIntentionalStream.REFRESH_TRANSITION:this.streamContent.setContent(_L5);DOMScroll.scrollTo(new Vector2(0,0,"document"),false);break;case UIIntentionalStream.REFRESH_EXPAND:DOM.insertAfter($(_L4.expandStoryID),_L5);break;}}};UIIntentionalStream.prototype.updateLiveFeedCount=function(_L0,_L1){var _L2=(this.unseenStoryCount==0);if(_L1){this.unseenStoryCount+=_L0;}else this.unseenStoryCount=_L0;if(this.unseenStoryCount>0&&this.liveFeedCount){var _L3='';if(this.unseenStoryCount>UIIntentionalStream.HIGHLIGHTS_MAX_UNSEEN_COUNT){_L3=_tx("{count}+",{count:UIIntentionalStream.HIGHLIGHTS_MAX_UNSEEN_COUNT});}else _L3=this.unseenStoryCount.toString();this.liveFeedCount.setContent(HTML(_L3));if(_L2){this.logFeedTrackingEvent(ft.NF_EVENT_IMPRESSION,'new');CSS.setStyle(this.liveFeedBubble,'display','inline');}}};UIIntentionalStream.prototype.logFeedTrackingEvent=function(_L0,_L1,_L2){if(!this.sourceType)return;if(!_L2)_L2=this.getCurrentFilterKey();var _L3={src:this.sourceType,evt:_L0,filter:_L2};if(_L1)_L3.type=_L1;ft.logData(_L3);};UIIntentionalStream.prototype.handleError=function(_L0,_L1,_L2,_L3){if(!_L2.isReplay()&&_L0!=this.requestNum)return;this.setHomeFilterLoading(false);if(_L1==UIIntentionalStream.REFRESH_EXPAND)$(_L3.expandStoryID).find('div.UIIntentionalStory_CollapsedStories').removeClass('UIIntentionalStory_CollapsedStoriesLoading');var _L4=_L2.getError();if(_L4==kError_Async_NotLoggedIn){var _L5=_tx("Session Timeout");var msg=_tx("Je  sessie is verlopen. Log alsjeblieft opnieuw in.");var _L7=Dialog.newButton('login',_tx("Aanmelden"),null,function(){goURI('/login.php');});new Dialog().setTitle(_L5).setBody(msg).setButtons([_L7,Dialog.CANCEL]).show();}if(!_L3.delayLoadCount&&_L1!=UIIntentionalStream.REFRESH_PREPEND&&this.error)CSS.setStyle(this.error,'display','block');};UIIntentionalStream.prototype.handleFinally=function(_L0,_L1){if(_L0==UIIntentionalStream.REFRESH_TRANSITION){PageTransitions.transitionComplete();Arbiter.inform(UIIntentionalStreamMessage.REFRESH_COMPLETED);}if(_L0!=UIIntentionalStream.REFRESH_APPEND)NewHigh.hideComposer(this.isOnNewsFeed()||this.isOnNewHighlights());this.hasPendingRefresh=false;};UIIntentionalStream.prototype.getValidParams=function(){return UIIntentionalStream.VALID_PARAMS;};UIIntentionalStream.prototype.getEndpoint=function(){return UIIntentionalStream.ENDPOINT;};UIIntentionalStream.prototype.getRefreshMethod=function(){return UIIntentionalStream.REFRESH_METHOD;};UIIntentionalStream.prototype.isOnNewHighlights=function(){var _L0=this.getCurrentFilterKey();return (_L0==UIIntentionalStream.FEED_FILTER_KEY_NEW_HIGHLIGHTS);};UIIntentionalStream.prototype.isOnNewsFeed=function(){var _L0=this.getCurrentFilterKey();return (_L0==UIIntentionalStream.FEED_FILTER_KEY_NEWS_FEED);};UIIntentionalStream.prototype.setupAutoPageRefresh=function(){this.highlightsRefreshInterval=setInterval(function(){if(!this.allowAutoRefresh)return;if(this.isAutoRefreshing&&(this.getMSSinceLastActivity()>UIIntentionalStream.DISABLE_AUTOREFRESH_INACTIVE_THRESHOLD))this.isAutoRefreshing=false;if(this.getMSSinceLastRefresh()<UIIntentionalStream.HIGHLIGHTS_REFRESH_INACTIVE_THRESHOLD)return;var _L0=this.getMSSinceLastActivity();var _L1=(_L0>UIIntentionalStream.HIGHLIGHTS_REFRESH_INACTIVE_THRESHOLD);var _L2=(_L0>UIIntentionalStream.HIGHLIGHTS_OVERRIDE_INACTIVE_THRESHOLD);if((_L1&&this.isOnNewHighlights())||_L2)this.refreshFilter(UIIntentionalStream.FEED_FILTER_KEY_NEW_HIGHLIGHTS,_L2,true);}.bind(this),UIIntentionalStream.HIGHLIGHTS_CHECK_REFRESH_INTERVAL);};UIIntentionalStream.prototype.cleanupRefreshInterval=function(){if(this.highlightsRefreshInterval){clearInterval(this.highlightsRefreshInterval);this.highlightsRefreshInterval=null;}};UIIntentionalStream.prototype.setupAutoInsert=function(){Arbiter.subscribe(UIIntentionalStreamMessage.SET_AUTO_INSERT,UIIntentionalStream.setAutoInsert);};UIIntentionalStream.setAutoInsert=function(_L0,_L1){if(_L0!=UIIntentionalStreamMessage.SET_AUTO_INSERT)return;var _L2=UIIntentionalStream.instance;if(_L2)_L2.pauseAutoInsert=_L1.pause;};UIIntentionalStream.prototype.isAutoRefreshPaused=function(){if(this.isOnNewHighlights())return false;return this.pauseAutoInsert;};UIIntentionalStream.prototype.setUpHighlightsStreamHeader=function(){if(!this.streamHeader)return;this.liveFeedBubble=DOM.scry(this.streamHeader,'div.BubbleCount')[0];if(!this.liveFeedBubble)return;this.liveFeedCount=DOM.scry(this.streamHeader,'div.BubbleCount_Number')[0];this.summaryHeaderLink=DOM.find(this.streamHeader,'a.UIIntentionalStream_SummaryLink');this.liveHeaderLink=DOM.find(this.streamHeader,'a.UIIntentionalStream_LiveLink');Event.listen(this.liveHeaderLink,'click',this.toggleFilters.bind(this,UIIntentionalStream.FEED_FILTER_KEY_NEWS_FEED));Event.listen(this.summaryHeaderLink,'click',this.toggleFilters.bind(this,UIIntentionalStream.FEED_FILTER_KEY_NEW_HIGHLIGHTS));};UIIntentionalStream.prototype.toggleFilters=function(_L0){this.logFeedTrackingEvent(ft.NF_EVENT_PILL_CLICK,'',_L0);this.forceFilterKey=true;this.stickyFilter=_L0;};UIIntentionalStream.prototype.refreshFilter=function(_L0,_L1,_L2){this.logFeedTrackingEvent(ft.NF_PAGE_AUTOREFRESH,'',_L0);if(_L1){this.forceFilterKey=true;this.stickyFilter=_L0;}var _L3={'filter':_L0};var _L4={'filter':_L0};if(_L2)_L3.pending=_L2;this.refresh(UIIntentionalStream.REFRESH_TRANSITION,_L3,_L4);};copy_properties(UIIntentionalStream,{ANIMATION_DURATION:300,REFRESH_METHOD:'GET',REFRESH_TRANSITION:1,REFRESH_PREPEND:2,REFRESH_APPEND:3,REFRESH_COUNT:4,REFRESH_EXPAND:5,FEED_FILTER_KEY_NEW_HIGHLIGHTS:'h',FEED_FILTER_KEY_NEWS_FEED:'nf',VALID_PARAMS:['filter','show_hidden'],ENDPOINT:'/ajax/intent.php',_presenceInit:false,DISABLE_AUTOREFRESH_INACTIVE_THRESHOLD:4*60*1000,HIGHLIGHTS_CHECK_REFRESH_INTERVAL:5*60*1000,HIGHLIGHTS_REFRESH_INACTIVE_THRESHOLD:30*60*1000,HIGHLIGHTS_OVERRIDE_INACTIVE_THRESHOLD:240*60*1000,HIGHLIGHTS_MAX_UNSEEN_COUNT:300});UIIntentionalStream.presenceRegister=function(){if(UIIntentionalStream._presenceInit)return true;var _L0=UIIntentionalStream.callOnInstance('presenceStreamCheck');var _L1=UIIntentionalStream.callOnInstance('presenceStreamResponse');Arbiter.registerCallback(function(){presenceUpdater.register('stream_update',_L0,_L1,bagofholding,bagofholding);},[PresenceMessage.PRESENCE_UPDATER_READY]);Arbiter.subscribe(PresenceMessage.getArbiterMessageType('feedpub'),UIIntentionalStream.handleNewStoryMessage);UIIntentionalStream._presenceInit=true;};
UIIntentionalStory={setup:function(_L0,_L1){if(!_L0||!_L1)return null;if(_L1.unfollow)var _L2=Event.listen(_L0,'mouseover',function(){this.createUnfollowMenu(_L0,_L1);_L2.remove();}.bind(this));},createUnfollowMenu:function(_L0,_L1){var _L2=_L0.scry('div.UIStory_Hide')[0];if(!_L2)return;if(ua.ie()<7){Event.listen(_L0,'mouseover',function(){_L2.style.visibility='visible';});Event.listen(_L0,'mouseout',function(){_L2.style.visibility='hidden';});}var _L3=_L1.title;_L1=_L1.unfollow;var _L4=new UIActionMenu();var _L5=new UISelectList();var _L6=function(_L0,_L4,_L5,_L7,_L1){_L4.hideMenu();_L5.reset();var _L8=copy_properties({storyID:_L0.id},_L1);UIIntentionalStream.instance.unfollow(_L8);}.bind(this,_L0,_L4,_L5);_L5.setMode(UISelectList.SINGLE_SELECT_MODE).setCallback(_L6);_L1.users.each(function(_L7){_L5.addItem(HTML(_L7.hideString),false,_L7);});if(_L1.app)_L5.addItem(HTML(_L1.app.hideString),false,_L1.app);_L4.setTitle(_L3).setContentCallback(_L5.getElement.bind(_L5)).setSuppressButton(true).setAlignRight(true);_L2.setContent(_L4.getNodes());},_moreDetails:{},expandStory:function(_L0,_L1,_L2,_L3){var _L4=UIIntentionalStream.instance.getCurrentParams();_L4.expand_story_uid=_L1;_L4.newest=_L2;_L4.oldest=_L3;var _L5={expandStoryID:_L0,showLoader:false};$(_L0).find('div.UIIntentionalStory_CollapsedStories').addClass('UIIntentionalStory_CollapsedStoriesLoading');UIIntentionalStream.instance.refresh(UIIntentionalStream.REFRESH_EXPAND,_L4,_L5);},morePrivacyDetails:function(_L0,row,_L2){if(is_empty(this._moreDetails))onunloadRegister(function(){this._moreDetails={};}.bind(this));if(this._moreDetails[_L0])return;this._moreDetails[_L0]=true;new AsyncRequest().setURI('/ajax/privacy/more_details.php').setData({fbid:_L0,privacy_data:row}).setHandler(function(_L3){var _L4=_L3.getPayload().explanation;DOM.setContent(DOM.find(_L2,'span.UITooltip_Text'),_L4);}).setErrorHandler(bagofholding).setTransportErrorHandler(bagofholding).send();}};

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