RCES={"step":0,"steps":0,"width":0,"ac_selected":null,"section":"","subsection":"","currenttip":0,"init":function(){RCES.width=(parseInt($("#stepholder").css("width"),10));RCES.steps=($(".stepitem").length)-1;RCES.section=document.body.id;RCES.subsection=(document.getElementById("main").className);RCES.initStepNavigation();$("#topiccontent li a, .navgroup div a").mouseout(function(){if($.browser.msie){$(".topicpopup").remove()}else{$(".topicpopup").fadeOut(250,function(){$(this).remove()})}});$("a.polllink").click(function(){window.open(this.href,"pollwin","width=520,height=520,scrollbars=yes");return false});RCES.initAccordionNav();RCES.initNavRolloverBubble();RCES.initTopicsBar();RCES.initTips();if(RCES.subsection!="home"){var tsec=$("#topiccontent ."+RCES.subsection);tsec.css("background","url("+$("#topiccontent ."+RCES.subsection+" img").attr("src")+") no-repeat 5px 7px");$("#topiccontent ."+RCES.subsection+" img").attr("src","/img/bg/selected_topic.gif").css("margin","-2px 0 0 0px");if(document.getElementById("accordionnav")&&$("#topiccontent ."+RCES.subsection).length>0){if(tsec.position().left>tsec.parent().parent().width()){var p=(tsec.parent().parent().width()-tsec.position().left);if(p<-72*(tsec.parent().children("li").length)+450){p=-72*(tsec.parent().children("li").length)+450}if(p>0){p=0}tsec.parent().css("margin-left",p+"px")}}}$("a.print").click(function(){window.print();return false});$("#footer a").mouseover(function(){var img=$(this).children("img");img.attr('src',(img.attr('src')).replace(/off/,"ovr"))});$("#footer a").mouseout(function(){var img=$(this).children("img");img.attr('src',(img.attr('src')).replace(/ovr/,"off"))});$("a.polllink").click(function(){window.open(this.href,"pollwin","width=520,height=520,scrollbars=yes");return false});if(RCES.section=="howtovideos"){RCES.initHowToVideos()}if(!$.browser.msie){stflink=$('a[href^=/popup/sendtofriend/?]');stflink.attr('href',stflink.attr('href')+'&t='+escape(document.title)+'&d='+$('meta[name=DESCRIPTION]').attr('content'))}if(!$.browser.msie){stflink=$('a[href^=/popup/sendtofriend/?]');stflink.attr('href',stflink.attr('href')+'&t='+escape(document.title)+'&d='+$('meta[name=DESCRIPTION]').attr('content'))}},"initHowToVideos":function(){$(".videogroup").hide();$("a.videogroupbtn").click(function(){if($(this).attr("title")!=(RCES.ac_selected).attr("title")){$(".videogroup").slideUp(500);$(this).next().slideDown(500);var nm=(RCES.ac_selected).children("img").attr("src");nm=nm.replace(/_on/g,"_off");RCES.ac_selected.children("img").attr("src",nm);RCES.ac_selected=$(this);var nm=$(this).children("img").attr("src");nm=nm.replace(/_off/g,"_on");$(this).children("img").attr("src",nm)}});var secttoload="homephone";if(String(document.location).indexOf("#")>0){var sect=(String(document.location).split("#"))[1];if(sect=="homephone"||sect=="cabletv"||sect=="internet"){secttoload=sect}}RCES.ac_selected=$("#videonav a."+secttoload);var nm=RCES.ac_selected.children("img").attr("src");nm=nm.replace(/_off/g,"_on");RCES.ac_selected.children("img").attr("src",nm);RCES.ac_selected.next().slideDown(0);$(".videogroup a.video").click(function(){$("#landing h3").text($(this).attr("title"));$("#landing h2").text(RCES.ac_selected.attr("title"));RCVID.embed($(this).attr("href"));return false});if(secttoload=="cabletv"){RCVID.init("how-to-use-on-demand")}else if(secttoload=="internet"){RCVID.init("troubleshooting-your-internet-connection")}else{RCVID.init("using-your-voicemail")}},"initNavRolloverBubble":function(){$("#topiccontent li a, .navgroup div a").mouseover(function(){if($(this).attr("title")!=""){$("#topiccontent").append('<div class="topicpopup"><div><p>'+$(this).attr("title")+'</p></div></div>');var pop=$('div.topicpopup');pop.parent().pngFix({blankgif:'/js/blank.gif'});pop.css("left",$(this).position().left+"px");pop.css("top",($(this).position().top-parseInt(pop.height(),10))+"px")}});$("#topiccontent li a, .navgroup div a").mouseout(function(){$(".topicpopup").remove()})},"initTopicsBar":function(){$("#sectionmapcheck").click(function(){var date=new Date();date.setTime(date.getTime()+(365*24*60*6000));var date=new Date();date.setTime(date.getTime()+(365*24*60*6000));if($(this).attr("checked")){document.cookie='rcestop=1; expires='+date.toGMTString()+'; path=/'}else{document.cookie='rcestop=0; expires='+date.toGMTString()+'; path=/'}});$("#sectionmap .option").mouseover(function(){if(!$(this).hasClass("opened")){$(this).css("background-position","0 -22px")}});$("#sectionmap .option").mouseout(function(){if(!$(this).hasClass("opened")){$(this).css("background-position","0 0")}});$("#sectionmap .option").click(function(){if(!$(this).hasClass("opened")){$("#sectionmap").animate({height:($("#sectionmap .sections").height()+20)+"px"},400);$("#sectionmap .sections").animate({marginTop:"0px"},400);$(this).css("background-position","0 -44px");$(this).addClass("opened")}else{$("#sectionmap").animate({height:"22px"},400);$("#sectionmap .sections").animate({marginTop:"-"+$("#sectionmap .sections").height()+"px"},400);$(this).css("background-position","0 0px");$(this).removeClass("opened")}return false});if((document.cookie).indexOf("rcestop=1")>-1||(document.cookie).indexOf("rcestop=")==-1){$("#sectionmap").css("height",($("#sectionmap .sections").height()+20)+"px");$("#sectionmap .sections").css("marginTop","0px");$("#sectionmap .option").addClass("opened");$("#sectionmap .option").css("background-position","0 -44px");$("#sectionmap .option").css("display","block");$("#sectionmapcheck").attr("checked",true)}},"initTips":function(){$(".expanded").css("display","block").hide();$(".tip a.expandbtn").click(function(){$(this).parent().parent().parent().children(".expanded").slideToggle(350);return false});$(".tip a.closebtn").click(function(){$(this).parent().parent().parent().children(".expanded").slideUp();return false});$(".questionbuttons .next").click(function(){RCES.showTip(RCES.currenttip+1);return false});$(".questionbuttons .prev").click(function(){RCES.showTip(RCES.currenttip-1);return false})},"showTip":function(ntip){var res=$(".questiontext .entry");var numtips=res.length;if(ntip>=numtips){ntip=0}else if(ntip<0){ntip=numtips-1}res.eq(RCES.currenttip).css("display","none");res.eq(ntip).css("display","block");res=$(".answertext .entry");res.eq(RCES.currenttip).css("display","none");res.eq(ntip).css("display","block");RCES.currenttip=ntip},"initAccordionNav":function(){if(document.getElementById("accordionnav")){$("#cabletopichd").hide();$("#cabletopicpvr").hide();$("#cabletopicsd").hide();RCES.ac_selected=$("#cabletopicsd");if(RCES.subsection!="home"){var actemp=$("#accordionnav ."+RCES.subsection);if(actemp.length){RCES.ac_selected=actemp.parent().parent()}}RCES.ac_selected.show();RCES.ac_selected.addClass("open");var c=(RCES.ac_selected).attr("id");RCES.turnon($("a.cabletopicmore."+c+" img"));if(c!="cabletopicsd"){$(".accprevnext").hide()}$("a.cabletopicmore").click(function(){var navitem=$(this).parent().parent().next();if(!navitem.hasClass("open")){var c=(RCES.ac_selected).attr("id");RCES.turnoff($("a.cabletopicmore."+c+" img"));if(navitem.attr("id")!="cabletopicsd"){$(".accprevnext").hide()}else{$(".accprevnext").show()}RCES.ac_selected.hide(900);RCES.ac_selected.removeClass("open");RCES.ac_selected=navitem;RCES.ac_selected.show(900);RCES.ac_selected.addClass("open");RCES.turnon($(this).children("img"))}return false})};RCES.nav={"interval":0,"dir":0,"target":null};RCES.scrollNav=function(){var p=(parseInt(RCES.nav.target.css("margin-left"))+20*RCES.nav.dir);if(p<0&&p>-72*(RCES.nav.target.children("li").length)+450){RCES.nav.target.css("margin-left",p+"px")}else if(p>-72){RCES.nav.target.css("margin-left","0px")}};$("a.navnext").mouseover(function(){var f=$(this).parent().parent().prev().children("ul");RCES.nav.target=f;RCES.nav.dir=-1;RCES.nav.interval=setInterval(RCES.scrollNav,55)});$("a.navprev").mouseover(function(){var f=$(this).parent().parent().next().children("ul");RCES.nav.target=f;RCES.nav.dir=1;RCES.nav.interval=setInterval(RCES.scrollNav,55)});$("a.navnext").mouseout(function(){clearInterval(RCES.nav.interval)});$("a.navprev").mouseout(function(){clearInterval(RCES.nav.interval)})},"turnon":function(img){var nm=img.attr("src");if(nm){img.attr("src",nm.replace(/_off/g,"_on"))}},"turnoff":function(img){var nm=img.attr("src");if(nm){img.attr("src",nm.replace(/_on/g,"_off"))}},"initStepNavigation":function(){if(RCES.steps>0){$("#stepholder").prepend('<div id="stepcounter"></div>');$("#stepcounter").click(function(e){var xpos=(e.pageX-$(this).offset().left);RCES.gotoStep(Math.floor(xpos/83))});$("#stepcounter").addClass("step"+(1+RCES.steps));$("#nextpage, .nextpage").click(RCES.next);$("#previouspage, .previouspage").click(RCES.previous).hide();RCES.keyinput=new Array();$(document).keypress(function(e){var k=e.keyCode;if(k==0){k=e.which}RCES.keyinput.push(k);if(RCES.keyinput.length>11){RCES.keyinput.shift()}if(RCES.keyinput.join(",")=="38,38,40,40,37,39,37,39,98,97,13"){$("#subsection").css("height","auto");$("#landing").css("height","auto");$("#subsection div.content").css("height","auto");$("#stepholder").css("height","auto");$("#stepcontent").css("width","auto");$("#stepcontent").css("margin-left","0");$("#previouspage, .previouspage, #nextpage, .nextpage").hide();$("#stepcounter").hide();$(".stepitem").css("margin-bottom","20px")}if(k==106){RCES.next()}else if(k==107){RCES.previous()}})}else{$("#nextpage, .nextpage").hide();$("#previouspage, .previouspage").hide();$(".nextsection").css("display","block")}if(RCES.subsection=="learnaboutyourrogersremotecontrol"){$("a.showfive").click(function(){$(".remotefive").css("display","block");$(".remotethree").css("display","none")});$("a.showthree").click(function(){$(".remotefive").css("display","none");$(".remotethree").css("display","block")})}},"gotoStep":function(s){if(s>RCES.steps){s=RCES.steps}if(s>=0){RCES.step=s;$("#previouspage, #nextpage").show();RCES.changeStep(null)}},"next":function(){if(RCES.step+1<=RCES.steps){RCES.step++;RCES.changeStep(this);$("#previouspage").show()}return false},"previous":function(){if(RCES.step-1>=0){RCES.step--;RCES.changeStep(this);$("#nextpage").show()}return false},"changeStep":function(item){$("#stepcontent").animate({marginLeft:(-RCES.step*RCES.width)+"px"},500);$("#stepcounter").css("background-position","0 "+(-RCES.step*parseInt($("#stepcounter").css("height")))+"px");if(RCES.step<=0){$("#previouspage").hide();$("#previoussection").show()}else{$("#previoussection").hide()}if(RCES.step>=RCES.steps){$("#nextpage").hide();$(".nextsection").css("display","block")}else{$(".nextsection").css("display","none")}return false}};RCVID={"path":"http://www.rogershelp.com/newVideo/content/","videos":[{"id":"usingyourvoicemail","file":"VTS_05_1.mp4","section":"Home Phone","name":"Using your voicemail"},{"id":"troubleshootingwithyourrogershomephone","file":"VTS_13_1.mp4","section":"Home Phone","name":"Troubleshooting with your Rogers Home Phone"},{"id":"howtouseondemand","file":"VTS_24_1.f4v","section":"Cable TV","name":"How to use On Demand"},{"id":"useyourrogersremotecontrol","file":"VTS_10_1.mp4","section":"Cable TV","name":"Use your Rogers remote control"},{"id":"discoveryourinteractiveprogramguide","file":"VTS_11_1.mp4","section":"Cable TV","name":"Discover your interactive program guide"},{"id":"useparentalcontrols","file":"VTS_06_1.mp4","section":"Cable TV","name":"Use parental controls"},{"id":"howtouseyourhdtvdigitalbox","file":"VTS_12_1.mp4","section":"Cable TV","name":"How to use your HDTV digital box"},{"id":"howtouseyourpvr","file":"VTS_09_1.mp4","section":"Cable TV","name":"How to use your PVR"},{"id":"maximizeyourpvrstorage","file":"VTS_22_1.f4v","section":"Cable TV","name":"Maximize your PVR storage"},{"id":"connectingyourvcr","file":"VTS_17_1.f4v","section":"Cable TV","name":"Connecting your VCR"},{"id":"optimizeyourtvexperience","file":"VTS_08_1.mp4","section":"Cable TV","name":"Optimize your TV Experience"},{"id":"recordingfrompvrtovcrdvd","file":"VTS_23_1.f4v","section":"Cable TV","name":"Recording from PVR to VCR/DVD"},{"id":"troubleshootingdigitaltv","file":"VTS_15_1.mp4","section":"Cable TV","name":"Troubleshooting: Digital TV"},{"id":"discoverthenewquickstartmenu","file":"/swf/video/QuickStart.flv","section":"Cable TV","name":"Discover the new Quick Start menu"},{"id":"troubleshootingyourinternetconnection","file":"VTS_14_1.mp4","section":"Internet","name":"Check your internet connection"},{"id":"optimizeyourinternet","file":"VTS_21_1.f4v","section":"Internet","name":"Optimize your internet"},{"id":"usewebmail","file":"VTS_26_1.f4v","section":"Internet","name":"Use webmail"},{"id":"installingawirednetwork","file":"VTS_18_1.f4v","section":"Internet","name":"Installing a Wired Network"},{"id":"installingawirelessnetwork","file":"VTS_19_1.f4v","section":"Internet","name":"Installing a Wireless Network"},{"id":"internetusage","file":"VTS_01_1.mp4","section":"Internet","name":"Internet Usage"},{"id":"trackyourinternetusage","file":"VTS_02_1.mp4","section":"Internet","name":"Track your internet usage"},{"id":"secureyourwirelessrouter","file":"VTS_25_1.f4v","section":"Internet","name":"Secure Your Wireless Router"}],"current":0,"embedSWF":function(vitem){if(vitem!=null){var fpath=RCVID.path;if(vitem.file.indexOf("/")>=0){fpath=""}var params={allowscriptaccess:"always"};var flashvars={file:fpath+vitem.file,controlbar:"over",image:fpath+vitem.file.substr(0,vitem.file.indexOf("."))+".jpg",title:vitem.name,fullscreen:"true",enablejs:"true"};var attributes=false}var f=swfobject.embedSWF('/swf/player.swf','videobox','528','352','9.0.115.0',"/swf/expressinstall.swf",flashvars,params,attributes);$("a.nextvideo").text("Next ("+RCVID.videos[RCVID.next()].name+")");$("#vidname").text(vitem.name);$("#videosection").text(vitem.section)},"init":function(vid){$("a.previousvideo").click(function(){RCVID.current=RCVID.prev();RCVID.embedSWF(RCVID.videos[RCVID.current]);return false});$("a.nextvideo").click(function(){RCVID.current=RCVID.next();RCVID.embedSWF(RCVID.videos[RCVID.current]);return false});RCVID.embed(vid)},"embed":function(vid){var vname=vid;if(vid.indexOf("video/")>0){var start=vid.indexOf("video/")+6;vname=vid.substr(start,vid.lastIndexOf("/")-start)}vname=vname.replace(/-/g,"");vid=RCVID.getVideoNumById(vname);RCVID.current=vid;if(pageTracker){pageTracker._trackPageview("/video/embed/"+vname)}if(vid!=null){var vitem=RCVID.videos[RCVID.current];RCVID.embedSWF(vitem)}return vname},"getVideoNumById":function(id){for(var i=0,len=RCVID.videos.length;i<len;i++){if(RCVID.videos[i].id==id){return i}}return null},"next":function(){var n=RCVID.current+1;if(n>=RCVID.videos.length){n=0}return n},"prev":function(){var n=RCVID.current-1;if(n<0){n=RCVID.videos.length-1}return n}};$(document).ready(function(){$("#logo").pngFix();$("#topics").pngFix();RCES.init();$("a[href^='http://']").click(function(){if(pageTracker){pageTracker._trackPageview("/outbound/"+(this.href.substr(7)))}});$("a[href$='.pdf']").click(function(){if(pageTracker){pageTracker._trackPageview(this.href)}})});function fillSearch(){domain="";sQuery=$('#page_query').html();$.ajax({url:"/sphider/search.php?search=1&urlType=1&domain="+domain+"&query="+sQuery,cache:false,success:function(html){$("#search_results").html(html)}});$.ajax({url:"/sphider/search.php?search=1&urlType=2&domain="+domain+"&query="+sQuery,cache:false,success:function(html){$("#search_pdfs").html(html)}});$.ajax({url:"/sphider/search.php?search=1&urlType=3&domain="+domain+"&query="+sQuery,cache:false,success:function(html){$("#search_videos").html(html)}})}function slideSwitch(){var $active=$('#getstartedtv IMG.active');if($active.length==0)$active=$('#getstartedtv IMG:last');var $sibs=$active.siblings();var rndNum=Math.floor(Math.random()*$sibs.length);var $next=$($sibs[rndNum]);$active.addClass('last-active');$next.css({opacity:0.0}).addClass('active').animate({opacity:1.0},1000,function(){$active.removeClass('active last-active')})}function slideSwitchprog(){var $active=$('#hdprogtv IMG.active');if($active.length==0)$active=$('#hdprogtv IMG:last');var $sibs=$active.siblings();var rndNum=Math.floor(Math.random()*$sibs.length);var $next=$($sibs[rndNum]);$active.addClass('last-active');$next.css({opacity:0.0}).addClass('active').animate({opacity:1.0},1000,function(){$active.removeClass('active last-active')})}$(document).ready(function(){if(RCES.subsection=="welcometohd"||RCES.subsection=="discoverhdprogramming"){var $firstactive=$('#getstartedtv IMG');var $sibs=$firstactive.siblings();var rndNum=Math.floor(Math.random()*$sibs.length);var $firstnext=$($sibs[rndNum]);$firstnext.addClass('active');setInterval("slideSwitch()",2500);var $firstactiveprog=$('#hdprogtv IMG');var $sibs=$firstactiveprog.siblings();var rndNum=Math.floor(Math.random()*$sibs.length);var $firstnext=$($sibs[rndNum]);$firstnext.addClass('active');setInterval("slideSwitchprog()",2500)}});