/*    HTTP Host:  b.static.ak.fbcdn.net                                        */
/*    Generated:  June 10th 2009 4:16:46 PM PDT                                */
/*      Machine:  10.16.139.105                                                */
/*       Source:  Global Cache                                                 */
/*     Location:  js/6m73rjvs6eckwskk.pkg.js h:8gl2lnh7                        */
/*       Locale:  en_US                                                        */
/*         Path:  js/6m73rjvs6eckwskk.pkg.js                                   */


function RoundedImage(imgSrc){this.imgSrc=imgSrc;this.imgAlt="";this.thesize=RoundedImage.SIZE_DEFAULT;this.background=RoundedImage.BACKGROUND_DEFAULT;}
RoundedImage.SIZE_LARGE='UIRoundedImage_LARGE';RoundedImage.SIZE_SMALL='UIRoundedImage_SMALL';RoundedImage.SIZE_TINY='UIRoundedImage_TINY';RoundedImage.SIZE_DEFAULT=RoundedImage.SIZE_LARGE;RoundedImage.BACKGROUND_NONE='UIRoundedImage_NONE';RoundedImage.BACKGROUND_WHITE='UIRoundedImage_WHITE';RoundedImage.BACKGROUND_GIRLIE='UIRoundedImage_GIRLIE';RoundedImage.BACKGROUND_DARK='UIRoundedImage_DARK';RoundedImage.BACKGROUND_MEDIA='UIRoundedImage_MEDIA';RoundedImage.BACKGROUND_DEFAULT=RoundedImage.BACKGROUND_WHITE;copy_properties(RoundedImage.prototype,{setAlt:function(name){this.imgAlt=name;},setSize:function(size){this.thesize=size;},setBackground:function(bg_const){if(this.corners){CSS.setClass(this.corners,'UIRoundedImage_Corners '+bg_const);}else{this.background=bg_const;}},render:function(){if(this.root){return;}
var controllerClassName='UIRoundedImage'
+' '+this.thesize
+' '+this.background;this.root=$N("span",{className:controllerClassName});var pic=new Image();pic.alt=this.imgAlt;pic.src=this.imgSrc;CSS.setClass(pic,'UIRoundedImage_Image');this.root.appendChild(pic);this.corners=$N("span",{className:'UIRoundedImage_Corners'},$N("span",{className:'UIRoundedImage_CornersSprite'},$N("span",{className:'invisible_png'})));this.root.appendChild(this.corners);return this.root;}});

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.SCROLL_UP=-1;feedcomment_constants.SCROLL_NONE=0;feedcomment_constants.SCROLL_DOWN=1;function feedcomment_set_comment_target(target_fbid,item_id,source){var comments_box=_feedcomment_get_comments_target_wrapper(target_fbid,item_id);var comments_box_inner_divs=comments_box.getElementsByTagName('div');for(var i=0;i<comments_box_inner_divs.length;i++){if(CSS.hasClass(comments_box_inner_divs[i],'target_comments')){CSS.removeClass(comments_box_inner_divs[i],'selected_target_comments');}}
var comments_target=_feedcomment_get_comments_target_div(target_fbid,item_id);if(comments_target){CSS.addClass(comments_target,'selected_target_comments');feed_comment_show_add_button(target_fbid,item_id,source);}}
function feedcomment_submit(target_fbid,item_id,source,target_owner,type_id,assoc_object_id,link_data_str,check_hash,source_app_id){var add_comment_form=_feedcomment_get_add_comment_form(target_fbid,item_id);var add_comment_textarea=_feedcomment_get_add_comment_textarea(target_fbid,item_id);var comment_button=_feedcomment_get_add_comment_button(target_fbid,item_id);var publish_checkbox=_feedcomment_get_publish_story_checkbox(target_fbid,item_id);var credits_giver_input=_feedcomment_get_credits_giver_input(target_fbid,item_id);var num_credits=(credits_giver_input&&parseInt(credits_giver_input.value,10))||0;var feedcomment_arguments=arguments;var publish_story=true;if(publish_checkbox){publish_story=publish_checkbox.checked;}
var onResponse=function(asyncResponse){var payload=asyncResponse.getPayload();if('userData'in payload&&payload.userData=='nux'){if(asyncResponse.isReplay()){return;}
new Dialog(payload).setButtons([{label:_tx("Confirm"),handler:function(){feedcomment_submit.apply(this,feedcomment_arguments)},name:'confirm_comment'},Dialog.CANCEL]).show();}else{feedcomment_add_comment_onsuccess(payload,target_fbid,item_id,source);}}
var comment_text=(add_comment_textarea.getControl&&add_comment_textarea.getControl().getValue())||'';comment_text=trim(comment_text);if(comment_text){var endpoint=num_credits?'/ajax/giftcredits/prompt.php':'/ajax/inline_comments.php';var post_data={'assoc_object_id':assoc_object_id,'check_hash':check_hash,'comment_text':comment_text,'item_id':item_id,'link_data':link_data_str,'source':source,'target_fbid':target_fbid,'target_owner':target_owner,'type_id':type_id,'source_app_id':source_app_id,'num_credits':num_credits,'publish_story':publish_story};if(num_credits){var fragment=_feedcomment_get_commentable_item_div(target_fbid,item_id,source).getAttribute('id');post_data={app_id:19675640871,receiver:target_owner,back_url:URI.getRequestURI().setFragment(fragment).toString(),order_info:JSON.encode(post_data)};}
comment_button.disabled=true;add_comment_textarea.disabled=true;new AsyncRequest().setURI(endpoint).setData(post_data).setContextData('clicktype','Write Comment').setHandler(bind(this,handle_require_email_conf_response,onResponse,null,null)).setFinallyHandler(function(){comment_button.disabled=false;add_comment_textarea.disabled=false;}).send();}else{feed_comment_cancel_add_box_onblur();animation(add_comment_textarea).to('background','#fff').from('#fcc').duration(140).go();}
return status;}
function feedcomment_add_comment_onsuccess(result,target_fbid,item_id,source){var add_comment_form=_feedcomment_get_add_comment_form(target_fbid,item_id);var add_comment_textarea=_feedcomment_get_add_comment_textarea(target_fbid,item_id);var comment_button=_feedcomment_get_add_comment_button(target_fbid,item_id);var publish_checkbox=_feedcomment_get_publish_story_checkbox(target_fbid,item_id);var credits_giver_input=_feedcomment_get_credits_giver_input(target_fbid,item_id);var num_credits=(credits_giver_input&&parseInt(credits_giver_input.value,10))||0;if(num_credits&&'title'in result&&'body'in result){new Dialog(result).show();return;}
if(!Rect.getViewportBounds().contains(Rect.getElementBounds(comment_button))){var scroll_offset=-1*Math.max(getViewportHeight()/2,100);animation(DOMScroll.getScrollRoot()).to('scrollTop',Vector2.getElementPosition(comment_button).y+scroll_offset).ease(animation.ease.end).duration(1500).go();}
if('last_comment'in result){feedcomment_append_comment(target_fbid,item_id,result.last_comment,result.comment_count,source);}else{feedcomment_sync_with_markup(target_fbid,item_id,result.all_comments_html,result.comment_count,source);}
if(credits_giver_input){if('balance_html'in result){var balance_divs=DOM.scry(document.body,'div.comments_add_box span.balance_text');var node=HTML(result.balance_html);for(var i=balance_divs.length-1;i>=0;--i){balance_divs[i].setContent(node);}}
credits_giver_input.value=0;DOM.find(add_comment_form,'div.credits_giver_row').removeClass('credits_giver_row_revealed');}
add_comment_textarea.value='';if(add_comment_textarea.getControl){add_comment_textarea.getControl().setPlaceholderText(_tx("Write another comment..."));}
feed_comment_hide_add_box(target_fbid,item_id,source,false);}
function feed_comment_record_add_box_onblur(timeoutId){feed_comment_record_add_box_onblur.timeoutId=timeoutId;}
function feed_comment_cancel_add_box_onblur(){var timeoutId=feed_comment_record_add_box_onblur.timeoutId;if(timeoutId){clearTimeout(timeoutId);}}
function feed_comment_hide_add_box(target_fbid,item_id,source,onblur_event){var add_comment_textarea=_feedcomment_get_add_comment_textarea(target_fbid,item_id);if(add_comment_textarea){var has_entered_text=add_comment_textarea.getControl&&add_comment_textarea.getControl().getValue();if(!has_entered_text){var commentable_item=_feedcomment_get_commentable_item_div(target_fbid,item_id,source);var comments=_feedcomment_get_feed_comments(target_fbid,item_id);var hovering_over_link=(DOM.scry(commentable_item,'a.feedback_hover').length>0);if(!(onblur_event&&hovering_over_link)){var num_comments=DOM.scry(comments,'div.ufi_section').length;var has_likes=(DOM.scry(commentable_item,'div.has_likes').length>0);var has_feedback=(num_comments>0)||has_likes;var is_single_profile_story=CSS.hasClass(commentable_item,'single_profile_story');if(!has_feedback&&!is_single_profile_story){CSS.addClass(commentable_item,'collapsed_comments');CSS.removeClass(commentable_item,'expanded_comments');if(CSS.hasClass(commentable_item,'story_ff')){CSS.addClass(commentable_item,'ff_collapsed_comments');CSS.removeClass(commentable_item,'ff_expanded_comments');}}}
if(add_comment_textarea.getControl){window.setTimeout(function(){CSS.addClass(commentable_item,'hidden_add_button');},1);}}
feedcomment_hide_credits_nux_tip(target_fbid,item_id);}}
function feed_comment_show_add_button(target_fbid,item_id,source){var commentable_item=_feedcomment_get_commentable_item_div(target_fbid,item_id,source);CSS.removeClass(commentable_item,'hidden_add_button');}
function _feed_comment_update_count(target_fbid,item_id,target_comment_count,source){var target_selector=_feedcomment_get_comments_target_selector(target_fbid,item_id);if(target_selector){if(target_comment_count==0){CSS.removeClass(target_selector,'target_with_comments');CSS.addClass(target_selector,'target_no_comments');}else{if(CSS.hasClass(target_selector,'target_no_comments')){CSS.removeClass(target_selector,'target_no_comments');CSS.addClass(target_selector,'target_with_comments');}}}
var count_span=_feedcomment_get_target_comment_count_span(target_fbid,item_id);if(count_span){set_inner_html(count_span,target_comment_count.toString());}
var commentable_item=_feedcomment_get_commentable_item_div(target_fbid,item_id,source);var item_total_count=0;if(target_selector){var target_counts=DOM.scry(commentable_item,'.target_count');for(var i=0;i<target_counts.length;i++){item_total_count+=parseInt(target_counts[i].innerHTML,10);}}else{item_total_count=target_comment_count;}
feedback_update_toggle_counts(target_fbid,item_id,source,item_total_count);if(item_total_count==0){CSS.removeClass(commentable_item,'with_comments');CSS.addClass(commentable_item,'no_comments');}else{if(CSS.hasClass(commentable_item,'no_comments')){CSS.removeClass(commentable_item,'no_comments');CSS.addClass(commentable_item,'with_comments');}
if(CSS.hasClass(commentable_item,'autoexpand_mode')){toggle_feedcomments_box_open(target_fbid,item_id,source,false);}}}
function load_all_feed_comments(target_fbid,item_id,target_owner,type_id,assoc_object_id,source,check_hash,range,scroll_direction){if(!assoc_object_id){assoc_object_id=0;}
if(!source){var sources=feedcomment_get_feedback_sources();source=sources['FEEDBACK_SOURCE_PROFILE'];}
var last_page=scroll_direction?_feedcomment_get_current_page(target_fbid,item_id).innerHTML:null;var add_comment_form=_feedcomment_get_add_comment_form(target_fbid,item_id);var onResponse=function(asyncResponse){var result=asyncResponse.getPayload();feedcomment_sync_with_markup(target_fbid,item_id,result.all_comments_html,result.comment_count,source,scroll_direction);};new AsyncRequest().setURI('/ajax/inline_comments.php').setData({'assoc_object_id':assoc_object_id,'check_hash':check_hash,'get_all':1,'comments_range':range,'scroll':scroll_direction,'last_page':last_page,'item_id':item_id,'target_fbid':target_fbid,'target_owner':target_owner,'type_id':type_id,'source':source}).setHandler(onResponse).send();}
function feedcomment_sync_with_markup(target_fbid,item_id,markup,comment_count,source,scroll){var feed_comments=_feedcomment_get_feed_comments(target_fbid,item_id);if(feed_comments){set_inner_html(feed_comments,markup);if(scroll){var container=_feedcomment_get_paging_container(target_fbid,item_id);var cur_page=_feedcomment_get_current_page(target_fbid,item_id);var last_page=_feedcomment_get_last_page(target_fbid,item_id);var up=scroll==feedcomment_constants.SCROLL_UP;container.style.height=last_page.offsetHeight+'px';container.scrollTop=up?0:cur_page.offsetHeight;cur_page.style.visibility='visible';var new_scroll_top=up?last_page.offsetHeight:0;animation(container).to('scrollTop',new_scroll_top).duration(750).ease(animation.ease.both).checkpoint().to('height',cur_page.offsetHeight).to('scrollTop',new_scroll_top).duration(150).ease(animation.ease.both).ondone(feedcomment_sync_scroll.curry(up,feed_comments,cur_page,target_fbid,item_id)).go();}
_feed_comment_update_count(target_fbid,item_id,comment_count,source);}}
function feedcomment_sync_scroll(up,feed_comments,current_comments_page,target_fbid,item_id){if(up){DOMScroll.scrollTo(feed_comments);}else{var new_comments=DOM.scry(current_comments_page,'div.ufi_section');var last_comment=new_comments[new_comments.length-1];var add_form=_feedcomment_get_add_comment_form(target_fbid,item_id);var add_row=add_form&&DOM.find(add_form,'div.comment_add_row');var add_height=add_row?add_row.offsetHeight:0;DOMScroll.scrollTo(last_comment,true,false,last_comment.offsetHeight+add_height+
50);}}
function feedcomment_remove_comment(target_fbid,item_id,comment_id,comment_count,source){var comment=_feedcomment_get_comment(target_fbid,item_id,comment_id);if(comment){DOM.remove(comment);_feed_comment_update_count(target_fbid,item_id,comment_count,source);}}
function feedcomment_append_comment(target_fbid,item_id,markup,comment_count,source){var feed_comments=_feedcomment_get_feed_comments(target_fbid,item_id);if(feed_comments){DOM.appendContent(feed_comments,HTML(markup));_feed_comment_update_count(target_fbid,item_id,comment_count,source);}}
function feedcomment_emote(target_fbid,item_id){var feed_comments=_feedcomment_get_feed_comments(target_fbid,item_id);if(!feed_comments){return;}
if(DataStore.get(feed_comments,'emote_magic')){return;}
var nodes=DOM.scry(feed_comments,'div.comment_actual_text');for(var i=0;i<nodes.length;i++){var node=nodes[i];var comment=node.innerHTML;var emotiveComment=Emote.htmlEmote(comment,HTML);if(comment!=emotiveComment){DOM.setContent(node,HTML(emotiveComment));}}
DataStore.set(feed_comments,'emote_magic',true);onunloadRegister(DataStore.remove.bind(DataStore,feed_comments,'emote_magic'));}
function remove_feed_comment_dialog(target_fbid,item_id,comment_id,target_owner,source,type_id,assoc_object_id,check_hash){var add_comment_form=_feedcomment_get_add_comment_form(target_fbid,item_id);var onResponse=function(asyncResponse){var result=asyncResponse.getPayload();feedcomment_remove_comment(target_fbid,item_id,comment_id,result.comment_count,source);};new Dialog().setTitle(_tx("Delete Comment")).setBody(_tx("Are you sure you want to delete this comment?")).setButtons([{name:'delete',label:_tx("Delete"),handler:bind(this,function(){new AsyncRequest().setURI('/ajax/inline_comments.php').setData({'assoc_object_id':assoc_object_id,'check_hash':check_hash,'del_id':comment_id,'item_id':item_id,'source':source,'target_fbid':target_fbid,'target_owner':target_owner,'type_id':type_id}).setContextData('clicktype','Delete Comment').setHandler(onResponse).send();})},Dialog.CANCEL]).show();}
function toggle_feedcomments_box_open(sole_target_fbid,item_id,source,focus){var commentable_item=_feedcomment_get_commentable_item_div(sole_target_fbid,item_id,source);if(commentable_item){CSS.removeClass(commentable_item,'collapsed_comments');CSS.addClass(commentable_item,'expanded_comments');if(CSS.hasClass(commentable_item,'story_ff')){CSS.removeClass(commentable_item,'ff_collapsed_comments');CSS.addClass(commentable_item,'ff_expanded_comments');}
var first_textarea=_feedcomment_get_first_item_textarea(commentable_item);if(first_textarea&&focus){first_textarea.focus();}}}
function toggle_feedcomments_box(sole_target_fbid,item_id,source,focus){var commentable_item=_feedcomment_get_commentable_item_div(sole_target_fbid,item_id,source);if(commentable_item){CSS.toggleClass(commentable_item,'expanded_comments');CSS.toggleClass(commentable_item,'collapsed_comments');if(CSS.hasClass(commentable_item,'story_ff')){CSS.toggleClass(commentable_item,'ff_expanded_comments');CSS.toggleClass(commentable_item,'ff_collapsed_comments');}
var first_textarea=_feedcomment_get_first_item_textarea(commentable_item);if(first_textarea&&focus){if(CSS.hasClass(commentable_item,'expanded_comments')){first_textarea.focus();}}}}
function _feedcomment_get_commentable_item_div(target_fbid,item_id,source){var commentable_item;var sources=feedcomment_get_feedback_sources();if(source==sources['FEEDBACK_SOURCE_OBJECT']||source==sources['FEEDBACK_SOURCE_OBJECTS_PAGE']){commentable_item=ge('commentable_item_'+item_id);}else{commentable_item=ge('div_story_'+item_id+'_'+target_fbid);if(!commentable_item){commentable_item=ge('div_story_'+item_id);}}
return commentable_item;}
function feedback_update_toggle_counts(target_fbid,item_id,source,count){var commentable_item=_feedcomment_get_commentable_item_div(target_fbid,item_id,source);if(commentable_item){var links=DOM.scry(commentable_item,'span.feedback_link_count');for(var i=0;i<links.length;++i){var link=links[i];DOM.setText(link,count);}}}
function _feedcomment_get_comments_target_wrapper(target_fbid,item_id){return ge('comments_box_'+item_id);}
function _feedcomment_get_comments_target_div(target_fbid,item_id){return _feedcomment_get_first_existing_elem('feed_comments_target',target_fbid,item_id);}
function _feedcomment_get_comments_target_selector(target_fbid,item_id){return ge('target_selector_'+item_id+'_'+item_id+'_'+target_fbid);}
function _feedcomment_get_target_comment_count_span(target_fbid,item_id){return _feedcomment_get_first_existing_elem('target_comment_count',target_fbid,item_id);}
function _feedcomment_get_feed_comments(target_fbid,item_id){return _feedcomment_get_first_existing_elem('feed_comments',target_fbid,item_id);}
function _feedcomment_get_paging_container(target_fbid,item_id){return _feedcomment_get_first_existing_elem('comments_paging_container',target_fbid,item_id);}
function _feedcomment_get_current_page(target_fbid,item_id){return _feedcomment_get_first_existing_elem('comments_page_current',target_fbid,item_id);}
function _feedcomment_get_last_page(target_fbid,item_id){return _feedcomment_get_first_existing_elem('comments_page_last',target_fbid,item_id);}
function _feedcomment_get_add_comment_form(target_fbid,item_id){return _feedcomment_get_first_existing_elem('add_comment',target_fbid,item_id);}
function _feedcomment_get_error_target(target_fbid,item_id){return _feedcomment_get_first_existing_elem('feed_comments_error',target_fbid,item_id);}
function _feedcomment_get_add_comment_textarea(target_fbid,item_id){return _feedcomment_get_first_existing_elem('add_comment_text',target_fbid,item_id);}
function _feedcomment_get_publish_story_checkbox(target_fbid,item_id){return _feedcomment_get_first_existing_elem('publish_story',target_fbid,item_id);}
function _feedcomment_get_credits_giver_input(target_fbid,item_id){return _feedcomment_get_first_existing_elem('credits_giver',target_fbid,item_id);}
function _feedcomment_get_first_item_textarea(commentable_item){var textareas=commentable_item.getElementsByTagName('textarea');if(textareas.length>0){return textareas[0];}else{return null;}}
function _feedcomment_get_add_comment_button(target_fbid,item_id){return _feedcomment_get_first_existing_elem('submit_comment',target_fbid,item_id);}
function _feedcomment_get_add_comment_wrapper(target_fbid,item_id){var elem;if(elem=ge('add_comment_wrapper_'+item_id+'_'+target_fbid)){return elem;}else{return ge('add_comment_wrapper_'+item_id+'_'+target_fbid);}}
function _feedcomment_get_comment(target_fbid,item_id,comment_id){var elem;if(elem=ge('comment_'+item_id+'_'+target_fbid+'_'+comment_id)){return elem;}else{return ge('comment_'+target_fbid+'_'+comment_id);}}
function _feedcomment_get_first_existing_elem(prefix,target_fbid,item_id){var elem;if(elem=ge(prefix+'_'+item_id+'_'+target_fbid)){return elem;}else if(elem=ge(prefix+'_'+target_fbid)){return elem;}else{return ge(prefix+'_'+item_id)}}
function _feedcomment_get_credits_nux_tip(target_fbid,item_id){return _feedcomment_get_first_existing_elem('credits_nux_tip',target_fbid,item_id);}
function feedcomment_log_ufi_with_credits(){new AsyncRequest().setURI('/ajax/giftcredits/log.php').send();}
function feedcomment_show_credits_nux_tip(target_fbid,item_id){var elem=_feedcomment_get_credits_nux_tip(target_fbid,item_id);var input_elem=_feedcomment_get_credits_giver_input(target_fbid,item_id);if(!elem||!input_elem){return;}
if(!shown(elem)){Vector2.getElementPosition(input_elem,'document').add(-5,25).setElementPosition(elem);$('content').appendChild(elem);animation(elem).to('opacity',1).from(0).show().duration(200).go();}
var timeoutId=DataStore.get(elem,'nuxTipTimeoutId');if(timeoutId){clearTimeout(timeoutId);DataStore.remove(elem,'nuxTipTimeoutId');}}
function feedcomment_hide_credits_nux_tip(target_fbid,item_id){var elem=_feedcomment_get_credits_nux_tip(target_fbid,item_id);if(!elem){return;}
DataStore.set(elem,'nuxTipTimeoutId',setTimeout(hide.bind(null,elem),150));}
function feedcomment_increment_credits_input(input_id,default_increment){var input_elem=$(input_id);if(!input_elem){return;}
var cur_value=parseInt(input_elem.value,10)||0;if(cur_value<0){cur_value=0;}
input_elem.value=cur_value+default_increment;return true;}
function feedcomment_verify_credits(input_elem){if(input_elem.value==''){input_elem.value=0;}else if(!/^\d*$/.test(input_elem.value)){input_elem.value=0;animation(input_elem).to('background','#fff').from('#fcc').duration(140).go();}}

