
   if(!dbugScripts("cbsnews",["cbsnews.tron.c3p0.js"])) {
   /*	cbsnews.tron.c3p0.js - packed	*/
       var PageTools=new Hash({get:function(C,A){A=A||{};var B=false;switch(C){case"title":B=PageVars.get("title")||$(document.head).getElement("title").get("text");break;case"description":B=PageVars.get("description")||$(document.head).getElement("meta[name=description]").get("content");break;case"siteName":B=PageVars.get("siteName")||PageTools.getSiteName();break;case"href":B=PageVars.get("href")||new Link(location.href).mergeQueryString({jsdebug:false,refresh:false,tag:false}).set("hash",false).get("href");B=(PageVars.get("href").contains("http://")||PageVars.get("href").contains(escape("http://")))?B:"http://"+window.location.host+B;break;case"path":B=PageVars.get("href")||new Link(location.href).mergeQueryString({jsdebug:false,refresh:false,tag:false}).set("hash",false).get("href");B=(PageVars.get("href").contains("http://")||PageVars.get("href").contains(escape("http://")))?B:"http://"+window.location.host+B;break;case"SendTo":B=PageVars.get("SendTo")||"";break;case"Sender":B=PageVars.get("Sender")||"";break;case"message":B=PageVars.get("message")||"";break;}if(A.encode){B=encodeURIComponent(B);}return B;},getSiteName:function(){switch(PageVars.get("siteId","number")){case 3:case 105:case 109:return"CNET News.com";case 4:case 5:return"CNET Download.com";case 7:return"CNET Reviews";case 9:return"Shopper.com";case 162:return"CBSNews.com";default:return"CNET.com";}},email:function(){new Request({url:"/"+PageVars.getOid({pageType:8790,nodeId:4})+".html?nomesh",data:new Hash({sourceUrl:decodeURIComponent(PageTools.get("href")),ProductName:decodeURIComponent(PageTools.get("title")),ProductInfo:decodeURIComponent(PageTools.get("description")),SiteName:PageTools.get("siteName"),SendTo:PageTools.get("SendTo"),Sender:PageTools.get("Sender"),message:PageTools.get("message")}).toQueryString(),onComplete:function(A){var B=$("emailShell")||new Element("div",{id:"emailShell"}).inject(document.body).empty();B.set("html",A);new GlobalModal({content:B.getElement(".globalModal"),userIframeShim:!!Browser.Engine.trident4,onInit:function(){var C=this.win.getElement("form");this.win.getElements("input[name=Sender], input[name=SendTo]").addClass("validate-email");this.win.getElements("input[name=CAPTCHA_RESPONSE]").addClass("required");this.win.getElements("input[type=hidden]").inject(C);PageTools.emailValidator=new FormValidator(this.win.getElement("form"),{evaluateFieldsOnBlur:true,evaluateFieldsOnChange:false,evaluateOnSubmit:false});C.addEvent("submit",function(E){if(E){E.stop();}if(!PageTools.emailValidator.validate()){return ;}var D=this.win.getElement("form");new Request({url:D.get("action"),data:D.toQueryString(),method:"post",onRequest:function(){PageVars.set("SendTo",D.getElement("input[name=SendTo]").get("value"));PageVars.set("Sender",D.getElement("input[name=Sender]").get("value"));PageVars.set("message",D.getElement("textarea[name=message]").get("value"));this.win.getElements("p.error").dispose();}.bind(this),onComplete:function(F){if(!F||!F.contains("<title>Thank You</title>")){PageTools.email();return ;}PageVars.set("SendTo","");PageVars.set("Sender","");PageVars.set("message","");new Element("div",{"class":"thanks",html:"Your message has been sent."}).replaces(D);new Jlogger({tag:"submitEmail"}).ping();this.win.setPosition({});}.bind(this)}).send();}.bind(this));},showNow:true});}}).send();},print:function(){window.print();new Jlogger({tag:"shareDropDownPrint"}).ping();},initShare:function(){this.overShare={tab:false,content:false};this.checkForPageVars();},checkForPageVars:function(){if(PageVars.get("href")==null){PageVars.set("href",document.location.toString());}if(PageVars.get("title")==null){PageVars.set("title",document.getElement("title").get("text"));}if(PageVars.get("description")==null){PageVars.set("description",document.getElement("meta[name=description]").get("content"));}},openShare:function(A){A.stop();if(this.shareShell){this.positionShareShell(A.target);this.shareShell.setStyle("display","block");}else{this.shareNode=(PageVars.get("siteId")==4)?20:(PageVars.get("siteId")==162)?100:1;new Request({url:"/8791-"+this.shareNode+"_"+PageVars.get("siteId")+"-0.html?nomesh",data:{shareURL:PageTools.get("href"),shareTitle:PageTools.get("title"),shareDescription:PageTools.get("description")},onSuccess:function(B){this.createShareShell(A.target,B);}.bind(this)}).send();}},createShareShell:function(B,A){B.getParent().setStyles("width",B.getComputedSize().totalWidth);this.shareShell=new Element("div",{id:"shareDropDown"}).inject(document.body);this.shareShell.set("html",A);$$(".contentTools .shareYbuzz").inject(this.shareShell.getElement(".shareLinks.right"));this.positionShareShell(B);this.setShowHideActions();},positionShareShell:function(A){this.shareShell.setPosition({relativeTo:A,position:"upperRight",edge:"upperRight",offset:{x:(Browser.Engine.trident4)?8:12,y:(Browser.Engine.trident4)?-5:-6}});if(this.initialFontSize){this.shareShell.getElement(".shareHead").setStyle("font-size",this.initialFontSize+"%");}},setShowHideActions:function(){this.shareShell.getElement(".shareHead").addEvents({mouseenter:function(){this.overShare.tab=true;}.bind(this),mouseleave:function(){this.overShare.tab=false;this.hideShareShell.delay(20,this);}.bind(this)});this.shareShell.getElement(".shareContent").addEvents({mouseenter:function(){this.overShare.content=true;}.bind(this),mouseleave:function(){this.overShare.content=false;this.hideShareShell.delay(20,this);}.bind(this)});},hideShareShell:function(){if(this.overShare.tab==false&&this.overShare.content==false){this.shareShell.setStyle("display","none");}},fontSizeSmaller:function(){if(this.initialFontSize>75.2){var A=this.initialFontSize-8.3;$("contentBody").set("styles",{"font-size":A+"%"});this.initialFontSize=A;if(this.initialFontSize<133.2){$$(".pageType2100 #overviewHead.withTools").setStyle("padding-bottom",5);}this.setFontCookie();}},fontSizeLarger:function(){if(this.initialFontSize<149){var A=this.initialFontSize+8.3;$("contentBody").set("styles",{"font-size":A+"%"});this.initialFontSize=A;if(this.initialFontSize>=133.2){$$(".pageType2100 #overviewHead.withTools").setStyle("padding-bottom",25);}this.setFontCookie();}},setFontCookie:function(){Cookie.write("cnetFontSize",this.initialFontSize,{domain:".cnet.com",duration:365,path:"/"});},setFontStyles:function(){if(Cookie.read("cnetFontSize")&&(PageVars.get("pageType")==8301||PageVars.get("pageType")==2100)){this.initialFontSize=Cookie.read("cnetFontSize").toFloat();var A=(this.initialFontSize>=133.2)?".pageType2100 #overviewHead.withTools{padding-bottom: 25px;}":"";if(Browser.Engine.trident){$("fontSizeStyles").styleSheet.cssText="#contentBody{font-size:"+this.initialFontSize+"%;}"+A;}else{$("fontSizeStyles").set("text","#contentBody{font-size:"+this.initialFontSize+"%;}"+A);}}else{this.initialFontSize=100;}}});window.addEvent("domready",function(){if($$(".contentTools").length){PageTools.initShare();}});var FormRecycler={Base:new Class({Implements:[Options,Events],options:{clone:false,findLocalData:$lambda({}),resetOnMove:true,resetOnHide:false},initialize:function(B,A){this.setOptions(A);this.shell=(this.options.clone)?$(B).clone():$(B);this.form=(this.shell.get("tag")=="form")?this.shell:this.shell.getElement("form");if(!this.form){return null;}this.findLocalData=this.options.findLocalData;this.form.store("mobileForm",this);this.fireEvent("onInitialize");return this;},relocateForm:function(A){this.removeLocalParams();if(this.options.resetOnMove){this.form.reset();this.fireEvent("onReset");}this.setLocalData(this.findLocalData(A));this.fireEvent("onRelocate",A);},removeLocalParams:function(){this.form.getElements("input").each(function(A){if(A.getProperty("local")){A.dispose();}});},setLocalData:function(A){if(!A||$type(A)!="object"){return null;}$each(A,function(C,B){new Element("input",{type:"hidden",name:B,value:C,local:"true"}).inject(this.form);},this);},move:function(A){A=$(A);if(!A){return false;}this.relocateForm(A);return A;},toElement:function(){return this.shell;}})};$extend(FormRecycler,{Inline:new Class({Extends:FormRecycler.Base,Implements:Chain,options:{hideFormsInParent:true,revealOptions:{},firstParent:null},initialize:function(B,A){A=$merge(this.options,A||{});this.parent(B,A);this.form.store("mobileForm",this);this.currentParent=$(this.options.firstParent)||null;this.shell.set("reveal",$merge(this.options.revealOptions,{onComplete:this.callChain.bind(this)}));return this;},relocateForm:function(A){this.parent(A);A.adopt(this.shell);this.currentParent=A;this.callChain();},move:function(A){this.clearChain();A=$(A);if(!A){return ;}if(this.currentParent==A){if(this.options.hideFormsInParent){this.hideOthers();}this.shell.get("reveal").toggle();return ;}this.chain(this.relocateForm.pass(A,this),this.show.bind(this));this.hide();},show:function(){if(this.shell.get("reveal").hiding){this.show.delay(10,this);return ;}if(this.options.hideFormsInParent){this.hideOthers();}this.shell.reveal();this.fireEvent("onShow");},hideOthers:function(){this.currentParent.getElements("form").each(function(A){try{if(A!=this.form){A.retrieve("mobileForm").toElement().dissolve();}}catch(B){dbug.log(B);}});},hide:function(){this.shell.dissolve();this.fireEvent("onHide");}}),GlobalModal:new Class({Extends:FormRecycler.Base,options:{modalOptions:{}},initialize:function(B,A){A=$merge(this.options,A||{});this.parent(B,A);try{this.modal=new GlobalModal($merge(this.options.modalOptions||{},{content:this.shell}));}catch(C){dbug.log("Modal failure: %o",C);}},move:function(A){A=this.parent(A);if(!A){return false;}this.show();},show:function(){this.modal.show();this.fireEvent("onShow");},hide:function(){this.modal.hide();this.fireEvent("onHide");}})});var CommentForm=new Class({Extends:FormRecycler.Inline,commentOptions:{submitElems:false,closeElems:false,useValidator:true,validatorOptions:{},useTextFieldCounter:true,submissionType:null},initialize:function(B,A){this.parent(B,$merge(this.commentOptions,A));try{this.validator=(this.options.useValidator)?new FormValidator(this.form,this.options.validatorOptions):false;}catch(C){dbug.log("Validator addition failed: %o",C);this.validator=false;}this.waiter=false;this.form.set("send",{onRequest:function(){if(!this.waiter){this.waiter=new Waiter(this.form);}this.waiter.start();}.bind(this),onComplete:function(){if(this.waiter){this.waiter.stop();}}.bind(this),onSuccess:this.handlePostResponse.bind(this),onFailure:this.handleFailure.bind(this)});if(this.options.useTextFieldCounter&&window.TextFieldCounter){this.textCounters=new TextFieldCounter(this.form);}if(this.options.submitElems){this.form.getElements(this.options.submitElems).addEvent("click",this.doSubmit.bind(this));}if(this.options.closeElems){this.form.getElements(this.options.closeElems).addEvent("click",this.hide.bind(this));}this.form.addEvent("submit",function(D){D.stop();this.doSubmit();}.bind(this));},doSubmit:function(){if(!UserVars.isLoggedIn()){return false;}this.form.getElements("input[type=text], textarea").each(function(A){A.set("value",A.get("value").trim());});if(this.validator&&!this.validator.validate()){return false;}this.form.send();},hide:function(){this.parent();if(this.validator){this.chain(function(){this.validator.reset();if(this.options.useTextFieldCounter){this.textCounters.resetAllCounters();}this.fireEvent("onReset");this.callChain();}.bind(this));}},handlePostResponse:function(E){this.hide();var A=(PageVars.get("siteId")==162)?UserVars.get("userName"):'<a href="http://www.cnet.com/profile/'+UserVars.get("userName").replace(" ","+")+'">'+UserVars.get("userName")+"</a>";var D=(PageVars.get("siteId")==162)?"CBS'":"CNET's";this.responseObj={"delete":{fail:"There was a problem deleting this comment, please try again.",success:"This comment has been deleted.",pending:"This comment will be deleted shortly."},rop:{fail:"There was a problem submitting this form, please try again.",success:"Your message has been submitted and will be reviewed by our staff. Thank you, "+A+", for helping us maintain "+D+" great community!",pending:"Your message will be submitted shortly and reviewed by our staff. Thank you, "+A+", for helping us maintain "+D+" great community!"},comment:{fail:"There was a problem submitting your comment, please try again.",success:"Thanks for your comment, "+A+".",pending:"Thanks for your comment, "+A+". It will be posted to our site shortly."},edit:{fail:"There was a problem updating your comment, please try again.",success:"This comment has been successfully updated.",pending:"This comment will be updated shortly."},email:{fail:"There was a problem submitting this email, please try again.",success:"Thank you, "+A+". Your email has been sent.",pending:"Thank you, "+A+". Your email will be sent shortly."}};this.thanks=new Element("div",{"class":"userReviewForm thankyou"}).inject(this.shell,"before");if(E.match("<status>failure</status>")){var C=this.responseObj[this.options.submissionType].fail;}else{if(E.match("<status>pending</status>")){var C=this.responseObj[this.options.submissionType].pending;}else{var C=this.responseObj[this.options.submissionType].success;}}var B=new Element("h2",{html:'<span class="thanks">'+C+"</span>"}).inject(this.thanks);new Element("a",{"class":"closeConfirm",text:"close",events:{click:function(){this.thanks.dissolve();}.bind(this)}}).inject(B);if(E.match("<status>success</status>")&&this.options.submissionType=="comment"){var F=E.match(/name="assetId"\ value="(\d+)"/)[1].toInt();if(PageVars.get("siteId")!=162){new Element("a",{href:new Link("/8618-"+PageVars.get("nodeId")+"_"+PageVars.get("siteId")+"-"+PageVars.get("assetId")+".html").mergeQueryString({communityId:this.form.getElement("input[name=communityId]").get("value"),targetCommunityId:this.form.getElement("input[name=targetCommunityId]").get("value"),blogId:PageVars.get("pageNumber"),messageId:F}).get("href"),text:"Click here to view your comment","class":"readMore"}).inject(B,"after");}else{new Element("a",{href:new Link("/8618-"+PageVars.get("nodeId")+"_"+PageVars.get("siteId")+"-"+PageVars.get("assetId")+".html").mergeQueryString({assetTypeId:this.form.getElement("input[name=assetTypeId]").value,messageId:F}).get("href"),text:"Click here to view your comment","class":"readMore"}).inject(B,"after");}}this.fireEvent("onCommentSuccess",arguments);},handleFailure:function(){this.writeMessage('This action was not completed. Please try again, or notify us at our <a href="http://cnet.custhelp.com/">Help Center</a>.');},writeMessage:function(A){new Element("div",{html:A}).inject(this.shell,"before");}});var commentsForms={findMessageId:function(C){var B=null;var A=C;do{B=A.getProperty("messageId");}while(!B&&(A=A.getParent("dl")));if(!B){return false;}return{commentId:B};},findParentMessageId:function(C){var B=null;var A=C;do{B=A.getProperty("messageId");}while(!B&&(A=A.getParent("dl")));if(!B){return false;}return{parentCommentId:B};}};var initializeComments=new Class({initialize:function(){if(!$("fixedCommentBox")){return false;}$("fixedCommentBox").getElement("dl.addcommentform").setStyle("display","block");this.setUpComments();this.initLinks();},setUpComments:function(){commentsForms.reply=new CommentForm("replyArea",{findLocalData:commentsForms.findParentMessageId,resetOnHide:false,submitElems:".addcomment a",submissionType:"comment",closeElems:".cancel a",useTextFieldCounter:false,onCommentSuccess:function(I){new Jlogger({tag:"submitReply"}).ping();Cookie.write("cachebypass","true",{duration:0.01,path:"/"});try{I=JSON.decode(I);var H=this.thanks.getElement("div a");if(I.commentId&&H.get("text").contains("Click here to view")){H.setProperty("href",PageVars.getPath({pageType:"8618",pageNumber:false})+"?assetTypeId=41&messageId="+I.commentId);}}catch(J){dbug.log("Failed to ammend the reply link: %o",J);}},onRelocate:function(){if(this.form.getElement("input[name=post_fb]")){this.form.getElement("input[name=post_fb]").checked=true;}}});CURS.Manager.addEvent("onLogin",function(){if(CURS.Social.fb.isUser()){commentsForms.reply.addEvent("onCommentSuccess",function(){var K=$E("h1");var J=K.getElement("a");var I=((J)?J:K).get("text");dbug.log("Story title: "+I);dbug.log("Reply summary: "+CURS.Social.fb.getParsedText($("replyArea").getElement("textarea[name=body]").get("value"),120,false));var H=((J)?"http://news.cnet.com"+J.get("href"):new Link(window.location).mergeQueryString({jsdebug:false,tag:false}).get("href"));var L=$E("div.userReviewForm").getElements("a");L=L.filter(function(M){return(M.get("text").contains("Click here to view"));})[0];CURS.Social.fb.ensureInit(function(){FB.Connect.showFeedDialog(92388756165,{storyTitle:I,storyUrl:H,commentSummary:CURS.Social.fb.getParsedText($("replyArea").getElement("textarea[name=body]").get("value"),120,false),commentUrl:L.get("href")});dbug.log("Reply submitted to Facebook");},true);});}});commentsForms.offensive=new CommentForm("offensiveArea",{findLocalData:commentsForms.findMessageId,resetOnHide:false,submitElems:".submit.send a.button",submissionType:"rop",closeElems:".cancel a",useTextFieldCounter:false,onRelocate:function(){var I=this.form.getElement("input[name=permalink]");var H=new Link(I.get("value")).mergeQueryString({messageId:this.form.getElement("input[name=commentId]").get("value")});H=H.get("href").replace("http://"+document.domain,"");I.set("value",H);},onCommentSuccess:function(){new Jlogger({tag:"submitOffensive"}).ping();}});commentsForms.emailAFriend=new CommentForm("emailAFriendArea",{findLocalData:commentsForms.findMessageId,resetOnHide:false,submissionType:"email",submitElems:".submit.send a.button",closeElems:".cancel a",useTextFieldCounter:false,onRelocate:function(){var I=this.form.getElement("input[name=permalink]");var H=new Link(I.get("value")).mergeQueryString({messageId:this.form.getElement("input[name=commentId]").get("value")});H=H.get("href").replace("http://"+document.domain,"");I.set("value",H);},onCommentSuccess:function(){new Jlogger({tag:"emailComment"}).ping();}});var C=function(){commentsForms.newComment=new CommentForm("newCommentForm",{submitElems:".submit.addcomment a.button",clone:false,submissionType:"comment",useTextFieldCounter:false,onCommentSuccess:function(J){Cookie.write("cachebypass","true",{duration:0.01,path:"/",domain:CURS.Manager.getCookieHost()});new Jlogger({tag:"submitComment"}).ping();try{this.thanks.inject($("fixedCommentBox"),"before");$("fixedCommentBox").setStyle("display","none");J=JSON.decode(J);var I=this.thanks.getElement("div a");if(J.commentId&&I.get("text").contains("Click here to view")){I.setProperty("href",PageVars.getPath({pageType:"8618",pageNumber:false})+"?assetTypeId=41&messageId="+J.commentId);}}catch(K){dbug.log("Thanks replacement fail: %o",K);}}});if(CURS.Social.fb.isUser()){commentsForms.newComment.addEvent("onCommentSuccess",function(){var L=$E("h1");var K=L.getElement("a");var J=((K)?K:L).get("text");var I=((K)?"http://news.cnet.com"+K.get("href"):new Link(window.location).mergeQueryString({jsdebug:false,tag:false}).get("href"));var M=this.thanks.getElements("a");dbug.log("Story title: "+J);dbug.log("Comment summary: "+CURS.Social.fb.getParsedText($("newCommentForm").getElement("textarea[name=body]").get("value"),120,false));M=M.filter(function(N){return(N.get("text").contains("Click here to view"));})[0];CURS.Social.fb.ensureInit(function(){FB.Connect.showFeedDialog(92389921165,{storyTitle:J,storyUrl:I,commentSummary:CURS.Social.fb.getParsedText($("newCommentForm").getElement("textarea[name=body]").get("value"),120,false),commentUrl:M.get("href")});dbug.log("Comment submitted to Facebook");},true);});}var H=commentsForms.newComment.form.getElement("input[name=body]");if(H){H.addClass("maxLength").setProperty("validatorprops","{minLength:2, maxLength: 4999}");}};var G=function(J){J=J||"<a>Log in or create an account</a> to post a comment.";var H=$E("dd.invite")||(new Element("dd",{"class":"status invite",html:'<p class="message"></p>'}).inject($("fixedCommentBox").getElement(".addcommentform dt.hed"),"after"));var I=H.getElement("p.message");I.empty();I.set("html",J);D(I);};var B=function(){var H=$("fixedCommentBox").getElement("dd.invite");if(!$("fixedCommentBox").getElement("dd.welcome")){var I=new Element("dd",{"class":"status welcome",html:'<p>You are logged in as <span class="cnetUserName"></span>. Please leave a comment.'});if(H){I.replaces(H);}else{I.inject($("fixedCommentBox").getElement(".addcommentform dt.hed"),"after");}}CURS.Manager.writeUserNames(I);};var D=function(H){if(!E){return false;}E=E.filter(function(J){return !!$(J);});var I=$(H).getElements("a");I=I.filter(function(J){return !E.contains(J);});I.addEvent("click",F);E.combine(I);};G();var A=function(){if(!UserVars.isLoggedIn()){G();}else{if(!UserVars.hasFullAccess()){G("Your account is not yet confirmed. <a>Click here to confirm your account.</a>");}else{if(!$chk(UserVars.get("userName"))){G("You'll need a CBS News username in order to submit a review. <a>Click here to create a username.</a>");}else{if(!$chk(UserVars.get("postalCode"))){G("We require a postal code for your account in order to submit a comment. <a>Click here to enter a postal code.</a>");}else{B();if(!commentsForms.newComment){C();}}}}}};CURS.Manager.addEvent("onLogin",function(){A();CURS.Manager.addEvent("onStateChange",function(){A();});});var E=$("fixedCommentBox").getElements(".status a, #new-body, #subComment");var F=function(H){var I={registerHed:"Join CBS News to comment on this story",loginHed:"Log in to CBS News to comment on this story",appId:"189",nextAction:function(){if(commentsForms.newComment){E.removeEvent("click",F);CURS.Manager.removeEvents("onStateChange");}}};CURS.Manager.checkLogin(I);};E.addEvent("click",F);},initLinks:function(A){A=$(A)||$(document.body).getElement(".userComments");A.getElements("a.reply").addEvent("click",function(B){CURS.Manager.checkLogin({registerHed:"Join CBS News to reply to this comment",loginHed:"Log in to CBS News to reply to this comment",appId:"189",nextAction:function(){commentsForms.reply.move($(B.target).getParent("dl").getElement(".toolstretch"));}});});A.getElements("a.repo").addEvent("click",function(B){CURS.Manager.checkLogin({registerHed:"Join CBS News to report this comment",loginHed:"Log in to CBS News to report to this comment",appId:"189",nextAction:function(){commentsForms.offensive.move($(B.target).getParent("dl").getElement(".toolstretch"));}});});A.getElements("a.mail").addEvent("click",function(B){CURS.Manager.checkLogin({registerHed:"Join CBS News to e-mail this comment to a friend",loginHed:"Log in to CBS News to e-mail this comment to a friend",appId:"189",nextAction:function(){commentsForms.emailAFriend.move($(B.target).getParent("dl").getElement(".toolstretch"));}});});this.initLike();},initLike:function(){$$(".userComments a.like, .userComments a.unlike").addEvent("click",function(A){this.likeWaiter=new Waiter(A.target,{baseHref:"http://i.i.com.com/cnwk.1d/i/cbs/",img:{src:"commentsLikeLoader.gif",styles:{width:16,height:16,background:"#EDEDED"}},layer:{styles:{background:"#EDEDED"}}});CURS.Manager.checkLogin({registerHed:"Join CBSNews.com to like this comment",loginHed:"Log in to CBSNews.com to like this comment",appId:220,cval:"assetrating",nextAction:function(){this.likeWaiter.start();this.sendLikeUnlikeRequest(A.target);}.bind(this)});}.bind(this));},sendLikeUnlikeRequest:function(B){var A=(B.hasClass("like"))?"8679":"8680";if(!B.hasClass("likethankyou")){new Request.JSON({url:"/"+A+"-4_"+PageVars.get("siteId")+"-0.html",data:{assetId:(B.getProperty("assetId"))?B.getProperty("assetId"):null,assetTypeId:77,viewType:"json",assetVoteId:(B.hasClass("like"))?null:B.getProperty("assetVoteId")},onSuccess:function(E){if(E){E=E.response;if(E.status["$"]=="success"){new Jlogger({tag:(B.hasClass("like"))?"likeComment%":"unlikeComment%"}).ping();var F;E.data.datum.each(function(H){if(H["@name"]=="assetTypeId"){F=H["@value"];}if(H["@name"]=="assetVoteId"){assetVoteId=H["@value"];}});if(!B.getProperty("assetVoteId")){B.setProperty("assetVoteId",F);}B.set("text","Thank you!");B.addClass("likethankyou");this.likeWaiter.stop();this.setVoteNum(B,(B.hasClass("like"))?"like":"unlike");this.toggleLike.delay(3000,this,B);}else{if(E.errors.error["@name"]=="ALREADY_VOTED"){var C=new StickyWinFx({content:"You have already liked this comment",relativeTo:B,className:"alreadyVotedMsg",position:"upperLeft",fadeDuration:500}).show();this.toggleLike(B);this.likeWaiter.stop();C.hide.delay(4000,C);}else{if(E.errors.error["@name"]=="REMOVE_PROBLEM"){var D=new StickyWinFx({content:"<b>Error: </b>There was a problem removing your vote. Please try again.",relativeTo:B,className:"removeProblemMsg",position:"upperLeft",fadeDuration:500}).show();this.likeWaiter.stop();D.hide.delay(4000,D);}else{if(E.errors.error["@name"]=="SUBMIT_PROBLEM"){var G=new StickyWinFx({content:"<b>Error: </b>There was a problem submitting your vote. Please try again.",relativeTo:B,className:"submitProblemMsg",position:"upperLeft",fadeDuration:500}).show();this.likeWaiter.stop();G.hide.delay(4000,G);}else{if(E.errors.error["@name"]=="NOT_OWNER"){var D=new StickyWinFx({content:"<b>Error: </b>You do not have a vote registered for this comment.",relativeTo:B,className:"removeProblemMsg",position:"upperLeft",fadeDuration:500}).show();this.likeWaiter.stop();this.toggleLike(B);D.hide.delay(4000,D);}}}}}}}.bind(this)}).send();}else{this.likeWaiter.stop();}},toggleLike:function(A){A.removeClass("likethankyou");if(A.hasClass("like")){A.set("text","Unlike this");}else{A.set("text","Like this");}A.toggleClass("like");A.toggleClass("unlike");},setVoteNum:function(C,B){if(C.getParent().getElement("span.liked")){var E=C.getParent().getElement("span.liked");var A=E.getElement("b").get("text").toInt();var D;if(B=="like"){if(A==1){D="people like";}else{D="people";}A+=1;}else{if(A==1){D="people like";}else{if(A>1){D="person likes";}}A-=1;}E.set("html","<b>"+A+"</b> "+D+" this comment");}else{if(B="like"){new Element("span",{"class":"liked"}).set("html","<b>1</b> person likes this comment").inject(C.getParent(),"bottom");}}}});window.addEvent("domready",function(){commentsForms.initialize=new initializeComments();});
   }
       