Cliques={cur_name:[],cur_ids:[],init:function(){onEvent($("add_new_clique"),"click",$b(this.showNewClique,this));this.shown=false;var b=$gc(this.add_to_list,"form");b.onsubmit=function(){return false};var a=$gc(this.add_to_list,"input");enableWick(a);this.friend_list=new Friends()},showEmpty:function(){RCN($("viewer"),H2(_("Manage your friends into cliques!")),P(_("Cliques make it easy to send plurks to a group of people.")),P(_("In the right panel, you can create new cliques or edit the current ones.")))},showNewClique:function(){var d=this;if(this.shown){return this.hideAddClique()}this.shown=true;$("add_new_clique").src="http://statics.plurk.com/cb027564f7a93db63a44ad0919bbca76.gif";var a,c;appendToTop($("clique-holder"),DIV({id:"adder"},a=INPUT({type:"text"}),c=IMG({c:"action_img",src:"http://statics.plurk.com/e53f5da063e999cd58ac4a3c6c8d3fe3.gif"})));appendToTop($("adder"),P(_("Enter the name of your clique and press enter")));var b=$p($b(this.addClique,this),a,c);onEvent(c,"click",$b(this.hideAddClique,this));AEV(a,"keypress",function(e){if(e.key==27){d.hideAddClique()}else{if(e.key==13){b()}}return true});a.focus()},addClique:function(b,f){var e=this;if(b.value==""){return false}var c=b.value;var g=$bytc("a",null,$("cliques"));var a=map(g,function(h){if(h.innerHTML==c){return true}});if(a){alert(_("Clique name already found."));return false}this.adding=true;b.disabled=true;removeElement(f);var d=getRequest("/Cliques/add");d.addCallback(function(h){e.adding=false;e.hideAddClique();CLIQUES[h]=[];var i=e.renderClique({name:h});appendToTop($("cliques"),i);e.showClique(h,i);top.TopBar.update_cliques=true});d.addErrback(function(){e.adding=false;e.hideAddClique()});d.sendReq({name:b.value});return false},add_to_list:DIV({id:"add_person"},FORM(B(_("Add to Clique")+": "),INPUT({id:"friend_adder",type:"text",c:"wickEnabled"}),BR(),SPAN({c:"help"},_("Type your friend's name and press enter")))),getFriendBy:function(a,b){if(a=="uid"){return top.SiteState.getUserById(b)}if(a=="nick_name"){return top.SiteState.getUserByNick(b)}},changeName:function(d){var c=this;var f=getEventElm(d);var e=prompt(format(_("Enter new name for %s"),this.cur_name));var a=this.cur_name;if(e){var b=getRequest("/Cliques/changeName");b.addCallback(function(i){var h=$gp(f,"h2");c.cur_name=i;setHTML($gc(h,"span","name"),i);CLIQUES[i]=CLIQUES[a];delete CLIQUES[a];var g=$gc($("cliques"),"a","on");setHTML(g,i);onEvent(g,"click",$p($b(c.showClique,c),i));top.TopBar.update_cliques=true});b.sendReq({old_name:this.cur_name,new_name:e})}return false},deleteClique:function(){if(confirm(format(_("Are you sure you want to delete %s"),this.cur_name))){var a=getRequest("/Cliques/deleteClique");a.addCallback(function(){RCN($("viewer"),"");removeElement($gc($("cliques"),"a","on"));Cliques.showEmpty();top.TopBar.update_cliques=true});a.sendReq({name:this.cur_name})}},_showClique:function(a,f){var g=this;map($bytc("a",null,f.parentNode),function(m){removeClass(m,"on")});addClass(f,"on");var i=A({href:"#"},_("change name"));onEvent(i,"click",$b(this.changeName,this));var j=A({href:"#"},_("delete"));onEvent(j,"click",$b(this.deleteClique,this));var c=SPAN({c:"editor"},"( ",i,", ",j," )");var b=$("viewer");RCN(b,H2(SPAN({c:"name"},a)," clique",c),this.add_to_list);g.cur_name=a;var k=CLIQUES[a];g.cur_ids=k;var e;ACN(b,e=DIV({id:"list"}));var l=[];map(k,function(n){var m=g.getFriendBy("uid",n);if(m){l.push(m)}});l.sort(this.sortItems);var d;ACN(e,d=UL());map(l,function(m){ACN(d,g.renderFriend(m))});var h=$gc(this.add_to_list,"input");if(k.length==0){h.focus()}updateHeight(400)},sortItems:function(e,c){var f=e.display_name&&e.display_name.length>0?e.display_name.toLowerCase():e.nick_name.toLowerCase();var d=c.display_name&&c.display_name.length>0?c.display_name.toLowerCase():c.nick_name.toLowerCase();if(f==d){return 0}else{if(f<d){return -1}else{return 1}}},showClique:function(a,b){var c=getEventElm(b);if(hasClass(c,"on")){return false}top.PlurkAdder.fetchUsersIfNeeded(CLIQUES[a],$p($b(this._showClique,this),a,c));return false},removeFriend:function(e){var g=getEventElm(e);if(g.deleting==true){return}g.deleting=true;var a=$gp(g,"li");var c=this.getFriendBy("nick_name",a.nick_name);var f=this.cur_ids;var b=getIndex(c.uid,this.cur_ids);f.splice(b,1);var d=getRequest("/Cliques/update");d.addCallback(function(){removeElement(a)});d.sendReq({name:this.cur_name,ids:serializeJSON(f)})},renderFriend:function(b,c){var e=this.friend_list;var g=this.friend_list._getRemoveFriend(b,$b(this.removeFriend,this));var d;var a=LI({c:"fri_item"},DIV({c:"remove-friend"},g),TABLE({c:"friend"},TBODY(TR(TD(e.getImg(b,20)),d=TD(e._renderUserLink(b)," ",SPAN({c:"help"},b.nick_name))))));if(c){var f=format(_("%(friend)s has been added to %(name)s clique."),{friend:b.full_name||b.display_name||b.nick_name,name:this.cur_name});ACN(d,BR(),SPAN({c:"added"},f))}a.nick_name=b.nick_name;return a},renderClique:function(a){var b=A({href:"#"},a.name);onEvent(b,"click",$p($b(this.showClique,this),a.name));return b},hideAddClique:function(){if(this.adding){return}this.shown=false;removeElement($("adder"));$("add_new_clique").src="http://statics.plurk.com/da68d218e7c4dd9572ec7273492549b6.gif"}};function activateCurrentSmartInputMatch(){var d=AmiComplete.siw;var a=getUserInputBase();var g;if((g=getCurrentlySelectedSmartInputItem())!=null){var c=d.matchCollection[g].cleanValue;var b=c.match(/<(.+)>/,c)[1];c=c.replace(/\s*<.+>/,"");var e=$bytc("li","fri_item");var j=map(e,function(l){if(l.nick_name==b){return true}});var i;map(keys(COMPLETION),function(l){if(COMPLETION[l].nick_name==b){i=l;return}});if(!j&&i){Cliques.cur_ids.push(""+i);var k=Cliques.cur_ids;var f=$gc($("list"),"ul");var h=getRequest("/Cliques/update");h.addCallback(function(){top.PlurkAdder.fetchUsersIfNeeded([i],function(){appendToTop(f,Cliques.renderFriend(top.SiteState.getUserById(i),true));top.TopBar.update_cliques=true;updateHeight(400)})});h.addErrback(function(l){if(l.length>500){l=l.substring(0,500)+"..."}alert(l)});h.sendReq({name:Cliques.cur_name,ids:serializeJSON(k)})}d.inputBox.value="";runMatchingLogic(c,true)}}preloadImages("http://statics.plurk.com/cb027564f7a93db63a44ad0919bbca76.gif","http://statics.plurk.com/e53f5da063e999cd58ac4a3c6c8d3fe3.gif");Paging=Class({init:function(c){this.list=c;var a=1;try{var g=location.hash;if(g&&g.indexOf("page")!=-1){var b=/page(\d+)/g;var f=g.match(/page(\d+)/);if(f){a=parseInt(f[1])}}}catch(d){}this.render=$b(this.list.renderLi,c);this.items_pr_page=c.page_count;this.current_page=a;this.pages=Math.ceil((c.item_count)/this.items_pr_page);this.show_action_help=c.show_action_help;this.showPageNav();this.showPage(a)},_showRecords:function(a){var e=this.show_action_help;var b=$bytc("li",null,this.list.ul);var d=getFirst(b);map(b,function(f,g){if(!e||g!=0){removeElement(f)}});var c=this;map(a,function(f){if(f&&!f.removed){ACN(c.list.ul,c.render(f))}});this.hideLoading();updateHeight()},showLoading:function(){map($bytc("div","pg_holder"),function(a){appendToTop(a,IMG({src:"http://statics.plurk.com/7f5c4282d2e9accfdae99cc6abb6c9bb.gif",c:"indicator_mini"}))})},hideLoading:function(a){removeElement($bytc("img","indicator_mini"))},showRecords:function(b,a){this.showLoading();this.list.get(b,$b(this._showRecords,this))},showPage:function(b,d){var c=$bytc("a","pg_"+this.current_page);map(c,function(e){removeClass(e,"pg_selected")});this.current_page=b;this.updatePageNav();var a=$bytc("a","pg_"+this.current_page);map(a,function(e){addClass(e,"pg_selected")});var h=(b-1)*this.items_pr_page;var g=h+this.items_pr_page;this.showRecords(h,g);try{location.hash="page"+b}catch(f){AJS.log(f)}scrollToTop();return false},prev:function(a){if(this.current_page>1){this.showPage(this.current_page-1)}scrollToTop();preventDefault(a||event);return false},next:function(a){if(this.current_page<this.pages){this.showPage(this.current_page+1)}scrollToTop();preventDefault(a||event);return false},_showPageElm:function(a,c,e){var b=0;var d=e(a);while(true){if(hasClass(d,"more_left")||hasClass(d,"more_right")){break}if(b<c){showElement(d);b++}else{hideElement(d)}d=e(d)}return b},updatePageNav:function(){var c=this;if(this.pages<=7){hideElement($bytc("span","more_left"),$bytc("span","more_right"));c.renderPages(1,this.pages)}else{showElement($bytc("span","more_right"),$bytc("span","more_left"));if(c.current_page<5){c.renderPages(1,7);hideElement($bytc("span","more_left"))}else{if(c.current_page>c.pages-4){c.renderPages(c.pages-7,c.pages);hideElement($bytc("span","more_right"))}else{var b=c.current_page-3;var a=c.current_page+3;c.renderPages(b,a)}}}},showPageNav:function(){var b=this.list.holders;var a=this;map(b,function(c){var e=A({c:"pg_nav",href:""},_("Prev"));onEvent(e,"click",$b(a.prev,a));ACN(c,e);ACN(c,SPAN({c:"more_left"},"..."));ACN(c,SPAN({c:"pg_pages"}));ACN(c,SPAN({c:"more_right"},"..."));var d=A({href:"",c:"pg_nav"},_("Next"));onEvent(d,"click",$b(a.next,a));ACN(c,d)})},renderPages:function(c,b){var a=this;map($bytc("span","pg_pages"),function(e){setHTML(e,"");for(var d=c;d<=b;d++){var f=A({href:"",c:"pg_normal pg_"+d},""+d);onEvent(f,"click",$p($b(a.showPage,a),d));ACN(e,f)}})}});Friends=Class({init:function(e,a,c,d){this.user_id=a;this.holder="list";this.image_size=45;this.im_class=window.IM_ACTIVATED?"td_im":"td_im im_hide";this.item_count=c;this.bind_url=d;this.has_actions=false;this.page_count=10;this.has_action_row=true;this.show_action_help=true;this.mode=e;var b=0;if(top.SETTINGS){b=top.SETTINGS.view_plurks}switch(e){case"fans":this.empty_list=b==0?LI(_("You don't have any fans at this moment.")):LI(_("Currently you can't have fans. You need to allow the whole world to view your plurks first. "));this.str_confirm_remove=_("Are you sure you want to remove %s as fan?\nThe person will be blocked.");break;case"following":this.empty_list=LI(_("You are not following anyone at this moment."));this.str_confirm_remove=_("Are you sure you dont want to be fan of %s?\nThe person will not be notified.");break;default:this.str_confirm_remove=_("Are you sure you want to remove %s as friend?\nThe person will not be notified.");this.empty_list=LI(_("You have no friends. "),A({href:"/?window=invite"},_("It's very easy to Invite some!")));break}this.remove_url="/Users/removeFriend"},getImg:function(a,c){var b="http://plurk.com/static/default_medium.gif";if(a.has_profile_image){b=avatar_path(a,"medium")}return IMG({src:b,width:c,height:c})},getLocation:function(a){var b="";if(a.location){b=" from "+a.location}if(b.length>30){b=b.substring(0,30)+"..."}return b},getGender:function(a){return a.gender==1&&_("male")||_("female")},renderItem:function(k){var d=this._renderUserLink(k);var g=k.full_name;if(g.length>20){g=g.substring(0,20)+"..."}var c=SPAN({c:"nick_name"},g);var f=Utils.getYears(k.date_of_birth);if(f){f+=" "}var e="",h;if(k.only_fan==1){h="fan_only"}else{h="no_fan"}var b=DIV({c:"friend_moreInfo"},f,this.getGender(k),this.getLocation(k));if(k.karma){ACN(b,BR(),SPAN("karma: "+k.karma))}var a,i;var j=TABLE({c:"friend"},TBODY(TR(i=TD({c:"td_image "+h},this.getImg(k,"35")),TD({c:"td_content"},d,c,b),a=setHTML(TD({c:"td_action"}),"&nbsp;"))));setWidth(i,this.image_size);setHeight(i,this.image_size);if(this.has_action_row){RCN(a,this._renderActionRow(k))}else{RCN(a,GenericFollow.renderActionRow(k))}j.nick_name=c;return j},renderHelpRow:function(){return DIV({c:"div_action friend_action",align:"right"},TABLE({s:"height: auto"},TBODY(TR(this.mode!="friends"?"":TH({c:this.im_class},_("IM follow")),this.mode!="friends"?"":TH({c:"td_tl"},_("Timeline follow")),TH({c:"td_remove"},this.mode=="fans"?_("Remove and Block"):_("Remove"))))))},get:function(d,c){var a=loadJSON(this.bind_url);a.addCallback(c);var b={offset:d||0};if(this.user_id){b.user_id=this.user_id}a.sendReq(b)},renderList:function(){var g=this;var e=$(this.holder);RCN(e,null);var c=DIV({c:"pg_holder"});if(isIe()){ACN(e,DIV({s:"height: 40px;"},c))}else{ACN(e,DIV(c))}var d=this.ul=UL();ACN(e,d);var f;var a=DIV(f=DIV({c:"pg_holder"}));ACN(e,a);if(this.has_actions){var b=this.holder_action=DIV({c:"actions"});ACN(a,b)}if(this.item_count==0){ACN(d,this.empty_list)}else{if(this.has_action_row&&this.show_action_help){ACN(d,LI({s:"padding: 0"},this.renderHelpRow()))}this.holders=[f];if(this.item_count>this.page_count){this.holders.push(c)}new Paging(this)}},renderLi:function(b){var c;var a=LI(TABLE(TBODY(c=TR(TD({c:"td_item"},this.renderItem(b))))));return a},_renderUserLink:function(a){var c=a.display_name&&a.display_name.length?a.display_name:a.nick_name;var b=A({href:"/"+a.nick_name,c:"user_link"},c);onEvent(b,"click",function(){top.location="/"+a.nick_name});return b},_changeVal:function(f,h,a,e){var d=this;var g=getEventElm(e);if(g.disabled){return}g.disabled=true;var b=!f[h];var c=getRequest(a);c.addCallback(function(){f[h]=b;swapDOM(g,d._getOnOff(f,h,a));if(h=="following_tl"){top.TopBar.update_tl=true}});c.sendReq({friend_id:f.uid,value:b&&1||0,cur_user:top.SiteState.getSessionUser().id})},filter_plurk_buddy:true,_getOnOff:function(c,e,b){if(this.filter_plurk_buddy&&c.nick_name=="plurkbuddy"){return"-"}var d=c[e]&&"on"||"off";var a=IMG({c:"action_img",src:$static_path("/static/friends/"+d+".png")});onEvent(a,"click",$p($b(this._changeVal,this),c,e,b));return a},_getRemoveFriend:function(c,b){if(this.filter_plurk_buddy&&c.nick_name=="plurkbuddy"){return"-"}b=b||this._removeClick;var a=IMG({c:"action_img",src:"http://statics.plurk.com/e53f5da063e999cd58ac4a3c6c8d3fe3.gif"});a.item=c;AEV(a,"mouseover",function(d){addClass(getEventElm(d),"red_highlight")});AEV(a,"mouseout",function(d){removeClass(getEventElm(d),"red_highlight")});AEV(a,"click",$b(b,this));return a},_removeClick:function(g){var e=this;if(this.removing){return}this.removing=true;var d=getEventElm(g);var j=d.item;var c=j;var a=c.full_name;var h=c.gender&&"He"||"She";var b=format(_(this.str_confirm_remove),a);if(!confirm(b)){return true}ACN(d.parentNode,IMG({src:"http://statics.plurk.com/7f5c4282d2e9accfdae99cc6abb6c9bb.gif",c:"indicator_mini"}));var i=$gp(d,"li");removeElement(d);var f=getRequest(this.remove_url);f.addCallback(function(){e.removing=false;AJS.fx.fadeOut(i,{onComplete:function(){removeElement(i)}});top.TopBar.update_tl=true;top.SiteState.removeFriend(j.uid)});f.addErrback(function(){e.removing=false});f.sendReq({friend_id:d.item.uid})},_renderActionRow:function(a){return DIV({c:"div_action friend_action",align:"right"},TABLE(TBODY(TR(this.mode!="friends"?"":TH({c:this.im_class},this._getOnOff(a,"following_im","/Users/setFollowingIM")),this.mode!="friends"?"":TH({c:"td_tl shaded"},this._getOnOff(a,"following_tl","/Users/setFollowingTL")),TH({c:"td_remove"},this._getRemoveFriend(a))))))},_getYears:function(c){var b=new Date();var a=new Date(c);if(a.getUTCFullYear()==1970&&a.getUTCHours()==0&&a.getUTCMinutes()==0){return""}a=b-a;var e=a/1000;var f=Math.floor(e/(60*60*24));var d=Math.floor(f/365.25);return d.toString()}});InputHint={std_color:"#000",help_color:"#999",help_text:"kelis@smith.com, John Doe <john@doe.com>",attach:function(b,c){b.value=c||"";var a=$p($b(this._check,this),b);AEV(b,"blur",a);AEV(b,"focus",a);a()},_check:function(a){if(a.value==""){a.value=this.help_text;a.style.color=this.help_color}else{if(a.value==this.help_text){a.value="";a.style.color=this.std_color}else{a.style.color=this.std_color}}}};Invitations={check:function(a){var b=$("emails");if(b.value==""||b.value==InputHint.help_text){b.focus();b.value="";return false}return true},addIndicator:function(c,b){if(!$(b)){var a=IMG({src:"http://statics.plurk.com/7f5c4282d2e9accfdae99cc6abb6c9bb.gif",id:b});insertAfter(a,c)}},removeIndicator:function(a){if($(a)){removeElement($(a))}},openFindTwitterFriends:function(a){var b={twitter_id:$("twitter_id").value};return top.GB_showCenter(_("Find Twitter friends"),a+encodeArguments(b),550,650)},openFindFriends:function(a){var b={username:$("username").value,password:$("password").value,domain:$("domain").value};return top.GB_showCenter(_("Find friends"),a+encodeArguments(b),550,650)},openFacebookInviter:function(){return top.GB_showCenter(_("Invite your Facebook friends to Plurk!"),"/FacebookApp/invite",550,650)},openIMFindFriends:function(){var a={service:$("im_service").value,identifier:$("im_identifier").value,password:$("im_password").value};return top.GB_showCenter(_("Find your friends on Plurk"),"/Friends/getIMContacts?"+encodeArguments(a),550,650)}};Emoticons={basic:[[/(?:(\s+|^)):-?\)\)/,"http://statics.plurk.com/ff124032f8cc3a9d43b99e661f8fcb4d.gif",":-))"],[/(?:(\s+|^)):-?\)/,"http://statics.plurk.com/99ef3957ef779718546752b749bdeabd.gif",":-)"],[/(?:(\s+|^)):-?D/i,"http://statics.plurk.com/3385896779bf1c13188bf92ca516878e.gif",":-D"],[/(LOL)/,"http://statics.plurk.com/615f18f7ea8abc608c4c20eaa667883b.gif","(LOL)"],[/:-?P/i,"http://statics.plurk.com/2d5e21929e752498e36d74096b1965e1.gif",":-P"],[/\(woot\)/i,"http://statics.plurk.com/13b15aa49358be8f47b58552401d7725.gif","(woot)"],[/;-?\)/i,"http://statics.plurk.com/57c69f50e40a283dcd2e7b56fc191abe.gif",";-)"],[/:-?o/i,"http://statics.plurk.com/8eb05ca7a32301ba16c9496bcad893c4.gif",":-o"],[/X-?\(/,"http://statics.plurk.com/261c0fe4a88417146ae0292d697a5f52.gif","X-("],[/:-?\(/,"http://statics.plurk.com/11eed61b41a3e935773476ac33bc00d9.gif",":-("],[/:'-?\(/,"http://statics.plurk.com/72ddf2c585fe77dd0be731b19624d8cb.gif",":'-("],[/:-?&amp;/,"http://statics.plurk.com/2884b8d0e496c06136c86e9c9599edae.gif",":-&"]],silver:[[/(?:(\s+|^))\(K\)/,"http://statics.plurk.com/9454d15bcaf411b159dcc147ebc3f0eb.gif","(K)"],["(angry)","http://statics.plurk.com/a5ae31c4185bc60cd006650dc10f8147.gif","(angry)"],["(annoyed)","http://statics.plurk.com/35b16fc25623670e41c2be6bf8ac38c7.gif","(annoyed)"],[/\(bye\)|\(wave\)/,"http://statics.plurk.com/4afd784c0df9f7a3ceacb92beca543f6.gif","(wave)"],[/(?:(\s+|^))B-?\)/,"http://statics.plurk.com/c1c9870cf653fa3cd103d2eb0f519ccb.gif","B-)"],["(cozy)","http://statics.plurk.com/d1a6f08507b126ec6a215e6a2372e8bb.gif","(cozy)"],["(sick)","http://statics.plurk.com/5495d64ccb898ca596b061168fa0374a.gif","(sick)"],["(:","http://statics.plurk.com/b82e3225c92a764d225429a6487d9f04.gif","(:"],["(goodluck)","http://statics.plurk.com/65271ac2126706bc09d31ff67c525d67.gif","(goodluck)"],["(griltongue)","http://statics.plurk.com/a709dab8ddd26bd222466d31bd549579.png","(griltongue)"],[/(mmm)/,"http://statics.plurk.com/e3baa9d0d78c35e955a6b07c39f530fa.gif","(mmm)"],["(hungry)","http://statics.plurk.com/0f96595ed7733393b93a3d67aa4f2f4f.gif","(hungry)"],["(music)","http://statics.plurk.com/919b87048fdf7bd59dae457f4284b20b.gif","(music)"],["(tears)","http://statics.plurk.com/96872d481bbfe87aad5aed976c7de4ee.gif","(tears)"],["(tongue)","http://statics.plurk.com/56336bb821c4766001816639e55e5811.gif","(tongue)"],["(unsure)","http://statics.plurk.com/6cb1dc388b9259565efedef8f336d27d.gif","(unsure)"],["(highfive)","http://statics.plurk.com/a9560787e93f4f8890e4bd38696ba537.gif","(highfive)"],["(dance)","http://statics.plurk.com/a55bdb344892676b0fea545354654a49.gif","(dance)"],["(blush)","http://statics.plurk.com/9939dd585cf0e8d39e7912a98a9ce727.gif","(blush)"]],gold:[["(doh)","http://statics.plurk.com/e8ed6c7eed76d2acd9dbf469f29fbec2.gif","(doh)"],["(brokenheart)","http://statics.plurk.com/2b3593aea68efa7a00b4ef2850f98b8a.gif","(brokenheart)"],["(drinking)","http://statics.plurk.com/ed3620ff28a02e3dc9ac4ffa8e6ae2e6.gif","(drinking)"],["(girlkiss)","http://statics.plurk.com/08a43d50691a1ed22706fc92f568fa07.gif","(girlkiss)"],["(rofl)","http://statics.plurk.com/8600839dc03e6275b53fd03a0eba09cf.gif","(rofl)"],["(money)","http://statics.plurk.com/e6bb16b6ef386c5f23900b103dbdba31.gif","(money)"],["(rock)","http://statics.plurk.com/1c890273544559b17f090d09238fa763.gif","(rock)"],["(nottalking)","http://statics.plurk.com/f053074bcce500fbd1e2327d49748a6d.gif","(nottalking)"],["(party)","http://statics.plurk.com/1f44d3984a094fceae1f1a016a730fc9.gif","(party)"],["(sleeping)","http://statics.plurk.com/2f7c90ce56fb4a70e34c04d8d7692dd0.gif","(sleeping)"],["(thinking)","http://statics.plurk.com/900f3dd0adaad9142d567caf6bfb1311.gif","(thinking)"],["(bringit)","http://statics.plurk.com/95ace5ba1097301b5206a9e0fb431624.gif","(bringit)"],["(worship)","http://statics.plurk.com/95e69aa508d4bb435706b9db0a610dad.gif","(worship)"],["(applause)","http://statics.plurk.com/a08ed27ec14b48d4703f53f7eb94834b.gif","(applause)"],[/8-?\)/,"http://statics.plurk.com/85ef5fa01a6a67a525429f8bf4279fe7.gif","8-)"],[/(gym)/,"http://statics.plurk.com/986ecf2b1ae69072e0195b0a58545900.gif","(gym)"],[/(heart)/,"http://statics.plurk.com/150e3f367a063d3baf9720719d78d778.gif","(heart)"],[/(devil)/,"http://statics.plurk.com/3fabe74e992888be701de2a9d80c180a.gif","(devil)"],[/(lmao)/,"http://statics.plurk.com/92b595a573d25dd5e39a57b5d56d4d03.gif","(lmao)"]],platinum:[["(bigeyes)","http://statics.plurk.com/8073c1716e75d32eb79f97a9f521fa01.gif","(bigeyes)"],["(funkydance)","http://statics.plurk.com/373cd2f23dab7528d4875170d13d64f7.gif","(funkydance)"],["(idiot)","http://statics.plurk.com/8863234ebea13f109c9b15ba19a4531c.gif","(idiot)"],["(lonely)","http://statics.plurk.com/8738c7a1c402f41b5319abe504ce9687.gif","(lonely)"],["(scenic)","http://statics.plurk.com/db4c4a7d141fdcaca4d4b11f8fb360db.gif","(scenic)"],["(hassle)","http://statics.plurk.com/ced6d40bebe2d424b59322b311fc04bb.gif","(hassle)"],["(panic)","http://statics.plurk.com/b62d1e55e8311af5bc7526c595ac1dbb.gif","(panic)"],["(okok)","http://statics.plurk.com/9b6f4864c822e1a97c98507c2b41a74f.gif","(okok)"],["(yahoo)","http://statics.plurk.com/e49c8ae965452550c98fc7f99741ae0d.gif","(yahoo)"],["(cry)","http://statics.plurk.com/318416eab5a856bddb1e106a21ff557a.gif","(cry)"]],platinum_2:[["(banana_cool)","http://statics.plurk.com/4f01bac8a707e5450307f97065ec0fa7.gif","(banana_cool)"],["(banana_rock)","http://statics.plurk.com/48515125401120316abb97666458d05b.gif","(banana_rock)"],["(evil_grin)","http://statics.plurk.com/aabbc82c2b0dc72bfbce2f82c97a95e8.gif","(evil_grin)"],["(headspin)","http://statics.plurk.com/b0b0596acce9ffc1f2a27548aa642eaf.gif","(headspin)"],["(heart_beat)","http://statics.plurk.com/52991d7ff65a05526454bd1170a0f14c.gif","(heart_beat)"],["(ninja)","http://statics.plurk.com/846277f0a154dc95a08594b7d32a5ccd.gif","(ninja)"],["(haha)","http://statics.plurk.com/843739a95294fd0bf4c958840b46408f.gif","(haha)"],["(evilsmirk)","http://statics.plurk.com/22416dced8b59446db8cd366cc925d09.gif","(evilsmirk)"],["(eyeroll)","http://statics.plurk.com/e3f0f67ca3af62e34f13abf1d036a010.gif","(eyeroll)"]],karma100:[["(muhaha)","http://statics.plurk.com/84f94a47fcaf1df0a5f17a1cfa52fa64.gif","(muhaha)"],[/\(rammi\)|\(taser\)/,"http://statics.plurk.com/44117848701cd748460921cfea5c3781.gif","(taser)"],["(banana_ninja)","http://statics.plurk.com/88f6dda8d290f66a923c1116a2a2b4ab.gif","(banana_ninja)"],["(beer)","http://statics.plurk.com/eeaf87c619a0221ec9fa06413fd2d5dc.gif","(beer)"],["(coffee)","http://statics.plurk.com/48ec47723cb34be3fcbc914e591e69cd.gif","(coffee)"],["(fish_hit)","http://statics.plurk.com/259a728a690204148037fbee7e2ca2d3.gif","(fish_hit)"],["(muscle)","http://statics.plurk.com/4383af0e055bce112176c5104deeaadf.gif","(muscle)"],["(smileydance)","http://statics.plurk.com/70722ab5756c3b89c86d85feab91725d.gif","(smileydance)"]],all_paths:{},isEmoticon:function(c){var b=Emoticons.all_paths;if(!Emoticons.inited_paths){var a=Emoticons.generateEmoticons("all",{karma:100,recruited:50});map(a,function(d){b[d[1]]=true});Emoticons.inited_paths=true}return b[c]},is_inited:false,init:function(){},_init:function(){if(this.is_inited){return false}var f=DIV({id:"emoticon_selecter"});var d,a,e,c;ACN(f,DIV({id:"emoticons_tabs"},e=UL(a=LI({c:"emoticon_selecter"},A({href:"#"},_("Extra set"))),d=LI({id:"emo_basic",c:"emoticon_selecter"},A({href:"#"},_("Basic set"))))));var b=Emoticons.selectEmoTab;AEV(d,"click",$p(b,d,"basic"));AEV(a,"click",$p(b,a,"extra"));if(SiteState.getSessionUser()&&SiteState.getSessionUser().karma==100){appendToTop(e,c=LI({c:"emoticon_selecter"},A({href:"#"},_("Karma 100"))));AEV(c,"click",$p(b,c,"karma_100"))}ACN(f,DIV({id:"emoticons_show"}));hideElement(f);ACN(getBody(),f);AEV(document,"click",function(h){var i=getEventElm(h);var g=$gp(i,"div");if(g&&g.id=="emoticons_tabs"){return true}if(Emoticons.shown&&!hasClass(i,"emoticon_selecter_img")){Emoticons.forceHide()}});this.is_inited=true;Emoticons.selectEmoTab($("emo_basic"),"basic")},selectEmoTab:function(c,a,b){if(b){preventDefault(b)}removeClass($bytc("li",null,$("emoticons_tabs")),"current");addClass(c,"current");Emoticons.showEmoticons(a);return false},generateEmoticons:function(d,b){if(!b){b=SiteState.getSessionUser()}var e=b&&b.recruited||0;var c=b&&b.karma||0;var a=[];if(d=="basic"||d=="all"){a=a.concat(Emoticons.basic);if(c>=25){a=a.concat(Emoticons.silver)}}if(d=="extra"||d=="all"){if(e>=10){a=a.concat(Emoticons.platinum)}if(c>=50){a=a.concat(Emoticons.gold)}if(c>=81){a=a.concat(Emoticons.platinum_2)}}if(d=="karma_100"||d=="all"){if(c>=100){a=a.concat(Emoticons.karma100)}}return a},showEmoticons:function(f){var b=SiteState.getSessionUser();var a=b&&b.karma||0;var j=Emoticons.generateEmoticons(f);var k,e;var m=TABLE(e=TBODY(k=TR()));var g=null;if(a<50){var h=A({href:"#",c:"red_link"},_("Want extra exclusive emoticons?"));AEV(h,"click",function(){return GB_showCenter(_("Exclusive emoticons"),"/Help/extraSmilies",300,440)});g=DIV({s:"padding: 5px 0 5px 10px"},h)}RCN($("emoticons_show"),DIV(m,g));for(var d=0;d<j.length;d++){var l=j[d];var c=A({href:"#",c:"a_emoticon"},IMG({src:l[1]}));c.emo_type=l[2];AEV(c,"click",$p(Emoticons.select,c));if(d>0&&d%8==0){k=TR();ACN(e,k)}ACN(k,TD(c))}},select:function(d){var c=d.emo_type;var a=$(Emoticons.cur_input);var b="";if(strip(a.value)!=""){b=" ";if(getLast(a.value)==" "){b=""}}InputUtil.insertAtCursor(a,b+c);if(window.location.toString().indexOf("/p/")==-1){window.scrollTo(0,0)}return false},forceHide:function(){hideElement($("emoticon_selecter"));Emoticons.shown=false},insertPack:function(a,b){map(a,function(c){b(IMG({src:c[1],c:"emoticon"}))})},shown:false,cur_input:null,toggle:function(b,d){Emoticons._init();Emoticons.cur_input=b;var h=getEventElm(d);var c=$("emoticon_selecter");setVisibility(c,false);showElement(c);var e={w:100,to:300};var g=absolutePosition(h);setStyle(c,{top:g.y+30,left:g.x-c.offsetWidth+e.w});if(Emoticons.shown){hideElement(c)}else{showElement(c)}setVisibility(c,true);Emoticons.shown=!Emoticons.shown;if(Emoticons.shown){if(b=="input_big"){window.scrollTo(0,e.to)}else{var f=getWindowSize().h;var a=g.y+30+e.to;if((f+getScrollTop())<a){window.scrollTo(0,g.y-300)}}}else{window.scrollTo(0,0)}}};
