/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  November 6th 2008 4:46:48 PM PST                             */
/*      Machine:  10.16.139.105                                                */
/*       Source:  Local Cache                                                  */
/*     Location:  rsrc:dny9xe2d:en_US:/html/js/dk51w2lrafk8swko.pkg.js:141     */
/*       Locale:  en_US                                                        */
/*         Path:  js/dk51w2lrafk8swko.pkg.js                                   */


function showCamera(camera_finder,camera_found){hide(ge(camera_finder));show(ge(camera_found));}
function enable_save(){var button=ge('save_camera_picture');if(button.disabled){CSS.toggleClass(button,'inputaux_disabled');CSS.toggleClass(button,'inputaux');button.removeAttribute('disabled');}}
function disable_save(){var button=ge('save_camera_picture');if(!button.getAttribute('disabled')){CSS.toggleClass(button,'inputaux_disabled');CSS.toggleClass(button,'inputaux');button.setAttribute('disabled','disabled');}}
function saveCameraPicture(movieName,args){var camera=document[movieName]||window[movieName];camera.renderPicture(args);}
function setShowCamera(){AsyncRequest.pingURI('/ajax/camera.php',{"show_cam":true},true);}
function setHideCamera(){AsyncRequest.pingURI('/ajax/camera.php',{"hide_cam":true},true);}
function setCameraDetected(){AsyncRequest.pingURI('/ajax/camera.php',{"cam_good":true},true);}
function setCameraNotDetected(){AsyncRequest.pingURI('/ajax/camera.php',{"cam_bad":true},true);}
function pic_cam_log_detection(user,camera_status){return abTest('a%3A4%3A%7Bs%3A4%3A%22user%22%3Bi%3A'+user+'%3Bs%3A6%3A%22action%22%3Bs%3A'+camera_status.length+'%3A%22'+camera_status+'%22%3Bs%3A4%3A%22_tid%22%3Bs%3A15%3A%22PROFILE_PIC_CAM%22%3Bs%3A3%3A%22_tg%22%3Bs%3A1%3A%22B%22%3B%7D',false);}
function pic_cam_log_photo_taken(user){return abTest('a%3A4%3A%7Bs%3A4%3A%22user%22%3Bi%3A'+user+'%3Bs%3A6%3A%22action%22%3Bs%3A11%3A%22photo_taken%22%3Bs%3A4%3A%22_tid%22%3Bs%3A15%3A%22PROFILE_PIC_CAM%22%3Bs%3A3%3A%22_tg%22%3Bs%3A1%3A%22B%22%3B%7D',false);}

function gifttags_source(){this.parent.construct(this);this.tag_type='keyword';this.tag_ver=1;}
gifttags_source.extend('static_source');gifttags_source.prototype.text_noinput='';gifttags_source.prototype.text_placeholder='Enter Keyword...';gifttags_source.tags={};gifttags_source.tags_index={};gifttags_source.is_building=false;gifttags_source.set_tags=function(tag_type,tags){gifttags_source.tags[tag_type]=tags;}
gifttags_source.async_set_tags=function(tag_type,tag_ver,on_response){if(!gifttags_source.is_building&&!gifttags_source.tags[tag_type]){var async_params={t:tag_type,v:tag_ver};gifttags_source.is_building=true;new AsyncRequest().setReadOnly(true).setMethod('GET').setURI('/ajax/typeahead_gifttags.php').setData(async_params).setHandler(function(response){gifttags_source.set_tags(tag_type,response.getPayload().tags);gifttags_source.is_building=false;if(on_response){on_response();}}).send();}};gifttags_source.prototype.cache_results=true;gifttags_source.prototype.set_tags=function(){var post_process=function(){this.values=gifttags_source.tags[this.tag_type];if(!gifttags_source.tags_index[this.tag_type]){this.build_index();gifttags_source.tags_index[this.tag_type]=this.index;}else{this.index=gifttags_source.tags_index[this.tag_type];this.ready();}}.bind(this);if(!gifttags_source.tags[this.tag_type]){gifttags_source.async_set_tags(this.tag_type,this.tag_ver,post_process);}else{post_process();}}
gifttags_source.prototype.gen_html=function(tag,highlight){var text=tag.tag_name;return['<div>',typeahead_source.highlight_found(tag.t,highlight),'</div><div><small>',text,'</small></div>'].join('');}
gifttags_source.prototype.search_value=function(text){if(!this.is_ready&&!gifttags_source.is_building){this.set_tags();}
return this.parent.search_value(text);}