function InlineParticipants(targetId,asyncUri){this.asyncUri=asyncUri;this.target=$(targetId);this.targetId=targetId;if((!this.target)||this.target.pending){return;}
if(this.target.cached){this.toggleVisibility();}else{this.initializeFromTarget();this.fetchParticipants();}}
copy_properties(InlineParticipants.prototype,{fetchParticipants:function(){this.target.pending=true;new AsyncRequest().setURI(this.asyncUri).setMethod('GET').setReadOnly(true).setData(this.getFetchData()).setHandler(bind(this,'fetchedActorsResponse')).setErrorHandler(bind(this,'fetchedActorsError')).send();this.loadTimeout=setTimeout(this.showLoadIndicator.bind(this),200);},showLoadIndicator:function(){this.loadTimeout=null;if(this.target.pending){this.loading=true;CSS.addClass(this.target,'participants_loading');show(this.target);}},hideLoadIndicator:function(){if(this.loadTimeout){clearTimeout(this.loadTimeout);this.loadTimeout=null;}
if(this.loading){CSS.removeClass(this.target,'participants_loading');}},getSearchUri:function(){return this.target.getAttribute("search_href");},fetchedActorsResponse:function(asyncResponse){var payload=asyncResponse.getPayload();var show_more=payload["has_more"];var actors=payload["actors"];var nameContainers=[];if(!actors){return this.fetchedActorsError();}
this.hideLoadIndicator();for(var i=0;i<actors.length;i++){var container=this.createNameContainer(actors[i]);this.target.appendChild(container);}
if(show_more){var search_uri=this.getSearchUri();var search_text=payload['more_text']||this.getSearchText();if(search_uri){var search_link=$N('a',{href:search_uri,className:'see_all'},search_text);this.target.appendChild(search_link);}}
this.target.pending=false;this.target.cached=true;this.toggleVisibility(true);animation(this.target).show().from('opacity',0).to('opacity',1).duration(450).go();},getSearchText:function(){return _tx("See all...");},fetchedActorsError:function(asyncResponse){this.target.pending=false;var search_uri=this.getSearchUri();if(search_uri){goURI(search_uri);}else{hide(this.target);}},createNameContainer:function(spec){var container=$N("div",{title:spec.name,className:"name_container "+
(spec.div_class||"")},null);if(env_get('gk_nile_home')){var img=new RoundedImage(spec.img_src);img.setAlt(spec.name);if(this.cornerBackground){img.setBackground(this.cornerBackground);}
var pic=img.render();}else{var pic=new Image();pic.alt=spec.name;pic.src=spec.img_src;pic.width='50';pic.height='50';}
var pic_link=$N('a',{className:"pic_container",href:spec.profile_href,onclick:spec.profile_onclick||''},pic);container.appendChild(pic_link);var name_link=$N('a',{href:spec.profile_href,onclick:spec.profile_onclick||''},spec.first_name);container.appendChild($N('span',{className:"name"},name_link));return container;},toggleVisibility:function(first_time){if(!first_time){toggle(this.targetId);}}});function StoryParticipants(targetId,linkData,hash){var asyncUri='/ajax/feed_participants_ajax.php';this.parent.construct(this,targetId,asyncUri);this.linkData=linkData;this.hash=hash;}
copy_properties(StoryParticipants.prototype,{initializeFromTarget:function(){this.storyKey=this.target.getAttribute("story_key");this.storyUser=this.target.getAttribute("user");},getFetchData:function(){if(this.linkData){return{sid:this.storyKey,uid:this.storyUser,link_data:this.linkData,hash:this.hash};}else{return{sid:this.storyKey,uid:this.storyUser};}}});StoryParticipants.extend('InlineParticipants');function MutualFriends(targetId){var asyncUri='/ajax/mutual_friends_ajax.php';this.parent.construct(this,targetId,asyncUri);}
copy_properties(MutualFriends.prototype,{initializeFromTarget:function(){this.friend=this.target.getAttribute("friend");},getFetchData:function(){return{uid:this.friend};},getSearchText:function(){return _tx("See all mutual friends");}});MutualFriends.extend('InlineParticipants');function SearchMutualFriends(targetId){this.parent.construct(this,targetId);}
copy_properties(SearchMutualFriends.prototype,{getFetchData:function(){return{uid:this.friend,max:8};}});SearchMutualFriends.extend('MutualFriends');function SuggestionReceivers(targetId,suggesters,newcomer,receiver){var asyncUri='/ajax/suggestion_receivers_ajax.php';copy_properties(this,{suggesters:suggesters,newcomer:newcomer,receiver:receiver});this.parent.construct(this,targetId,asyncUri);}
copy_properties(SuggestionReceivers.prototype,{getFetchData:function(){return{suggesters:this.suggesters,newcomer:this.newcomer,receiver:this.receiver};},initializeFromTarget:bagofholding});SuggestionReceivers.extend('InlineParticipants');function LikeParticipants(feedback_params,target_id,search_uri){var asyncUri='/ajax/like/participants.php';copy_properties(this,{feedback_params:feedback_params,search_uri:search_uri,cornerBackground:RoundedImage.BACKGROUND_GIRLIE});this.parent.construct(this,target_id,asyncUri);}
copy_properties(LikeParticipants.prototype,{getFetchData:function(){return{feedback_params:JSON.encode(this.feedback_params)};},getSearchUri:function(){return this.search_uri;},fetchedActorsResponse:function(response){LikeController.informUpdateState(this.feedback_params.target_fbid,response.getPayload().like_state_info);this.parent.fetchedActorsResponse(response);},initializeFromTarget:bagofholding,toggleVisibility:function(first_time){if(first_time){toggle_feedcomments_box_open(this.feedback_params.target_fbid,this.feedback_params.item_id,this.feedback_params.source,false);}
CSS.toggleClass(this.target.parentNode,'participants_not_expanded');this.parent.toggleVisibility(first_time);}});LikeParticipants.extend('InlineParticipants');

