
   if(!dbugScripts("cbsnews",["cbsnews.a2.door.js"])) {
   /*	cbsnews.a2.door.js - packed	*/
       var CBSCarousel=new Class({Implements:[Options,Events],options:{slide$$:"li.carouselSlide",slideInterval:6000,transitionDuration:"short",startIndex:0,indicatorActiveClass:"selected",indicatorInactiveClass:"off",rotateAction:"mouseenter",rotateActionDuration:100,autoplay:true,useIndicators:true,indicatorContainerClass:"indicators",indicator$$:null,nextButtonClass:"carouselNext",prevButtonClass:"carouselPrev",pauseOnHover:true,pauseOnBlur:true},initialize:function(A,B){A=$(A);if(A.retrieve("carousel")){return false;}this.container=A;this.container.store("carousel",this);this.setOptions(B);this.slides=this.setSlides();if(this.options.useIndicators){this.setIndicators();}this.showSlide(this.options.startIndex);this.setButtons();if(this.options.pauseOnHover&&this.options.autoplay){this.setHoverPausing();}if(this.options.pauseOnBlur&&this.options.autoplay){this.setWindowPausing();}if(this.options.autoplay){this.autoplay();}this.fireEvent("onInitialize");return this;},setHoverPausing:function(){this.setBindings();this.container.addEvents({mouseenter:this.bound.stop,mouseleave:this.bound.autoplay});this.addEvent("onActiveSelect",this.bound.clearPausing);},setWindowPausing:function(){if(!this.bound){this.setBindings();}window.addEvents({blur:this.bound.stop,focus:this.bound.autoplay});},clearPausing:function(){this.container.removeEvent("mouseenter",this.bound.stop);this.container.removeEvent("mouseleave",this.bound.autoplay);window.removeEvent("blur",this.bound.stop);window.removeEvent("focus",this.bound.autoplay);this.removeEvent("onActiveSelect",this.bound.clearPausing);},setBindings:function(){this.bound={autoplay:this.autoplay.bind(this),stop:this.stop.bind(this),clearPausing:this.clearPausing.bind(this)};},setSlides:function(){slides=this.container.getElements(this.options.slide$$);slides.each(function(A,B){A.set("tween",{duration:this.options.transitionDuration,onStart:function(){if(A.getStyle("opacity")<0.1){A.setStyle("display","block");}},onComplete:function(){if(A.getStyle("opacity")<1){A.setStyle("display","none");}}});A.setStyles({display:(B==this.options.startIndex)?"block":"none",opacity:(B==this.options.startIndex)?1:0});}.bind(this));return slides;},setIndicators:function(){this.indicators=(this.options.indicator$$)?this.container.getElements(this.options.indicator$$):this.createIndicators();this.indicators.each(function(A,B){A.addEvent(this.options.rotateAction,this.activeSelect.bind(this,B));},this);},createIndicators:function(){var A=new Element("ul",{"class":this.options.indicatorContainerClass}).inject(this.container);var C=[];for(var B=0;B<this.slides.length;B++){C.push(new Element("li",{text:B}).inject(A));}return C;},setButtons:function(){this.container.getElements("."+this.options.nextButtonClass).removeProperties("onclick","href").addEvent("click",this.activeSelect.bind(this,"next"));this.container.getElements("."+this.options.prevButtonClass).removeProperties("onclick","href").addEvent("click",this.activeSelect.bind(this,"prev"));},activeSelect:function(A){if($type(A)!="number"){A=this.getToIndex(A);}if(this.slideshowInt){this.stop();}this.showSlide(A);this.fireEvent("onActiveSelect");},getToIndex:function(A){if(A=="next"){return(this.currentIndex==this.slides.length-1)?0:this.currentIndex+1;}return((this.currentIndex==0)?this.slides.length:this.currentIndex)-1;},showSlide:function(A){if(A==this.currentIndex){return this;}$each(this.slides,function(B,C){if(C==A){if(this.options.useIndicators){this.indicators[C].swapClass(this.options.indicatorInactiveClass,this.options.indicatorActiveClass);}B.fade("in");}else{if(this.options.useIndicators){this.indicators[C].swapClass(this.options.indicatorActiveClass,this.options.indicatorInactiveClass);}B.fade("out");}}.bind(this));this.fireEvent("onShowSlide",[A,this.currentIndex]);this.currentIndex=A;return this;},autoplay:function(){if(this.slideshowInt){return this;}this.slideshowInt=this.rotate.periodical(this.options.slideInterval,this);this.fireEvent("onAutoPlay");return this;},stop:function(){this.slideshowInt=$clear(this.slideshowInt);this.fireEvent("onStop");return this;},rotate:function(){var B=this.currentIndex;var A=(B+1>=this.slides.length)?0:B+1;this.showSlide(A);this.fireEvent("onRotate",[A,B]);return this;},toElement:function(){return this.container;}});var ThumbScroller=new Class({Extends:Fx.Scroll,scrollOptions:{thumbs:".box",axis:"x",thumbContainer:null,nav:{},startIndex:0},initialize:function(A,B){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();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();}}});var CBSThumbScroller=new Class({Extends:ThumbScroller,cbsOptions:{thumbs:"li.promoBox",nav:{next:".arrowRight",previous:".arrowLeft"},onInitialize:function(){this.addEvent("onStart",this.startEvent);},onComplete:function(){var B=this.getRange(),A;this.setArrows.run([B],this);if(!this.imagesLoaded){A=B.map(function(C){return this.thumbs[C.index];},this);this.loadImages.run(A);}}},initialize:function(C,A){this.outerShell=$(C);var B=$merge(this.cbsOptions,A);if(B.nav){$each(B.nav,function(F,E,D){D[E]=this.outerShell.getElements(F);}.bind(this));}this.parent(this.outerShell.getElement(".scrollShell"),B);},loadImages:function(){$A(arguments).each(function(A){var C=A.getElement(".assetThumb img");var B=(C)?C.getProperty("loadsrc"):null;if(C&&B){if(C.getProperty("src")!=B){C.setProperty("src",B);}}});},setArrows:function(A){$$(this.options.nav.previous).morph({opacity:(this.isAtStart(A))?0.3:1});$$(this.options.nav.next).morph({opacity:(this.isAtEnd(A))?0.3:1});},startEvent:function(){this.loadImages.run(this.thumbs);this.imagesLoaded=true;this.removeEvent("onStart",this.startEvent);},initNav:function(){this.parent();$$(this.options.nav.next,this.options.nav.previous).set("morph",{duration:"short"});}});Element.implement("cbsNodeIndex",function(){var A=0;elem=this;while(elem.previousSibling){if(elem.previousSibling.nodeName=="#text"){elem=elem.previousSibling;}else{A++;elem=elem.previousSibling;}}return A;});var SixtyMinsCarousel=new Class({initialize:function(){dbug.log("SixtyMinsCarousel");return new CBSCarousel("cbsCarousel",{indicator$$:"li.carouselListItem"});}});var CrimeSiderCarousel=new Class({initialize:function(){return new CBSCarousel("cbsCarousel",{indicator$$:"li.carouselListItem"});}});var CBSDoorCarousel=new Class({initialize:function(){var A=new CBSCarousel("cbsCarousel",{indicatorActiveClass:"active",rotateAction:"click",slideInterval:8000});new Jlogger({tag:"carousel",ctype:"button",cval:"prev",element:$$("#cbsCarousel .carouselPrev")[0],event:"click"});new Jlogger({tag:"carousel",ctype:"button",cval:"next",element:$$("#cbsCarousel .carouselNext")[0],event:"click"});$$("#cbsCarousel .carouselLink, #cbsCarousel .carouselCaption a").addEvent("click",function(){new Jlogger({tag:"carousel",ctype:"action;pane",cval:"click;"+($("cbsCarousel").retrieve("carousel").currentIndex+1)}).ping();});return A;}});window.addEvent("domready",function(){$$(".sideScroller").each(function(A){if(!A.retrieve("thumbscroller")){new CBSThumbScroller(A);var B=A.get("id");if(!B){if(A.get("class").indexOf("storyScroller")!=-1){B="storyScroller";}else{if(A.getElements(".sideScrollerTitle span").get("text")=="Latest Video"){B="videoScroller";}else{return ;}}}new Jlogger({tag:B,ctype:"button",cval:"prev",element:$ES(".arrowLeft",A)[0],event:"click"});new Jlogger({tag:B,ctype:"button",cval:"next",element:$ES(".arrowRight",A)[0],event:"click"});$ES("a",A).each(function(D){if(D.getParent(".promoBox")){var C=D.getParent(".promoBox").cbsNodeIndex()+1;if(B=="videoScroller"){C=Math.ceil(C/3);}new Jlogger({tag:B,ctype:"action;pane",cval:"click;"+C,element:D,event:"click"});}});}});});
   }
       