
   if(!dbugScripts("commerce",["commerce.tron.hottopics.js"])) {
   /*	commerce.tron.hottopics.js - packed	*/
       var Fixation=new Class({Implements:Options,options:{inset:20,widthOffset:0},initialize:function(C,A,B){this.setOptions(B);this.element=$(C);this.container=$(A);this.coords=this.container.getCoordinates();this.container.size=this.container.getSize();this.defaults=this.element.getStyles("left","top");this.element.size=this.element.getSize();this.options.inset=!isNaN(this.options.inset.toInt())?this.options.inset.toInt():0;this.options.widthOffset=!isNaN(this.options.widthOffset.toInt())?this.options.widthOffset.toInt():0;if(window.MooTools&&MooTools.version=="1.2dev"){this.defaults=new Hash(this.defaults);this.defaults.each(function(E,D){this[D]=!isNaN(E.toInt())?E.toInt():0;}.bind(this.defaults));}else{Object.each(this.defaults,function(E,D){this[D]=!isNaN(E.toInt())?E.toInt():0;}.bind(this.defaults));}this.max={top:this.coords.top-this.options.inset+this.defaults.top,bottom:this.coords.bottom-this.options.inset,colBottom:this.container.size.y-this.element.size.y};this.fixed=false;this.pos={position:"absolute",top:this.defaults.top,left:this.defaults.left};if(!Browser.Engine.trident4&&(this.element.size.y+this.options.inset<window.getSize().y)){this.attachScroll();this.attachResize();}},attachScrollEvent:function(){var B=this.container.getSize().y-this.options.inset;if(this.max==null){return false;}else{if(this.max.bottom!=(B+this.max.top)){this.max.bottom=B+this.max.top;this.max.colBottom=this.container.getSize().y-this.element.getSize().y;}}var A=window.getScroll();if(this.fixed&&A.y<this.max.top){this.pos={position:"absolute",top:this.defaults.top,left:(this.defaults.left-this.options.widthOffset)};this.setPosition();this.fixed=false;}else{if(this.fixed&&(A.y+this.element.size.y)>this.max.bottom){this.pos={position:"absolute",top:this.max.colBottom,left:(this.defaults.left-this.options.widthOffset)};this.setPosition();this.fixed=false;}else{if(!this.fixed&&(A.y>this.max.top)&&(A.y+this.element.size.y<this.max.bottom)){this.pos={position:"fixed",top:this.options.inset,left:(this.coords.left+this.options.widthOffset)};this.setPosition();this.fixed=true;}}}},attachScroll:function(){boundAttachScrollEvent=this.attachScrollEvent.bind(this);window.addEvent("scroll",boundAttachScrollEvent);},detatchScroll:function(){window.removeEvent("scroll",boundAttachScrollEvent);},attachResizeEvent:function(){this.coords=this.container.getCoordinates();if(this.fixed){this.pos.left=this.coords.left+this.options.widthOffset;this.setPosition();}},attachResize:function(){boundAttachResizeEvent=this.attachResizeEvent.bind(this);window.addEvent("resize",boundAttachResizeEvent);},detatchResize:function(){window.removeEvent("resize",boundAttachResizeEvent);},setPosition:function(){this.element.setStyles({position:this.pos.position,top:this.pos.top,left:this.pos.left});}});var ShareBar=new Class({Extends:Fixation,Implements:[Options,Events],options:{defaultView:"side",enableToggle:true,barId:"shareBar",views:{side:{id:"contentBody",element:"#contentBody",position:"bottom"},inline:{element:"#contentBody header",position:"bottom"}},data:{commentCount:"#postComments .countNumber"},adSkin:{regex:/^url\((\")?http:\/\/i\.i\.com\.com\/cnwk.1d\/Ads.*$/gi,element$$:".rb_skin, #rb_skin"}},loaded:{side:false,inline:false},thirdPartyLoading:{google:false,linkedIn:false,twitter:false},initialize:function(A){this.setOptions(A);this.shortURL=this.shareURL;this.processingRequest=false;this.gotShortUrl=false;this.commentCount="0";this.initValues();var B=$$(this.options.adSkin.element$$)[0];B=B!=null?B.getStyle("background-image"):B;if(B!=null&&B.match(this.options.adSkin.regex)!=null){this.options.enableToggle=false;this.requestShareBar("inline");}else{if(!$$(".inline-sharebar")[0]&&document.body.offsetWidth<1200){this.requestShareBar("inline");}else{if(!$(this.options.barId)){this.requestShareBar(this.options.defaultView);}else{this.parent("shareBar",this.options.views.side.id);this.initLevtTracking();if(this.options.enableToggle){this.attachWidthResize();}}}}},initLevtTracking:function(){try{if(twttr){twttr.events.bind("tweet",function(B){this.pingLEVT("twitter","socialbutton");}.bind(this));}$$(".shareContent li .linkIcon").each(function(B){B.addEvent("click",function(){if(B.hasClass("facebook")){this.pingLEVT("facebook","sharelink");}else{if(B.hasClass("twitter")){this.pingLEVT("twitter","sharelink");}else{if(B.hasClass("linkedin")){this.pingLEVT("linkedin","sharelink");}else{if(B.hasClass("digg")){this.pingLEVT("digg","sharelink");}else{if(B.hasClass("delicious")){this.pingLEVT("delicious","sharelink");}else{if(B.hasClass("reddit")){this.pingLEVT("reddit","sharelink");}else{if(B.hasClass("stumble")){this.pingLEVT("stumbleupon","sharelink");}else{if(B.hasClass("google")){this.pingLEVT("google","sharelink");}}}}}}}}}.bind(this));}.bind(this));}catch(A){dbug.log("LEVT tracking failed to initialize!");}},loadScript:function(A,B){if(B){new Asset.javascript(A,{onload:B});}else{new Asset.javascript(A);}},attachWidthResizeEvent:function(){if(document.body.offsetWidth<1200){if(this.loaded.inline||$$(".inline-sharebar")[0]){this.toggleShareBars("inline");}else{this.requestShareBar("inline");}}else{if(this.loaded.side||$$(".side-sharebar")[0]){this.toggleShareBars("side");}else{this.requestShareBar("side");}}},requestShareBar:function(A){if(!this.processingRequest){this.processingRequest=true;new Request({method:"get",url:"http://"+document.location.host+"/html/rb/cnet/"+(Browser.qs&&Browser.qs.htmldebug?"dev-":"")+A+"-sharebar.html",onSuccess:function(B){if(!this.gotShortUrl){new Request({method:"get",url:"http://"+document.location.host+"/posidn/rest/v1.0/shareBarUrlShortener?longUrl="+this.shareURL,onSuccess:function(C,E){try{if(E!=null&&E.getElement("CNETResponse")!=null&&E.getElement("CNETResponse").getElement("cnetCoUrl")!=null&&E.getElement("CNETResponse").getElement("cnetCoUrl").getElement("shortUrl")!=null){this.shortURL=E.getElement("CNETResponse").getElement("cnetCoUrl").getElement("shortUrl").get("text");}else{this.shortURL=this.shareURL;}}catch(D){this.shortURL=this.shareURL;}this.injectShareBar(A,B);this.gotShortUrl=true;}.bind(this),onFailure:function(){this.shortURL=this.shareURL;this.injectShareBar(A,B);}.bind(this)}).send();}else{this.injectShareBar(A,B);}this.processingRequest=false;}.bind(this)}).send();}},injectShareBar:function(A,C){var B=new Element("div",{html:this.replacePlaceholders(C)});B.getChildren()[0].inject($$(this.options.views[A].element)[0],this.options.views[A].position);$$("."+A+"-sharebar .linkedInShareBtn").each(function(D){if(D.get("html")==""&&A=="side"){D.adopt(new Element("script",{type:"IN/Share","data-url":this.shareURL,"data-counter":"top","data-onsuccess":"shareSuccess"}));}else{if(D.get("html")==""&&A=="inline"){D.adopt(new Element("script",{type:"IN/Share","data-url":this.shareURL,"data-counter":"right","data-onsuccess":"shareSuccess"}));}}}.bind(this));this.initializeSocialButtons(A);this.loaded[A]=true;if(A=="side"){new Fixation("shareBar",this.options.views.side.id);}this.initLevtTracking();if(this.options.enableToggle){this.attachWidthResize();}this.toggleShareBars(A);},initValues:function(){var B=(document.URL.contains("?"))?document.URL.substring(0,document.URL.indexOf("?")):document.URL;this.shareURL=(this.options.data.shareURL!=null)?this.options.data.shareURL:B;this.tagPrefix=(this.shareURL.contains("&tag=")||this.shareURL.contains("?tag="))?";":"?tag=";this.shareTitle=(this.options.data.shareTitle!=null)?this.options.data.shareTitle:document.title.split("|")[0].trim();this.shareTitle=this.shareTitle.replace(/'/g,"");this.shareDescription=this.options.data.shareDescription;this.shareSource="CNET";this.diggTopic=(PageVars.get("pageType")=="2100")?"tech_news":"gadgets";var A=setInterval(function(){setTimeout(function(){if($$(this.options.data.commentCount)[0]){this.commentCount=parseFloat($$(this.options.data.commentCount)[0].get("text"));$$(".commentTeaser .countNumber").set("text",this.commentCount);clearInterval(A);}}.bind(this),"200");}.bind(this),"200");},replacePlaceholders:function(A){if(this.shortURL===undefined){this.shortURL=this.shareURL;}A=A.replace(/{{shareUrl}}/g,this.shareURL);A=A.replace(/{{shortUrl}}/g,this.shortURL);A=A.replace(/{{shareTitle}}/g,this.shareTitle);A=A.replace(/{{eShareUrl}}/g,encodeURIComponent(this.shareURL));A=A.replace(/{{eShortUrl}}/g,encodeURIComponent(this.shortURL));A=A.replace(/{{eTagPrefix}}/g,encodeURIComponent(this.tagPrefix));A=A.replace(/{{eShareTitle}}/g,encodeURIComponent(this.shareTitle));A=A.replace(/{{eShareDescription}}/g,encodeURIComponent(this.shareDescription));A=A.replace(/{{eShareSource}}/g,encodeURIComponent(this.shareSource));A=A.replace(/{{eDiggTopic}}/g,encodeURIComponent(this.diggTopic));A=A.replace(/{{commentCount}}/g,this.commentCount);return A;},toggleShareBars:function(A){if(A=="inline"){$$(".side-sharebar").setStyle("display","none");$$(".inline-sharebar").setStyle("display","block");}else{if(A=="side"){$$(".side-sharebar").setStyle("display","block");$$(".inline-sharebar").setStyle("display","none");}}},pingLEVT:function(A,B){new JloggerLEVT.Social.Share({applicationTags:{eventt:"socialsite",tasid:PageVars.get("assetId"),tastid:(DW.pageParams.astId)?DW.pageParams.astId:0,ssite:A,wd:B,wdloc:"sharebar"}}).ping();},initializeSocialButtons:function(A){try{$$(".shareBar a.email").each(function(C){C.removeEvents();C.addEvent("click",PageTools.email);});$$(".shareBar a.print").each(function(C){C.removeEvents();C.addEvent("click",PageTools.print);});if(window.FB){FB.XFBML.parse();}if(typeof twttr==="undefined"&&!this.thirdPartyLoading.twitter){this.thirdPartyLoading.twitter=true;this.loadScript("http://platform.twitter.com/widgets.js",function(){twttr.widgets.load();});}else{twttr.widgets.load();}if(typeof gapi==="undefined"&&!this.thirdPartyLoading.google){this.thirdPartyLoading.google=true;this.loadScript("https://apis.google.com/js/plusone.js",function(){gapi.plusone.go();});}else{gapi.plusone.go();}if(typeof IN==="undefined"&&!this.thirdPartyLoading.linkedIn){this.thirdPartyLoading.linkedIn=true;this.loadScript("https://platform.linkedin.com/in.js?async=true",function(){IN.init();});}else{IN.init();}}catch(B){dbug.log("Uh-oh one of the buttons didn't parse correctly");}},attachWidthResize:function(){boundAttachResizeEvent=this.attachWidthResizeEvent.bind(this);window.addEvent("resize",boundAttachResizeEvent);}});if(!window.UniversalPlayer){var UniversalPlayer={};UniversalPlayer.manager={playerIds:[],players:[],getId:function(){return this.addPlayerId("player"+this.playerIds.length);},addPlayerId:function(A){return this.playerIds[this.playerIds.push(A)-1];},addPlayer:function(A){return this.players[this.players.push(A)-1];}};var loadUniversalPlayer=function(A){if(document.location.search.contains("autoplay=true")){A=$merge((A||{}),{autoPlay:(document.location.search.contains("autoplay=true"))});}var B=function(C){UniversalPlayer.manager.addPlayer(new UniversalPlayer.Player(C));};if(A.parentElement){UniversalPlayer.manager.players.push(A.parentElement);if($(A.parentElement)){B(A);}else{window.addEvent("domready",B(A));}}else{A.parentElement=UniversalPlayer.manager.getId();document.write('<div id="'+A.parentElement+'"></div>');B(A);}};UniversalPlayer.Player=new Class({Implements:Options,options:{parentElement:"",playerType:"Universal",playerTitle:"Cnet Universal Player",autoPlay:false,externalPlayer:false,watchedVideoRotation:false,wrapperFloat:"left",localTest:false,geckoPath:null,lumiereQueryType:"orderBy",lumiereQueryValue:"productionDate+desc",apiPath:null,startVolume:30,expandTabs:false,showVideoInfo:false,hideBkg:false,hideTabs:false,hideLeftTab:false,hideHeader:false,useCurrentPageUrl:false,userAutoplay:false,displayMuteBtn:false,reviewsVideoOnly:false,hideEmailBtn:false,playOverlayText:"PLAY CNET VIDEO",adInterval:2,preRollAd:false,firstVideoPostAd:true,contentPostRollAd:false,adTest:false,adHost:null,relatedVideo:true,externalLinks:false,vendorVideo:false,siteId:PageVars.get("siteId"),pageType:PageVars.get("pageType"),nodeId:PageVars.get("nodeId"),oid:PageVars.getOid(),editionId:PageVars.get("editionId"),brandId:PageVars.get("brandId"),userIP:PageVars.get("userIP"),ncat:PageVars.get("breadcrumb"),userAgent:escape(navigator.userAgent),channelId:PageVars.get("channelId"),assetId:PageVars.get("assetId"),guid:PageVars.get("guid"),dvarMfg:"",refreshMpuEnabled:false,ePartner:"",cpnModule:"",refDomain:"",videoTitle:null,productionDate:null,lengthSecs:null,videoId:null,description:null,embedable:true,primaryNodeId:null,primaryNodePath:PageVars.get("breadcrumb"),externalItemId:null,externalVideoType:null,downloadable:null,isTranscriptAvailable:null,siteId:PageVars.get("siteId"),image53x40:null,image106x80:null,image320x240:null,relatedLinkUrls:null,relatedLinks:null,relatedLinkTexts:null,deliveryUrl:null,downloadUrl:null,initObject:window,initAction:"load"},initialize:function(A){this.setOptions(A);this.processPlayerData();this.setAutoPlayProperties();this.makeDiv();},processPlayerData:function(){if(this.options.useCurrentPageUrl){this.options.useCurrentPageUrl=document.URL;}if(Cookie.get("userVolume")!=null){this.options.startVolume=Cookie.get("userVolume");}},setAutoPlayProperties:function(){if(Cookie.get("userAutoPlay")=="disabled"){this.options.autoPlay=false;}},makeDiv:function(){var G=(this.options.playerType=="Widget")?"http://i.i.com.com/cnwk.1d/i/vid/uPlayerWidgetLoader.gif":"http://i.i.com.com/cnwk.1d/i/vid/uPlayerLoader.gif";if(this.options.playerType=="Widget"){var E=300;var H=250;var F="universalWidget";var B="0px";}else{if(this.options.playerType=="small"){var E=364;var H=280;var F="universalSmall";var B="0px";}else{if(this.options.playerType=="ces2010-large"){var E=640;var H=408;var F="ces2010/ces-large";var B="0px";}else{if(this.options.playerType=="ces2010-small"){var E=386;var H=262;var F="ces2010/ces-small";var B="0px";}else{if(this.options.playerType=="ces2010-live"){var E=460;var H=322;var F="ces2010/ces-live";var B="0px";}else{if(this.options.hideTabs==true){var E=460;var H=322;}else{var E=460;var H=342;}var D="http://i.i.com.com/cnwk.1d/i/vid/uPlayerBG.gif";var B="61px 0px 0px 8px";var F="universal";}}}}}var A=new Element("div",{id:"universalVideoWrapper"+UniversalPlayer.manager.players.length,"class":"float"+this.options.wrapperFloat,styles:{width:E,height:H,position:"relative",zIndex:"90","float":this.options.wrapperFloat}});if(this.options.hideTabs==true){if(this.options.pageType==4505){A.setStyle("borderBottom","#ffffff solid 2px");}else{A.setStyle("borderBottom","#cbcbcb solid 1px");}}A.inject(this.options.parentElement);var C=new Element("img",{id:"universalLoaderImg"+UniversalPlayer.manager.players.length,src:G,styles:{position:"absolute",zIndex:"100",margin:B}});this.checkFlashVersion(A,E,H,F,C,B);},checkFlashVersion:function(D,A,I,F,K,B){var E=8;var G;if(navigator.plugins&&navigator.mimeTypes.length){G=navigator.plugins["Shockwave Flash"];if(G&&G.description){G=G.description;}}else{if(Browser.Engine.trident){G=$try(function(){return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version");});}}pluginVersion=(typeof G=="string")?parseInt(G.match(/\d+/)[0]):0;var J=pluginVersion>=E;if(!J){D.set("html","We&rsquo;ve detected that you need to upgrade or install Flash "+E+' or later to view our library of thousands of tech videos. Installing Flash is fast, free, and easy! Simply follow the instructions from your browser, or <a href="http://www.adobe.com/go/getflashplayer" id="flashVidErrorLink">click here to install/upgrade the free Flash player</a>.<br />&nbsp;<br />Thanks,<br />The CNET TV Team');D.setStyles({font:"normal 14px Arial, Helvetica, San Serif",lineHeight:"18px",color:"#000",margin:B,padding:"8px",width:A-16,height:I-16});}else{var H=this;if(this.options.initAction==false){H.makeSwf(D,A,I,F);}else{var C=$(this.options.initObject)||$$(this.options.initObject);C.addEvent(this.options.initAction,function(){H.makeSwf(D,A,I,F);});}}},makeSwf:function(K,J,Q,C){if(this.options.watchedVideoRotation==true){if(Cookie.get("cnetWatchedVideos")!=false){var G=Cookie.get("cnetWatchedVideos").split(",");for(r=0;r<G.length;r++){if(G.length>5){G.splice(0,1);}}var H=this.options.lumiereQueryValue.split(",");for(var N=0;N<G.length;N++){var D=G[N];for(var O=0;O<H.length;O++){if(D==H[O]){H.splice(O,1);H.push(D);var M=true;}}}var E=(M==true)?H:escape(this.options.lumiereQueryValue);}else{var E=escape(this.options.lumiereQueryValue);}}else{var E=escape(this.options.lumiereQueryValue);}var L=document.URL;if((L.contains(".com:")==true&&L.contains("uat")==false)||L.contains("preview1.")==true||L.contains("dev-server-test.dev.sub.classes")==true){var A=false;}else{var A=true;}if(this.options.adTest==true){var R="http://www.cnet.com/av/video/flv/universalPlayer/"+C+".swf";}else{if(L.contains("i.i.com.com/cnwk.1d")==true||L.contains("localhost")==true){var R="http://www.cnet.com/av/video/flv/universalPlayer/"+C+".swf";}else{if(L.contains("ssadev")==true||L.contains("publish.cnet.com:8100")==true){var R="http://publish.cnet.com:8100/av/video/flv/universalPlayer/"+C+".swf";}else{if(L.contains("proxy/preview.html?type=")==true){var R="http://cnettv.cnet.com/av/video/flv/universalPlayer/"+C+".swf";}else{var R="/av/video/flv/universalPlayer/"+C+".swf";}}}}if(this.options.localTest==true){var R="http://publish.cnet.com:8100/av/video/flv/universalPlayer/tests/"+C+".swf";}if(window.location.href.indexOf("playerVersion")>0){var F=Browser.getQueryStringValues().playerVersion;var R="/av/video/flv/universalPlayer/"+F+"/"+C+".swf";}if(this.options.playerType=="Reviews"){if(this.options.image53x40.contains("http://www.download.com")){this.options.image53x40=this.options.image53x40.split("http://www.download.com")[1];}if(this.options.image106x80.contains("http://www.download.com")){this.options.image106x80=this.options.image106x80.split("http://www.download.com")[1];}if(this.options.image320x240.contains("http://www.download.com")){this.options.image320x240=this.options.image320x240.split("http://www.download.com")[1];}}var P=K.getProperty("id").split("universalVideoWrapper")[1];var B=this.options.parentElement;var I=new Swiff(R,{id:"universalPlayer"+P,width:J,height:Q,container:K,params:{wMode:"transparent",bgcolor:"#EDEDED",scale:"noscale",salign:"lt",swLiveConnect:"true",allowScriptAccess:"always",allowFullScreen:"true"},vars:{ddom:Browser.getHost(),parent:true,live:A,parentElement:B,playerIteration:P,playerType:this.options.playerType,name:this.options.playerTitle,autoplay:this.options.autoPlay,externalPlayer:this.options.externalPlayer,geckoPath:this.options.geckoPath,type:this.options.lumiereQueryType,value:E,apiPath:this.options.apiPath,startVolume:this.options.startVolume,expandTabs:this.options.expandTabs,showVideoInfo:this.options.showVideoInfo,hideLeftTab:this.options.hideLeftTab,hideHeader:this.options.hideHeader,copyUrl:this.options.useCurrentPageUrl,userAutoplay:this.options.userAutoplay,displayMuteBtn:this.options.displayMuteBtn,hideTabs:this.options.hideTabs,reviewsVideoOnly:this.options.reviewsVideoOnly,hideBkg:this.options.hideBkg,hideEmailBtn:this.options.hideEmailBtn,playOverlayText:this.options.playOverlayText,adInterval:this.options.adInterval,firstVideoPreRoll:this.options.preRollAd,firstVideoPostRoll:this.options.firstVideoPostAd,contentPostRoll:this.options.contentPostRollAd,adTest:this.options.adTest,adHost:this.options.adHost,relatedVideo:this.options.relatedVideo,externalLinks:this.options.externalLinks,vendorVideo:this.options.vendorVideo,si:this.options.siteId,br:this.options.brandId,ip:this.options.userIP,ua:this.options.userAgent,cid:this.options.assetId,oid:this.options.oid,edid:this.options.editionId,nd:this.options.nodeId,pt:this.options.pageType,ncat:this.options.ncat,guid:this.options.guid,dvarMfg:this.options.dvarMfg,refreshMpuEnabled:this.options.refreshMpuEnabled,ePartner:this.options.ePartner,cpnModule:this.options.cpnModule,refDomain:this.options.refDomain,videoTitle:this.options.videoTitle,productionDate:this.options.productionDate,lengthSecs:this.options.lengthSecs,videoId:this.options.videoId,description:this.options.description,embedable:this.options.embedable,primaryNodeId:this.options.primaryNodeId,primaryNodePath:this.options.primaryNodeId,externalItemId:this.options.externalItemId,externalVideoType:this.options.externalVideoType,downloadable:this.options.downloadable,isTranscriptAvailable:this.options.isTranscriptAvailable,siteId:this.options.siteId,image53x40:this.options.image53x40,image106x80:this.options.image106x80,image320x240:this.options.image320x240,relatedLinkUrls:this.options.relatedLinkUrls,relatedLinks:this.options.relatedLinks,relatedLinkTexts:this.options.relatedLinkTexts,deliveryUrl:this.options.deliveryUrl,downloadUrl:this.options.downloadUrl}});}});var trackEvent=function(B){B=escape(B);var A="http://dw.com.com/redir?destUrl="+escape("http://i.i.com.com/cnwk.1d/b.gif?"+Math.floor(Math.random()*1000));A+="&edid="+this.options.editionId;A+="&oid="+this.options.oid;A+="&onid="+this.options.nd;A+="&siteid="+this.options.si;A+="&ptid="+this.options.pt;A+="&ctype=event";A+="&cval="+B;var C=new Image;C.src=A;dbug.log("trackEvent: &cval="+B);};var checkCookie=function(A){return Number(new Cookie(A).read().toString());};var setCookie=function(C,B,A){new Cookie(C).write(B,A);};var Swiff=new Class({Implements:[Options],options:{id:null,height:1,width:1,container:null,properties:{},params:{quality:"high",allowScriptAccess:"always",wMode:"transparent",swLiveConnect:true},callBacks:{},vars:{}},toElement:function(){return this.object;},initialize:function(L,M){this.instance="Swiff_"+$time();this.setOptions(M);M=this.options;var B=this.id=M.id||this.instance;var A=$(M.container);Swiff.CallBacks[this.instance]={};var E=M.params,G=M.vars,F=M.callBacks;var H=$extend({height:M.height,width:M.width},M.properties);var K=this;for(var D in F){Swiff.CallBacks[this.instance][D]=(function(N){return function(){return N.apply(K.object,arguments);};})(F[D]);G[D]="Swiff.CallBacks."+this.instance+"."+D;}E.flashVars=Hash.toQueryString(G);if(Browser.Engine.trident){H.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";E.movie=L;}else{H.type="application/x-shockwave-flash";H.data=L;}var J='<object id="'+B+'"';for(var I in H){J+=" "+I+'="'+H[I]+'"';}J+=">";for(var C in E){if(E[C]){J+='<param name="'+C+'" value="'+E[C]+'" />';}}J+="</object>";this.object=((A)?A.empty():new Element("div")).set("html",J).firstChild;},replaces:function(A){A=$(A,true);A.parentNode.replaceChild(this.toElement(),A);return this;},inject:function(A){$(A,true).appendChild(this.toElement());return this;},remote:function(){return Swiff.remote.apply(Swiff,[this.toElement()].extend(arguments));}});Swiff.CallBacks={};Swiff.remote=function(obj,fn){var rs=obj.CallFunction('<invoke name="'+fn+'" returntype="javascript">'+__flash__argumentsToXML(arguments,2)+"</invoke>");return eval(rs);};}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();}}});window.addEvent("domready",function(){try{new ShareBar({views:{inline:{position:"top",element:"#contentBody"}}});}catch(A){}});
   }
       