function TextAreaControl(textarea){copy_properties(this,{autogrow:false,shadow:null,originalHeight:null,metricsValue:null});this.parent.construct(this,textarea);};TextAreaControl.extend('TextInputControl');copy_properties(TextAreaControl.prototype,{setAutogrow:function(autogrow){this.autogrow=autogrow;this.refreshShadow();CSS.addClass(this.getRoot(),'DOMControl_autogrow');return this;},onupdate:function(){this.parent.onupdate();var r=this.getRoot();if(this.autogrow&&r.value!=this.metricsValue){this.metricsValue=r.value;if(CSS.getStyle(r,'fontSize')==""){return false;}
copy_properties(this.shadow.style,{fontSize:parseInt(CSS.getStyle(r,'fontSize'),10)+'px',fontFamily:CSS.getStyle(r,'fontFamily'),width:(Vector2.getElementDimensions(r).x-8)+'px'});DOM.setContent(this.shadow,HTML(htmlize(r.value)));if(this.isEmpty()&&this.originalHeight){r.style.height=this.originalHeight+'px';}else{r.style.height=Math.max(this.originalHeight,Vector2.getElementDimensions(this.shadow).y+15)+'px';}}},refreshShadow:function(){if(this.autogrow){this.shadow=$N('div',{className:'DOMControl_shadow'});DOM.getRootElement().appendChild(this.shadow);var r=this.getRoot();this.originalHeight=parseInt(CSS.getStyle(r,'height'))||Vector2.getElementDimensions(this.getRoot()).y;}else{if(this.shadow){DOM.remove(this.shadow);}
this.shadow=null;}}});function autogrow_textarea(element){element=$(element);if(!element._hascontrol){element._hascontrol=true;new TextAreaControl(element).setAutogrow(true);}}