function ProfileComposerController(root,id,apps,this_is_me,feedwall,max_displayed_composers){this.tabs=[];for(var i=0;i<apps.length;i++){var obj=$('composer_'+apps[i]);obj.listen('click',this.onclick.bind(this,i));obj.find('a').listen('click',this.onclick.bind(this,i));this.tabs.push(obj);var obj_menu=ge('composer_'+apps[i]+'_menu');if(obj_menu){obj_menu.listen('click',this.onclick.bind(this,i));}}
var more_menu=ge('compose_more_container');if(more_menu){dropmenu(more_menu).registerHTMLMenu('composer_dropdown').setPosition(dropmenu.ALIGN_LEFT).addHook('show',function(){CSS.addClass(more_menu,'selected');}.bind(this)).addHook('hide',function(){CSS.removeClass(more_menu,'selected');}.bind(this));}
this.id=id;this.this_is_me=this_is_me
this.canvas=$('composer_canvas');this.root=root;this.composer_tabs=DOM.find(root,'div.composer_tabs');var composers=[];this.tab_in_menu={};for(var i=0;i<apps.length;i++){composers.push({app_id:apps[i],node:$('composer_content_'+apps[i]),submit_button:ge(apps[i]+'_publish_button'),comment_text:ge(apps[i]+'_comment_text')});this.tab_in_menu[i]=(i>=max_displayed_composers)?true:false;}
this.composers=composers;this.feedwall=feedwall;if(composers.length>max_displayed_composers){this.last_displayed=this.replace_index=max_displayed_composers-1;}
if(composers.length){this.current=0;}else{this.current=-1;}
ProfileComposerController.instance=this;this.registerTransitionHandler();}
ProfileComposerController.prototype.showFirst=function(app_id){var i=this.getAppIndex(app_id);if(i>this.last_displayed){this.swapInMenuSelection(i);}
this._showAppAtIndex(i);}
ProfileComposerController.prototype._showAppAtIndex=function(i){hide(this.composers[this.current].node);CSS.removeClass(this.tabs[this.current],'selected');CSS.addClass(this.tabs[i],'selected');this.current=i;show(this.composers[i].node);if(this.composers[i].controller){this.composers[i].controller.onshow();}
var message={sender:this,app_id:this.composers[i].app_id};Arbiter.inform.bind(this,Arbiter.PROFILE_PUBLISHER,message).defer(100);}
ProfileComposerController.prototype.swapInMenuSelection=function(i){CSS.addClass('composer_'+this.composers[this.replace_index]['app_id'],'hidden_elem');CSS.removeClass('composer_'+this.composers[this.replace_index]['app_id']+'_menu','hidden_elem');this.tab_in_menu[this.replace_index]=true;CSS.removeClass('composer_'+this.composers[i]['app_id'],'hidden_elem');CSS.addClass('composer_'+this.composers[i]['app_id']+'_menu','hidden_elem');this.tab_in_menu[i]=false;this.replace_index=i;}
ProfileComposerController.prototype.getAppIndex=function(app_id){var index=-1;for(var i=0;i<this.composers.length;i++){if(this.composers[i].app_id==app_id){index=i;break;}}
return index;}
ProfileComposerController.prototype.handleSwap=function(uri){var query=uri.getQueryData();var app=query.pub;var i=this.getAppIndex(app);if(uri.getPath()=='/profile.php'&&app){if(!this.this_is_me){search_log_2nd_action('Click tab:'+"application_"+app);}
var prevComposerHeight=$('profile_composer').offsetHeight;if(this.tab_in_menu[i]){this.swapInMenuSelection(i);}
this._showAppAtIndex(i);if(ge('profile_tutorial_callout_wall_filters')){var composerHeightAdjustment=$('profile_composer').offsetHeight-prevComposerHeight;$('profile_tutorial_callout_wall_filters').style.top=($('profile_tutorial_callout_wall_filters').offsetTop+composerHeightAdjustment)+'px';}
PageTransitions.transitionComplete();return true;}
return false;}
ProfileComposerController.prototype.swapComposers=function(i){if(i==this.current){return false;}
var params={pub:this.composers[i].app_id};PageTransitions.go(URI.getRequestURI().addQueryData(params),true);}
ProfileComposerController.prototype.onclick=function(i,event){this.swapComposers(i);if(event){event.kill();}
return false;}
ProfileComposerController.prototype.showComposerError=function(response){var showError=function(showMsg){(new ErrorDialog()).showError(response.getPayload().errorTitle,showMsg?(response.getPayload().errorMessage):_tx("There was an application error. Please try again later."));}
var err=response.getError();if(err){switch(err){case kError_Platform_CallbackValidationFailure:showError(true);break;case kError_Platform_ApplicationResponseInvalid:showError(response.getPayload().showDebug);break;case kError_RestrictionMessage_Featureblock:case kError_RestrictionMessage_Featurewarning:case kError_RestrictionMessage_Spamwarning:ErrorDialog.showAsyncError(response);break;default:ErrorDialog.showAsyncError(response);break;}}}
ProfileComposerController.prototype.onsubmitResponseOrError=function(button,response){var addFeedWallRow=true;var currentComposer=this.composers[this.current];var err=response.getError();if(err){this.showComposerError(response);if(err!=kError_RestrictionMessage_Featurewarning&&err!=kError_RestrictionMessage_Spamwarning){addFeedWallRow=false;}}
if(addFeedWallRow){var newStory=null;if(currentComposer&&currentComposer.controller&&currentComposer.controller.onsubmitResponse){newStory=currentComposer.controller.onsubmitResponse(button,response);}else{newStory=response.getPayload();}
if(newStory){this.insertNewStory(newStory);}}
if(currentComposer&&!err){if(currentComposer.comment_text){currentComposer.comment_text.value='';}
if(currentComposer.controller){currentComposer.controller.reset(button);}}}
ProfileComposerController.prototype.onsubmitResponse=function(button,response){var currentComposer=this.composers[this.current];var payload=null;if(currentComposer&&currentComposer.controller&&currentComposer.controller.onsubmitResponse){payload=currentComposer.controller.onsubmitResponse(button,response);}else{payload=response.getPayload();}
this.insertNewStory(payload);if(currentComposer){if(currentComposer.comment_text){currentComposer.comment_text.value='';}
if(currentComposer.controller){currentComposer.controller.reset(button);}}}
ProfileComposerController.prototype.insertNewStory=function(payload){var today,todayDisplay,newStory,firstDivider;if(payload.story){newStory=payload.story;today=payload.today;todayDisplay=payload.today_display;}else{newStory=payload;}
if(newStory){var firstStory=this.feedwall.firstChild();if(today&&todayDisplay&&firstStory.story_time<today){var feedwallElem=this.feedwall.wall;firstDivider=DOM.find(feedwallElem,'div.date_divider.first');firstDivider.removeClass('first');var div=document.createElement('div');set_inner_html(div,todayDisplay);feedwallElem.insertBefore(div,firstDivider);CSS.addClass(div,'date_divider first');}
storyElem=HTML(newStory).getNodes()[0];this.feedwall.insertBefore(new FeedWallPost(this.feedwall,storyElem),firstStory,false,firstDivider);}}
ProfileComposerController.prototype.onafterSubmit=function(button,response){var err;if(response){err=response.getError();}
var button_state=(err!=kError_RestrictionMessage_Featureblock);this.setComposerSubmitButtonState(button_state);if(this.composers[this.current].comment_text){this.composers[this.current].comment_text.disabled=false;}
CSS.removeClass(this.root,'disabled');if(!err){this.onclick(0);}}
ProfileComposerController.prototype.onsubmit=function(button,event){var data={id:this.id,action:'post',button:button}
var currentComposer=this.composers[this.current];var comment_text=currentComposer.comment_text;data.app_id=currentComposer.app_id;data.app_data=serialize_form(currentComposer.node);data.comment_text='';if(comment_text&&comment_text.getControl){data.comment_text=trim(comment_text.getControl().getValue());}
if((data.app_id==2719290516)&&(data.comment_text==''||data.comment_text==null)){animation($('2719290516_comment_text')).from('background','#ffcccc').to('background','#fff').duration(120).go();return false;}
this.setComposerSubmitButtonState(false);currentComposer.submit_button.blur();new AsyncRequest().setURI('/ajax/profile/composer.php').setData(data).setContextData('clicktype',"application_"+data.app_id,!this.this_is_me).setHandler(this.onsubmitResponseOrError.bind(this,button)).setErrorHandler(this.onsubmitResponseOrError.bind(this,button)).setFinallyHandler(this.onafterSubmit.bind(this,button)).send();if(comment_text){comment_text.disabled=true;}
CSS.addClass(this.root,'disabled');}
ProfileComposerController.prototype.setComposerSubmitButtonState=function(enabled){return this._setSubmitButtonState(this.composers[this.current].submit_button,enabled);}
ProfileComposerController.prototype._setSubmitButtonState=function(button,enabled){if(!button)return;button.disabled=!enabled;CSS[enabled?'removeClass':'addClass'](button,'disabled_button');}
ProfileComposerController.getInstance=function(){return ProfileComposerController.instance;}
ProfileComposerController.prototype.registerController=function(app_id,instance){var i=this.getAppIndex(app_id);this.composers[i].controller=instance;instance.commentText=this.composers[i].comment_text;instance.publishButton=$(app_id+'_publish_button');instance.publishButton.onclick=instance.onsubmit.bind(instance,'publish_button');if(this.current==i){instance.onshow();}}
ProfileComposerController.prototype.registerTransitionHandler=function(){PageTransitions.registerHandler(bind(this,'handleSwap'));}
ProfileComposerController.prototype.blockCurrentComposerHelper=function(){var composer=this.composers[this.current];hide('composer_'+composer.app_id);this.swapComposers(0);}
ProfileComposerController.prototype.blockCurrentComposer=function(app_name){var composer=this.composers[this.current];EditAppSettings.setup(composer.app_id).killComposerDialog(app_name,composer.controller.getRemoveLink(),this.blockCurrentComposerHelper.bind(this));}
function ProfileComposer(app_id,root){this.root=root;this.app_id=app_id;this.profileComposerController=ProfileComposerController.getInstance();this.profileComposerController.registerController(app_id,this);}
ProfileComposer.prototype.onshow=bagofholding;ProfileComposer.prototype.onsubmit=function(button,event){this.profileComposerController.onsubmit(button,event);}
ProfileComposer.prototype.reset=function(button){if(this.commentText&&this.commentText.getControl){this.commentText.getControl().setValue('');}}
ProfileComposer.prototype.insertNewStory=function(storyPayload){this.profileComposerController.insertNewStory(storyPayload);}
function ProfileComposerStatus(app_id,root){this.parent.construct(this,app_id,root);this.statusEditor=new ProfileStatusEditor(root,this);}
ProfileComposerStatus.extend('ProfileComposer');ProfileComposerStatus.prototype.onsubmit=function(){this.statusEditor.post();}
ProfileComposerStatus.prototype.startEditFromValue=function(value){var index=this.profileComposerController.getAppIndex(2915120374);if(index<0){return false;}
this.profileComposerController.onclick(index);this.statusEditor.startEdit(value);}
function ProfileStatusEditor(root,composer){this.parent.construct(this,root);this.composer=composer;return this;}
ProfileStatusEditor.extend('StatusEditor');ProfileStatusEditor.clear=function(){if(profileComposerStatus){profileComposerStatus.statusEditor.clear();}}
ProfileStatusEditor.edit=function(status_text){if(profileComposerStatus){profileComposerStatus.startEditFromValue(status_text);}}
ProfileStatusEditor.prototype.onkeypress=function(event){if(event_get_keypress_keycode(event)==KEYS.RETURN){this.post({test_name:'INLINE_STATUS_EDITOR',action:'COMPOSER_UPDATE'});return $E(event).kill();}}
ProfileStatusEditor.prototype._onCleared=function(){var ps=ge('profile_status');if(ps){animation(ps).to('opacity',0).from(1).hide().duration(200).go();}}
ProfileStatusEditor.prototype._onPosted=function(payload){var feedwall=this.composer.profileComposerController.feedwall;this.composer.insertNewStory(payload);var ps=ge('profile_status');if(ps){ps.style.display='none';var status_text=$('status_text');status_text.onclick=this.startEdit.bind(this,payload.status);set_inner_html(status_text,payload.markup);set_inner_html($('status_time_inner'),_tx("a moment ago&nbsp;"));animation(ps).to('opacity',1).from(0).duration(200).go();ps.style.display='inline';if(ge('status_source')){CSS.addClass($('status_source'),'hidden_elem');}
if(ge('status_mobile_indicator')){CSS.addClass($('status_mobile_indicator'),'hidden_elem');}}}
function ProfileComposerVideo(app_id,root,tos_agreed,popup_uri){this.parent.construct(this,app_id,root);this.tabs=[];var tabAnchors=DOM.scry(root,'a');for(var i=0;i<tabAnchors.length;i++){tabAnchors[i].listen('click',this.selectTab.bind(this,i));this.tabs.push(tabAnchors[i].parentNode);}
this.tabContent=DOM.find(root,'div.well_content').childNodes;this.currentTab=0;this.popup_uri=popup_uri;this.tos_agreed=tos_agreed;this.pane='record';this.record_pane=ge('video_composer_record_pane');this.upload_pane=ge('video_composer_upload_pane');this.publish_button=root.getElementsByTagName('input')[1];divs=root.getElementsByTagName('div');this.footer=divs[divs.length-1];e=document.createElement('input');e.type='hidden';e.name='composer_video_id';e.value=null;root.appendChild(e);this.video_id_input=e;ProfileComposerVideo.activeInstance=this;}
ProfileComposerVideo.extend('ProfileComposer');ProfileComposerVideo.prototype.fvrAutoSave=function(fvr_data){this.video_id_input.value=fvr_data['video_id'];this.profileComposerController.setComposerSubmitButtonState(true);};ProfileComposerVideo.prototype.selectTab=function(tab){for(var i=0;i<this.tabs.length;i++){CSS[i==tab?'addClass':'removeClass'](this.tabs[i],'selected');(i==tab?show:hide)(this.tabContent[i]);}
this.currentTab=tab;if(this.currentTab!=0){this.video_id_input.value=null;this.profileComposerController.setComposerSubmitButtonState(false);}
return false;}
ProfileComposerVideo.prototype.doUploadValidate=function(){$('upload_button').disabled=true;this.upload_form=DOM.find(this.upload_pane,'form');var afterTosAgreed=function(){file_input=$('file_baby');if(!video_extension_is_valid(file_input.value)){video_show_extension_error(video_extensions_info);this.reset();return;}
new AsyncRequest().setURI('/ajax/motion_upload.php').setData({action:'get_id',enable_process_notification:1}).setHandler((function(response){var upload_data=response.getPayload();$('video_ptoken').value=$('video_id').value=upload_data.video_id;this.upload_form.action=URI(this.upload_form.action).addQueryData({'v':upload_data.video_id});this.doUpload();}).bind(this)).send();}.bind(this)
if(!this.tos_agreed){var tos_header=_tx("Terms of Service");var agree=_tx("Agree");var dont_agree=_tx("Do Not Agree");var dialog=new Dialog().setTitle(tos_header).setBody(window.video_upload_tos).setButtons([{name:'agree',label:agree,handler:function(button){new AsyncRequest().setURI('/ajax/motion_upload.php').setData({action:'obey'}).setHandler(function(response){this.tos_agreed=true;afterTosAgreed();}.bind(this)).send();}.bind(this)},{name:'dont_agree',label:dont_agree,handler:function(button){this.reset();}.bind(this)}]).show();return;}
afterTosAgreed();};ProfileComposerVideo.prototype.doUpload=function(){this.popup_uri=URI(this.popup_uri).addQueryData({'video_id':$('video_id').value});this.upload_popup=window.open(this.popup_uri,'video_upload_popup_'+gen_unique(),'directories=no,height=225,width=550,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no');if(!this.upload_popup){(new pop_dialog()).show_message(_tx("Do you have a pop-up blocker?"),_tx("In order to upload videos on your profile, Facebook needs to be able to create a pop-up window. Please disable your pop-up blocker or allow this page to create popups, then try again."));this.reset(true);return false;}
this.upload_popup_ready=function(iframe_name){this.upload_form.target=iframe_name;this.upload_form.submit();this.reset();this.upload_popup.start_progress_loop();}};ProfileComposerVideo.prototype.reset=function(dont_clear_file_input){this.profileComposerController.setComposerSubmitButtonState(false);this.video_id_input.value=null;if(ge('file_baby')&&!dont_clear_file_input){$('file_baby').value='';}
if(ge('upload_button')){$('upload_button').disabled=false;}};ProfileComposerVideo.prototype.onshow=function(){this.profileComposerController.setComposerSubmitButtonState(false);}
function ProfileComposerPhotos(app_id,root,tabs,camera_id){this.parent.construct(this,app_id,root);this.camera=document[camera_id]||window[camera_id];this.albumName=ge('photos_composer_album_name');if(this.albumName){this.albumName.onkeyup=this.enableSubmit.bind(this,this.albumName);}
this.albumDesc=ge('photos_composer_album_desc');this.postComment=ge('photos_composer_post_comment');if(this.postComment){this.postCommentPlaceholder=this.postComment.value;this.postCommentPlaceholder=this.postComment.value;}
this.postFile=ge('photos_composer_post_file');if(this.postFile){this.postFile.onchange=this.enableSubmit.bind(this,this.postFile);}
if(this.commentText){this.postCommentPlaceholder=this.commentText.value;}
this.currentTab=tabs[0];(new ProfileWellDisplay(DOM.find(root,'div.composer_well'))).onselect=function(tab){this.currentTab=tabs[tab];this.reset();}.bind(this);ProfileComposerPhotos.instance=this;};ProfileComposerPhotos.extend('ProfileComposer');ProfileComposerPhotos.getInstance=function(){if(!ProfileComposerPhotos.instance){console.error('No ProfileComposerPhotos exists');}else{return this.instance;}}
ProfileComposerPhotos.prototype.onshow=function(){this.profileComposerController.setComposerSubmitButtonState(false);}
ProfileComposerPhotos.prototype.onsubmit=function(){if(!this.this_is_me){search_log_2nd_action('application_'+this.app_id);}
if(this.currentTab=='webcam'){var form_data=serialize_form(DOM.find(this.root,'form.camera'));form_data['comment']=this.commentText.getControl&&this.commentText.getControl().getValue();this.camera.renderPicture(form_data);return false;}else if(this.currentTab=='album'){DOM.find(this.root,'form.createalbum').submit();}else if(this.currentTab=='post'){if(this.postComment){if(!this.postComment.getControl||this.postComment.getControl().isEmpty()){this.postComment.value='';}}
DOM.find(this.root,'form.uploadphoto').submit();}
return false;}
ProfileComposerPhotos.prototype.uploadOnerror=function(error){this.reset();}
ProfileComposerPhotos.prototype.uploadOndone=function(story){(function(){this.insertNewStory(story);}).bind(this).defer();this.reset();}
ProfileComposerPhotos.prototype.enableSubmit=function(elt){if(elt){if(elt.value){this.profileComposerController.setComposerSubmitButtonState(true);}else{this.profileComposerController.setComposerSubmitButtonState(false);}}}
ProfileComposerPhotos.prototype.reenable=function(){this.profileComposerController.setComposerSubmitButtonState(true);}
ProfileComposerPhotos.prototype.reset=function(){if(this.albumName){this.albumName.value='';}
if(this.albumDesc){this.albumDesc.value='';}
if(this.postComment){this.postComment.value=this.postCommentPlaceholder;}
if(this.postFile){this.postFile.value='';}
if(this.commentText){this.commentText.value=this.postCommentPlaceholder;}
if(this.camera&&this.camera.reset){this.camera.reset();}
this.profileComposerController.setComposerSubmitButtonState(false);}
function ProfileComposerShare(app_id,root){this.parent.construct(this,app_id,root);this.prompt=root.childNodes[0];var inputs=this.prompt.getElementsByTagName('input');this.urlInput=inputs[0];this.urlInput.onkeypress=function(event){if(event_get_keypress_keycode(event)==KEYS.RETURN){this.previewButton.onclick();return false;}}.bind(this);this.previewButton=inputs[1];this.previewButton.onclick=this.previewShare.bind(this);this.contentArea=root.childNodes[1];this.removeLink=this.contentArea.getElementsByTagName('a')[0];this.removeLink.onclick=function(){this.reset();return false;}.bind(this);this.previewStage=this.contentArea.childNodes[1];this.commentEtc=this.publishButton.parentNode;};ProfileComposerShare.extend('ProfileComposer');ProfileComposerShare.prototype.previewShare=function(){var errorCallback=function(response){ErrorDialog.showAsyncError(response);this.reset();}.bind(this);this.attachment=ComposerAttachment.newFromURL(this.urlInput.value,errorCallback);this.urlInput.blur();hide(this.prompt);show(this.contentArea);this.attachment.containerReady(this.previewStage.firstChild,true);}
ProfileComposerShare.prototype.reset=function(){this.parent.reset();this.urlInput.value='';this.commentText.blur();show(this.prompt);hide(this.contentArea);this.attachment=null;this.previewStage.firstChild.innerHTML='';}
function ProfileComposerNotes(app_id,root){this.parent.construct(this,app_id,root);this.addPhotosLink=DOM.find(root,'a.add_photos');this.addPhotosLink.onclick=this.profileComposerController.onsubmit.bind(this.profileComposerController,'add_photos');this.title=DOM.find(root,'input.note_title');this.noteContent=DOM.find(root,'textarea.note_content');this.inThisNoteRow=DOM.find(root,'tr.in_this_note_row');this.inThisNoteTokenizer=DOM.find(this.inThisNoteRow,'div.tokenizer').tokenizer;this.privacyRow=DOM.find(root,'tr.privacy_row');this.advancedLink=DOM.find(root,'a.advanced_options');this.advancedLink.onclick=function(){hide(this.advancedLink);show(this.addPhotosLink);show(this.inThisNoteRow);show(this.privacyRow);}.bind(this);};ProfileComposerNotes.extend('ProfileComposer');ProfileComposerNotes.prototype.onsubmitResponse=function(button,response){var payload=response.getPayload();if('add_photos'==button){location.href='/editnote.php?draft&note_id='+payload.note_id;return false;}else{return payload;}}
ProfileComposerNotes.prototype.reset=function(){this.parent.reset();show(this.advancedLink);hide(this.addPhotosLink);hide(this.inThisNoteRow);this.title.value='';this.noteContent.value='';this.inThisNoteTokenizer.clear();}
function ProfileComposerGifts(app_id,tag_type,tag_ver,root){this.parent.construct(this,app_id,root);this.tag_type=tag_type;this.tag_ver=tag_ver;this.giftWall=root.getElementsByTagName('textarea')[0];this.placeHolder=this.giftWall.value;this.feedwall=this.profileComposerController.feedwall;};ProfileComposerGifts.extend('ProfileComposer');ProfileComposerGifts.prototype.onshow=function(){gifttags_source.async_set_tags(this.tag_type,this.tag_ver);Bootloader.loadComponents('gift-credits-css');}
ProfileComposerGifts.prototype.onsubmit=function(){var wall_message=this.commentText.value;if(trim(wall_message)==trim(this.placeHolder)){wall_message='';}
var giftData={sku:$('sku').value,receiver:$('gift_receiver').value,message:wall_message,privacy_type:0,source:'composer',back_url:URI.getRequestURI().toString()};var async=new AsyncRequest().setURI(GiftshopController.getEndpoint(giftData.sku)).setData(giftData).setContextData('clicktype','application_'+this.app_id,!this.this_is_me);new Dialog().setAsync(async).show();};ProfileComposerGifts.prototype.reset=function(){this.parent.reset();this.reenable();};ProfileComposerGifts.prototype.disable=function(){this.commentText.disabled=true;this.profileComposerController.setComposerSubmitButtonState(false);CSS.addClass(this.root,'disabled');};ProfileComposerGifts.prototype.reenable=function(){this.commentText.disabled=false;this.profileComposerController.setComposerSubmitButtonState(true);CSS.removeClass(this.root,'disabled');}
function ProfileComposerPlatform(app_id,root,is_self){this.parent.construct(this,app_id,root);this.contentArea=DOM.find(root,'div.content_area');this.commentEtc=DOM.find(root,'div.comment_etc');this.extendedContent=null;this.rendered=false;this.visible=false;}
ProfileComposerPlatform.extend('ProfileComposer');ProfileComposerPlatform.prototype.onshow=function(){if(this.extendedContent===null){this.extendedContent=false;new AsyncRequest().setOption('useIframeTransport',true).setReadOnly(true).setMethod('GET').setURI(new URI('/ajax/profile/composer.php').setSubdomain('apps')).setData({action:'render',app_id:this.app_id,id:this.profileComposerController.id,iframe:true}).setHandler(function(response){var payload=response.getPayload();this.extendedContent=payload.extendedContent;if(!payload.publishEnabled){$(this.app_id+'_publish_button').disabled=true;}
if(!payload.commentEnabled){hide($(this.app_id+'_comment_text'));}
this.onshow();}.bind(this)).setErrorHandler(function(response){this.profileComposerController.showComposerError(response);this.reset();this.profileComposerController.onclick(0);}.bind(this)).send();}else if(!this.rendered){this.rendered=true;this.contentArea.className='';set_inner_html(this.contentArea,this.extendedContent,true);show(this.commentEtc);}}
ProfileComposerPlatform.prototype.reset=function(){this.parent.reset();this.rendered=false;this.extendedContent=null;set_inner_html(this.contentArea,'',true);if(this.commentText){this.commentText.disabled=false;}};ProfileComposerPlatform.prototype.getRemoveLink=function(){return $('remove_composer_'+this.app_id);};function ProfileWellDisplay(root){var tabAnchors=DOM.scry(root,'div.composer_well_tabs a');this.tabs=[];for(var i=0;i<tabAnchors.length;i++){this.tabs.push(tabAnchors[i].parentNode);tabAnchors[i].onclick=this.selectTab.bind(this,i);}
this.tabContent=DOM.find(root,'div.well_content').childNodes;this.currentTab=0;}
ProfileWellDisplay.prototype.onselect=bagofholding;ProfileWellDisplay.prototype.selectTab=function(tab,event){if(this.currentTab!=tab){var result=this.onselect(this.currentTab=tab,$E(event));if(result!=false){for(var i=0;i<this.tabs.length;i++){CSS[i==tab?'addClass':'removeClass'](this.tabs[i],'selected');(i==tab?show:hide)(this.tabContent[i]);}}}
return false;}
function ProfileComposerFeedcrawl(app_id,root){this.parent.construct(this,app_id,root);this.publishButton.onclick=function(){return false;};};ProfileComposerFeedcrawl.extend('ProfileComposer');

