try{var MF;if("undefined"===typeof MF){MF={};}if("undefined"===typeof MF.People){MF.People={};}MF.People.PeopleService=new JsonFx.IO.Service("/Features/People/Services/PeopleService.jrpc");MF.People.PeopleService.getUsers=function(userIDs,siteID,opt){this.invoke("getUsers",[userIDs,siteID],opt);};MF.People.PeopleService.findUsers=function(name,startIdx,siteID,opt){this.invoke("findUsers",[name,startIdx,siteID],opt);};MF.People.PeopleService.getMemberList=function(start,count,opt){this.invoke("getMemberList",[start,count],opt);};MF.People.PeopleService.inviteMember=function(firstName,lastName,emailAddress,opt){this.invoke("inviteMember",[firstName,lastName,emailAddress],opt);};MF.People.PeopleService.inviteMembers=function(invites,message,membershipLevel,isUniversal,opt){this.invoke("inviteMembers",[invites,message,membershipLevel,isUniversal],opt);};MF.People.PeopleService.getSiteMemberList=function(start,count,searchString,sortColIdx,sortAsc,opt){this.invoke("getSiteMemberList",[start,count,searchString,sortColIdx,sortAsc],opt);};MF.People.PeopleService.requestToJoin=function(opt){this.invoke("requestToJoin",null,opt);};MF.People.PeopleService.cancelRequest=function(requestID,opt){this.invoke("cancelRequest",[requestID],opt);};}catch(ex){}try{var MF;if("undefined"===typeof MF){MF={};}if("undefined"===typeof MF.People){MF.People={};}MF.People.memberList=JsonML.BST([""," ",["div",{"class":"section-title"}," ",["h3",function(){return JsonFx.Lang.get("Global,MemberListTitle");}]," ",["p",{"class":"section-title-extra","jbst:visible":function(){return MF.People.Permissions.CanInvite;}}," ",["a",{"class":"add active",href:"#",onclick:"MF.People.memberList.toggleInviteForm();return false;"},"Invite someone"]," "]," "]," ",["div",{"class":function(){return"contacts small js-MemberList"+(this.data.firstRun?" onemember":"");}}," ",function(){return JsonML.BST(MF.People.memberItem).dataBind(this.data.members,this.index,this.count);}," ",["p",{"class":"extra","jbst:visible":function(){return !this.data.firstRun&&(this.data.count<this.data.total);}}," ",["a",{href:function(){return MF.People.PeopleUrl;}},function(){return JsonFx.Lang.get("Global,MemberListMore");}]," "]," "]," "]);(function(){MF.People.memberList.init=function(C){var A=jQuery(".js-MemberList")[0];if(!A||!C){return;}var B=MF.People.memberItem.bind(C.members);if(B){JsonFx.UI.clear(A);A.appendChild(B);}};MF.People.memberList.reload=function(B,A){MF.People.PeopleService.getMemberList(B,A,{onSuccess:function(C){MF.People.memberList.init(C);}});};MF.People.memberList.loadInviteForm=function(){$(".js-MemberList").prepend(MF.People.MemberInviteForm.bind());};MF.People.memberList.removeInviteForm=function(){$(".js-InviteMembers").remove();};MF.People.memberList.toggleInviteForm=function(){if(jQuery(".js-InviteMembers").length>0){MF.People.memberList.removeInviteForm();}else{MF.People.memberList.loadInviteForm();}};}).call(MF.People.memberList);}catch(ex){}try{var MF;if("undefined"===typeof MF){MF={};}if("undefined"===typeof MF.People){MF.People={};}MF.People.memberItem=JsonML.BST(["p"," ",["a",{href:function(){return this.data.url;}},["img",{src:function(){return this.data.avatar;},width:"32",height:"32"}]]," ",["span",{"class":"contain"}," ",["span",{"class":"meta"},["a",{href:function(){return this.data.url;}},function(){return this.data.name;}]," ",function(){return this.data.status;}]," ",["span",{"class":"extra"},function(){return this.data.visited.getFullYear()<1997?"Not yet visited":"Visited "+this.data.visited.toRelative(MF.ShortDateFormat);}]," "]," "]);}catch(ex){}try{var MF;if("undefined"===typeof MF){MF={};}if("undefined"===typeof MF.People){MF.People={};}MF.People.MemberInviteForm=JsonML.BST([""," ",["div",{"class":"invite-members js-InviteMembers"}," ",["a",{href:"#","class":"negative",onclick:"MF.People.memberList.removeInviteForm();return false;"},"X"]," ",["p",{"class":"intro"},"To invite someone new, enter their email address below and hit send."]," ",["form",{id:"InviteForm",action:"#","class":"js-EnableKeys",onsubmit:"return false;"}," ",["fieldset"," ",["input",{type:"text","class":"text switch-value js-InlineInstruction",title:function(){return JsonFx.Lang.get("Global,Email");},name:"inviteEmail",validate:function(){return MF.Validation.create(MF.RegExp.Email,"Email doesn't look quite right.");},onchange:"this.validate();"}]," ",["p",{"class":"submit"}," ",["a",{"class":"positive js-EnterKeyTarget",href:"#",onclick:"MF.People.MemberInviteForm.inviteMember();return false;"},"Send invite"]," or ",["a",{href:function(){return MF.People.InviteUrl;},onclick:function(){return MF.People.MemberInviteForm.addMore();}},["strong","invite more people"]]," "]," "]," "]," "],""]);(function(){this.inviteMember=function(A){var B=$("#InviteForm")[0];if(!MF.Validation.validateForm(B)){return false;}var C=MF.Forms.getFormData(B);if(C.inviteEmail&&C.inviteEmail.length>0){MF.Forms.disableSubmit(B);MF.People.PeopleService.inviteMember("","",C.inviteEmail,{onSuccess:function(D){if(D){MF.Message.showInfo(B,"Invite sent!",MF.Message.Scope.Inline,3000);MF.Forms.reset(B);}else{MF.Message.showError(B,"Failure",MF.Message.Scope.Inline,3000);}},onComplete:function(){MF.Forms.enableSubmit(B);}});}};this.addMore=function(){return function(){var A=$(this);var B=A.parents("fieldset").children("input");if(B.is(".active")){window.location.href=A.attr("href")+"?email="+encodeURIComponent(B.val());return false;}else{return true;}};};}).call(MF.People.MemberInviteForm);}catch(ex){}try{var MF;if("undefined"===typeof MF){MF={};}if("undefined"===typeof MF.People){MF.People={};}MF.People.MemberRow=JsonML.BST([""," ",function(){MF.People.MemberTable.counter++;}," ",["fieldset",{"class":"email js-email"}," ",["p"," ",["input",{"class":function(){return(MF.People.MemberTable.counter===1)?"text js-InlineInstruction js-FirstName":"text js-InlineInstruction";},type:"text",title:"First name",name:function(){return"Invite$"+(MF.People.MemberTable.counter-1)+"$FirstName";},value:function(){return this.data.FirstName;},onchange:"MF.People.MemberTable.markDirty(this)","jbst:onload":function(){return MF.People.MemberTable.focusFirstField;}}]," ",["input",{"class":"text js-InlineInstruction",type:"text",title:"Last name",name:function(){return"Invite$"+(MF.People.MemberTable.counter-1)+"$LastName";},value:function(){return this.data.LastName;},onchange:"MF.People.MemberTable.markDirty(this)"}]," ",["input",{"class":"text last js-InlineInstruction",type:"text",title:"Email address",name:function(){return"Invite$"+(MF.People.MemberTable.counter-1)+"$Email";},value:function(){return this.data.Email;},onchange:"MF.People.MemberTable.markDirty(this);this.validate();",validate:function(){return MF.Validation.create(MF.RegExp.Email,"Email doesn't look quite right.");}}]," ",["a",{"class":"del clone-remove js-remove",href:"#",onclick:"MF.People.MemberTable.removeEmail(this);return false;","jbst:visible":function(){return MF.People.MemberTable.counter!==1;},tabindex:"-1"},"Delete this email"]," "]," ",["input",{type:"hidden","class":"js-dirtyIndicator",value:function(){return(this.data.Email!=="");}}]," "]]);}catch(ex){}try{var MF;if("undefined"===typeof MF){MF={};}if("undefined"===typeof MF.People){MF.People={};}MF.People.MemberTable=JsonML.BST([""," ",["div",{"class":"page-title"}," ",["h2","Invite people"]," "]," ",["p","Use the form below to invite more people to your family site."]," ",["form",{action:"",method:"","class":"js-inviteForm"}," ",["div",{"class":"js-holder"}," ",function(){return JsonML.BST(MF.People.MemberRow).dataBind(this.data.inviteData,this.index,this.count);}," "]," ",["p",{"class":"actions js-actions"}," ",["a",{"class":"add cloner",href:"#",onclick:"MF.People.MemberTable.addEmail(this);return false;"},"Add more people"]," "]," ",["textarea",{id:"emailHolder",style:"display:none"}]," ",["fieldset"," ",["p"," ",["textarea",{"class":"message js-InlineInstruction js-counter",title:"Optional: your message",name:"Message",onkeyup:"MF.People.MemberTable.enforceMaxLength($(this));return false;"},function(){return this.data.messageDefault;}]," "]," "]," ",["div",{"class":"advanced js-advanced","jbst:visible":function(){return this.data.canCreateUniversalInvite;}}," ",["p"," ",["a",{href:"#",onclick:"MF.People.MemberTable.showAdvance(this);return false;"},"Advanced options"]," "]," "]," ",["div",{"class":"advancedOptions box js-advancedOptions","jbst:visible":function(){return this.data.canCreateUniversalInvite;},style:"display:none"}," ",["p",{"class":"inviteAs"}," Invite these people as ",["select",{name:"MembershipLevel"}," ",["option",{value:"Member"},"Members"]," ",["option",{value:"Admin"},"Administrators"]," ",["option",{value:"Guest"},"Limited Members"]," "]," ",function(){return JsonML.BST(MF.Messaging.WhatsThis).dataBind({message:MF.People.MemberTable.roleExplaination},this.index,this.count);}," "]," ",["p",{"jbst:visible":function(){return false;}}," ",["input",{type:"checkbox",name:"Universal"}]," Make these invites universal? ",function(){return JsonML.BST(MF.Messaging.WhatsThis).dataBind({message:MF.People.MemberTable.universalExplaination},this.index,this.count);}," "]," "]," ",["p",{"class":"submit"}," ",["a",{"class":"positive",href:"#",onclick:"MF.People.MemberTable.post(jQuery(this).parents('form'));return false;"},"Send invites"]," or ",["a",{href:function(){return this.data.cancelUrl;}}," ",["strong","cancel"]," "]," "]," "]]);(function(){this.maxLength=500;this.showAdvance=function(A){A=jQuery(A);if(A.toggleClass("active").is(".active")){$(".js-advancedOptions").show();}else{$(".js-advancedOptions").hide();}};this.removeEmail=function(A){MF.People.MemberTable.counter--;jQuery(A).parents(".js-email").remove();};this.addEmail=function(B){if(MF.People.MemberTable.counter<MF.People.inviteLimit){var A=[{Email:""},{Email:""},{Email:""}];if(A.length>MF.People.inviteLimit-MF.People.MemberTable.counter){A=A.slice(0,MF.People.inviteLimit-MF.People.MemberTable.counter);}$(".js-holder").append(MF.People.MemberRow.bind(A,MF.People.MemberTable.counter));}};this.post=function(B){data=MF.Forms.getFormData(B);data.Universal=(data.Universal==="on");if(!data.MembershipLevel){data.MembershipLevel="Member";}var A="";for(var C=0;C<data.Invite.length;C++){if((data.Invite[C].FirstName||data.Invite[C].LastName)&&!data.Invite[C].Email){A=A+(data.Invite[C].FirstName||"");if(data.Invite[C].FirstName&&data.Invite[C].LastName){A+=" "+data.Invite[C].LastName;}else{if(data.Invite[C].LastName){A+=data.Invite[C].LastName;}}if(C<data.Invite.length-1){A=A+", ";}}}if(A.length>0){MF.Message.showError(B,"You must enter an email address for the following people: "+A,MF.Message.Scope.Column);return false;}MF.People.PeopleService.inviteMembers(data.Invite,data.Message,data.MembershipLevel,data.Universal,{onSuccess:function(E){if(E){var D=[{Email:""},{Email:""},{Email:""}];MF.Message.showInfo(B,"Invite(s) sent",MF.Message.Scope.Page,3000);MF.People.MemberTable.counter=0;$(".js-holder").empty().append(MF.People.MemberRow.bind(D));}else{MF.Message.showError(B,"Failure!",MF.Message.Scope.Page,3000);}}});};this.counter=0;this.showPlaxo=function(){showPlaxoABChooser("emailHolder",MF.People.chooserUrl);};this.useEmails=function(E){var B=[];var A=[];for(var C=0;C<E.length;C++){A=E[C][0].split(" ");B[C]={FirstName:A[0],LastName:A[1],Email:E[C][1]};A=[];}$("fieldset.js-email").each(function(){if(!($(this).children("input.js-dirtyIndicator").val())){$(this).remove();MF.People.MemberTable.counter--;}});$(".js-holder").append(MF.People.MemberRow.bind(B.slice(0,MF.People.inviteLimit-MF.People.MemberTable.counter),MF.People.MemberTable.counter));if(MF.People.inviteLimit<(B.length+MF.People.MemberTable.counter)){var D=MF.Dialogs.AlertDialog.bind({message:"Limit reached."});if(D){document.body.appendChild(D);if(JsonFx.userAgent.ie<7){document.body.scrollIntoView(true);}}}};this.markDirty=function(A){$(A).parents("fieldset.js-email").children(".js-dirtyIndicator").val("true");};this.focusFirstField=function(){var A=$(this);if(A.is(".js-FirstName")){A.focus();}};this.roleExplaination=[{explaination:"This drop-down menu lets you select the 'Membership Type' of the people you are inviting. Here are the differences between the three types:"},{title:"Administrators:",explaination:"Have permission to add/delete anything on the group, invite or remove members, and change group settings."},{title:"Members:",explaination:"Have permission to add content to the group, comment on anything and invite other members (by default)."},{title:"Limited Members:",explaination:"Have permission to comment on anything (by default), but cannot add content or invite anyone."},{explaination:"You can edit membership settings and change the membership types of existing users by clicking on the Memberships tab under Group Settings."}];this.universalExplaination=[{explaination:"Universal invitations can be accepted an unlimited number of times (normal invitations can be accepted only once)."},{explaination:"Check this box if you want to allow recipients of your invitations to forward those invitations on to others, so that they can also join this group."}];this.enforceMaxLength=function(A){if(A.val().length>=this.maxLength){A.val(A.val().substr(0,this.maxLength));}};}).call(MF.People.MemberTable);}catch(ex){}try{var MF;if("undefined"===typeof MF){MF={};}if("undefined"===typeof MF.People){MF.People={};}MF.People.List=JsonML.BST([""," ",function(){this.searchString=this.data.searchString;}," ",["div",{"class":"js-memberlist"}," ",function(){return JsonML.BST(MF.Toolbars.FilterBar).dataBind(MF.People.List.getSortBarData(this.data),this.index,this.count);}," ",["ul",{"class":"alpha"}," ",["li",["a",{"class":function(){return(this.data.searchString==="")?"first active":"first";},href:"#all",onclick:function(){return MF.People.List.filterBy("");}},"All"]]," ",["li",["a",{href:"#a",onclick:function(){return MF.People.List.filterBy("a");},"class":function(){return(this.data.searchString==="a")?"active":"";}},"A"]]," ",["li",["a",{href:"#b",onclick:function(){return MF.People.List.filterBy("b");},"class":function(){return(this.data.searchString==="b")?"active":"";}},"B"]]," ",["li",["a",{href:"#c",onclick:function(){return MF.People.List.filterBy("c");},"class":function(){return(this.data.searchString==="c")?"active":"";}},"C"]]," ",["li",["a",{href:"#d",onclick:function(){return MF.People.List.filterBy("d");},"class":function(){return(this.data.searchString==="d")?"active":"";}},"D"]]," ",["li",["a",{href:"#e",onclick:function(){return MF.People.List.filterBy("e");},"class":function(){return(this.data.searchString==="e")?"active":"";}},"E"]]," ",["li",["a",{href:"#f",onclick:function(){return MF.People.List.filterBy("f");},"class":function(){return(this.data.searchString==="f")?"active":"";}},"F"]]," ",["li",["a",{href:"#g",onclick:function(){return MF.People.List.filterBy("g");},"class":function(){return(this.data.searchString==="g")?"active":"";}},"G"]]," ",["li",["a",{href:"#h",onclick:function(){return MF.People.List.filterBy("h");},"class":function(){return(this.data.searchString==="h")?"active":"";}},"H"]]," ",["li",["a",{href:"#i",onclick:function(){return MF.People.List.filterBy("i");},"class":function(){return(this.data.searchString==="i")?"active":"";}},"I"]]," ",["li",["a",{href:"#j",onclick:function(){return MF.People.List.filterBy("j");},"class":function(){return(this.data.searchString==="j")?"active":"";}},"J"]]," ",["li",["a",{href:"#k",onclick:function(){return MF.People.List.filterBy("k");},"class":function(){return(this.data.searchString==="k")?"active":"";}},"K"]]," ",["li",["a",{href:"#l",onclick:function(){return MF.People.List.filterBy("l");},"class":function(){return(this.data.searchString==="l")?"active":"";}},"L"]]," ",["li",["a",{href:"#m",onclick:function(){return MF.People.List.filterBy("m");},"class":function(){return(this.data.searchString==="m")?"active":"";}},"M"]]," ",["li",["a",{href:"#n",onclick:function(){return MF.People.List.filterBy("n");},"class":function(){return(this.data.searchString==="n")?"active":"";}},"N"]]," ",["li",["a",{href:"#o",onclick:function(){return MF.People.List.filterBy("o");},"class":function(){return(this.data.searchString==="o")?"active":"";}},"O"]]," ",["li",["a",{href:"#p",onclick:function(){return MF.People.List.filterBy("p");},"class":function(){return(this.data.searchString==="p")?"active":"";}},"P"]]," ",["li",["a",{href:"#q",onclick:function(){return MF.People.List.filterBy("q");},"class":function(){return(this.data.searchString==="q")?"active":"";}},"Q"]]," ",["li",["a",{href:"#r",onclick:function(){return MF.People.List.filterBy("r");},"class":function(){return(this.data.searchString==="r")?"active":"";}},"R"]]," ",["li",["a",{href:"#s",onclick:function(){return MF.People.List.filterBy("s");},"class":function(){return(this.data.searchString==="s")?"active":"";}},"S"]]," ",["li",["a",{href:"#t",onclick:function(){return MF.People.List.filterBy("t");},"class":function(){return(this.data.searchString==="t")?"active":"";}},"T"]]," ",["li",["a",{href:"#u",onclick:function(){return MF.People.List.filterBy("u");},"class":function(){return(this.data.searchString==="u")?"active":"";}},"U"]]," ",["li",["a",{href:"#v",onclick:function(){return MF.People.List.filterBy("v");},"class":function(){return(this.data.searchString==="v")?"active":"";}},"V"]]," ",["li",["a",{href:"#w",onclick:function(){return MF.People.List.filterBy("w");},"class":function(){return(this.data.searchString==="w")?"active":"";}},"W"]]," ",["li",["a",{href:"#x",onclick:function(){return MF.People.List.filterBy("x");},"class":function(){return(this.data.searchString==="x")?"active":"";}},"X"]]," ",["li",["a",{href:"#y",onclick:function(){return MF.People.List.filterBy("y");},"class":function(){return(this.data.searchString==="y")?"active":"";}},"Y"]]," ",["li",["a",{href:"#z",onclick:function(){return MF.People.List.filterBy("z");},"class":function(){return(this.data.searchString==="z")?"active":"";}},"Z"]]," "]," ",["table",{cellpadding:"0",cellspacing:"0","class":"memberslist"}," ",function(){return JsonML.BST(this.data.isAnonymous?MF.People.ListBasicItem:MF.People.ListItem).dataBind(this.data.memberData,this.index,this.count);}," "]," ",["div",{"class":function(){return"members-empty"+(this.data.canInvite?"":" nopermission");},"jbst:visible":function(){return this.data.total===0;}}," "]," ",function(){return JsonML.BST(MF.Paging.Pager).dataBind(MF.Paging.Pager.buildData(this.data.start,this.data.count,this.data.total,MF.People.List.getMembers),this.index,this.count);}," "]]);(function(){this.searchString="";this.filterBy=function(F){return function(){MF.People.List.searchString=F;MF.People.List.getMembers(0);return false;};};this.getMembers=function(H,F){var I="";if(H!==0){I+="?start="+H;}var G=MF.People.List.searchString;if(G.length>0){if(I.length===0){I="?";}else{I+="&";}I+="t="+G;}window.location.href=window.location.pathname+I;};this.memberExplainations=[{title:"Members:",explaination:"This list shows everyone who is a member of the group. The information displayed here depends on the information members have entered into their profile details and their selected profile privacy settings for this group."}];this.whatsThisData={message:MF.People.List.memberExplainations};function D(I,F,H){if(H.selectedIdx===F){I.asc=!I.asc;}var G=MF.getQueryParam("start",true,0);MF.People.PeopleService.getSiteMemberList(G,A,MF.People.List.searchString,F,I.asc,{onSuccess:function(J){$(".js-memberlist").replaceWith(MF.People.List.bind(J));}});return true;}var C=null;var B=new MF.Toolbars.FilterBarMenu.Menu("Sort",[{label:"Alphabetically",asc:true},{label:"Visited",asc:false},{label:"Date joined",asc:false}],D);var E=false;var A;this.getSortBarData=function(F){if(!E){if(F.canInvite){C=new MF.Toolbars.FilterBarButton.Button("Invite more people",F.inviteUrl);}B.setSelection(F.sortData.colIdx).asc=F.sortData.asc;A=F.count;E=true;}return{items:[C,B]};};}).call(MF.People.List);}catch(ex){}try{var MF;if("undefined"===typeof MF){MF={};}if("undefined"===typeof MF.People){MF.People={};}MF.People.ListItem=JsonML.BST(["tr"," ",["td",{"class":"mlperson"}," ",["div",{"class":"contacts large item-meta"}," ",["p",["a",{href:function(){return this.data.url;},title:""},["img",{src:function(){return this.data.avatar;},alt:""}]]," ",["span",{"class":"contain"}," ",["span",{"class":"name"},["a",{href:function(){return this.data.url;},title:""},function(){return this.data.name;}]," ",["img",{src:"/Images/admin.gif","jbst:visible":function(){return this.data.isAdmin;}}]]," ",["span",{"class":"dates"},["em","Visited:"]," ",function(){return this.data.visited.getFullYear()<1997?"Not yet visited":this.data.visited.toRelative(MF.ShortDateFormat);}]," ",["span",{"class":"dates"},["em","Joined:"]," ",function(){return this.data.joined.toRelative(MF.ShortDateFormat);}]," ",["span",{"class":"meta","jbst:visible":function(){return(this.data.birthday.length>0);}},["em","Birthday:"]," ",function(){return this.data.birthday;}]," "]," "]," "]," ",""," "]," ",["td",{"class":"mladdress"}," ",["div",{"class":"module meta"}," ",["dl"," ",function(){return JsonML.BST(MF.People.ListDataItem).dataBind(this.data.addresses,this.index,this.count);}," "]," "]," "]," ",["td",{"class":"mlcontact"}," ",["div",{"class":"module meta"}," ",["dl"," ",function(){return JsonML.BST(MF.People.ListDataItem).dataBind(this.data.email,this.index,this.count);}," ",function(){return JsonML.BST(MF.People.ListDataItem).dataBind(this.data.phone,this.index,this.count);}," "]," "]," "],"\n"]);}catch(ex){}try{var MF;if("undefined"===typeof MF){MF={};}if("undefined"===typeof MF.People){MF.People={};}MF.People.ListDataItem=JsonML.BST([""," ",["dt",function(){return this.data.label;},":"]," ",["dd",{"jbst:visible":function(){return(this.data.url.length<=0);}}," ",function(){return JsonML.raw(this.data.item);}," "]," ",["dd",{"jbst:visible":function(){return(this.data.url.length>0);}}," ",["a",{href:function(){return this.data.url;}}," ",function(){return this.data.item;}," "]," "]]);}catch(ex){}try{var MF;if("undefined"===typeof MF){MF={};}if("undefined"===typeof MF.People){MF.People={};}MF.People.ListBasicItem=JsonML.BST(["tr"," ",["td",{"class":"mlperson"}," ",["div",{"class":"contacts large item-meta"}," ",["p",["a",{href:function(){return this.data.url;},title:""},["img",{src:function(){return this.data.avatar;},alt:""}]]," ",["span",{"class":"contain"}," ",["span",{"class":"name"},["a",{href:function(){return this.data.url;},title:""},function(){return this.data.name;}]," ",["img",{src:"/Images/admin.gif","jbst:visible":function(){return this.data.isAdmin;}}]]," ",["span",{"class":"dates"},["em","Visited:"]," ",function(){return this.data.visited.toRelative(MF.ShortDateFormat);}]," ",["span",{"class":"dates"},["em","Joined:"]," ",function(){return this.data.joined.toRelative(MF.ShortDateFormat);}]," "]," "]," "]," ",""," "],"\n"]);}catch(ex){}try{var MF;if("undefined"===typeof MF){MF={};}if("undefined"===typeof MF.People){MF.People={};}MF.People.UserBadge=JsonML.BST(["div",{"class":"contacts large item-meta"}," ",["p",["a",{href:function(){return this.data.url;},title:""},["img",{src:function(){return this.data.avatar;},alt:"Author's Picture"}]]," ",["span",{"class":"name"},["a",{href:function(){return this.data.url;}},function(){return this.data.authorName;}]]," ",["span",{"class":"detail"}," ",function(){return this.data.publishText;}," ",["em",{"jbst:visible":function(){return this.data.publishText2.length>0;}}," \u2022 "]," ",function(){return this.data.publishText2;}," "]," ",["span",{"class":"meta","jbst:visible":function(){return this.data.viewCount>=0;}},function(){return this.data.viewCount;}," views \u2022 ",["a",{href:"#comments"},function(){return this.data.commentCount;}," comments"]]," ",["span",{"jbst:visible":function(){return this.data.contentId>0;},"class":"single-edit"},["a",{onclick:function(){return this.onClickEdit(this.data.contentId,this.data.editCallback);},href:"#"},"Edit"]," or ",["a",{href:"#",onclick:function(){return this.onClickDelete(this.data.overrideDelete,this.data.contentId,this.data.deleteCallback,this.data.ok,this.data.cancel,this.data.title);}},"delete"]]]," "]);(function(){this.onClickEdit=function(B,A){return function(){if("function"===typeof A){A(B,this);}return false;};};this.onClickDelete=function(F,E,A,B,D,C){if(F){if("function"===typeof A){return A(E);}}else{return MF.Dialogs.ConfirmDeleteDialog.confirm(E,A,B,D,C);}};}).call(MF.People.UserBadge);}catch(ex){}try{var MF;if("undefined"===typeof MF){MF={};}if("undefined"===typeof MF.People){MF.People={};}MF.People.CreateRequest=JsonML.BST(["div",{"class":"container js-rtjcontainer"}," ",["div",{"class":"box shared public"}," ",["p"," ",["strong",function(){return this.data.siteName;}]," is a ",function(){return this.data.privacyText;}," family group on ",["a",{href:function(){return this.data.mfUrl;}},"myfamily.com"],". To add content or comment you must be a member. "]," ",["a",{"class":"positive",href:"#request",onclick:function(){return this.request();}},"Request to join this group"]," "]," "]);(function(){this.request=function(){return function(){MF.People.PeopleService.requestToJoin({onSuccess:function(A){if(A.signedOut||(A.request&&A.request.isMember)){window.location.href=A.url;}else{$(".js-rtjcontainer").replaceWith(MF.People.CancelRequest.bind(A.request));}}});};return false;};}).call(MF.People.CreateRequest);}catch(ex){}try{var MF;if("undefined"===typeof MF){MF={};}if("undefined"===typeof MF.People){MF.People={};}MF.People.CancelRequest=JsonML.BST(["div",{"class":"container js-rtjcontainer"}," ",["div",{"class":"box shared public requested"}," ",["p"," ",["strong",function(){return this.data.siteName;}]," is a ",function(){return this.data.privacyText;}," family group on ",["a",{href:function(){return this.data.mfUrl;}},"myfamily.com"]," . You have requested to join this group. "]," ",["a",{"class":"positive",href:"#cancel",onclick:function(){return this.cancel(this.data);}},"Cancel request to join"]," "]," "]);(function(){this.cancel=function(A){return function(){MF.People.PeopleService.cancelRequest(A.requestID,{onSuccess:function(B){$(".js-rtjcontainer").replaceWith(MF.People.CreateRequest.bind(A));}});};return false;};}).call(MF.People.CancelRequest);}catch(ex){}try{var MF;if("undefined"===typeof MF){MF={};}if("undefined"===typeof MF.People){MF.People={};}MF.People.SelectMembersDialog=JsonML.BST([""," ",function(){this.resetState();}," ",function(){var A=JsonML.BST([""," ",["div",{"class":"members choose"}," ",["h2",function(){return this.data.title||"Add recipients";}]," ",["p",["input",{id:"filterText",name:"filter",type:"text","class":"text switch-value js-InlineInstruction",onkeyup:"MF.People.SelectMembersDialog.filterTextChanged(this.value);return false;",title:"Filter...",value:""}]]," ",["ul",{"class":"alpha"}," ",["li",["a",{"jbst:onload":function(){return MF.People.SelectMembersDialog.filterBy("");},onclick:function(){return MF.People.SelectMembersDialog.filterBy("");},"class":"first active js-filter",href:"#filter"},"All"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("a");},"class":"js-filter",href:"#filter"},"A"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("b");},"class":"js-filter",href:"#filter"},"B"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("c");},"class":"js-filter",href:"#filter"},"C"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("d");},"class":"js-filter",href:"#filter"},"D"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("e");},"class":"js-filter",href:"#filter"},"E"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("f");},"class":"js-filter",href:"#filter"},"F"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("g");},"class":"js-filter",href:"#filter"},"G"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("h");},"class":"js-filter",href:"#filter"},"H"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("i");},"class":"js-filter",href:"#filter"},"I"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("j");},"class":"js-filter",href:"#filter"},"J"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("k");},"class":"js-filter",href:"#filter"},"K"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("l");},"class":"js-filter",href:"#filter"},"L"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("m");},"class":"js-filter",href:"#filter"},"M"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("n");},"class":"js-filter",href:"#filter"},"N"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("o");},"class":"js-filter",href:"#filter"},"O"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("p");},"class":"js-filter",href:"#filter"},"P"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("q");},"class":"js-filter",href:"#filter"},"Q"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("r");},"class":"js-filter",href:"#filter"},"R"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("s");},"class":"js-filter",href:"#filter"},"S"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("t");},"class":"js-filter",href:"#filter"},"T"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("u");},"class":"js-filter",href:"#filter"},"U"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("v");},"class":"js-filter",href:"#filter"},"V"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("w");},"class":"js-filter",href:"#filter"},"W"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("x");},"class":"js-filter",href:"#filter"},"X"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("y");},"class":"js-filter",href:"#filter"},"Y"]]," ",["li",["a",{onclick:function(){return MF.People.SelectMembersDialog.filterBy("z");},"class":"js-filter",href:"#filter"},"Z"]]," ",["li",["a",{id:"selectedCount",onclick:function(){return MF.People.SelectMembersDialog.filterBySelected;},"class":"last js-filter",href:"#filter"},"Selected(",function(){return MF.People.SelectMembersDialog.getSelectedCount();},")"]]," "]," ",["div",{"class":"box js-results"}," ",["p",{"class":"no-content"},"Loading..."]," "]," ",["p",{"class":"submit"},["a",{onclick:"MF.People.SelectMembersDialog.done();return false;","class":"positive"},"Done"]," or ",["a",{onclick:"MF.Dialog.remove();return false;",href:"#cancel"},"cancel"]]," "],""," "]);A.prototype=this;return JsonML.BST(MF.Dialog).dataBind({maxHeight:485,width:920,modal:false,data:this.data},this.index,this.count,A);}," "]);(function(){var G="";var A={};var H=F;var B=-1;var C=0;var E=0;function D(I){var J=MF.People.SelectMembersDialog.bind({items:[],selected:A,title:I});if(J){document.body.appendChild(J);if(JsonFx.userAgent.ie<7){document.body.scrollIntoView(true);}}}this.showForSite=function(J,K){E=MF.mfsid;H=K;var I="Select members";if(J&&J.length>0){MF.People.PeopleService.getUsers(J,E,{onSuccess:function(L){A=L.items;D(I);}});}else{D(I);}};this.show=function(I,J){if("undefined"===typeof I){A={};}else{A=I;}if("undefined"!==typeof J){H=J;}D();return false;};this.filterUsers=function(I,K,J){if(I===G&&B===K){return;}G=I;B=K;var L=document.getElementById("filterText");L.value=I;if(I.length===0&&J){L.focus();L.blur();}MF.People.PeopleService.findUsers(I,K,E,{onSuccess:function(M){if(G===I){M=MF.People.SelectMembersResults.bind(M);$("div.js-results").replaceWith(M);}}});};this.filterBy=function(I){return function(){$("a.js-filter").removeClass("active");$(this).addClass("active");MF.People.SelectMembersDialog.filterUsers(I,0,true);return false;};};this.filterBySelected=function(){G="-1";B=0;$("a.js-filter").removeClass("active");$(this).addClass("active");var I=MF.People.SelectMembersDialog.getSelectedUsers();var J=MF.People.SelectMembersResults.bind({start:0,items:I,total:1});$("div.js-results").replaceWith(J);};this.filterTextChanged=function(I){MF.People.SelectMembersDialog.filterUsers(I,0,false);};this.done=function(){B=-1;MF.Dialog.remove();H(MF.People.SelectMembersDialog.getSelectedUsers());};this.pageUsers=function(J,I){MF.People.SelectMembersDialog.filterUsers(G,J,true);};this.setSelected=function(I){A={};C=0;for(var J=0;J<I.length;J++){MF.People.SelectMembersDialog.addSelected(I[J]);}};this.toggleSelected=function(I){if(MF.People.SelectMembersDialog.isSelected(I)){MF.People.SelectMembersDialog.removeSelected(I);return false;}else{MF.People.SelectMembersDialog.addSelected(I);return true;}};this.addSelected=function(I){A[""+I.id]=I;C++;MF.People.SelectMembersDialog.updateSelectedCount();};this.removeSelected=function(I){A[""+I.id]=null;C--;MF.People.SelectMembersDialog.updateSelectedCount();};this.isSelected=function(I){return A[""+I.id]!=null&&A[""+I.id].id===I.id;};this.getSelectedUsers=function(){var J=new Array();for(var I in A){if(A[I]!=null){J.push(A[I]);}}return J;};this.getSelectedCount=function(){return C;};this.updateSelectedCount=function(){var I=document.getElementById("selectedCount");if(I){I.innerHTML="Selected("+C+")";}};this.resetState=function(){if("undefined"!==typeof this.data.selected){this.setSelected(this.data.selected);}G="";B=-1;};function F(){alert("TODO: Specify a callback function when user clicks done");}}).call(MF.People.SelectMembersDialog);}catch(ex){}try{var MF;if("undefined"===typeof MF){MF={};}if("undefined"===typeof MF.People){MF.People={};}MF.People.SelectMembersResults=JsonML.BST([""," ",["div",{"class":"box js-results"}," ",["div",{"class":"contacts large js-moreresults",style:function(){return this.data.items.length>16?"height:280px;overflow:auto;":"";}}," ",function(){return JsonML.BST(MF.People.SelectMembersUser).dataBind(this.data.items,this.index,this.count);}," "],""," ",function(){return JsonML.BST(MF.Paging.Pager).dataBind(MF.Paging.Pager.buildData(this.data.start,this.data.count,this.data.total,MF.People.SelectMembersDialog.pageUsers),this.index,this.count);}," "],""," "]);}catch(ex){}try{var MF;if("undefined"===typeof MF){MF={};}if("undefined"===typeof MF.People){MF.People={};}MF.People.SelectMembersUser=JsonML.BST(["div",{onclick:function(){return this.toggleSelected(this.data);},"class":function(){return"contact clearfix"+(MF.People.SelectMembersDialog.isSelected(this.data)?" selected":"");}},["img",{src:function(){return this.data.avatar;}}]," ",["p",["span",{"class":"name"},function(){return this.data.name;}]]]);(function(){this.toggleSelected=function(A){return function(){var B=MF.People.SelectMembersDialog.toggleSelected(A);$(this).toggleClass("selected");return false;};};}).call(MF.People.SelectMembersUser);}catch(ex){}