function LikeController(){}
copy_properties(LikeController,{saveChangeLike:function(feedback_params,like_exists,check_hash){var target_fbid=feedback_params.target_fbid;LikeController.informChangeLike(target_fbid,like_exists);var data={feedback_params:JSON.encode(feedback_params),should_delete:!like_exists,check_hash:check_hash};var handler=bind(null,LikeController.changeLikeResponse,target_fbid,like_exists);new AsyncRequest().setURI('/ajax/like/like.php').setData(data).setHandler(handler).setErrorHandler(handler).send();},changeLikeResponse:function(target_fbid,like_exists,response){if(response.isReplay()){LikeController.informChangeLike(target_fbid,like_exists);}else{if(response.getError()){if(!response.getErrorIsWarning()){LikeController.informChangeLike(target_fbid,!like_exists);}
ErrorDialog.showAsyncError(response);}}},informChangeLike:function(target_fbid,like_exists){LikeController.informUpdateState(target_fbid,{exists:like_exists});},informUpdateState:function(target_fbid,message){Arbiter.inform('like/update/'+target_fbid,message);}});function LikeComponent(feedback_params,exists,container_id){copy_properties(this,{feedback_params:feedback_params,exists:exists,container_id:container_id,container:null});Arbiter.subscribe('like/update/'+feedback_params.target_fbid,this.updateState.bind(this));}
copy_properties(LikeComponent.prototype,{updateState:function(type,message){if(!this.init()){return;}
this._updateState(message);},_updateState:function(message){if(typeof message.exists!='undefined'){this._updateLikeState(message.exists);}},_updateLikeState:function(exists){if(exists==this.exists){return;}
this.exists=exists;this.updateClasses();},init:function(){this.container=ge(this.container_id);return!!this.container;},updateClasses:function(){CSS.conditionClass(this.container,'like_exists',this.exists);CSS.conditionClass(this.container,'like_not_exists',!this.exists);},_updateContent:function(div_exists,div_not_exists,content_exists,content_not_exists){content_exists=HTML(content_exists);content_not_exists=HTML(content_not_exists);if(content_exists!=div_exists.innerHTML){DOM.setContent(div_exists,content_exists);}
if(content_not_exists!=div_not_exists.innerHTML){DOM.setContent(div_not_exists,content_not_exists);}}});function LikeLink(feedback_params,exists,container_id){this.parent.construct(this,feedback_params,exists,container_id);}
LikeLink.extend('LikeComponent');function LikeInlineInfo(feedback_params,exists,container_id,has_other_users){this.parent.construct(this,feedback_params,exists,container_id);this.has_other_users=has_other_users;if(this.init()){this.updateActionLinkDash(exists);}}
copy_properties(LikeInlineInfo.prototype,{init:function(){if(!this.parent.init()){return false;}
copy_properties(this,{inline_exists:DOM.find(this.container,'span.like_component_exists'),inline_not_exists:DOM.find(this.container,'span.like_component_not_exists')});return true;},_updateState:function(message){if(message.inline_exists){this._updateContent(this.inline_exists,this.inline_not_exists,message.inline_exists,message.inline_not_exists);}
this.parent._updateState(message);},_updateLikeState:function(exists){if(exists!=this.exists){this.updateActionLinkDash(exists);}
this.parent._updateLikeState(exists);},updateActionLinkDash:function(exists){if(!this.has_other_users){var dash=this.container.nextSibling;if(!dash||!CSS.hasClass(dash,'action_link_dash')){return;}
if(exists){show(dash);}else{hide(dash);}}}});LikeInlineInfo.extend('LikeComponent');function LikeBox(feedback_params,exists,has_other_users,container_id){copy_properties(this,{has_other_users:has_other_users,animating:false,pending_animation:false});this.parent.construct(this,feedback_params,exists,container_id);}
copy_properties(LikeBox,{BOX_ANIM_TIME:200,SENTENCE_ANIM_TIME:200,PIC_ANIM_TIME:300});copy_properties(LikeBox.prototype,{init:function(){if(!this.parent.init()){return false;}
copy_properties(this,{sentence_container:DOM.find(this.container,'div.like_sentence_container'),sentence_exists:DOM.find(this.container,'div.like_sentence_exists'),sentence_not_exists:DOM.find(this.container,'div.like_sentence_not_exists')});return true;},updateClasses:function(){this.parent.updateClasses();var has_likes=this.exists||this.has_other_users;CSS.conditionClass(this.container,'has_likes',has_likes);CSS.conditionClass(this.container,'no_likes',!has_likes);},onDoneAnimating:function(){this.animating=false;if(this.pending_animation){this.pending_animation=false;this._animate();}else{this.updateClasses();}},_updateState:function(message){if(message.sentence_exists&&message.sentence_not_exists){this._updateContent(this.sentence_exists,this.sentence_not_exists,message.sentence_exists,message.sentence_not_exists);if(!this.init()){return false;}}
this.parent._updateState(message);},_updateLikeState:function(exists){if(exists==this.exists){return;}
this.exists=exists;if(this.animating){this.pending_animation=!this.pending_animation;return false;}
this._animate();},_animate:function(){this.animating=true;var was_expanded=(!this.exists||this.has_other_users);var expanded=(this.exists||this.has_other_users);var ondone=bind(this,'onDoneAnimating');if(!was_expanded&&expanded){ondone();CSS.setOpacity(this.sentence_container,0);animation(this.container).from('height','0px').to('height','auto').duration(LikeBox.BOX_ANIM_TIME).show().go();animation(this.sentence_container).to('opacity',1).duration(LikeBox.BOX_ANIM_TIME).go();return;}else if(was_expanded&&!expanded){var close_ondone=bind(this,function(){ondone();feed_comment_hide_add_box(this.feedback_params.target_fbid,this.feedback_params.item_id,this.feedback_params.source,false);});animation(this.sentence_container).to('opacity',0).duration(LikeBox.BOX_ANIM_TIME).go();animation(this.container).to('height','0px').duration(LikeBox.BOX_ANIM_TIME).hide().ondone(close_ondone).go();return;}
var sentence_show=this.exists?this.sentence_exists:this.sentence_not_exists;var sentence_hide=this.exists?this.sentence_not_exists:this.sentence_exists;animation(sentence_hide).to('opacity',0).duration(LikeBox.SENTENCE_ANIM_TIME).hide().go();var sentence_show_anim=animation(sentence_show).from('opacity',0).to('opacity',1).duration(LikeBox.SENTENCE_ANIM_TIME).show();var viewer_pic=DOM.scry(this.container,'div.like_participant_viewer')[0];if(!viewer_pic){sentence_show_anim.ondone(ondone);}
sentence_show_anim.go();animation(this.sentence_container).from('height',Vector2.getElementDimensions(sentence_hide).y).to('height',Vector2.getElementDimensions(sentence_show).y).duration(LikeBox.SENTENCE_ANIM_TIME).go();if(viewer_pic){var border_pic=DOM.scry(this.container,'div.like_participant_border')[0];if(this.exists){CSS.setOpacity(viewer_pic,0);var viewer_anim=animation(viewer_pic).from('width','0px').to('width','auto').show().duration(LikeBox.PIC_ANIM_TIME).checkpoint().to('opacity',1).duration(LikeBox.PIC_ANIM_TIME).ondone(ondone);if(border_pic){animation(border_pic).to('opacity',0).hide().duration(LikeBox.PIC_ANIM_TIME).ondone(bind(viewer_anim,viewer_anim.go)).go();}else{viewer_anim.go();}}else{var viewer_anim=animation(viewer_pic).to('opacity',0).duration(LikeBox.PIC_ANIM_TIME).checkpoint().to('width','0px').duration(LikeBox.PIC_ANIM_TIME);if(border_pic){var border_anim=animation(border_pic).from('opacity',0).to('opacity',1).show().duration(LikeBox.PIC_ANIM_TIME).ondone(ondone);viewer_anim.ondone(bind(border_anim,border_anim.go));}else{viewer_anim.ondone(ondone);}
viewer_anim.go();}}}});LikeBox.extend('LikeComponent');

function VideoHistogram(){this.videos={};this.video_payloads={};this.listening=false;this.checking=false;}
VideoHistogram.prototype.start=function(swf_id){var new_video=document[swf_id]||window[swf_id];this.videos[swf_id]=new_video;this.listening=true;}
VideoHistogram.prototype.videoFinished=function(swf_id,payload){this.videos[swf_id]=null;this.setPayload(swf_id,payload);this.updateServer();}
VideoHistogram.prototype.setPayload=function(swf_id,payload){this.video_payloads[swf_id]=payload;}
VideoHistogram.prototype.updateServer=function(){var big_payload=[];for(var swf_id in this.video_payloads){var video_report=this.video_payloads[swf_id];this.video_payloads[swf_id]=null;if(video_report){big_payload.push(video_report);}}
var json_payload=JSON.encode(big_payload);new AsyncSignal('/video/motion_log.php',{'h':json_payload}).send();this.listening=false;this.checking=false;}
VideoHistogram.prototype.checkStatus=function(){if(this.listening){this.checking=true;for(var v in this.videos){if(this.videos[v].reportTime){this.videos[v].reportTime();}}
this.updateServer();}}

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