/*    HTTP Host:  b.static.ak.fbcdn.net                                        */
/*    Generated:  March 27th 2009 3:43:14 PM PDT                               */
/*      Machine:  10.16.140.105                                                */
/*       Source:  Local Cache                                                  */
/*     Location:  rsrc:5angntuf:en_US:/html/js/af59ue0d5q0w0wow.pkg.js:141     */
/*       Locale:  en_US                                                        */
/*         Path:  js/af59ue0d5q0w0wow.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_show_error(target_fbid,item_id,source,error_text){var comments_target=_feedcomment_get_comments_target_div(target_fbid,item_id);if(comments_target){CSS.addClass(comments_target,'has_error');}
var error_target=_feedcomment_get_error_target(target_fbid,item_id);if(!error_target){error_target=_feedcomment_get_add_comment_form(target_fbid,item_id);}
if(error_text&&error_target){DOM.setText(error_target,error_text);}}
function feedcomment_hide_error(target_fbid,item_id,source){var comments_target=_feedcomment_get_comments_target_div(target_fbid,item_id);if(comments_target){CSS.removeClass(comments_target,'has_error');}}
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'){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 onTransportFail=function(response){feedcomment_show_error(target_fbid,item_id,source,_tx("Please try again later."));};var onFail=function(response){if(payload=response.getPayload()){if(payload.errTitle||payload.errBody){var error_text=payload.errBody?payload.errBody:payload.errTitle;feedcomment_show_error(target_fbid,item_id,source,error_text);}else{onTransportFail(response);}}else{onTransportFail(response);}};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(onResponse).setErrorHandler(onFail).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.wallcontent').length;var has_likes=(DOM.scry(commentable_item,'div.has_likes').length>0);if(num_comments==0&&!has_likes){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){if(!assoc_object_id){assoc_object_id=0;}
if(!source){var sources=feedcomment_get_feedback_sources();source=sources['FEEDBACK_SOURCE_PROFILE'];}
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);};var onFail=function(response){if(payload=response.getPayload()){if(payload.errTitle||payload.errBody){var error_text=payload.errBody?payload.errBody:payload.errTitle;feedcomment_show_error(target_fbid,item_id,source,error_text);}else{onTransportFail(response);}}else{onTransportFail(response);}};new AsyncRequest().setURI('/ajax/inline_comments.php').setData({'assoc_object_id':assoc_object_id,'check_hash':check_hash,'get_all':1,'item_id':item_id,'target_fbid':target_fbid,'target_owner':target_owner,'type_id':type_id,'source':source}).setHandler(onResponse).setErrorHandler(onFail).send();}
function feedcomment_sync_with_markup(target_fbid,item_id,markup,comment_count,source){var feed_comments=_feedcomment_get_feed_comments(target_fbid,item_id);if(feed_comments){set_inner_html(feed_comments,markup);_feed_comment_update_count(target_fbid,item_id,comment_count,source);}
feedcomment_hide_error(target_fbid,item_id,source);}
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);}
feedcomment_hide_error(target_fbid,item_id,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);}
feedcomment_hide_error(target_fbid,item_id,source);}
function feedcomment_emote(target_fbid,item_id){var feed_comments=_feedcomment_get_feed_comments(target_fbid,item_id);if(!feed_comments){return;}
if(DOMStorage.getData(feed_comments,'emote_magic')){return;}
var nodes=DOM.scry(feed_comments,'div.wall_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));}}
DOMStorage.setData(feed_comments,'emote_magic',true);onunloadRegister(DOMStorage.removeData.bind(DOMStorage,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);};var onFail=function(response){if(payload=response.getPayload()){if(payload.errTitle||payload.errBody){var error_text=payload.errBody?payload.errBody:payload.errTitle;feedcomment_show_error(target_fbid,item_id,source,error_text);}else{onTransportFail(response);}}else{onTransportFail(response);}};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).setErrorHandler(onFail).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_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_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=DOMStorage.getData(elem,'nuxTipTimeoutId');if(timeoutId){clearTimeout(timeoutId);DOMStorage.removeData(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;}
DOMStorage.setData(elem,'nuxTipTimeoutId',setTimeout(hide.bind(null,elem),150));}
function feedcomment_increment_credits_input(input_id){var input_elem=$(input_id);if(!input_elem){return;}
var default_increment=10;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 ft(metadata,hash,type,undo,cat){undo=undo?1:0;var asyncRequestPost=new AsyncSignal('/ajax/f.php',{'meta':metadata,'h':hash,'type':type,'undo':undo,'cat':cat}).send();return true;}

function InlineParticipants(targetId,asyncUri){this.asyncUri=asyncUri;this.target=$(targetId);this.targetId=targetId;if((!this.target)||this.target.pending){return;}
if(this.target.cached){toggle(this.targetId);}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;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;}});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});LikeParticipants.extend('InlineParticipants');

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){LikeController.informChangeLike(target_fbid,like_exists);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);}});function LikeLink(feedback_params,exists,container_id){this.parent.construct(this,feedback_params,exists,container_id);}
LikeLink.extend('LikeComponent');function LikeBox(feedback_params,exists,has_other_users,container_id){copy_properties(this,{has_other_users:has_other_users});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);},_updateState:function(message){if(message.sentence_exists&&message.sentence_not_exists){this._updateSentences(HTML(message.sentence_exists),HTML(message.sentence_not_exists));if(!this.init()){return false;}}
this.parent._updateState(message);},_updateSentences:function(sentence_exists,sentence_not_exists){if(sentence_exists!=this.sentence_exists.innerHTML){DOM.setContent(this.sentence_exists,sentence_exists);}
if(sentence_not_exists!=this.sentence_not_exists.innerHTML){DOM.setContent(this.sentence_not_exists,sentence_not_exists);}},_updateLikeState:function(exists){if(exists==this.exists){return;}
var was_expanded=this.exists||this.has_other_users;var expanded=exists||this.has_other_users;this.exists=exists;var ondone=bind(this,'updateClasses');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=exists?this.sentence_exists:this.sentence_not_exists;var sentence_hide=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(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');

var share_data=null;var share_last_comment={p:null,t:null};function share_internal_config(params){if(share_last_comment.p==params){params+='&c='+escapeURI(share_last_comment.t?share_last_comment.t:'');}else{share_last_comment.p=params;}
var async=new AsyncRequest().setURI('/ajax/share_dialog.php?'+params).setMethod('GET').setReadOnly(true);var dialog=new Dialog().setAsync(async).setContentWidth(445).show();return false;}
function share_show_error(params){var dialog=new Dialog().setTitle(_tx("Invalid URL")).setBody(_tx("Sorry, you have entered an invalid URL.")).setButtons(Dialog.OK).show();return false;}
function share_is_shareable(url){return(/(?:https?:\/\/)?\w+\.\w+/.test(url));}
function share_internal_bookmarklet(){if(/http:\/\/[^\/]*?\/posted?\.php/.test(document.location.href)){var dialog=new Dialog().setClassName('share_congratulations').setTitle(_tx("Share")).setBody('<div class="status"><h2>'+_tx("You've successfully installed the bookmarklet.")+'</h2><p>'
+_tx("Click it on an external site to share it with your friends.")+'</p></div>').setButtons(Dialog.OK).show();}else{throw 0;}}
function share_show_comments(share_id,focus_textarea){CSS.removeClass('share_footer'+share_id,'hide_comments');CSS.addClass('share_footer'+share_id,'show_comments');if(focus_textarea){$('comment'+share_id).focus();}
return false;}
function share_show_add_comment(obj,share_id){var node=obj.parentNode;DOM.remove(node);var add_comment=$('add_comment_input'+share_id);show(add_comment);var submit_button=$('add_comment_button'+share_id);submit_button.disabled=false;var textarea_id='comment'+share_id;$(textarea_id).focus();return false;}
function share_add_comment_submit(obj,share_id){var node=obj.parentNode;var textarea=node.getElementsByTagName('textarea')[0];var comment=textarea.value;if(/^\s*$/.test(comment)){_share_flash_comment_error(textarea);return;}else if(comment.length>1000){$('add_comment_error'+share_id).style.display='block';return;}
new AsyncRequest().setURI('/ajax/share_misc.php').setData({share_id:share_id,comment:comment}).setHandler(function(parentNode,commentsNode,response){hide(parentNode);DOM.appendContent(commentsNode,HTML(response.getPayload()));node.getElementsByTagName('textarea')[0].value='';}.bind(this,node,$('share_comments_for_'+share_id))).send();obj.disabled=true;return true;}
function share_delete_comment(obj,share_id,comment_id){while(!CSS.hasClass(obj,'share_other_comment')&&obj!=null){obj=obj.parentNode;}
if(obj==null){return true;}
var delete_function=function(obj,share_id,comment_id){var p=obj.parentNode;DOM.remove(obj);if(p.childNodes.length==0){hide(p);}
new AsyncRequest().setURI('/ajax/share_misc.php').setData({share_id:share_id,delcomment:1,comment_id:comment_id}).send();return true;}.bind(null,obj,share_id,comment_id);var dialog=new Dialog().setTitle(_tx("Delete Comment?")).setBody(_tx("Are you sure you want to delete this comment?")).setButtons([Dialog.newButton('delete',_tx("Delete")),Dialog.CANCEL]).setHandler(delete_function).show();return false;}
function _share_flash_comment_error(obj){animation(obj).from('background','#ffc8c8').to('background','#fff').duration(500).go();}
function share_show_delete_dialog(context,href){var dialog=new contextual_dialog();dialog.set_context(context);dialog.show_choice(_tx("Are you sure you want to delete this item?"),_tx("Deleting this item will also remove all its comments."),_tx("Delete Item"),function(){_share_delete_clicked(this,context,href);},_tx("Cancel"),function(){generic_dialog.get_dialog(this).hide();});return false;}
function _share_delete_clicked(button,context,href){while(context.parentNode&&!CSS.hasClass(context,'sharebox_item')){context=context.parentNode;}
if(!CSS.hasClass(context,'sharebox_item')){return false;}
generic_dialog.get_dialog(button).hide();new AsyncRequest().setURI(href).send();DOM.remove(context);}
function share_play_video(share_id,unique_id){_share_log_play_content(share_id,'video');if(holder=ge(unique_id+'_holder')){if(container=holder.parentNode.parentNode){CSS.addClass(container,'playing');}}
return false;}
function _share_log_play_content(share_id,media_type){new AsyncRequest().setURI('/ajax/shareplay_ajax.php').setData({s:share_id,m:media_type}).send();}
function share_composer_method(obj,method){var tabs=obj.parentNode.parentNode.getElementsByTagName('a');for(var i=0;i<tabs.length;i++){CSS.removeClass(tabs[i],'selected');}
CSS.addClass(obj,'selected');while(!CSS.hasClass(obj,'share_composer')&&obj){obj=obj.parentNode;}
if(!obj){Util.error("Could not find share composer");return true;}
CSS.setClass(obj,'share_composer share_status_'+method);return false;}
function share_send_onsubmit(obj){return _share_onsubmit_to('ids','send',obj);}
function share_wallpost_onsubmit(obj){return _share_onsubmit_to('wall_id','wall',obj);}
function share_post_onsubmit(obj){return _share_onsubmit('post',obj);}
function _share_onsubmit_to(ids,post_action,obj){var ids=$(ids);if(!ids.tokenizer||ids.tokenizer.count_names()==0){new ErrorDialog().showError(_tx("This field is required."),_tx("You must specifiy at least one recipient for this message."));return false;}
return _share_onsubmit(post_action,obj);}
function _share_onsubmit(post_action,obj)
{var post=serialize_form(obj);post.action=post_action;var inputs=obj.getElementsByTagName('input');for(var i=0;i<inputs.length;i++){inputs[i].disabled=true;}
var inputs=obj.getElementsByTagName('textarea');for(var i=0;i<inputs.length;i++){inputs[i].disabled=true;}
share_last_comment.t=inputs[0].value;var divs=obj.getElementsByTagName('div');for(var i=0;i<divs.length;i++){if(typeof divs[i].tokenizer!='undefined'){divs[i].tokenizer.disable();}else if(!CSS.hasClass(divs[i],'tokenizer')){CSS.addClass(divs[i],'tokenizer_locked');}}
while(!CSS.hasClass(obj,'dialog_content')&&obj){obj=obj.parentNode;}
if(!obj){Util.error("Could not locate base element for dialog");return false;}
new AsyncRequest().setURI('/ajax/share.php').setData(post).setHandler(share_post_send_callback.bind(obj)).send();}
function share_post_send_callback(response){payload=response.getPayload();if(payload['html']){set_inner_html(this,payload['html']);if(payload['redr']){setTimeout(function(){goURI(payload['redr']);},3000);}else{var gd=generic_dialog.get_dialog(this);var tmout=payload['timeout']||3000;if(gd){gd.fade_out(500,tmout);}else if(payload['close']){setTimeout(function(){self.close();},tmout);}}}else if(payload['redr']){goURI(payload['redr']);}}
function share_scroll_to_comment(share_id,comment_id){var target;var target_offset;if(share_id&&comment_id){target=ge('comment_'+share_id+'_'+share_id+'_'+comment_id);if(!target){target=ge('comment_'+share_id+'_'+comment_id);}
target_offset=-10;}else{target=ge('share_footer'+share_id);target_offset=0;}
if(target){var target_top=Vector2.getElementPosition(target).y-100;animation(DOMScroll.getScrollRoot()).to('scrollTop',(target_top+target_offset)/2).duration(750).go();window.setTimeout(function(){target_top=Vector2.getElementPosition(target).y;animation(DOMScroll.getScrollRoot()).to('scrollTop',target_top+target_offset).ease(animation.ease.end).duration(750).go();},750);}}

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