
   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=(B.contains("http://")||B.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=(B.contains("http://")||B.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(A){dbug.log(A);dbug.log(PageTools.get("message"));dbug.log(PageTools.get("siteName"));new Request({url:"/"+PageVars.getOid({pageType:8790,nodeId:4})+".html?nomesh",data:new Hash({sourceUrl:(A)?decodeURIComponent(A.href):decodeURIComponent(PageTools.get("href")),ProductName:(A)?A.title:PageTools.get("title"),ProductInfo:(A)?A.description:PageTools.get("description"),SiteName:(A)?A.sitename:PageTools.get("siteName"),SendTo:PageTools.get("SendTo"),Sender:PageTools.get("Sender"),message:PageTools.get("message"),message:PageTools.get("message")}).toQueryString(),onComplete:function(B){var C=$("emailShell")||new Element("div",{id:"emailShell"}).inject(document.body).empty();C.set("html",B);new GlobalModal({content:C.getElement(".globalModal"),userIframeShim:!!Browser.Engine.trident4,onInit:function(){var D=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(D);PageTools.emailValidator=new FormValidator(this.win.getElement("form"),{evaluateFieldsOnBlur:true,evaluateFieldsOnChange:false,evaluateOnSubmit:false});D.addEvent("submit",function(F){if(F){F.stop();}if(!PageTools.emailValidator.validate()){return ;}var E=this.win.getElement("form");new Request({url:E.get("action"),data:E.toQueryString(),method:"post",onRequest:function(){PageVars.set("SendTo",E.getElement("input[name=SendTo]").get("value"));PageVars.set("Sender",E.getElement("input[name=Sender]").get("value"));PageVars.set("message",E.getElement("textarea[name=message]").get("value"));this.win.getElements("p.error").dispose();}.bind(this),onComplete:function(G){if(!G||!G.contains("<title>Thank You</title>")){this.win.destroy();PageTools.email(A);return ;}new Element("div",{"class":"thanks",html:"Your message has been sent."}).replaces(E);new JloggerLEVT.Social.Share({applicationTags:{eventt:"email",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:PageVars.get("Sender").split("@")[1]+":"+PageVars.get("SendTo").split("@")[1],wd:"emaillink",wdloc:(A)?A.location:"sharebar"}}).ping();new Jlogger({tag:(A)?A.location:"submitEmail"}).ping();PageVars.set("SendTo","");PageVars.set("Sender","");PageVars.set("message","");this.win.setPosition({});}.bind(this)}).send();}.bind(this));},showNow:true});}}).send();},print:function(C){window.print();if(C.target.getParent(".postByline")){var B="shareDropDownPrintT";var A="sharebartop";}else{var B="shareDropDownPrintB";var A="sharebarbtm";}new JloggerLEVT.Social.Utility({applicationTags:{eventt:"print",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"",wd:"link",wdloc:A}}).ping();new Jlogger({tag:B}).ping();},initShare:function(){this.overShare={tab:false,content:false,elements:$$(".share.linkIcon")};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.madeRequest){new Request({url:"/8791-"+PageVars.get("nodeId")+"_"+PageVars.get("siteId")+"-0.html?nomesh",data:{shareURL:PageTools.get("href"),shareTitle:PageTools.get("title"),shareDescription:PageTools.get("description")},onSuccess:function(B){this.madeRequest=true;this.overShare.elements.each(function(C){C.getParent().adopt(new Element("div",{html:B}));});$$(".contentTools a.email, .emailButton a.email").each(function(C){C.addEvent("click",PageTools.email);});$$(".contentTools a.print, .printButton a.print").each(function(C){C.addEvent("click",PageTools.print);});}.bind(this),onFailure:function(B){this.madeRequest=false;}.bind(this)}).send();}}});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);if(!this.form){return null;}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,textFieldCounterOptions:{}},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,this.options.textFieldCounterOptions);}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 [x]",events:{click:function(){this.thanks.dissolve();}.bind(this)}}).inject(B,"after");if(E.match("<status>success</status>")&&this.options.submissionType=="comment"){var F=E.match(/name="assetId"\ value="(\d+)"/)[1].toInt();new Element("p",{"class":"spacer",text:"or"}).inject(B,"after");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"),assetTypeId:this.form.getElement("input[name=assetTypeId]").get("value"),blogId:PageVars.get("pageNumber"),messageId:F}).get("href"),text:"view 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:"view 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 M=$E("h1");var K=M.getElement("a");var J=((K)?K:M).get("text");dbug.log("Story title: "+J);dbug.log("Reply summary: "+CURS.Social.fb.getParsedText($("replyArea").getElement("textarea[name=body]").get("value"),4999,false));var H=((K)?"http://news.cnet.com"+K.get("href"):new Link(window.location.href).mergeQueryString({jsdebug:false,tag:false}).get("href"));var N=this.thanks.getElement("a.readMore");var I=[{text:"Read this comment",href:(N.get("href").contains("http://"+document.domain))?N.get("href"):"http://"+document.domain+N.get("href")}];try{CURS.Social.fb.ensureInit(function(){FB.Connect.streamPublish("",{name:J,href:H,caption:"{*actor*} replied to a CBS News member's comment on this story.",description:CURS.Social.fb.getParsedText($("replyArea").getElement("textarea[name=body]").get("value"),4999,false)},I);},true);}catch(L){CURS.Social.fb.ensureActiveSession(function(){FB.ui({method:"stream.publish",display:"dialog",message:"",attachment:{name:J,href:H,caption:"{*actor*} replied to a CBS News member's comment on this story.",description:CURS.Social.fb.getParsedText($("replyArea").getElement("textarea[name=body]").get("value"),4999,false)},action_links:I,user_message_prompt:""});});}});}});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(K){Cookie.write("cachebypass","true",{duration:0.01,path:"/",domain:CURS.Manager.getCookieHost()});new Jlogger({tag:"submitComment"}).ping();var J="opt_out";if($("newCommentForm").getElement("#subscribeComments").checked){J="opt_in";}if(typeof abvar=="undefined"){abvar="";}new Jlogger({ctype:"comment_opt",cval:J,tag:abvar}).ping();try{this.thanks.inject($("fixedCommentBox"),"before");$("fixedCommentBox").setStyle("display","none");K=JSON.decode(K);var I=this.thanks.getElement("div a");if(K.commentId&&I.get("text").contains("Click here to view")){I.setProperty("href",PageVars.getPath({pageType:"8618",pageNumber:false})+"?assetTypeId=41&messageId="+K.commentId);}}catch(L){dbug.log("Thanks replacement fail: %o",L);}}});if(CURS.Social.fb.isUser()){commentsForms.newComment.addEvent("onCommentSuccess",function(){var N=$E("h1");var L=N.getElement("a");var K=((L)?L:N).get("text");var I=((L)?"http://news.cnet.com"+L.get("href"):new Link(window.location.href).mergeQueryString({jsdebug:false,tag:false}).get("href"));var O=this.thanks.getElement("a.readMore");dbug.log("Story title: "+K);dbug.log("Comment summary: "+CURS.Social.fb.getParsedText($("newCommentForm").getElement("textarea[name=body]").get("value"),4999,false));var J=[{text:"Read this comment",href:(O.get("href").contains("http://"+document.domain))?O.get("href"):"http://"+document.domain+O.get("href")}];try{CURS.Social.fb.ensureInit(function(){FB.Connect.streamPublish("",{name:K,href:I,caption:"{*actor*} commented on this story on CBS News.",description:CURS.Social.fb.getParsedText($("newCommentForm").getElement("textarea[name=body]").get("value"),4999,false)},J);},true);}catch(M){CURS.Social.fb.ensureActiveSession(function(){FB.ui({method:"stream.publish",display:"dialog",message:"",attachment:{name:K,href:I,caption:"{*actor*} replied to a CBS News member's comment on this story.",description:CURS.Social.fb.getParsedText($("newCommentForm").getElement("textarea[name=body]").get("value"),4999,false)},action_links:J,user_message_prompt:""});});}});}var H=commentsForms.newComment.form.getElement("input[name=body]");if(H){H.addClass("maxLength").setProperty("validatorprops","{minLength:2, maxLength: 4999}");}};var G=function(L){var K="<a class='login'>Log in or create an account</a> to post a comment.";K+='<span class="fbButton"> OR';K+='<span class="fbConnectInvite" style="text-align:center;">Quickly sign in with: </span>';L=L||K;var H=$E("dd.invite")||(new Element("dd",{"class":"status invite",html:'<p class="message"></p>'}).inject($("fixedCommentBox").getElement(".addcommentform dt.hed"),"after"));var J=H.getElement("p.message");J.empty();J.set("html",L);D(J);var I;if((dbug.enabled||Browser.qs.jsdebug)&&CBSi.jsdebug){if(CBSi.jsdebug=="true"){I="http://publish.cnet.com:8100/html/rb/js/tron/oreo.login.js";}else{if(PageVars.get("siteId")==162){I="http://publish.cnet.com:8100/html/rb/js/~dev/"+CBSi.jsdebug+"/cbsnews/oreo.a2.cbsnews.login.js";}else{I="http://publish.cnet.com:8100/html/rb/js/~dev/"+CBSi.jsdebug+"/oreo.login.js";}}}else{I="http://i.i.com.com/cnwk.1d/html/rb/js/tron/oreo.login.compressed.js";}if(!CURS.Process){new Asset.javascript(I,{id:"oreoLogin",onload:function(){CURS.Social.fb.init();$$(".connect2fbButton").addEvent("click",CURS.Social.fb.triggerLogin.pass(CURS.Social.fb.startSession));}});}else{CURS.Social.fb.init();$$(".connect2fbButton").addEvent("click",CURS.Social.fb.triggerLogin.pass(CURS.Social.fb.startSession));}D(J);};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{B();if(!commentsForms.newComment){C();}}}}};CURS.Manager.addEvent("onLogin",function(){A();CURS.Manager.addEvent("onStateChange",function(){A();});});var E=$("fixedCommentBox").getElements(".status a.login, #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);window.addEvent("domready",function(){if(!UserVars.isLoggedIn()){var H;if((dbug.enabled||Browser.qs.jsdebug)&&CBSi.jsdebug){if(CBSi.jsdebug=="true"){H="http://publish.cnet.com:8100/html/rb/js/tron/cbsnews/oreo.a2.cbsnews.login.js";}else{H="http://publish.cnet.com:8100/html/rb/js/~dev/"+CBSi.jsdebug+"/cbsnews/oreo.a2.cbsnews.login.js";}}else{H="http://i.i.com.com/cnwk.1d/html/rb/js/tron/cbsnews/oreo.a2.cbsnews.login.compressed.js";}if(!CURS.Process){new Asset.javascript(H,{id:"oreoLogin",onload:function(){CURS.Social.fb.init();$$(".connect2fbButton").addEvent("click",CURS.Social.fb.triggerLogin.pass(CURS.Social.fb.startSession));}});}else{CURS.Social.fb.init();$$(".connect2fbButton").addEvent("click",CURS.Social.fb.triggerLogin.pass(CURS.Social.fb.startSession));}}});},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();});
   }
       
