/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  February 10th 2010 4:18:56 AM PST                            */
/*      Machine:  10.16.139.106                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/87eg7dgpki884g4g.pkg.js h:a5ce5ot3                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/87eg7dgpki884g4g.pkg.js                                   */

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

function fc_with_target(fn){return function(_L1){var _L2=$(_L1).scry('^form.commentable_item input[name="feedback_params"]')[0];var _L3=JSON.decode(_L2.value);if(!_L3){Util.error('failed to find target info for '+_L1);return;}_L3.link_data=collect_data_attrib(_L1,'ft');var _L4=$A(arguments);_L4[0]=_L3;return fn.apply(null,_L4);};}function feedcomment_get_feedback_sources(){return {'FEEDBACK_SOURCE_PROFILE':0,'FEEDBACK_SOURCE_NEWS_FEED':1,'FEEDBACK_SOURCE_OBJECT':2,'FEEDBACK_SOURCE_MOBILE':3,'FEEDBACK_SOURCE_EMAIL':4,'FEEDBACK_SOURCE_API':5,'FEEDBACK_SOURCE_OBJECTS_PAGE':6};}function feedcomment_constants(){}feedcomment_constants.MAX_COMMENTS_TO_SHOW=1000;function feedcomment_add_comment_onsuccess(_L0,_L1,_L2,_L3){var _L4=_feedcomment_get_add_comment_form(_L1,_L2);var _L5=_feedcomment_get_add_comment_textarea(_L1,_L2);var _L6=_feedcomment_get_add_comment_button(_L1,_L2);var _L7=_feedcomment_get_publish_story_checkbox(_L1,_L2);var _L8=_feedcomment_get_credits_giver_input(_L1,_L2,_L3);var _L9=(_L8&&parseInt(_L8.value,10))||0;if(_L9&&'title' in _L0&&'body' in _L0){new Dialog(_L0).show();return;}if('last_comment' in _L0){feedcomment_append_comment(_L1,_L2,_L0.last_comment,_L0.comment_count,_L3);}else feedcomment_sync_with_markup(_L1,_L2,_L0.all_comments_html,_L0.comment_count,_L3);if(_L8){if('balance_html' in _L0){var _La=DOM.scry(document.body,'div.comments_add_box span.balance_text');var _Lb=HTML(_L0.balance_html);for(var i=_La.length-1;i>=0;--i)_La[i].setContent(_Lb);}_L8.value=0;DOM.find(_L4,'div.credits_giver_row').removeClass('credits_giver_row_revealed');}_L5.value='';if(_L5.getControl)_L5.getControl().setPlaceholderText(_tx("Skriv en kommentar til ..."));feed_comment_hide_add_box(_L1,_L2,_L3,false);}function feed_comment_record_add_box_onblur(_L0){feed_comment_record_add_box_onblur.timeoutId=_L0;}function feed_comment_cancel_add_box_onblur(){var _L0=feed_comment_record_add_box_onblur.timeoutId;if(_L0)clearTimeout(_L0);}var feed_comment_hide_add_box_d=fc_with_target(function(_L0,_L1){return feed_comment_hide_add_box(_L0.target_fbid,_L0.item_id,_L0.source,_L1);});function feed_comment_hide_add_box(_L0,_L1,_L2,_L3){var _L4=_feedcomment_get_add_comment_textarea(_L0,_L1);if(_L4){var _L5=_L4.getControl&&_L4.getControl().getValue();var _L6=_feedcomment_get_commentable_item_div(_L0,_L1,_L2);if(!_L5){var _L7=_feedcomment_get_feed_comments(_L0,_L1);if(_L3)feed_comment_perform_hide_add_box(_L6,_L7,_L4);}feedcomment_hide_credits_nux_tip_d(_L6);}}function feed_comment_perform_hide_add_box(_L0,_L1,_L2){if(!_L2)return false;if(_L2.getControl&&_L2.getControl().getValue())return false;var _L3=DOM.scry(_L1,'div.ufi_section').length;var _L4=(DOM.scry(_L0,'div.has_likes').length>0);var _L5=(_L3>0)||_L4;var _L6=CSS.hasClass(_L0,'single_profile_story');var _L7=_feedcomment_get_commentable_item_form(_L0);if(!_L5&&!_L6)CSS.addClass(_L7,'collapsed_comments');if(_L2.getControl)CSS.addClass(_L7,'hidden_add_button');DataStore.set(_L0,'commentLinkShouldCloseAddBox',false);return true;}var feed_comment_show_add_button_d=fc_with_target(function(_L0){feed_comment_show_add_button(_L0.target_fbid,_L0.item_id,_L0.source);});function feed_comment_show_add_button(_L0,_L1,_L2){var _L3=_feedcomment_get_commentable_item_div(_L0,_L1,_L2);var _L4=_feedcomment_get_commentable_item_form(_L3);CSS.removeClass(_L4,'hidden_add_button');}function _feed_comment_update_count(_L0,_L1,_L2,_L3){var _L4=_feedcomment_get_commentable_item_div(_L0,_L1,_L3);feedback_update_toggle_counts(_L0,_L1,_L3,_L2);if(_L2!=0)if(CSS.hasClass(_L4,'autoexpand_mode'))toggle_feedcomments_box_open(_L0,_L1,_L3,false);}var load_more_feed_comments_d=fc_with_target(function(_L0,_L1,_L2){load_more_feed_comments(_L0.target_fbid,_L0.item_id,_L0.target_owner,_L0.type_id,_L0.assoc_obj_id,_L0.source,_L0.check_hash,_L0.extra_data,_L1,_L2);});function load_more_feed_comments(_L0,_L1,_L2,_L3,_L4,_L5,_L6,_L7,_L8,_L9){var _La=_feedcomment_get_feed_comments(_L0,_L1);var _Lb=DOM.scry(_La,'.ufi_section');var _Lc=null;for(var i=0;i<_Lb.length&&!_Lc;i++)_Lc=_feedcomment_get_comment_id(_Lb[i]);load_all_feed_comments(_L0,_L1,_L2,_L3,_L4,_L5,_L6,_L7,_L8,_L9,_Lc);}function feed_comments_update(_L0){var id='.comment_form_'+_L0;var div=DOM.scry($('content'),id);if(!div.length)return;var _L3=collect_data_attrib(div[0],'comment');load_all_feed_comments(_L3.target_fbid,_L3.item_id,_L3.target_owner,_L3.type_id,_L3.assoc_obj_id,_L3.source,_L3.check_hash);}var load_all_feed_comments_d=fc_with_target(function(_L0,_L1,_L2,_L3){load_all_feed_comments(_L0.target_fbid,_L0.item_id,_L0.target_owner,_L0.type_id,_L0.assoc_obj_id,_L0.source,_L0.check_hash,_L0.extra_data,_L1,_L2,_L3);});function load_all_feed_comments(_L0,_L1,_L2,_L3,_L4,_L5,_L6,_L7,_L8,_L9,_La){if(!_L4)_L4=0;if(!_L5){var _Lb=feedcomment_get_feedback_sources();_L5=_Lb['FEEDBACK_SOURCE_PROFILE'];}var _Lc=_feedcomment_get_feed_comments(_L0,_L1);if(_La)if(CSS.hasClass(_Lc,'paging')){return;}else CSS.addClass(_Lc,'paging');var _Ld=_feedcomment_get_add_comment_form(_L0,_L1);var _Le=function(_L10){var _L11=_L10.getPayload();var _L12=load_all_feed_comments.curry(_L0,_L1,_L2,_L3,_L4,_L5,_L6,_L7);feedcomment_sync_with_markup(_L0,_L1,_L11.all_comments_html,_L11.comment_count,_L5,_La,_L11.pager,_L11.force_update,_L11.num_new_comments,_L12);var _L13=DOM.scry(_Lc,'div.comment_highlighted');for(var i=0;i<_L13.length;i++)animation(_L13[i]).duration(500).checkpoint().to('backgroundColor','#ECEFF5').duration(1500).ondone(CSS.removeClass.bind(null,_L13[i],'comment_highlighted')).go();};var _Lf={type:ft.FT_COM_EXPANSION};ft.logElem(_Lc,_Lf);new AsyncRequest().setURI('/ajax/inline_comments_get.php').setData({'assoc_object_id':_L4,'check_hash':_L6,'get_all':1,'comments_range':_L8,'item_id':_L1,'target_fbid':_L0,'target_owner':_L2,'type_id':_L3,'source':_L5,'highlighted_comment_ids':_L9,'cutoff_id':_La,'extra_data':_L7}).setHandler(_Le).send();}function feedcomment_sync_with_markup(_L0,_L1,_L2,_L3,_L4,_L5,_L6,_L7,_L8,_L9){var _La=_feedcomment_get_feed_comments(_L0,_L1);if(_L7){CSS.removeClass(_La,'paging');var _Lb=collect_data_attrib(_La,'comment').num_comments;var _Lc=_Lb?(_L3-_Lb):0;new Dialog().setTitle(_tx("Cannot show previous comments")).setBody(_Lc>1?_tx("{number} kommentarer har blitt lagt til siden sist du oppdaterte siden. Vil du se de nye kommentarene?",{number:_Lc}):_tx("For mange kommentarer har blitt postet siden sist gang du var her. Vil du se de mest nylige kommentarene?")).setButtons(Dialog.OK_AND_CANCEL).setHandler(function(_L10){if(_L10==Dialog.OK)_L9();}).show();}else if(_La){replace_collected_data_attrib(_La,'comment','num_comments',_L3);if(_L5){var _Ld=DOM.find(_La,'.paging_container');DOM.prependContent(_Ld,HTML(_L2));feedcomment_update_paging_header(_La,_L6);var _Le=DOM.scry(_Ld,'.comments_page');var _Lf=_Le[0];animation(_Lf).from('height',0).to('height','auto').duration(60*_L8).ondone(feedcomment_cutoff_excessive_comments.curry(_La,_Ld,_Le,_Lf,_L8)).go();}else set_inner_html(_La,_L2);_feed_comment_update_count(_L0,_L1,_L3,_L4);}}function feedcomment_update_paging_header(_L0,_L1){CSS.removeClass(_L0,'paging');var _L2=DOM.find(_L0,'.paging_header');if(_L1){set_inner_html(_L2,_L1);}else _L0.removeChild(_L2);}function feedcomment_cutoff_excessive_comments(_L0,_L1,_L2,_L3,_L4){var _L5=DataStore.get(_L1,'total_comments');DataStore.set(_L3,'num_comments',_L4);if(!_L5){var _L6=_L2[1];_L5=DOM.scry(_L6,'.ufi_section').length;DataStore.set(_L6,'num_comments',_L5);}_L5+=_L4;for(var i=_L2.length-1;i>=0&&_L5>feedcomment_constants.MAX_COMMENTS_TO_SHOW;i--){var _L8=_L2[i];var _L9=DataStore.get(_L8,'num_comments');_L1.removeChild(_L8);_L5-=_L9;if(!CSS.hasClass(_L0,'comments_cutoff'))CSS.addClass(_L0,'comments_cutoff');}DataStore.set(_L1,'total_comments',_L5);}function feedcomment_append_comment(_L0,_L1,_L2,_L3,_L4){var _L5=_feedcomment_get_feed_comments(_L0,_L1);if(_L5){DOM.appendContent(_L5,HTML(_L2));_feed_comment_update_count(_L0,_L1,_L3,_L4);}}var toggle_feedcomments_box_open_d=fc_with_target(function(_L0,_L1){return toggle_feedcomments_box_open(_L0.target_fbid,_L0.item_id,_L0.source,_L1);});function toggle_feedcomments_box_open(_L0,_L1,_L2,_L3){var _L4=_feedcomment_get_commentable_item_div(_L0,_L1,_L2);if(_L4){var _L5=false;if(DataStore.get(_L4,'commentLinkShouldCloseAddBox'))_L5=feed_comment_perform_hide_add_box(_L4,_feedcomment_get_feed_comments(_L0,_L1),_feedcomment_get_add_comment_textarea(_L0,_L1));if(!_L5){var _L6=_feedcomment_get_commentable_item_form(_L4);CSS.removeClass(_L6,'collapsed_comments');var _L7=_feedcomment_get_first_item_textarea(_L4);if(_L7&&_L3)_L7.focus();DataStore.set(_L4,'commentLinkShouldCloseAddBox',true);}}}function toggle_feedcomments_box(_L0,_L1,_L2){var _L3=_feedcomment_get_commentable_item_div(_L0,_L1,_L2);if(_L3){var _L4=_feedcomment_get_commentable_item_form(_L3);CSS.toggleClass(_L4,'collapsed_comments');}}function _feedcomment_get_commentable_item_div(_L0,_L1,_L2){var _L3;var _L4=feedcomment_get_feedback_sources();if(_L2==_L4['FEEDBACK_SOURCE_OBJECT']||_L2==_L4['FEEDBACK_SOURCE_OBJECTS_PAGE']){_L3=ge('commentable_item_'+_L1);}else{_L3=ge('commentable_item_'+_L1+'_'+_L0);if(!_L3)_L3=ge('commentable_item_'+_L1);if(!_L3)_L3=ge('div_story_'+_L1+'_'+_L0);if(!_L3)_L3=ge('div_story_'+_L1);}return _L3;}function _feedcomment_get_commentable_item_div_nosource(_L0,_L1){var div;if(div=ge('commentable_item_'+_L1))return div;if(div=ge('commentable_item_'+_L1+'_'+_L0))return div;return ge('div_story_'+_L1+'_'+_L0);}function _feedcomment_get_commentable_item_form(_L0){if(DOM.isNode(_L0,'form'))return _L0;return DOM.find(_L0,'form.add_comment');}function feedback_update_toggle_counts(_L0,_L1,_L2,_L3){var _L4=_feedcomment_get_commentable_item_div(_L0,_L1,_L2);if(_L4){var _L5=DOM.scry(_L4,'span.feedback_link_count');for(var i=0;i<_L5.length;++i){var _L7=_L5[i];DOM.setText(_L7,_L3);}}}function _feedcomment_get_feed_comments(_L0,_L1){return _feedcomment_get_first_existing_elem('feed_comments',_L0,_L1);}function _feedcomment_get_add_comment_form(_L0,_L1){return _feedcomment_get_first_existing_elem('add_comment',_L0,_L1);}function _feedcomment_get_add_comment_textarea(_L0,_L1){return _feedcomment_get_first_existing_elem('add_comment_text',_L0,_L1);}function _feedcomment_get_publish_story_checkbox(_L0,_L1){return _feedcomment_get_first_existing_elem('publish_story',_L0,_L1);}function _feedcomment_get_credits_giver_input(_L0,_L1,_L2){var _L3=_feedcomment_get_commentable_item_div(_L0,_L1,_L2);var _L4=DOM.scry(_L3,'.credits_giver_input');return _L4.length?_L4[0]:null;}function _feedcomment_get_first_item_textarea(_L0){var _L1=_L0.getElementsByTagName('textarea');if(_L1.length>0){return _L1[0];}else return null;}function _feedcomment_get_add_comment_button(_L0,_L1){var _L2=_feedcomment_get_first_existing_elem('submit_comment',_L0,_L1);return _L2.firstChild;}function _feedcomment_get_add_comment_wrapper(_L0,_L1){return _feedcomment_get_first_existing_elem('add_comment_wrapper',_L0,_L1);}function _feedcomment_get_comment(_L0,_L1,_L2){var _L3;if(_L3=ge('comment_'+_L1+'_'+_L0+'_'+_L2)){return _L3;}else return ge('comment_'+_L0+'_'+_L2);}function _feedcomment_get_comment_id(_L0){var _L1=/^comment_(?:\d+_){1,2}(\d+)$/.exec(_L0.id);if(_L1)_L1=_L1[1];return _L1;}function _feedcomment_get_first_existing_elem(_L0,_L1,_L2){var div=_feedcomment_get_commentable_item_div_nosource(_L1,_L2);if(div){var _L4=div.scry('*.'+_L0);if(_L4.length)return _L4[0];}var _L5;if(_L5=ge(_L0+'_'+_L2+'_'+_L1)){return _L5;}else if(_L5=ge(_L0+'_'+_L1)){return _L5;}else return ge(_L0+'_'+_L2);}function feedcomment_log_ufi_with_credits(){new AsyncRequest().setURI('/ajax/giftcredits/log.php').send();}var feedcomment_show_credits_nux_tip_d=fc_with_target(function(_L0){var _L1=ge('credits_nux_tip');var _L2=_feedcomment_get_credits_giver_input(_L0.target_fbid,_L0.item_id,_L0.source);if(!_L1||!_L2)return;if(!shown(_L1)){var _L3=DOM.find(_L1,'.credits_nux_tip_title');DOM.setContent(_L3,HTML(_tx("Gi kreditt til {name}",{'name':_L0.target_owner_name})));Vector2.getElementPosition(_L2,'document').add(-5,25).setElementPosition(_L1);$('content').appendChild(_L1);animation(_L1).to('opacity',1).from(0).show().duration(200).go();}var _L4=DataStore.get(_L1,'nuxTipTimeoutId');if(_L4){clearTimeout(_L4);DataStore.remove(_L1,'nuxTipTimeoutId');}});var feedcomment_hide_credits_nux_tip_d=fc_with_target(function(_L0){var _L1=ge('credits_nux_tip');if(_L1)DataStore.set(_L1,'nuxTipTimeoutId',setTimeout(hide.bind(null,_L1),150));});var feedcomment_focus_credits_box_d=fc_with_target(function(_L0){var _L1=_feedcomment_get_credits_giver_input(_L0.target_fbid,_L0.item_id,_L0.source);if(_L1)DOM.setCaretPosition(_L1,0,_L1.value.length);});var feedcomment_increment_credits_input_d=fc_with_target(function(_L0,_L1){var _L2=_feedcomment_get_credits_giver_input(_L0.target_fbid,_L0.item_id,_L0.source);var _L3=parseInt(_L2.value,10)||0;if(_L3<0)_L3=0;_L2.value=_L3+_L1;return true;});function feedcomment_verify_credits(_L0){if(_L0.value==''){_L0.value=0;}else if(!(/^\d*$/).test(_L0.value)){_L0.value=0;animation(_L0).to('background','#fff').from('#fcc').duration(140).go();}}
function HomeFeed(_L0,_L1,_L2,_L3,_L4,_L5,_L6,_L7,_L8){HomeFeed.instance=this;this.resetState();this.oldestStoryTime=_L1||0;this.newestStoryTime=_L0||0;this.lastNewestStoryTime=0;this.lastLocalNewestTime=(new Date()).getTime();this.cdnTimeSyncFrequency=0;this.submenuShown=false;this.requestCount=0;this.akamaiRequestCount=0;this.akamaiTotalLatency=0;this.akamaiTotalStories=0;this.sendTime=0;this.requestLastSeen=0;this.currentDelay=HomeFeed.defaultDelay;this.supportsCdn=false;this.canSupportCdn=true;this.logModeOptionShown=_L7;this.logMode=_L6;this.resetRefreshCount();this.setAutoRefresh(_L2);this.tabset=_L3;this.nonTabId=_L5;this.tabIds=_L4;this.timerHandle=null;this.newStoriesClass=null;this.widgetAppId=null;this.widgetStreamId=null;this.widgetApiKey=null;this.feedbackTargets={};this.gmtOffsetMinutes=null;this.liveCommentUpdating=false;this.maxStoriesInDom=null;this.skipCDNTillNextStory=false;this.showLoggedOutError=true;this.embeddedWidget=_L8;this.widgetLocale=null;this.minimumReloadFrequency=0;if(this.embeddedWidget)LinkController.registerHandler(HomeFeed.newWindowLinkController,null,true);PageTransitions.registerHandler(HomeFeed.pageTransitionHandler);}HomeFeed.getInstance=function(){return HomeFeed.instance;};HomeFeed.defaultDelay=10*1000;HomeFeed.inactiveDelay=300*1000;HomeFeed.defaultRefreshes=90;HomeFeed.intermittentDelay=7*1000;HomeFeed.LOC_REPLACE=1;HomeFeed.LOC_PREPEND=2;HomeFeed.LOC_APPEND=3;HomeFeed.TAB_TOP_STORIES=1;HomeFeed.TAB_LIVE_FEED=2;HomeFeed.TAB_STATUS=3;HomeFeed.TAB_PHOTOS=4;HomeFeed.TAB_POSTED_ITEMS=5;HomeFeed.TAB_LIVEWIDGET_FRIENDS=7;HomeFeed.TAB_LIVEWIDGET_EVERYONE=8;HomeFeed.pageTransitionHandler=function(uri){var _L1=HomeFeed.getInstance();var _L2=uri.getPath();if(_L2=='/'||_L2=='/home.php'||_L2=='/widgets/livefeed.php'){var _L3=uri.getQueryData();if(_L1){_L1.clearFeedbackTargets();if('logged_out' in _L3||'login' in _L3)return false;if('tab' in _L3){_L1.resetState();_L1.setTab(_L3.tab);if(_L3.tab==HomeFeed.TAB_LIVE_FEED){_L1.setAutoRefresh(true);_L1.showLogModeOption(true);_L1.refreshLogMode(_L1.logMode);}else if(_L3.tab==HomeFeed.TAB_LIVEWIDGET_FRIENDS||_L3.tab==HomeFeed.TAB_LIVEWIDGET_EVERYONE){_L1.setAutoRefresh(true);}else _L1.refreshLogMode(false);if(_L1.tabset)_L1.tabset.selectTab(_L1.tabIds[_L3.tab]);if(_L1.nonTabId)CSS.removeClass($(_L1.nonTabId),'HomeFeed_selected');_L1.refresh(HomeFeed.LOC_REPLACE,{'new_request':1},true,true);return true;}else{var app=_L3.app_id||0;var _L5=_L3.stream_id||0;var _L6=_L3.fl||0;if(app||_L6){if(_L1.tabset)_L1.tabset.unselect();if(_L1.nonTabId)CSS.addClass($(_L1.nonTabId),'HomeFeed_selected');_L1.resetState();_L1.refreshLogMode(false);_L1.showLogModeOption(false);if(app)_L1.setApp(app);if(_L5)_L1.setWidgetStreamId(_L5);if(_L6)_L1.setFriendList(_L6);_L1.refresh(HomeFeed.LOC_REPLACE,{'new_request':1},true,true);return true;}}}}return false;};HomeFeed.newWindowLinkController=function(_L0){var uri=new URI(_L0.href);var _L2=uri.getPath();if(_L2!='/'&&_L2!='/home.php'&&_L2!='/widgets/livefeed.php'&&_L2!='/logout.php'){window.open(uri);return false;}return true;};HomeFeed.setDefaultRefreshes=function(_L0){HomeFeed.defaultRefreshes=_L0;};HomeFeed.prototype.openLiveWidgetLoginPopup=function(_L0){if(!_L0)_L0='/login.php';var uri=new URI(_L0);uri.addQueryData({'api_key':this.widgetApiKey,'fbconnect':1,'iframe_widget':1});var _L2='iframe_widget_login';var _L3='toolbar=0,status=0,resizable=0,width=500,height=430';window.open(uri.toString(),_L2,_L3);};HomeFeed.prototype.resetState=function(){this.apps=[];this.friendLists=[];this.tabId=null;this.oldestStoryTime=0;this.newestStoryTime=0;this.lastNewestStoryTime=0;if(this.timerSet)clearTimeout(this.timerHandle);this.timerSet=false;this.timerHandle=null;this.storyQueue=[];this.queueTimerHandle=null;this.newStoriesClass=null;this.supportsCdn=false;this.clearStoryQueue();this.resetRefreshCount();this.setAutoRefresh(false);return this;};HomeFeed.prototype.resetRefreshCount=function(){this.currentRefreshes=HomeFeed.defaultRefreshes;return this;};HomeFeed.prototype.refreshLogMode=function(_L0){var _L1=$('newsfeed_wrapper');if(_L0){CSS.addClass(_L1,'log_mode');CSS.removeClass(_L1,'full_mode');}else{CSS.addClass(_L1,'full_mode');CSS.removeClass(_L1,'log_mode');}return this;};HomeFeed.prototype.addApp=function(_L0){if(_L0)if(this.apps.indexOf(_L0)==-1)this.apps.push(_L0);return this;};HomeFeed.prototype.removeApp=function(_L0){if(this.apps.indexOf(_L0)!=-1)this.apps.remove(_L0);return this;};HomeFeed.prototype.clearApps=function(){if(this.apps.length>0)this.apps=[];return this;};HomeFeed.prototype.setApp=function(_L0){this.clearApps().addApp(_L0);return this;};HomeFeed.prototype.setWidgetApp=function(_L0){this.widgetAppId=_L0;return this;};HomeFeed.prototype.setWidgetStreamId=function(_L0){this.widgetStreamId=_L0;return this;};HomeFeed.prototype.setWidgetApiKey=function(_L0){this.widgetApiKey=_L0;return this;};HomeFeed.prototype.addFriendList=function(_L0){if(this.friendLists.indexOf(_L0)==-1)this.friendLists.push(_L0);return this;};HomeFeed.prototype.removeFriendList=function(_L0){if(this.friendLists.indexOf(_L0)!=-1)this.friendLists.remove(_L0);return this;};HomeFeed.prototype.clearFriendLists=function(){this.friendLists=[];return this;};HomeFeed.prototype.setFriendList=function(_L0){this.clearFriendLists().addFriendList(_L0);return this;};HomeFeed.prototype.setTab=function(_L0){this.tabId=_L0;return this;};HomeFeed.prototype.getTab=function(){return this.tabId;};HomeFeed.prototype.clearTab=function(){this.tabId=null;return this;};HomeFeed.prototype.setWidgetLocale=function(_L0){this.widgetLocale=_L0;return this;};HomeFeed.prototype.setReloadVersion=function(_L0){this.reloadVersion=_L0;return this;};HomeFeed.prototype.setMinimumReloadFrequency=function(_L0){this.minimumReloadFrequency=_L0;return this;};HomeFeed.prototype.setGmtOffsetMinutes=function(_L0){this.gmtOffsetMinutes=_L0;return this;};HomeFeed.prototype.clearFeedbackTargets=function(){this.feedbackTargets={};return this;};HomeFeed.prototype.updatefeedbackTargetHash=function(_L0,_L1,_L2){var key=_L0+':'+_L1;if(this.feedbackTargets[key])this.feedbackTargets[key]['comments_hash']=_L2;return this;};HomeFeed.prototype.updateCommentsFromPayload=function(_L0,_L1){for(var i=0;i<_L0.length;i++){var _L3=_L0[i];var _L4=_L3.item_id;var _L5=_L3.target_fbid;feedcomment_sync_with_markup(_L5,_L4,_L3.markup,_L3.comment_count,_L1);this.updatefeedbackTargetHash(_L4,_L5,_L3.comments_hash);}};HomeFeed.prototype.getFeedbackTargets=function(){return this.feedbackTargets;};HomeFeed.prototype.showSubmenu=function(_L0){set_inner_html($('newsfeed_submenu_content'),_L0);if(!this.submenuShown)$('newsfeed_submenu').removeClass('hidden_elem');this.submenuShown=true;this.refreshLogModeOption();return this;};HomeFeed.prototype.hideSubmenu=function(){if(this.submenuShown)$('newsfeed_submenu').addClass('hidden_elem');this.submenuShown=false;return this;};HomeFeed.prototype.showLogModeOption=function(_L0){this.logModeOptionShown=_L0;return this;};HomeFeed.prototype.refreshLogModeOption=function(){var _L0=ge('newsfeed_submenu_log_mode_option');var _L1='log_mode_selected';var _L2=ge('newsfeed_submenu_headlines_only');var _L3=ge('newsfeed_submenu_full_stories');if(_L2&&_L3)if(this.logMode){_L2.addClass(_L1);_L3.removeClass(_L1);}else{_L2.removeClass(_L1);_L3.addClass(_L1);}if(_L0)if(this.logModeOptionShown){_L0.removeClass('hidden_elem');}else _L0.addClass('hidden_elem');return this;};HomeFeed.prototype.loadOlder=function(){var _L0={'oldest':this.oldestStoryTime};this.refresh(HomeFeed.LOC_APPEND,_L0,true,false);return this;};HomeFeed.prototype.loadNewer=function(){var _L0={'newest':this.newestStoryTime};if(this.canSupportCdn&&this.supportsCdn){if(this.newestStoryTime==this.lastNewestStoryTime){var now=(new Date()).getTime();var _L2=parseInt((now-this.lastLocalNewestTime)/1000);this.newestStoryTime+=_L2;this.lastLocalNewestTime=now;}this.lastNewestStoryTime=this.newestStoryTime;}this.refresh(HomeFeed.LOC_PREPEND,_L0,false,false);return this;};HomeFeed.prototype.setCdnTimeSyncFrequency=function(_L0){this.cdnTimeSyncFrequency=parseInt(_L0);return this;};HomeFeed.prototype.setSkipCDNTillNextStory=function(_L0){this.skipCDNTillNextStory=_L0;return this;};HomeFeed.prototype.setCanSupportCdn=function(_L0){this.canSupportCdn=_L0;return this;};HomeFeed.prototype.isCdnEnabled=function(){var _L0=this.canSupportCdn&&this.supportsCdn&&!this.skipCDNTillNextStory;return _L0;};HomeFeed.prototype.syncNewestStoryTime=function(){var _L0={};_L0['widget_app_id']=this.widgetAppId;_L0['widget_stream_id']=this.widgetStreamId;_L0['ak_r_ct']=this.akamaiRequestCount;if(this.akamaiRequestCount>0){_L0['ak_av_lat']=parseInt(this.akamaiTotalLatency/this.akamaiRequestCount);_L0['ak_av_stor']=parseInt(this.akamaiTotalStories/this.akamaiRequestCount);}_L0['min_reload_freq']=this.minimumReloadFrequency;if(this.tabId==HomeFeed.TAB_LIVEWIDGET_EVERYONE&&this.widgetLocale)_L0['locale']=this.widgetLocale;this.akamaiRequestCount=0;this.akamaiTotalLatency=0;this.akamaiTotalStories=0;var _L1=function(_L4){var _L5=_L4.getPayload();if(_L5&&'lastestTime' in _L5){this.newestStoryTime=parseInt(_L5['lastestTime']);this.lastLocalNewestTime=(new Date()).getTime();}if(_L5&&'cdnSyncFrequency' in _L5)this.setCdnTimeSyncFrequency(_L5['cdnSyncFrequency']);};var _L2=function(_L4){};var _L3=new AsyncRequest().setReadOnly(true).setOption('retries',0).setMethod('GET').setData(_L0).setHandler(bind(this,_L1)).setErrorHandler(_L2).setTransportErrorHandler(_L2).setURI('/ajax/live_feed_last_action.php').send();};HomeFeed.prototype.loadMore=function(_L0){var _L1={'story_keys':_L0};this.refresh(HomeFeed.LOC_APPEND,_L1,false,false);return this;};HomeFeed.prototype.autoRefreshFire=function(){this.timerSet=false;this.timerHandle=null;if(!this.autoRefresh)return;this.loadNewer();};HomeFeed.prototype.autoRefreshHandler=function(){if(!this.autoRefresh||this.timerSet||!this.currentDelay)return;var _L0=this.currentDelay;if(this.currentRefreshes<=0){_L0=HomeFeed.inactiveDelay;}else this.currentRefreshes--;if(!this.supportsCdn)_L0=parseInt(_L0*(.75+.5*Math.random()));this.timerSet=true;this.timerHandle=setTimeout(this.autoRefreshFire.bind(this),_L0);};HomeFeed.prototype.setAutoRefresh=function(_L0){if(!_L0&&this.timerSet){clearTimeout(this.timerHandle);this.timerHandle=null;}this.autoRefresh=_L0;this.autoRefreshHandler();return this;};HomeFeed.prototype.refresh=function(_L0,_L1,_L2,_L3){var _L4=this.autoRefresh;_L0=_L0||HomeFeed.LOC_REPLACE;_L2=(_L2===undefined)?true:_L2;_L3=_L3||false;var _L5=function(_L7){if(_L2&&!ge('feed_loading_image')){var _L8=document.createElement('img');_L8.src="/images/loaders/indicator_blue_large.gif";_L8.id="feed_loading_image";var _L6=$('newsfeed_wrapper');if(_L0==HomeFeed.LOC_APPEND){_L6.parentNode.appendChild(_L8);}else _L6.parentNode.insertBefore(_L8,_L6);}this.requestCount++;var _L9=this.requestCount;var _La=function(_L10){var _L11=_L10.getPayload();if(_L11){if('newDelay' in _L11)this.currentDelay=_L11.newDelay;if('newRefreshCount' in _L11)HomeFeed.defaultRefreshes=_L11.newRefreshCount;if('newStoriesClass' in _L11)this.newStoriesClass=_L11.newStoriesClass;this.supportsCdn=false;if('enableCdn' in _L11&&this.canSupportCdn){this.supportsCdn=_L11.enableCdn;if(this.requestCount&&this.cdnTimeSyncFrequency&&(this.requestCount%this.cdnTimeSyncFrequency)==0)this.syncNewestStoryTime(false);if('n_stories' in _L11)this.akamaiTotalStories+=_L11.n_stories;}if(this.sendTime){this.akamaiTotalLatency+=(new Date()).getTime()-this.sendTime;this.sendTime=0;}if(_L9!=this.requestCount)return;this.removeLoadingImage();this.removeErrorMessage();this.updateLastSeen(_L9);var _L6=$('newsfeed_wrapper');var html=_L11['html']||null;var _L13=_L11['stories']||[];if(html||(_L13&&_L13.length)){this.setSkipCDNTillNextStory(false);if('newestStoryTime' in _L11&&_L11['newestStoryTime']>this.newestStoryTime){this.newestStoryTime=_L11['newestStoryTime'];this.lastLocalNewestTime=(new Date()).getTime();}if('lastestTime' in _L11)this.lastestTime=parseInt(_L11['lastestTime']);if('oldestStoryTime' in _L11&&(this.oldestStoryTime==0||_L11['oldestStoryTime']<this.oldestStoryTime))this.oldestStoryTime=_L11['oldestStoryTime'];if('submenuText' in _L11){this.showSubmenu(_L11.submenuText);}else this.hideSubmenu();this.refreshLogModeOption();this.removeStoryStatusMessage();if(_L13&&_L13.length){this._addStoriesToQueue(_L13);}else if(html)this.updateStoriesHTML(html,this.newStoriesClass,_L0);}if('storiesCount' in _L11&&_L11['storiesCount']){var _L14=ge('standard_status');if(_L14)hide(_L14);}if('livefeedBottomMessage' in _L11){var text=_L11['livefeedBottomMessage'];var _L16=ge('livefeed_bottom_message');if(_L16)_L16.setContent(text);if(text.length>=70){CSS.addClass(_L16,'long_bottom_message');}else CSS.removeClass(_L16,'long_bottom_message');var _L17=ge('livefeed_main_item');if(_L17)if(text.length>0){CSS.addClass(_L17,'with_bottom_message');}else CSS.removeClass(_L17,'with_bottom_message');}if('modified_comments' in _L11){var _L18=feedcomment_get_feedback_sources();var _L19=_L18['FEEDBACK_SOURCE_NEWS_FEED'];this.updateCommentsFromPayload(_L11.modified_comments,_L19);}if('maxStoriesInDom' in _L11&&_L11.maxStoriesInDom){this.maxStoriesInDom=_L11.maxStoriesInDom;this.truncateStories();}if(this.reloadVersion&&'reloadVersion' in _L11&&_L11['reloadVersion']>this.reloadVersion&&'reloadRangeInSeconds' in _L11){this.setReloadVersion(_L11['reloadVersion']);var _L1a=Math.max(10000,Math.random()*1000*_L11['reloadRangeInSeconds']);setTimeout(function(){window.location.reload();},_L1a);}}if(_L4)this.autoRefreshHandler();}.bind(this);if(_L0!=HomeFeed.LOC_PREPEND){var _Lb=ge('feed_bottom_links');if(_Lb)_Lb.parentNode.removeChild(_Lb);}var _Lc=(typeof _L1=='object')?_L1:{};if(this.apps.length)_Lc['apps']=this.apps;if(this.friendLists.length)_Lc['fl']=this.friendLists;if(this.tabId)_Lc['tab']=this.tabId;if(this.minimumReloadFrequency)_Lc['min_reload_freq']=this.minimumReloadFrequency;var _Ld='GET';if(this.feedbackTargets&&this.liveCommentUpdating){var _Le=values(this.feedbackTargets);if(_Le.length){_Lc['feedback_targets']=JSON.encode(_Le);_Ld='POST';}}if(this.widgetAppId)_Lc['widget_app_id']=this.widgetAppId;if(this.widgetStreamId)_Lc['widget_stream_id']=this.widgetStreamId;if(this.tabId==HomeFeed.TAB_LIVEWIDGET_EVERYONE&&this.widgetLocale)_Lc['locale']=this.widgetLocale;if(this.reloadVersion)_Lc['reload_version']=this.reloadVersion;if(this.gmtOffsetMinutes!=null)_Lc['gmt_offset_minutes']=this.gmtOffsetMinutes;var _Lf=new AsyncRequest().setReadOnly(true).setOption('retries',0).setMethod(_Ld).setData(_Lc).setHandler(_La).setErrorHandler(bind(this,this._refreshErrorHandler,_L0,_L9)).setTransportErrorHandler(bind(this,this._refreshErrorHandler,_L0,_L9)).setFinallyHandler(function(){if(_L3)PageTransitions.transitionComplete();});if(this.isCdnEnabled()){this.akamaiRequestCount++;_Lf.setOption('jsonp',true);_Lc['jsonp']=true;_Lf.setURI('http://livefeed.facebook.com/ajax/feed.php');this.sendTime=(new Date()).getTime();}else _Lf.setURI('/ajax/feed.php');if(this.tabset)_Lf.setContextData('src_tab_name',this.tabset.lastSelected).setContextData('dst_tab_name',this.tabset.selectedId).setNectarActionData();_Lf.send();}.bind(this);var _L6=$('newsfeed_wrapper');if(_L0==HomeFeed.LOC_REPLACE)set_inner_html(_L6,'');_L5();};HomeFeed.prototype.truncateStories=function(){if(this.maxStoriesInDom){var _L0=$('newsfeed_wrapper');var _L1=DOM.scry(_L0,'div.feed_item');for(var i=_L1.length-1;i>=this.maxStoriesInDom;i--){var _L3=_L1[i];_L3.parentNode.removeChild(_L3);}var _L4=keys(this.feedbackTargets);var _L5=_L4.length-this.maxStoriesInDom;for(var i=0;i<_L5;i++){var key=_L4[i];delete this.feedbackTargets[key];}}};HomeFeed.prototype.removeLoadingImage=function(){this._removeElementWithId('feed_loading_image');return this;};HomeFeed.prototype.removeErrorMessage=function(){this._removeElementWithId('feed_error_wrapper');return this;};HomeFeed.prototype._removeElementWithId=function(id){var el=ge(id);if(el)el.parentNode.removeChild(el);return this;};HomeFeed.prototype.updateLastSeen=function(_L0){if(this.requestLastSeen<_L0)this.requestLastSeen=_L0;};HomeFeed.prototype._addStoriesToQueue=function(_L0){this.storyQueue=this.storyQueue.concat(_L0);this.startStoryQueue();};HomeFeed.prototype.startStoryQueue=function(){if(this.queueTimerHandle)return;this._handleStoryQueue();};HomeFeed.prototype.clearStoryQueue=function(){if(this.queueTimerHandle)clearTimeout(this.queueTimerHandle);this.storyQueue=[];};HomeFeed.prototype._handleStoryQueue=function(){if(this.storyQueue.length){var len=this.storyQueue.length;var _L1=Math.ceil(len/3);var _L2=this.storyQueue.splice(0,_L1);var _L3=_L2.join('');var _L4=document.createElement('div');set_inner_html(_L4,_L3);_L4.style.overflow='hidden';CSS.addClass(_L4,this.newStoriesClass);this.updateWrapper(HomeFeed.LOC_PREPEND,_L4,true);this.queueTimerHandle=null;if(this.storyQueue.length>0)this.queueTimerHandle=setTimeout(this._handleStoryQueue.bind(this),HomeFeed.intermittentDelay);}};HomeFeed.prototype._refreshErrorHandler=function(_L0,_L1,_L2){if(_L1!=this.requestCount)return;this.removeLoadingImage();this.updateLastSeen(_L1);var _L3=_L2.getError();var _L4;if(this.embeddedWidget){var _L5='HomeFeed.getInstance().openLiveWidgetLoginPopup();';_L4='<a href="#" onClick="'+_L5+'">'+_tx("logg inn")+'</a>';}else _L4='<a href="'+login_url+'">'+_tx("logg inn")+'</a>';if(_L3==kError_Async_NotLoggedIn){var _L6=_tx("Sesjonen har utl\u00f8pt");var msg=_tx("\u00d8kten ble tidsavbrutt. {login}.",{'login':_L4});new ErrorDialog().showError(_L6,msg);return;}if(_L0==HomeFeed.LOC_PREPEND)return;var _L8=document.createElement('div');_L8.id='error';CSS.addClass(_L8,'error');set_inner_html(_L8,_tx("Streamen er utilgjengelig for \u00f8yeblikket. Pr\u00f8v igjen senere."));var _L9=document.createElement('div');_L9.id='feed_error_wrapper';_L9.appendChild(_L8);this.updateWrapper(_L0,_L9,false);return;};HomeFeed.prototype.removeStoryStatusMessage=function(){var _L0=(ge('error')||ge('standard_status'));if(_L0)_L0.parentNode.removeChild(_L0);};HomeFeed.prototype.updateWrapper=function(_L0,_L1,_L2){var _L3=$('newsfeed_wrapper');if(_L0==HomeFeed.LOC_APPEND){_L3.appendContent(_L1);}else if(_L0==HomeFeed.LOC_PREPEND){_L3.prependContent(_L1);var _L4='#FFF9D7';var _L5='#FFFBE7';if(_L2){animation(_L1).to('background',_L4).from(_L4).to('height','auto').from(0).ease(animation.ease.both).show().duration(500).to('opacity',0).from(0).checkpoint().to('opacity',1).from(0).ease(animation.ease.both).duration(750).checkpoint().to('background',_L5).from(_L4).duration(5000).checkpoint().duration(20000).checkpoint().to('background','#fff').from(_L5).duration(5000).go();}else show(_L1);}else _L3.setContent(_L1);return this;};HomeFeed.prototype.banUser=function(_L0,_L1,_L2,_L3){var _L4={'app_id':_L1,'banned_user':_L2};var _L5=function(_L8){var _L9=DOM.findParentByClass(_L0,'feed_item');if(_L9)_L9.parentNode.removeChild(_L9);};var _L6=function(_L8){aiert("Could not ban this user");};var _L7=new AsyncRequest().setMethod('POST').setData(_L4).setHandler(bind(this,_L5)).setErrorHandler(bind(this,_L6)).setURI('/ajax/live_feed_ban.php').send();return this;};HomeFeed.prototype.updateStoriesHTML=function(_L0,_L1,_L2){this.newStoriesClass=_L1;if(typeof(_L2)=='undefined')_L2=HomeFeed.LOC_APPEND;var _L3=document.createElement('div');set_inner_html(_L3,_L0);_L3.style.overflow='hidden';CSS.addClass(_L3,_L1);this.updateWrapper(_L2,_L3,false);};onloadRegister(function(){var fn=function(){var _L1=HomeFeed.getInstance();if(_L1){_L1.resetRefreshCount();_L1.setAutoRefresh(_L1.autoRefresh);}};window.onfocus=chain(window.onfocus,fn);window.onclick=chain(window.onclick,fn);window.onmouseover=chain(window.onmouseover,fn);});

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