
   if(!dbugScripts("pers",["pers.tron.editorsprofile.js"])) {
   /*	pers.tron.editorsprofile.js - packed	*/
       var ThumbScroller=new Class({Extends:Fx.Scroll,scrollOptions:{thumbs:".box",axis:"x",thumbContainer:null,nav:{},startIndex:0,tolerance:0},initialize:function(A,B){if(typeof (A)=="string"){if($(A).retrieve("thumbscroller")){return false;}}else{if(A.retrieve("thumbscroller")){return false;}}this.parent(A,$merge(this.scrollOptions,B));this.element.store("thumbscroller",this);this.element.setStyle("overflow","hidden");this.computeDimensions();this.initNav();this.toIndex(this.options.startIndex);this.lastScroll=null;this.fireEvent("onInitialize");return this;},computeDimensions:function(){this.thumbs=this.element.getElements(this.options.thumbs);this.setParentSize();this.positions=this.getLocations();return this;},isAtEnd:function(A){A=A||this.getRange();var B=A[A.length-1];return(B.index==this.thumbs.length-1&&(B.type!="partial"||B.tolerated));},isAtStart:function(A){A=A||this.getRange();var B=A[0];return(B.index==0&&(B.type!="partial"||B.tolerated));},getLocations:function(){return this.thumbs.map(function(B){var C=B.getComputedSize()[this.getDir("total")];var A=B.getPosition(B.getParent())[this.getDir("xy")];return{size:C,start:A,end:C+A};},this);},initNav:function(){try{if(typeof (this.options.nav.next)=="string"){$$(this.options.nav.next).addEvent("click",this.toNextScreen.bind(this));}else{if(this.options.nav.next instanceof Array){this.options.nav.next[0].addEvent("click",this.toNextScreen.bind(this));}else{this.options.nav.next.addEvent("click",this.toNextScreen.bind(this));}}if(typeof (this.options.nav.previous)=="string"){$$(this.options.nav.previous).addEvent("click",this.toPreviousScreen.bind(this));}else{if(this.options.nav.previous instanceof Array){this.options.nav.previous[0].addEvent("click",this.toPreviousScreen.bind(this));}else{this.options.nav.previous.addEvent("click",this.toPreviousScreen.bind(this));}}if(typeof (this.options.nav.start)=="string"){$$(this.options.nav.start).addEvent("click",this.toStart.bind(this));}else{if(this.options.nav.start instanceof Array){this.options.nav.start[0].addEvent("click",this.toStart.bind(this));}else{this.options.nav.start.addEvent("click",this.toStart.bind(this));}}if(typeof (this.options.nav.end)=="string"){$$(this.options.nav.end).addEvent("click",this.toEnd.bind(this));}else{if(this.options.nav.end instanceof Array){this.options.nav.end[0].addEvent("click",this.toEnd.bind(this));}else{this.options.nav.end.addEvent("click",this.toEnd.bind(this));}}}catch(A){}},getDir:function(A){switch(A){case"total":if(this.options.axis=="y"){return"totalHeight";}return"totalWidth";case"dir":if(this.options.axis=="y"){return"height";}return"width";case"xy":default:if(this.options.axis=="y"){return"y";}return"x";}},getStart:function(A){if(this.options.axis=="y"){return[0,A];}return[A,0];},getStartPx:function(A){if(!A){return 0;}return this.positions[A].start-(this.positions[A].start-this.positions[A-1].end);},setParentSize:function(){var A=(this.options.thumbContainer)?this.element.getElement(this.options.thumbContainer):this.element.getElement(this.options.thumbs).getParent();var B=0;$each(this.thumbs,function(C){B+=C.getComputedSize({styles:["padding","border","margin"]})[this.getDir("total")];},this);A.setStyle(this.getDir("dir"),B);},getRange:function(E){if(isNaN(E)){E=this.element.getScroll()[this.getDir("xy")];}var D=this.element.getComputedSize({styles:["padding"]})[this.getDir("total")];var C=[];for(var A=0;A<this.positions.length;A++){var B=this.withinRange(this.positions[A],E,E+D);if(B){C.push($merge(B,{index:A}));if(B.where=="end"){break;}}}return C;},withinRange:function(C,B,A){if(C.end>B&&C.end<=A){if(C.start>=B){return{type:"full"};}else{return{type:"partial",where:"start",tolerated:((B-C.start)<=this.options.tolerance)};}}else{if(C.start>=B&&C.start<A){return{type:"partial",where:"end",tolerated:((C.start-A)<this.options.tolerance)};}else{if(C.start<B&&C.end>A){return{type:"full"};}}}return false;},toNextScreen:function(){var A=this.getRange();if(A.getLast().type=="partial"&&!A.getLast().tolerated&&A.length>1){this.start.run(this.getStart(this.getStartPx(A.getLast().index)),this);}else{if($(this.thumbs[A.getLast().index+1])){this.start.run(this.getStart(this.getStartPx(A.getLast().index+1)),this);}else{this.toEnd();}}this.lastScroll="next";},toPreviousScreen:function(){var A=this.getRange();var C=(A[0].type=="partial"&&!A[0].tolerated&&A.length>1)?A[0].index:A[0].index-1;if(!this.positions[C]){this.toStart();return ;}var B=this.positions[C].end-this.element.getComputedSize({styles:["padding"]})[this.getDir("total")];var E=this.getRange(B);var D=(E[0].type=="partial"&&E.length>1)?E[0].index+1:E[0].index;this.start.run(this.getStart(this.getStartPx(D)),this);this.lastScroll="previous";},toIndex:function(A){this.start.run(this.getStart(this.getStartPx(parseInt(A))),this);},toStart:function(){if(this.options.axis=="y"){this.toTop();}else{this.toLeft();}},toEnd:function(){if(this.options.axis=="y"){this.toBottom();}else{this.toRight();}}});var VideoScroller=new Class({Extends:ThumbScroller,options:{displayOverlay:false,preRollAd:false,adInterval:0,getAdditionalVids:false,vidWidth:608,vidHeight:342,playerWidth:620,playerHeight:378},initialize:function(B,A){this.parent(B,$merge(this.options,A));this.numPlayed=0;this.playAd=false;this.lastIndex=this.options.startIndex;this.addEvent("onComplete",function(){var C=this.getRange();this.lastIndex=this.currIndex||0;this.currIndex=C.filter(function(D){return D.type=="full";})[0].index;this.setCurrentVideo();}.bind(this));if(this.options.displayOverlay){this.addOverlay(this.thumbs);}$$(this.options.nav.next,this.options.nav.previous).addEvent("click",this.destroyPopup.bind(this));},setNavStyle:function(A){(this.isAtStart(A))?$$(this.options.nav.previous).addClass("inactiveLeft"):$$(this.options.nav.previous).removeClass("inactiveLeft");(this.isAtEnd(A))?$$(this.options.nav.next).addClass("inactiveRight"):$$(this.options.nav.next).removeClass("inactiveRight");},setCurrentVideo:function(){this.thumbs[this.lastIndex].morph({opacity:0.25});this.thumbs[this.currIndex].morph({opacity:1,duration:"long"});},addOverlay:function(A){A.each(function(C,B){if(!C.getElement(".overlay")){new Element("div",{"class":"overlay"}).inject(C.getElement(".videoStill"),"after").addEvent("click",function(){this.displayPlayer(C,B);}.bind(this));new Element("a",{"class":"playBtn"}).inject(C.getElement(".overlay"),"after").addEvent("click",function(){this.displayPlayer(C,B);}.bind(this));}}.bind(this));},writePlayer:function(A){var C=A.get("videoId");try{loadGeckoVideoPlayer({parentElement:A.getElement(".stickyVideo"),flashVars:{contentType:"videoId",contentValue:C,adPreroll:this.playAd,adPostroll:"false",autoplay:"true",playlistType:"none",vidWidth:this.options.vidWidth,vidHeight:this.options.vidHeight,playerWidth:this.options.playerWidth,playerHeight:this.options.playerHeight}},"blogLarge");this.playAd=false;}catch(B){}},displayPlayer:function(C,A){if(this.currIndex==A){this.numPlayed+=1;if(this.numPlayed==1&&this.options.preRollAd==true){this.playAd=true;this.numPlayed=0;this.options.preRollAd=false;}if(this.numPlayed==this.options.adInterval&&this.options.adInterval!=0){this.playAd=true;this.numPlayed=0;}var B=new StickyWin({width:this.options.playerWidth,height:this.options.playerHeight,position:"upperLeft",className:"stickyVideo",relativeTo:C,inject:{target:C},onDisplay:this.writePlayer.delay(10,this,C),useIframeShim:false},this);}else{this.destroyPopup();(this.currIndex<A)?this.toNextScreen():this.toPreviousScreen();}},destroyPopup:function(){if(this.thumbs[this.currIndex].getElement(".stickyVideo")){this.thumbs[this.currIndex].getElement(".stickyVideo").destroy();}if(this.thumbs[this.currIndex].getElement(".iframeShim")){this.thumbs[this.currIndex].getElement(".iframeShim").destroy();}}});var ModalForm=new Class({Implements:Options,options:{modalId:"",popupContents:"default",counterFields:null,resetOnClose:false,clearOnReset:false,useCaptcha:false,onFormSubmitSuccess:"",onFormSubmitFail:"",requireLogin:false,captchaURL:"/8708-5_1-0.html?CAPTCHA=id&nomesh&refresh="},initialize:function(B,A){this.setOptions(A);this.element=$$(B);this.initModalForm();},initModalForm:function(){dbug.log("init modal");this.modalForm=new GlobalModal({id:this.options.modalId,content:$(this.options.popupContents).toggleClass("globalModal"),onClose:function(){if(this.options.resetOnClose){this.resetForm();}}.bind(this)});this.form=$(this.options.modalId).getElement("form");this.modalFormValidator=new ModalFormValidator(this.form,{evaluateFieldsOnBlur:false,evaluateFieldsOnChange:false,evaluateOnSubmit:false});this.form.addEvent("submit",function(A){A.stop();if(!this.modalFormValidator.validate()){return ;}new ModalFormRequest({url:this.form.get("action"),data:this.form.toQueryString(),onSuccess:this.options.onFormSubmitSuccess.bind(this),onFailure:this.options.onFormSubmitFail.bind(this)}).send();}.bind(this));if(this.options.counterFields!=null){this.options.counterFields.field.each(function(B,A){this.fieldCounter(this.form.getElement(B),this.form.getElement(this.options.counterFields.counter[A]));}.bind(this));}$$(this.element).addEvent("click",function(){dbug.log("click");if(this.options.requireLogin){if(!UserVars.isLoggedIn()){CURS.Manager.checkLogin({loginHed:"Log in to CNET to report this profile",registerHed:"Join CNET to report this profile",appId:103,nextAction:function(){new Jlogger({tag:"ropProfile",element:false,ctype:"overlay;source",cval:"login;rop"}).ping();this.showModalForm.bind(this);}.bind(this)});}else{this.showModalForm();}}else{this.showModalForm();}}.bind(this));},showModalForm:function(){if(this.options.useCaptcha){this.getCaptcha();}this.modalForm.show();},resetForm:function(){this.modalFormValidator.reset();this.modalFormValidator.paused=false;this.form.setStyle("display","block");this.form.getParent().getElements(".emailSuccess, .emailFail").dispose();if(this.form.getElement("p span")){this.form.getElement("p span").set("text","0");this.form.getElement("p span").removeClass("validation-advice");}if(this.options.clearOnReset){this.form.reset();}},getCaptcha:function(){new Request({method:"get",url:this.options.captchaURL+new Date().getTime(),onComplete:function(A){if(A){var B=A.trim();$exec(B);var C=new Element("a",{href:"javascript:void(0);","class":"refreshCaptcha",id:"getCaptchaCode"}).set("text","Try a new code");C.addEvent("click",function(){this.getCaptcha();}.bind(this));C.inject($$("#captcha input")[0],"after");$("captcha").getElement("input[name=CAPTCHA_RESPONSE]").addClass("required");}}.bind(this)}).send();},fieldCounter:function(A,C){var B=A.get("validatorProps");if(!B){return ;}B=JSON.decode(B);if(!B&&!B.maxLength){return ;}this.updateCounter(A,B,C);A.addEvent("keyup",function(){this.updateCounter(A,B,C);}.bind(this));},updateCounter:function(B,C,D){var A=B.value.trim().length;D.set("text",A);if((A<(C.minLength||0))||(A>C.maxLength)){D.addClass("validation-advice");}else{D.removeClass("validation-advice");}}});var ModalFormRequest=new Class({Extends:Request,processScripts:function(A){if(this.options.evalResponse){return $exec(A);}return A.stripScripts(this.options.evalScripts);}});var ModalFormValidator=new Class({Extends:FormValidator,makeAdvice:function(D,F,C,G){var E=(G)?this.options.warningPrefix:this.options.errorPrefix;E+=(this.options.useTitles)?F.title||C:C;var B=this.getAdvice(D,F);if(!B){var A=(G)?"warning-advice":"validation-advice";B=new Element("div",{text:E,styles:{display:"none"},id:"advice-"+D+"-"+this.getFieldId(F)}).addClass(A);}else{B.set("text",E);}return B;}});Element.implement({expose:function(){if(this.getStyle("display")!="none"){return $empty;}var B={};var A={visibility:"hidden",display:"block",position:"absolute"};$each(A,function(D,C){B[C]=this.style[C]||"";},this);this.setStyles(A);return(function(){this.setStyles(B);}).bind(this);},getDimensions:function(A){A=$merge({computeSize:false},A);var E={};function D(G,F){return(F.computeSize)?G.getComputedSize(F):G.getSize();}if(this.getStyle("display")=="none"){var B=this.expose();E=D(this,A);B();}else{try{E=D(this,A);}catch(C){}}return $chk(E.x)?$extend(E,{width:E.x,height:E.y}):$extend(E,{x:E.width,y:E.height});},getComputedSize:function(A){A=$merge({styles:["padding","border"],plains:{height:["top","bottom"],width:["left","right"]},mode:"both"},A);var C={width:0,height:0};switch(A.mode){case"vertical":delete C.width;delete A.plains.width;break;case"horizontal":delete C.height;delete A.plains.height;break;}var B=[];$each(A.plains,function(G,F){G.each(function(H){A.styles.each(function(I){B.push((I=="border")?I+"-"+H+"-width":I+"-"+H);});});});var E=this.getStyles.apply(this,B);var D=[];$each(A.plains,function(G,F){C["total"+F.capitalize()]=0;C["computed"+F.capitalize()]=0;G.each(function(H){C["computed"+H.capitalize()]=0;B.each(function(J,I){if(J.test(H)){E[J]=E[J].toInt();if(isNaN(E[J])){E[J]=0;}C["total"+F.capitalize()]=C["total"+F.capitalize()]+E[J];C["computed"+H.capitalize()]=C["computed"+H.capitalize()]+E[J];}if(J.test(H)&&F!=J&&(J.test("border")||J.test("padding"))&&!D.contains(J)){D.push(J);C["computed"+F.capitalize()]=C["computed"+F.capitalize()]-E[J];}});});});if($chk(C.width)){C.width=C.width+this.offsetWidth+C.computedWidth;C.totalWidth=C.width+C.totalWidth;delete C.computedWidth;}if($chk(C.height)){C.height=C.height+this.offsetHeight+C.computedHeight;C.totalHeight=C.height+C.totalHeight;delete C.computedHeight;}return $extend(E,C);}});var StickyWinFx=new Class({Extends:StickyWin,options:{fade:true,fadeDuration:150,draggable:false,dragOptions:{},dragHandleSelector:".dragHandle",resizable:false,resizeOptions:{},resizeHandleSelector:""},setContent:function(A){this.parent(A);if(this.options.draggable){this.makeDraggable();}if(this.options.resizable){this.makeResizable();}return this;},hideWin:function(){if(this.options.fade){this.fade(0);}else{this.parent();}},showWin:function(){if(this.options.fade){this.fade(1);}else{this.parent();}},fade:function(B){if(!this.fadeFx){this.win.setStyles({opacity:0,display:"block"});var A={property:"opacity",duration:this.options.fadeDuration};if(this.options.fadeTransition){A.transition=this.options.fadeTransition;}this.fadeFx=new Fx.Tween(this.win,A);}if(B>0){this.win.setStyle("display","block");this.position();}this.fadeFx.clearChain();this.fadeFx.start(B).chain(function(){if(B==0){this.win.setStyle("display","none");}}.bind(this));return this;},makeDraggable:function(){dbug.log("you must include Drag.js, cannot make draggable");},makeResizable:function(){dbug.log("you must include Drag.js, cannot make resizable");}});var WantItGotItHadIt=new Class({Implements:Options,options:{voteType:"",assetTypeId:"",voteNumElem:"",msgLocation:{position:"bottomLeft",edge:"upperLeft"}},initialize:function(B,A){this.setOptions(A);this.voteElems=$$(B);this.likeWaiter=new Waiter(this.voteElems,{baseHref:"http://i.i.com.com/cnwk.1d/i/News/",layer:{styles:{"z-index":10000000}},img:{src:"commentsLikeLoader.gif",styles:{width:16,height:16}}});this.voteElems.each(function(C){C.addEvent("click",function(D){this.likeWaiter.stop();CURS.Manager.checkLogin({registerHed:"Please tell us who you are",loginHed:"Please tell us who you are",appId:242,cval:"assetrating",nextAction:function(){this.likeWaiter.start(C);this.sendRequest(C);}.bind(this)});}.bind(this));}.bind(this));this.successMsg="";this.currentRateClass="";this.currentRateVal="";},sendRequest:function(C){var A=(C.hasClass("like"))?true:false;var B=(A)?8683:8680;var D=function(){if(A){switch(this.options.voteType){case"gotIt":return 1;break;case"wantIt":return 2;break;case"hadIt":return 3;break;default:return null;break;}}else{return null;}}.bind(this);new Request.JSON({url:"/"+B+"-4_"+PageVars.get("siteId")+"-0.html",data:{assetId:C.getProperty("assetId")||null,assetTypeId:this.options.assetTypeId,viewType:"json",assetVoteId:C.getProperty("assetVoteId")||null,value:D()},onSuccess:function(E){E=E.response;this.likeWaiter.stop();if(E){if(E.status["$"]=="success"){this.toggleBtnStates(A,E,C);if(A){this.showSuccessMsg(C);}this.likeWaiter.stop();}else{switch(E.errors.error["@name"]){case"ALREADY_VOTED":this.showFailureMsg(C,"You have already voted");this.toggleBtnStates(A,E,C);break;case"REMOVE_PROBLEM":this.showFailureMsg(C,"<b>Error: </b>There was a problem removing your vote. Please try again.");break;case"SUBMIT_PROBLEM":this.showFailureMsg(C,"<b>Error: </b>There was a problem submitting your vote. Please try again.");break;case"NOT_OWNER":this.showFailureMsg(C,"<b>Error: </b>You do not have a vote registered for this product.");break;case"REQUEST_PENDING":if(A){this.showSuccessMsg(C);}this.toggleBtnStates(A,E,C);break;case"MISSING_REQUIRED_FIELD":this.showFailureMsg(C,"<b>Error: </b>There was a problem submitting your vote. Please try again.");break;}}}}.bind(this),onFailure:function(){this.likeWaiter.stop();this.showFailureMsg(C,"<b>Error: </b>We're having trouble contacting our servers. Please try again later.");}.bind(this)}).send();},toggleBtnStates:function(D,G,H){var I,A,F,K;var B;var C=H.getProperty("assetId");var E=$$("a.gotIt[assetId="+C+"], a.wantIt[assetId="+C+"], a.hadIt[assetId="+C+"]");E.each(function(L){if(L.hasClass("unlike")){B=L;}});E.removeClass("unlike");E.addClass("like");G.data.datum.each(function(L){if(L["@name"]=="assetId"){K=L["@value"];}if(L["@name"]=="assetTypeId"){I=L["@value"];}if(L["@name"]=="assetVoteId"){A=L["@value"];}if(L["@name"]=="totalVotes"){F=L["@value"];}});if(D){H.removeClass("like");H.addClass("unlike");H.getProperty("class");H.setProperty("assetVoteId",A);if(B){var J=B.getElement(this.options.voteNumElem).get("text").toInt()-1;B.getElement(this.options.voteNumElem).set("text",J);B.removeProperty("assetVoteId");if(B.hasClass("gotIt",H.getProperty("assetId"))){new JloggerLEVT.Social.Disconnect({applicationTags:{eventt:"ungot",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"gwh",wdloc:"gwh"}}).ping();this.pingDW("ungot");}else{if(B.hasClass("wantIt")){new JloggerLEVT.Social.Disconnect({applicationTags:{eventt:"unwant",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"gwh",wdloc:"gwh"}}).ping();this.pingDW("unwant",H.getProperty("assetId"));}else{if(B.hasClass("hadIt")){new JloggerLEVT.Social.Disconnect({applicationTags:{eventt:"unhad",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"gwh",wdloc:"gwh"}}).ping();this.pingDW("unhad",H.getProperty("assetId"));}}}}if(H.getProperty("class").contains("gotIt")){new JloggerLEVT.Social.Connect({applicationTags:{eventt:"gotit",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"gwh",wdloc:"gwh"}}).ping();this.pingDW("gotIt",H.getProperty("assetId"));}else{if(H.getProperty("class").contains("wantIt")){new JloggerLEVT.Social.Connect({applicationTags:{eventt:"wantit",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"gwh",wdloc:"gwh"}}).ping();this.pingDW("wantIt",H.getProperty("assetId"));}else{if(H.getProperty("class").contains("hadIt")){new JloggerLEVT.Social.Connect({applicationTags:{eventt:"hadit",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"gwh",wdloc:"gwh"}}).ping();this.pingDW("hadIt",H.getProperty("assetId"));}}}}else{H.removeClass("unlike");H.addClass("like");H.removeProperty("assetVoteId");if(H.getProperty("class").contains("gotIt")){new JloggerLEVT.Social.Disconnect({applicationTags:{eventt:"ungot",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"gwh",wdloc:"gwh"}}).ping();this.pingDW("ungot",H.getProperty("assetId"));}else{if(H.getProperty("class").contains("wantIt")){new JloggerLEVT.Social.Disconnect({applicationTags:{eventt:"unwant",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"gwh",wdloc:"gwh"}}).ping();this.pingDW("unwant",H.getProperty("assetId"));}else{if(H.getProperty("class").contains("hadIt")){new JloggerLEVT.Social.Disconnect({applicationTags:{eventt:"unhad",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:"cnet",wd:"gwh",wdloc:"gwh"}}).ping();this.pingDW("unhad",H.getProperty("assetId"));}}}}H.getElement(this.options.voteNumElem).set("text",F);},showSuccessMsg:function(C){var B=this;if((PageVars.get("pageType")=="4505")||(PageVars.get("pageType")=="4852")||(PageVars.get("pageType")=="4864")||(PageVars.get("pageType")=="4507")||(PageVars.get("pageType")=="4014")){if(!B.hasUserReview(C).contains("true")&&this.options.voteType!="wantIt"){B.successMsg=new StickyWinFx({content:'<a class="toolTipElement closeSticky">close</a><p class="gwhUOPrompt">Tell us what you think:<a class="userStars userRate medium s0"><span>0 stars</span></a></p>',closeClassName:"closeSticky",relativeTo:C,id:"assetVoteSuccess",className:"voteResponseSuccess",position:this.options.msgLocation.position,edge:this.options.msgLocation.edge,fadeDuration:500,zIndex:1000,onClose:function(){}}).show();$$(".gwhUOPrompt .userStars").addEvents({mouseover:function(){$$(".gwhUOPrompt .userStars").each(function(D){new StarPower(D,{className:"cnetTip",onRate:function(F,E){B.currentRateClass=E;B.currentRateVal=F;$$(".gwhUOPrompt .userStars").each(function(G){if(!G.hasClass(E)){var H=G.get("class").match(/userRate medium s\d+h*/)[0];G.removeClass(H);G.addClass(E);G.store("rating",F);G.store("defaultClass",E);}});}});});},click:function(){B.successMsg.hide();if(!UserVars.get("userName")){A(C);}else{B.getUOmodal(C);}}});}else{if(B.hasUserReview(C).contains("true")&&this.options.voteType!="wantIt"){B.getUOmodal(C);}else{if(this.options.voteType=="wantIt"&&(PageVars.get("pageType")=="4505")&&(!$defined($("seoprice"))||$("seoprice").get("text").replace("$","").toInt()>2)){this.wantItWindowContent(C);}}}}else{if(PageVars.get("pageType")=="5270"&&this.options.voteType=="wantIt"&&(C.getParent().getPrevious(".prodName").get("href").contains("4505")||C.getParent().getPrevious(".prodName").get("href").contains("reviews"))){this.wantItWindowContent(C);}}var A=function(E){var D=this;var F={registerHed:"Join CNET to submit your review",loginHed:"Log in to CNET to submit your review",appId:"74",cval:"userreview",nextAction:function(){D.getUOmodal.delay(500,this,E);}.bind(this)};F.ursForm="fbconnect";CURS.Manager.checkLogin(F);}.bind(this);},wantItWindowContent:function(D){var C='<p class="wantItHeader" style="float: left; margin: 0 0 5px 3px;"><b>Notify me when:</b></p>';var H='<a class="closeSticky">close</a>';var F='<input class="priceAlertCheck" type="checkbox" checked="true" style="margin-top: 3px; margin-bottom: 0; float: left; clear: left;"/><p class="alertPrice" style="float: left; width: 285px;">This product is available for $<input class="priceAlertAmount" style="margin: 0;" type="text" size="3"/>.00</p>';var G='<p class="priceError" style="color: red; font-weight: bold; float: left; clear: left; margin-left: 22px;"></p>';var A='<input class="dealAlertCheck" type="checkbox" checked="true" style="margin-top: 6px; float: left; clear: left;"/><p style="float: left; margin-top: 5px; width: 280px;">Deals are available for this product</p>';var B='<a class="flexButton alertSubmit" style="float: left; clear: left; margin: 3px 0 0 110px">Sign Up</a>';var I='<div class="confirmPrice" style="display: none;"><p class="wantItHeader" style="float: left; margin: 0 0 5px 3px;"><b>Are you sure?</b></p><p style="float: left; clear: left;">That\'s more than 50% below the current lowest price. It isn\'t likely that you will get alerted.</p><a class="flexButton alertConfirm" style="float: left; clear: left; margin-top: 10px;">Yes, I\'m sure</a><a class="flexButton goBack" style="float: right; margin-top: 10px;">Go back</a></div>';var E='<div class="successConfirm" style="display: none;"><p class="wantItHeader" style="float: left; margin: 0 0 5px 0;"><b>Successfully subscribed</b></p><p class="successMsg" style="float: left; clear: left;">Your price alert has been set for this product.<br/></p><a class="seeMore" href="/8714-4_1-0.html" style="float: left; clear: left;">Manage my alerts >></a></div>';if(PageVars.get("pageType")=="5270"){return H+C+'<div class="alertsSignUpWrap" style="float: left;">'+A+B+"</div>"+E;}else{if(!$defined($("seoprice"))){F='<input class="priceAlertCheck" type="checkbox" checked="true" style="margin-top: 2px; margin-bottom: 0; float: left; clear: left;"/><p style="float: left;">A price becomes available for this product</p>';E='<div class="successConfirm" style="display: none;"><p class="wantItHeader" style="float: left; margin: 0 0 5px 0;"><b>Successfully subscribed</b></p><p class="successMsg" style="float: left; clear: left;">An alert will be sent when pricing is available for this product.<br/></p><a class="seeMore" href="/8714-4_1-0.html" style="float: left; clear: left;">Manage my alerts >></a></div>';A='<input class="dealAlertCheck" type="checkbox" checked="true" style="margin-top: 12px; float: left; clear: left;"/><p style="float: left; margin-top: 10px;">Deals are available for this product</p>';B='<a class="flexButton alertSubmit" style="clear: left; margin: 3px 0 0 118px">Sign Up</a>';}else{F='<p class="curLowPrice" style="float: left; clear: left; margin: 0 0 3px 3px; font-style: italic; font-size: 12px;">(Current lowest price: '+$("seoprice").get("text")+")</p>"+F;}}this.wantItWindow(D,(H+C+'<div class="alertsSignUpWrap" style="float: left;">'+F+G+A+B+"</div>"+I+E));},submitAlerts:function(B,D){var C="&alertItemType=2&alertItemId="+D.get("assetid");var A="";if(PageVars.get("pageType")!="5270"&&B.getElement(".priceAlertCheck").checked){if($defined(B.getElement(".priceAlertAmount"))){C=C+"&targetPrice="+B.getElement(".priceAlertAmount").get("value").replace(/^0+/,"")+"&eventType=12&actionType=1";}else{C=C+"&eventType=11&actionType=1";}}else{C="";}if(B.getElement(".dealAlertCheck").checked){if(C==""){C="&alertItemType=2&alertItemId="+D.get("assetid")+"&targetPrice=0&eventType=12&actionType=2";B.getElement(".successMsg").set("text","An alert will be sent when deals are available for this product.");}A="&alertItemType2=2&alertItemId2="+D.get("assetid")+"&eventType2=10&actionType2=1";}else{A="&alertItemType2=2&alertItemId2="+D.get("assetid")+"&eventType2=10&actionType2=2";}new Request({url:"http://"+document.location.host+"/8630-"+PageVars.get("nodeId")+"_"+PageVars.get("siteId")+"-0.html",data:"nomesh"+C+A,onSuccess:function(E){dbug.log("Successfully signed up for deal");B.setStyle("width","auto");B.getElement(".confirmPrice").hide();B.getElement(".alertsSignUpWrap").hide();B.getElement(".wantItHeader").hide();B.getElement(".successConfirm").show("block");new JloggerLEVT("deal",{tag:"LEVT_deal",applicationTags:{event:"dealsignup",eventt:"signup",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,turl:"",tname:"",ssite:"cnet",wd:"gwh",wdloc:"gwh"}}).ping();},onFailure:function(E){dbug.log("Failed to sign up for deal");}}).send();},verifyAlertPrice:function(B){var A=$("seoprice").get("text").replace("$","").replace(",","");if(A.contains(".00")){A=A.toInt();}else{A=A.toInt()+1;}dbug.log(A);if(B==""||B==null){return"Price cannot be blank";}else{if(!/^[0-9]+$/.test(B)){return"Please enter only numbers (0-9)";}else{if(A<=B){return"Price can't be higher than starting price";}else{if((A/2)>B){return"Price is very low";}}}}return"";},wantItWindow:function(C,B){var A=this;A.successMsg=new StickyWinFx({content:B,closeClassName:"closeSticky",relativeTo:C,id:"assetVoteSuccess",className:"voteResponseSuccess",position:this.options.msgLocation.position,edge:this.options.msgLocation.edge,fadeDuration:500,zIndex:10000000}).show();$("assetVoteSuccess").set("styles",{width:"305px","-webkit-box-shadow":"0px 0px 3px rgba(0,0,0,.25)","-moz-box-shadow":"0px 0px 3px rgba(0,0,0,.25)","box-shadow":"0px 0px 3px rgba(0,0,0,.25)",border:"solid 1px black"});if($defined($("seoprice"))){$("assetVoteSuccess").getElement("p").set("styles",{width:"200px","float":"left"});}else{$("assetVoteSuccess").setStyle("width","320px");}$("assetVoteSuccess").getElement(".alertSubmit").addEvent("click",function(D){var E="";if(PageVars.get("pageType")!="5270"&&$("assetVoteSuccess").getElements(".priceAlertCheck")[0].checked&&$defined($("assetVoteSuccess").getElements(".priceAlertAmount")[0])){E=this.verifyAlertPrice($("assetVoteSuccess").getElements(".priceAlertAmount")[0].get("value"));}if(!$("assetVoteSuccess").getElements(".priceAlertCheck")[0].checked&&!$("assetVoteSuccess").getElements(".dealAlertCheck")[0].checked){E="To sign up, you must select an alert";}if(E===""){this.loginCheck(C);}else{if(E==="Price is very low"){$("assetVoteSuccess").getElement(".alertsSignUpWrap").hide();$("assetVoteSuccess").getElement(".wantItHeader").hide();$("assetVoteSuccess").getElement(".confirmPrice").show("block");$("assetVoteSuccess").getElement(".alertConfirm").addEvent("click",function(F){this.loginCheck(C);}.bind(this));$("assetVoteSuccess").getElement(".goBack").addEvent("click",function(F){$("assetVoteSuccess").getElement(".confirmPrice").hide();$("assetVoteSuccess").setStyle("width","320px");$("assetVoteSuccess").getElement(".alertsSignUpWrap").show("block");$("assetVoteSuccess").getElement(".wantItHeader").show("block");}.bind(this));}else{$("assetVoteSuccess").getElements(".priceError")[0].set("text",E);}}}.bind(this));},loginCheck:function(A){CURS.Manager.checkLogin({registerHed:"Please tell us who you are",loginHed:"Please tell us who you are",appId:305,cval:"assetrating",nextAction:function(){this.submitAlerts($("assetVoteSuccess"),A);}.bind(this)});},hasUserReview:function(B){var A=new Request({url:"/8654-"+PageVars.get("nodeId")+"_"+PageVars.get("siteId")+"-"+PageVars.get("assetId")+".html?nomesh",async:false,data:{assetId:B.getProperty("assetId"),techProdReview:(this.options.assetTypeId=="2")?true:null}}).send().response;return A.text;},getUOmodal:function(B){var A=this;new Request({url:"/8654-"+PageVars.get("nodeId")+"_"+PageVars.get("siteId")+"-"+PageVars.get("assetId")+".html?nomesh",data:{showForm:true,assetId:B.getProperty("assetId"),techProdReview:(this.options.assetTypeId=="2")?true:null},onSuccess:function(C){A.displayUOmodal(C);}}).send();},displayUOmodal:function(B){var A=this;new GlobalModal({content:B,onInit:function(){},onDisplay:function(){if(A.successMsg){A.successMsg.hide();}$lazy(window.uoFormsModal,"http://i.i.com.com/cnwk.1d/html/rb/js/tron/ugc/ugc.tron.uoFormModal.compressed.js",function(){uoFormsModal.initSubmitForm({ctype:"evnt;elem;orig",cval:"click;A;gwh"});});if($$(".userReview .starsvalidation")){$$(".userReview .starsvalidation").set("value",A.currentRateVal*2);$$(".globalModal.userReview .userStars").each(function(C){if(!C.hasClass(A.currentRateClass)){var D=C.get("class").match(/userRate medium s\d+h*/)[0];C.removeClass(D);C.addClass(A.currentRateClass);C.store("rating",A.currentRateVal);C.store("defaultClass",A.currentRateClass);}});}},onClose:function(){this.destroy();}}).show();},showFailureMsg:function(B,A){var C=new StickyWinFx({content:A,relativeTo:B,id:"assetVoteFail",className:"voteResponseFail",position:this.options.msgLocation.position,edge:this.options.msgLocation.edge,fadeDuration:500,zIndex:10000000}).show();this.likeWaiter.stop();C.hide.delay(4000,C);C.destroy.delay(5000,C);},pingDW:function(A,B){new Jlogger({tag:A,ctype:"pid",cval:B}).ping();}});window.addEvent("domready",function(){var E=$$("#socialFollow a");if(E){E.addEvent("click",function(H){H.stop();var I=$(H.target);var G=I.get("href");if(I.hasClass("twitterFollow")){var J="click;a;twitterFollow";}else{var J="click;a;undefined";}new Jlogger({tag:"socialFollow",ctype:"evt;elem;dest",cval:J,onPing:function(){window.open(G);}}).ping();});}if($("scrollNav")){var B=new VideoScroller("thumbContainer",{nav:{next:"#scrollNav .next",previous:"#scrollNav .previous"},offset:{x:0},displayOverlay:true,moreVideos:{getThem:true},preRollAd:true,adInterval:3,vidWidth:606,vidHeight:341,playerWidth:606,playerHeight:390});}if($("editorList")){var D=$("editorList").getStyle("height").toInt();var C=($("editorList").getLast("ul").getSize().y>$("editorList").getFirst("ul").getSize().y)?$("editorList").getLast("ul").getSize():$("editorList").getFirst("ul").getSize();$("editorList").set("tween",{onComplete:function(){$("showHideList").toggleClass("expanded");$("footerGlobal").setStyle("position","static");$("footerGlobal").setStyle("position","relative");$$("#footerGlobal .copyrightWrap").setStyle("position","static");$$("#footerGlobal .copyrightWrap").setStyle("position","absolute");$("adMiniPremiere").setStyle("position","static");$("adMiniPremiere").setStyle("position","relative");}});$("showHideList").addEvent("click",function(){if(this.hasClass("expanded")){$("editorList").tween("height",[C.y+55,D]);}else{$("editorList").tween("height",[D,C.y+55]);}});}if($("emailEditorForm")){new ModalForm(".linkIcon.email",{reauthenticate:false,counterFields:{field:["input[name=subject]","textarea[name=body]"],counter:[".subjectCount",".bodyCount"]},popupContents:$("emailEditorForm"),modalId:"emailEditor",resetOnClose:true,clearOnReset:true,useCaptcha:true,onFormSubmitSuccess:function(H){if(H){var J=JSON.decode(H).response;if(J.result["$"]=="failure"){if($$(".emailFail").length>0){var I=$$(".emailFail")[0];}else{var I=new Element("div",{"class":"validation-advice emailFail"});}I.set("html","<b>Error: </b>"+J.message["$"]);if(J.message["$"]=="You did not successfully enter the characters in the verification box."){I.inject($("captcha"),"before");}else{I.inject($("emailEditor").getElement("form"),"before");}this.getCaptcha();}else{if(J.result["$"]=="success"){var G=new Element("div",{"class":"emailSuccess"}).set("html","Thank you. "+J.message["$"]);G.inject($("emailEditor").getElement("form"),"before");if($$(".emailFail").length>0){$$(".emailFail").dispose();}$("emailEditor").getElements("form, p").setStyle("display","none");this.modalForm.hide.delay(4000,this.modalForm);}}}},onFormSubmitFail:function(){dbug.log("form not sent");}});}else{$$(".linkIcon.email").setStyle("display","none");}if($("bioForm")){new ModalForm(".editBio",{resetOnClose:true,counterFields:{field:["textarea[name=biography]","textarea[name=otherInterests]","textarea[name=techInterests]"],counter:[".shortBioCount",".interestsCount",".techInterestsCount"]},popupContents:$("bioForm"),modalId:"editBioModal",onFormSubmitSuccess:function(H){var G=new Element("div",{"class":"emailSuccess"}).set("html","Your information was updated successfully");G.inject($("bioForm").getElement("form"),"before");if($$(".emailFail").length>0){$$(".emailFail").dispose();}$("bioForm").getElement("form").setStyle("display","none");$$(".profileInfo .shortBio span").set("text",$("bioForm").getElement("form").getElement("textarea[name=biography]").get("value"));$$(".profileInfo .interests span").set("text",$("bioForm").getElement("form").getElement("textarea[name=otherInterests]").get("value"));$$(".profileInfo .techInterests span").set("text",$("bioForm").getElement("form").getElement("textarea[name=techInterests]").get("value"));$$(".profileInfo .opSys span").set("text",$("bioForm").getElement("form").getElement("input[name=operatingSystem]").get("value"));$$(".profileInfo .machine span").set("text",$("bioForm").getElement("form").getElement("input[name=computerConfiguration]").get("value"));$$(".profileInfo .homePage span").set("text",$("bioForm").getElement("form").getElement("input[name=homePage]").get("value"));switch($("bioForm").getElement("form").getElement("select[name=computerProficiency]").get("value")){case"-1":$$(".profileInfo .techExpertise span").set("text","");break;case"0":$$(".profileInfo .techExpertise span").set("text","Beginner");break;case"1":$$(".profileInfo .techExpertise span").set("text","Novice");break;case"2":$$(".profileInfo .techExpertise span").set("text","Intermediate");break;case"3":$$(".profileInfo .techExpertise span").set("text","Advanced");break;case"4":$$(".profileInfo .techExpertise span").set("text","Guru");break;}$$(".profileInfo .shortBio, .profileInfo .interests, .profileInfo .techInterests, .profileInfo .techExpertise, .profileInfo .opSys, .profileInfo .machine, .profileInfo .homePage").each(function(I){(I.getElement("span").get("text")!="")?I.removeClass("empty"):I.addClass("empty");});new Jlogger({tag:"editbio"}).ping();this.modalForm.hide.delay(4000,this.modalForm);},onFormSubmitFail:function(){if($$(".emailFail").length>0){var G=$$(".emailFail")[0];}else{var G=new Element("div",{"class":"validation-advice emailFail"});}G.set("html","Your form failed to submit.  Please try again.");G.inject($("bioForm").getElement("form"),"before");}});}else{$$(".editBio").setStyle("display","none");}if($("accountForm")){var F=new ModalForm(".editAccount",{resetOnClose:true,popupContents:$("accountForm"),modalId:"editAccountModal",onFormSubmitSuccess:function(H){if(H.match("Unauthorized. Only authenticated or internal users may make this request.")!=null){CURS.Manager.nextAction=function(){new ModalFormRequest({url:$("accountForm").getElement("form").get("action"),data:$("accountForm").getElement("form").toQueryString(),onSuccess:function(){var I=new Element("div",{"class":"emailSuccess"}).set("html","Your information was updated successfully");I.inject($("accountForm").getElement("form"),"before");if($$(".emailFail").length>0){$$(".emailFail").dispose();}$("accountForm").getElement("form").setStyle("display","none");$$(".editorInfoTemp .occupation, .profileInfo .occupation").set("text",$("accountForm").getElement("form").getElement("input[name=jobTitle]").get("value"));$$(".editorInfoTemp .firstName").set("text",$("accountForm").getElement("form").getElement("input[name=firstName]").get("value"));$$(".editorInfoTemp .lastName").set("text",$("accountForm").getElement("form").getElement("input[name=lastName]").get("value"));$$(".editorInfoTemp .city").set("text",$("accountForm").getElement("form").getElement("input[name=city]").get("value"));$$(".editorInfoTemp .state").set("text",$("accountForm").getElement("form").getElement("input[name=state]").get("value"));this.modalForm.hide.delay(4000,this.modalForm);}.bind(this)}).send();}.bind(this);CURS.Manager.getLogin({ursForm:"reauthenticate"});}else{var G=new Element("div",{"class":"emailSuccess"}).set("html","Your information was updated successfully");G.inject($("accountForm").getElement("form"),"before");if($$(".emailFail").length>0){$$(".emailFail").dispose();}$("accountForm").getElement("form").setStyle("display","none");$$(".editorInfoTemp .occupation, .profileInfo .occupation").set("text",$("accountForm").getElement("form").getElement("input[name=jobTitle]").get("value"));$$(".editorInfoTemp .firstName").set("text",$("accountForm").getElement("form").getElement("input[name=firstName]").get("value"));$$(".editorInfoTemp .lastName").set("text",$("accountForm").getElement("form").getElement("input[name=lastName]").get("value"));$$(".editorInfoTemp .city").set("text",$("accountForm").getElement("form").getElement("input[name=city]").get("value"));$$(".editorInfoTemp .state").set("text",$("accountForm").getElement("form").getElement("input[name=state]").get("value"));this.modalForm.hide.delay(4000,this.modalForm);}},onFormSubmitFail:function(){if($$(".emailFail").length>0){var G=$$(".emailFail")[0];}else{var G=new Element("div",{"class":"validation-advice emailFail"});}G.set("html","Your form failed to submit.  Please try again.");G.inject($("accountForm").getElement("form"),"before");}});}else{$$(".editAccount").setStyle("display","none");}if($("offensiveForm")){new ModalForm(".reportOffensive",{counterFields:{field:["textarea[name=body]"],counter:[".bodyCount"]},resetOnClose:true,popupContents:$("offensiveForm"),modalId:"reportOffensiveModal",requireLogin:true,onFormSubmitSuccess:function(H){dbug.log(H);new Jlogger({tag:"ropProfile"}).ping();var G=new Element("div",{"class":"emailSuccess"}).set("html","Your report was submitted successfully");G.inject($("offensiveForm").getElement("form"),"before");$("offensiveForm").getElement("form").setStyle("display","none");if($$(".emailFail").length>0){$$(".emailFail").dispose();}$("offensiveForm").getElement("textarea").set("value","");this.modalForm.hide.delay(4000,this.modalForm);},onFormSubmitFail:function(){if($$(".emailFail").length>0){var G=$$(".emailFail")[0];}else{var G=new Element("div",{"class":"validation-advice emailFail"});}G.set("html","Your report failed to submit.  Please try again.");G.inject($("offensiveForm").getElement("form"),"before");}});}else{$$(".reportOffensive").setStyle("display","none");}if(!UserVars.get("loggedIn")&&UserVars.get("rememberMe")!="1"){$$("ul.loggedOut a").addEvent("click",function(){CURS.Manager.nextAction=function(){window.location=PageVars.getRefreshPath();};});}new WantItGotItHadIt($$("a.gotIt"),{assetTypeId:2,voteNumElem:"b",voteType:"gotIt",msgLocation:{position:"bottom",edge:"top"}});new WantItGotItHadIt($$("a.wantIt"),{assetTypeId:2,voteNumElem:"b",voteType:"wantIt",msgLocation:{position:"bottomLeft",edge:"upperLeft"}});new WantItGotItHadIt($$("a.hadIt"),{assetTypeId:2,voteNumElem:"b",voteType:"hadIt",msgLocation:{position:"bottomRight",edge:"upperRight"}});var A=new gwhModal();$$(".myProducts .seeAll").addEvent("click",function(H){H.stop();var G=new Link(H.target.get("href")).mergeQueryString("nomesh");G.setQuery("username",G.getQuery("username").replace("%20","+"));dbug.log(G.getQuery("username"));A.clickTarget=H.target;A.showModal(G.get("href"),H.target.get("requestType"));});});var gwhModal=new Class({Implements:Options,options:{},initialize:function(A){this.setOptions(A);this.gwhModal=$empty();this.clickTarget=$empty();},showModal:function(C,A){if(this.activeTabClass){var B=this.activeTabClass;}this.setActiveTabClass(A);if(!this.gwhModal){this.createModal(C);return ;}this.gwhModal.show();if(B&&(B!=this.activeTabClass)){this.waiter.start(this.myProducts);this.gwhListRequest(C,this.changeModalTab.bind(this));}},createModal:function(A){this.gwhListRequest(A,this.setInitialModalContent.bind(this));},updateModalContent:function(A){if(A&&A.contains("<!-- Success -->")){this.setListHeight();var B=new Element("div").set("html",A);B.getElements("li.gwhItem").removeClass("first");B.getElements("li.gwhItem").addClass("new");B.getElements("li.gwhItem").inject($("gwhModal").getElement(".myProducts ul li.seeMore"),"before");if(this.myProducts.getElement("ul").get("numFound").toInt()==this.myProducts.getElements("li.gwhItem").length){this.myProducts.getElement("li.seeMore").setStyle("display","none");}this.applyAssetVoting(this.myProducts.getElements("li.gwhItem.new"));this.myProducts.getElements("li.gwhItem").removeClass("new");this.waiter.stop();}else{this.waiter.stop();this.modalFailMsg.show();this.modalFailMsg.hide.delay(4000,this.modalFailMsg);}},changeModalTab:function(A){this.gwhModal.win.getElements(".modalTabs li").removeClass("active");dbug.log(this.activeTabClass);this.gwhModal.win.getElement(".modalTabs ."+this.activeTabClass).addClass("active");if(A){if(A.contains("<!-- Success -->")){this.resetListHeight();this.myProducts.empty();var B=new Element("div").set("html",A);B.getElement("ul").inject(this.myProducts);this.applyAssetVoting(this.myProducts.getElements("li.gwhItem"));if(this.gwhModal.win.getElement(".seeMore a")){this.gwhModal.win.getElement(".seeMore a").addEvent("click",function(C){C.stop();this.waiter.start(C.target);this.getMoreProducts(C.target.get("href"));}.bind(this));}}else{this.myProducts.empty();var B=new Element("div").set("html",A);B.inject(this.myProducts);}this.waiter.stop();}else{this.waiter.stop();this.myProducts.empty();new Element("p",{text:"There was a problem retrieving this data, please try again"}).inject(this.myProducts);}},setInitialModalContent:function(B){if(B&&B.contains("<!-- Success -->")){var D=new Element("div").set("html",B);D.getChildren().inject($("gwhModal"));var A=this;this.gwhModal=new GlobalModal({layerId:"gwhModalOverlay",content:$("gwhModal"),onInit:function(){A.myProducts=this.win.getElement(".myProducts");A.waiter=new Waiter(this.win.getElement(".seeMore a"),{layer:{styles:{"z-index":10000000}}});if(this.win.getElement(".seeMore a")){A.modalFailMsg=new StickyWinFx({content:"There was a problem submitting your request. Please try again.",relativeTo:this.win.getElement(".seeMore a"),id:"gwhModalFail",className:"voteResponseFail",position:"center",edge:"center",fadeDuration:500,zIndex:10000000,showNow:false});this.win.getElement(".seeMore a").addEvent("click",function(E){E.stop();A.waiter.start(E.target);A.getMoreProducts(E.target.get("href"));}.bind(this));}this.win.getElements(".modalTabs li a").each(function(E){E.addEvent("click",function(F){F.stop();A.waiter.start(A.myProducts);A.setActiveTabClass(E.getParent("li").get("class").replace("active",""));A.gwhListRequest(E.get("href"),A.changeModalTab.bind(A));});});},onDisplay:function(){A.applyAssetVoting(A.myProducts.getElements("li.gwhItem"));this.win.getElement(".modalTabs "+A.activeTabClass).addClass("active");}}).show();}else{var C=new StickyWinFx({content:"There was a problem submitting your request. Please try again.",relativeTo:this.clickTarget,id:"gwhModalFail",className:"voteResponseFail",position:"bottomRight",edge:"topright",fadeDuration:500}).show();C.hide.delay(4000,C);C.destroy.delay(5000,C);}},gwhListRequest:function(A,B){A=new Link(A);new Request({url:A.get("href"),onSuccess:B}).send();},getMoreProducts:function(A){A=new Link(A);A.mergeQueryString({start:this.getStartNum(),nomesh:true});this.gwhListRequest(A.get("href"),this.updateModalContent.bind(this));},getStartNum:function(){return this.gwhModal.win.getElements("li.gwhItem").length;},setListHeight:function(){var B=this.myProducts.getElement("ul");var A=B.getComputedSize().totalHeight;B.setStyles({height:A,"overflow-y":"auto"});},resetListHeight:function(){this.myProducts.setStyles({height:"auto","overflow-y":"visible"});},applyAssetVoting:function(A){new WantItGotItHadIt(A.getElements("a.gotIt"),{assetTypeId:2,voteNumElem:"b",voteType:"gotIt",msgLocation:{position:"center",edge:"bottom"}});new WantItGotItHadIt(A.getElements("a.wantIt"),{assetTypeId:2,voteNumElem:"b",voteType:"wantIt",msgLocation:{position:"bottomLeft",edge:"upperLeft"}});new WantItGotItHadIt(A.getElements("a.hadIt"),{assetTypeId:2,voteNumElem:"b",voteType:"hadIt",msgLocation:{position:"bottomRight",edge:"upperRight"}});},setActiveTabClass:function(A){this.activeTabClass="."+A;}});
   }
       
