/*    HTTP Host:  b.static.ak.fbcdn.net                                        */
/*    Generated:  February 9th 2010 1:34:07 PM PST                             */
/*      Machine:  10.16.139.103                                                */
/*       Source:  Backing Store                                                */
/*     Location:  js/6yw1kmf3f74sk80s.pkg.js h:cl9ntx93                        */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/6yw1kmf3f74sk80s.pkg.js                                   */

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

function custom_source(_L0){this.parent.construct(this);if(_L0.length&&typeof(_L0[0])=="string")for(var ii=0;ii<_L0.length;ii++)_L0[ii]={t:_L0[ii],i:_L0[ii]};this.values=_L0;this.build_index();}custom_source.extend('static_source');custom_source.prototype.text_placeholder=custom_source.prototype.text_noinput=false;custom_source.prototype.gen_html=function(_L0,_L1){var _L2=['<div>',typeahead_source.highlight_found(_L0.t,_L1),'</div>'];if(_L0.s)_L2.push('<div><small>',htmlspecialchars(_L0.s),'</small></div>');return _L2.join('');};
function toggle_app_data(_L0,_L1){var _L2=ge(_L0);if(!_L2)return;var _L3=ge(_L1);if(!_L3)return;var _L4=$('dev_app_list').childNodes[0];if(!_L4)return;var _L5=ge('dev_app_infos');if(!_L5)return;var _L6=_L4.childNodes;for(var i=0;i<_L6.length;i++)if(CSS.hasClass(_L6[i],'flag_nav_item_selected')){CSS.removeClass(_L6[i],'flag_nav_item_selected');break;}var _L6=_L5.childNodes;for(var i=0;i<_L6.length;i++)if(CSS.hasClass(_L6[i],'app_show')){CSS.removeClass(_L6[i],'app_show');CSS.addClass(_L6[i],'app_hide');break;}CSS.addClass(_L2,'flag_nav_item_selected');CSS.removeClass(_L3,'app_hide');CSS.addClass(_L3,'app_show');}function app_source(_L0){var _L1=JSON.decode(_L0);if(_L1.searchable_apps){if(_L1.added_apps)this.added_apps=_L1.added_apps;_L1=_L1.searchable_apps;}this.parent.construct(this,_L1);}app_source.extend('custom_source');app_source.prototype.text_noinput='Enter an application name.';app_source.prototype.text_placeholder='Enter an application name.';app_source.prototype.gen_html=function(_L0,_L1){var _L2=_L0.it;var _L3=[];return ['<div class="app_option"><div class="icon" style="background-image: url(',_L2,')">&nbsp;</div>','<span>',typeahead_source.highlight_found(_L0.t,_L1),'</span></div>'].join('');};app_source.prototype.gen_nomatch=function(){if(!this.added_apps)return this.parent.gen_nomatch();var _L0=typeahead_source.tokenize(this.owner.get_value());var _L1=[];for(var ii=0;ii<this.added_apps.length;ii++)if(typeahead_source.check_match(_L0,this.added_apps[ii]))_L1.push(this.added_apps[ii]);if(_L1.length==0){return _tx("No application found. Please note that not all applications support tabs.");}else if(_L1.length==1){return _tx("No application found. Please note that {app-name} has already been added, and not all applications support tabs.",{"app-name":_L1[0]});}else if(_L1.length==2){return _tx("No application found. Please note that {app-name-1} and {app-name-2} have already been added, and not all applications support tabs.",{"app-name-1":_L1[0],"app-name-2":_L1[1]});}else return _tx("No application found. Please note that applications including {app-name-1} and {app-name-2} have already been added, and not all applications support tabs.",{"app-name-1":_L1[0],"app-name-2":_L1[1]});};
function removeSection(_L0,i){hide(_L0+'_'+i);$(_L0+'_'+i+'_remove').value='true';$('num_'+_L0+'_entries').value--;$(_L0+'add_link').style.display='block';var _L2=ge(_L0+'last_divider');if(_L2)_L2.style.display='';}function addSection(_L0,_L1){var num=parseInt($('num_'+_L0+'_entries').value);show(_L0+'_'+(num+1));$('num_'+_L0+'_entries').value=num+1;if(num+1>=_L1){$(_L0+'add_link').style.display='none';var _L3=ge(_L0+'last_divider');if(_L3)_L3.style.display='none';}}function schoolChangeStatus(el,_L1){el=ge(el);var _L2=el.options[el.selectedIndex].value;concentrate_name=_L1+'_concentration';concentrate_adder=_L1+'_concentration_adder';concentrate_degree=_L1+'_degree';concentrate_value_count=_L1+'_concentration_value_count';switch(_L2){case '3':case '1':case '2':showTableRow(getParentRow(concentrate_name+'1'));if($(concentrate_value_count).value>=2){showTableRow(getParentRow(concentrate_name+'2'));}else hide(getParentRow(concentrate_name+'2'));if($(concentrate_value_count).value>=3){showTableRow(getParentRow(concentrate_name+'3'));}else{hide(getParentRow(concentrate_name+'3'));showTableRow(getParentRow(concentrate_adder));}hide(getParentRow(concentrate_degree));$(concentrate_degree).value='';if(_L2=='2')showTableRow(getParentRow(concentrate_degree));break;default:hide(getParentRow(concentrate_degree));break;}}function addConcentration(_L0){concentrate_adder=_L0+'_adder';concentrate_value_count=_L0+'_value_count';if($(concentrate_value_count).value==2){$(concentrate_value_count).value=3;showTableRow(getParentRow(_L0+'3_name'));hide(getParentRow(concentrate_adder));}else{$(concentrate_value_count).value=2;showTableRow(getParentRow(_L0+'2_name'));}}function education_autocomplete_onselect(obj){var _L1=function(){var _L4=new concentration_source(this.network);_L4.text_placeholder=_tx("Type your subject of study");_L4.text_nomatch=_L4.text_noinput=false;var ta=new typeaheadpro(this,_L4);};$(this.custom_prefix+'_school_nk').value=obj?obj.i:-1;for(var i=1;i<=3;i++){var _L3=ge(this.custom_prefix+'_concentration'+i+'_name');if(_L3){typeaheadpro.kill_typeahead(_L3);if(obj){_L3.network=obj.i;_L3.onfocus=_L1.bind(_L3);}else{CSS.setClass(_L3,_L3.className.replace(/typeahead_[^\s]+/g,''));_L3.onfocus=null;}}}return false;}function education_autocomplete_onfound(_L0){if(!_L0)$(this.custom_prefix+'_school_nk').value=-1;}function workplace_autocomplete_onselect(obj){$(this.custom_prefix+'_company_nk').value=obj?obj.i:-1;return false;}function workplace_autocomplete_onfound(_L0){if(!_L0)$(this.custom_prefix+'_company_nk').value=-1;}function checkNameLegit(){if($('i_swear').checked){$('name_change_form').submit();}else $('error').style.display='';}function on_work_history_city_selected(){}function education_remove_school(_L0,i){var _L2=new Dialog().setTitle(_tx("Remove this school\/university?")).setBody(_tx("Are you sure you want to remove this school\/university? You will lose all the data currently stored about it.")).setButtons([Dialog.newButton('remove',_tx("Remove")),Dialog.CANCEL]).setHandler(function(){removeSection(_L0,i);_L2.hide();}).show();return false;}function workhistory_remove_entry(i){var _L1=new Dialog().setTitle(_tx("Remove this job?")).setBody(_tx("Are you sure you want to remove this job? You will lose all the data currently stored.")).setButtons([Dialog.newButton('remove',_tx("Remove")),Dialog.CANCEL]).setHandler(function(){removeSection('work_history',i);_L1.hide();}).show();return false;}function FamilyInfoController(_L0,_L1,_L2,_L3){this.root=$(_L0);this.new_family_field_markup=_L1;this.typeahead_param=_L2;this.cur_index=_L3;this.addNewLink=$('add_more_family');this.only_node=null;var _L4=DOM.scry(this.root,'div.family_member');if(_L4.length==1)this.only_node=_L4[0];for(var i=0;i<_L4.length;i++)this.setUpHandlers(_L4[i]);this.checkHideAddNewLink();Event.listen(this.addNewLink,'click',this.addFamilyField.bind(this));}FamilyInfoController.CHILD_CONSTANTS={'104':1,'105':1};FamilyInfoController.MAX_FIELDS=100;FamilyInfoController.prototype.setUpHandlers=function(_L0){var _L1=DOM.find(_L0,'select.family_member_selector');var _L2=DOM.scry(_L0,'input[type="hidden"]')[0];var _L3=DOM.find(_L0,'input[type="text"].name_typeahead');var _L4=DOM.scry(_L0,'a.remove_link')[0];var _L5=_L2.value;var _L6=get_form_select_value(_L1);var _L7=_L3.value;var _L8=this.typeahead_param;var _L9=DOM.find(_L0,'input[type="text"].email_input');Event.listen(_L3,'focus',function(){var _La=new friend_source(_L8);_La.text_nomatch='';_La.text_noinput='';_La.text_placeholder=_tx("Enter name");new typeaheadpro(this,_La,{max_results:5,onselect:FamilyInfoController.familyIdSelect,auto_select:false,_node:_L0,_select:_L1,_original_id:_L5,_original_relation:_L6,_hidden_input:_L2,_email_elem:_L9});});Event.listen(_L1,'change',function(){this.checkShowTextData(_L0,_L1,_L2,_L3);var _La=get_form_select_value(_L1);if(_L2.value&&_La!=0&&_La!=_L6){FamilyInfoController.constructNotifMessage(_L0,_L2,_L3.value,_L3,_L9);}else FamilyInfoController.removeNotifMessage(_L0);}.bind(this));Event.listen(_L3,'blur',function(){setTimeout(function(){if(!CSS.hasClass(_L3,'typeahead_found')&&_L7!=_L3.value){_L2.value='';FamilyInfoController.removeNotifMessage(_L0);}this.checkShowTextData(_L0,_L1,_L2,_L3);}.bind(this),5);}.bind(this));if(_L4)Event.listen(_L4,'click',function(){_L2.value='';_L3.value='';_L1.selectedIndex=0;if(!CSS.hasClass(_L0,'family_member_first')){CSS.addClass(_L0,'hidden_elem');}else CSS.addClass(_L4,'hidden_elem');return false;}.bind(this));};FamilyInfoController.prototype.checkShowTextData=function(_L0,_L1,_L2,_L3){var _L4=((_L2.value=='')&&_L3.value);var _L5=FamilyInfoController.CHILD_CONSTANTS[get_form_select_value(_L1)];var _L6=(_L4&&!_L5);if(_L6){var _L7=DOM.find(_L0,'div.email_explanation');DOM.setContent(_L7,HTML(_tx("Enter an email address for <b>{name}<\/b>. {name} will receive an invitation to become your friend on Facebook and confirm your Family Request.",{'name':htmlize(_L3.value)})));}CSS.conditionClass(_L0,'with_child_metadata',(_L4&&_L5));CSS.conditionClass(_L0,'with_email',_L6);};FamilyInfoController.prototype.addFamilyField=function(){var _L0=HTML(this.new_family_field_markup).getRootNode();this.root.appendContent(_L0);this.setUpHandlers(_L0);if(this.only_node){CSS.removeClass(this.only_node,'family_member_only');this.only_node=null;}this.new_family_field_markup=this.new_family_field_markup.replace(new RegExp('\\['+this.cur_index+'\\]','g'),'['+(this.cur_index+1)+']');this.cur_index++;this.checkHideAddNewLink();};FamilyInfoController.prototype.checkHideAddNewLink=function(){if(this.cur_index>=FamilyInfoController.MAX_FIELDS)CSS.addClass(this.addNewLink,'hidden_elem');};FamilyInfoController.familyIdSelect=function(_L0){if(_L0){if(_L0.i!=this._hidden_input.value){this._hidden_input.value=_L0.i;var _L1=get_form_select_value(this._select);if(_L1!=0&&((_L0.i!=this._original_id)||(_L1!=this._original_relation))){FamilyInfoController.constructNotifMessage(this._node,this._hidden_input,_L0.t,this.obj,this._email_elem);}else FamilyInfoController.removeNotifMessage(this._node);}CSS.removeClass(this._node,'with_child_metadata');CSS.removeClass(this._node,'with_email');this._email_elem.value='';}};FamilyInfoController.removeNotifMessage=function(_L0){var _L1=DOM.scry(_L0,'div.notif_message');if(_L1[0])DOM.remove(_L1[0]);};FamilyInfoController.constructNotifMessage=function(_L0,_L1,_L2,_L3,_L4){FamilyInfoController.removeNotifMessage(_L0);var _L5=$N('div',{className:'notif_message'});_L5.setContent(_tx("We will notify {name}, who must confirm that you are family before we can create a link from your Profile.",{'name':_L2}));var _L6=HTML('<span> (<a>'+_tx("Cancel")+'</a>)</span>').getRootNode();_L5.appendContent(_L6);Event.listen(_L5.find('a'),'click',function(){DOM.remove(_L5);_L1.value='';_L3.value='';_L4.value='';}.bind(this));DOM.appendContent(_L0,_L5);};
function ProfileBoxController(_L0,_L1,_L2,_L3){this.profileId=_L0;this.applications={};this.columns=_L3;this.tabId=_L2;var _L4=null;var obj;this.placeholderBox=document.createElement('div');CSS.setClass(this.placeholderBox,'box_placeholder');for(var i=0;i<_L1.length;i++)if(obj=ge('box_app_'+_L1[i])){_L4=obj.parentNode;var _L7={box:obj,id:_L1[i]};this.applications[_L7.id]=_L7;obj.addClass('moveable');(new Draggable(obj)).addHandle(obj.getElementsByTagName('h5')[0]).setNamespace('ProfileBoxController').setGutter(15).setUseAbsolute(true).setGrabHandler(function(_L8,obj){_L8.expandColumns();_L8.placeholderBox.style.height=obj.offsetHeight-6+'px';_L8.placeholderBox.style.width=obj.offsetWidth+'px';CSS.addClass(obj,'drag');obj.style.width=obj.offsetWidth+'px';obj.parentNode.insertBefore(_L8.placeholderBox,obj);obj.style.zIndex=100;}.bind(null,this,obj)).setDropHandler(function(_L8,obj){this.resetPosition();_L8.placeholderBox.parentNode.insertBefore(this.getDOM(),_L8.placeholderBox);_L8.placeholderBox.parentNode.removeChild(_L8.placeholderBox);_L8.resetColumns();_L8.saveChanges(obj);obj.style.width=null;obj.style.zIndex=null;}.bind(null,this,obj)).setKey('app_id',_L7.id);(new Droppable(obj)).setNamespace('ProfileBoxController').setZIndex(1).setDragMoveHandler(function(_L8,_L9,_La,_Lb){if(_La.getDOM().offsetHeight>=_Lb.y){var _Lc=ProfileBoxController.insertElement(_L8.placeholderBox,this.getDOM());_L8.placeholderBox.style.width=this.getDOM().offsetWidth+'px';}}.bind(null,this,_L7.id));}if(this.columns.length>1)for(var i=0;i<this.columns.length;i++)(new Droppable(this.columns[i].dom)).setNamespace('ProfileBoxController').setZIndex(0).setDragOverHandler(function(_L8,_L9,_La){if(_L8.placeholderBox.parentNode!=_L9){_L8.placeholderBox.style.width=_L9.offsetWidth+'px';_L9.appendChild(_L8.placeholderBox,this.getDOM());}}.bind(null,this,this.columns[i].dom));}ProfileBoxController.insertElement=function(_L0,_L1){var _L2=true,_L3=_L1.parentNode.childNodes;for(var i=0;i<_L3.length;i++)if(_L3[i]==_L1){break;}else if(_L3[i]==_L0){_L2=false;break;}if(_L2){_L1.parentNode.insertBefore(_L0,_L1);}else _L1.parentNode.insertBefore(_L1,_L0);return _L2;};ProfileBoxController.prototype.getAppFromId=function(id){return (/box_app_([0-9]+)/.exec(id)||[]).pop();};ProfileBoxController.prototype.getOrderFromDOM=function(){var _L0=[];this.columns.each(function(_L1){var _L2={column:_L1.column,order:[]};var _L3;var _L4=DOM.scry(_L1.dom,'div.box');for(var i=0;i<_L4.length;i++)if(_L4[i].id&&(_L3=this.getAppFromId(_L4[i].id)))_L2.order.push(parseInt(_L3,10));_L0.push(_L2);}.bind(this));return _L0;};ProfileBoxController.prototype.saveChanges=function(obj){var _L1=this.getAppFromId(obj.id);var _L2=DOM.find(obj,'div.app_custom_content');_L2.style.visibility='hidden';CSS.addClass(obj,'loading');new AsyncRequest().setURI('/ajax/profile/box.php').setData({action:'reorder',tab_id:this.tabId,order:this.getOrderFromDOM(),profile_id:this.profileId,app_id:_L1}).setHandler(function(_L3){DOM.replace(_L2,HTML(_L3.getPayload().box));CSS.removeClass(obj,'drag');CSS.removeClass(obj,'loading');}).send();};ProfileBoxController.prototype.expandColumns=function(){if(this.columns<2)return;var max=null;this.resetColumns();this.columns.each(function(_L1){max=Math.max(_L1.dom.offsetHeight,max);});this.columns.each(function(_L1){if(_L1.dom.offsetHeight!=max)_L1.dom.style.height=max+'px';});};ProfileBoxController.prototype.resetColumns=function(){this.columns.each(function(_L0){_L0.dom.style.height=null;});};var KEY_VAL=1;var VERTICAL_THUMBS=5;var EDIT_APP_THUMBS=6;var EDIT_REMOVE_APP_SECTION=7;var NO_INLINE_EDITOR={2361831622:1,2530096808:1};function ProfileInfoEdit(_L0,_L1,_L2){this.section_objs={};this.remember_edited=_L2;for(var i in _L1){var _L4=_L1[i];if(_L4.app_id){if(!NO_INLINE_EDITOR[_L4.app_id]){this.section_objs[_L4.section]=new ProfileInfoAppEditSection(_L4,this);ProfileInfoEdit.editors[_L4.section]=this.section_objs[_L4.section];}}else this.section_objs[_L4.section]=new ProfileInfoEditSection(_L4,this);}this.profile_id=_L0;this.info_tab=$('info_tab');this.info_sections=$('info_edit_sections');this.edit_all=$('info_edit_all');this.done_editing_all=$('info_done_editing_all');this.edit_all.onclick=this.onEditAll.bind(this,true);this.done_editing_all.onclick=this.onDoneEditingAll.bind(this);}ProfileInfoEdit.editors={};ProfileInfoEdit.uri='/ajax/profile/editinfo.php';ProfileInfoEdit.prototype.onEditAll=function(_L0){this.edit_all_mode=true;for(var i in this.section_objs){var _L2=this.section_objs[i];if(_L2.canEdit()){_L2.has_editor=false;_L2.closeEditor();}}CSS.addClass(this.info_tab,'edit_all_mode');var _L3=true;for(var i in this.section_objs){var _L2=this.section_objs[i];if(!_L2.canEdit())continue;_L2.getHeaderElem().onclick=this.editAllSetActiveSection.bind(this,_L2);if(_L3){_L2.populateEditor();_L2.openEditor(false);CSS.addClass(_L2.getSectionElem(),'edit_mode');if(_L0)ProfileInfoEdit.scrollToSection($('info_edits_div'));}_L3=false;}return false;};ProfileInfoEdit.prototype.editAllSetActiveSectionNext=function(_L0){var _L1=false;for(var i in this.section_objs){var _L3=this.section_objs[i];if(!_L3.canEdit())continue;if(_L1){if(!_L3.is_open&&!_L3.has_editor){CSS.addClass(_L3.getSectionElem(),'edit_mode');_L3.populateEditor();}_L3.toggleEditor(true);_L1=false;}else if(_L3.section!=_L0.section)_L3.closeEditor();if(_L3.section==_L0.section)_L1=true;}};ProfileInfoEdit.prototype.editAllSetActiveSection=function(_L0){for(var i in this.section_objs){var _L2=this.section_objs[i];if(!_L2.canEdit())continue;if(_L2.section==_L0.section){if(!_L2.is_open&&!_L2.has_editor){CSS.addClass(_L2.getSectionElem(),'edit_mode');_L2.populateEditor();}_L2.toggleEditor(true);}else _L2.closeEditor();}};ProfileInfoEdit.prototype.onDoneEditingAll=function(){for(var i in this.section_objs){var _L1=this.section_objs[i];if(_L1.canEdit()){var _L2=_L1.getSectionElem();_L1.cancelEditor();_L1.closeEditor();_L1.has_editor=false;CSS.removeClass(_L1.getSectionElem(),'edit_mode');_L1.getHeaderElem().onclick=null;}}if(this.remember_edited)new AsyncSignal('/ajax/nux_highlight.php',{action:"edit_info_tab"}).send();CSS.removeClass(this.info_tab,'edit_all_mode');this.edit_all_mode=false;return false;};ProfileInfoEdit.scrollToSection=function(_L0){animation(DOMScroll.getScrollRoot()).to('scrollTop',elementY(_L0)-40).ease(animation.ease.end).duration(400).go();};function ProfileInfoEditSectionBase(_L0,_L1){this.type=0;this.is_open=false;this.has_editor=false;this.app_id=0;this.controller=_L1;copy_properties(this,_L0);var _L2=_L0.section;copy_properties(this,{section_id:('info_section_'+_L2),header_id:('info_section_header_'+_L2),info_id:('info_section_info_'+_L2),editor_id:('info_section_editor_'+_L2),edit_id:('info_section_edit_'+_L2),edit_jaws_id:('info_section_edit_jaws_'+_L2),save_id:('info_section_save_'+_L2),cancel_id:('info_section_cancel_'+_L2)});var _L3=DOM.scry(this.getHeaderElem(),'a.close_edit');this.header_cancel_link=(_L3.length?_L3[0]:null);var _L4=this.getSectionElem();_L4.onmouseover=function(){CSS.addClass(this,'hover');};_L4.onmouseout=function(){CSS.removeClass(this,'hover');};}copy_properties(ProfileInfoEditSectionBase.prototype,{getSectionElem:function(){return $(this.section_id);},getHeaderElem:function(){return $(this.header_id);},getInfoElem:function(){return $(this.info_id);},getEditorElem:function(){return $(this.editor_id);},getEditElem:function(){return $(this.edit_id);},getEditJawsElem:function(){return $(this.edit_jaws_id);},getSaveElem:function(){return $(this.save_id);},getForm:function(){var _L0=this.getSaveElem();return _L0?_L0.form:null;},getCancelElem:function(){return $(this.cancel_id);},getAppId:function(){return this.app_id;},canEdit:function(){return true;}});ProfileInfoEditSectionBase.prototype.onClickEdit=function(){var _L0=this.getSectionElem();var _L1=this.getSectionElem();this.populateEditor();CSS.addClass(_L0,'edit_mode');CSS.removeClass(_L0,'empty');ProfileInfoEdit.scrollToSection(_L0);return false;};ProfileInfoEditSectionBase.prototype.populateEditor=function(){var _L0=this.getSectionElem();var _L1=this.getEditorElem();var _L2='<div class="fbloading"><span>'+_tx("Loading...")+'</span></div>';set_inner_html(_L1,_L2);var _L3={profile_id:this.controller.profile_id,section:this.section,type:6,app_id:this.getAppId(),edit_mode:true};new AsyncRequest().setURI(ProfileInfoEdit.uri).setReadOnly(true).setData(_L3).setHandler(this.replaceEditor.bind(this)).send();return false;};ProfileInfoEditSectionBase.prototype.replaceEditor=function(_L0){var _L1=this.getSectionElem();var _L2=this.getEditorElem();var _L3=_L0.getPayload();_L2.style.height='100px';DOM.setContent(_L2,HTML(_L3.editor));animation(_L2).to('height','auto').from('height','100px').duration(200).go();var _L4=this.getSaveElem();var _L5=this.getCancelElem();_L4.onclick=this.onSaveEditor.bind(this);_L5.onclick=this.onCancelEditor.bind(this);this.header_cancel_link&&(this.header_cancel_link.onclick=this.onCancelEditor.bind(this));this.has_editor=true;return false;};ProfileInfoEditSectionBase.prototype.onSaveEditor=function(){var _L0=this.getEditorElem();form=serialize_form(_L0);form['section']=this.section;if(this.app_id)form['app_id']=this.app_id;form['save']=1;var _L1='<div class="fbloading"><span>'+'Saving...'+'</span></div>';set_inner_html(_L0,_L1);new AsyncRequest().setURI(ProfileInfoEdit.uri).setData(form).setHandler(function(_L2){var _L3=_L2.getPayload();var _L4=this.getSectionElem();if(_L3.editor){this.replaceEditor(_L2);return false;}this.has_editor=false;if(_L3.display){CSS.removeClass(_L4,'empty');}else CSS.addClass(_L4,'empty');var _L5=this.getInfoElem();set_inner_html(_L5,_L3.display);if(this.controller.edit_all_mode){this.closeEditor(true);this.controller.editAllSetActiveSectionNext(this);}else{CSS.removeClass(_L4,'edit_mode');ProfileInfoEdit.scrollToSection(_L4);}if(_L3.basic_info_summary)profile_basic_info_summary_refresh(_L3.basic_info_summary);}.bind(this)).send();return false;};ProfileInfoEditSectionBase.prototype.onCancelEditor=function(){var _L0=this.getSectionElem();CSS.removeClass(_L0,'edit_mode');if(!this.controller.edit_all_mode){this.cancelEditor();}else{this.closeEditor(true);this.has_editor=false;}ProfileInfoEdit.scrollToSection(_L0);return false;};ProfileInfoEditSectionBase.prototype.cancelEditor=function(){var _L0=this.getSectionElem();var _L1=this.getForm();if(_L1)_L1.is_inactive=true;this.has_editor=false;return false;};ProfileInfoEditSectionBase.prototype.toggleEditor=function(_L0){var _L1=this.getSectionElem();if(!this.is_open){this.openEditor(_L0);}else this.closeEditor();};ProfileInfoEditSectionBase.prototype.warnIfUnsaved=function(){if(!this.is_open)return false;var _L0=this.getForm();if(_L0&&_L0.original_state&&!are_equal(_L0.original_state,serialize_form(_L0))){var _L1=this.getSaveElem();var _L2=[];var _L3=function(){_L1.click();this.closeEditor(true);};_L2.push({name:'save',label:_tx("Save"),handler:_L3.bind(this)});_L2.push({name:'dont_save',label:_tx("Don't Save"),className:'inputaux',handler:this.closeEditor.bind(this,true)});_L2.push(Dialog.CANCEL);new Dialog().setTitle(_tx("Unsaved Changes")).setBody(_tx("Some of your changes have not been saved. Would you like to save your changes now?")).setButtons(_L2).setModal().show();return true;}return false;};ProfileInfoEditSectionBase.prototype.closeEditor=function(_L0){if(!_L0)if(this.warnIfUnsaved())return null;var _L1=this.getSectionElem();var _L2;if(this.has_editor&&(_L2=this.getForm()))_L2.is_inactive=true;CSS.addClass(_L1,'shut');CSS.removeClass(_L1,'open');this.is_open=false;};ProfileInfoEditSectionBase.prototype.openEditor=function(_L0){var _L1=this.getSectionElem();var _L2=this.getForm();if(_L2)_L2.is_inactive=false;CSS.addClass(_L1,'open');CSS.removeClass(_L1,'shut');this.is_open=true;if(_L0)ProfileInfoEdit.scrollToSection(_L1);};function ProfileInfoEditSection(_L0,_L1){this.parent.construct(this,_L0,_L1);var _L2=[this.edit_id,this.edit_jaws_id];for(i in _L2){var _L3=ge(_L2[i]);if(_L3)_L3.onclick=this.onClickEdit.bind(this);}}ProfileInfoEditSection.extend('ProfileInfoEditSectionBase');function ProfileInfoAppEditSection(_L0,_L1){this.parent.construct(this,_L0,_L1);this.app_id=_L0.app_id;if(ge('flyout_menu_info_section_'+this.app_id)){var _L2=this.getEditElem();var _L3=DOM.scry($('flyout_menu_info_section_'+this.app_id),'a');_L3[0].onclick=this.onClickEdit.bind(this);_L3[1].onclick=this.deleteBox.bind(this);flyout_menu(_L2).registerHTMLMenu('flyout_menu_info_section_'+this.app_id).setPosition(dropmenu.ALIGN_RIGHT).addHook('show',function(){CSS.addClass(_L2,'selected');}.bind(this)).addHook('hide',function(){CSS.removeClass(_L2,'selected');}.bind(this));}this.items={};this.order={};this.on=true;}ProfileInfoAppEditSection.extend('ProfileInfoEditSectionBase');ProfileInfoAppEditSection.prototype.deleteBox=function(){var _L0=this.getSectionElem();var uri='/ajax/profile/editinfo.php';var _L2={profile_id:this.controller.profile_id,section:this.app_id,type:EDIT_REMOVE_APP_SECTION,app_id:this.app_id};new AsyncRequest().setURI(uri).setData(_L2).setHandler(function(_L3){var _L4=elementY(_L0);animation(_L0).to('height',0).blind().duration(200).hide().go();animation(DOMScroll.getScrollRoot()).to('scrollTop',_L4-150).ease(animation.ease.end).duration(200).go();}).send();return false;};ProfileInfoAppEditSection.editors={};ProfileInfoAppEditSection.prototype.newAdd=function(row){var uri='/ajax/profile/editinfo.php';var _L2={profile_id:this.controller.profile_id,section:this.app_id,type:EDIT_APP_THUMBS,new_add:true,new_index:row.i,app_id:this.app_id};var _L3=function(_L4){var _L5=$('info_section_info_'+this.app_id);var _L6=document.createElement('div');set_inner_html(_L6,_L4.payload.item);_L5.childNodes[0].childNodes[1].appendChild(_L6);}.bind(this);new AsyncRequest().setURI(uri).setData(_L2).setHandler(_L3).send();};ProfileInfoAppEditSection.prototype.onSaveEditor=function(){var _L0=this;var _L1=_L0.getSectionElem();var _L2=_L0.getEditorElem();var _L3={};var dds=_L1.getElementsByTagName('li');for(var i=0;i<dds.length;i++)_L3[i]=dds[i].getAttribute('item');var uri='/ajax/profile/editinfo.php';var _L7={'profile_id':this.controller.profile_id,'section':this.app_id,'type':EDIT_APP_THUMBS,'save':true,'items':_L3,'app_id':this.app_id};if(this.controller.edit_all_mode){this.closeEditor(true);this.controller.editAllSetActiveSectionNext(this);}else{CSS.removeClass(_L1,'edit_mode');ProfileInfoEdit.scrollToSection(_L1);}new AsyncRequest().setURI(uri).setData(_L7).send();return false;};function ProfileBoxesEdit(id,_L1,_L2,_L3){_L3=_L3||{};for(var j=0;j<_L2.length;j++){var _L5=$(_L2[j]);var _L6=DOM.scry(_L5,'div.box');for(var i=0;i<_L6.length;++i){var _L8=_L6[i];var _L9=DOM.scry(_L8,'a.box_editor');if(_L9.length>0){var _La=_L9[0];var _Lb=_La.childNodes.length?_La.firstChild:'';var _Lc=_L8.id.replace('box_app_','');var _Ld=document.createElement('div');if(_Lb){_Ld.appendChild(_Lb);CSS.removeClass(_Lb,'hidden_elem');}if(!ProfileBoxesEdit.NON_MOVEABLE[_Lc]){if(_L3['name']&&_L3['moveable_to_section'][_Lc]){var _Le=document.createElement('a');_Le.href='#';_Le.innerHTML=_tx("Move to {tab_name} tab",{'tab_name':_L3['name']});_Le.onclick=moveToTab.bind(this,id,_Lc,_L3['from'],_L3['to'],_L3['to_tab_name'],new URI(_L3['next_uri']));_Ld.appendChild(_Le);}else{var _Lf=document.createElement('span');CSS.addClass(_Lf,'unmovable');DOM.setContent(_Lf,_tx("This Box cannot be added to the Wall tab"));_Ld.appendChild(_Lf);}if(!ProfileBoxesEdit.NON_REMOVEABLE[_Lc]){var _L10=document.createElement('a');_L10.href='#';_L10.innerHTML=_tx("Remove Box");_L10.onclick=removeAppBox.bind(this,id,_Lc,_L1,'box_app_');_Ld.appendChild(_L10);}}var _L11=ProfileBoxesEdit.flymenuStyle[_Lc]||'flyout_menu_18 link_menu';var _L12='box_edit_menu_'+_Lc;var menu=dropmenu.getExistingInstance(_L12);if(menu)menu.destroy();(new flyout_menu(_La)).setMarkupContent(_L12,_L11,_tx("Edit box"),_Ld).addHook('show',function(_La){CSS.addClass(_La,'selected');}.bind(null,_La)).addHook('hide',function(_La){CSS.removeClass(_La,'selected');}.bind(null,_La));CSS.removeClass(_La,'hidden_elem');}}}}ProfileBoxesEdit.NON_MOVEABLE={2356318349:1};ProfileBoxesEdit.NON_REMOVEABLE={2530096808:1,8152663228:1,7919256574:1,70004827638:1};ProfileBoxesEdit.flymenuStyle={2356318349:'flyout_menu_18'};function profile_insert_loading_layer(_L0){var _L1=$N('div');CSS.addClass(_L1,'loading_layer');_L0.parentNode.style.position='relative';_L1.style.position='absolute';_L0.parentNode.appendChild(_L1);return _L1;}function profile_basic_info_summary_refresh(_L0){$('flyout_menu_profile_basic_info_editor').remove();DOM.replace($('basic_info_summary_box'),HTML(_L0));}function profile_basic_info_summary_editor_onclick(){var _L0=$('basic_info_summary_box');var _L1=profile_insert_loading_layer(this);var key=this.value;var _L3=DOM.find(_L0,'div.'+key);var _L4=!this.checked?animation(_L3).to('height','0px').to('opacity',0).duration(200).hide():animation(_L3).to('height','auto').from('0px').to('opacity',1).from(0).duration(200).show();new AsyncRequest().setURI('/ajax/profile/basic_info.php').setData(this.checked?{show:key}:{hide:key}).setHandler(function(_L5){var _L6=DOM.find(_L0,'div.no_info');var _L7=true;var _L8=DOM.scry(this.form,'input[type="checkbox"]');for(var ii=0;ii<_L8.length&&_L7;ii++)_L7&=!shown(_L8[ii])||!_L8[ii].checked;_L7?show(_L6):hide(_L6);_L4.go();}.bind(this)).setErrorHandler(function(_L5){this.checked=!this.checked;ErrorDialog.showAsyncError(_L5);}.bind(this)).setFinallyHandler(DOM.remove.bind(null,_L1)).send();}var FriendsBoxEditor={_submit:function(_L0){var _L1=$('app_content_2356318349');var _L2=DOM.find(_L1,'div.loading_placeholder');var _L3=$('profile_friends_box_inner_content');Vector2.getElementDimensions(_L3).setElementHeight(_L2);CSS.addClass(_L1,'is_loading');new AsyncRequest().setURI('/ajax/profile/friends_box.php').setData(_L0).setHandler(function(_L4){DOM.replace(_L3,HTML(_L4.getPayload()));}).setFinallyHandler(CSS.removeClass.bind(null,_L1,'is_loading')).send();},setNumToShow:function(_L0){FriendsBoxEditor._submit({max_num_to_show:_L0.value});},toggleNetwork:function(_L0){var _L1=serialize_form(_L0.form)['networks'];var _L2={};var _L3=DOM.scry($('content_box_edit_menu_2356318349'),'div.networks_error')[0];if(_L1){_L2['networks']=_L1;hide(_L3);}else{show(_L3);_L0.checked=true;return false;}FriendsBoxEditor._submit(_L2);return true;},addFriendOrList:function(_L0){var _L1;if(_L0.flid){_L1={add_friend_list:_L0.flid};}else if(_L0.i)_L1={add_friend:_L0.i};FriendsBoxEditor._submit(_L1);},removeFriendOrList:function(_L0){var _L1;if(_L0.flid){_L1={remove_friend_list:_L0.flid};}else if(_L0.i)_L1={remove_friend:_L0.i};FriendsBoxEditor._submit(_L1);},toggleShowNetworks:function(_L0){FriendsBoxEditor._submit({show_networks:_L0.checked});}};var ConnectionsBoxEditor={_submit:function(_L0){var _L1=$('app_content_70004827638');var _L2=DOM.find(_L1,'div.loading_placeholder');var _L3=$('profile_connections_box_inner_content');Vector2.getElementDimensions(_L3).setElementHeight(_L2);CSS.addClass(_L1,'is_loading');new AsyncRequest().setURI('/ajax/profile/connections_box.php').setData(_L0).setHandler(function(_L4){DOM.replace(_L3,HTML(_L4.getPayload()));}).setFinallyHandler(CSS.removeClass.bind(null,_L1,'is_loading')).send();},setNumToShow:function(_L0){ConnectionsBoxEditor._submit({max_num_to_show:_L0.value});}};function BlurbEditor(_L0,_L1,_L2){this.root=_L0;this.text=_L1;this.profileId=_L2;this.textElem=DOM.find(this.root,'div.text_wrapper');this.editLink=DOM.find(this.root,'a.edit_link');this.promptElem=DOM.find(this.root,'div.prompt');this.editorElem=DOM.find(this.root,'div.edit');this.inputBox=DOM.find(this.editorElem,'textarea');this.needCursorHack=ua.firefox()<3;this.cursorHacked=false;this.editLink.onmousedown=chain(this.editLink.onmousedown,this.toggleEditor.bind(this));this.promptElem.onmousedown=chain(this.promptElem.onmousedown,this.toggleEditor.bind(this));this.inputBox.onfocus=chain(this.inputBox.onfocus,DOM.setCaretPosition.bind(null,this.inputBox,0,Number.POSITIVE_INFINITY));this.inputBox.onkeypress=chain(this.inputBox.onkeypress,this.onkeypress.bind(this));if(!this.needCursorHack){this.inputBox.onblur=chain(this.inputBox.onblur,this.blur.bind(this));}else ;this.mode=BlurbEditor.READ;CSS.removeClass(this.editLink,'hidden_elem');}BlurbEditor.EDIT=1;BlurbEditor.READ=2;BlurbEditor.UPDATING=3;copy_properties(BlurbEditor.prototype,{_updateView:function(_L0){this.mode=_L0;if(this.mode==BlurbEditor.READ){CSS.removeClass(this.root,'blurb_editing');this.editLink.title=_tx("Edit");hide(this.editorElem);if(!this.text){hide(this.textElem);hide(this.editLink);show(this.promptElem);}else{hide(this.promptElem);show(this.textElem);show(this.editLink);}}else if(this.mode==BlurbEditor.EDIT){CSS.addClass(this.root,'blurb_editing');this.editLink.title=_tx("Save");this.inputBox.value=this.text;hide(this.textElem);hide(this.promptElem);show(this.editLink);show(this.editorElem);if(this.needCursorHack&&!this.cursorHacked){this.inputBox.focus();this.inputBox.blur();this.inputBox.onblur=chain(this.inputBox.onblur,this.blur.bind(this));this.cursorHacked=true;}this.inputBox.focus();}else Util.error('Trying to update mode with this.mode='+this.mode+'. Oh noez, a race condition.');},toggleEditor:function(){if(this.mode==BlurbEditor.EDIT){this.blur();}else if(this.mode==BlurbEditor.READ){this._updateView(BlurbEditor.EDIT);}else if(this.mode==BlurbEditor.UPDATING){}return false;},blur:function(e){if(this.mode!=BlurbEditor.EDIT)return;if(this.text==this.inputBox.value){this._updateView(BlurbEditor.READ);return;}this.mode=BlurbEditor.UPDATING;this.inputBox.disabled=true;CSS.addClass(this.inputBox,'updating');this._syncText(this.inputBox.value);new AsyncRequest().setURI('/ajax/profile/blurb.php').setData({blurb:this.text,profile_id:this.profileId}).setHandler(function(_L1){DOM.setContent(this.textElem,HTML(_L1.getPayload()));}.bind(this)).setFinallyHandler(function(){this._updateView(BlurbEditor.READ);CSS.removeClass(this.inputBox,'updating');this.inputBox.disabled=false;}.bind(this)).send();},_syncText:function(_L0){this.text=trim(_L0);this.inputBox.value=this.text;},onkeypress:function(e){var _L1=Event.getKeyCode(e);if(_L1==KEYS.TAB){this.blur();return false;}if(_L1==KEYS.ESC){this._syncText(this.text);this.blur();return false;}return true;}});function profilePictureEditorCreateFlyout(){var _L0=$('edit_profilepicture');var _L1=$('edit_profilepicture_icon');return flyout_menu(_L0).registerHTMLMenu($('profile_picture_flyout')).setPosition(dropmenu.ALIGN_LEFT).setIconPosition(_L1).addHook('show',function(_L0){CSS.addClass(_L0,'edit_profilepicture_icon_disabled');}.bind(null,_L0)).addHook('hide',function(_L0){CSS.removeClass(_L0,'edit_profilepicture_icon_disabled');}.bind(null,_L0));}function basicProfileEditorSetup(_L0,_L1){var _L2=DOM.find($(_L0),'a.box_editor');flyout_menu(_L2).registerHTMLMenu(_L1).setMenuClickArea(DOM.find($(_L1),'div.menu_custom')).setPosition(dropmenu.ALIGN_LEFT).addHook('show',CSS.addClass.bind(null,_L2,'selected')).addHook('hide',CSS.removeClass.bind(null,_L2,'selected'));CSS.removeClass(_L2,'hidden_elem');}

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