AmiMenu=AJS.Class({init:function(a){AJS.bindMethods(this);this.args=a||{};this.menu_holder=AJS.DIV({"class":"AmiMenu"});AJS.hideElement(this.menu_holder);this.menu_table=AJS.TABLE({cellpadding:0,cellspacing:0});this.menu=AJS.TBODY();AJS.ACN(this.menu_table,this.menu);AJS.ACN(this.menu_holder,this.menu_table);AJS.ACN(AJS.getBody(),this.menu_holder);this.top_offset=0;this.show_above=false;this.shown=false;this.current_item=null;this.hide_menu_icon=false;this.set_left=true},_createListItem:function(c){var a=AJS.TD();if(c.onclick){var b=this;AJS.AEV(a,"click",$p(c.onclick,a))}if(c.extra=="fade_item"){this.fade_item=c.view}AJS.AEV(a,"mouseover",AJS.$p(this.mouseOver,a));AJS.AEV(a,"mouseout",AJS.$p(this.mouseOut,a));if(c.cls){AJS.addClass(a,c.cls)}if(c.extra&&c.extra.cls){AJS.addClass(a,c.extra.cls)}AJS.ACN(a,c.view);return AJS.TR(a)},_createSeparator:function(){return AJS.TR(AJS.TD({"class":"separator"}))},mouseOut:function(a){AJS.removeClass(a,"on")},mouseOver:function(a){AJS.addClass(a,"on")},clearItems:function(){var a=AJS.TBODY();swapDOM(this.menu,a);this.menu=a},removeMenu:function(){removeElement(this.menu)},addItem:function(a){var b;if(a.type=="item"){b=this._createListItem(a)}if(a.type=="separator"){b=this._createSeparator();a.view=b}AJS.ACN(this.menu,b)},addItems:function(){var a=this;AJS.map(arguments,AJS.$b(function(b){a.addItem(b)},this))},_show:function(a){this.shown=true;this.current_item=a;if(a){a.menu_shown=true}},show:function(e,d){if(!d||!d.x){d=AJS.absolutePosition(e)}var c=getWindowSize();var b=d.x;var a=this.menu_holder.offsetWidth;if(this.set_left){if((b+a+15)>c.w){AJS.setLeft(this.menu_holder,d.x-a+15)}else{AJS.setLeft(this.menu_holder,d.x)}}this._show(e);$sv(this.menu_holder,false);AJS.showElement(this.menu_holder);if(this.show_above){AJS.setTop(this.menu_holder,d.y+e.offsetHeight-this.menu_holder.offsetHeight+this.top_offset)}else{AJS.setTop(this.menu_holder,d.y+e.offsetHeight+this.top_offset)}$sv(this.menu_holder,true)},toggle:function(b,a){this.current_holder=a;if(this.shown){this.hide(null,true);if(b!=this.current_item){this.show(b)}}else{this.show(b)}return false},_hideMenuIcon:function(d,c){if(c&&d){var b=getParentBytc(c,"li");var a=getParentBytc(d,"li");if(b==a){return false}}if(d&&this.shown&&this.hide_menu_icon){d.menu_shown=false;d.style.visibility="hidden"}},hide:function(b,a){var d=b&&AJS.getEventElm(b);if(AJS.isSafari()){map($FA(this.menu.childNodes),function(f){var e=f.firstChild;removeClass(e,"on")})}var c=this.current_item;if(a){this._hideMenuIcon(c,d);this.shown=false;AJS.hideElement(this.menu_holder);return false}if(AJS.hasClass(d,"menu")||AJS.hasClass(d,"icon")){return}this._hideMenuIcon(c,d);this.shown=false;AJS.hideElement(this.menu_holder)}});function createItem(d,c,b){b=b||{};var a={view:AJS.DIV(),type:"item",onclick:c,extra:b};a.view.extra=b;if(isString(d)){a.view.innerHTML=d}else{ACN(a.view,d)}if(b&&b.extra_txt){AJS.ACN(a.view,SPAN({c:"extra_txt"}," ("+b.extra_txt+")"))}return a}function createSeparator(){return{type:"separator"}}function hoverOn(a){AJS.addClass(a,"hovering")}function hoverOff(a){AJS.removeClass(a,"hovering")}function hoverAttach(a){AJS.AEV(a,"mouseover",AJS.$p(hoverOn,a));AJS.AEV(a,"mouseout",AJS.$p(hoverOff,a))}var AmiTT;var AmiTT_shown=false;var AmiTT_alignment="left";var AmiTooltip={cur_elm:null,init:function(){if(AmiTT){return}AmiTT=AJS.DIV({c:"AmiTT_main AmiTT_left"});AmiTooltip.updateAlignment();AJS.hideElement(AmiTT);AJS.ACN(AJS.getBody(),AmiTT)},updateAlignment:function(){if(AmiTT.className.indexOf(AmiTT_alignment)==-1){AmiTT.className="AmiTT_main AmiTT_"+AmiTT_alignment}},setAlignment:function(a){AmiTT_alignment=a;AmiTooltip.updateAlignment()},show:function(e,d,c,b,a){AmiTooltip.cur_elm=e;setVisibility(e,false);AmiTT_shown=true;AJS.RCN(AmiTT,d);AmiTooltip.top_offset=b;AmiTooltip.left_offset=a;AJS.showElement(AmiTT);setVisibility(e,true);AmiTooltip.locate(e,c);return false},hide:function(){AmiTT_shown=false;setTimeout(function(){if(!AmiTT_shown){AJS.hideElement(AmiTT);AmiTooltip.cur_elm=null;AmiTooltip.top_offset=0;AmiTooltip.left_offset=0}},100);return false},locate:function(h,c){if(!h){return}c=c||window.event;var g=absolutePosition(AmiTooltip.cur_elm);var f=g.x-5,b=AmiTT.offsetWidth,a=AJS.getWindowSize().w;if(f+b+20>a){f-=b-20;if(AmiTT_alignment=="left"){AmiTooltip.setAlignment("right")}}else{if(AmiTT_alignment=="right"){AmiTooltip.setAlignment("left")}}var d=$gp(h,"div","list");if(d&&d.scrollTop){g.y-=d.scrollTop}if(isNumber(AmiTooltip.top_offset)){g.y+=AmiTooltip.top_offset}if(isNumber(AmiTooltip.left_offset)){f+=AmiTooltip.left_offset}var e=g.y+AmiTooltip.cur_elm.offsetHeight+2;AJS.setTop(AmiTT,e);AJS.setLeft(AmiTT,f)}};AJS.AEV(window,"load",AmiTooltip.init);Qualifiers={qual_to_en:{},init:function(){var c=this;var b=keys(LANG_QUAL);map(b,function(e){var f=c.qual_to_en[e]={};var d=LANG_QUAL[e];map(keys(d),function(g){f[d[g]]=g})});var a={};map(b,function(d){a[d]=keys(c.qual_to_en[d])});this.matchers=a},getFirstWQual:function(b,e){if(!Qualifiers.matchers){Qualifiers.init()}e=e||"en";var d=b.split(/[.,\s]/);if(d.length>0){var c=getFirst(d).toLowerCase();var a=Qualifiers.matchers[e];if(a&&c&&isIn(c,a)){return c}}return null},transformContentQualifer:function(d,f,h){var c=isIn(d,[":","freestyle"]);try{var b=this.getFirstWQual(f,h)}catch(g){var b=null}var a=b&&b.length||0;if(b&&h!="en"){a=b.length;try{b=Qualifiers.qual_to_en[h][b]}catch(g){b=null}}if(c&&b){f=f.substring(a);d=b;c=false}return[d,f.replace(/^\s*/,"").replace(/\s*$/,"")]},format:function(f,j,o,k,a,l){var p=o.split(/\s/);var r=f.display_name&&f.display_name.length?f.display_name:f.nick_name;var q=A({href:"/"+f.nick_name,c:"name"},r);q.user_id=f.id;if(window.InfoOverlay){InfoOverlay.atttach(q)}if(window.Plurks){AEV(q,"click",Plurks.noExapndOnAction);if(!Plurks.show_exapnd){onEvent(q,"click",function(){return false})}}if(k){q=r}var b=setHTML(SPAN(),"&nbsp;");var c=Qualifiers.transformContentQualifer(j,o,a);j=c[0];o=c[1];is_freestyle=isIn(j,[":","freestyle"]);if(!is_freestyle){var h=this._(f.gender,a,j);b=SPAN({c:"qualifier q_"+j},h)}var e=SPAN;if(isIe()){e=DIV}var m;if(window.IS_RTL&&!isIn(a,["ar","he"])){m=e(b,q)}else{m=e(q,b)}var d=2+r.length;d+=b.innerHTML.length;var g=DIV({c:"text_holder"});setHTML(g,o);if(window.Media){Media.attach(g,l)}return[m,g,d]},getQual:function(a){return a.className.match(/q_.+/)[0].replace("q_","")},_:function(c,d,b){var a;d=d||"en";if(window.LANG_QUAL&&LANG_QUAL[d]){a=LANG_QUAL[d][b]}if(isArray(a)){if(c==1){a=a[0]}else{a=a[1]}}if(a){return a}return null}};AEV(window,"load",$b(Qualifiers.init,Qualifiers));QualifierMenu=new Class({_:function(a){user=SiteState.getSessionUser();return Qualifiers._(user.gender,this.cur_lang,a)},init:function(g,h,a,d,b,c){var f=this;this.holder=g;this.input=h;this.cookie=a;this.char_span=b;var j=this.QualMenu=new AmiMenu();j.show_above=true;j.right_side_show=true;j.top_offset=d;this.menu_holder=j.menu_holder;addClass(j.menu_holder,"qual_menu");var e=function(m,o){var k=o||m;var l=o||"";return createItem(m,$b(f.changeQual,f),{cls:"q_"+k,extra_txt:l})};this.cur_lang="en";j.addItems(e(":","freestyle"),e("loves"),e("likes"),e("shares"),e("gives"),e("hates"),e("wants"),e("wishes"),e("needs"),e("will"),e("hopes"),e("asks"),e("has"),e("was"),e("wonders"),e("feels"),e("thinks"),e("says"),e("is"));AEV(document,"click",$b(this.hideDDMenu,this));this.updateSessionQual();if(c){addClass(this.menu_holder,c)}this.share_menu=new ShareMenu(this,c)},changeMenuLang:function(e,f){var d=this;if(f=="en_fo"){f="en"}this.cur_lang=f;var c=$bytc("td",null,this.menu_holder);map(c,function(l){if(hasClass(l,"q_freestyle")){var g=$gc(l,"span","extra_txt");var j=d._("freestyle");if(j){setHTML(g," ("+j+")")}else{setHTML(g," ("+_("freestyle")+")")}return}var k=$gp(l,"tr");var h=Qualifiers.getQual(l);var j=d._(h);if(j){setHTML($gc(l,"div"),j);showElement(k)}else{hideElement(k)}});var b=Qualifiers.getQual(e);if(b!="freestyle"){var a=d._(b);if(a){setHTML(e,a)}else{setHTML(e,d._("says"));removeClass(e,"q_"+b);addClass(e,"q_says")}}},updateSessionQual:function(){this.updateQualifer(SiteState.getSessionUser()[this.cookie])},removeMenu:function(){this.QualMenu.removeMenu();this.QualMenu=null;this.input=null;this.cookie=null},updateQualifer:function(a){var b=this.holder;setClass(b,"m_qualifier");if(a=="freestyle"){a=":";addClass(b,"q_freestyle")}else{addClass(b,"q_"+a)}b.innerHTML=this._(a)||""},changeQual:function(d){var c=$bytc("div",null,d)[0];var a=c.extra.cls.replace("q_","").replace("m_qualifier","");this.updateQualifer(a);this.input.select();this.hideDDMenu();var b=this.cookie;if(b!="default_qual_mini"||b=="default_qual_mini"&&isIn(a,["freestyle","says"])){PlurkAdder.saveUserValue(this.cookie,a)}},hideDDMenu:function(a){var b;if(a){b=getEventElm(a)}if(!a||!hasClass(b,"dd_img")&&!hasClass(b,"extra_txt")&&!hasClass(b,"m_qualifier")){this.QualMenu.hide();this.share_menu.hide()}},showDDMenu:function(){this.QualMenu.toggle(this.img,this.img);if(this.QualMenu.shown){this.share_menu.show(this.QualMenu.menu_holder)}else{this.share_menu.hide()}return false}});ShareMenu=new Class({init:function(c,b){var e=this.menu=new AmiMenu();addClass(e.menu_holder,"share_menu");var d=this;var a=function(j,h,g){var f=h||qual;return createItem(j,$b(g,d),{cls:"q_"+f})};e.addItems(a(_("photo"),_("photo"),this.showPhoto));e.addItems(a(_("webcam photo"),_("photo"),this.showWebCamPhoto));e.addItems(a(_("youtube")+"+"+_("music"),_("video"),this.showVideo));e.addItems(a(_("link"),_("link"),this.showLink));this.is_mini=0;if(b){addClass(e.menu_holder,b);this.is_mini=1}this.holder=c},showPhoto:function(){return GB_showCenter(_("Share a photo"),"/Shares/showPhoto?mini="+this.is_mini,400,440)},showWebCamPhoto:function(){return GB_showCenter(_("Share a photo"),"/DailyPhoto/uploadWebcam?mini="+this.is_mini,440,735)},showLink:function(){return GB_showCenter(_("Share a link"),"/Shares/showLink?mini="+this.is_mini,400,440)},showVideo:function(){return GB_showCenter(_("Share a YouTube video"),"/Shares/showVideo?mini="+this.is_mini,400,650)},hide:function(){this.menu.hide()},show:function(b){var c=this.menu;c._show();$sv(c.menu_holder,false);AJS.showElement(c.menu_holder);var a=$gc(b,"td","q_shares");var d=absolutePosition(a);d.x+=a.offsetWidth;setLeft(c.menu_holder,d.x+1);if(!isMozilla()){d.y+=1}setTop(c.menu_holder,d.y);$sv(c.menu_holder,true)}});__q_loves=_("loves");__q_likes=_("likes");__q_shares=_("shares");__q_gives=_("gives");__q_hates=_("hates");__q_wants=_("wants");__q_wishes=_("wishes");__q_needs=_("needs");__q_will=_("will");__q_hopes=_("hopes");__q_asks=_("asks");__q_has=_("has");__q_was=_("was");__q_wonders=_("wonders");__q_feels=_("feels");__q_thinks=_("thinks");__q_says=_("says");__q_is=_("is");Formatter={re_short_url:/\[url:([0-9a-z]{6}):(.*?)\]/g,realOwnLinks:function(b){var a=function(e,d,c){return"http://"+c};return b.replace(Formatter.re_short_url,a)}};function buildFriendCollection(c,a){c=c||window.COMPLETION;collection=[];if(c){if(window.SiteState){var b=SiteState.getSessionUser();c[b.id]=b}map(keys(c),function(d){var e=c[d];if(e.nick_name!="plurkbuddy"){var f=e.full_name;if(e.display_name&&e.display_name!=e.nick_name){f+=" - "+e.display_name+""}f+=" <"+e.nick_name+">";collection.push(f)}})}if(a&&window.CLIQUES){map(CLIQUES,function(d){collection.push(d.name+" <CLIQUE>")})}collection.sort()}collectionIndex=new Array();AmiComplete={siw:null,inited:false,init:function(){if(!this.inited){AEV(document,"keydown",AmiComplete.handleKeyDown);AEV(document,"keyup",AmiComplete.handleKeyPress);AEV(document,"mouseup",AmiComplete.handleClick);AEV(document,"mousemove",AmiComplete.handleMouseOver);ACN(getBody(),DIV({id:"smartInputFloater",c:"floater"},TABLE(TBODY(TR(TD({id:"smartInputFloaterContent",nowrap:"nowrap"}))))))}this.inited=true},handleKeyPress:function(f){var d=AmiComplete.siw;var c=getEventElm(f);var a=isWithinNode(c,null,"wickEnabled",null,null);var b=f.key;if(d&&((b==13)||(b==9)||(b==188)||(b==190))){d.selectingSomething=true;hideSmartInputFloater()}else{if(a&&(b!=38)&&(b!=40)&&(b!=37)&&(b!=39)&&(b!=13)&&(b!=27)){if(!d||(d&&!d.selectingSomething)){processSmartInput(a)}}}preventDefault(f);return false},handleKeyDown:function(h){var f=h.key;var d=AmiComplete.siw;var c=getEventElm(h);var b=true;if(c&&hasClass(c,"wickEnabled")&&c.value==""&&f==8){var a=getParentBytc(c,"li");var g=a.previousSibling;if(g&&hasClass(g,"person")){removeElement(g)}}if(d){if(f==40){d.selectingSomething=true;selectNextSmartInputMatchItem()}else{if(f==38){d.selectingSomething=true;selectPreviousSmartInputMatchItem()}else{if((f==13)||(f==9)||(f==188)||(f==190)){d.selectingSomething=true;activateCurrentSmartInputMatch()}else{if(f==27){hideSmartInputFloater();d.inputBox.value=""}else{d.selectingSomething=false;b=false}}}}}else{b=false}if(b){preventDefault(h);return false}},handleFocus:function(c){var b=AmiComplete.siw;var a=getEventElm(c);if(focEl=isWithinNode(a,null,"wickEnabled",null,null)){if(!b||(b&&!b.selectingSomething)){processSmartInput(focEl)}}},handleBlur:function(b){var a=AmiComplete.siw;if(a&&a.anchor_focus){return}eL=getEventElm(b);if(blurEl=isWithinNode(eL,null,"wickEnabled",null,null)){if(a&&!a.selectingSomething){hideSmartInputFloater()}}},handleClick:function(b){var a=AmiComplete.siw;if(a&&a.selectingSomething){selectFromMouseClick();if(a.inputBox.onadd){a.inputBox.onadd()}}},handleMouseOver:function(c){var b=AmiComplete.siw;var a=getEventElm(c);if(b&&(mEl=isWithinNode(a,null,"matchedSmartInputItem",null,null))){b.selectingSomething=true;selectFromMouseOver(mEl)}else{if(b){b.selectingSomething=false}}},createItem:function(f,d){var b=AmiComplete.siw;var a;var e=f;if(e.length>20){e=e.substring(0,20)+"..."}var c=LI({c:"person token"},DIV(e,a=IMG({src:"http://statics.plurk.com/e53f5da063e999cd58ac4a3c6c8d3fe3.gif"})));c.nick_name=d;c.full_name=f;onEvent(c,"click",function(h){var j=getEventElm(h);var g=nodeName(j)=="li"&&j||getParentBytc(j,"li");removeElement(g);if(b.inputBox.onadd){b.inputBox.onadd()}});return c}};function isWithinNode(g,b,j,a,f){var d=false;var h=g;while(h&&!d){if((h.id&&(h.id==b))||(h.className&&(h.className==b+"Class"))||(!a&&j&&h.className&&(h.className==j))||(!a&&j&&h.className&&(h.className.indexOf(j)!=-1))||(a&&h.tagName&&(h.tagName.toLowerCase()==a))||(f&&(h==f))){d=h}else{h=h.parentNode}}return h}function showSmartInputFloater(){var b=AmiComplete.siw;if(!b.floater.style.display||(b.floater.style.display=="none")){if(!b.customFloater){var c=absolutePosition(b.inputBox);var a=c.x;var d=c.y;setLeft(b.floater,a);setTop(b.floater,d+b.inputBox.offsetHeight+5)}b.floater.style.display="block";b.floater.style.visibility="visible"}}function hideSmartInputFloater(){var a=AmiComplete.siw;if(a){a.floater.style.display="none";a.floater.style.visibility="hidden";AmiComplete.siw=null}}function processSmartInput(b){var c=AmiComplete.siw;if(!c){c=AmiComplete.siw=new smartInputWindow()}c.inputBox=b;var f=b.className.split(" ");var a=null;for(i=0;(!a&&f[i]);i++){if(f[i].indexOf("wickEnabled")!=-1){a=f[i]}}if(a&&(a.indexOf(":")!=-1)){c.customFloater=true;var e=a.split(":")[1];c.floater=$(e);c.floaterContent=c.floater.getElementsByTagName("div")[0]}setSmartInputData();if(c.matchCollection&&(c.matchCollection.length>0)){selectSmartInputMatchItem(0)}var d=getSmartInputBoxContent();if(d){modifySmartInputBoxContent(d);showSmartInputFloater();if(!isIe()){setTimeout(focusCurrent,20)}}else{hideSmartInputFloater()}}function smartInputMatch(a,b){this.cleanValue=a;this.value=b;this.isSelected=false}function simplify(a){return a.replace(/^[ \s\f\t\n\r]+/,"").replace(/[ \s\f\t\n\r]+$/,"")}function getUserInputToMatch(d){var c=d;var b=d.split(",");if(b.length>0){c=b[b.length-1]}return c}function getUserInputBase(){var c=AmiComplete.siw;var d=c.inputBox.value;var b=d;if((lastComma=d.lastIndexOf(","))!=-1){b=b.replace(/^(.*\,[ \r\n\t\f\s]*).*$/i,"$1")}else{b=""}return b}function runMatchingLogic(g,d){var e=AmiComplete.siw;var g=simplify(g);var o=g.charAt(0).toLowerCase();if(o=='"'){o=(n=g.charAt(1))?n.toLowerCase():"z"}if(d){g=o}if(e){e.matchCollection=new Array()}var b=collection;if(e&&e.revisedCollection&&(e.revisedCollection.length>0)&&e.lastUserInput&&(g.indexOf(e.lastUserInput)==0)){b=e.revisedCollection}else{if(collectionIndex[g]&&(collectionIndex[g].length>0)){b=collectionIndex[g]}else{if(collectionIndex[o]&&(collectionIndex[o].length>0)){b=collectionIndex[o]}else{if(e&&(g.length==1)&&(!collectionIndex[o])){e.buildIndex=true}else{if(e){e.buildIndex=false}}}}}var p=new Array();var k=new RegExp('([ "><-]*)('+g+")","i");var c=new RegExp('([ "><-]+)('+g+")","i");var m=new RegExp('([ "}{-]*)('+g+")","gi");var l=new RegExp('([ "}{-]+)('+g+")","gi");for(var h=0,f=0;(h<b.length);h++){var r=((!d)&&(f<e.MAX_MATCHES));var q=b[h];var a=simplify(q);if(!d&&(a.indexOf(g)==0)){var g=g.replace(/\>/gi,"\\}").replace(/\< ?/gi,"\\{");var s=new RegExp("("+g+")","i");if(r){e.matchCollection[f]=new smartInputMatch(q,a.replace(/\>/gi,"}").replace(/\< ?/gi,"{").replace(s,"<b>$1</b>"))}p[f]=q;f++}else{if(a.match(k)||a.match(c)){if(!d&&r){e.matchCollection[f]=new smartInputMatch(q,a.replace(/\>/gi,"}").replace(/\</gi,"{").replace(m,"$1<b>$2</b>").replace(l,"$1<b>$2</b>"))}p[f]=q;f++}}}if(e){e.lastUserInput=g;e.revisedCollection=p.join(",").split(",");collectionIndex[g]=p.join(",").split(",")}if(d||e.buildIndex){collectionIndex[o]=p.join(",").split(",");if(e){e.buildIndex=false}}}function setSmartInputData(){var b=AmiComplete.siw;if(b){var c=b.inputBox.value;var c=getUserInputToMatch(c);var a=c.toLowerCase().replace(/[\r\n\t\f\s]+/gi," ").replace(/^ +/gi,"").replace(/ +$/gi,"").replace(/ +/gi," ").replace(/\\/gi,"").replace(/\[/gi,"").replace(/\(/gi,"").replace(/\./gi,".").replace(/\?/gi,"");if(a&&(a!="")&&(a!='"')){runMatchingLogic(a)}else{b.matchCollection=null}}}function getSmartInputBoxContent(){var d=AmiComplete.siw;var b=null;if(d&&d.matchCollection&&(d.matchCollection.length>0)){b="";for(i=0;i<d.matchCollection.length;i++){var g=d.matchCollection[i].isSelected;var c=g?" selectedSmartInputItem":"";var e=g?' id="wick_cur"':"";var f=d.matchCollection[i].value.replace(/\{ */gi,"&lt;").replace(/\} */gi,"&gt;");if(f.length>50){f=f.substring(0,50)+"..."}b+='<p class="matchedSmartInputItem'+c+'"><a href="javascript:;"'+e+">"+f+"</a></p>"}}if(d.matchCollection&&d.matchCollection.length==0){b='<p class="matchedSmartInputItem">No matches</p>'}return b}function modifySmartInputBoxContent(b){var a=AmiComplete.siw;a.floaterContent.innerHTML='<div id="smartInputResults">'+b+"</div>";a.matchListDisplay=$("smartInputResults")}function focusCurrent(){var a=AmiComplete.siw;if(a.matchCollection.length<=6){return}if(!a){return}var b=$("wick_cur");if(b){a.anchor_focus=true;b.focus();a.anchor_focus=false;a.inputBox.focus()}}function selectFromMouseOver(d){var c=AmiComplete.siw;var a=getCurrentlySelectedSmartInputItem();if(a!=null){deSelectSmartInputMatchItem(a)}var b=getIndexFromElement(d);selectSmartInputMatchItem(b);modifySmartInputBoxContent(getSmartInputBoxContent());focusCurrent()}function selectFromMouseClick(){var a=AmiComplete.siw;activateCurrentSmartInputMatch();a.inputBox.focus();hideSmartInputFloater()}function getIndexFromElement(b){var a=0;while(b=b.previousSibling){a++}return a}function getCurrentlySelectedSmartInputItem(){var a=AmiComplete.siw;var b=null;for(i=0;((i<a.matchCollection.length)&&!b);i++){if(a.matchCollection[i].isSelected){b=i}}return b}function selectSmartInputMatchItem(a){var b=AmiComplete.siw;b.matchCollection[a].isSelected=true}function deSelectSmartInputMatchItem(a){var b=AmiComplete.siw;b.matchCollection[a].isSelected=false}function selectNextSmartInputMatchItem(){var b=AmiComplete.siw;var a=getCurrentlySelectedSmartInputItem();if(a!=null){deSelectSmartInputMatchItem(a);if((a+1)<b.matchCollection.length){selectSmartInputMatchItem(a+1)}else{selectSmartInputMatchItem(0)}}else{selectSmartInputMatchItem(0)}modifySmartInputBoxContent(getSmartInputBoxContent());focusCurrent()}function selectPreviousSmartInputMatchItem(){var b=AmiComplete.siw;var a=getCurrentlySelectedSmartInputItem();if(a!=null){deSelectSmartInputMatchItem(a);if((a-1)>=0){selectSmartInputMatchItem(a-1)}else{selectSmartInputMatchItem(b.matchCollection.length-1)}}else{selectSmartInputMatchItem(b.matchCollection.length-1)}modifySmartInputBoxContent(getSmartInputBoxContent());focusCurrent()}function activateCurrentSmartInputMatch(){var d=AmiComplete.siw;var c=getUserInputBase();var b;if((b=getCurrentlySelectedSmartInputItem())!=null){var g=d.matchCollection[b].cleanValue;var f=g.match(/<(.+)>/,g)[1];var h=g.replace(/\s*<(.+)>/,"");g=g.replace(/\s*<.+>/,"");var e=$bytc("li","person",d.inputBox.parentNode.parentNode);var a=map(e,function(j){if(j.full_name==h){return true}});if(!a){insertBefore(AmiComplete.createItem(g,f),d.inputBox.parentNode)}d.inputBox.value="";runMatchingLogic(g,true);if(d.inputBox.onadd){d.inputBox.onadd()}}}function smartInputWindow(){this.customFloater=false;this.floater=$("smartInputFloater");this.floaterContent=$("smartInputFloaterContent");this.selectedSmartInputItem=null;this.MAX_MATCHES=25}function enableWick(a){a.setAttribute("autocomplete","OFF");AEV(a,"keypress",function(b){if(isIn(b.key,[38,40])){preventDefault(b);return false}});AEV(a,"focus",AmiComplete.handleFocus);AEV(a,"blur",AmiComplete.handleBlur)}function createListHolder(d,c){var b;var a=DIV({c:"auto_ta",id:d},UL(LI({c:"token"},b=INPUT({c:"wickEnabled",type:"text",id:c}))));AEV(a,"click",function(){$(c).focus()});AEV(b,"keyup",function(g){var f=b.value.length;if(f>=5){setWidth(b,100)}else{if(f>=30){setWidth(b,200)}else{setWidth(b,30)}}});enableWick(b);return[a,b]}PAGE_TITLE_TO=null;Profile={with_name:true,renderFriend:function(f,c){if($("fan_managment")){if(f){insertBefore($("fan_managment"),$("friend_managment"))}else{insertAfter($("fan_managment"),$("h2_fans"))}}c=c||SiteState.getPageUser();c.are_friends=f;var e,a,b;if(f){a=format(_("Remove %s as friend"),Profile.getNick(c,true));b="remove";e=this.removeFriend}else{if(c.friend_status==0){a=_("Cancel friendship request");b="pending";e=this.removePedning}else{a=format(_("Add %s as friend"),Profile.getNick(c,true));b="add_friend";e=this.addFriend}}var d=setHTML(A({href:"#",c:"friend_man "+b}),a);AEV(d,"click",$p(e,d,c),true);return d},getNick:function(b,a){var c=b.display_name&&b.display_name.length>0?b.display_name:b.nick_name;if(a==true){c=c.length>8&&c.substring(0,8)+".."||c}return Profile.with_name&&c||""},renderFollowingNoSession:function(a,b){user=SiteState.getPageUser();var d=Profile.getNick(user,true);a=format(a,d);var c=A({href:"#",id:"follow_managment",c:"friend_man "+b},a);AEV(c,"click",function(){window.location="/Users/showRegister?from_url=/"+user.nick_name},true);return c},renderFollowing:function(a,c,d,g){c=c||SiteState.getPageUser();var h=true;if(window.CAN_FOLLOW!=undefined){h=window.CAN_FOLLOW}if(!c.are_friends&&!h){return SPAN({id:"follow_managment"})}var b=Profile.getNick(c,true);if(d){b=""}var j,f,l;if(a){f=format(_("Don't follow %s plurks"),b);l="remove";j=this.removeFollowingTL}else{f=format(_("Follow %s plurks"),b);l="add_follow";j=this.followFriendTL}var k=A({href:"#",id:"follow_managment",c:"friend_man "+l},f);AEV(k,"click",$p(j,k,c,d),true);return k},addFriend:function(d,a,c){var b=getRequest("/Notifications/addNotification");ACN(d,IMG({src:"http://statics.plurk.com/7f5c4282d2e9accfdae99cc6abb6c9bb.gif"}));b.addCallback(function(e){e=parseInt(e);a.friend_status=e;var g=false;if(e===1&&window.FRIENDS){var f=SiteState.getSessionUser();FRIENDS[f.uid]=f;Profile.renderFriends();g=true}else{if(e===1){g=true}}swapDOM(d,Profile.renderFriend(g,a));TopBar.updateNotificationCountAJAX()});b.addErrback(function(e){alert(trim_if_needed(e));swapDOM(d,Profile.renderFriend(false,a))});b.sendReq({friend_id:a.uid,cur_user:top.SiteState.getSessionUser().id});preventDefault(c);return false},removeFriend:function(d,a,c){var b=getRequest("/Users/removeFriend");ACN(d,IMG({src:"http://statics.plurk.com/7f5c4282d2e9accfdae99cc6abb6c9bb.gif"}));b.addCallback(function(){a.friend_status=null;swapDOM(d,Profile.renderFriend(false,a));if($("follow_managment")){swapDOM($("follow_managment"),Profile.renderFollowing(false,a))}});b.sendReq({friend_id:a.uid});preventDefault(c);return false},followFriendTL:function(e,b,a,d){var c=getRequest("/Users/setFollowingTL");ACN(e,IMG({src:"http://statics.plurk.com/7f5c4282d2e9accfdae99cc6abb6c9bb.gif"}));c.addCallback(function(){swapDOM(e,Profile.renderFollowing(true,b,a));Profile._refreshOnClose();if(b.friend_status!=1){var f=SiteState.getSessionUser();FANS[f.uid]=f;Profile.renderFans()}});c.addErrback(function(f,g){alert(trim_if_needed(f,100));swapDOM(e,Profile.renderFollowing(false,b,a))});c.sendReq({friend_id:b.uid,value:1,cur_user:top.SiteState.getSessionUser().id});preventDefault(d);return false},_refreshOnClose:function(){if(top.SiteState.canEdit()){if(top.GB_getLast()){top.GB_getLast().reload_on_close=true}}},removeFollowingTL:function(e,b,a,d){var c=getRequest("/Users/setFollowingTL");ACN(e,IMG({src:"http://statics.plurk.com/7f5c4282d2e9accfdae99cc6abb6c9bb.gif"}));c.addCallback(function(){swapDOM(e,Profile.renderFollowing(false,b,a));Profile._refreshOnClose();if(b.friend_status!=1){var f=SiteState.getSessionUser();delete FANS[f.uid];Profile.renderFans()}});c.sendReq({friend_id:b.uid,value:0,cur_user:top.SiteState.getSessionUser().id});preventDefault(d);return false},removePedning:function(d,a,c){var b=getRequest("/Notifications/removeNotification");ACN(d,IMG({src:"http://statics.plurk.com/7f5c4282d2e9accfdae99cc6abb6c9bb.gif"}));b.addCallback(function(){a.friend_status=-1;swapDOM(d,Profile.renderFriend(false,a));TopBar.updateNotificationCountAJAX()});b.sendReq({friend_id:a.uid});preventDefault(c);return false},_genericRender:function(f,j,a){var f=$(f);if(!f){return}var d,h;var l=TABLE(d=TBODY(h=TR()));var k=j.length;var c=0;while(true&&k>0){if(SiteState.canEdit()&&c>7){break}if(!SiteState.canEdit()&&c>11||j.length==0){break}var b=Math.floor((j.length-1)*Math.random());var g=FRIENDS[j[b]]||FANS[j[b]];j.splice(b,1);if(a&&g.only_fan==1||!g.has_profile_image){continue}if(c>0&&c%4==0){h=TR();ACN(d,h)}var e=A({href:"/"+g.nick_name,c:"user_link"},IMG({src:Plurks.getUserImgSrc(g,"medium")}));onEvent(e,"mouseover",$p(Profile.showFriendInfo,e,g));onEvent(e,"mouseout",AmiTooltip.hide);ACN(h,TD(e));c++}RCN(f,l)},showFriendInfo:function(f,b,e){var a=$gc(f,"img").src;var c;if(a.indexOf("default")==-1){c=DIV({s:"margin-bottom: 3px;"},IMG({src:a.replace("small","medium"),width:45,height:45}))}var d=null;if(b.karma>=0){d=SPAN(_("Karma"),": ",b.karma+"")}AmiTooltip.show(f,DIV({c:"tooltip_cnt"},c,B(b.full_name)," - "+b.nick_name,BR(),Profile._getGender(b),Profile._getLocation(b),BR(),d),e)},_getLocation:function(a){var b="";if(a.location){b=" "+format(_("from %s"),a.location)+" "}if(b.length>30){b=b.substring(0,30)+"..."}return b},_getGender:function(a,b){return a.gender==1&&(b&&"m"||_("male"))||(b&&"f"||_("female"))},renderFriends:function(){Profile._genericRender("friend_holder",keys(FRIENDS),true);if(keys(FRIENDS).length==0){RCN($("friend_holder"),SPAN(_("No friends yet.")),A({s:"margin-left:4px",href:"/Friends/inviteFriends"},_("It's very easy to Invite some!")))}},renderFans:function(){if(!$("fan_holder")){return false}Profile._genericRender("fan_holder",keys(FANS));var b=null;if(SiteState.canEdit()){b=P({s:"margin-top: 8px"},SMALL(_("Fans are people that follow your time line, but aren't on your friends list.")))}if(keys(FANS).length==0){RCN($("fan_holder"),SPAN(_("No fans yet."),b))}if(SETTINGS.view_plurks!=0&&SiteState.canEdit()){var c=A({href:"#"},_("Change Privacy in My Account"));onEvent(c,"click",TopBar.showPrivacy);RCN($("fan_holder"),SPAN(_("Currently you can't have fans. You need to allow the whole world to view your plurks first. "),BR(),BR(),c,b))}else{if(SETTINGS.view_plurks!=0){var a=SiteState.getPageUser().gender==0&&"her"||"his";RCN($("fan_holder"),SPAN(_("This user can't have fans due to their privacy settings.")))}}},showAllFriends:function(b){var a="/Friends/showFriends?user_id="+SiteState.getPageUser().uid;if(SiteState.canEdit()){a="/Friends/"}return GB_showCenter(_("Friends"),a,600,650)},showAllFans:function(b){if(SiteState.canEdit()){return GB_showCenter(_("Friends"),"/Friends/?tab=fans",600,650)}var a="/Friends/showFans?user_id="+SiteState.getPageUser().uid;return GB_showCenter(_("Fans"),a,600,650)},showAllCliques:function(a){if(SiteState.canEdit()){return GB_showCenter(_("Friends"),"/Friends/?page=cliques",600,650)}return window.location="/"},getYears:function(a){return Utils.getYears(a)},relationships:{not_saying:"",single:_("Single"),married:_("Married"),divorced:_("Divorced"),engaged:_("Engaged"),in_relationship:_("In Relationship"),complicated:_("Complicated"),widowed:_("Widowed"),open_relationship:_("Open Relationship")},updateRelationship:function(b){if(!$("relationship")){return}var a=getElement("relationship_container");a.style.display=b=="not_saying"?"none":"block";setHTML($("relationship"),Profile.relationships[b])},showShareHelp:function(){return GB_showCenter(_("How to share on Plurk"),"/Help/shareHelp",400,650)},showKarmaHelp:function(){return GB_showCenter(_("What's karma?"),"/Help/karmaHelp",400,650)},showShareDesign:function(){return GB_showCenter(_("Share design"),"/showShareDesign",150,440)},renderKarma:function(b,d){var a=$("karma_holder");if(!a){return}b=b.toFixed(2);if(b==100){var c=SPAN({id:"karma",c:"karma_top"},"100.00");var e=SPAN({id:"karma_div"},c);RCN(a,e)}else{var c=SPAN({id:"karma",c:"karma_"+d},""+b);var e=SPAN({id:"karma_div"},c);RCN(a,e);Profile.renderKarmaChange()}},renderKarmaChange:function(){var a=SiteState.getPageUser().karma_change;var b=$("karma_arrow");if(!b){return}if(a>0||a<0){showElement(b);var c=a<0&&"down"||"up";b.className="cmp_karma_"+c}else{hideElement(b)}},_karma_tips:[_("Try to plurk regularly (each day), but don't plurk too much (over 30 times pr. day)"),_("Plurking interesting stuff and getting followers will increase your karma"),_("Losing followers will lower your karma"),_("Karma will be lowered if you request friendship and get rejected")+' <br /> <img src="/static/emoticons/platinum/idiot.gif" />',_("Inviting people to Plurk will gain you more karma")+' <br /> <img src="/static/emoticons/gold/rock_n_roll.gif" />',_("Responses from other plurkers will gain your karma"),_("Your karma will drop if you don't update your timeline each day"),_("Updating your profile (location, birth day etc.) will gain you more karma"),_("Uploading a profile picture will increase your karma"),_("Having fun on Plurk will increase your karma")+' <br /> <img src="/static/emoticons/silver/dance.gif" />',_("Getting more karma will enable you to use exclusive emoticons and other features"),_("Having karma over 40 will enable you to change your display name"),_("Having karma over 10 will enable you to title your profile")],cur_tip:0,_getRandomTip:function(){var b=null;var a=Profile._karma_tips;while(true){b=a[Math.round(Math.random()*(a.length-1))];if(b!=Profile.cur_tip){break}}Profile.cur_tip=b;return b},karmaHoverOn:function(h,f){if(Profile._karma_help_TO){clearTimeout(Profile._karma_help_TO)}if(window.AmiTT&&isElementShown(AmiTT)){return}var e=_("Karma has gone up %s since last karma update.");var c=_("Karma has gone down %s since last karma update.");if(SiteState.canEdit()){var b=SiteState.getPageUser().karma_change;var a="";if(b<=0||b>0){a=format(e,"+"+b.toFixed(2));if(b<0){a=format(c,""+b.toFixed(2))}}var g=SiteState.getSessionUser().karma_fall_reason;if(SiteState.canEdit()&&g){a+="<br /><br /><b>"+_("Karma fall reason")+":</b><br />";if(g=="friends_rejections"){a+=_("You got too many friendship rejections.")}else{if(g=="too_much_plurking"||g=="too_short_responses"){a+=_("You plurked too much - remember to plurk interesting stuff.")}else{if(g=="karma_vacation"){a+=_("Karma vacation mode costs 1 karma points. Your karma is frozen. Unfreeze it from My Account.")}else{if(g=="inactivity"){a+=_("You are too inactive. Tell us what you are thinking, feeling or doing!")}}}}}a+="<br /><br /><b>"+_("Karma tip")+":</b><br />"+Profile._getRandomTip();AmiTooltip.show(h,DIV({c:"tooltip_cnt"},setHTML(SPAN(),a)),f)}else{var d=SiteState.getPageUser();var b=d.karma_change;if(b<0||b>0){a=format(e,b.toFixed(2));if(b<0){a=format(c,""+b.toFixed(2))}AmiTooltip.show(h,DIV({c:"tooltip_cnt"},setHTML(SPAN(),a)),f)}}},_karma_help_TO:null,karmaHoverOut:function(b,a){Profile._karma_help_TO=setTimeout(AmiTooltip.hide,5)},updatePageTitle:function(a){SiteState.getPageUser()["page_title"]=a;TopBar.updateTitle();if(PAGE_TITLE_TO){clearTimeout(PAGE_TITLE_TO)}PAGE_TITLE_TO=setTimeout($p(Profile._ajaxSavePageTitle,a),500)},_ajaxSavePageTitle:function(b){var a=getRequest("/Settings/setPageTitle");a.addCallback(function(c){if(c){SiteState.getPageUser()["page_title"]=c;TopBar.updateTitle()}});a.sendReq({title:b})},_blockUserText:function(){return _("A blocked user won't be able to see your profile, follow you, respond to your plurks or befriend you. You can use this feature to protect yourself.")},blockCurrentUser:function(){var a="/Friends/blockUser?block_uid="+SiteState.getPageUser().id;return top.GB_showCenter(_("Friends"),a,350,650)}};function fetchInitialTimeline(){var b=loadJSON("/Users/getOwnProfileData");b.addCallback(function(f){update(FRIENDS,f.users);Poll.disabled=true;Poll.init();var d=[$("update_mute"),$("noti_np"),$("update_sepa"),$("noti_re")];showElement($("updater"));hideElement(d);ACN($("updater"),DIV({id:"unread_loader"},_("Loading unread...")," ",IMG({src:"http://statics.plurk.com/7f5c4282d2e9accfdae99cc6abb6c9bb.gif"})));var g=function(){hideElement($("updater"));removeElement($("unread_loader"));showElement(d);Poll.disabled=false};var e=loadJSON("/Users/getUnreadPlurks");e.addCallback(g);e.addCallback(function(h){update(FRIENDS,h.users);Poll.initUnreadPlurks(h.unread_plurks)});e.addErrback(g);e.addCallback(function(h){Poll.initUnreadPlurks([])});var c=keys(FRIENDS);e.sendReq({known_friends:serializeJSON(c)});TimeLine._plurksFetched(f.plurks)});var a=keys(FRIENDS);b.sendReq({known_friends:serializeJSON(a)})}var main_poster;function _initUserData(c,b){SiteState.user_data=b;CLIQUES=b.cliques;CAN_FOLLOW=b.can_follow;MISC={invite_url:b.invite_url};if(SiteState.canEdit()){MoreOptions.setPlurkTo();var d=SiteState.getSessionUser();var a={lang:(d&&d.default_lang)||"en"};main_poster=PlurkPoster.render(a);ACN($("main_poster"),main_poster.table);fetchInitialTimeline();showElement($("plurk_form"));showElement($("toggle_tab"))}else{if(window.PUBLIC_PLURKS&&SETTINGS.view_plurks==0){TimeLine._plurksFetched(PUBLIC_PLURKS);DisplayOptions.show()}else{TimeLine.getPlurks(function(){DisplayOptions.show()})}}if(b.num_of_friends&&b.num_of_fans){GLOBAL.num_of_friends=b.num_of_friends;GLOBAL.num_of_fans=b.num_of_fans}if(b.is_warned&&!b.was_warned){GB_showCenter(_("Warning"),"/Users/showWarning",200,440)}if(typeof c=="function"){c()}_initDashboard(b);_initPlurkBox();setTimeout(function(){if(b.window=="alerts"){return TopBar.showNotifications()}else{if(b.window=="invite"){return TopBar.showFriends("inviteFriends")}else{if(b.window=="YahooApp"){return TopBar.showMyAccount("/YahooApp")}else{if(b.window&&b.window.indexOf("/")==0){return GB_showCenter("",b.window,400,650)}else{if(b.window=="restricted"){new GB_HTMLWindow(setHTML(DIV({s:"width: 420px; padding: 10px 10px 10px 10px; font-size: 20px; line-height: 25px;"}),format(_("Sorry this plurk is only viewable to %s's friends"),SiteState.getPageUser().nick_name)),{caption:_("You don't have permission to access this plurk."),overlay_click_close:true,height:200,width:440}).show()}else{if(b.window=="install_design"){if(confirm(_("Are you sure you want to install a new design?\nYou can easily revert back to your old design."))){return GB_showCenter(_("Profile settings"),"/Settings/show?page=theme",400,650)}else{var e=getRequest("/deleteNewDesign");e.sendReq({})}}}}}}}},100)}function _initPlurkBox(){var b=getQueryArgument("status");var a=getQueryArgument("qualifier");if(b){$("input_big").value=urldecode(b)}if(a){main_poster.menu.updateQualifer(a)}}function _initDashboard(c){if(!SiteState.canEdit()){var a=SiteState.getPageUser();a.friend_status=c.friend_status;if(!c.invitation_code){TimeLine.excludeUser=function(f){var e=SiteState.getPageUser().uid;return f!=e}}if(SiteState.getSessionUser()&&SiteState.getPageUser().nick_name=="plurkbuddy"){if(!c.is_following){ACN($("render_follow"),Profile.renderFollowing(c.is_following))}}else{if(SiteState.getSessionUser()){showElement($("friendship_info"));if(!a.is_channel){try{ACN($("render_friend"),Profile.renderFriend(c.is_friend))}catch(d){}}ACN($("render_follow"),Profile.renderFollowing(c.is_following))}else{try{ACN($("render_follow"),Profile.renderFollowingNoSession(_("Follow %s plurks"),"add_follow"));ACN($("render_friend"),Profile.renderFollowingNoSession(_("Add %s as friend"),"add_friend"))}catch(d){}}}if(c.show_inivted_guide){GettingStarted.show(0,"invited")}var b=function(e){map(e,function(g){try{setStyle(g,{position:"static"});setOpacity(g,1);b($FA(g.childNodes))}catch(f){}})};b([$("dash-fans"),$("dash-friends"),$("dash-stats"),$("dash-profile")])}}function fetchUserData(b){var a=loadJSON("/Users/getUserData");a.addCallback($p(_initUserData,b));a.sendReq({page_uid:SiteState.getPageUser().uid})}GenericFollow={renderActionRow:function(a){if(a.settings==true){return DIV({c:"div_action friend_action",align:"right"},Profile.renderFollowing(a.following,a,true))}else{var b;var c=DIV({c:"div_action friend_action",align:"right"},b=A({href:"#"},_("Restricted privacy, visit profile to follow")));b.onclick=function(){top.location="/"+a.nick_name};return c}}};PlurkSearch={has_more:true,init:function(){SETTINGS={};FRIENDS={};FANS={};TimeLine.getPlurks=PlurkSearch._getPlurks},initTrends:function(){if(PlurkSearch.inited_trends){return}var a=$bytc("li","trend_item");map(a,function(b){PlurkSearch.hideTrendGraph(b);AEV(b,"mouseover",$p(PlurkSearch.showTrendGraph,b));AEV(b,"mouseout",$p(PlurkSearch.hideTrendGraph,b))});PlurkSearch.inited_trends=true},query:function(a){$("current_query").value=a;PlurkSearch.current_query=a;var b=urlencode(a.replace(/\s+/g,"+"));b=b.replace(/%2B/,"+");if(window.location.toString().indexOf("psearch")!=-1){window.location.hash="q="+b}PlurkSearch.has_more=true;PlurkSearch.offset=null;Plurks.removeCurrentOpen();TimeLine.reset();TimeLine.getPlurks();PlurkSearch.updateShareLink();window.scrollTo(0,0);return false},ajaxSearch:function(){var a=$("current_query").value;PlurkSearch.query(a);return false},showStartMessage:function(){TimeLine.renderText(_("Search Plurk and find out what's happening RIGHT now."))},showPane:function(c,a){PlurkSearch.initTrends();var d=$gc($gp(c,"ul"),"li","tt_selected");removeClass(d,"tt_selected");addClass(c,"tt_selected");hideElement($bytc(null,"pane"));showElement($("pane_"+a));if(a=="search"){Plurks.removeCurrentOpen();var b=$("current_query");$("current_query").focus();setVisibility($("filter_tab"),false);if(!PlurkSearch.old_getPlurks){PlurkSearch.old_getPlurks=TimeLine.getPlurks}TimeLine.getPlurks=PlurkSearch._getPlurks;if(PlurkSearch.current_query){PlurkSearch.query(PlurkSearch.current_query)}else{TimeLine.reset();PlurkSearch.showStartMessage()}setVisibility($("updater"),false);PlurkSearch.getSavedSearches();if(OpenX){PlurkSearch.old_currentZone=OpenX.currentZone;OpenX.invokeZone(OpenX.Zones.Search)}}else{if(a=="daily_photo"){if(!PlurkSearch.old_getPlurks){PlurkSearch.old_getPlurks=TimeLine.getPlurks}Plurks.removeCurrentOpen();if(OpenX){OpenX.invokeZone(PlurkSearch.old_currentZone)}}else{if(TimeLine.getPlurks!=PlurkSearch.old_getPlurks){TimeLine.getPlurks=PlurkSearch.old_getPlurks;setVisibility($("filter_tab"),true);$bytc("a","filter_selected")[0].onclick();setVisibility($("updater"),true)}if(OpenX){OpenX.invokeZone(PlurkSearch.old_currentZone)}}}PlurkSearch.current_pane=a},updateShareLink:function(){var a=$("current_query").value;if(a){a="#q="+a;a=a.replace(/ /g,"+")}a="http://www.plurk.com/psearch"+a;$("share_link").value=a;if(a.length>35){a=a.substring(0,35)+"..."}},saveQuery:function(){var b=$("current_query").value;if(!b){alert(_("You search field is empty"));return false}var a;appendToTop($("saved_list"),a=PlurkSearch.createSearchItem(b));AJS.fx.fadeIn(a);var c=getRequest("/Search/saveSearch");c.sendReq({query:b});return false},deleteQuery:function(){var a=PlurkSearch.cur_li;AJS.fx.fadeOut(a,{onComplete:function(){removeElement(a)}});var b=getRequest("/Search/deleteSearch");b.sendReq({query:PlurkSearch.cur_query});return false},showDelSearch:function(a,c){if(!PlurkSearch.del_link){PlurkSearch.del_link=A({href:"#",c:"del_search"},IMG({src:"http://statics.plurk.com/e53f5da063e999cd58ac4a3c6c8d3fe3.gif"}));AEV(PlurkSearch.del_link,"mousedown",function(){PlurkSearch.deleteQuery()})}var b=PlurkSearch.del_link;PlurkSearch.cur_li=a;PlurkSearch.cur_query=c;ACN(a,PlurkSearch.del_link);showElement(PlurkSearch.del_link)},getSavedSearches:function(){if(PlurkSearch.saved_fetched){return}var a=loadJSON("/Search/getSavedSearches");a.addCallback(function(c){var b=UL({c:"normal_list",id:"saved_list"});map(c,function(d){ACN(b,PlurkSearch.createSearchItem(d))});RCN($("saved_searches"),b);PlurkSearch.saved_fetched=true});a.sendReq()},createSearchItem:function(d){var c,a;var b=d;if(b.length>25){b=b.substring(0,25)+"..."}a=LI(c=A({href:"#q="+d},b));AEV(a,"mouseover",$p(PlurkSearch.showDelSearch,a,d));AEV(a,"mouseout",function(){hideElement(PlurkSearch.del_link)});c.onclick=$p(PlurkSearch.query,d);return a},showTrends:function(a){a=a.replace(/"/g,"%22");return GB_showCenter(_("Plurk trends"),"/ptrends?q="+a,550,700)},showTrendGraph:function(b){var a=$gc(b,"a","trend_graph");setVisibility(a,true)},hideTrendGraph:function(b){var a=$gc(b,"a","trend_graph");setVisibility(a,false)},_getPlurks:function(){var b=PlurkSearch;if(b.getting_plurks||!b.has_more){return}if(TimeLine.plurks.length>0){TimeLine.showLoadingBlock()}var a=loadJSON("/Search/queryPlurks");TimeLine.removeEmpty();if(TimeLine.plurks.length>0){TimeLine.showLoadingBlock()}else{TimeLine.showLoading()}b.getting_plurks=true;a.addCallback(function(d){b.has_more=d.has_more;b.getting_plurks=false;TimeLine.hideLoading();if(d.error){TimeLine.renderText(_("An unknown error happened."))}else{if(b.has_more){b.offset=d.last_offset}update(USERS,d.users);try{TimeLine._plurksFetched(d.plurks)}catch(f){AJS.log(f)}}});a.addErrback(function(){b.getting_plurks=false;TimeLine.hideLoading();TimeLine.renderText(_("An unknown error happened."))});var c={query:b.current_query};if(b.offset){c.offset=b.offset}a.sendReq(c)}};TimeShow={icon:null,time:null,div:null,init:function(){var b=TimeShow.div=DIV({id:"time_show",c:"morning"},TimeShow.time=SPAN(""));var a=absolutePosition($("bottom_line")).y;setTop(b,a+1);hideElement(b);ACN(getBody(),b);AEV(b,"mousemove",function(){hideElement(b)})},on_plurk:null,cur_elm:null,hide:function(){if(TimeShow.div){hideElement(TimeShow.div)}TimeShow.on_plurk=null;TimeShow.cur_elm=null},displayTime:function(e){var f=TimeShow.div;if(this.type=="day_start"||!TimeShow.on_plurk){TimeShow.cur_elm=null;TimeShow.hide();return true}if(TimeShow.cur_elm==TimeShow.on_plurk){return}showElement(f);var d=new Date(getPD(TimeShow.on_plurk).obj.posted);d=Cal.convertToLocal(d,true);setLeft(f,absolutePosition(TimeShow.on_plurk).x);var c="morning";var b=d.getHours();if(b>=12&&b<18){c="day"}else{if(b>=18&&b<22){c="evening"}else{if(b>=22||b>=0&&b<6){c="night"}}}setClass(f,c);var a=Cal.formatHour(d.getHours(),d.getMinutes());if(a!=TimeShow.time.innerHTML){setHTML(TimeShow.time,a)}showElement(f);TimeShow.cur_elm=TimeShow.on_plurk}};Media={showThumb:function(e,b,h,d){preventDefault(d);GB_showImage("",e);var g=getLast(GB_CURRENT);var a=b;if(a.length>40){a=a.substring(0,40)+"..."}var f=null;if(hasClass(h,"comic")){f=DIV({s:"padding-top: 3px;"},_("more comics at")," ",A({href:"/plurkcomics"},"plurkcomics"))}var c=DIV({c:"direct-l"},"URL: ",A({href:b,target:"_blank"},a),f);insertAfter(c,g.iframe);if(window.Plurks){Plurks.noExapndOnAction()}return false},attach:function(b,a){map($bytc("a","youtube",b),Media._attachVideo);map($bytc("a","vimeo",b),Media._attachVideo);map($bytc("a","pictureservices",b),function(c){Media._attachPictures(c)});map($bytc("a","ex_link",b),Media._attachExternal)},_attachExternal:function(d){var c=window.location.host;c=c.replace(/www\./,"");var b=d.href.replace(/www\./,"");if(b.indexOf("http://"+c)==-1){d.target="_blank"}if(b.indexOf(c+"/")!=-1){var e=b.match(/[^\/]\/([A-Za-z0-9_]{3,})/i);if(e){var a=SiteState.getUserByNick(e[1]);if(a&&a.display_name){setHTML(d,a.display_name)}}}if(!$gc(d,"img")){if(d.innerHTML.match(/\s/)==null&&d.innerHTML.length>30){d.innerHTML=d.innerHTML.substring(0,35)+"..."}}if(!hasClass(d,"pictureservices")&&!hasClass(d,"youtube")){if(window.Plurks){AEV(d,"click",Plurks.noExapndOnAction)}}Media._attachPaste(d)},_attachPaste:function(b){var a=b.href.match(/paste.plurk.com\/show\/(.+)/);if(!a){return}onEvent(b,"click",function(c){if(window.Plurks){Plurks.noExapndOnAction()}return GB_showCenter("Plurk paste",b.href,500,650)})},_attachVideo:function(c){var d=$gc(c,"img"),a;if(!d){return false}addClass(c,"video");var f=d.alt;d.alt="";var e=c.className.indexOf("vimeo")>0;if(e){var b=c.href.match(/vimeo.com\/(\d+)/);if(!b){return}var g=b[1];a=Media._generateFlashHolder('<object width="415" height="317"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id='+g+'&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id='+g+'&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1&amp;autoplay=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="415" height="317"></embed></object>',c.href)}else{a=Media._generateYoutubeHolder(c.href,true)}onEvent(c,"click",function(j){preventDefault(j||event);Media._showGreyBox(f,c.href,"",344,440);var h=$gc($bytc("div","iframe_holder")[0],"div");setHTML(h,a);if(!e&&c.href.indexOf("#music")!=-1){YouTubeControl.activate();YouTubeControl.showIndicator()}return false});onEvent(c,"mouseover",$p(AmiTooltip.show,c,DIV({c:"tooltip_cnt"},f)));onEvent(c,"mouseout",AmiTooltip.hide)},_generateYoutubeHolder:function(c,f){var b=c.match("v=(.+)")[1];var a=c.indexOf("&hd");if(a>-1){b=b+"&ap=%2526fmt%3D18"}b=b.replace("#music","");var e="http://www.youtube.com/swf/l.swf?video_id="+b+"&rel=0&autoplay=1&color1=0xffffff&color2=0xffffff&border=0&enablejsapi=1&playerapiid=ytplayer";var d='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="415" height="334" style="z-index: 50000; border:0; padding: 0;" id="youtube_holder_obj"><param name="allowScriptAccess" value="always" /><param name="movie" value="'+e+'"></param><embed src="'+e+'" type="application/x-shockwave-flash" width="415" height="334" autostart="true" allowScriptAccess="always" id="youtube_holder"></embed></object>';return Media._generateFlashHolder(d,c,f)},_generateFlashHolder:function(a,d,e){var c=['<div class="video_holder" style="padding: 5px 10px 0 0;">'];var b="";if(e){b='<div class="hide_window"><a href="#" onclick="setTimeout(YouTubeControl.activate, 100); return false;">'+_("Hide video and play in background")+"</a></div>"}c.push('<div class="object_holder" style="margin-left: 10px;">'+a+"</div>"+b+'<div class="direct-l yt">'+_("Direct link")+': <a href="'+d+'" target="_blank">'+d+"</a></div>");return c.join("")},_showGreyBox:function(e,c,b,a,d){if(YouTubeControl.isShown()){YouTubeControl.stop()}if(window.Plurks){Plurks.noExapndOnAction()}return GB_showHTML(e,b,a,d)},_attachFlickr:function(b){var a=$gc(b,"img");if(a){onEvent(b,"click",$p(Media.showThumb,a.alt,b.href,b))}},_attachPlurk:function(b){var a=$gc(b,"img");if(a){onEvent(b,"click",$p(Media.showThumb,a.alt,b.href,b))}},_pictureLoaded:function(a){a=a||window.event;var b=getEventElm(a);if(b){}},_attachPictures:function(c){var b=$gc(c,"img");var a=c.href;if(b){b.style.maxWidth="48px"}if(a.indexOf("flickr.com/photos/")!=-1){return Media._attachFlickr(c)}else{if(a.indexOf("23hq.com/")!=-1&&a.indexOf("/photo/")!=-1){return Media._attachFlickr(c)}else{if(b&&b.src.indexOf("images.plurk.com")!=-1){return Media._attachPlurk(c)}else{if(a.indexOf("photobucket.com/albums/")!=-1){return Media._genericImageLoad(GenericImages.photoBucket,c)}else{if(a.indexOf("tinypic.com/")!=-1){return Media._genericImageLoad(GenericImages.tinyPic,c)}else{if(a.indexOf("imageshack.us/img")!=-1){return Media._genericImageLoad(GenericImages.imageShack,c)}else{if(a.indexOf("statics.plurk.com")!=-1){c.href="http://statics.plurk.com/261c0fe4a88417146ae0292d697a5f52.gif"}return Media._genericImageLoad(GenericImages.justImage,c)}}}}}}return false},_genericImageLoad:function(c,b){var d=b.href.match(/[^\/]+?\.(jpg|jpeg|gif|png)/i);if(d){d=d[0];var a=GenericImages.loadImage(b.href,d,c);setHTML(b,a);onEvent(b,"click",$p(Media.showThumb,b.href,b.href,b))}return false}};GenericImages={loaded_images:{},big_images:{},replaceDivs:function(a,d){GenericImages.loaded_images[a.src]=true;if(a.width<50&&a.height<50){GenericImages.big_images[a.src]=false}var c=GenericImages.getImgClass(a.src);var b=GenericImages.getImagePreview(a.src);map($bytc("div",c),function(e){setHTML(e.parentNode,b)});if(d){setTimeout($p(GenericImages.replaceDivs,a,false),200)}},img_ids:{},img_counter:1,getImgClass:function(a){var b=GenericImages.img_ids[a];if(!b){b=GenericImages.img_ids[a]=GenericImages.img_counter++}return"big_image_"+b},loaded:function(a){if(TimeLine.big_media_hidden&&hasClass(a,"big_image")){addClass(a.parentNode,"big_image_border")}},getImagePreview:function(c){var a="max-height: 40px; max-width: 48px;";if(isIe()&&!isIe8()){a="width: expression(this.width > 48 ? 48: true); height: expression(this.height > 40 ? 40: true);"}var b="";if(GenericImages.big_images[c]){if(TimeLine.big_media_hidden){a+="visibility:hidden;"}b="big_image"}return'<img src="'+c+'" style="'+a+'" class="'+b+'" onload="GenericImages.loaded(this)" />'},getImageThumb:function(b,d){if(b==d&&!GenericImages.loaded_images[d]){if(!GenericImages.big_images[d]){var a=new Image();a.onload=$p(GenericImages.replaceDivs,a,true);a.src=d;GenericImages.big_images[d]=true}var c=GenericImages.getImgClass(d);return'<div class="'+c+'"><img src="http://statics.plurk.com/7f5c4282d2e9accfdae99cc6abb6c9bb.gif" /></div>'}else{return GenericImages.getImagePreview(d)}},photoBucket:function(c,a){var b=a.replace(c,"th_"+c);return b},tinyPic:function(c,a){var b=c.split(".");return a.replace(c,b[0]+"_th."+b[1])},imageShack:function(c,a){var b=c.split(".");b.splice(1,0,"th");return a.replace(c,b.join("."))},justImage:function(b,a){return a},loadImage:function(b,e,d){var a=b;var c=d(e,b);return GenericImages.getImageThumb(a,c)}};YouTubeControl={inited:false,div_player:null,indicator:null,title:"",flash_player:null,initIfNeeded:function(){if(this.inited){return}var b,a;ACN(getBody(),DIV({id:"music_player"},this.indicator=SPAN({s:"margin-right: 5px;"}),this.title=SPAN(),a=A({href:"#",s:"margin: 0 8px 0 8px"},_("Stop")),b=A({href:"#"},_("Show video"))));AEV(a,"click",$b(YouTubeControl.stop,this));AEV(b,"click",$b(YouTubeControl.deactivate,this));this.inited=true},isShown:function(){var a=$("music_player");if(!a){return false}return a.style.display!="none"},activate:function(){map($bytc("div","GB_window"),function(b){YouTubeControl.left_pos=b.style.left;b.style.left="-1500px";setVisibility(b,false)});map($bytc("div","GB_overlay"),function(b){hideElement(b)});setVisibility(getYCPlayer(),false);var a=$bytc("td","caption")[0].innerHTML;if(a.length>30){a=a.substr(0,30)+"..."}YouTubeControl.initIfNeeded();setHTML(YouTubeControl.title,a);showElement($("music_player"));if(OpenX){OpenX.playerVisible=true;OpenX.render()}window.scroll(0,0);return false},deactivate:function(){map($bytc("div","GB_overlay"),function(a){showElement(a)});map($bytc("div","GB_window"),function(a){a.style.left=YouTubeControl.left_pos;setVisibility(a,true)});setVisibility(getYCPlayer(),true);hideElement($("music_player"));if(OpenX){OpenX.playerVisible=false;OpenX.render()}return false},stop:function(){if(OpenX){OpenX.playerVisible=false;OpenX.render()}hideElement($("music_player"));GB_hide();return false},showIndicator:function(){RCN(YouTubeControl.indicator,IMG({src:"http://statics.plurk.com/7f5c4282d2e9accfdae99cc6abb6c9bb.gif"}))},hideIndicator:function(){RCN(YouTubeControl.indicator,null)}};function getYCPlayer(){if(isIe()){return $("youtube_holder_obj")}else{return $("youtube_holder")}}function youtubeChecker(){var a=getYCPlayer();if(!a){return clearTimeout(YOUTUBE_CHECKER)}if(!a.getPlayerState){return}var b=a.getPlayerState();if(b==1){YouTubeControl.hideIndicator()}else{if(b==0){YouTubeControl.stop()}}}var YOUTUBE_CHECKER=null;function onYouTubePlayerReady(a){YOUTUBE_CHECKER=setInterval(youtubeChecker,500);var b=getYCPlayer()}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 j=getEventElm(h);var g=$gp(j,"div");if(g&&g.id=="emoticons_tabs"){return true}if(Emoticons.shown&&!hasClass(j,"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;if(d=="basic"||d=="all"){var a=Emoticons.basic;if(c>=25){a=a.concat(Emoticons.silver)}}if(d=="extra"||d=="all"){var a=[];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"){var a=[];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)}}};PlurkPoster={render:function(u){var c={submit_fn:PlurkAdder.plurk,drop_down_img:"http://statics.plurk.com/b5013d83d670a7b88d13308929741d98.png",cookie:"default_qual",top_offset:55,show_submit:true,default_qual:"is",input_id:"input_big",lang:"en"};if(u){update(c,u)}var j=c.drop_down_img.indexOf("big")!=-1&&"big"||"small";var o,d,k,r;var s=TABLE({className:"plurkForm"},TBODY(TR(o=TD({c:"qual_holder"}),d=TD({c:"input_holder"}),k=TD({c:"smily_holder"}),td_submit=TD({c:"submit_holder"})),TR(TD(),TD(r=SPAN({id:c.input_id+"_cu",c:"char_updater"})),TD())));var v,t,b;var f=12;var w=11;if(j=="big"){f=13;w=18}var x=SiteState.getSessionUser().display_name;x=x&&x.length?x:SiteState.getSessionUser().nick_name;ACN(o,x," ",v=SPAN({c:"dd_img"},qualifier=SPAN({c:"m_qualifier"}),b=PNGIMG({src:c.drop_down_img,c:"dd_img",width:w,height:f})));if(j=="big"){b.style.paddingTop="12px";b.style.paddingBottom="5px"}if(j=="small"){b.width=12}else{b.width=18}var p,q;if(j=="small"){p=33;q=18}else{p=45;q=20}var e;ACN(k,e=PNGIMG({src:$static_path("/static/emoticons/select_emoticon_"+j+".png"),c:"emoticon_selecter_img",width:p,height:q}));onEvent(e,"click",$p(Emoticons.toggle,c.input_id));addClass(qualifier,"q_"+c.default_qual);qualifier.innerHTML=c.default_qual;var m;ACN(d,m=TEXTAREA({id:c.input_id,name:"content",c:"content"}));var a=new QualifierMenu(qualifier,m,c.cookie,c.top_offset,r,c.extra_menu_class);a.img=b;onEvent(v,"click",$b(a.showDDMenu,a));a.changeMenuLang(qualifier,c.lang);var g=$p(c.submit_fn,m,qualifier,l);if(c.show_submit){var h;swapDOM(td_submit,TD({c:"submit_holder"},h=DIV({c:"click  submit_img cmp_plurk"})));onEvent(h,"click",g)}m.disabled=false;attachKeyDown(m,function(y){if(y.key==13){g();return false}});var l=MaxChar.init(m,r);return{table:s,menu:a,input:m}}};KeyManager={cur_sequence:[],init:function(){attachKeyDown(document,KeyManager.onKeyDown)},onKeyDown:function(d){var j=getEventElm(d);var c=d.key;try{var a=KeyManager.cur_sequence+=c+",";if(KeyManager.cur_sequence.length>500){a=a.split(",");a.splice(0,400);KeyManager.cur_sequence=a.join(",")}if(KeyManager.cur_sequence.indexOf("38,38,40,40,37,39,37,39,66,65,")!=-1){konamicode();KeyManager.cur_sequence=""}}catch(g){}if(d.charCode&&d.charCode==39){c=null}if(c==27){top.Plurks.removeCurrentOpen()}var b=isIn(nodeName(j),["input","textarea"]);if(!b||b&&j.value==""){var f=c==37&&40||-40;switch(c){case 39:TimeShow.hide();TimeLine.slideBack(10,f,"right");top.Plurks.removeCurrentOpen();break;case 37:TimeShow.hide();TimeLine.slideBack(10,f,"left");top.Plurks.removeCurrentOpen();break;case 38:TimeShow.hide();TimeLine.moveToBlock("front");break}}if(!b){var h=Poll.mode;if(c==118||c==86){if(h=="new"){Poll._viewAll()}else{if(keys(Poll.current_data.unread_plurks).length>0){Poll._renderPlurks()}}}if(h=="new"&&(c==109||c==77)){Poll.markAllRead()}if(h!="new"&&(c==117||c==85)&&keys(Poll.current_data.new_plurks).length>0){Poll.update()}}}};var InputUtil={insertAtCursor:function(k,e,a,c){cursor_at=e.indexOf("~");if(cursor_at==-1){cursor_at=e.length}e=e.replace("~","");if(document.selection){k.focus();sel=document.selection.createRange();var f=sel.text;sel.text=e;var j=e.length-cursor_at;sel.moveStart("character",-j);sel.moveEnd("character",-j);sel.select();if(c){InputUtil.insertAtCursor(k,f)}}else{if(k.selectionStart||k.selectionStart=="0"){var g=k.scrollTop;var h=k.selectionStart;var b=k.selectionEnd;var f=k.value.substring(h,b);if(a){h=b}cursor_at+=h;k.value=k.value.substring(0,h)+e+k.value.substring(b,k.value.length);k.selectionStart=cursor_at;k.selectionEnd=cursor_at;k.scrollTop=g;if(c){InputUtil.insertAtCursor(k,f)}}else{k.value+=e}}k.focus()}};function konamicode(){var g=0,d=0.1,m=0.05,c=0.25,l=0.24,a=1.6,k=0.24,p=150,j=150,o=150,h=150;var f=$bytc("div","plurk");var b=f.length;function e(){var q=0;for(i=0;i-b;i++){var r=f[i].style;if(!$(f[i].id)){q++}r.position="absolute";r.left=(Math.sin(g*d+i*c+a)*p+o)+"px";r.top=(Math.cos(g*m+i*l+k)*j+h)+"px"}g++;if(q!=b){setTimeout(e,5)}}setTimeout(e,5)}Plurk={isPrivate:function(a){return a.plurk_type==1||a.plurk_type==3},isResponded:function(a){return a.plurk_type==2||a.plurk_type==3},isExpanded:function(a){if($dp.holder_shown){if(getPD($dp.div).obj.plurk_id==a){return true}}return false},updatePlurk:function(a,b){if(!a){return}update(a,b);if(Poll._backup_plurks){var c=Plurk.getById(a.id,values(Poll._backup_plurks));if(c){update(c,b)}}},getById:function(d,b,c){c=c||"id";b=b||TimeLine.plurks;if(b){var a=map(b,function(e){if(e[c]==d){return e}});return a||null}return null}};Responses={cur_plurkers:[],addToList:function(f){var b=$("m"+f.id);if(b){return}var e=$bytc("div","empty",$dp.list);if(e){removeElement(e[0])}if(isString(f.posted)){f.posted=new Date(f.posted)}f.posted=Cal.convertToLocal(f.posted);var a=getPD($dp.div);var c=Plurks.renderPlurk(f,true);if(!c){return}removeClass(c,"display");ACN($dp.list,c);Plurks.focusTrick(c);AJS.fx.highlight(getPD(c).cnt,{duratirnd_plurk:2000});setHTML($("input_small_cu"),_("140 characters left"));var d=$bytc("div","plurk",$dp.list).length;a.obj.response_count=d;a.obj.responses_seen=d;Responses._updateNewRespCount(a);setHTML(a.response_count,d);showElement(a.response_count);var g=SiteState.getUserById(f.user_id);if(g){Plurks.cur_plurkers.push(g)}ResponseCache.addToCache(f.plurk_id,f)},fetchItems:function(b){var g=$dp.div;var f=getPD(g).obj.plurk_id;var d=SiteState.getSessionUser();var c=Plurks.cur_req=loadJSON("/Responses/get2");c.addCallback(function(j){ResponseCache.addToCache(f,j.responses);j.responses=ResponseCache.getFromCache(f);if(j.friends){update(USERS,j.friends);Plurks.cur_plurkers=values(j.friends);Plurks.cur_plurkers.push(SiteState.getUserById(getPD(g).obj.owner_id))}var h=j.responses;getPD(g).obj.responses_seen=j.responses_seen;var k=[];map(h,function(l){k.push(l.user_id)});PlurkAdder.fetchUsersIfNeeded(k,$p(Responses._renderList,b,h))});c.addErrback(function(j,h){removeElement($gc($dp.list,"div"));if(h.status==404){RCN($dp.list,DIV({c:"empty",s:"color: red"},_("This plurk seems to be deleted.")))}else{RCN($dp.list,DIV({c:"empty",s:"color: red"},_("An unknown error happened.")))}Plurks.poster.input.disabled=true});var a=0;var e=ResponseCache.getFromCache(f);if(e){a=e.length}c.sendReq({plurk_id:f,from_response:a})},_renderList:function(m,g){var k=Plurks;var j=$dp.list;var b=$dp.div;if(!b){return}var p=DIV({c:"list",style:"width: "+j.style.width});var q=getPD(b).obj;map(g,function(e){if(isString(e.posted)){e.posted=new Date(e.posted)}e.posted=Cal.convertToLocal(e.posted)});var o=q.responses_seen;var f=q.response_count=g.length;var d,a;var l={};map(g,function(e,s){if(l[e.id]){return}var r=Plurks.renderPlurk(e,true);if(!r){return}removeClass(r,"display");ACN(p,r);if(s==o){d=r}a=r;l[e.id]=true});if(d==getLast(g)){d=null}var c=getPD(b).response_count;removeClass(b,"new");Responses._updateNewRespCount(q);swapDOM(j,p);$dp.list=p;if(g.length==0&&!q.no_comments){ACN(p,DIV({c:"empty"},_("No responses - be the first :)")))}else{setHTML(c,g.length);showElement(c);q.response_count=q.responses_seen=g.length;if(a&&o){setTimeout($p(Plurks.focusTrick,a,ACN),500)}if(d&&f!=o){setTimeout(function(){Plurks.focusTrick(d,ACN);AJS.fx.highlight(getPD(d).cnt,{duration:2000})},500)}}Plurks.poster.input.disabled=false;try{Plurks.poster.input.focus()}catch(h){}},_updateNewRespCount:function(a){if(Plurks.poster){Poll.setPlurkRead(a.id,a.response_count)}},_renderLimitedTo:function(e,a,c,d){ACN(e,_("private plurk to")," ");var b=false;if(d.length==2&&d[0]==d[1]){d=[d[0]]}map(d,function(m,h){if(m==a.owner_id&&d.length!=1){return}var f=SiteState.getUserById(m);var l=SiteState.getSessionUser();if(parseInt(m)==l.uid){f=l}if(f){var k=A({href:f.nick_name,c:"name"},f.display_name||f.nick_name);var j=SPAN(k," ");if(b){hideElement(j)}ACN(e,j)}if(h==6&&c.length>7){var g;ACN(e,SPAN(Responses._moreUsers(c.length-d.length)));b=true}})},_moreUsers:function(a){if(a<10){return _("and some other plurkers")}else{if(a<20){return _("and over 10 other plurkers")}else{if(a<50){return _("and over 30 other plurkers")}}}return _("and over 50 other plurkers")},showLoading:function(c){var a=$dp.cur_loading=DIV({c:"loading"},IMG({src:"http://statics.plurk.com/6ad45e7e08754eba760d200a93f1d115.gif"}));var b=c.parentNode;setTop(a,b.offsetTop);setWidth(a,b.offsetWidth);RCN(c,a)},deleteResponse:function(d,b){var a=getPD(d).obj;swapDOM(b,IMG({src:"http://statics.plurk.com/7f5c4282d2e9accfdae99cc6abb6c9bb.gif"}));var c=getRequest("/Responses/deleteResponse");c.addCallback(function(){removeElement(d);Responses._responseMouseOut();ResponseCache.removeFromCache(a);var e=Plurk.getById(a.plurk_id);if(e){e.response_count--;var f=$("p"+e.plurk_id);setHTML(getPD(f).response_count,""+e.response_count)}});c.sendReq({id:a.id,plurk_id:a.plurk_id})},mouseTO:null,responseMouseOver:function(b){if(Responses.mouseTO){clearTimeout(Responses.mouseTO);Responses._responseMouseOut()}var e=getPD(b).obj;var d=Plurk.getById(e.plurk_id);var f=e.posted;var g=Cal.formatMonthDate(f)+" - "+Cal.formatTime(f.getHours(),f.getMinutes());var h,c=null;var a=SiteState.getSessionUser().id;var o=e.user_id==a;var j=d.owner_id==a;if(o||j){h=A({c:"resp_icon del_icon",title:_("delete this response")},"delete");AEV(h,"click",$p(Responses.deleteResponse,b,h))}if(!o){c=A({c:"reply_to",title:_("reply to this person")},"reply");AEV(c,"click",function(){var p=$("m"+e.id).getElementsByTagName("a")[0].getAttribute("href",2).substring(1);var q="@"+p+": "+$("input_small").value+"~";$("input_small").value="";InputUtil.insertAtCursor($("input_small"),q)})}var l=DIV({c:"response_time plurk_cnt"},DIV({c:"holder"},c,h,P(g)));var m=absolutePosition(b);m.x+=$dp.holder.offsetWidth-6;var k=$gp(b,"div","list");m.y-=k&&k.scrollTop||0;setStyle(l,{top:m.y,left:m.x});ACN(getBody(),l);AEV(l,"mouseover",function(){if(Responses.mouseTO){clearTimeout(Responses.mouseTO)}});return false},responseMouseOut:function(b){var a=Responses;if(a.mouseTO){clearTimeout(a.mouseTO)}a.mouseTO=setTimeout(a._responseMouseOut,600);return false},_responseMouseOut:function(){removeElement($bytc("div","response_time"))}};ResponseCache={plurk_cache:{},addToCache:function(c,a){var b=ResponseCache[c];if(b){ResponseCache[c]=b.concat(a)}else{b=ResponseCache[c]=a}},getFromCache:function(b){var a=ResponseCache[b];if(a){return a}return null},removeFromCache:function(d){var c=d.plurk_id;var a=ResponseCache.getFromCache(c);if(a){var b=[];map(a,function(e){if(e.id!=d.id){b.push(e)}});ResponseCache[c]=b}}};$dp={};$plurks={};function getPD(c,b,a){return $plurks[c.id]}Truncated={};Plurks={img_prefix:"small_",img_toggle:null,qual_toggle:null,show_exapnd:true,poster:null,cur_req:null,visit_timeline:false,init:function(){var c=this;var b=DIV({c:"plurk_box",id:"form_holder"});var a=SiteState.getSessionUser();if(a&&this.show_exapnd){c.poster=PlurkPoster.render({submit_fn:PlurkAdder.plurkResponse,submit_img:"/static/button/plurk_mini.gif",drop_down_img:"http://statics.plurk.com/123918e3c72ef7b92780fffc44085dfb.gif",cookie:"default_qual_mini",extra_menu_class:"mini_menu",top_offset:150,show_submit:false,default_qual:"says",input_id:"input_small"});var d=c._renderResponses(b);$dp.list=d;c._renderPost(b);c._renderEdit(b);c._renderMute(b);c._renderSaver(b);c._renderCommentsDisabled(b);c._renderCommentsOnlyFriends(b)}else{var d=c._renderResponses(b);$dp.list=d;c._renderLogin(b)}c._renderInfoBox(b);$dp.holder=b;$dp.holder_shown=false;hideElement(b);ACN(getBody(),b)},removeCurrentOpen:function(){if($dp.holder_shown){Plurks._removeExpand(false)}if(Plurks.cur_req){Plurks.cur_req.abort()}var a=$("input_small");if(a){PlurkBoxExpand.init(a,"hide")}},cleanPlurk:function(b){var a=$plurks["p"+b];if(a){if(a.div){a.div.onmouseover=null;a.div.onmouseout=null}map(keys(a),function(c){delete a[c]});delete $plurks["p"+b]}},cleanData:function(){$dp.deleting=null;$dp.removing=null;$dp.div=null;$dp.td_close=null;$dp.holder_shown=null;$dp.mute_div=null},__plurkDeleted:function(){var d=$dp.div;var b=$dp.holder;var c=getPD(d).block;var a=getIndex(getPD(d).obj,c.plurks);c.plurks.splice(a,1);a=getIndex(getPD(d).obj,TimeLine.plurks);TimeLine.plurks.splice(a,1);hideElement(b);discardElement(d);Plurks.cleanData();Plurks.poster.input.disabled=false},_deletePlurk:function(){if($dp.deleting){return}if(!confirm(_("Are you sure you want to delete your plurk?"))){Plurks.noExapndOnAction();return false}var a=$dp.holder;$dp.deleting=true;$dp.removing=true;Responses.showLoading($dp.list);Plurks.poster.input.disabled=true;var b=getRequest("/TimeLine/deletePlurk");b.sendReq({plurk_id:getPD($dp.div).obj.plurk_id});setTimeout(Plurks.__plurkDeleted,50);return false},_editPlurk:function(){var e=$dp.div;var c=$dp.holder;var d=Plurks;$dp.removing=true;ACN(getPD(e).td_cnt,$dp.saver);var b=$dp.ta;var a=getPD(e).td_cnt.offsetWidth-10;if(a<150){a=150}setWidth(b,a);b.value=Formatter.realOwnLinks(getPD(e).obj.content_raw);hideElement(getPD(e).div_cnt);appendToTop(getPD(e).td_cnt,b);hideElement($dp.man);showElement($dp.saver);b.focus();d.repositonCurrent();return false},_renderSaver:function(){var a=$dp.ta=TEXTAREA();a.rows=3;var c=$dp.cancel_link=Plurks.createLink("cancel","cancel",null);var b=$dp.save_link=Plurks.createLink("save","action",null);$dp.saver=DIV({c:"manager"},c,"-",b);AEV(c,"click",Plurks.__cancelOnClick);AEV(b,"click",Plurks.__saveOnClick);attachKeyDown(a,Plurks._taKeyPress)},_taKeyPress:function(a){if(a.key==13){Plurks.__saveOnClick();return false}},_renderEdit:function(b){var c=Plurks.createLink(_("edit"),"action",Plurks._editPlurk);var a=Plurks.createLink(_("delete"),"delete",Plurks._deletePlurk);if(SiteState.getSessionUser()&&SiteState.getSessionUser().beta){$dp.man=DIV({c:"manager"},a,"-",c," -")}else{$dp.man=DIV({c:"manager"},a,"-",c)}},__cancelOnClick:function(){hideElement($dp.saver);removeElement($dp.ta);showElement(getPD($dp.div).div_cnt,$dp.man);Plurks.repositonCurrent();Plurks.noExapndOnAction()},__saveOnClick:function(){var h=Plurks;if($dp.saving_edit){return true}var f=$dp.save_link;var b=$dp.div;var k=$dp.holder;var e=$dp.ta;var l=e.value;var a=MaxChar.calculateContentLength(l,getPD(b).obj.lang);if(a>140){var d=a-140;var g=format(_("Content is too long. Remove %s characters."),d);alert(g);e.focus();return true}$dp.saving_edit=true;hideElement($dp.saver);var c;insertAfter(c=DIV({c:"manager"},_("saving...")),$dp.saver);$dp.ta.disabled=true;var j=loadJSON("/TimeLine/editPlurk");j.addCallback(function(m){e.disabled=false;getPD(b).obj.content_raw=m.content_raw;getPD(b).obj.content=m.content;setHTML(getPD(b).div_cnt,m.content);Media.attach(getPD(b).div_cnt,m.id);h.__cancelOnClick();removeElement(c);h.repositonCurrent();delete $dp.saving_edit});j.sendReq({plurk_id:getPD(b).obj.plurk_id,content_raw:l})},_favoritePlurk:function(d,e){var a=d.obj,b=($bytc("div","private",e)[0])?"left:32px":"left:15px";a.favorite=!a.favorite;var c=loadJSON("/Favorites/set");c.sendReq({plurk_id:a.plurk_id,favorite:a.favorite});if(a.favorite){setHTML($dp.fav_link,_("unlike")).className="unmute";addClass(d.div,"favorite");appendToTop(e,DIV({c:"private",s:b},PNGIMG({src:"http://statics.plurk.com/ffdca9715cfcd8ea7adc140c1f9d37df.png",width:16,height:16})))}else{setHTML($dp.fav_link,_("like")).className="action";removeClass(d.div,"favorite");removeElement($bytc("div","private",e)[0])}Plurks.noExapndOnAction();return false},_mutePlurk:function(){var c=0;if(!hasClass($dp.mute_link,"unmute")){c=2}if(c){addClass(setHTML($dp.mute_link,_("unmute")),"unmute");addClass($dp.mute_div,"muted");if($dp.mute_div==$dp.div){addClass($dp.holder,"muted")}}else{removeClass(setHTML($dp.mute_link,_("mute")),"unmute");removeClass($dp.mute_div,"muted");if($dp.mute_div==$dp.div){removeClass($dp.holder,"muted")}}var a=getPD($dp.mute_div).obj;a.is_unread=c;var b=loadJSON("/TimeLine/setMutePlurk");b.sendReq({plurk_id:a.plurk_id,value:""+c});if(c){removeClass($dp.mute_div,"new");Poll.setPlurkRead(a.id,a.response_count)}AmiTooltip.hide();Plurks.noExapndOnAction();return false},_renderMute:function(a){var c=Plurks;var b=c.createLink(_("mute"),"mute delete",c._mutePlurk);$dp.mute_link=b;$dp.mute=DIV({c:"manager"},b," - ")},_renderFav:function(a,d){var d=d;removeElement($dp.fav_link);var c=a,b;var b;if(d.className.indexOf("favorite")>-1){b=Plurks.createLink(_("unlike"),"unmute",$p(Plurks._favoritePlurk,c,d))}else{b=Plurks.createLink(_("like"),"action",$p(Plurks._favoritePlurk,c,d))}hideElement(b);if(SiteState.getSessionUser()&&SiteState.getSessionUser().beta){showElement(b)}$dp.fav_link=b;$dp.man=($bytc("div","manager",d)[0])?$bytc("div","manager",d)[0]:$dp.man;$dp.man=ACN($dp.man,$dp.fav_link)},_renderInfoBox:function(a){var b=$dp.info_box=DIV({c:"info_box"});ACN(a,b)},noExapndOnAction:function(a){a=a||10;if($dp.ta){$dp.ta.value=""}$dp.removing=true;setTimeout(function(){$dp.removing=false},10)},expand:function(g){var x=Plurks;var h=$dp.holder;if($dp.removing){return true}if($dp.div==g&&!$dp.hoverFlag){x._removeExpand(false);return true}$dp.hoverFlag=null;Plurks.noExapndOnAction(100);$dp.mute_div=g;if(InfoOverlay.cloned){InfoOverlay.hideInfoOverlay()}var q=getWindowSize().w;var c=absolutePosition(g).x;var u=(q-c);if(u<450){$dp.div2=g;try{x._removeExpand(false);$dp.removing=true}catch(r){}var t=(700-u)/4;TimeLine.slideBack(4,-t,"left",function(){if(!$dp.div2){return}Plurks.expand($dp.div2);$dp.div2=null});return true}removeClass(g,"link_extend");var d=getPD(g).obj;if(x.poster){var f=x.poster;if(x.visit_timeline){var a;var z=SiteState.getPlurkUser(d);var y=z.display_name&&z.display_name.length>0?z.display_name:z.nick_name;var o=format(_("Visit %s's timeline to respond"),y);var k=A({href:"/"+z.nick_name},o);swapDOM(f.table,a=DIV({s:"text-align: center;"},k));f.table=a}else{f.input.disabled=false;f.input.value="";f.menu.updateSessionQual();var p=$gc(h,"span","m_qualifier");f.menu.changeMenuLang(p,d.lang)}var l=SiteState.getSessionUser();if(d.no_comments==1&&l&&l.id!=d.owner_id){hideElement($dp.post_holder);hideElement($dp.commets_only_friends);showElement($dp.commets_disabled)}else{if(d.no_comments==2){hideElement($dp.commets_disabled);showElement($dp.commets_only_friends);showElement($dp.post_holder)}else{if(d.no_comments==1){hideElement($dp.commets_only_friends);showElement($dp.post_holder);showElement($dp.commets_disabled)}else{hideElement($dp.commets_only_friends);hideElement($dp.commets_disabled);showElement($dp.post_holder)}}}}x.removeCurrentOpen();PlurkBlock.toggleHighlight(g,1);$dp.div=g;addClass(g,"plurk_box");var v=SiteState.getSessionUser();if(x.show_exapnd&&v&&d.owner_id==v.uid){showElement($dp.man);ACN(getPD(g).td_cnt,$dp.man);$dp.save_link.innerHTML="save"}else{if(SiteState.canEdit()){if(d.is_unread==2){addClass(setHTML($dp.mute_link,_("unmute")),"unmute")}else{removeClass(setHTML($dp.mute_link,_("mute")),"unmute")}showElement($dp.mute);ACN(getPD(g).td_cnt,$dp.mute)}}if(d.is_unread==2){addClass(h,"muted")}else{removeClass(h,"muted")}var s=$dp.info_box;var b="/p/"+(d.plurk_id).toString(36);var j=A({href:b},_("plurk page"));RCN(s,DIV({c:"perma_link"},"URL: ",j));if(d.limited_to){var m=d.limited_to;if(m.replace){m=m.replace(/\|\|/g,"|").replace(/^\|/,"").replace(/\|$/,"").split(/\|/)}var w=m;if(m.length>8){w=m.slice(0,8)}PlurkAdder.fetchUsersIfNeeded(w,$p(Responses._renderLimitedTo,s,d,m,w))}else{ACN(s,setHTML(SPAN(),"&nbsp;"))}setTimeout(function(){var e=getPD(g).cnt;var C=absolutePosition(e);setLeft(h,C.x);setTop(h,C.y+getPD(g).td_cnt.offsetHeight+8);setWidth(h,e.offsetWidth);if(v&&x.show_exapnd){setWidth($dp.list,e.offsetWidth-11)}$dp.holder_shown=true;showElement(h);if(x.show_exapnd){Responses.showLoading($dp.list);Responses.fetchItems(h)}},50)},repositonCurrent:function(a){var c=$dp.div;var b=5;setTop($dp.holder,absolutePosition(getPD(c).cnt).y+getPD(c).td_cnt.offsetHeight+b)},_removeExpand:function(a){var c=$dp.div;var b=$dp.holder;getPD(c).obj.response_count=$bytc("div","plurk",$dp.list).length;hideElement(b);$dp.holder_shown=false;if($dp.list){RCN($dp.list,null)}Plurks.__cancelOnClick();hideElement($dp.man,$dp.mute);PlurkBlock.toggleHighlight(c,0);removeClass(c,"plurk_box");getPD(c).cnt.style.backgroundColor="#"+Plurks.getShades(c)[0];if($dp.ta){showElement(getPD(c).div_cnt)}Plurks.cleanData();if(a){Plurks.noExapndOnAction()}if(document.focus){document.focus()}removeElement($bytc("div","response_time"))},_renderClose:function(c){var b=IMG({src:"http://statics.plurk.com/7d18146c10c2fbafa789e79c49db7804.gif"});var a;ACN(c.tr_cnt,a=TD({c:"mini_close"},b));AEV(a,"click",$p(Plurks._removeExpand,true));return a},_renderPost:function(c){var a;var b=$dp.post_holder=DIV(DIV({c:"caption response"},_("Plurk your response:")),a=DIV({c:"mini_form"}));ACN(a,Plurks.poster.table);ACN(c,b)},_renderLogin:function(a){var b;ACN(a,DIV({c:"caption"},_("Recent plurk responses:")),DIV({c:"login_to_see"},b=A({href:"/Users/showRegister"},_("Register your Plurk account to respond to these plurks"))));AEV(b,"click",TopBar.showRegister)},_renderCommentsDisabled:function(a){ACN(a,$dp.commets_disabled=setHTML(DIV({c:"info_box c_disabled"}),_("Responses <b>disabled</b> for others than plurk poster")));hideElement($dp.commets_disabled)},_renderCommentsOnlyFriends:function(a){ACN(a,$dp.commets_only_friends=setHTML(DIV({c:"info_box c_disabled"}),_("Only plurker's <b>friends</b> can respond")));hideElement($dp.commets_only_friends)},_renderResponses:function(c){var a;var b=DIV(DIV({c:"caption"},_("Recent plurk responses:")),a=DIV({c:"list"}));ACN(c,b);return a},renderPlurk:function(l,p){var C=Plurks;var w="p"+l.id;if(p){w="m"+l.id;if($(w)){return null}}var o=$plurks[w]={};o.obj=l;var h=SiteState.getPlurkUser(l);if(!h){return null}var t=DIV({c:"plurk_cnt",id:"plurk_cnt_"+l.id});var g=40;var z=Qualifiers.format(h,l.qualifier,l.content,false,l.lang,l.id);var y=z[0];var s=z[1];var v=z[2];var b,x,m;if(l.lang=="ja"){var f=$gc(y,"span","qualifier");addClass(y,"jap_qual");ACN(s,f);ACN(t,TABLE(TBODY(m=TR(TD({c:"td_qual"},y),x=TD({c:"td_cnt"},s)))))}else{ACN(t,TABLE(TBODY(m=TR(TD({c:"td_qual"},y),x=TD({c:"td_cnt"},s)))))}var r;if(!p){var d=C.getUserImgSrc(h);r=DIV({c:"p_img"},IMG({src:d}))}var b;var q=DIV({c:"plurk"},TABLE(TBODY(b=TR(TD(t)))));if(!p){appendToTop(b,TD({c:"td_img"},r))}if(l.limited_to){appendToTop(q,DIV({c:"private"},PNGIMG({src:"http://statics.plurk.com/c550f52f61da13964d5415c07b7506ca.png",width:16,height:16})))}q.id=w;o.div=q;o.image=r;o.div_cnt=s;o.td_cnt=x;o.cnt=t;o.tr_cnt=m;o.tr=b;if(!p){var a=Truncated[l.id];if(!a){a=Plurks.shouldTruncate(s);Truncated[l.id]=a}var k=a[0];var e=a[1];var c;if(!SiteState.canEdit()&&isIn(k,[1,2])){if(e[0]<350){k=null;addClass(q,"display")}}if(k==1){c="truncated"}else{if(k==2){c="truncated_total"}else{if(k==3){c="truncated_media"}else{if(k==4){c="truncated_media_height"}}}}if(c){C.truncate(q,c)}}if(!p){AEV(q,"mouseover",$p(C._plurkMouseOver,q));AEV(q,"mouseout",$p(C._plurkMouseOut,q));ACN(b,getPD(q).td_resp_count=TD({c:"td_response_count"},getPD(q).response_count=SPAN({c:"response_count"},l.response_count)));var u=$p(this.expand,q);AEV(t,"click",u);AEV(getPD(q).td_resp_count,"click",u);AEV(r,"click",u);if(SiteState.canEdit()){if((Poll.current_data.unread_plurks[l.id])){addClass(q,"new")}}if(l.response_count==0){hideElement(getPD(q).response_count)}}if(p){onEvent(q,"mouseover",$p(Responses.responseMouseOver,q));onEvent(q,"mouseout",$p(Responses.responseMouseOut,q));if(getPD($dp.div).obj.owner_id==l.user_id){addClass(q,"highlight_owner")}}if(l.favorite){var j=($bytc("div","private",q)[0])?"left:32px":"left:15px";addClass(q,"favorite");addClass(setHTML($dp.fav_link,_("unlike")),"unmute");appendToTop(q,DIV({c:"private",s:j},PNGIMG({src:"http://statics.plurk.com/ffdca9715cfcd8ea7adc140c1f9d37df.png",width:16,height:16})))}if(h.nick_name=="plurkbuddy"&&SiteState.canEdit()){addClass(q,"glow")}if(l.is_unread==2){addClass(q,"muted")}return q},getUserImgSrc:function(a,c){c=c||"small";var b="/static/default_"+c+".gif";if(a.has_profile_image){b=avatar_path(a,c)}if(SETTINGS.seed&&SiteState.getPageUser().uid==a.uid){b+="?f="+SETTINGS.seed}return b},plurkMouseOutTO:null,_plurkMouseOut:function(b){var a=Plurks;if(Plurks.plurkMouseOutTO){clearTimeout(Plurks.plurkMouseOutTO)}a.plurkMouseOutTO=setTimeout($p(a.__plurkMouseOut,b),200);return false},_plurkMouseOver:function(d){var a=getPD(d);var b=$dp.ta;if(Plurks.plurkMouseOutTO){clearTimeout(Plurks.plurkMouseOutTO)}if($dp.cur_div==d){return}else{removeClass($dp.cur_div,"link_extend");if(SiteState.canEdit()){if(!hasClass($dp.cur_div,"plurk_box")){removeClass($dp.cur_div,"display")}}}$dp.cur_div=d;if(a.truncated){addClass(d,"display")}addClass(d,"link_extend");if(SiteState.canEdit()){var c=SiteState.getSessionUser();if(c&&a.obj.owner_id!=c.id){$dp.mute_div=d;if(a.obj.is_unread==2){addClass(setHTML($dp.mute_link,_("unmute")),"unmute")}else{removeClass(setHTML($dp.mute_link,_("mute")),"unmute")}ACN(a.td_cnt,$dp.mute);Plurks._renderFav($plurks[d.id],d);showElement($dp.mute);if($dp.holder_shown){Plurks.repositonCurrent()}}else{Plurks._renderEdit();Plurks._renderFav($plurks[d.id],d);if(!hasClass($dp.div,"plurk_box")&&(b&&b.value=="")){$dp.div=d;$dp.hoverFlag=1;showElement($dp.man);ACN(getPD(d).td_cnt,$dp.man);$dp.save_link.innerHTML="save"}}}TimeShow.on_plurk=d;return false},__plurkMouseOut:function(c){var a=getPD(c);if(a){if(SiteState.canEdit()){if(!$dp.holder_shown){if($dp.man){hideElement($dp.man)}var b=SiteState.getSessionUser();if(b&&a.owner_id!=b.id){hideElement($dp.mute)}}}removeClass(c,"link_extend");if(a.truncated&&!hasClass(c,"plurk_box")){removeClass(c,"display")}}TimeShow.on_plurk=null;$dp.cur_div=null},highlightPlurk:function(c,a){a=a||40000;var b=TimeLine.highlight_ids[c];if(b==true){TimeLine.highlight_ids[c]=AJS.fx.highlight("plurk_cnt_"+c,{duration:a,onComplete:function(){TimeLine.highlight_ids[c]=null}},Plurks.getShades($("p"+c)))}},shouldTruncate:function(f,c,g){var j=Plurks._getPlurkCntDim(f);var a=j[0];var h=j[1];var e=$bytc("img",null,f);var d=false;var b=0;map(e,function(k){if(!Emoticons.isEmoticon(k.src)){d=true;b++}});if((d&&b>=2)){return[4,j]}if(a>220){return[1,j]}if(h>50){return[4,j]}return[false,j]},truncate:function(d,a){addClass(getPD(d).div_cnt,a);if(!getPD(d).truncated){var c=TD({c:"dots"},DIV({c:"inner"},"..."));var b=getPD(d).td_resp_count;if(b){insertBefore(c,b)}else{ACN(getPD(d).tr,c)}}getPD(d).truncated=true},_getPlurkCntDim:function(c){var b=c.cloneNode(true);b.style.position="absolute";setTop(b,500);setVisibility(b,false);ACN(getBody(),b);var d=b.offsetWidth;var a=b.offsetHeight;removeElement(b);b=null;return[d,a]},getShades:function(a){return AJS.fx._shades}};Plurks.createLink=function(c,a,b){var d=A({c:a},c);if(b){AEV(d,"click",b)}return d};Plurks.decoratePlurksNav=function(){var a=$("next_plurk");var b=$("prev_plurk");if(b){sText=b.innerHTML;sText=sText.substr(0,60);sText+=b.innerHTML.length>60?"...":"";sText+=" &gt;";b.innerHTML=sText}if(a){sText=a.innerHTML;sText="&lt "+sText.substr(0,60);sText+=a.innerHTML.length>60?"...":"";a.innerHTML=sText}};Plurks.focusTrick=function(a){$dp.list.scrollTop=a.offsetTop};InfoOverlay={timeout:null,init:function(e){var f=this;var g=this.menu=new AmiMenu();addClass(g.menu_holder,"info_menu");g.addItems(createItem(this.user_info=DIV(),null,{cls:"user_info"}));this.only_non_user_n_logged=[];var d,c,b;g.addItems(createSeparator());if(!e){g.addItems(this.reply_item=c=createItem(DIV(_("Reply to")),$b(this.sendReply,this)),d=createItem(DIV(_("Send private plurk")),$b(this.sendPrivatePlurk,this)),b=createSeparator(),createItem(DIV(_("Visit profile")),$b(this.visitProfile,this)),this.friends_of=createItem(DIV(_html(_("Friends of %s"),SPAN({c:"info_name"}))),$b(this.showFriends,this)));this.only_non_user_n_logged.push(d,c,b)}else{g.addItems(createItem(DIV(_("Visit profile")),$b(this.visitProfile,this)),this.friends_of=createItem(DIV(_html(_("Friends of %s"),SPAN({c:"info_name"}))),$b(this.showFriends,this)))}if(top.SiteState.getSessionUser()){g.addItems(b=createSeparator(),this.block_item=d=createItem(DIV({c:"block"},SPAN({c:"txt"},_("Block"))," ",SPAN({c:"info_name"},"")),$b(this.showBlock,this)));this.only_non_user_n_logged.push(d,b)}var a=function(){if(f.timeout){clearTimeout(f.timeout);f.timeout=null;TimeShow.on_plurk=null}};this.loading=DIV({c:"cmp_tooltips-loading"});this.up=DIV({c:"cmp_tooltips-up"});this.down=DIV({c:"cmp_tooltips-down"});onEvent(this.loading,"mouseover",a);onEvent(this.up,"mouseover",a);onEvent(this.down,"mouseover",a);ACN(getBody(),this.loading,this.up,this.down);hideElement(this.loading,this.up,this.down);this._attachEvents(g.menu_holder,500)},showHideItems:function(){var b=true;var c=top.SiteState.getSessionUser();if(c){b=this.user_id==c.id}if(!top.SiteState.canEdit()){b=true}var a=top.SiteState.getUserById(this.user_id)||SiteState.getUserById(this.user_id);if(a.nick_name=="plurkbuddy"){b=true;hideElement(this.friends_of.view);hideElement(this.user_location);setHTML(this.user_gender_info,_("Hi! I am Plurk Buddy and I am here to help make your Plurk experience great."));hideElement(this.user_name)}else{showElement(this.friends_of.view);showElement(this.user_location);showElement(this.user_name)}if(hasClass(this.elm,"gs_link")){b=true}map(this.only_non_user_n_logged,function(d){var e=$gp(d.view,"tr");if(b){hideElement(e)}else{showElement(e)}});if(window.Plurks){if($dp.holder_shown){showElement(this.reply_item.view.parentNode)}else{hideElement(this.reply_item.view.parentNode)}}},sendReply:function(){var a=this.user;var b="@"+a.nick_name+": "+$("input_small").value+"~";$("input_small").value="";InputUtil.insertAtCursor($("input_small"),b);InfoOverlay.hideInfoOverlay();return false},sendPrivatePlurk:function(){var b=this.user;if(!b.are_friends){alert(_("You can only send private plurks to friends"));return false}var a=function(){removeElement($bytc("li","person",$("auto_ta_holder")));var c=AmiComplete.createItem(b.full_name,b.nick_name);appendToTop($gc($("auto_ta_holder"),"ul"),c);$("input_only").checked=true;$("input_only").onclick();$("input_big").focus()};if(!MoreOptions.isShown()){MoreOptions.toggle(a)}else{a()}},showFriends:function(){var a="/Friends/showFriends?user_id="+this.user_id;return top.GB_showCenter(format(_("Friends of %s"),this.user.nick_name),a,600,650)},visitProfile:function(){top.window.location="/"+this.user.nick_name},showBlock:function(d){var c=$gc(d,"span","txt");var a=format(_("Are you sure you want to block %s?"),this.user.nick_name);if(c.is_blocked){a=format(_("Are you sure you want to unblock %s"),this.user.nick_name)}if(confirm(a)){var b="/Friends/blockUser?block_uid="+this.user_id;return top.GB_showCenter(_("Friends"),b,350,650)}return false},atttach:function(a){AEV(a,"mouseover",$b(this.showInfoOverlay,this));this._attachEvents(a,500)},__replaceInfo:function(c){this.user=c;var b=DIV({c:"user_img"},IMG({src:top.Plurks.getUserImgSrc(c,"medium")}));var e=c.karma&&c.karma.toFixed(1)||0;var a=top.Profile.getYears(c.date_of_birth);RCN(this.user_info,DIV(b,this.user_name=DIV({s:"max-width: 200px"},B(c.full_name)),this.user_gender_info=DIV({s:"max-width: 330px; white-space: normal"},a,top.Profile._getGender(c,true),", karma ",e),this.user_location=DIV({s:"overflow: hidden"},top.Profile._getLocation(c))));if(this.block_item){var d=$gc(this.block_item.view,"span","txt");if(c.is_blocked){d.is_blocked=true;setHTML(d,_("Unblock"))}else{d.is_blocked=false;setHTML(d,_("Block"))}}var f=absolutePosition(this.elm);f.y=absolutePosition(this.arrow).y;this.showHideItems();this.menu.show(this.elm,f);setHTML($bytc("span","info_name"),c.nick_name);showElement(this.up);hideElement(this.loading,this.down)},_showUserInfo:function(){var b=this;var a=loadJSON("/Users/fetchUserInfo");a.addCallback(function(c){if(c.are_friends==1){top.FRIENDS[c.id]=c}top.USERS[c.id]=c;b.__replaceInfo(c)});a.addErrback(function(){showElement(b.down);hideElement(b.loading,b.up)});a.sendReq({user_id:this.user_id})},showInfoOverlay:function(d){var g=getEventElm(d);if(g.arrow){return}this.elm=g;this.user_id=g.user_id;this.menu.hide(null,true);removeElement($("info_overlay"));var f=this.arrow=DIV();f.id="info_overlay";if(window.MouseWheel){MouseWheel.attachTLScroll(f)}var c=DIV({c:"drop_arrow",s:"width: 22px; height: 17px;"});var a=DIV(this.down,this.up,this.loading);showElement(this.down);hideElement(this.up,this.loading);RCN(c,a);onEvent(c,"mouseover",function(){addClass(c,"on_arrow")});onEvent(c,"mouseout",function(){removeClass(c,"on_arrow")});onEvent(c,"click",$b(this.toggle,this));ACN(f,c);var b=absolutePosition(g);var e=$gp(g,"div","list");b.y-=e&&e.scrollTop||0;if(e&&isIe()){b.x-=5}setStyle(f,{left:b.x+g.offsetWidth,top:b.y-1,visibility:"hidden"});ACN(getBody(),f);setStyle(f,{visibility:"visible"});this._attachEvents(f,1000)},_attachEvents:function(c,b){var a=this;AEV(c,"mouseout",function(){a.timeout=setTimeout(function(){a.hideInfoOverlay()},b)});AEV(c,"mousemove",function(){if(top.Plurks.plurkMouseOutTO){clearTimeout(top.Plurks.plurkMouseOutTO)}if(a.timeout){clearTimeout(a.timeout);a.timeout=null}},null,true)},hideInfoOverlay:function(a){removeElement(this.arrow);this.menu.hide(null,true)},toggle:function(){if(isElementShown(this.loading)){return}if(isElementShown(this.down)){addClass(this.arrow,"on_div");showElement(this.loading);hideElement(this.up,this.down);this._showUserInfo()}else{removeClass(this.arrow,"on_div");showElement(this.down);hideElement(this.loading,this.up);this.menu.hide(null,true);hideInfoOverlay(true)}}};B_ID=1;B_DATA={};getBD=function(a){return B_DATA[a.id]};PlurkBlock=Class({init:function(a){update(this,a);this.is_rendered=false;this.id=B_ID++;B_DATA[this.id]={}},removeRender:function(){this.is_rendered=false;removeElement(getBD(this).div_cnt);removeElement(getBD(this).div_bg);getBD(this).div_cnt=null;getBD(this).div_bg=null;if(this.plurks){try{Tracks.removePlurksFromTracks(this.plurks)}catch(a){}map(this.plurks,function(b){Plurks.cleanPlurk(b.id)})}},_renderBlock:function(){var d=DIV({c:"div_one_line"});var a,c;var b=DIV(a=DIV({c:"div_inner"}),c=DIV({c:"div_bottom"}));return[d,b,c]},renderBlock:function(d,a){this._render(a);var c=getBD(this).div_bg;var b=getBD(this).div_cnt;if(a){c.style.visibility="hidden";b.style.visibility="hidden"}ACN(T_cnt,b);ACN(T_bg,c);this.setLeft(d);this.l_offset=d},_render:function(){var c=this._renderBlock();var g=this._renderBlock();var d=this.type;if(this.plurks&&this.is_small&&this.plurks.length<=2){d+=" small_hh"}var a=B_DATA[this.id].div_bg=DIV({c:"block_bg "+d});var b=B_DATA[this.id].div_cnt=DIV({c:"block_cnt "+d});ACN(a,c[0],c[1]);ACN(b,g[0],g[1]);var e=c[2];if(this.bottom_end){ACN(e,SPAN({c:"bottom_end"},this.bottom_end))}ACN(e,SPAN({c:"bottom_start"},this.bottom_start));this.is_rendered=true;if(isIn(this.type,["day","day_start"])){addClass(c[1],"day_bg");var f=46;if(this.bottom_start.indexOf("ago")!=-1||(_("Yesterday")==this.bottom_start)){f=70}setWidth(c[0],f);setWidth(c[1],f)}},_rankPlurks:function(f,d){var h=f.response_count!=f.responses_seen;var e=d.response_count!=d.responses_seen;if(h&&!e){return -1}else{if(!h&&e){return 1}}if(Plurk.isPrivate(f)&&!Plurk.isPrivate(d)){return -1}if(Plurk.isResponded(f)&&!Plurk.isResponded(d)){return -1}var c=f.response_count;var g=d.response_count;if(c>g){return -1}else{if(c<g){return 1}}return 0},renderPlurks:function(r,j){if(!this.plurks){return}var s=this;var h=getBD(this).div_cnt;var e=h.offsetWidth/this.interval;var p=this.date_start;var a=this.date_end;this.plurks.sort(this._rankPlurks);for(var o=0;o<this.plurks.length;o++){var d=this.plurks[o];if(PlurkBlock.isWithinBounds(d,p,a)){var g=Plurks.renderPlurk(d,false);g.style.visibility="hidden";ACN(h,g);getPD(g).block=s;var f=(Math.abs(d.posted.getTime()-p.getTime()))/60/1000;var c=(f*e);setLeft(g,c);var b=j+c;var k=Tracks.findTrack(b,d,h);var m=Tracks.getTopOffset(h,k);setTop(g,m);g.style.visibility="visible";if(r){Tracks.tracks[k].splice(0,0,g)}else{Tracks.tracks[k].push(g)}Tracks.plurks[d.id]=k;Plurks.highlightPlurk(d.id)}}if(SiteState.canEdit()&&TimeLine.mode=="friends"){var q=map(this.plurks,function(u){if(u.plurk_id==SiteState.getSessionUser().last_seen_plurk){return u}});var t=getIndex(q,TimeLine.plurks);if(q&&t>1){var g=$("p"+q.id);removeElement($bytc("div","last_seen_plurk"));var l=DIV({c:"last_seen_plurk",id:"last_seen_plurk"});setLeft(l,parseFloat(g.style.left.replace("px",""))-2);setTop(l,0);ACN(l,DIV(_("Your last visit")));ACN(getBD(this).div_cnt,l);AJS.fx.fadeOut(l,{onComplete:function(){removeElement($bytc("div","last_seen_plurk"));SiteState.getSessionUser().last_seen_plurk=null},duration:25000})}}},setLeft:function(a){this.l_offset=a;setLeft(getBD(this).div_cnt,getBD(this).div_bg,a)},incLeft:function(b,c){var e=b;var a=e.div_cnt.offsetLeft+c+"px";e.div_cnt.style.left=a;e.div_bg.style.left=a;return a},setVisibility:function(a){if(a){a="visible"}else{a="hidden"}getBD(this).div_bg.style.visibility=a;getBD(this).div_cnt.style.visibility=a},setTop:function(a){if(a>0){a=0}setTop(getBD(this).div_cnt,a)}});PlurkBlock.zIndex=1000;PlurkBlock.isWithinBounds=function(a,c,b){return a.posted.getTime()>=b.getTime()&&a.posted.getTime()<=c.getTime()};PlurkBlock.toggleHighlight=function(b,a){if(isIe()){var d=a==1&&500||-500;var c=getParentBytc(b,"div","block_cnt");c.style.zIndex+=d}};BlockGenerator={generate:function(c,e){var d=this;var g=[];var h=[];var f=null;var b=null;map(c,function(j){var l=new Date(j.posted);l.setHours(23);l.setMinutes(59);l.setSeconds(59);var k=new Date(l);k.setHours(0);k.setMinutes(0);k.setSeconds(0);if(!Cal.sameDate(f,l)){b={date_start:l,date_end:k,plurks:[]};f=l;h.push(b)}b.plurks.push(j)});map(h,function(m){var o="day_start";if(m.plurks.length>0){var l=Cal.formatMonthDate(m.date_start);if(e){block=new PlurkBlock({type:o,bottom_start:l,plurks:m.plurks,date_start:m.date_start,date_end:m.date_end,interval:1440});block.plurks=null;g.push(block)}else{e=true}var k=[];map(m.plurks,function(p){var q=p.posted.getHours();if(!k[q]){k[q]=[]}k[q].push(p)});var j=false;if(m.plurks.length<=3){j=true}rmap(k,function(r,p){if(!r){return}var t;var s=new Date(r[0].posted);s.setMinutes(59);s.setSeconds(59);s.setMilliseconds(59);var u=new Date(r[0].posted);u.setMinutes(0);u.setSeconds(0);u.setMilliseconds(0);if(r.length<=2){var q=Cal.convertToLocal(s);t=new PlurkBlock({type:"hh_mm",bottom_start:Cal.formatHour(q.getHours()+1),bottom_end:Cal.formatHour(q.getHours()),plurks:r,interval:60,date_start:s,date_end:u,is_small:j});g.push(t)}else{t=d.generateMinuteBlocks(s,r,j);g=g.concat(t)}})}});var a=null;map(g,function(j){if(a){if(a.bottom_end==j.bottom_start){a.bottom_end=""}}a=j});return g},max_hour_count:3,max_ss_count:4,_generateOptimalBlocks:function(o,b,q,p,s,t){var r=[];var f=true;var j=this.max_ss_count;var k=this.max_hour_count;var a=function(x){var u=[];map(p,function(z){if(PlurkBlock.isWithinBounds(z,o,b)){u.push(z)}});var y=new PlurkBlock({type:x,interval:q,plurks:u,date_start:new Date(o),date_end:new Date(b),is_small:s});if(t){y.bottom_start="";y.bottom_end=""}else{var v=Cal.convertToLocal(o);var w=Cal.convertToLocal(b);y.bottom_start=Cal.formatHour(v.getHours(),v.getMinutes());y.bottom_end=Cal.formatHour(w.getHours(),w.getMinutes())}return y};var e=this.intervalCount(p,o,b);if(e>0&&e<=k){r.push(a("hh_mm"))}else{if(t&&e>0&&e<=j){var c="ss";r.push(a(c))}else{if(e>0&&e<=k&&q<=1){var c="mm";r.push(a(c))}else{if(t&&e>0&&q<=1){var c="ss";r.push(a(c))}else{if(e>0){var h=q/2;var g=2;if(h==2.5){g=5;h=1}else{if(h==0.5){g=3;h=20;t=true}}var m=new Date(o);for(var l=0;l<g;l++){var d=new Date(m);this._incInterval(d,h,t);r=r.concat(this._generateOptimalBlocks(new Date(m),new Date(d),h,p,s,t));m=d}if(t&&h==20){map(r,function(x,w){if(w==0){var u=Cal.convertToLocal(x.date_start);x.bottom_start=Cal.formatHour(u.getHours(),u.getMinutes())}else{if(w==r.length-1){var v=Cal.convertToLocal(b);x.bottom_end=Cal.formatHour(v.getHours(),v.getMinutes())}else{x.bottom_end=""}}})}}}}}}return r},_incInterval:function(b,a,c){if(c){b.setSeconds(b.getSeconds()-a)}else{b.setMinutes(b.getMinutes()-a)}return b},generateMinuteBlocks:function(e,d,a){var g=[];var f=new Date(e);for(var c=0;c<3;c++){f=new Date(f);var b=new Date(f);b.setMinutes(b.getMinutes()-20);g=g.concat(this._generateOptimalBlocks(f,b,20,d,a,false));f.setMinutes(f.getMinutes()-20)}return g},intervalCount:function(c,d,b){var a=0;map(c,function(e){if(PlurkBlock.isWithinBounds(e,d,b)){a++}});return a}};function cometNewPlurksCallback(a,b){map(b,function(c){c.user_id=SiteState.getSessionUser().id});Poll.fetchedPlurks(b)}OpenX={Zones:{AllPlurks:2,MyPlurks:3,Private:4,Responded:5,Search:6,PermaPlurk:8,Profile:7},ZoneConfig:{},delivery:{url:"//cl-t110-201cl.plurk.com/www/delivery",file:"ajson.php"},scriptId:"ac076a29",currentZone:0,rendered:false,token:"",playerVisible:false,banner:null,refreshTimer:null,init:function(){var a=SiteState.getSessionUser();if(!a){return}if(!isIn(a.id,[1,2,5111])){return}if(location.hostname=="www.plurk.com"){return}var b={vertical:"bottom",horizontal:"right",width:255,height:100};OpenX.ZoneConfig[OpenX.Zones.AllPlurks]=b;OpenX.ZoneConfig[OpenX.Zones.MyPlurks]=b;OpenX.ZoneConfig[OpenX.Zones.Private]=b;OpenX.ZoneConfig[OpenX.Zones.Responded]=b;OpenX.ZoneConfig[OpenX.Zones.Search]=b;OpenX.ZoneConfig[OpenX.Zones.Profile]=b;OpenX.ZoneConfig[OpenX.Zones.PermaPlurk]=b;AEV(window,"resize",OpenX.render);OpenX.refreshTimer=setInterval(OpenX.loadZone,300000);OpenX.inited=true},invokeZone:function(a,b){if(!OpenX.inited){return}if(b){OpenX.token=b}$("openx").style.display="none";OpenX.banner=null;OpenX.currentZone=a;OpenX.loadZone()},loadZone:function(){var d=Math.floor(Math.random()*99999999999);var b=location.protocol+OpenX.delivery.url+"/"+OpenX.delivery.file+"?zoneid="+OpenX.currentZone+"&Plurk="+OpenX.token+"&cb="+d;var c=document.getElementsByTagName("head")[0];var a=document.createElement("script");a.setAttribute("src",b);a.setAttribute("type","text/javascript");a.setAttribute("id",OpenX.scriptId);c.appendChild(a)},setBanner:function(a){OpenX.banner=a;var b=document.getElementsByTagName("head")[0];b.removeChild(document.getElementById(OpenX.scriptId));OpenX.render()},render:function(){if(!OpenX.banner){return}var b=A({href:OpenX.banner.clickUrl,target:"_blank"},IMG({src:OpenX.banner.imageUrl,border:0,alt:OpenX.banner.alt}));onEvent(b,"click",$b(OpenX.hideZone,OpenX));var c=A({href:OpenX.banner.clickUrl,target:"_blank"},OpenX.banner.alt);onEvent(c,"click",$b(OpenX.hideZone,OpenX));var a=A({href:OpenX.banner.clickUrl,target:"_blank"},OpenX.banner.bannertext);onEvent(a,"click",$b(OpenX.hideZone,OpenX));RCN($("openx"),null);ACN($("openx"),DIV({c:"plurk_cnt"},TABLE(TR(TD(b),TD(H3(c),P(a))))));OpenX.positionZone()},hideZone:function(){$("openx").style.display="none";clearInterval(OpenX.refreshTimer)},positionZone:function(){if(!OpenX.inited){return}var b=OpenX.ZoneConfig[OpenX.currentZone];var a=$("openx");a.style.width=b.width;a.style.height=b.height;var d=getWindowSize();var f=23;var c=d.h>500?385:310;var e=5;switch(b.vertical){case"bottom":a.style.top=(c-(b.height+e+(OpenX.playerVisible&&b.horizontal=="right"?30:0)))+"px";break;case"top":a.style.top=(f+e)+"px";break}switch(b.horizontal){case"left":a.style.left=e+"px";break;case"right":a.style.right="0px";break;case"center":a.style.left=Math.floor(d.w/2-b.width/2)+"px";break}a.style.display="block"}};MaxChar={init:function(a,b){var a=$(a);AEV(a,"keyup",$p(MaxChar.updateCharCount,a,b))},updateSmall:function(){MaxChar.updateCharCount($("input_small"),$("input_small_cu"))},re_all_urls:/https?:\/\/[^\s]*/g,re_tw_fb:/\s*!(FB|TW|YA)\s*/,calculateContentLength:function(a,e){a=strip(a);if(!e&&window.main_poster&&main_poster.menu){e=main_poster.menu.cur_lang}var c=Qualifiers.getFirstWQual(a,e)||"";a=strip(a.substr(c.length));a=a.replace(this.re_tw_fb,"");var b=0;var d=function(f){if(f.length>30){b+=30}else{b+=f.length}return""};a=a.replace(this.re_all_urls,d);return a.length+b},updateBig:function(){MaxChar.updateCharCount($("input_big"),$("input_big_cu"))},updateCharCount:function(b,c,e){var b=$(b);var g;if(b.id=="input_small"&&$dp.div){g=getPD($dp.div).obj.lang}else{if(b.id=="input_big"){g=main_poster.menu.cur_lang}}var d=(140-MaxChar.calculateContentLength(b.value,g));if(d>=0){var a="";if(d<=50){a=format(_("%s characters left"),d)+". "}if(b.id=="input_small"){a+='<span style="color: #555">'+_("Press Enter to add")+"</span>"}b.style.color="black";setHTML(c,a);removeClass(c,"char_highlight")}else{addClass(c,"char_highlight");setHTML(c,format(_("Too many characters. Remove %s!"),Math.abs(d)));b.style.color="red"}if(d<=50&&d>=0){addClass(c,"highlight_light")}else{removeClass(c,"highlight_light")}var f=b.scrollTop;if(f!=0){PlurkBoxExpand.init(b)}}};PlurkBoxExpand={init:function(e,f){var a=e;var d=AJS.getParentBytc(a,null,"plurkForm");var b=AJS.$bytc("span","char_updater",d);if(f){a.className="content";a.style.marginBottom="-3px";d.style.marginBottom="0px";b[0].style.marginTop="0px";a.style.width=""}else{a.className="multi-line";if(a.id.indexOf("small")>0){a.style.marginBottom="-34px";b[0].style.marginTop="32px"}else{if(a.id.indexOf("permalink")>0){a.style.marginBottom="-52px";b[0].style.marginTop="52px"}else{a.style.marginBottom="-66px";b[0].style.marginTop="66px"}}}}};USERS={};Users={update_title:true,init:function(){Users.updateTitle()},_getStandard:function(){var a=SiteState.getSessionUser().display_name;a=a&&a.length?a:SiteState.getSessionUser().nick_name;return"Plurk | "+a},updateTitle:function(){if(!Users.update_title){return}var f="";var c=keys(Poll.current_data.new_plurks).length;var g=keys(Poll.current_data.unread_plurks).length;var b=SiteState.getPageUser();var d=b.display_name&&b.display_name.length?b.display_name:b.nick_name;var a=b.page_title&&b.page_title.length?b.page_title:d;if(c||g){f=(c+g)+" "+_("unread")+" - "}var e=Users.base_title;if(!e){Users.base_title=e=document.title}document.title=f+e}};Tracks={offset_top:21,offset_plurks:45,max_tracks:8,init:function(){var a=this.tracks=[];for(var b=0;b<this.max_tracks;b++){a[b]=[]}this.plurks={};if(!SiteState.canEdit()){Tracks.offset_top=35}},removePlurksFromTracks:function(a){if(!a){return true}var b=this;map(a,function(d){var f=b.plurks[d.id];var c=b.tracks[f];if(c){var g=d.id;var e=getIndex(d.id,c,function(h){if(g==getPD(h).obj.id){return true}return false});c.splice(e,1)}})},getTopOffset:function(b,a){return(b.offsetTop+this.offset_top)+(a*this.offset_plurks)},findTrack:function(g,a,f){var h=this;var c=this.plurks[a.id];if(c!=undefined){return c}for(var e=0;e<this.tracks.length-1;e+=2){var b=this.tracks[e];if(b.length==0||this.canBeInserted(b,g)){return e}}for(var e=1;e<this.tracks.length-2;e+=2){var b=this.tracks[e];if(b.length==0||this.canBeInserted(b,g)){return e}}var d=Math.floor(Math.random()*(this.tracks.length-1));return d},canBeInserted:function(a,c){var d=getLast(a);try{var b=d.offsetWidth+absolutePosition(d).x+20}catch(f){return true}if(navigator.userAgent.toLowerCase().indexOf("khtml")!=-1){b+=25}if(b<c){return true}return false}};Cal={am_pm:true,ms_per_day:24*60*60*1000,monthShort:{1:_("Jan"),2:_("Feb"),3:_("Mar"),4:_("Apr"),5:_("May"),6:_("Jun"),7:_("Jul"),8:_("Aug"),9:_("Sep"),10:_("Oct"),11:_("Nov"),12:_("Dec")},leadingZero:function(a){if(a<10){a="0"+a}return a},sameDate:function(b,a){if(!b||!a){return false}if(b.getDate()==a.getDate()&&b.getMonth()==a.getMonth()&&b.getYear()==a.getYear()){return true}return false},dayDiff:function(e){var d=new Date();var c=new Date(e);d.setHours(0);d.setMinutes(0);c.setHours(0);c.setMinutes(0);var b=c.getTime()-d.getTime();var a=Math.round(b/this.ms_per_day);if(a==-1&&d.getDate()==c.getDate()){return 0}return a},addToDate:function(b,a,c){var d=b.getTime();var f=b.getTimezoneOffset()*60*1000;var e=d+f;if(a){e+=a*60*60*1000}if(c){e+=c*60*1000}return new Date(e)},convertToLocal:function(c,b){var a=SiteState.getPageUser();if(!a){a=SiteState.getSessionUser()}if(!a||!a.timezone_hh){return c}return Cal.addToDate(c,a.timezone_hh,a.timezone_mm)},formatMonthDate:function(b){var a=this.dayDiff(b);if(a==0){return _("Today")}else{if(a==-1){return _("Yesterday")}else{if(a<0&&a>=-2){return Math.abs(a)+" "+_("days ago")}}}return this.monthShort[b.getMonth()+1]+" "+b.getDate()},formatHour:function(a,b){if(!b){b=0}if(a==-1){a=23}return this.formatTime(a,b)},formatTime:function(c,e){var a=true;if(SiteState.getSessionUser()&&SiteState.getSessionUser().timeformat==0){a=false}if(!a){if(c==24){c="00"}return this.leadingZero(c)+":"+this.leadingZero(e)}else{var b="am";if(c==12){b="pm"}if(c>12){c-=12;b="pm"}if(c==0&&b=="am"){c=12}var d="";if(e){d=":"+this.leadingZero(e)}return c+d+b}},formatPrettyDate:function(c){var d=c.getFullYear();var b=c.getDate();var a=this.monthShort[c.getMonth()+1]+" "+b+", "+d;return a}};PlurkAdder={plurk:function(k,m,p){if(!SiteState.checkIfLoggedIn()){alert(_("You seem to be logged out. We will redirect you to login page."));window.location="/Users/showLogin"}var a=main_poster.menu.cur_lang;if(k.disabled||k.value.length==0||MaxChar.calculateContentLength(k.value,a)>140){return false}TimeLine.showLoading();k.disabled=true;PlurkAdder.posting=true;Plurks.removeCurrentOpen();var l=k.value;var d=serializeJSON(new Date());var h=0;if(MoreOptions.no_comments&&MoreOptions.no_comments.checked){h=1}if(MoreOptions.no_comments_friends&&MoreOptions.no_comments_friends.checked){h=2}if(MoreOptions.no_facebook&&MoreOptions.no_facebook.checked){l+=" !FB"}var m=Qualifiers.getQual(m);var b=Qualifiers.transformContentQualifer(m,l,a);m=b[0];l=b[1];var o=loadJSON("/TimeLine/addPlurk");o.addCallback($p(PlurkAdder._plurkAdded,k,p));o.addCallback(function(){var e=$("input_everybody");if(e){map($bytc("li","person",$("auto_ta_holder")),removeElement);$("input_only").checked=false;$("input_friends").checked=false;e.checked=true;$("auto_ta_input").onadd()}if(MoreOptions.no_comments){MoreOptions.no_comments.checked=false}if(SiteState.getSessionUser().comments_only_friends_can_post){MoreOptions.no_comments_friends.checked=true}if(MoreOptions.no_facebook){MoreOptions.no_facebook.checked=false}});var g=$p(PlurkAdder._onPlurkAddError,k);o.addErrback(PlurkAdder._antiSpamErrors);o.addErrback(g);if(m=="freestyle"){m=":"}var c={posted:d,qualifier:m,content:l,lang:a,no_comments:h,uid:SiteState.getSessionUser().id};PlurkAdder.new_plurk_data=c;if($("auto_ta_input")&&$("auto_ta_input").value){alert(_("Invalid private plurk field, no persons are selected"));PlurkAdder._onPlurkAddError(k,false);$("auto_ta_input").focus();return false}try{var f=PlurkAdder._getLimitedTo()}catch(j){g(j)}if(f){c.limited_to=serializeJSON(f)}window.scrollTo(0,0);o.sendReq(c);return false},_onPlurkAddError:function(a,b){if(b=="Must be friends"){TopBar.update_friends=true;TopBar._updateFriends();alert(_("You can only send private plurks to friends"))}else{if(b&&b.indexOf("anti-")==-1){alert(_("Could not plurk. Try again in a minute"))}}TimeLine.hideLoading();a.disabled=false;a.focus();if(MoreOptions.no_comments){MoreOptions.no_comments.checked=false}if(SiteState.getSessionUser().comments_only_friends_can_post){MoreOptions.no_comments_friends.checked=true}if(MoreOptions.no_comments_friends){MoreOptions.no_comments_friends.checked=false}},_plurkAdded:function(f,d,b){f.disabled=false;var a=b.plurk;if(isString(a.posted)){a.posted=new Date(a.posted)}PlurkAdder.setLastSeenPlurk();SiteState.getSessionUser().last_seen_plurk=null;TimeLine.addPlurks([a]);TimeLineCache.addPlurk(a);f.value="";try{f.focus()}catch(c){}PlurkBoxExpand.init(f,"hide");MaxChar.updateBig();PlurkAdder._incCount($("plurks_count"));PlurkAdder.posting=false},_antiSpamErrors:function(a){if(a=="anti-flood-same-content"){alert(_("Woaaa, could not plurk due to anti flood rules.\nIt seems you have plurked this a few minutes ago."))}else{if(a=="anti-flood-too-many-new"){alert(_("Woaaa, could not plurk due to anti flood rules.\nYou have plurked too many plurks the past few minutes.\nChill down and come back in 10 minutes time."))}else{if(a=="anti-flood-too-many-still"){alert(_("Your plurking is disabled.\nYou have plurked too much, chill down and come back in 10 minutes time."))}}}},plurkResponse:function(e,g,j){if(!SiteState.checkIfLoggedIn()){alert(_("You seem to be logged out. We will redirect you to login page."));window.location="/Users/showLogin"}var a=getPD($dp.div).obj.lang;if(e.disabled||e.value.length==0||MaxChar.calculateContentLength(e.value,a)>140){return false}var d=serializeJSON(new Date());var f=e.value;var g=Qualifiers.getQual(g);var b=Qualifiers.transformContentQualifer(g,f,a);g=b[0];f=b[1];f=PlurkAdder.resolveNickNames(f);PlurkAdder.posting=true;e.disabled=true;setHTML($("input_small_cu"),'<span style="color: black">'+_("Plurking response...")+"</span>");var h=loadJSON("/Responses/add");h.addCallback($p(PlurkAdder._responseAdded,e,j));h.addErrback(PlurkAdder._antiSpamErrors);h.addErrback(function(l,k){if(k.status==400){}else{if(k.status==404){RCN($dp.list,DIV({c:"empty",s:"color: red"},_("This plurk seems to be deleted.")))}else{if(k.status==403){RCN($dp.list,DIV({c:"empty",s:"color: red"},_("You don't have permission for this."),BR(),setHTML(SPAN(),l.substring(0,100))))}else{RCN($dp.list,DIV({c:"empty",s:"color: red"},_("An unknown error happened.")))}}}setHTML($("input_small_cu"),format(_("%s characters left"),140));Plurks.poster.input.disabled=true;e.disabled=false;e.focus()});if(g=="freestyle"){g=":"}var c=getPD($dp.div).obj;h.sendReq({posted:d,qualifier:g,content:f,p_uid:c.owner_id,plurk_id:c.plurk_id,lang:a,uid:SiteState.getSessionUser().id});return false},_responseAdded:function(f,d,a){Poll.last_ts=parseInt(a.last_ts);f.disabled=false;f.value="";try{f.focus()}catch(c){}PlurkBoxExpand.init(f,"hide");MaxChar.updateSmall();PlurkAdder._incCount($("response_count"));Responses.addToList(a.object);PlurkAdder.posting=false;var b=getPD($dp.div).obj;TimeLineCache.addToCache("responded",b)},removePlurkByCnt:function(a){var c=map(TimeLine.plurks,function(d){if(d.content.indexOf(a)!=-1){return c}});var b=getRequest("/TimeLine/removePlurk");b.sendReq({plurk_id:c})},saveUserValue:function(a,c){var b=getRequest("/Users/updateUserValue");SiteState.getSessionUser()[a]=c;b.sendReq({name:a,value:c})},fetchUsersIfNeeded:function(a,c){var b=[];map(a,function(d){if(!SiteState.getUserById(d)){b.push(d)}});if(b.length==0){c()}else{PlurkAdder.fetchUsers(b,c)}},fetchUsers:function(a,c){var b=loadJSON("/Users/fetchFriends");b.addCallback(function(d){update(USERS,d);c()});b.sendReq({ids:serializeJSON(a)})},resolveNickNames:function(b){var c=Plurks.cur_plurkers;if(!c||c.length==0){return b}var a=b.match(/\B@([^\s:]{1,})/g);if(a){map(a,function(d){var g=d.split("@")[1].toLowerCase();var f=[];map(c,function(m){var o="";if(m.display_name){o=m.display_name.toLowerCase()}var h=m.nick_name.toLowerCase();var l=function(p){return p.indexOf(g)};var k=l(o)!=-1||l(h)!=-1;if(k){var j=l(o);if(j==-1){j=l(h)}f.push([j,g,m.nick_name,o])}});if(f.length>0){var e=f[0];map(f,function(h){if(h[1]==h[3]||h[1]==h[2]){e=h;return}if(h[0]<e[0]){e=h}});b=b.replace(new RegExp("@"+e[1],"gi"),"@"+e[2])}})}return b},getAutoCompleteIds:function(c){var b=$bytc("li","person",$(c));if(b.length==0){return null}var a=[];map(b,function(g){var f=g.nick_name;if(f=="CLIQUE"){var h=PlurkAdder._getCliqueByName(g.full_name);if(h){var e=PlurkAdder._getCliqueFriends(h);map(e,function(j){a.push(j)})}}else{var d=SiteState.getUserByNick(f);if(!d){throw"must-be-friends"}else{a.push(SiteState.getUserByNick(f).uid)}}});return a},_getLimitedTo:function(){var d=$("input_everybody");var e=$("input_only");var b=$("input_friends");if(!d||d.checked){return null}var a=[];a.push(SiteState.getSessionUser().uid);if(e.checked){var c=PlurkAdder.getAutoCompleteIds("auto_ta_holder");if(!c){return null}else{map(c,function(f){if(SiteState.getUserById(f)||COMPLETION[f]){a.push(f)}})}}else{if(b.checked){a="only-friends"}}return a},_getCliqueByName:function(a){return map(CLIQUES,function(b){if(b.name==a){return b}})},_getCliqueFriends:function(a){var b=[];map(a.friends.replace(/\|\|/g,"|").split(/\|/),function(c){if(c!=""){b.push(parseInt(c))}});return b},_incCount:function(a){if(a){setHTML(a,parseInt(a.innerHTML)+1)}},setLastSeenPlurk:function(){if(SiteState.canEdit()&&TimeLine.mode=="friends"){var b=PlurkAdder._getLastSeen();if(b){var a=getRequest("/Users/updateUserValue");a.sendReq({name:"last_seen_plurk",value:b})}}},_getLastSeen:function(){var a=getFirst(TimeLine.plurks);if(a){return a.plurk_id}return null}};var T_cnt;var T_bg;var T_user_stylesheet;TimeLine={init:function(a){this.blocks=[];this.plurks=[];this.active_blocks=[];this.getting_plurks=false;this.move_tl=false;this.mode="friends";if(!a){this.offset=0;this.real_end_offsets={};this.fetch_count={};this.highlight_ids={}}this.content_inner=$("timeline_holder");RCN(this.content_inner,null);this.top=$("top_login");this.renderTLContent();this.renderTLBackground();this.setCreature(SiteState.getPageUser()&&SiteState.getPageUser().creature||1);this.renderBottomLine();this.renderDynamicLogo();var b=$b(this.resize,this);b();if(!this.inited){AEV(window,"resize",b);AEV(document,"mousedown",this.moveTimeline);var c=function(){TimeLine.move_tl=false;if(!TimeLine.sliding_tl){TimeLine.showBigMedia()}};AEV(document,"mouseup",c)}TimeShow.init();this.attachMoveTL(T_cnt);this.attachMoveTL(T_bg);this.setExpandFully(!SiteState.canEdit());this.str_private_timeline=_("This timeline is set to private.");if(InfoOverlay.cloned){InfoOverlay.hideInfoOverlay()}this.inited=true},setTheme:function(a){Themes.setTheme(a);Themes.replaceImages()},setCreature:function(a){if(!$("creature")){return}var b=PNGIMG({id:"creature",src:$static_path("/static/creatures/big/"+a+".png")});onEvent(b,"load",TimeLine.resize);swapDOM($("creature"),b);setTimeout(TimeLine.resize,100);setWidth($("dynamic_logo"),130+TimeLine._creature_widths[a]);TimeLine.resize()},setExpandFully:function(a){TimeLine.expand_fully=false;BlockGenerator.max_hour_count=2;BlockGenerator.max_ss_count=2},_initMove:function(a){var b=getEventElm(a);window.focus();if(getParentBytc(b,"div","plurk")||getParentBytc(b,"div","plurk_box")){return true}if(TimeLine.move_disabled){return false}if($dp.holder_shown){Plurks.removeCurrentOpen()}AJS.preventDefault(a);TimeLine.move_tl=true;TimeLine.last_mouse_pos=AJS.getMousePos(a);TimeLine.content_inner.focus();TimeLine.hideBigMedia();if(window.scrollTop!=0){window.scrollTo(0,0)}},showBigMedia:function(){map($bytc("img","big_image"),function(a){setVisibility(a,true);removeClass(a.parentNode,"big_image_border")});TimeLine.big_media_hidden=false},hideBigMedia:function(){map($bytc("img","big_image"),function(a){setVisibility(a,false);addClass(a.parentNode,"big_image_border")});TimeLine.big_media_hidden=true},attachMoveTL:function(a){if(a.onmousedown){AEV(a,"mousedown",this._initMove)}else{a.onmousedown=this._initMove}AEV(a,"mousemove",this.moveTimeline)},_prefetch_check:null,moveTimeline:function(e){var d=TimeLine;if(d.blocks.length==0){return}var b=AJS.getMousePos(e);if(d.move_tl){AJS.preventDefault(e);var a=d.last_mouse_pos;if(b.x!=a.x){var c=(b.x-a.x);if($dp.holder_shown){Plurks.removeCurrentOpen()}d.scrollBack(c);setSingleTimeout("prefetchCheck",d.prefetchCheck,150);d.last_mouse_pos=b}}else{if(b.x<75&&b.y>22){d.showButton("left",true)}else{d.showButton("left",false)}var f=d.content_inner.offsetWidth;if(f-b.x<75&&b.y>22){d.showButton("right",true,function(g){setLeft(g,f-85)})}else{d.showButton("right",false)}}TimeShow.displayTime()},scrollBack:function(h){var g=TimeLine;if(InfoOverlay.cloned){InfoOverlay.hideInfoOverlay()}var d=getFirst(g.active_blocks);var c=getFirst(g.blocks);var f=getLast(g.active_blocks);var e=getLast(g.blocks);if(d==c&&h>0){if(absolutePosition(getBD(d).div_bg).x>25){return false}}if(f==e&&h<0){if(absolutePosition(getBD(e).div_bg).x<-50){return false}}for(var b=0;b<g.active_blocks.length;b++){var a=g.active_blocks[b];var j=getBD(a);if(getBD(a).div_bg){a.incLeft(j,h)}}if(g.active_blocks.length>0){g.startChecks();g.endChecks()}},moveToBlock:function(d){if($dp.holder_shown){Plurks.removeCurrentOpen()}var k=TimeLine;k.move_disabled=true;map(k.active_blocks,function(m){m.removeRender()});k.showLoading();k.active_blocks=[];var h=10;var a=k.blocks;var l=[];if(d=="back"){var f=a.length;var j=f-9;if(j<0){j=0}l=a.slice(j,f)}else{l=a.slice(0,10)}map(l,function(m){k.active_blocks.push(m);m.renderBlock(h);m.renderPlurks(false,h);h+=getBD(m).div_bg.offsetWidth});k.hideLoading();if(d=="back"&&k.blocks.length>5){var b=getBD(getLast(k.blocks));var g=getWindowSize().w;for(var e=0;e<=10;e++){if(b.div_cnt){var c=b.div_cnt.offsetLeft+b.div_cnt.offsetWidth+150;if(c<g){break}}k.scrollBack(-100)}}k.move_disabled=false;return false},slideBack:function(c,b,d,a){if(c==10){if($dp.holder_shown){Plurks.removeCurrentOpen()}TimeLine.hideBigMedia();TimeLine.sliding_tl=true}c--;if(c==0){TimeLine.sliding_tl=false;TimeLine.showBigMedia()}if(c!=0){TimeLine.scrollBack(b);setSingleTimeout("slideBack",$p(TimeLine.slideBack,c,b,d,a),2);return}if(d=="right"){TimeLine.prefetchCheck()}if(isFunction(a)){a()}},showButton:function(h,a,c){var e=TimeLine;if(!e["btn_"+h]){var f=h=="left"&&40||-40;var b="cmp_arrow_"+h;var b=DIV({c:b});var g=e["btn_"+h]=DIV({c:"browse_button"},b);AEV(b,"mousedown",$p(this.slideBack,10,f,h));var d;ACN(g,d=DIV({c:"cmp_back_to_today"}));AEV(d,"click",$p(this.moveToBlock,"front"));ACN(getBody(),g)}if(a){if(e.active_blocks.length>0){if(c){c(e["btn_"+h])}showElement(e["btn_"+h])}}else{if(!a){hideElement(e["btn_"+h])}}},prefetchCheck:function(){var c=TimeLine;if(Poll.getting_plurks||Poll.mode=="new"){return}if(c.blocks.length>1){var b=getLast(c.blocks);if(b.is_rendered){var a=getBD(b).div_cnt;if((a.offsetLeft-100)<getWindowSize().w){setSingleTimeout("getPlurks",c.getPlurks,300)}}}},end_offset:25,endChecks:function(){var g=TimeLine;var k=g.active_blocks;var d=g.active_blocks.length-1;var a,j,c;var f=g.getCurActive(d);if(!f){return}a=f[0];j=f[1];c=f[2];if(!j){return}var b=T_cnt.offsetWidth+this.end_offset;if(j.offsetLeft>b){if(g.active_blocks.length<2){return true}a.removeRender();g.active_blocks.splice(d,1)}else{if(j.offsetWidth+j.offsetLeft<b){if(c!=(this.blocks.length-1)){var h=this.blocks[c+1];j=getBD(this.active_blocks[this.active_blocks.length-1]).div_bg;this.active_blocks.push(h);if(!h.is_rendered){h.renderBlock(0);var e=j.offsetLeft+j.offsetWidth;h.setLeft(e);h.renderPlurks(false,e);h.setVisibility(true)}}}}},start_offset:-25,startChecks:function(){var f=this;var d,h,g;var c=f.getCurActive();d=c[0];h=c[1];g=c[2];if(!h){return}if((h.offsetLeft+h.offsetWidth)<this.start_offset){if(f.active_blocks.length<2){return true}d.removeRender();f.active_blocks.splice(0,1)}else{if(h.offsetLeft>this.start_offset){if(g!=0){var e=this.blocks[g-1];h=getBD(this.active_blocks[0]).div_bg;if(e){this.active_blocks.splice(0,0,e);if(!e.is_rendered){e.renderBlock(0,true);var a=getBD(e).div_bg;var b=h.offsetLeft-a.offsetWidth;e.setLeft(b);e.renderPlurks(true,b);e.setVisibility(true)}}}}}},getCurActive:function(a){var a=a||0;var b=TimeLine.active_blocks[a];if(!b){return null}return[b,getBD(b).div_bg,getIndex(b,TimeLine.blocks)]},renderTLContent:function(){ACN(this.content_inner,T_cnt=DIV({id:"timeline_cnt"}));MouseWheel.attachTLScroll(T_cnt)},renderTLBackground:function(){ACN(this.content_inner,T_bg=DIV({id:"timeline_bg"}))},check_offsets:true,renderBlocks:function(o){var h=this;var c=getLast(h.blocks);var b=true;if(c){var e=c.date_start;var m=c.date_end;var f=getFirst(o);if(f&&Cal.sameDate(f.posted,m)){b=false}var k=[];map(o,function(p){if(PlurkBlock.isWithinBounds(p,e,m)){k.push(p)}});if(k.length>0){o=c.plurks.concat(o);this.blocks.pop();if(c.is_rendered){this.active_blocks.pop()}map(c.plurks,function(p){Tracks.plurks[p.id]=null});c.removeRender()}}c=getLast(this.blocks);var a=BlockGenerator.generate(o,b);this.blocks=this.blocks.concat(a);var g=10;var d=c&&c.is_rendered;if(d){var j=getBD(c).div_bg;g=j.offsetLeft+j.offsetWidth}var l=h.active_blocks.length;if(l==0||(l<10&&(!c||c&&d))){map(a,function(q,p){if(p==10){return true}h.active_blocks.push(q);q.renderBlock(g);q.renderPlurks(false,g);g+=getBD(q).div_bg.offsetWidth})}},_sortPlurks:function(d,c){var f=d.posted.getTime();var e=c.posted.getTime();if(f<e){return 1}else{if(f==e){return 0}else{return -1}}},addPlurks:function(b){map(b,function(c){TimeLine.setHightlight(c.id)});var a=b.concat(TimeLine.plurks);TimeLine.reset(true);TimeLine.plurks=a;TimeLine.renderBlocks(a);DisplayOptions.show()},renderEmpty:function(){var b=TimeLine;var a;if(SiteState.canEdit()&&!Poll.mode=="unread"){a=_("You can start plurking by using the input field below.<br /><br/>Happy plurking!")}else{if(TimeLine.error=="NoReadPermissionError"){a=this.str_private_timeline}else{a=_("This timeline is empty.")}}b.renderText(a)},renderText:function(a){ACN(T_cnt,setHTML(DIV({id:"empty_timeline_bg"}),a));ACN(T_cnt,setHTML(DIV({id:"empty_timeline_fg"}),a))},removeEmpty:function(){removeElement("empty_timeline_bg");removeElement("empty_timeline_fg")},renderBottomLine:function(){ACN(this.content_inner,DIV({id:"bottom_line"}))},_creature_widths:{1:117,2:85,3:124,4:180,5:110,6:103,7:98,8:95,9:75,10:100,11:83,12:95},renderDynamicLogo:function(){var d=DIV({id:"dynamic_logo"});var a=SiteState.getPageUser()&&SiteState.getPageUser().creature||1;var c=TimeLine._creature_widths[a];setWidth(d,c+130);var b=PNGIMG({id:"creature",src:$static_path("/static/creatures/big/"+a+".png")});ACN(d,PNGIMG({s:"vertical-align: top; margin-right: 2px;",src:"http://statics.plurk.com/f4c3b981a09c1e932ad9e9e5ec691feb.png"}),b);ACN(this.content_inner,d)},resize:function(){setLeft($("dynamic_logo"),TimeLine.top.offsetWidth-$("dynamic_logo").offsetWidth-10);setTop($("bottom_line"),T_cnt.offsetHeight+2);if(getWindowSize().h<600){hideElement($bytc("div","time"))}else{showElement($bytc("div","time"))}},insertPlurks:function(b){var c=TimeLine;var a=[];map(b,function(d){if(SiteState.getPlurkUser(d)){a.push(d)}if(isString(d.posted)){d.posted=new Date(d.posted)}});a.sort(c._sortPlurks);c.plurks=c.plurks.concat(a);c.plurks.sort(c._sortPlurks);c.renderBlocks(a);if(c.plurks.length==0){c.renderEmpty()}else{c.removeEmpty()}setSingleTimeout("endChecks",c.endChecks,100)},_plurksFetched:function(b,c){var a=TimeLine;map(b,function(d){if(isString(d.posted)){d.posted=new Date(d.posted)}Poll.setLastPlurk(d.posted)});if(b.length==0){a.offset=null}else{if(!b.error){if(b.length>0){a.offset=getLast(b).posted}else{a.offset=null}a.insertPlurks(b)}else{TimeLine.error=b.error}}a.hideLoading();a.getting_plurks=false;a.fetched_plurks=true;setSingleTimeout("prefetchCheck",a.prefetchCheck,150);if(a.plurks.length==0){a.renderEmpty()}if(isFunction(c)){c()}},getPlurks:function(d){var b=TimeLine;if(b.getting_plurks||b.offset==null){return false}b.getting_plurks=true;if(b.plurks.length>0){b.showLoadingBlock()}var e=function(g){if(c.error){return b._plurksFetched(c)}var h=function(){b._plurksFetched(g,d)};var f=[];map(g,function(j){f.push(j.owner_id)});PlurkAdder.fetchUsersIfNeeded(f,h)};var c={user_id:SiteState.getPageUser().uid};if(b.offset){c.offset=serializeJSON(b.offset)}if(b.user_ids){c.user_ids=serializeJSON(b.user_ids)}if(b.private_only){c.only_private=1}if(b.responded_only){c.only_responded=1}if(TimeLineCache.inCache(c)){setTimeout(function(){return e(TimeLineCache.get(c))},100);return false}var a=loadJSON("/TimeLine/getPlurks");if(b.plurks.length>0){a.addCallback(b.removeLoadingBlock)}a.addCallback(function(f){if(!f.error){TimeLineCache.set(c,f)}});a.addCallback(e);a.sendReq(c)},excludeUser:function(a){return false},loading_img:DIV({c:"cmp_loading",s:"margin:0 auto;"}),showLoadingBlock:function(){var c=TimeLine;var b=getLast(c.active_blocks);if(b){var a=getBD(b).div_bg;c.loading_div=DIV({c:"loading_div"},c.loading_img);ACN(a,c.loading_div)}},removeLoadingBlock:function(){var a=TimeLine;if(a.loading_div){removeElement(a.loading_div)}},showLoading:function(a){if(a==undefined){a=true}var d=TimeLine;var b=DIV({id:"div_loading"});if(a){ACN(b,DIV({c:"cnt"},d.loading_img))}var c=$("timeline_holder");setHeight(b,c.offsetHeight);appendToTop(c,b);TimeShow.hide();setVisibility($("timeline_cnt"),$("timeline_bg"),false);map($bytc("div","plurk"),function(e){setVisibility(e,false)})},hideLoading:function(){var a=$("div_loading");setVisibility($("timeline_cnt"),$("timeline_bg"),true);map($bytc("div","plurk"),function(b){setVisibility(b,true)});DisplayOptions.show();removeElement(a);TimeLine.removeLoadingBlock()},setHightlight:function(a){this.highlight_ids[a]=true},getHighestId:function(){var a=0;if(TimeLine.plurks){map(TimeLine.plurks,function(b){if(b.id>a){a=b.id}})}return a},rerender:function(){TimeLine.showLoading();var a=[];a=a.concat(TimeLine.plurks);TimeLine.reset(true);TimeLine.insertPlurks(a)},reset:function(a){map(this.active_blocks,function(c){c.removeRender()});var b=$("display_options_holder");if(b){hideElement(b);ACN(getBody(),b)}discardElement($("timeline_cnt"));discardElement($("timeline_bg"));TimeLine.init(a);Tracks.init();if(b){ACN($("timeline_cnt"),b);showElement(b)}},hideTab:function(a){removeElement($bytc("li",a));var b=getRequest("/TimeLine/hideTab");b.sendReq({tab:a})}};TimeLineCache={cache:{},inCache:function(a){return this.cache[this.cacheKey(a)]!=undefined},get:function(a){return this.cache[this.cacheKey(a)]},set:function(c,b){var a=this.cacheKey(c);this.cache[a]=b},addToCache:function(c,a){var d=this.cache[c];if(d){var b=map(d,function(e){if(e.plurk_id==a.plurk_id){return true}});if(!b){d.splice(0,0,a)}}},addPlurk:function(a){this.addToCache("all",a);if(Plurk.isPrivate(a)){this.addToCache("private",a)}if(Plurk.isResponded(a)){this.addToCache("responded",a)}if(SiteState.getSessionUser().id==a.owner_id){this.addToCache("own",a)}},cacheKey:function(b){var a=[];if(b.offset){a.push(b.offset)}if(b.only_private){a.push("private")}else{if(b.only_responded){a.push("responded")}else{if(b.user_ids){a.push("own")}else{a.push("all")}}}return a.join("-")}};preloadImages("http://statics.plurk.com/6ad45e7e08754eba760d200a93f1d115.gif","http://statics.plurk.com/fa274407b35687882edb51c64ff53fd2.gif","http://statics.plurk.com/9a0d3f41579deec72d78e94e6a96e0f8.gif");Sounds={is_loaded:false,is_muted:false,_movie_elm:null,init:function(){Sounds.is_muted=SiteState.getSessionUser().sound_mute;var a=DIV({id:"update_mute",c:"item "+(Sounds.is_muted?"cmp_sound_off":"cmp_sound_on")});appendToTop($("updater"),a);AEV(a,"click",Sounds._toggleMute);AEV(a,"mouseover",$p(Sounds._muteOnHover,a));AEV(a,"mouseout",AmiTooltip.hide)},onLoad:function(){Sounds.is_loaded=true;if(Sounds._movie_elm==null){Sounds._movie_elm=Sounds._getMovie("soundalertsmanager")}Sounds._movie_elm.createSound("notify","http://statics.plurk.com/422a2bfb733388bc9a9564a6c5e6b7c5.mp3")},play:function(a){if(Sounds.is_loaded&&(!Sounds.is_muted)&&Sounds._movie_elm.soundAvailable(a)){Sounds._movie_elm.playSound(a)}},_gettimestamp:function(){var a=new Date();return""+a.getFullYear()+a.getMonth()+a.getDate()+a.getHours()+a.getMinutes()+a.getSeconds()},_getMovie:function(a){var c=(navigator.userAgent.match(/MSIE/i));var b=(navigator.userAgent.match(/safari/i));if(c){return window[a+"_outer"]}else{return b?document.getElementById(a+"_outer")||document[a]:document.getElementById(a+"_inner")}},_toggleMute:function(){Sounds.is_muted=!Sounds.is_muted;var a=$("update_mute");if(!Sounds.is_muted){removeClass(a,"cmp_sound_off");addClass(a,"cmp_sound_on")}else{removeClass(a,"cmp_sound_on");addClass(a,"cmp_sound_off")}var b=getRequest("/Poll/setMute");b.sendReq({value:Sounds.is_muted?1:0})},_muteOnHover:function(c,b){var a=_("Turn on sound notification");if(!Sounds.is_muted){a=_("Turn off sound notification")}AmiTooltip.show(c,DIV({c:"tooltip_cnt"},a),b)}};function onLoadSoundAlertsManager(){Sounds.onLoad()}Poll={last_plurk:0,disabled:false,current_data:{new_plurks:{},unread_plurks:{}},_backup_plurks:null,_backup_blocks:null,_backup_tracks:null,init:function(){var a;var d=DIV({id:"noti_np",c:"item"},a=A({href:"#"},SPAN({id:"noti_np_text",c:"text"})," ",Poll._markFirst(_("Update"))));onEvent(a,"click",Poll.update);var h=DIV({c:"item cmp_poll_line",id:"update_sepa"});var c,b;var f=DIV({c:"item",id:"noti_re_actions"},c=A({href:"#",c:"updater_link",id:"mark_all_link",s:"margin-right: 15px;"},Poll._markFirst(_("Mark all as read")))," ",b=A({href:"#",c:"updater_link"},Poll._markFirst(_("View all plurks"))));onEvent(b,"click",Poll._viewAll);onEvent(c,"click",Poll.markAllRead);hideElement(f);var k;var e=DIV({id:"noti_re_view",c:"item"},k=A({href:"#"},SPAN({id:"noti_re_text",c:"text"})," ",Poll._markFirst(_("View"))));onEvent(k,"click",Poll._renderPlurks);var g=DIV({id:"noti_re",c:"item"},e,f);var j=DIV({id:"updater"},d,h,g);hideElement(j);ACN(getBody(),j);AEV(j,"mousemove",function(){TimeShow.on_plurk=null;hideElement(TimeShow.div)});Sounds.init()},initUnreadPlurks:function(a){map(a,function(b){Poll.current_data.unread_plurks[b.id]=b});Poll.showUpdates();Poll.markRenderedUnreadPlurks(a)},markAllRead:function(){var f=false;var d=TimeLine.plurks.length;var b=Poll.counts;if(b){if(b.my>0||b.priv>0){f=true}}if(f){var a=format(_("You have private or own unread plurks. Are you sure you want to mark all as read?"),d);if(!confirm(a)){return}}var e=[];var g=[];map(TimeLine.plurks,function(h){e.push(h.plurk_id);g.push(h.id)});if(e.length>0){Poll.disabled=true;var c=getRequest("/Responses/markAllRead");c.sendReq({ids:serializeJSON(e)});c.addCallback(function(){Poll.disabled=false});map(g,function(h){Poll.setPlurkRead(h)});Poll._viewAll()}else{Poll._viewAll()}return false},setPlurkRead:function(a){if(Poll.current_data.unread_plurks[a]){delete Poll.current_data.unread_plurks[a]}Poll.showUpdates()},update:function(){Plurks.removeCurrentOpen();var b=values(Poll.current_data.new_plurks);map(b,function(c){TimeLine.setHightlight(c.id)});var a=TimeLine.plurks.concat(b);TimeLine.reset(true);TimeLine.showLoading();setTimeout(function(){Poll.current_data.new_plurks={};TimeLine.insertPlurks(a);Poll.showUpdates();TimeLine.hideLoading();PlurkAdder.setLastSeenPlurk()},20);SiteState.getSessionUser().last_seen_plurk=null;return false},getUnreadCounts:function(){var a={my:0,priv:0,responded:0,all:0};var b=Poll.getUnreadPlurks();map(b,function(c){if(Plurk.isPrivate(c)){a.priv+=1}if(c.owner_id==SiteState.getSessionUser().id){a.my+=1}if(Plurk.isResponded(c)){a.responded+=1}a.all+=1});return a},getUnreadPlurks:function(){var a=Poll.current_data;var b=[];map(values(a.unread_plurks),function(c){if(a.new_plurks[c.id]){return}b.push(c)});return b},showUpdates:function(e){if(PlurkSearch.current_pane=="search"){return}var b=Poll.current_data;var f=keys(b.new_plurks).length;var d=Poll.getUnreadPlurks().length;var c=f+d;if(window.fluid){if(c==0){window.fluid.dockBadge=""}else{window.fluid.dockBadge=""+c}}showElement($("updater"));setVisibility($("updater"),true);if(d>0&&f>0&&Poll.mode!="new"){showElement($("update_sepa"))}else{if(c==0&&Poll.mode!="new"){hideElement($("updater"))}else{hideElement($("update_sepa"))}}if(d>0||Poll.mode=="new"){showElement($("noti_re"));ngettext("%d new response","%d new responses",d,true);var a=format(ngettext("%d new response","%d new responses",d),d);setHTML($("noti_re_text"),a)}else{hideElement($("noti_re"))}if(f>0&&Poll.mode!="new"){var a=format(ngettext("%d new plurk","%d new plurks",f),f);setHTML($("noti_np_text"),a);showElement($("noti_np"))}else{hideElement($("noti_np"))}Poll.updateCounters()},updateCounters:function(){var c=false;if(Poll.mode=="new"){var b=Poll.counts=Poll.getUnreadCounts();c=true}else{var b=Poll.counts={all:0,priv:0,responded:0,my:0}}var a=function(d){if(d>0){return"<b> ("+d+")</b>"}if(c){return" (0)"}else{return""}};setHTML($("count_all_plurk"),a(b.all));setHTML($("count_my_plurks"),a(b.my));setHTML($("count_private_plurks"),a(b.priv));setHTML($("count_responded_plurks"),a(b.responded));Users.updateTitle()},_markFirst:function(a){a="<b>"+a.substring(0,1)+"</b>"+a.substring(1);var b=setHTML(SPAN(),a);return b},_viewAll:function(){hideElement($("updater"));if(Poll._backup_mode==TimeLine.mode){Plurks.removeCurrentOpen();TimeLine.showLoading();setTimeout(Poll.__viewAll,20)}else{var a=TimeLine.user_ids;Poll.mode="";TimeLine.reset();Tracks.init();TimeLine.mode=Poll._backup_mode;TimeLine.user_ids=a;showElement($("noti_re_view"));hideElement($("noti_re_actions"));TimeLine.showLoading();TimeLine.getPlurks(function(){Poll.showUpdates()})}window.scrollTo(0,0);return false},__viewAll:function(){Plurks.removeCurrentOpen();TimeLine.showLoading();TimeLine.reset(true);Poll.mode="";Tracks.plurks=Poll._backup_tracks;TimeLine.blocks=Poll._backup_blocks[0];TimeLine.active_blocks=Poll._backup_blocks[1];if(Poll._backup_selected_tab){DisplayOptions.selectTab(Poll._backup_selected_tab)}TimeLine.plurks=Poll._backup_plurks;Poll._backup_plurks=null;Poll._backup_tracks=null;Poll._backup_selected_tab=null;var a=Poll._backup_blocks[2];map(TimeLine.active_blocks,function(b){b.renderBlock(a);b.renderPlurks(false,a);a+=getBD(b).div_bg.offsetWidth});Poll._backup_blocks=null;showElement($("noti_re_view"));hideElement($("noti_re_actions"));Poll.showUpdates();TimeLine.hideLoading()},_renderPlurks:function(){window.scrollTo(0,0);Plurks.removeCurrentOpen();TimeLine.showLoading();var b=Poll.getUnreadPlurks();var a={};map(b,function(d){a[d.owner_id]=true});Poll._backup_mode=TimeLine.mode;Poll._backup_selected_tab=$bytc("a","filter_selected")[0];Poll._backup_plurks=TimeLine.plurks;Poll._backup_tracks=Tracks.plurks;var c=getFirst(TimeLine.active_blocks);Poll._backup_blocks=[TimeLine.blocks,TimeLine.active_blocks,c&&getBD(c).div_bg.offsetLeft||0];TimeLine.reset(true);Poll.mode="new";TimeLine.plurks=[];PlurkAdder.fetchUsersIfNeeded(keys(a),function(){var d=[];map(b,function(f){if(!SiteState.getPlurkUser(f)){d.push(f.plurk_id);delete Poll.current_data.unread_plurks[f.id]}});if(d.length>0){var e=getRequest("/Responses/markAllRead");e.sendReq({ids:serializeJSON(d)})}TimeLine.insertPlurks(b);DisplayOptions._filterByPoll(function(){Poll.showUpdates(true);TimeLine.hideLoading();var f=false;if(TimeLine.private_only&&Poll.counts.priv==0||TimeLine.responded_only&&Poll.counts.responded==0||TimeLine.user_ids&&Poll.counts.my==0){f=true}if(f){DisplayOptions.filterTimeline("friends",$gp($("count_all_plurk"),"a"))}})});hideElement($("noti_re_view"));showElement($("noti_re_actions"));return false},syncNewPlurks:function(){var a=Poll.current_data.new_plurks;map(values(a),function(b){if($("p"+b.id)){TimeLine.setHightlight(b.id);Plurks.highlightPlurk(b.id);delete a[b.id]}});Poll.showUpdates()},checkPlurks:function(){var c=Poll;if(c.disabled||PlurkAdder.posting||c.p_updating||!c.last_plurk){return}c.p_updating=true;var a=c._generateGetPlurksURL();var b=loadJSON(a,"GET");b.addCallback(c.fetchedPlurks);b.addErrback(function(){c.p_updating=false});b.sendReq()},setLastPlurk:function(a){if(!Poll.last_plurk){Poll.last_plurk=a}else{if(Poll.last_plurk&&Poll.last_plurk.getTime()<a.getTime()){Poll.last_plurk=a}}},fetchedPlurks:function(d){var c=Poll;if(!TimeLine.fetched_plurks){setSingleTimeout("fetchedPlurks",$p(c.fetchedPlurks,d),300);return}var a=c.current_data;if(d.length>0){var b={};map(d,function(g){if(g==0||Plurk.getById(g.id)){return}if(Poll.last_plurk&&Poll.last_plurk.getTime()>=g.posted.getTime()){return}var f=PlurkAdder.new_plurk_data;if(f){if(f.content==g.content_raw&&f.qualifier==g.qualifier&&f.owner_id==SiteState.getSessionUser().id){return false}}if(Plurk.getById(g.plurk_id,null,"plurk_id")){return}if(isString(g.posted)){g.posted=new Date(g.posted)}a.new_plurks[g.id]=g;Poll.setLastPlurk(g.posted);b[g.owner_id]=true;try{TimeLineCache.addPlurk(g)}catch(h){AJS.log(h)}});if(keys(b).length>0){Sounds.play("notify")}PlurkAdder.fetchUsersIfNeeded(keys(b),function(){})}if(d.length>0){if(c.mode!="new"){c.showUpdates()}}Poll.p_updating=false;Users.updateTitle()},_p_count:0,_generateGetPlurksURL:function(){var b=Poll;var c={last_plurk:serializeJSON(b.last_plurk)};var a="/Poll/getPlurks/"+SiteState.getSessionUser().id+"?"+encodeArguments(c);a+="&r="+b._p_count++;return a},checkResponses:function(){var d=Poll;if(d.r_updating||Poll.disabled||PlurkAdder.posting){return}d.r_updating=true;var a=d._generateGetResponsesURL();var c=loadJSON(a,"POST");c.addCallback(d.fetchedResponses);c.addErrback(function(){d.r_updating=false});var e={};if(Poll.current_data.unread_plurks){var b=[];map(values(Poll.current_data.unread_plurks),function(f){b.push(f.plurk_id.toString(36))});e.plurk_ids=b.join(",")}c.sendReq(e)},fetchedResponses:function(c){var g=Poll;var a=g.current_data;try{if(c.length>0){var d=0,f=0;var b=SiteState.getSessionUser();map(c,function(j){var e=Plurk.getById(j.id)||Plurk.getById(j.id,values(Poll._backup_plurks));var k=a.new_plurks[j.id];if(Plurk.isExpanded(j.plurk_id)){return}if(!a.unread_plurks[j.id]){j.highlight=true}if(e){if(e.is_unread==2){return}a.unread_plurks[e.id]=e;if(e.owner_id==b.id&&j.response_count>e.response_count){d++}if(Plurk.isPrivate(e)&&j.response_count>e.response_count){f++}update(e,j)}else{if(k){Plurk.updatePlurk(k,{response_count:j.response_count});a.unread_plurks[j.id]=j}else{a.unread_plurks[j.id]=j}}});if(d>0||f>0){Sounds.play("notify")}Poll.markRenderedUnreadPlurks(c)}if(c.length>0){Poll.showUpdates()}}catch(h){AJS.log(h)}Poll.r_updating=false;Users.updateTitle()},markRenderedUnreadPlurks:function(a){var b=$bytc("div","plurk");map(a,function(d){if(Poll.mode!="unread"&&TimeLine.excludeUser(d.owner_id)){return}var c=Plurk.getById(d.id);if(c&&b){if(Plurk.isExpanded(c.plurk_id)||c.is_unread==2){return}map(b,function(e){var f=getPD(e).obj.id;if(f==d.id&&e.response_count!=d.response_count){setHTML(getPD(e).response_count,d.response_count);addClass(e,"new");if(d.highlight&&!TimeLine.highlight_ids[f]){TimeLine.highlight_ids[f]=true;Plurks.highlightPlurk(f,10000)}showElement(getPD(e).response_count)}});Plurk.updatePlurk(c,{response_count:d.response_count})}})},_generateGetResponsesURL:function(){var a="/Poll/getResponsesN/"+SiteState.getSessionUser().id;return a}};ChatPoll={poll:function(){if(window.$dp&&$dp.holder_shown){if(ChatPoll.fetching){return true}var b=getPD($dp.div).obj.plurk_id;var a=loadJSON("/Poll/getResponseCount/"+b,"GET");a.addCallback(function(d){var e=$dp.div;var c=getPD(e).obj;if(c.plurk_id==b){if(d>c.response_count){ChatPoll.fetchNewResponses(b,c.response_count)}}});a.sendReq({})}},fetchNewResponses:function(c,a){ChatPoll.fetching=true;var b=loadJSON("/Responses/get2");b.addCallback(function(d){ChatPoll.fetching=false;var e=$dp.div;if(e&&getPD(e).obj.plurk_id==c){if(d.friends){update(USERS,d.friends);Plurks.cur_plurkers=values(d.friends);Plurks.cur_plurkers.push(SiteState.getUserById(getPD(e).obj.owner_id))}map(d.responses,function(f){Responses.addToList(f)})}Plurk.updatePlurk(getPD(e).obj,{response_count:$bytc("div","plurk",$dp.list).length})});b.addErrback(function(){ChatPoll.fetching=false});b.sendReq({plurk_id:c,from_response:a})}};MOVEMENT_TO=null;WINDOW_ACTIVE=false;function activeWindowChecks(){if(MOVEMENT_TO){clearTimeout(MOVEMENT_TO)}WINDOW_ACTIVE=true;MOVEMENT_TO=setTimeout(setWindowInactive,60000)}function setWindowInactive(){WINDOW_ACTIVE=false}if(SiteState.canEdit()){setInterval(function(){if(WINDOW_ACTIVE){Poll.checkResponses()}},30000);setInterval(function(){if(!WINDOW_ACTIVE){Poll.checkResponses()}},300000);if(SiteState.canEdit()&&!SiteState.isPermanentPage()){setInterval(function(){if(WINDOW_ACTIVE){ChatPoll.poll()}},20000)}AEV(window,"load",function(){AEV(document,"click",activeWindowChecks);AEV(document,"keypress",activeWindowChecks);MOVEMENT_TO=setTimeout(setWindowInactive,60000)})}MoreOptions={completion_fetched:false,isShown:function(){return hasClass($("more_options_link"),"on")},toggle:function(a){if(MoreOptions.completion_fetched){this._toggle(a)}else{this._fetchCompletion($p($b(this._toggle,this),a))}return false},_toggle:function(d){var e=$("more_options_link");var f=$bytc("img",null,e)[0];var h=$bytc("table",null,e.parentNode);var c=$("more_options_holder");if(e.className.indexOf("on")!=-1){e.className=e.className.replace("on","off");c.style.display="none";hideElement(h[0]);window.scrollTo(0,0)}else{e.className=e.className.replace("off","on");c.style.display="block";if(h.length==0){var b=MoreOptions.renderPlurkVisibility();var g=MoreOptions.renderMore();var a=MoreOptions.renderMisc();var j=TABLE(TBODY(TR(TD(b),TD(g),TD(a))));ACN($("more_options_holder"),j);$("input_everybody").checked=true}else{showElement(h[0])}if(SETTINGS.view_plurks==MoreOptions.PR_ONLY_FRIENDS){hideElement($("self_holder"))}else{showElement($("self_holder"))}$("auto_ta_input").focus();if(getWindowSize().h<690){window.scrollTo(0,175)}}if(isFunction(d)){d()}return false},_resetRadios:function(){map($bytc("input","radios"),function(a){a.checked=false})},_createRadio:function(b,c,d){var a=INPUT({type:"radio",name:b,c:"radios",value:c,tabindex:-1});if(d){a.id=d}AEV(a,"click",function(f){MoreOptions._resetRadios();getEventElm(f).checked=true});return a},no_comments:null,renderMisc:function(){var a=DIV({c:"holder"},DIV({c:"caption"},_("Other options")),DIV({c:"item"},MoreOptions.no_comments_friends=INPUT({type:"checkbox",id:"input_only_friends"}),LABEL({"for":"input_only_friends"},_("Only friends can comment"))));if(SiteState.getSessionUser().comments_only_friends_can_post){MoreOptions.no_comments_friends.checked=true}AEV(MoreOptions.no_comments_friends,"click",function(){var c=MoreOptions.no_comments_friends.checked;PlurkAdder.saveUserValue("comments_only_friends_can_post",c&&1||0)});ACN(a,DIV({c:"item"},MoreOptions.no_comments=INPUT({type:"checkbox",id:"input_no_cmt"}),LABEL({"for":"input_no_cmt"},_("Disable comments"))));AEV(MoreOptions.no_comments,"click",function(){MoreOptions.no_comments_friends.checked=false});AEV(MoreOptions.no_comments_friends,"click",function(){if(MoreOptions.no_comments.checked){MoreOptions.no_comments.checked=false}});if(SiteState.user_data.has_facebook){ACN(a,DIV({c:"item"},MoreOptions.no_facebook=INPUT({type:"checkbox",id:"input_no_fb"}),LABEL({"for":"input_no_fb"},_("Don't post to Facebook"))))}else{var b;ACN(a,DIV({c:"advert"},b=A({href:"#"},_("Get your plurks added as Facebook status updates - automatically!"))));b.onclick=function(){return top.TopBar.showMyAccount("/FacebookApp/")}}return a},_sortLang:function(d,c){if(d[1]<c[1]){return -1}return 1},renderMore:function(){var d=[["pt_BR","Português"],["cn","中文 (中国)"],["ca","Català"],["el","Ελληνικά"],["dk","Dansk"],["de","Deutsch"],["es","Español"],["sv","Svenska"],["nb","Norsk bokmål"],["hi","Hindi"],["ro","Română"],["ga","Gaeilge"],["hr","Hrvatski"],["fr","Français"],["ru","Pусский"],["it","Italiano "],["ja","日本語"],["he","עברית"],["hu","Magyar"],["ne","Nederlands"],["th","ไทย"],["ta_fp","Filipino"],["in","Bahasa Indonesia"],["pl","Polski"],["ar","العربية"],["fi","Finnish"],["tr_ch","中文 (繁體中文)"],["tr","Türkçe"],["ga","Gaeilge"],["sk","Slovenský"],["uk","українська"],["fa","فارسی"]];d.sort(MoreOptions._sortLang);d.splice(0,0,["en_fo","English"]);var a=SELECT();var b=main_poster.menu.cur_lang;map(d,function(f){var e;ACN(a,e=OPTION({value:f[0]},f[1]));if(f[0]==b){e.selected=true}});onEvent(a,"change",function(){var f=getSelectValue(a);var e=$gc($("plurk_form"),"span","m_qualifier");main_poster.menu.changeMenuLang(e,f);PlurkAdder.saveUserValue("default_lang",f)});var c=DIV({c:"holder"},DIV({c:"item"},SPAN({c:"caption"},_("Plurk language")+": ",BR(),a)));showElement(c);return c},renderPlurkVisibility:function(){var e=createListHolder("auto_ta_holder","auto_ta_input");var c=e[0];var b=e[1];var g,f,a;var d=DIV({c:"holder"},DIV({c:"caption"},_("Who can see this plurk?")),DIV({c:"item"},f=MoreOptions._createRadio("to","everybody","input_everybody")," ",SPAN({id:"span_everybody"},MoreOptions._getStrPrivacy())),DIV({c:"item",id:"self_holder"},a=MoreOptions._createRadio("to","self","input_friends")," "+_("only my friends")),DIV({c:"item",id:"only_holder"},TABLE(TBODY(TR(TD({c:"td_radio"},g=MoreOptions._createRadio("to","only","input_only"),LABEL(" "+_("only")+":")),TD({c:"td_ta"},c,SPAN({c:"small"},_("Type the name of the friend or clique"))))))));onEvent(g,"click",function(){$("auto_ta_input").focus();$("input_everybody").checked=false;$("input_friends").checked=false;$("input_only").checked=true;MoreOptions.setPlurkTo(4);return true});AEV(c,"mouseup",function(h){$("auto_ta_input").focus();return false});onEvent(f,["change","click"],function(){if($("input_everybody").checked){MoreOptions.setPlurkTo()}});onEvent(a,["change","click"],function(){if($("input_friends").checked){MoreOptions.setPlurkTo(2)}});onEvent(g,["change"],function(){if($("input_only").checked){MoreOptions.setPlurkTo(4)}});b.onadd=function(){MoreOptions._handleRadios(null,false)};AEV(b,"blur",function(h){MoreOptions._handleRadios(h,false)});attachKeyDown(b,MoreOptions._handleRadios);AEV(c,"click",function(){if(!$("input_only").checked){MoreOptions._handleRadios(true)}});return d},_handleRadios:function(c,b){if(b==undefined){b=true}var d;if(c){d=getEventElm(c)}var a=$bytc("li","person",$("auto_ta_holder"));MoreOptions._resetRadios();if(d&&d.id=="auto_ta_input"&&d.value!=""){$("input_only").checked=true;$("input_only").onchange()}else{if(a.length==0){$("input_everybody").checked=true;$("input_everybody").onchange()}else{$("input_only").checked=true;$("input_only").onchange()}}if($("input_only").checked){MoreOptions.setPlurkTo(4)}else{if($("input_everybody").checked){MoreOptions.setPlurkTo()}else{MoreOptions.setPlurkTo(2)}}if(b){$("auto_ta_input").focus()}},PR_WHOLE_WORLD:0,PR_FRI_FRI:1,PR_ONLY_FRIENDS:2,_getStrPrivacy:function(a){a=a||SETTINGS.view_plurks;if(a==MoreOptions.PR_WHOLE_WORLD){return _("the whole world")}if(a==MoreOptions.PR_ONLY_FRIENDS){return _("only my friends")}},changePrivacy:function(a){if(SiteState.canEdit()){SETTINGS.view_plurks=a;MoreOptions.setPlurkTo();var b=$("span_everybody");if(b){setHTML(b,MoreOptions._getStrPrivacy())}if(a==MoreOptions.PR_ONLY_FRIENDS){hideElement($("self_holder"))}else{showElement($("self_holder"))}}},setPlurkTo:function(b){var g=$("plurk_to");b=b||SETTINGS.view_plurks;if(b==4){showElement(g);var f=_("this plurk will be viewable to");var d=$bytc("li","person",$("auto_ta_holder"));var a={};map(d,function(j){if(j.nick_name=="CLIQUE"){var k=PlurkAdder._getCliqueByName(j.full_name);if(k){var h=PlurkAdder._getCliqueFriends(k);map(h,function(m){var l=SiteState.getUserById(m)||COMPLETION[m];if(l){a[l.nick_name]=l.full_name||l.display_name||l.nick_name}})}}else{a[j.nick_name]=j.full_name}});var c=values(a);var e=[];map(c,function(h){if(h.length>20){h=h.substring(0,20)+"..."}e.push(h)});f+=" <b>"+e.join(", ")+"</b>";setHTML(g,f);addClass(g,"private_to")}else{var f=_("this plurk will be viewable to")+" <b>"+MoreOptions._getStrPrivacy(b)+"</b>";setHTML(g,f);if(b==MoreOptions.PR_WHOLE_WORLD){hideElement(g)}else{showElement(g);addClass(g,"private_to")}}},_fetchCompletion:function(c){if(this.fetching){return false}this.fetching=true;var b=loadJSON("/Users/getCompletion");var a;ACN($("more_options_link"),a=IMG({src:"/static/indicator_mini.gif"}));b.addCallback(function(d){MoreOptions.completion_fetched=true;MoreOptions.fetching=false;COMPLETION=d;AmiComplete.init();buildFriendCollection(null,true);removeElement(a);c()});b.sendReq({user_id:SiteState.getSessionUser().id})}};MouseWheel={attachTLScroll:function(a){MouseWheel.hookEvent(a,"mousewheel",MouseWheel.scrollTimeLine)},hookEvent:function(b,a,c){b=$(b);if(b==null){return}if(b.addEventListener){if(a=="mousewheel"){b.addEventListener("DOMMouseScroll",c,false)}b.addEventListener(a,c,false)}else{if(b.attachEvent){b.attachEvent("on"+a,c)}}},scrollTimeLine:function(d){var b=(d.target)?d.target:d.srcElement;var a=isIn(nodeName(b),["input","textarea"]);if(!a){preventDefault(d);Plurks.removeCurrentOpen();if(InfoOverlay.arrow){InfoOverlay.hideInfoOverlay()}d=d||window.event;var c=d.detail?d.detail*-1:d.wheelDelta/40;if(c>0){TimeLine.slideBack(10,40,"left")}else{TimeLine.slideBack(10,-40,"right")}if(window.scrollTop!=0){window.scrollTo(0,0)}return false}}};DisplayOptions={menu:null,timer:null,filterTimeline:function(c,d){Plurks.removeCurrentOpen();var b;TimeLine.private_only=false;TimeLine.responded_only=false;var a=SiteState.getPageUser().uid;if(c=="own"){b=[a];if(OpenX){OpenX.invokeZone(OpenX.Zones.MyPlurks)}}else{if(c=="private"){b=[];TimeLine.private_only=true;if(OpenX){OpenX.invokeZone(OpenX.Zones.Private)}}else{if(c=="friends"&&!SiteState.canEdit()){b=keys(FRIENDS);b.push(a)}else{if(c=="responded"){b=[];TimeLine.responded_only=true;if(OpenX){OpenX.invokeZone(OpenX.Zones.Responded)}}else{b=null;if(OpenX){OpenX.invokeZone(OpenX.Zones.AllPlurks)}}}}}this._filter(c,b);this.selectTab(d);window.scrollTo(0,0);return false},selectTab:function(a){map($bytc("a",null,$("filter_tab")),function(b){setClass(b,"off_tab")});setClass(a,"filter_selected bottom_line_bg")},_filterByPoll:function(d){var e=[2,3];if(Poll.mode=="new"){var a=TimeLine.user_ids;var b=values(Poll.current_data.unread_plurks);var c=[];if(!a){c=b}else{map(b,function(f){if(TimeLine.private_only&&f.limited_to){c.push(f)}if(TimeLine.responded_only&&isIn(f.plurk_type,e)){c.push(f)}else{if(isIn(f.owner_id,a)){c.push(f)}}})}TimeLine.reset(true);TimeLine.showLoading();setTimeout(function(){TimeLine.insertPlurks(c);if(isFunction(d)){d()}else{TimeLine.hideLoading()}},20)}},_filter:function(c,b,a){TimeLine.mode=c;TimeLine.user_ids=b;if(Poll.mode=="new"){DisplayOptions._filterByPoll()}else{a=a||TimeLine.getPlurks;TimeLine.reset();Tracks.init();TimeLine.showLoading();a(function(){Poll.syncNewPlurks()})}},show:function(){}};GettingStarted={is_created:false,tips:[{img:2,control:"continue",top:150,pos:"center",headline:_("Your interactive timeline"),text:_("The blue section is your timeline, here we'll show you your and friends' plurks. Clicking on a plurk will expand it. You can drag the timeline with your mouse to move in time."),width:500,height:225},{img:6,control:"invite",top:35,pos:"center",headline:_("Invite Your Friends")+"!",text:"",width:500,height:370},{img:6,control:"follow",top:35,pos:"center",headline:_("Some plurkers that you might want to follow"),text:"",width:500,height:370},{img:5,control:"get_started",top:273,pos:"center",headline:_("Welcome to Plurk!"),text:_("Now start plurking by using this textbox! Plurk isn't totally instant, so be sure to check Plurk.com again to see if you got any new plurks, responses or friends!"),width:500,height:225}],init:function(){if(this.is_created){return}this.holder=DIV({id:"getting_started"});this.img=IMG({c:"bg"});this.close_img=IMG({c:"close_img",src:"http://statics.plurk.com/f898cb34a3c2cfe28c527f9defa615eb.gif"});onEvent(this.close_img,"click",$b(this.hide,this));this.text_status=SPAN();this.controller=SPAN({c:"controller"});ACN(this.holder,this.headline=DIV({c:"headline"}),this.text=DIV({c:"text"}));ACN(this.holder,this.close_img);ACN(this.holder,DIV({c:"controller_holder"},this.text_status,this.controller));ACN(this.holder,this.img);this.bg=DIV({c:"color_bg"});ACN(this.holder,this.bg);ACN(getBody(),this.holder);this.is_created=true;var a=this._firstName(SiteState.getPageUser());this.invited=[{img:1,control:"get_started",top:60,pos:"center",headline:format(_("%s has invited you to Plurk!"),a),text:_("Plurk lets you showcase the events that make up your life and follow the events of the people that matter to you.")+"<br /><br />"+format(_("Check out now what %s has been up to!"),a)}]},_firstName:function(b){var a=SiteState.getPageUser().full_name;a=a.split(/\s+/);if(a){return a[0]}return b.nick_name},show:function(d,g){var e=this;this.init();if(g){g=this[g]}else{g=this.tips}window.scrollTo(0,0);hideElement(this.controller);var j=g[d];swapDOM(this.img,this.img=IMG({src:$static_path("/static/tooltips/"+j.img+".png"),c:"bg"}));this.text_status.innerHTML=(d+1)+" / "+g.length+" ";setHTML(this.headline,j.headline);setHTML(this.text,j.text);showElement(GettingStarted.img);showElement(GettingStarted.controller);setTop(this.controller.parentNode,157);var b=function(){var m=INPUT({c:"orange-but",type:"button",value:_("Prev")});var l=INPUT({c:"orange-but",type:"button",value:_("Next")});onEvent(m,"click",$p($b(e.show,e),d-1,"tips"));onEvent(l,"click",$p($b(e.show,e),d+1,"tips"));RCN(e.controller,m," ",l)};if(j.control=="continue"){var h=INPUT({c:"orange-but",type:"button",value:_("Continue")});onEvent(h,"click",$p($b(this.show,this),d+1,"tips"));RCN(this.controller,h)}else{if(j.control=="next_prev"){b()}else{if(j.control=="get_started"){var h=INPUT({c:"orange-but",type:"button",value:_("Start using Plurk!")});onEvent(h,"click",$b(this.hide,this));if(g==this.invited){onEvent(h,"click",TopBar.showRegister);onEvent(this.close_img,"click",TopBar.showRegister)}RCN(this.controller,h);this.text_status.innerHTML=""}else{if(j.control=="invite"){top.Misc.promoteTab("/Friends/inviteFriends");this.show(d+1,"tips")}else{if(j.control=="follow"){RCN(this.controller,IMG({src:"http://statics.plurk.com/7f5c4282d2e9accfdae99cc6abb6c9bb.gif"}));setTop(this.controller.parentNode,300);RCN(this.text,null);var f=loadJSON("/Browse/suggest");f.addCallback($p($b(this.displayFollow,this),d));f.sendReq({})}}}}}var a=[this.holder];if(j.pos=="right"){var k=(getWindowSize().w)-580;setLeft(a,k)}else{if(j.pos=="center"){var c=(getWindowSize().w/2)-250;setLeft(a,c)}else{setLeft(a,j.left)}}setTop(a,j.top);return false},displayFollow:function(b,h){var g=this;var f=INPUT({c:"orange-but",type:"button",value:_("Prev")});var c=INPUT({c:"orange-but",type:"button",value:_("Next (Follow selected)")});var e,a,d=0;RCN(this.text,TABLE({c:"follow"},e=TBODY()));ACN(e,a=TR());map(h,function(l){if(d==2){ACN(e,a=TR());d=0}var k=SPAN({c:"user_info"},IMG({c:"float_left",src:Plurks.getUserImgSrc(l,"medium")}),DIV({c:"float_left"},DIV({c:"info_holder"},link=A({href:"/"+l.nick_name},l.display_name||l.nick_name),BR(),Profile.getYears(l.date_of_birth),l.nick_name!="ICanHasCheezburger"&&Profile._getGender(l)||_("Funny cat pictures"),BR(),Profile._getLocation(l))));var j;ACN(a,TD({c:"user_info_holder"},j=INPUT({s:"float: left; margin-right: 8px;",type:"checkbox",c:"checker"}),k));j.checked=true;j.user_id=l.id;d++});onEvent(f,"click",$p($b(this.show,this),b-1,null));onEvent(c,"click",$p($b(this.followThenNext,this),b));RCN(this.controller,f," ",c)},followThenNext:function(a){RCN(this.controller,IMG({src:"http://statics.plurk.com/7f5c4282d2e9accfdae99cc6abb6c9bb.gif"}));var d=getRequest("/Notifications/addNotifications");d.addCallback(function(){GettingStarted.show(a+1,null);TimeLine.reset();TimeLine.showLoading();TimeLine.getPlurks()});var c=this;d.addErrback(function(){c.show(a+1,null)});var b=[];map($bytc("input","checker",this.text),function(e){if(e.checked){b.push(e.user_id)}});d.sendReq({ids:serializeJSON(b)})},hide:function(){removeElement(this.holder);this.is_created=false;var a=$("input_big");if(a){$("input_big").select();var b=getRequest("/Users/updateUserValue");b.sendReq({name:"help_shown",value:1})}}};LANG_QUAL={el:{wants:"\u03b8\u03ad\u03bb\u03b5\u03b9",needs:"\u03c7\u03c1\u03b5\u03b9\u03ac\u03b6\u03b5\u03c4\u03b1\u03b9",says:"\u03bb\u03ad\u03b5\u03b9",asks:"\u03c1\u03c9\u03c4\u03ac\u03b5\u03b9",wonders:"\u03b1\u03bd\u03b1\u03c1\u03c9\u03c4\u03b9\u03ad\u03c4\u03b1\u03b9",freestyle:"\u03b5\u03bb\u03b5\u03cd\u03b8\u03b5\u03c1\u03bf \u03c3\u03c4\u03c5\u03bb",is:"\u03b5\u03af\u03bd\u03b1\u03b9",shares:"\u03bc\u03bf\u03b9\u03c1\u03ac\u03b6\u03b5\u03c4\u03b1\u03b9",will:"\u03b8\u03b1",feels:"\u03b1\u03b9\u03c3\u03b8\u03ac\u03bd\u03b5\u03c4\u03b1\u03b9",wishes:"\u03b5\u03cd\u03c7\u03b5\u03c4\u03b1\u03b9",likes:"\u03b3\u03bf\u03c5\u03c3\u03c4\u03ac\u03c1\u03b5\u03b9",loves:"\u03b1\u03b3\u03b1\u03c0\u03ac\u03b5\u03b9",hopes:"\u03b5\u03bb\u03c0\u03af\u03b6\u03b5\u03b9",has:"\u03ad\u03c7\u03b5\u03b9",was:"\u03ae\u03c4\u03b1\u03bd",thinks:"\u03bd\u03bf\u03bc\u03af\u03b6\u03b5\u03b9",hates:"\u03bc\u03b9\u03c3\u03b5\u03af",gives:"\u03b4\u03af\u03bd\u03b5\u03b9"},en:{wants:"wants",needs:"needs",says:"says",asks:"asks",wonders:"wonders",is:"is",shares:"shares",will:"will",feels:"feels",wishes:"wishes",likes:"likes",loves:"loves",hopes:"hopes",has:"has",was:"was",thinks:"thinks",hates:"hates",gives:"gives"},cn:{wants:"\u8981",needs:"\u9700\u8981",says:"\u8bf4",asks:"\u95ee",wonders:"\u597d\u5947",freestyle:"\u81ea\u7531\u767c\u63ee",is:"\u662f",shares:"\u63a8\u8350",will:"\u5c07\u4f1a",feels:"\u89c9\u5f97",wishes:"\u671f\u5f85",likes:"\u559c\u6b22",loves:"\u7231",hopes:"\u671f\u5f85",has:"\u6709",was:"\u66fe\u7ecf",thinks:"\u60f3",hates:"\u8ba8\u538c",gives:"\u7ed9"},ca:{wants:"vol",needs:"necessita",says:"diu",asks:"pregunta",wonders:"desitja",freestyle:"freestyle",is:"\u00e9s/est\u00e0",shares:"comparteix",will:"ser\u00e0",feels:"sent",wishes:"desitja",likes:"li agrada",loves:"estima",hopes:"espera",has:"t\u00e9",was:"era/estava",thinks:"pensa",hates:"odia",gives:"d\u00f3na"},it:{wants:"vuole",needs:"ha bisogno",says:"dice",asks:"chiede",wonders:"si chiede",freestyle:"freestyle",is:"sta",shares:"condivide",will:"va",feels:"si sente",wishes:"augura",likes:"gradisce",loves:"ama",hopes:"spera",has:"ha",was:"era",thinks:"pensa",hates:"odia",gives:"offre"},ar:{wants:"\u064a\u0631\u064a\u062f",needs:"\u064a\u062d\u062a\u0627\u062c/\u062a\u062d\u062a\u0627\u062c",says:"\u064a\u0642\u0648\u0644",asks:"\u064a\u0633\u0627\u0644",wonders:" \u064a\u062a\u0639\u062c\u0651\u0628/\u062a\u062a\u0639\u062c\u0651\u0628",freestyle:"freestyle",is:"\u064a",shares:"\u064a\u0642\u0627\u0633\u0645",will:"\u0633\u0648\u0641",feels:"\u064a\u062d\u0633",wishes:"\u064a\u0627\u0645\u0644",likes:"\u064a\u062d\u0628",loves:"\u064a\u062d\u0628",hopes:"\u064a\u0623\u0645\u0644/\u062a\u0623\u0645\u0644",has:"\u0644\u0647",was:"\u0643\u0627\u0646",thinks:"\u064a\u0641\u0643\u0631",hates:"\u0643\u0631\u0647",gives:"\u064a\u0639\u0637\u064a"},ga:{wants:"teasta\u00edonn",needs:"teasta\u00edonn",says:"deireann",asks:"fiafra\u00edonn",wonders:"d\u00e9anann iontas",freestyle:"mar is mian leat",is:"t\u00e1",shares:"comhroinneann",will:"rachfaidh",feels:"braitheann",wishes:"oireann do",likes:"is maith le",loves:"is aoibhinn",hopes:"t\u00e1 s\u00fail ag",has:"rinne",was:"bh\u00ed",thinks:"s\u00edleann",hates:"is fuath",gives:"tugann"},"in":{wants:"ingin",needs:"butuh",says:"bilang",asks:"tanya",wonders:"bertanya-tanya",freestyle:"freestyle",is:"sedang",shares:"berbagi",will:"akan",feels:"rasa",wishes:"berharap",likes:"suka",loves:"cintai",hopes:"mendambakan",has:"telah",was:"tadi",thinks:"pikir",hates:"benci",gives:"memberi"},cs:{wants:"chce",needs:"pot\u0159ebuje",says:"\u0159\u00edk\u00e1",asks:"se pt\u00e1",wonders:"se div\u00ed",freestyle:"freestyle",is:"je",shares:"sd\u00edl\u00ed",will:"bude",feels:"se c\u00edt\u00ed",wishes:"p\u0159eje",likes:"m\u00e1 rad/a",loves:"miluje",hopes:"douf\u00e1",has:"m\u00e1",was:"byl/a",thinks:"si mysl\u00ed",hates:"nesn\u00e1\u0161\u00ed",gives:"d\u00e1v\u00e1"},es:{wants:"quiere",needs:"necesita",says:"dice",asks:"pregunta",wonders:"se pregunta",freestyle:"freestyle",is:"est\u00e1",shares:"comparte",will:"har\u00e1",feels:"siente",wishes:"desea",likes:"prefiere",loves:"ama",hopes:"espera",has:"tiene",was:"estaba",thinks:"piensa",hates:"odia",gives:"ofrece"},ru:{wants:"\u0445\u043e\u0447\u0435\u0442",needs:"\u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f",says:"\u0433\u043e\u0432\u043e\u0440\u0438\u0442",asks:"\u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442",wonders:"\u0440\u0430\u0437\u043c\u044b\u0448\u043b\u044f\u0435\u0442",is:null,shares:["\u043d\u0430\u0448\u0435\u043b","\u043d\u0430\u0448\u043b\u0430"],will:"\u0431\u0443\u0434\u0435\u0442",feels:"\u0447\u0443\u0432\u0441\u0442\u0432\u0443\u0435\u0442",wishes:null,likes:"\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442\u0441\u044f",loves:"\u043b\u044e\u0431\u0438\u0442",hopes:"\u043d\u0430\u0434\u0435\u0435\u0442\u0441\u044f",has:null,was:["\u0431\u044b\u043b","\u0431\u044b\u043b\u0430"],thinks:"\u0434\u0443\u043c\u0430\u0435\u0442",hates:"\u043d\u0435\u043d\u0430\u0432\u0438\u0434\u0438\u0442",gives:"\u0434\u0430\u0440\u0438\u0442"},nb:{wants:"vil ha",needs:"trenger",says:"sier",asks:"sp\u00f8r",wonders:"lurer p\u00e5",freestyle:"fristil",is:"er",shares:"deler",will:"vil",feels:"f\u00f8ler\n",wishes:"\u00f8nsker",likes:"liker",loves:"elsker",hopes:"h\u00e5per",has:"har",was:"var",thinks:"synes",hates:"hater",gives:"gir"},tr:{wants:"istiyor ki",needs:"ihtiyac\u0131 var",says:"diyor ki",asks:"soruyor ki",wonders:"merak ediyor",freestyle:"serbest",is:"is",shares:"payla\u015f\u0131yor",will:"yapmay\u0131 d\u00fc\u015f\u00fcn\u00fcyor",feels:"hissediyor ki",wishes:"umuyor ki",likes:"ho\u015flan\u0131yor",loves:"seviyor",hopes:"umut ediyor",has:"has",was:"was",thinks:"d\u00fc\u015f\u00fcn\u00fcyor ki",hates:"nefret ediyor\n",gives:"veriyor"},ne:{wants:"wil",needs:"heeft nood aan",says:"zegt",asks:"vraagt",wonders:"vraagt zich af",freestyle:"freestyle",is:"is",shares:"verstuurt",will:"zal",feels:"voelt",wishes:"hoopt",likes:"houdt van",loves:"is wild van",hopes:"hoopt",has:"heeft",was:"was",thinks:"denkt",hates:"haat",gives:"geeft"},ta_fp:{wants:"gusto",needs:"ay nangangailangan",says:"sinasabi",asks:"nagtatanong",wonders:"ay nagtataka",freestyle:"freestyle",is:"ay",shares:"ipinamamahagi",will:null,feels:"nararamdaman",wishes:"naghahangad",likes:null,loves:"mahal",hopes:"ay nais",has:null,was:null,thinks:"iniisip",hates:"kinasusuklam",gives:"nagbibigay"},th:{wants:"\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23",needs:"\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23",says:"\u0e1e\u0e39\u0e14",asks:"\u0e16\u0e32\u0e21",wonders:"\u0e2a\u0e07\u0e2a\u0e31\u0e22",freestyle:"\u0e44\u0e21\u0e48\u0e23\u0e30\u0e1a\u0e38",is:"\u0e40\u0e1b\u0e47\u0e19",shares:"\u0e41\u0e1a\u0e48\u0e07\u0e1b\u0e31\u0e19",will:"\u0e08\u0e30",feels:"\u0e23\u0e39\u0e49\u0e2a\u0e36\u0e01",wishes:"\u0e1b\u0e23\u0e32\u0e23\u0e16\u0e19\u0e32",likes:"\u0e0a\u0e2d\u0e1a",loves:"\u0e23\u0e31\u0e01",hopes:"\u0e04\u0e32\u0e14\u0e2b\u0e27\u0e31\u0e07",has:"\u0e21\u0e35",was:"\u0e40\u0e04\u0e22",thinks:"\u0e04\u0e34\u0e14",hates:"\u0e40\u0e01\u0e25\u0e35\u0e22\u0e14",gives:"\u0e43\u0e2b\u0e49"},ro:{wants:"vrea",needs:"vrea",says:"spune",asks:"\u00eentreab\u0103",wonders:"se \u00eentreab\u0103",freestyle:"stil liber",is:"este",shares:"Actiuni",will:"va",feels:"se simte",wishes:"viseaz\u0103",likes:"Ii place",loves:"iube\u0219te",hopes:"sper\u0103",has:"a ",was:"a fost",thinks:"crede",hates:"ur\u0103\u0219te",gives:"ofer\u0103"},pl:{wants:"chce",needs:"potrzebuje",says:"m\u00f3wi",asks:"pyta",wonders:"zastanawia si\u0119",freestyle:"freestyle",is:"jest",shares:"dzieli si\u0119",will:"b\u0119dzie",feels:"czuje",wishes:"\u017cyczy",likes:"lubi",loves:"uwielbia",hopes:"ma nadziej\u0119",has:"ma",was:["by\u0142","by\u0142a"],thinks:"my\u015bli",hates:"nienawidzi",gives:"daje"},fr:{wants:"veut",needs:"a besoin",says:"dit",asks:"demande",wonders:"se demande",freestyle:"personnaliser",is:"est",shares:"partage",will:"va",feels:"se sent",wishes:"souhaite",likes:"appr\u00e9cie",loves:"aime",hopes:"esp\u00e8re",has:"a",was:"\u00e9tait",thinks:"pense",hates:"d\u00e9teste",gives:"donne"},dk:{wants:"\u00f8nsker",needs:"beh\u00f8ver",says:"siger",asks:"sp\u00f8rger",wonders:"spekulerer p\u00e5",freestyle:"fri tekst",is:"er",shares:"deler",will:"vil",feels:"f\u00f8ler",wishes:"\u00f8nsker",likes:"kan lide",loves:"elsker",hopes:"h\u00e5ber",has:"har",was:"var",thinks:"synes",hates:"hader",gives:"giver"},pt_BR:{wants:"quer",needs:"precisa",says:"diz",asks:"pergunta",wonders:"admira",freestyle:"freestyle",is:"est\u00e1",shares:"compartilha",will:"vai",feels:"sente",wishes:"deseja",likes:"gosta",loves:"ama",hopes:"espera",has:"tem",was:"estava",thinks:"pensa",hates:"odeia",gives:"d\u00e1"},hr:{wants:"ho\u0107e",needs:"treba",says:"ka\u017ee",asks:"pita",wonders:"se pita",freestyle:"slobodni stil",is:"je",shares:"dijeli",will:"\u0107e",feels:"osje\u0107a",wishes:"\u017eeli",likes:"\u017eeli",loves:"voli",hopes:"se nada ",has:["je bio","je bila"],was:null,thinks:"misli",hates:"mrzi",gives:"daje"},de:{wants:"will",needs:"braucht",says:"sagt",asks:"fragt",wonders:"fragt sich",is:"ist",shares:"teilt",will:"wird",feels:"f\u00fchlt",wishes:"w\u00fcnscht",likes:"mag",loves:"liebt",hopes:"hofft",has:"hat",was:"war",thinks:"denkt",hates:"hasst",gives:"gibt"},hu:{wants:"szeretne",needs:"k\u00e9r",says:"szerint",asks:"azt k\u00e9rdi",wonders:"azon tanakodik",freestyle:"freestyle",is:"most",shares:"mutatja",will:"majd",feels:"\u00fagy \u00e9rzi",wishes:"azt k\u00edv\u00e1nja",likes:"szereti",loves:"im\u00e1dja",hopes:"rem\u00e9li",has:"mostanra",was:"m\u00e1r",thinks:"arra gondol",hates:"ut\u00e1lja",gives:"ad"},fa:{wants:"\u0645\u06cc\u062e\u0648\u0627\u0647\u062f",needs:"\u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u062f \u0628\u0647 ",says:"\u06af\u0641\u062a\u0647 \u0647\u0627",asks:"\u0645\u06cc\u067e\u0631\u0633\u062f",wonders:"\u0634\u06af\u0641\u062a \u0632\u062f\u0647 \u0627\u0633\u062a ",freestyle:"\u0642\u0627\u0644\u0628 \u0631\u0627\u06cc\u06af\u0627\u0646",is:"\u0647\u0633\u062a",shares:"\u0628\u0647 \u0627\u0634\u062a\u0631\u0627\u06a9 \u0645\u06cc\u06af\u0630\u0627\u0631\u062f",will:"\u062e\u0648\u0627\u0647\u062f",feels:"\u0627\u062d\u0633\u0627\u0633 \u0645\u06cc\u06a9\u0646\u062f",wishes:"\u0622\u0631\u0632\u0648 \u0645\u06cc\u06a9\u0646\u062f \u06a9\u0647",likes:"\u062f\u0648\u0633\u062a\u062f\u0627\u0631",loves:"\u0639\u0627\u0634\u0642",hopes:"\u0627\u0645\u06cc\u062f\u0648\u0627\u0631 \u0627\u0633\u062a",has:"\u0628\u0627\u06cc\u062f",was:"\u0628\u0648\u062f",thinks:"\u0641\u06a9\u0631 \u0645\u06cc\u06a9\u0646\u062f",hates:"\u0646\u0641\u0631\u062a \u062f\u0627\u0631\u062f \u0627\u0632 ",gives:"\u0645\u06cc\u062f\u0647\u062f"},hi:{wants:"\u091a\u093e\u0939\u0924\u093e \u0939\u0948 ",needs:"\u091a\u093e\u0939\u0924\u093e \u0939\u0948 ",says:"\u0915\u0939\u0924\u0947 \u0939\u0948\u0902 ",asks:"\u092a\u0942\u091b\u093e \u0939\u0948 ",wonders:"\u0906\u0936\u094d\u091a\u0930\u094d\u092f \u0915\u0930\u0924\u093e \u0939\u0948 ",freestyle:"\u092e\u0941\u0915\u094d\u0924 \u0936\u0948\u0932\u0940 ",is:"\u0939\u0948 ",shares:"\u0938\u093e\u091d\u093e \u0915\u093f\u092f\u093e ",will:"\u0907\u091a\u094d\u091b\u093e  ",feels:"\u092e\u0939\u0938\u0942\u0938 \u0915\u093f\u092f\u093e ",wishes:"\u0936\u0941\u092d\u0947\u0915\u094d\u0937\u093e \u0939\u0948 ",likes:"\u092a\u0938\u0902\u0926 \u0939\u0948 ",loves:"Sorry for above translation, please replace that with below one.\n\u092a\u094d\u092f\u093e\u0930 \u0939\u0948 ",hopes:"\u0906\u0936\u093e \u0939\u0948 \u0915\u093f ",has:"\u0930\u0916\u0924\u093e \u0939\u0948 ",was:"\u0925\u093e ",thinks:"\u0938\u094b\u091a\u0924\u093e \u0939\u0948 ",hates:"\u0928\u092b\u0930\u0924 \u0939\u0948 ",gives:"\u0926\u093f\u092f\u093e \u0939\u0948 "},fi:{wants:"haluaa",needs:null,says:"sanoo",asks:"kysyy",wonders:null,freestyle:"freestyle",is:"on",shares:"jakaa",will:"aikoo",feels:"tuntuu",wishes:"tahtoo",likes:"tykk\u00e4\u00e4",loves:"rakastaa",hopes:null,has:null,was:"oli",thinks:"luulee",hates:"vihaa",gives:"antaa"},ja:{wants:"\u6b32\u3057\u3044",needs:"\u5fc5\u8981\u3068\u3059\u308b",says:"\u8a71\u3059",asks:"\u5c0b\u306d\u308b",wonders:"\u4e0d\u601d\u8b70\u306b\u601d\u3046",freestyle:"\u81ea\u7531\u306b",is:"\u3067\u3059",shares:"\u5171\u6709",will:"\u305c\u3072",feels:"\u611f\u3058\u308b",wishes:"\u671b\u3080",likes:"\u597d\u304d",loves:"\u611b\u3059\u308b",hopes:"\u9858\u3046",has:"\u6301\u3064",was:"\u3067\u3057\u305f",thinks:"\u8003\u3048\u308b",hates:"\u5acc\u3046",gives:"\u3042\u3052\u308b"},he:{wants:"\u05e8\u05d5\u05e6\u05d4",needs:"\u05e6\u05e8\u05d9\u05da\\\u05d4",says:"\u05d0\u05d5\u05de\u05e8/\u05ea",asks:"\u05de\u05d1\u05e7\u05e9/\u05e9\u05d5\u05d0\u05dc",wonders:"\u05ea\u05d5\u05d4\u05d4",freestyle:"\u05d7\u05d5\u05e4\u05e9\u05d9",is:"\u05db\u05e8\u05d2\u05e2",shares:"\u05de\u05e9\u05ea\u05e3",will:"(\u05d1\u05e2\u05ea\u05d9\u05d3)",feels:"\u05de\u05e8\u05d2\u05d9\u05e9",wishes:"\u05de\u05e9\u05ea\u05d5\u05e7\u05e7",likes:"\u05de\u05d7\u05d1\u05d1/\u05d0\u05d5\u05d4\u05d1",loves:"\u05d0\u05d5\u05d4\u05d1",hopes:"\u05de\u05e7\u05d5\u05d5\u05d4",has:"(\u05d1\u05e2\u05d1\u05e8)",was:"\u05e7\u05d5\u05d3\u05dd",thinks:"\u05d7\u05d5\u05e9\u05d1",hates:"\u05e9\u05d5\u05e0\u05d0",gives:"\u05e0\u05d5\u05ea\u05df"},sv:{wants:"vill",needs:"beh\u00f6ver",says:"s\u00e4ger",asks:"fr\u00e5gar",wonders:"undrar",freestyle:"fristil",is:"\u00e4r",shares:"delar",will:"kommer",feels:"k\u00e4nner",wishes:"\u00f6nskar",likes:"gillar",loves:"\u00e4lskar",hopes:"hoppas",has:"har",was:"var",thinks:"tycker",hates:"hatar",gives:"ger"},sk:{wants:"chce",needs:"potrebuje",says:"hovor\u00ed",asks:"sa p\u00fdta",wonders:"sa \u010duduje",freestyle:"vo\u013en\u00fd \u0161t\u00fdl",is:"je",shares:"zdiela",will:"bude",feels:"sa c\u00edti",wishes:"si \u017eel\u00e1",likes:"m\u00e1 r\u00e1d",loves:"miluje",hopes:"d\u00fafa",has:"m\u00e1",was:"bol",thinks:"si mysl\u00ed",hates:"nezn\u00e1\u0161a",gives:"d\u00e1va"},uk:{wants:"\u0445\u043e\u0447\u0435",needs:"\u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0454",says:"\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c",asks:"\u0437\u0430\u043f\u0438\u0442\u0443\u0454",wonders:"\u0446\u0456\u043a\u0430\u0432\u0438\u0442\u044c\u0441\u044f",freestyle:"\u0432\u0456\u043b\u044c\u043d\u0438\u0439 \u0441\u0442\u0438\u043b\u044c",is:"\u0437\u0430\u0440\u0430\u0437",shares:"\u0434\u0456\u043b\u0438\u0442\u044c\u0441\u044f",will:"\u0431\u0443\u0434\u0435",feels:"\u0432\u0456\u0434\u0447\u0443\u0432\u0430\u0454",wishes:"\u0431\u0430\u0436\u0430\u0454",likes:"\u043f\u043e\u0434\u043e\u0431\u0430\u0454\u0442\u044c\u0441\u044f",loves:"\u043b\u044e\u0431\u0438\u0442\u044c",hopes:"\u0441\u043f\u043e\u0434\u0456\u0432\u0430\u0454\u0442\u044c\u0441\u044f",has:"\u043c\u0430\u0454 ",was:"\u0431\u0443\u0432",thinks:"\u0434\u0443\u043c\u0430\u0454",hates:"\u043d\u0435\u043d\u0430\u0432\u0438\u0434\u0438\u0442\u044c",gives:"\u0434\u0430\u0440\u0443\u0454"},tr_ch:{wants:"\u60f3\u8981",needs:"\u9700\u8981",says:"\u8aaa",asks:"\u554f",wonders:"\u597d\u5947",freestyle:"\u81ea\u7531\u767c\u63ee",is:"\u6b63\u5728",shares:"\u5206\u4eab",will:"\u6253\u7b97",feels:"\u89ba\u5f97",wishes:"\u671f\u5f85",likes:"\u559c\u6b61",loves:"\u611b",hopes:"\u5e0c\u671b",has:"\u5df2\u7d93",was:"\u66fe\u7d93",thinks:"\u60f3",hates:"\u8a0e\u53ad",gives:"\u7d66"}};