/*
HTTP Host: b.static.ak.fbcdn.net
Generated: March 18th 2010 11:33:11 AM PDT
Machine: 10.16.139.101
Locale: nu_ll
Path: js/bd27mqfuny0wwc8g.pkg.js
*/

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

var NavigationMessage={NAVIGATION_BEGIN:'NavigationMessage/navigationBegin',NAVIGATION_COMPLETED:'NavigationMessage/navigationCompleted',NAVIGATION_FAILED:'NavigationMessage/navigationFailed'};
function UserActivity(){}copy_properties(UserActivity,{_initialized:false,_listeners:[],initialize:function(){var a=function(event){Arbiter.inform(Arbiter.USER_ACTIVITY,event);};UserActivity._listeners.push(Event.listen(document.body,'mouseover',a));var b=window;if(ua.ie())b=document.body;UserActivity._listeners.push(Event.listen(b,'keydown',a));UserActivity._listeners.push(Event.listen(document.body,'click',a));UserActivity._initialized=true;},subscribe:function(a){if(!UserActivity._initialized)UserActivity.initialize();return Arbiter.subscribe(Arbiter.USER_ACTIVITY,a,Arbiter.SUBSCRIBE_NEW);},unsubscribe:function(a){Arbiter.unsubscribe(a);}});onloadRegister(UserActivity.initialize);
function OnVisible(a,b){this.targetY=Vector2.getElementPosition(a).y;var c=function(){var e=Vector2.getScrollPosition().y+Vector2.getViewportDimensions().y;if(e>this.targetY){this.remove();b();}return true;}.bind(this);if(DOMScroll.usingScrollWrapper()){var d=DOMScroll.getScrollRoot();}else var d=window;this.scrollListener=Event.listen(d,'scroll',c);this.resizeListener=Event.listen(window,'resize',c);c();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 share_play_video(b,c){var a=-1;if(b!=a)_share_log_play_content(b,'video');if(holder=ge(c+'_holder'))if(container=holder.parentNode.parentNode)CSS.addClass(container,'playing');return false;}function _share_log_play_content(b,a){new AsyncRequest().setURI('/ajax/shareplay_ajax.php').setData({s:b,m:a}).send();}
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(a){this.ensureInitialized();if(this.composer){this.composer.removeClass('hidden_elem');UIComposer.focusInstance(this.composer.id);var b=UIComposer.getInstance(this.composer.id);b&&b.loadAttachment(parseInt(a,10));}this.button&&this.button.addClass('hidden_elem');},hideComposer:function(b){this.ensureInitialized();if(this.composer){var a=UIComposer.getInstance(this.composer.id);if(!b){a&&a.initialized&&a.blur();this.composer.addClass('hidden_elem');this.button&&this.button.removeClass('hidden_elem');}else{a&&a.initialized&&a.loadAttachment(0);this.composer.removeClass('hidden_elem');this.buttonArea&&this.buttonArea.addClass('hidden_elem');}}}};
function UIIntentionalStream(i,d,f,h,m,c,a,l,k,n,b,g,j,e){if(!i)throw new Error('UIIntentionalStream instantiated with no root.');copy_properties(this,{id:i.id,root:i,instanceName:d,newest:f,oldest:h,firstLoadIDs:b,notYetSeenIDs:g,seenOldStory:j,shouldShowHidden:false,storyCount:m,hasAdditionalStories:c,defaultFilter:a,stickyFilter:l,currentFilterKey:null,sourceType:k,streamStoryCount:n,maxUnseenStoryCount:e,hasPendingRefresh:false,pauseAutoInsert:false,unseenStoryCount:0,streamHeader:DOM.scry(document.body,'div.UIIntentionalStream_Top')[0],error:DOM.scry(i,'div.UIIntentionalStream_Error')[0],pager:i.find('div.UIShowMore_Pager'),streamContent:i.find('div.UIIntentionalStream_Content'),requestNum:0});this.setUpStreamHeader();if(this.streamStoryCount>0)this.updateLiveFeedCount(this.streamStoryCount);onunloadRegister(this.unload.bind(this));this.updatePager();if(this.pager)CSS.removeClass(this.pager,'hidden_elem');if(!UIIntentionalStream.instances)UIIntentionalStream.instances={};UIIntentionalStream.instances[d]=this;UIIntentionalStream.instance=this;this.setupAutoInsert();this.setupAutoRefreshEventHandlers();}UIIntentionalStream.prototype.setupAutoRefreshEventHandlers=function(){this.refreshSubscriptions=[];this.refreshSubscriptions.push(Arbiter.subscribe(UIIntentionalStreamMessage.UPDATE_STREAM,this.updateStream.bind(this)));this.refreshSubscriptions.push(Arbiter.subscribe(UIIntentionalStreamMessage.REFRESH_STREAM,this.refreshStream.bind(this)));this.refreshSubscriptions.push(Arbiter.subscribe(UIIntentionalStreamMessage.SAVE_PENDING_HIGHLIGHTS,this.clearPendingHighlights.bind(this)));};UIIntentionalStream.prototype.tearDownAutoRefreshHandlers=function(){if(!this.refreshSubscriptions)return;this.refreshSubscriptions.forEach(Arbiter.unsubscribe);};UIIntentionalStream.prototype.unload=function(){this.tearDownAutoRefreshHandlers();UIIntentionalStream.instance=null;UIIntentionalStream.instances[this.instanceName]=null;this.clearScrollLoader();delete window.disableScrollLoad;};UIIntentionalStream.getInstance=function(a){return UIIntentionalStream.instances[a];};UIIntentionalStream.prototype._getUpdateInsertType=function(){if(this.isOnNewHighlights())return UIIntentionalStream.REFRESH_COUNT;return UIIntentionalStream.REFRESH_PREPEND;};UIIntentionalStream.prototype.clearPendingHighlights=function(a){if(a!=UIIntentionalStreamMessage.SAVE_PENDING_HIGHLIGHTS)return;if(this.isOnNewHighlights())new AsyncSignal('/ajax/feed/save_view_state.php').send();};UIIntentionalStream.prototype.updateStream=function(a){if(a!=UIIntentionalStreamMessage.UPDATE_STREAM||this.hasPendingRefresh||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;}window.disableScrollLoad=true;};UIIntentionalStream.prototype.loadMoreOnScroll=function(b,a,c){if(window.disableScrollLoad)return;var d=function(){if(window.disableScrollLoad)return;this.clearScrollLoader();var e=URI(this.getEndpoint());e.addQueryData({filter:this.getCurrentFilterKey(),delay_load_count:a,first_load_ids:this.firstLoadIDs,not_yet_seen_ids:this.notYetSeenIDs,seen_old_story:this.seenOldStory,show_hidden:this.shouldShowHidden,query_time:c,oldest:this.oldest,use_primer:true});AsyncRequest.bootstrap(e);}.bind(this);if(ge(b)){this.currentScrollListener=new OnVisible($(b),d);}else d();};UIIntentionalStream.prototype.updatePageCache=function(){this.loadNewer({bundleAsync:true,showLoader:false,ignoreReqNum:true});};UIIntentionalStream.prototype.getID=function(){return this.id;};UIIntentionalStream.prototype.showPositioned=function(a,c,b){if(c==UIIntentionalStream.REFRESH_APPEND){this.root.appendContent(a);}else if(c==UIIntentionalStream.REFRESH_PREPEND){this.root.prependContent(a);}else if(c==UIIntentionalStream.REFRESH_EXPAND)DOM.insertAfter($(b.expandStoryID),a);a.setStyle('display','block');if(a.src)a.src=a.src;};UIIntentionalStream.prototype.getCurrentFilterKey=function(){if(this.currentFilterKey)return this.currentFilterKey;var a=this.getCurrentParams();if(a&&a.filter){this.currentFilterKey=a.filter;}else if(this.defaultFilter)this.currentFilterKey=this.defaultFilter;return this.currentFilterKey;};UIIntentionalStream.prototype.loadOlder=function(a){a=a||{};if(!this.oldest)return;var b=this.getCurrentParams();b.oldest=this.oldest;this.refresh(UIIntentionalStream.REFRESH_APPEND,b,a);return this;};UIIntentionalStream.prototype.loadNewer=function(b){if(!this.newest)return;b=b||{};var a=this.getCurrentParams();a.newest=this.newest;if(b.ignoreSelf)a.ignore_self=true;a.load_newer=true;var c=coalesce(b.insertType,UIIntentionalStream.REFRESH_PREPEND);this.lastRefresh=new Date().getTime();this.refresh(c,a,b);return this;};UIIntentionalStream.prototype.getCurrentParams=function(){var a={};var b=URI.getRequestURI(true,true).getQueryData();if(b.sk)b.filter=b.sk;var c=this.getValidParams();if(c){c.forEach(function(d){a[d]=b[d];});}else a=b;return a;};UIIntentionalStream.prototype.setHomeFilter=function(a){this._homeFilter=a;};UIIntentionalStream.prototype.setHomeFilterLoading=function(a){if(this._homeFilter)this._homeFilter.setLoading(a);};UIIntentionalStream.prototype.refresh=function(l,b,h){this.lastRefresh=new Date().getTime();this.currentFilterKey=b.filter;if(this.isOnNewsFeedFilter())if(b.filter==UIIntentionalStream.FEED_FILTER_KEY_DUAL_NEWS_FEED){this.currentFilterKey=this.stickyFilter;}else this.stickyFilter=this.currentFilterKey;h=h||{};var j=++this.requestNum;var a=coalesce(h.bundleAsync,false);var k=coalesce(h.showLoader,true);var f=this.instanceName;var e=function(m){UIIntentionalStream.getInstance(f).handleResponse(j,l,m,h);};var c=function(m){UIIntentionalStream.getInstance(f).handleError(j,l,m,h);};var d=function(m){UIIntentionalStream.getInstance(f).handleFinally(l,b.filter,m);};if(!(b.request_type=l))b.request_type='none';if(b.filter){h.show_hidden=b.show_hidden?b.show_hidden:false;}else h.show_hidden=this.shouldShowHidden;var g=true;if(b.newest)g=false;this.hasPendingRefresh=true;var i;if(l==UIIntentionalStream.REFRESH_APPEND&&k)i=this.pager;new AsyncRequest().setURI(this.getEndpoint()).setReadOnly(true).setOption('retries',0).setMethod(this.getRefreshMethod()).setData(b).setOption('bundle',a).setReplayable(g).setHandler(e).setStatusElement(i).setErrorHandler(c).setTransportErrorHandler(c).setFinallyHandler(d).send();if(l==UIIntentionalStream.REFRESH_TRANSITION){this.storyCount=0;this.hasAdditionalStories=true;hide(this.pager);this.clearScrollLoader();this.oldest=this.newest=null;}if(k)this.setHomeFilterLoading(true);};UIIntentionalStream.prototype.addContent=function(a,b){this.addContentPrepend(a,b);};UIIntentionalStream.prototype.addContentPrepend=function(b,c){if(b.length){$A(b).reverse().forEach(function(d){this.addContentPrepend(d,c);}.bind(this));return;}CSS.setStyle(b,'overflow','hidden');CSS.setStyle(b,'height','0px');CSS.setOpacity(b,'0');this.streamContent.prependContent(b);var a=animation(b).to('height','auto').to('opacity','1').duration(UIIntentionalStream.ANIMATION_DURATION).ondone(function(){CSS.setStyle(b,'overflow','');});c?setTimeout(a.go.bind(a),c):a.go();};UIIntentionalStream.prototype.addContentAppend=function(a){this.streamContent.appendContent(a);};UIIntentionalStream.prototype.updatePager=function(){if(!this.pager)return;if(!this.storyCount||!this.hasAdditionalStories){CSS.addClass(this.pager,'UIShowMore_NoMore');}else{CSS.removeClass(this.pager,'UIShowMore_NoMore');show(this.pager);}};UIIntentionalStream.getStoriesByAssoc=function(a){return DOM.scry(UIIntentionalStream.instance.root,'div.aid_'+a);};UIIntentionalStream.prototype.handleResponse=function(c,e,d,b){var a=d.isReplay()||b.ignoreReqNum;return this.handleResponsePayload(c,e,d.getPayload(),a,b);};UIIntentionalStream.prototype.handleDuplicateStories=function(d){var c=[];for(var b=0;b<d.length;b++){var e=d[b];var j=e.id;var a=ge(j);if(!a)continue;var i=a.scry("textarea.add_comment_text");if(i.length==1){var h=i[0];if(h.hasClass("DOMControl_autogrow")){var g=e.scry("textarea.add_comment_text");if(g.length!=0){var f=g[0];f.value=h.value;c.push(f);}}}animation(a).to('height','0px').to('opacity','0').duration(UIIntentionalStream.ANIMATION_DURATION).ease(animation.ease.end).ondone(function(){DOM.remove(a);}).go();}return c;};UIIntentionalStream.prototype.handleResponsePayload=function(e,f,d,b,c){c=c||{};if(is_empty(d))return;if(d.streamHeader){this.streamHeader.setContent(HTML(d.streamHeader));if(this.isOnNewsFeedFilter())this.setUpStreamHeader();NewHigh.reset();}if(d.autoRefreshConfig)Arbiter.inform(UIIntentionalStreamMessage.UPDATE_AUTOREFRESH_CONFIG,d.autoRefreshConfig);this.setHomeFilterLoading(false);if(f==UIIntentionalStream.REFRESH_EXPAND)$(c.expandStoryID).find('div.UIIntentionalStory_CollapsedStories').removeClass('UIIntentionalStory_CollapsedStoriesLoading').addClass('hidden_elem');if(this.error)hide(this.error);if(!b&&e!=this.requestNum)return;if('show_hidden' in c)this.shouldShowHidden=c.show_hidden;this.storyCount+=d.storyCount;if('newestStoryTime' in d&&d.newestStoryTime>this.newest)this.newest=d.newestStoryTime;if('oldestStoryTime' in d&&(!this.oldest||d.oldestStoryTime<this.oldest))this.oldest=d.oldestStoryTime;if('hasAdditionalStories' in d){this.hasAdditionalStories=d.hasAdditionalStories;}else if(f==UIIntentionalStream.REFRESH_APPEND&&d.storyCount==0)this.hasAdditionalStories=false;if('streamStoryCount' in d)this.updateLiveFeedCount(d.streamStoryCount);this.updatePager();if(d.html){var a=HTML(d.html).getNodes();switch(f){case UIIntentionalStream.REFRESH_COUNT:if(d.storyCount)this.updateLiveFeedCount(d.storyCount,true);break;case UIIntentionalStream.REFRESH_PREPEND:this.addContentPrepend(a);break;case UIIntentionalStream.REFRESH_APPEND:this.addContentAppend(a);this.clearScrollLoader();break;case UIIntentionalStream.REFRESH_TRANSITION:this.streamContent.setContent(a);DOMScroll.scrollTo(new Vector2(0,0,"document"),false);break;case UIIntentionalStream.REFRESH_EXPAND:DOM.insertAfter($(c.expandStoryID),a);break;case UIIntentionalStream.DELAYED_STREAM:if(!Quickling.isCacheHit())this.addContentAppend(a);break;}}};UIIntentionalStream.prototype.updateLiveFeedCount=function(c,b){var d=(this.unseenStoryCount==0||!b);if(b){this.unseenStoryCount+=c;}else this.unseenStoryCount=c;if(this.unseenStoryCount>0&&this.liveFeedCount){var a='';if(this.unseenStoryCount>this.maxUnseenStoryCount){a=_tx("{count}+",{count:this.maxUnseenStoryCount});}else a=this.unseenStoryCount.toString();this.liveFeedCount.setContent(HTML(a));if(d){this.logFeedTrackingEvent(ft.NF_EVENT_IMPRESSION,'new');CSS.setStyle(this.liveFeedBubble,'display','inline');}}};UIIntentionalStream.prototype.logFeedTrackingEvent=function(event,c,a){return;if(!this.sourceType)return;if(!a)a=this.getCurrentFilterKey();var b={src:this.sourceType,evt:event,filter:a};if(c)b.type=c;ft.logData(b);};UIIntentionalStream.prototype.handleError=function(e,h,f,b){if(!f.isReplay()&&e!=this.requestNum)return;this.setHomeFilterLoading(false);if(h==UIIntentionalStream.REFRESH_EXPAND)$(b.expandStoryID).find('div.UIIntentionalStory_CollapsedStories').removeClass('UIIntentionalStory_CollapsedStoriesLoading');var a=f.getError();if(a==kError_Async_NotLoggedIn){var g=_tx("Session Timeout");var d=_tx("Zure saioa amaitu da. Has ezazu saioa berriro, mesedez.");var c=Dialog.newButton('login',_tx("Log In"),null,function(){goURI('/login.php');});new Dialog().setTitle(g).setBody(d).setButtons([c,Dialog.CANCEL]).show();}if(!b.delayLoadCount&&h!=UIIntentionalStream.REFRESH_PREPEND&&this.error)CSS.setStyle(this.error,'display','block');};UIIntentionalStream.prototype.handleFinally=function(b,a){if(b==UIIntentionalStream.REFRESH_TRANSITION){PageTransitions.transitionComplete();Arbiter.inform(NavigationMessage.NAVIGATION_COMPLETED);}if(b!=UIIntentionalStream.REFRESH_APPEND)NewHigh.hideComposer(this.isOnNewsFeedFilter());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 a=this.getCurrentFilterKey();return (a==UIIntentionalStream.FEED_FILTER_KEY_NEW_HIGHLIGHTS||(a==UIIntentionalStream.FEED_FILTER_KEY_DUAL_NEWS_FEED&&this.stickyFilter==UIIntentionalStream.FEED_FILTER_KEY_NEW_HIGHLIGHTS));};UIIntentionalStream.prototype.isOnNewsFeedFilter=function(){var a=this.getCurrentFilterKey();return (a==UIIntentionalStream.FEED_FILTER_KEY_NEWS_FEED||a==UIIntentionalStream.FEED_FILTER_KEY_NEW_HIGHLIGHTS||a==UIIntentionalStream.FEED_FILTER_KEY_DUAL_NEWS_FEED);};UIIntentionalStream.prototype.setupAutoInsert=function(){Arbiter.subscribe(UIIntentionalStreamMessage.SET_AUTO_INSERT,UIIntentionalStream.setAutoInsert);};UIIntentionalStream.setAutoInsert=function(b,a){if(b!=UIIntentionalStreamMessage.SET_AUTO_INSERT)return;var c=UIIntentionalStream.instance;if(c)c.pauseAutoInsert=a.pause;};UIIntentionalStream.prototype.isAutoRefreshPaused=function(){if(this.isOnNewHighlights())return false;return this.pauseAutoInsert;};UIIntentionalStream.prototype.setUpStreamHeader=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];if(!this.maxUnseenStoryCount)this.maxUnseenStoryCount=UIIntentionalStream.MAX_UNSEEN_STORY_COUNT;};UIIntentionalStream.prototype.refreshStream=function(e,a){if(e!=UIIntentionalStreamMessage.REFRESH_STREAM)return;var c=this.getCurrentFilterKey();if(this.isOnNewsFeedFilter()&&a.shouldOverride)c=UIIntentionalStream.FEED_FILTER_KEY_NEW_HIGHLIGHTS;var f=(c==UIIntentionalStream.FEED_FILTER_KEY_NEW_HIGHLIGHTS);var b={filter:c};if(f)b.pending=f;var d={filter:c};this.logFeedTrackingEvent(ft.NF_PAGE_AUTOREFRESH,'',c);this.refresh(UIIntentionalStream.REFRESH_TRANSITION,b,d);};copy_properties(UIIntentionalStream,{ANIMATION_DURATION:300,REFRESH_METHOD:'GET',REFRESH_TRANSITION:1,REFRESH_PREPEND:2,REFRESH_APPEND:3,REFRESH_COUNT:4,REFRESH_EXPAND:5,DELAYED_STREAM:6,FEED_FILTER_KEY_NEW_HIGHLIGHTS:'h',FEED_FILTER_KEY_NEWS_FEED:'lf',FEED_FILTER_KEY_DUAL_NEWS_FEED:'nf',VALID_PARAMS:['filter','show_hidden'],ENDPOINT:'/ajax/intent.php',MAX_UNSEEN_STORY_COUNT:300});
UIIntentionalStory={_moreDetails:{},morePrivacyDetails:function(b,c,a){if(is_empty(this._moreDetails))onunloadRegister(function(){this._moreDetails={};}.bind(this));if(this._moreDetails[b])return;this._moreDetails[b]=true;new AsyncRequest().setURI('/ajax/privacy/more_details.php').setData({fbid:b,privacy_data:c}).setHandler(function(e){var d=e.getPayload().explanation;DOM.setContent(DOM.find(a,'span.uiTooltipText'),d);}).setErrorHandler(bagofholding).setTransportErrorHandler(bagofholding).send();}};

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