
   if(!dbugScripts("commerce",["commerce.tron.catdoor.js"])) {
   /*	commerce.tron.catdoor.js - packed	*/
       var StickyWinModal,StickyWinFxModal;(function(){var A=function(C){return{Extends:C,initialize:function(D){D=D||{};this.setModalOptions($merge(D.modalOptions||{},{onModalHide:function(){this.hide(false);}.bind(this)}));this.parent(D);},show:function(D){if($pick(D,true)){this.modalShow();this.win.getElements(this.modalOptions.elementsToHide).setStyle("opacity",1);}this.parent();},hide:function(D){if($pick(D,true)){this.modalHide();}this.parent($pick(D,true));}};};StickyWinModal=new Class(A(StickyWin));StickyWinModal.implement(new Modalizer);StickyWinFxModal=(typeof StickyWinFx!="undefined")?new Class(A(StickyWinFx)):$empty;try{StickyWinFxModal.implement(new Modalizer());}catch(B){}})();if(window.PageVars&&!PageVars.get("loadTime")){PageVars.set("loadTime",$time());}var FrontDoorRiver=new Class({Implements:[Options,Events],options:{pageType:8330,list$:"pe-socialMediaMain",getMore$:"ajaxMorePostings",refresh$:"refreshBar",storage$:"newContent",recentTab$:"recentTab",popularTab$:"popularTab",activity:"cnetRiverUpdater",period:30000,params:{nomesh:true,noluke:true,activityname:"cnetRiverUpdater"},filterTagSelector:".filterTag",fetchType:"recent",ugcSavedListName:"My Saved Articles",moreTrackingType:"redir"},initialize:function(B,A){this.element=$(B);this.setOptions(A);this.monitor=CBSi.monitor||false;this.setRequestors();this.setElems();this.initTabs();this.initButtons("recent");this.initEntries();this.initFilters();this.setTimestampUpdates(this.elems.list.getProperty("timestamp"));this.recentCheck=this.fetchData.scheduled(this.options.period,this,{args:"update",startNow:false,decay:0.5});if(typeof (SocialBar)=="function"&&typeof (SocialBar.prototype)=="object"){new SocialBar($("pe-socialMediaMain"),{listName:this.options.ugcSavedListName});}},setElems:function(){var A=this.options;this.elems={list:$(A.list$),storage:$(A.storage$)};this.buttons={getMore:$(A.getMore$),refresh:$(A.refresh$)};if(Browser.Engine.trident){this.buttons.refresh.set("reveal",{onComplete:this.elems.list.toggleClass.bind(this.elems.list,"ieredraw")});}this.tabs={getRecent:$(A.recentTab$),getPopular:$(A.popularTab$)};if(this.tabs.getRecent){this.tabs.container=this.tabs.getRecent.getParent("ul");}},initTabs:function(){if(this.tabs.getRecent){this.tabs.getRecent.addEvent("click",function(A){A.stop();if(!this.tabs.getRecent.hasClass("active")){new Jlogger({cval:"cnetRiver;latestSort",ctype:"testevent;click"}).ping();this.resetRiver("recent");this.options.fetchType="recent";}}.bind(this));}if(this.tabs.getPopular){this.tabs.getPopular.addEvent("click",function(A){A.stop();if(!this.tabs.getPopular.hasClass("active")){new Jlogger({cval:"cnetRiver;trendSort",ctype:"testevent;click"}).ping();this.resetRiver("popular");this.options.fetchType="popular";}}.bind(this));}},setRequestors:function(){this.updater=new Request({url:PageVars.getPath({pageType:this.options.pageType}),method:"get",onSuccess:this.updateRecentPostings.bind(this)});this.updater.riverType="update";this.requestor=new Request({url:PageVars.getPath({pageType:this.options.pageType}),method:"get",onRequest:function(){if(!["update","more"].contains(this.requestor.riverType)){this.elems.list.tween("opacity",0.5);try{new Element("li",{"class":"loading"}).inject(this.tabs.container);}catch(A){}}else{if(this.requestor.riverType=="more"){this.buttons.getMore.getElement(".viewMore").addClass("loading");}}}.bind(this),onComplete:function(){var B;if(!["update","more"].contains(this.requestor.riverType)){try{B=this.tabs.container.getElement(".loading");if(B){B.destroy();}}catch(A){}this.elems.list.tween("opacity",1);}else{if(this.requestor.riverType=="more"){B=this.buttons.getMore.getElement(".loading");if(B){B.removeClass("loading");}}}}.bind(this),onSuccess:this.parseEntries.bind(this),autoCancel:true});},fetchData:function(B){var A=(B=="update")?this.updater:this.requestor;A.riverType=B;A.send({data:this.getParams(B)});},getParams:function(B){var D={};if($E("#cnetRiver.mpRiver")){var C="";$$("#riverFilter .filters table input[type=checkbox]").each(function(F){if(F.checked){C+=F.get("value")+",";}});if(C.charAt(C.length-1)==","){C=C.slice(0,-1);}var A=$E("#sortSelect").getSelected()[0].getProperty("value");}switch(B){case"update":if($E("#cnetRiver.mpRiver")&&$E("#sortSelect").getSelected()[0].getProperty("value")=="popularity"){break;}else{D=$merge(D,{begin:this.getDateLandmark(this.elems.list.getElement(".riverPost").getProperty("date"))});}break;case"more":if($E("#cnetRiver.mpRiver")){marketplaceRiverPage=26;if($E("#sortSelect").getSelected()[0].getProperty("value")=="popularity"){dbug.log("more:marketplace:popularity");var E=$$("#pe-socialMediaMain>li").length;if(!E){E=0;}D=$merge(D,{start:E,categories:C,orderBy:A,style:"mf"});}else{dbug.log("more:marketplace:date");D=$merge(D,{limit:marketplaceRiverPage,categories:C,orderBy:A,end:this.getDateLandmark(this.elems.list.getElements(".riverPost").getLast().getProperty("date"),"previous"),style:"mf"});}}else{dbug.log("more:date");D=$merge(D,{end:this.getDateLandmark(this.elems.list.getElements(".riverPost").getLast().getProperty("date"),"previous")});}break;case"popular":D=$merge(D,{queryType:"juciCombinedSearch",orderBy:"socialScore~desc",minSocialScore:1,limit:100});case"recent":D=$merge(D,{uniqueId:this.getRoundedUpdateId(2)});}if(this.options.keywordFilter&&this.options.keywordFilter!=""){D=$merge(D,{keywords:'"'+this.options.keywordFilter+'"'});}return $merge(this.options.params,D);},getRoundedUpdateId:function(A){var B=Math.floor($time()/10000);return Math.floor(B-B%((A||1)*6));},getDateLandmark:function(C,B){var A=this.getDateFromTimestamp(C),D=1000*((B=="previous")?-1:1);A.setTime(A.getTime()+D);return this.getTimestampFromDate(A);},parseEntries:function(C,A){var B=this.getDataFromResponse(A);switch(this.requestor.riverType){case"recent":this.loadRecentPostings(B);break;case"popular":this.loadPopular(B);break;case"more":this.updateMorePostings(B);break;}if(typeof (SocialBar)=="function"&&typeof (SocialBar.prototype)=="object"){new SocialBar($("pe-socialMediaMain"),{listName:this.options.ugcSavedListName});}},getDataFromResponse:function(B){var E={},A=B.getElementsByTagName("pageElement"),D=0,C,F;for(D;D<A.length;D++){C=A[D].getElementsByTagName("name")[0].firstChild.nodeValue;F=A[D].getElementsByTagName("html")[0].firstChild.nodeValue;switch(C){case".socialMediaMain":E.html=new Element("div",{html:F}).getChildren();break;case".riverCounter":E.count=F.toInt();break;case".timestamp":E.timestamp=F;break;default:E[C]=F;}}return E;},loadPopular:function(A){this.elems.list.empty().addClass("trendingList");A.html.each(function(C,B){if(B>=25){C.addClass("hidden").setStyle("display","none");}C.inject(this.elems.list);},this);this.initEntries();},loadRecentPostings:function(A){this.elems.list.empty().removeClass("trendingList");A.html.each(this.elems.list.adopt.bind(this.elems.list));this.initEntries();},updateRecentPostings:function(D,A){var C=this.getDataFromResponse(A),B;if(C.count!=this.lastCount){if(C.html.length){this.elems.storage.empty();C.html.each(this.elems.storage.adopt.bind(this.elems.storage));B=this.buttons.refresh.get("html");if(C.count==1){B=B.replace("are","is").replace("posts.","post.").replace("postings.","post.");}else{B=B.replace("is","are").replace(/postings*\./,"posts.").replace("post.","posts.");}this.buttons.refresh.set("html",B);this.buttons.refresh.getElement("span").set("text",C.count);this.buttons.refresh.reveal();}this.lastCount=C.count;if(typeof (SocialBar)=="function"&&typeof (SocialBar.prototype)=="object"){new SocialBar($("pe-socialMediaMain"),{listName:this.options.ugcSavedListName});}}},updateMorePostings:function(B){dbug.log("update more postings");var A=new Element("ul",{styles:{display:"none"}}).inject(this.element);B.html.each(A.adopt.bind(A));if(!$E("#cnetRiver.mpRiver")){if(Browser.Engine.trident){B.html[0].set("tween",{onComplete:this.elems.list.toggleClass.bind(this.elems.list,"ieredraw")});}}this.initEntries(A);B.html.each(function(C){C.setStyle("opacity",0).inject(this.elems.list).tween("opacity",1);},this);A.destroy();},refreshRecentPostings:function(){var A=$A(this.elems.storage.getChildren()),B;this.initEntries(this.elems.storage);this.buttons.refresh.dissolve();this.lastCount=0;while(B=A.pop()){B.setStyle("opacity",0).inject(this.elems.list,"top").tween("opacity",1);}if($(this.options.list$).getElement("li.riverSponsor")){this.positionRiverAd($(this.options.list$).getElement("li.riverSponsor"));}new Jlogger({cval:"cnetRiver;refresh",ctype:"testevent;click"}).ping();},initEntries:function(A){A=A||this.elems.list;this.initVideos(A);A.getElements(".assetThumb img").each(function(B){if(!B.getProperty("src")){B.getParent(".assetThumb").dispose();}});A.getElements(".assetRatings a").removeProperty("href");},positionRiverAd:function(A){A.inject($(this.options.list$).getElements("li.riverPost")[3],"after");},resetRiver:function(A){this.elems.storage.empty();if(A=="popular"){this.fetchData("popular");this.tabs.getPopular.addClass("active");this.tabs.getRecent.removeClass("active");this.recentCheck.stop();}else{if(A=="recent"){this.fetchData("recent");this.tabs.getRecent.addClass("active");this.tabs.getPopular.removeClass("active");this.recentCheck.resume();}}this.initButtons(A);},initButtons:function(A){A=A||"recent";if(!this.buttons.getMore.getElement(".viewMore")){this.buttons.getMore.set("html",'<span class="viewMore">'+this.buttons.getMore.get("text")+"</span>");}this.buttons.getMore.setStyle("display","block").removeEvents("click");this.buttons.refresh.setStyle("display","none").removeEvents("click");if(A=="recent"){this.buttons.refresh.addEvent("click",this.refreshRecentPostings.bind(this));this.buttons.getMore.addEvent("click",function(){this.fetchData("more");if(this.options.moreTrackingType=="levt-mpdoor"){new JloggerLEVT.RIA({applicationTags:{mapp:"marketplace",comp:"river",comptyp:"load_more",riaevent:"click",objtyp:"",objnm:""}}).ping();}else{new Jlogger({cval:"cnetRiver;viewMore-latest",ctype:"testevent;click"}).ping();}}.bind(this));}else{if(A=="popular"){this.buttons.getMore.addEvent("click",function(){this.showMorePopular();new Jlogger({cval:"cnetRiver;viewMore-trend",ctype:"testevent;click"}).ping();}.bind(this));}}},showMorePopular:function(){var A=this.elems.list.getElements(".riverPost.hidden");for(var B=0;B<25&&A[B];B++){A[B].removeClass("hidden").setStyles({opacity:0,display:"block"}).tween("opacity",1);}if(!A[B]){this.buttons.getMore.dissolve();}},initVideos:function(A){A=A||this.elems.list;A.getElements(".videoLauncher").each(function(E){var C=E.getParent("li"),F=C.retrieve("riverVideo:launcher"),B,D;if(!F){C.addClass("videoPost");F=function(){var G=new Element("div",{"class":"productVideo"}).inject(C);new Element("a",{"class":"dragHandle",text:"drag"}).inject(G);new Element("a",{"class":"closeVideo closeSticky",text:"Close"}).inject(G);new Element("div",{"class":"vidShell"}).inject(G);(function(){loadGeckoVideoPlayer({parentElement:C.getElement(".vidShell"),flashVars:{contentType:"id",contentValue:E.getElement("img").getProperty("videoId")}},"feature");B=new StickyWinFx({draggable:true,content:G,relativeTo:E,position:"upperLeft",onClose:function(){this.win.destroy();C.store("riverVideo:stickywin",null);}});C.store("riverVideo:stickywin",B);if(Browser.Engine.trident){D=getElementCoordinates(E);B.win.setStyles({top:D.top,left:D.left});}}).lazy(window.GeckoVideoPlayer,CBSi.lazy.videoPlayer);};C.store("riverVideo:launcher",F);}E.addEvent("click",function(){if(!C.retrieve("riverVideo:stickywin")){C.retrieve("riverVideo:launcher")();}});});},getDateFromTimestamp:function(A){A=A.match(/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/);if(!A){return ;}return(new Date(A[1],A[2].toInt()-1,A[3],A[4],A[5],A[6])||null);},zeroFill:function(A,B){B=B||2;A=A.toString();while(A.length<B){A="0"+A;}return A;},getTimestampFromDate:function(A){var C="",B=this.zeroFill;if(!A||!$type(A)=="date"){return C;}C=A.getFullYear().toString()+B(A.getMonth()+1)+B(A.getDate())+B(A.getHours())+B(A.getMinutes())+B(A.getSeconds());return C;},getAgoDate:function(B,C){var D=Math.round((B-C)/1000),F,A,E;if(D<60){A=D;F="second";}else{if(D<60*60){A=Math.floor(D/60);F="minute";}else{if(D<60*60*24){A=Math.floor(D/(60*60));F="hour";}else{if(D<60*60*24*7){A=Math.floor(D/(60*60*24));F="day";}else{A=Math.floor(D/(60*60*24*7));F="week";}}}}E=A+" "+F+((A>1)?"s":"")+" ago";return E;},setTimestampUpdates:function(A){if(!A){return ;}this.timestampOffset=(PageVars.get("loadTime")||$time())-this.getDateFromTimestamp(A);this.timestamper=this.updateTimestamps.scheduled(60000,this);},updateTimestamps:function(){var A=$time()-this.timestampOffset;this.element.getElements("li.riverPost").each(function(B){B.getElement(".assetTime").set("text",this.getAgoDate(A,this.getDateFromTimestamp(B.getProperty("date"))));},this);},initFilters:function(){this.lastCount=0;var A=window.location.href.split("?");if(A.length>1){var B=A[1].parseQueryString();if(B.filterTag){this.options.keywordFilter=B.filterTag;}}if(this.options.filterTagSelector&&this.options.filterTagSelector!=""){$$(this.options.filterTagSelector).addEvent("click",function(C){C.stop();if(C.target.hasClass("all")){this.options.keywordFilter="";}else{this.options.keywordFilter=C.target.get("text");}$$(this.options.filterTagSelector).each(function(D){if(D.get("text")==this.options.keywordFilter||(this.options.keywordFilter==""&&D.hasClass("all"))){D.addClass("selected");}else{D.removeClass("selected");}}.bind(this));this.resetRiver(this.options.fetchType);new Jlogger({cval:"cnetRiver;filter"+this.options.fetchType,ctype:"testevent;click"}).ping();}.bind(this));}return false;}});var PromoModal=new Class({Implements:[Options,Events],options:{promoPath:"/html/cnet/reviews/idleMsg.html",timeout:300000,activityReset:true,activityActions:["click","scroll","mousemove","keypress"],testSuccess:function(){return true;}},timer:false,initialize:function(A){this.setOptions(A);this.bound={timerReset:this.resetTimer.bind(this)};this.setTimer();return this;},getContent:function(){this.container=this.container||new Element("div",{id:"promoModal",styles:{display:"none",position:"absolute"}}).inject(document.body);new Request({url:this.options.promoPath,onSuccess:this.success.bind(this),onFailure:this.failure.bind(this),onComplete:this.complete.bind(this)}).send();},success:function(){if(this.options.testSuccess.run(arguments,this)){this.loadPromo.run(arguments,this);this.fireEvent("onSuccess",arguments);}else{this.failure.run(arguments);}},failure:function(){this.fireEvent("onFailure",arguments);},complete:function(){this.fireEvent("onComplete",arguments);},loadPromo:function(A){if(A){this.container.set("html",A);this.promo=new StickyWinModal({content:this.container.get("html"),closeClassName:"closeModal",allowMultiple:false,onClose:function(){this.fireEvent("onClose");}.bind(this)});this.fireEvent("onDisplay");}else{dbug.log("Response text failure");}if(this.options.activityReset&&this.options.activityActions.length){this.options.activityActions.each(function(B){window.removeEvent(B,this.bound.timerReset);},this);}},setTimer:function(){this.startTimer();if(this.options.activityReset&&this.options.activityActions.length){this.options.activityActions.each(function(A){window.addEvent(A,this.bound.timerReset);},this);}},startTimer:function(){this.timer=this.getContent.delay(this.options.timeout,this);},resetTimer:function(){if(this.timer){$clear(this.timer);this.startTimer();}}});PromoModal.GlobalModal=new Class({Extends:PromoModal,loadPromo:function(A){if(A){this.container.set("html",A);this.promo=new GlobalModal({content:this.container.get("html")});this.promo.show();}else{dbug.log("Response text failure");}if(this.options.activityReset&&this.options.activityActions.length){this.options.activityActions.each(function(B){window.removeEvent(B,this.bound.timerReset);},this);}}});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 PopupVideo=new Class({Implements:Options,options:{target:null,event:"click",position:"upperLeft",videoId:null},initialize:function(A){this.setOptions(A);this.options.target.addEvent(this.options.event,this.displayPopup.bind(this));},displayPopup:function(){this.newVideo=new StickyWin({width:364,height:302,position:"upperLeft",className:"productVideo",relativeTo:this.options.target,onDisplay:this.writePlayer.delay(10,this),closeClassName:"closeVideo"},this);},writePlayer:function(){new Element("a",{"class":"closeVideo"}).addEvent("click",this.destroyPopup.bind(this)).inject(this.newVideo.win,"top");var A=this.newVideo.win;var B=this.options.videoId;$lazy(window.GeckoVideoPlayer,CBSi.lazy.videoPlayer,function(){loadGeckoVideoPlayer({parentElement:A,flashVars:{contentType:"id",contentValue:B}},"feature");});},destroyPopup:function(){this.newVideo.destroy();}});window.addEvent("domready",function(){if($("ctWrapper")){dbug.log("Initializing ctWrapper's thumb scroller");new ThumbScroller("ctWrapper",{axis:"x",thumbs:".thumbnail",nav:{next:$$("#carouselThumbnails .scrollRight"),previous:$$("#carouselThumbnails .scrollLeft")}}).addEvent("onComplete",function(){dbug.log("ctWrapper scroll event fired");$$(this.options.nav.previous).setStyle("opacity",((this.isAtStart())?".3":"1"));$$(this.options.nav.next).setStyle("opacity",((this.isAtEnd())?".3":"1"));}).fireEvent("onComplete");}$$("#ctWrapper .thumbnail").each(function(F){F.addEvent("click",function(){var G=this;if(!G.hasClass("selected")){G.getParent().getChildren(".thumbnail").each(function(H){H.removeClass("selected");});this.addClass("selected");}$$("#carouselOverviews .overview").each(function(H){H.setStyle("display","none");if(G.get("productid")!=null&&H.get("productid")==G.get("productid")){H.setStyle("display","block");}else{if(G.get("postid")!=null&&H.get("postid")==G.get("postid")){H.setStyle("display","block");}}});this.getChildren(".indicator")[0].setStyle("display","block");});});var B=function(F){var G=F.getParent(".ratingHover").getElement(".data");if(G){F.store("tip:text",G.get("html"));}else{F.store("tip:text","Product summary not available");}};$$(".ratingHover a.toolTipElement").each(B);var E=function(F){var G=F.getParent("li").getElement("ul.data");if(G){F.store("tip:text",G.getParent().get("html"));}else{F.store("tip:text","Product summary not available");}};$$(".edRate a.toolTipElement").each(E);if($("scrollNav")){new VideoScroller("thumbContainer",{nav:{next:"#scrollNav .next",previous:"#scrollNav .previous"},offset:{x:0},displayOverlay:true,preRollAd:true,adInterval:1,vidWidth:608,vidHeight:342,playerWidth:620,playerHeight:378});}if($$(".imageGalleries a").length){$$(".imageGalleries a").each(function(F){new Element("div",{"class":"imageOverlay",html:F.getElement("img").get("alt")}).inject(F);F.addEvents({mouseenter:function(){F.getElement(".imageOverlay").setStyle("display","block");},mouseleave:function(){F.getElement(".imageOverlay").setStyle("display","none");}});});}if((PageVars.get("siteId","number")==7)&&[3121,3935,3118].contains(PageVars.get("nodeId","number"))){if($("pe-sponsoredEditorsBingo-riaTile")){if(!$("madisonBingoMfrAttrValueId")){if($("pe-sponsoredEditorsBingo-riaTile")){$("productEditorSponsored_1_").setStyle("display","block");$("topFeaturesTabs").getElements(".dBlingo").setStyle("display","block");$("pe-sponsoredEditorsBingo-riaTile").getParent().setStyle("display","none");}}else{var A=function(G){var F=G.getElements("a.toolTipElement");F.each(function(H){E(H);H.addClass("cnetTip");cnetToolTips.attach(H);});};var C=PageVars.get("nodeId");if(C==3935){C=3121;}new ContentUpdater("doorsponsoredbingo",{"sponsoredEditorsBingo-riaTile":{onSuccess:function(F){A(F);$("topFeaturesTabs").getElement(".doorBingoBox").addClass("bingoBlingo");}}},{url:"4623-"+C+"_"+PageVars.get("siteId")+"-0.html",data:{madisonBingoMfrAttrValueId:$("madisonBingoMfrAttrValueId").get("value"),excludedPids:$("topFeaturesTabs").getElements("input[name=id]").get("value").toString(),editorsBingoUnitType:"1",popBingoUnitType:"2"},onFailure:function(){if($("pe-sponsoredEditorsBingo-riaTile")){$("productEditorSponsored_1_").setStyle("display","block");$("topFeaturesTabs").getElements(".dBlingo").setStyle("display","block");$("pe-sponsoredEditorsBingo-riaTile").getParent().setStyle("display","none");}},timeout:4000}).send();}}}if((PageVars.get("siteId","number")==7)&&[3121,3935].contains(PageVars.get("nodeId","number"))){if($("pe-sponsoredBingo-riaTile")){var D=true;if(D){if($("pe-sponsoredBingo-riaTile")){$("productEditorSponsored_1_").setStyle("display","block");$("topFeaturesTabs").getElements(".dBlingo").setStyle("display","block");$("pe-sponsoredBingo-riaTile").getParent().setStyle("display","none");}}else{var A=function(G){var F=G.getElements("a.toolTipElement");F.each(function(H){E(H);H.addClass("cnetTip");cnetToolTips.attach(H);});};var C=PageVars.get("nodeId");if(C==3935){C=3121;}new ContentUpdater("doorsponsoredbingo",{"sponsoredBingo-riaTile":{onSuccess:function(F){A(F);$("topFeaturesTabs").getElement(".doorBingoBox").addClass("bingoBlingo");}}},{url:"4623-"+C+"_"+PageVars.get("siteId")+"-0.html",data:{madisonBingoMfrAttrValueId:$("madisonBingoMfrAttrValueId").get("value"),excludedPids:$("topFeaturesTabs").getElements("input[name=id]").get("value").toString(),editorsBingoUnitType:"1",popBingoUnitType:"2",sponsoredBingoUnitType:"3"},onFailure:function(){if($("pe-sponsoredBingo-riaTile")){$("productEditorSponsored_1_").setStyle("display","block");$("topFeaturesTabs").getElements(".dBlingo").setStyle("display","block");$("pe-sponsoredBingo-riaTile").getParent().setStyle("display","none");}},timeout:4000}).send();}}}$$(".videoHighlight").each(function(F){if(F.getProperty("videoId")){new PopupVideo({target:F.getChildren(".prodImg")[0],videoId:F.getProperty("videoId")});}});$$(".videoHighlight .readMore").each(function(F){F.addEvent("click",function(){this.getParent().getChildren(".prodImg")[0].fireEvent("click");return false;});});$$(".videoHighlight h3").each(function(F){F.addEvent("click",function(){this.getParent().getChildren(".prodImg")[0].fireEvent("click");return false;});});if($$(".riverPosts")){$("ajaxMorePostings").set("limit","10");$("ajaxMorePostings").addEvent("click",function(){morePosts($("ajaxMorePostings").get("limit"));});}});function morePosts(G){var A="",C="",B="";if($("ajaxMorePostings").get("query")!=null){A=$("ajaxMorePostings").get("query");}var K="";var D=A.replace(/resource\//gi,"");D=D.replace(/v1.0\//gi,"");var F=D.split("?")[1].split("&");F.each(function(N,M){if(N.contains("assetTypeIds=")){C="&"+N;}if(N.contains("primarySiteIds=")){B="&"+N;}if(N.contains("query=")){K="&"+N;}});var J=5;var E=null;var I=$("buzzRiver").retrieve("waiter",new Waiter($("buzzRiver")));if(I){I.start();}var H=$("ajaxMorePostings").retrieve("waiter",new Waiter($("ajaxMorePostings")));if(H){H.start();}var L="/posidn/latestBuzzRiverShow?posidn.useSampleValues=true&queryType=wholeWorldJuciCombinedContentSearch&limit="+G+C+B+K;E=new ContentUpdater("cnetRiver",{buzzRiver:{element:"buzzRiver",onComplete:function(){dbug.log("completed buzzRiver precache");if(I){I.stop();}if(H){H.stop();}}}},{url:L,onTimeout:function(){dbug.log("onTimeout precache");if(I){I.stop();}if(H){H.stop();}},onFailure:function(){dbug.log("onFailure precache");if(I){I.stop();}if(H){H.stop();}},onComplete:function(){dbug.log("onComplete precache");if(I){I.stop();}if(H){H.stop();}var M=G.toInt();M=M+J;$("ajaxMorePostings").set("limit",M.toString());},timeout:10000});E.send();}
   }
       
