
 //dbugScripts - will include non-compressed versions of this code if "jsdebug=true" is in the url of this page,
 //otherwise it will execute this code.

 if(!dbugScripts("http://publish.cnet.com:8100/html/rb/js/tron/ces/",["ces2009.tron.global.js"])) {
 /*	ces2009.tron.global.js - packed	*/
       var cesVideo=new Class({options:{},initialize:function(A){this.videoArea=$("videoHub").getElement(".videoPlayer");this.videoArea.setStyle("height",322);this.hideTabs=true;if($("videoHub").get("videoId")){if($("videoHub").hasClass("live")){this.initLiveVideo($("videoHub").get("videoId"),false);}else{if($("videoHub").get("videoId").contains(",")){this.videoArea.setStyle("height",342);this.hideTabs=false;}this.initVideo(null,false,$("videoHub").get("videoId"),false);}}else{this.initVideo(null,false,$("videoHub").getElement("#vidThumbContainer ul").getFirst(".thumb").getProperty("videoId"),false);}$("videoHub").getElements(".videoThumbs .thumb").each(function(B){B.addEvent("click",function(){this.initVideo(null,false,B.getProperty("videoId"),true);}.bind(this));},this);},setupNcat:function(){switch($("videoHub").get("videoId")){case"50004743":this.liveNcat="7269:7911:19167:19509:";this.aspectRatio="4:3";this.stillImage="http://i.t.com.com/i/lumiere/2008/12/10/NextBigThing-50004743-20081210_132459-456x257.jpg";break;case"50004744":this.liveNcat="7269:7911:19167:19505:";this.stillImage="http://i.t.com.com/i/lumiere/2008/12/10/BoL-50004744-20081210_133344-456x257.jpg";break;case"50004745":this.liveNcat="7269:7911:19167:19505:";this.stillImage="http://i.t.com.com/i/lumiere/2008/12/10/BoL-50004745-20081210_133514-456x257.jpg";break;case"50004747":this.liveNcat="7269:7911:19167:19505:";this.stillImage="http://i.t.com.com/i/lumiere/2008/12/10/CNETLive-50004747-20081210_133648-456x257.jpg";break;case"50004748":this.liveNcat="7269:7911:19167:19505:";this.stillImage="http://i.t.com.com/i/lumiere/2008/12/10/CNETLive-50004748-20081210_133814-456x257.jpg";break;case"50004749":this.liveNcat="7269:7911:19167:19507:";this.stillImage="http://i.t.com.com/i/lumiere/2008/12/10/BoCA-50004749-20081210_133929-456x257.jpg";break;case"50004750":this.liveNcat="7269:7911:19167:19505:";this.stillImage="http://i.t.com.com/i/lumiere/2008/12/10/404-50004750-20081210_134144-456x257.jpg";break;}},initVideo:function(A,B,D,C){this.videoArea.empty();loadUniversalPlayer({parentElement:this.videoArea,lumiereQueryType:"id",lumiereQueryValue:D,autoPlay:C,preRollAd:true,firstVideoPostAd:false,contentPostRollAd:true,externalLinks:true,hideBkg:true,relatedVideo:false,hideTabs:this.hideTabs,hideEmailBtn:true,initObject:A,initAction:B});this.setCurrentVid(D);},initLiveVideo:function(B,A){this.aspectRatio="16:9";this.setupNcat();loadUniversalPlayer({parentElement:this.videoArea,lumiereQueryType:"live",lumiereQueryValue:"live",autoPlay:A,preRollAd:true,firstVideoPostAd:false,firstVideoPostRoll:false,contentPostRollAd:false,hideTabs:true,hideEmailBtn:true,externalLinks:true,relatedVideo:false,liveId:"cnet_live",liveHed:"",liveDeck:"",liveImage:this.stillImage,liveRelatedLink:"http://www.cnettv.com/",liveNcat:this.liveNcat,liveUrl:"http://www.cnettv.com",liveHost:"cnet.fc.llnwd.net/cnet",liveAspectRatio:this.aspectRatio,liveVideoId:B,initAction:false,backupHost:"cnet.fc.llnwd.net/cnet",backupStream:"cnet_live_lax"});},setCurrentVid:function(A){$("videoHub").getElements(".videoThumbs .thumb img").each(function(B){if(B.getProperty("videoId")==A){B.getParent().addClass("currentVid");}else{B.getParent().removeClass("currentVid");}});}});window.addEvent("domready",function(){console.log("test");if($("videoHub")){new cesVideo();if($("videoHub").get("videoId").contains(",")){$$("#videoHub").setStyle("height",420);if($$(".slideShowThumbs").length>0){$$(".slideShowThumbs").setStyle("height",418);}}}if(!$("vidThumbContainer")){$("videoHub").getElement(".videoThumbs").destroy();}if($("vidThumbContainer")){new ThumbScroller("vidThumbContainer",{thumbs:".thumb",nav:{next:$$(".videoThumbs .scrollArrows .next"),previous:$$(".videoThumbs .scrollArrows .previous")}}).addEvent("onComplete",function(){$$(this.options.nav.previous).setStyle("opacity",((this.isAtStart())?".3":"1"));$$(this.options.nav.next).setStyle("opacity",((this.isAtEnd())?".3":"1"));}).fireEvent("onComplete");}if($$(".slideShowThumbs").length>0){$("imgThumbContainer").setStyle("height",($("videoHub").getStyle("height").toInt()-40));new ThumbScroller("imgThumbContainer",{axis:"y",thumbs:".thumb",nav:{next:$$(".slideShowThumbs .scrollArrows .next"),previous:$$(".slideShowThumbs .scrollArrows .previous")}}).addEvent("onComplete",function(){$$(this.options.nav.previous).setStyle("opacity",((this.isAtStart())?".3":"1"));$$(this.options.nav.next).setStyle("opacity",((this.isAtEnd())?".3":"1"));}).fireEvent("onComplete");}});var ThumbScroller=new Class({Extends:Fx.Scroll,scrollOptions:{thumbs:".box",axis:"x",thumbContainer:null,nav:{},startIndex:0},initialize:function(A,B){this.parent(A,$merge(this.scrollOptions,B));this.element.setStyle("overflow","hidden");this.computeDimensions();this.initNav();this.element.store("thumbscroller",this);this.toIndex(this.options.startIndex);this.lastScroll=null;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();return(A[A.length-1].index==this.thumbs.length-1&&A[A.length-1].type!="partial");},isAtStart:function(A){A=A||this.getRange();return(A[0].index==0&&A[0].type!="partial");},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(){$$(this.options.nav.next).addEvent("click",this.toNextScreen.bind(this));$$(this.options.nav.previous).addEvent("click",this.toPreviousScreen.bind(this));$$(this.options.nav.start).addEvent("click",this.toStart.bind(this));$$(this.options.nav.end).addEvent("click",this.toEnd.bind(this));},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){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"};}}else{if(C.start>=B&&C.start<A){return{type:"partial",where:"end"};}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.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.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();}}});
 /* end packed code */
 }
       