function FeedWall(id,viewer,root,pagerInfo,tabsetId){if(!root){return;}
this.wall=root;this.id=id;this.viewer=viewer;FeedWall.instance=this;onunloadRegister(function(){FeedWall.instance=null;});this.storiesData={};this.rebuildFeedWallPosts();this.maxTime=null;this.currentFilter=null;this.pagerExtended=false;this.tabsetId=tabsetId;this.pagerPrev=$(pagerInfo['pager_prev']);this.pagerNext=$(pagerInfo['pager_next']);DOM.find(this.pagerPrev,'a').listen('click',this.navigatePage.bind(this,-1));;DOM.find(this.pagerNext,'a').listen('click',this.navigatePage.bind(this,1));FeedWall.initializeFilterStoryTypes();}
FeedWall.initializeFilterStoryTypes=function(){FeedWall.filterStoryTypes={all_posts:[],posts_by_owner:[FeedWall.MINISTORY_CHANGE_RELATIONSHIP_STATUS,FeedWall.MINISTORY_CREATE_GROUP,FeedWall.MINISTORY_CREATE_EVENT,FeedWall.MINISTORY_CREATE_PHOTO_ALBUM,FeedWall.MINISTORY_ADD_PHOTOS,FeedWall.MINISTORY_CREATE_NOTE,FeedWall.MINISTORY_NOTE_ADD_POST,FeedWall.MINISTORY_SHARE_SAVE,FeedWall.MINISTORY_CHANGE_STATUS,FeedWall.MINISTORY_ADD_VIDEO,FeedWall.MINISTORY_PHOTO_COMMENT,FeedWall.MINISTORY_FAN_FBPAGE,FeedWall.MINISTORY_PLATFORM_APP_USER_ACTION,FeedWall.MINISTORY_COMPOSER_PHOTO,FeedWall.MINISTORY_WALL_POST_INCOMING],posts_by_others:[FeedWall.MINISTORY_SHARE_SAVE,FeedWall.MINISTORY_TAGGED_IN_PHOTOS,FeedWall.MINISTORY_ADD_VIDEO,FeedWall.MINISTORY_PLATFORM_APP_USER_ACTION,FeedWall.MINISTORY_COMPOSER_PHOTO,FeedWall.MINISTORY_WALL_POST_INCOMING]};}
FeedWall.animationDuration=300;FeedWall.isWallPost=function(storyType){return storyType==FeedWall.MINISTORY_WALL_POST_INCOMING;}
FeedWall.isBlockableAppStory=function(storyType){switch(storyType){case FeedWall.MINISTORY_PLATFORM_APP:case FeedWall.MINISTORY_PLATFORM_APP_TEMPLATIZED:return true;default:return false;}}
FeedWall.getInstance=function(){return FeedWall.instance;}
FeedWall.prototype.rebuildFeedWallPosts=function(){this.posts=[];for(var i=0;i<this.wall.childNodes.length;++i){if(CSS.hasClass(this.wall.childNodes[i],'hidden_app_stories')){var hidden_stories=this.wall.childNodes[i];for(var j=0;j<hidden_stories.childNodes.length;++j){if(CSS.hasClass(hidden_stories.childNodes[j],'story')){this.posts.push(new FeedWallPost(this,hidden_stories.childNodes[j]));}}}
if(CSS.hasClass(this.wall.childNodes[i],'story')){this.posts.push(new FeedWallPost(this,this.wall.childNodes[i]));}}}
FeedWall.prototype.findHiddenPosts=function(story_type,app_id,story_date){var hiddenPosts=[];for(var i=0;i<this.posts.length;i++){if(this.posts[i].isSecondary){var post=this.posts[i];if(post.story_type==story_type&&post.app_id==app_id&&post.story_date==story_date){hiddenPosts.push(post);}}}
return hiddenPosts;}
FeedWall.prototype.removeChildren=function(primary,secondaries){secondaries.forEach(function(p){this.removeChild(p,true);},this);this.removeChild(primary,false);}
FeedWall.prototype.removeChild=function(post,immediate){var i=this.posts.indexOf(post);this.posts=this.posts.filter(function(a){return a.obj!=post.story_obj});var nextDate=null;var removeBorder=false;var postRightBelowDivider=post.story_obj.previousSibling&&CSS.hasClass(post.story_obj.previousSibling,'date_divider');if(postRightBelowDivider||(i>0&&this.posts[i-1]&&this.posts[i-1].fromFriend)){if(post.story_obj.nextSibling&&CSS.hasClass(post.story_obj.nextSibling,'border')){CSS.removeClass(post.story_obj.nextSibling,'border');CSS.addClass(post.story_obj.nextSibling,'no_border');}}
if(postRightBelowDivider){if(!post.story_obj.nextSibling||CSS.hasClass(nextDate=post.story_obj.nextSibling,'date_divider')){if(CSS.hasClass(post.story_obj.previousSibling,'first')){CSS.addClass(nextDate,'first');}
post.story_obj.parentNode.removeChild(post.story_obj.previousSibling);}}
if(immediate){this.wall.removeChild(post.story_obj);}else{post.story_obj.style.overflow='hidden';animation(post.story_obj).to('height',0).duration(FeedWall.animationDuration).ondone(function(){this.wall.removeChild(post.story_obj);}.bind(this)).go();}}
FeedWall.prototype.insertBefore=function(post,caret,immediate,dividerToInsertBefore){var i=this.posts.indexOf(caret);this.posts.splice(i,0,post);var tabset=Tabset.getInstance(this.tabsetId);var singleStory=tabset.hasTabElem('single_story');if(singleStory&&!CSS.hasClass(singleStory,'hidden_elem')){return;}
if(this.currentFilter&&FeedWall.filterStoryTypes[this.currentFilter].length&&FeedWall.filterStoryTypes[this.currentFilter].indexOf(post.story_type)==-1){return;}
if(dividerToInsertBefore){this.wall.insertBefore(post.story_obj,dividerToInsertBefore);}else{this.wall.insertBefore(post.story_obj,caret.story_obj);if(!caret.fromFriend&&!post.fromFriend){CSS.addClass(caret.story_obj,'border');CSS.removeClass(caret.story_obj,'no_border');}}
if(!immediate){animation(post.story_obj).to('height','auto').from(0).duration(FeedWall.animationDuration).go();}}
FeedWall.prototype.firstChild=function(){return this.posts[0];}
FeedWall.prototype.regenerateStories=function(auto_scroll){if(this.waitingForAjax){return;}
var filterStoryTypes;if(!this.currentFilter){filterStoryTypes=[];}else{filterStoryTypes=FeedWall.filterStoryTypes[this.currentFilter];}
this.waitingForAjax=true;CSS.addClass(this.pagerNext,'page_loading');CSS.addClass(this.pagerPrev,'page_loading');new AsyncRequest().setURI('/ajax/profile/minifeed.php').setData({action:'stories',id:this.id,viewas:this.viewer,max_time:this.maxTime,filter_type:this.currentFilter,filter_story_types:filterStoryTypes,extended:this.pagerExtended}).setContextData('clicktype','Filter Stories or Pagination',this.viewer!=this.id).setHandler(function(response){var payload=response.getPayload();if(auto_scroll){var scroll=Vector2.getScrollPosition();var pivots=[];var oldest_story_key=null;if(this.posts.length){pivots=[this.posts[0],this.posts[this.posts.length-1]].map(function(a){return{key:a.story_key,scrollTop:elementY(a.story_obj)-scroll.y};});}
oldest_story_key=pivots[1].key;}
set_inner_html(this.wall,payload.html);this.rebuildFeedWallPosts();(payload.next?show:hide)(this.pagerNext);(payload.prev?show:hide)(this.pagerPrev);if(auto_scroll){var fixed=false;scroll=Vector2.getScrollPosition();this.posts.each(function(a){pivots.each(function(b){if(!fixed&&a.story_key==b.key){fixed=true;scroll.y-=b.scrollTop-(elementY(a.story_obj)-scroll.y);DOMScroll.scrollTo(scroll);}});});}
if(oldest_story_key&&this.posts.length>0&&this.posts[this.posts.length-1].story_key==oldest_story_key){hide(this.pagerNext);}}.bind(this)).setFinallyHandler(function(){this.waitingForAjax=false;CSS.removeClass(this.pagerPrev,'page_loading');CSS.removeClass(this.pagerNext,'page_loading');}.bind(this)).setStatusElement().send();}
FeedWall.prototype.initSettingsView=function(){Tabset.getInstance(this.tabsetId).selectTab(this.tabsetId+'_settings',this.selectSettings.bind(this));}
FeedWall.prototype.selectControl=function(control){if((this.currentFilter==control)||this.waitingForAjax){return false;}
if(control=='all_posts'){var tabset=Tabset.getInstance(this.tabsetId);var singleStory=tabset.getTabElem('single_story');if(singleStory&&!CSS.hasClass(singleStory,'hidden_elem')){CSS.addClass(singleStory,'hidden_elem');var tabs=['posts_by_owner','posts_by_others','settings'];for(var i=0;i<tabs.length;++i){var tab=tabset.getTabElem(tabs[i]);if(tab){CSS.removeClass(tab,'hidden_elem');}}}}
this.currentFilter=control;return true;}
FeedWall.prototype.selectFilter=function(filter){if(FeedWall.filterStoryTypes[filter].length){to_remove=new Array();for(var i=0;i<this.posts.length;i++){if(FeedWall.filterStoryTypes[filter].indexOf(this.posts[i].story_type)==-1){to_remove.push(this.posts[i]);}}
for(var i=0;i<to_remove.length;i++){this.removeChild(to_remove[i],true);}}
var placeholder=document.createElement('div');placeholder.className='loading_placeholder';this.wall.appendChild(placeholder);this.regenerateStories(false);hide('profile_settings');show('profile_minifeed');this.currentFilter=filter;return false;}
FeedWall.prototype.selectSettings=function(){show('profile_settings');hide('profile_minifeed');hide(this.pagerPrev);hide(this.pagerNext);return false;}
FeedWall.prototype.navigatePage=function(direction){if(!this.pagerExtended){this.pagerExtended=true;this.regenerateStories(true);}else if(direction>0){this.maxTime=this.posts[Math.floor(this.posts.length*0.80)].story_time-1;this.regenerateStories(true);}else if(direction<0){this.maxTime=-this.posts[Math.floor(this.posts.length*0.20)].story_time+1;this.regenerateStories(true);}
return false;}
FeedWall.prototype.saveComments=function(){var data={'friend_mf_comments':1,'value':$('profile_settings_comments').checked?1:0};this._saveSettings(data);}
FeedWall.prototype.saveExpandComments=function(){var data={'wall_expand_comments':1,'value':$('profile_settings_expand_comments').checked?1:0};this._saveSettings(data);}
FeedWall.prototype.saveCombinedPosts=function(){var data={'combined_posts':1,'value':$('profile_settings_grouping_combined').checked?1:0};this._saveSettings(data);}
FeedWall.prototype.saveFriendsWall=function(){var checked=$('profile_settings_friends_wall').checked?1:0;var data={'friends_write_wall':1,'value':checked};var handler=function(){var privacy_divs=$$('#profile_settings div.privacy');var privacy_div=privacy_divs[0];if(checked){show(privacy_div);}else{hide(privacy_div);}};this._saveSettings(data,handler);}
FeedWall.prototype.savePrivacy=function(privacy_data){this._saveSettings(privacy_data);}
FeedWall.prototype._saveSettings=function(data,callback){var handler=callback||bagofholding;CSS.removeClass('profile_settings_bar_loading','invisible_elem');new AsyncRequest().setData(data).setURI('/ajax/profile/settings.php').setHandler(handler).setFinallyHandler(function(){setTimeout(CSS.addClass.bind(CSS,'profile_settings_bar_loading','invisible_elem'),500);}).send();}
FeedWall.prototype.setStoryDatum=function(story_key,key,value){if(!this.storiesData[story_key]){this.storiesData[story_key]={};}
this.storiesData[story_key][key]=value;}
FeedWall.prototype.getStoryDatum=function(story_key,key){if(!this.storiesData[story_key]){return null;}
return this.storiesData[story_key][key];}
function FeedWallPost(feedwall,obj){this.feedwall=feedwall;this.obj=obj;this.fromFriend=false;this.isPrimary=CSS.hasClass(obj,'aggregate_primary');this.isSecondary=CSS.hasClass(obj,'aggregate_secondary');if(this.isPrimary){var showMoreLink=DOM.find(obj,'a.show_hidden_stories_link');showMoreLink.listen('click',this.exposeHiddenStories.bind(this));}
var storyOptionsArr=DOM.scry(obj,'div.story_options');if(storyOptionsArr.length){var storyOptions=storyOptionsArr[0];this.storyOptions=storyOptions;for(var j=0;j<storyOptions.childNodes.length;++j){if(CSS.hasClass(storyOptions.childNodes[j],'story_options_content')){for(var k=0;k<storyOptions.childNodes[j].childNodes.length;++k){var cur=$(storyOptions.childNodes[j].childNodes[k]);if(CSS.hasClass(cur,'story_hide')){cur.listen('click',this.removeStory.bind(this));}else if(CSS.hasClass(cur,'story_change_size')){cur.listen('click',this.changeSize.bind(this,cur.getAttribute('fbsize')));}else if(CSS.hasClass(cur,'story_privacy')){cur.listen('click',this.editPrivacy.bind(this));}}
break;}}
var storyOptionsContent=DOM.scry(obj,'div.story_options_content')[0];if(storyOptionsContent){storyOptionsContent.parentNode.removeChild(storyOptionsContent);storyOptionsContent.style.display='block';this.edit_menu=flyout_menu(storyOptions).setMarkupContent(storyOptions.id,'flyout_menu_18 link_menu feedwall_menu',_tx("Story Options"),storyOptionsContent).setPosition(dropmenu.ALIGN_RIGHT).addHook('show',function(storyOptions){CSS.addClass(storyOptions,'selected');}.bind(null,storyOptions)).addHook('hide',function(storyOptions){CSS.removeClass(storyOptions,'selected');}.bind(null,storyOptions));}}
for(var i=0;i<obj.childNodes.length;++i){if(CSS.hasClass(obj.childNodes[i],'size_2')||CSS.hasClass(obj.childNodes[i],'medium')){this.size=FeedWallPost.SIZE_MEDIUM;}else if(CSS.hasClass(obj.childNodes[i],'size_4')){this.size=FeedWallPost.SIZE_LARGE;}else if(CSS.hasClass(obj.childNodes[i],'size_1')){this.size=FeedWallPost.SIZE_SMALL;}
if(CSS.hasClass(obj.childNodes[i],'from_friend_story')){this.fromFriend=true;}}
obj.onmouseover=function(){CSS.addClass(this,'hover');};obj.onmouseout=function(){CSS.removeClass(this,'hover');};var info=/minifeed(_wall)?_([0-9]*)/.exec(obj.id);this.wall=!!info[1];this.story_type=parseInt((/story_type_([0-9]+)/.exec(obj.className)||[]).pop(),10);this.story_key=info[2];this.story_time=parseInt(obj.getAttribute('time'),10);this.story_obj=obj;if(this.isPrimary||this.isSecondary){var agg_info=/agg_story_shell_([0-9]+)_([0-9_]+)/.exec(obj.className);this.app_id=agg_info[1];this.story_date=agg_info[2];}}
FeedWallPost.prototype.exposeHiddenStories=function(){var key=this.app_id+'_'+this.story_date;var feedWall=FeedWall.getInstance();var storyDivs=DOM.scry(feedWall.wall,'div.agg_story_shell_'+key);storyDivs.forEach(function(storyDiv){CSS.removeClass(storyDiv,'aggregate_primary');CSS.removeClass(storyDiv,'aggregate_secondary');CSS.addClass(storyDiv,'aggregate_none');});DOM.remove('show_hidden_stories_span_'+key);feedWall.rebuildFeedWallPosts();return false;}
FeedWallPost.prototype.removeStory=function(){var show_confirm_dialog=FeedWall.isBlockableAppStory(this.story_type)&&this.size==FeedWallPost.SIZE_SMALL&&!this.getDatum('never_publish');var data={'ministory_key':this.story_key,'profile_fbid':this.feedwall.id,'story_type':this.story_type};var hiddenStoryPosts=[];if(this.isPrimary){hiddenStoryPosts=this.feedwall.findHiddenPosts(this.story_type,this.app_id,this.story_date);var hiddenStoryKeys=hiddenStoryPosts.map(function(p){return p.story_key;});data['extra_hide_story_keys']=hiddenStoryKeys.join(':');}
if(!show_confirm_dialog){new AsyncRequest().setURI('/ajax/minifeed.php').setData(data).setContextData('clicktype','Delete Wall Story').setHandler(this.feedwall.removeChildren.bind(this.feedwall,this,hiddenStoryPosts)).send()
return false;}
var minifeed_dialog_handle=new contextual_dialog();minifeed_dialog_handle.modal=true;minifeed_dialog_handle.set_context(this.storyOptions);CSS.addClass(this.obj,'hover');var checkbox_id='block_checkbox_'+this.story_key;var closeDialog=function(){CSS.removeClass(this.obj,'hover');minifeed_dialog_handle.hide(false);}.bind(this);var hideStory=function(){var block_stories=$(checkbox_id).checked;data['block_stories']=block_stories;new AsyncRequest().setURI('/ajax/minifeed.php').setData(data).setHandler(function(resp){closeDialog();this.feedwall.removeChild(this,false);if(block_stories){var story_app_id=this.getDatum('app_id');for(var i=0;i<this.feedwall.posts.length;++i){var post=this.feedwall.posts[i];var post_app_id=this.feedwall.getStoryDatum(post.story_key,'app_id');if(post_app_id&&post_app_id==story_app_id){post.setDatum('never_publish',true);}}}}.bind(this)).send();}.bind(this);var body=_tx("You will not be able to undo this.")
+'<br />'
+sprintf('<input type="checkbox" name="%s" id="%s" /> ',htmlize(checkbox_id),htmlize(checkbox_id))
+_tx("Never allow this application to publish to my profile.");minifeed_dialog_handle.show_choice(_tx("Are you sure you want to delete this story?"),body,_tx("Delete Story"),hideStory,_tx("Cancel"),closeDialog);return false;}
FeedWallPost.SIZE_SMALL=1;FeedWallPost.SIZE_MEDIUM=2;FeedWallPost.SIZE_LARGE=4;FeedWallPost.prototype.changeSize=function(size){if(size==this.size){this.edit_menu.toggle();return;}
var loading=document.createElement('div');loading.className='loading_layer';loading.style.height=this.story_obj.offsetHeight+'px';loading.style.width=this.story_obj.offsetWidth+'px';this.story_obj.insertBefore(loading,this.story_obj.firstChild);var is_primary=this.story_obj.hasClass('aggregate_primary');var hidden_stories=this.feedwall.findHiddenPosts(this.story_type,this.app_id,this.story_date);new AsyncRequest().setURI('/ajax/profile/composer.php').setData({action:'resize',id:this.feedwall.id,key:this.story_key,size:size,is_primary:is_primary,num_hidden:hidden_stories.length}).setHandler(function(response){var div=document.createElement('div');set_inner_html(div,response.getPayload());this.edit_menu.destroy();var newFeedPost=new FeedWallPost(this.feedwall,div.firstChild);this.feedwall.insertBefore(newFeedPost,this);if(CSS.hasClass(this.story_obj,'border')){CSS.removeClass(newFeedPost.story_obj,'no_border');CSS.addClass(newFeedPost.story_obj,'border');}
this.feedwall.removeChild(this);}.bind(this)).send();return false;}
FeedWallPost.prototype.editPrivacy=function(){new AsyncRequest().setURI('/ajax/minifeed/fetch_privacy_markup.php').setMethod('GET').setReadOnly(true).setData({profile_id:this.feedwall.id,story_key:this.story_key}).setHandler(function(response){var payload=response.getPayload();new Dialog().setTitle(_tx("Who can see this?")).setBody(payload['widget_markup']).setButtons([Dialog.SAVE,Dialog.CANCEL]).setStackable(true).setModal(true).setContentWidth(260).setHandler(this.savePrivacy.bind(this,payload.form_id)).show();}.bind(this)).send();return false;}
FeedWallPost.prototype.savePrivacy=function(form_id){var form_elem=$(form_id);var form_data=serialize_form(form_elem);new AsyncRequest().setURI('/ajax/minifeed/save_privacy.php').setData(form_data).setHandler(bagofholding).send();}
FeedWallPost.prototype.getDatum=function(key){return this.feedwall.getStoryDatum(this.story_key,key);}
FeedWallPost.prototype.setDatum=function(key,value){this.feedwall.setStoryDatum(this.story_key,key,value);}

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