var showEpgDvrTab=true;(function(){var b=jQuery;if(typeof Prototype!=="undefined"){jQuery.noConflict()}document.write("<div id='epgNavPlaceholder'></div><div id='regionSelectPlaceholder'></div>");var a=function(){var u={tab:tab};if((typeof(u.tab)=="undefined")||(u.tab=="")){u.tab="tvlistings"}var F=PgmSrch.load.getBasePath();var k=PgmSrch.load.getBasePath()+"/images/epg/nav2/";var h={tvlistings:{guide:["Guide",F+"/grid.shtml"],alerts:["Manage Alerts",F+"/epgAlerts.jsp"],settings:["Settings",F+"/viewSettings.do?target=pvrForm"],lineup:["Find Another Channel Lineup",""]},dvr:{recordings:["Recordings",F+"/webdvr/managerecordings.do"],preferences:["Online  Preferences",F+"/webdvr/manageprofile.do"]}};for(var H in h){if(H!=="tvlistings"){b(".navSrchWrapper").hide()}else{b(".navSrchWrapper").show()}}if((typeof(h[tab])!=="undefined")){if(typeof(section)!=="undefined"){u.section=section}var j="topbar_btm_left.jpg";var r="topbar_btm_right.jpg";var d="topbar_btm_bg_repeat.jpg";var p="38px";var D="91px"}else{u.section=null;var j="topbar_btm_short_left.jpg";var r="topbar_btm_short_right.jpg";var d="topbar_btm_short_midd.jpg";var p="27px";var D="70px";b(".navSrchWrapper, .navPointerLine").hide()}var i=function(J){var I;for(prop in J){I=prop}return prop};thisPageSubNavs=h[u.tab];var y="";if(typeof thisPageSubNavs!=="undefined"){for(var H in thisPageSubNavs){var f=thisPageSubNavs[H];var g=H===u.section?false:true;if(g&&H!=="lineup"){y+="<a href='"+f[1]+"'>"}else{if(H==="lineup"){y+="<a href='#' class='chooseLineUp'>"}}y+=f[0];if(g){y+="</a>"}if(H!==i(thisPageSubNavs)){y+="<span class='linkSpacer'>|</span>"}}}if(u.tab=="dvr"){b(".navSrchWrapper").hide()}else{b(".navSrchWrapper").show()}var x='        <style type="text/css"> 	    	img {border:none;} 	    	.epgNavWrapper {font-family:"Lucida Grande",verdana,"Lucida Sans Unicode",sans-serif;color:#555; margin-top: 0px; height: '+D+"} 	    	.topbar {width:972px !important;margin:10px 0px 0px 0px;} 	    	.topbar .left { 				height:49px; 				background:url("+k+"topbar_left.jpg) top left no-repeat; 			} 	    	.topbar .right { 				height:49px; 				background:url("+k+"topbar_right.jpg) top right no-repeat;margin-left:166px;} 	    	.topbar .repeat {position:relative;height:49px;background:url("+k+"topbar_bg_repeat.jpg) top left repeat-x;margin-right:11px;} 	    	.navLinksWrapper {position:absolute;top:0px;left:-166px;height:49px;width:450px;background:url("+k+"topbar_logo_io.jpg) top left no-repeat;z-index:10;} 	    	.navLinks {padding:15px 0px 0px 48px; text-align:left;} 	    	.navLinks span, .navLinks a {font-size:15px;letter-spacing:1;color:#fff;text-decoration:none} 	    	.navLinks a:hover {text-decoration:underline;color:#ffffff;} 	    	.navLinks a.selected {color:#000;} 	    	.navLinks .linkSpacer {margin:0px 12px;font-size:15px;font-weight:bold;color:#fff;} 	    	.navSrchWrapper {position:absolute;top:0px;left:300px;height:49px;width:450px;padding:0;margin:5px 0 0;} 	    	#navsearch {position:relative;top:0px;left:0px;display:inline;padding:0px;margin:0px;} 	    	.searchIcon {margin:-5px 0 0} 	    	.epgNavWrapper #epgSrch {width:242px;height:18px;border:1px solid #cacfd2;background-color:#FFFFFF;font-size:11px;color:#333333;padding:3px 0px 0px 5px;margin:6px 5px 0 0;} 	    	.navBtmLt { 				margin:0px; 				height:"+p+"; 				width:972px; 				background:url("+k+""+j+") top left no-repeat; 			} 	    	.navBtmRt { 				height:"+p+"; 				background:url("+k+""+r+") top right no-repeat; 				margin-left:11px; 			} 	    	.navBtmRepeat { 				position:relative; 				height:"+p+"; 				background:url("+k+""+d+") top left repeat-x; 				margin:0px 11px 0px 0px; 				padding:0px; 			} 	    	.navPointerLine {position:relative;top:-1px;padding:0px;height:15px;height:none;width:375px;background:url("+k+"topbar_pointer_line.jpg) repeat-x;margin:0px;padding:0px;} 	    	.navPointer {position:absolute;top:-15px;left:110px;} 	    	.ondemand {left:240px;} 	    	.dvr {left:340px;} 	    	.epgNavWrapper .search, .chooseRegion {display:none} 	    	.navSubLinks {margin: -4px 0 0 0;} 	    	.navSubLinks .contentLt {margin-left:5px;} 	    	.navSubLinks .contentRt {float:right;margin:0 50px;} 	    	.navSubLinks .linkSpacer {margin:0px 10px;} 			.navSubLinks a.selected {text-decoration: none; } 	        .chooseLineUp:hover {color:#0175AC;text-decoration:none;cursor: pointer;} 			 			 	    </style>	 	    ";tabNavs='	    <div class="epgNavWrapper">	    	<div class="topbar">	    		<div class="left">	    			<div class="right">	    				<div class="repeat">	    					<div class="navLinksWrapper">	    						<div class="navLinks">	    						    <a href="http://optimum.net/TV"><span>TV</span></a>	    						    <a href="'+F+'/grid.html" style="margin-left:24px;">TV Listings</a>	    						    <span class="linkSpacer">|</span>	    						    <a href="http://www.optimum.net/VOD/movies?cat=Movies+On+Demand">On Demand</a>	    						    <span class="linkSpacer">|</span><a href="'+F+'/webdvr/managerecordings.do">DVR</a></div>	    					</div>	    					<div class="navSrchWrapper">	    						<img src="'+k+'topbar_search_icon.jpg" width="70" height="49" align="absmiddle" class="searchIcon" /><input type="Text" name="searchtxt" id="epgSrch" value="'+PgmSrch.cnst.defaultSearchBoxText+'" /><input type="Image" id="veveoSearchBtn" class="searchbtn" src="'+k+'topbar_search_btn.jpg" width="79" height="32" onmouseover="this.src=\''+k+"topbar_search_btn_over.jpg ';\" onmouseout=\"this.src='"+k+'topbar_search_btn.jpg\';" align="absmiddle" />	    					</div>	    				</div>	    			</div>	    		</div>				    		<div class="navBtmLt">	    			<div class="navBtmRt">	    				<div class="navBtmRepeat">	    					<div class="navPointerLine"></div>	    						    					<img src="'+k+'topbar_pointer.gif" width="45" height="19" class="navPointer '+u.tab+'" />	    					<div class="navSubLinks">	    						<span class="contentLt">'+y+'</span>	    					</div>				    				</div>	    			</div>	    		</div>	    	</div>	    </div>	    <div class="chooseRegion" style="display:none;"></div>	    ';b("head").append(x);b("#epgNavPlaceholder").replaceWith(tabNavs);var n=445;var A=760;var c=b(window).height();var t=b(window).width();var e=b("body").offset();var B=(c-n+e.top)/4;var q=(t-A)/2;var z="/zipCodeLookup.jsp?";var G="/confirmChannelLineups.do?";var s=function(){return document.cookie.indexOf("oolpantry=")!=-1};var m=function(){return document.cookie.indexOf("oolpantry=epgRegion=20054|epgDRS=Y")!=-1};b(".chooseLineUp").live("click",function(){b("body").css("overflow","hidden");b("#overlay").css("display","inline");b("#zipCode_popup_wrapper").css("top",B+"px").css("left",q+"px").appendTo("body");b("#zipCode_popup_wrapper, #overlay").show();b("select").hide()});b(".closeZip").live("click",function(){b("#zipCode_popup_wrapper, #overlay").hide();b("body").css("overflow","visible");b("select").show()});b(".zipField").live("click",function(){if(b(".zipField").val()==="Enter Zip Code"){b(".zipField").val("")}});b(".zipError").hide();b(".zipSubmit").live("click",function(){l();return false});b(".zipField").live("keydown",function(I){if(I.keyCode==13){l();return false}});var l=function(){var I=b(".zipField").val();b(".confirmLineup").hide();b(".zipError, .confirmLineup").empty();b(".zipError").html("Loading channel lineup data...").show("slow");b.ajax({url:z,type:"GET",data:{zip:I},dataType:"json",contentType:"application/json; charset=utf-8",error:function(K,J){if(J=="parsererror"){b(".zipError").html("No data for "+I+". Please try again.").show()}},success:function(J){if(J.zipCode.length===1){b(".zipError").empty();if(m()){document.cookie="oolpantry=; expires=Thu, 2 Aug 2001 20:47:11 UTC; path=/; domain=.optimum.net;"}b.each(J.zipCode,function(K,L){b.ajax({type:"GET",url:G,data:{confirmChannelLineupFormAction:"yes",region:L.channelLineUp,zipCode:I},dataType:"json",contentType:"application/json; charset=utf-8",complete:function(){b("#regionCode").hide();b(".chooseLineUp, .navSubLinks .linkSpacer:last").show();b(".zipError").html("Your channel line-up has been set. This page will reload momentarily.").show();setTimeout(location.reload(true),10000)}})})}else{if(J.zipCode.length>=2){b(".zipError").empty();b(".confirmLineup").html(w);b.each(J.zipCode,function(M,O){var N=O.cityList.toString();var L=O.cityPortionsList.toString();var K="";K+="<div class=' "+O.channelLineUp+"'>";K+="<input type='radio' name='regioncode' value='"+O.channelLineUp+"' />";K+="<input type='hidden' name='zipcode' value='"+I+"' />";if(O.cityList.length){K+="<label>Channel Lineup for the following towns: </label>";K+="<ul class='cityList'><li>"+N+"</li></ul><br />"}if(O.cityPortionsList.length){K+="<br /><label>Portions of: </label>";K+="<ul class='cityPortionsList'><li>"+L+"</li></ul><br />"}K+="<br /></div>";b(".lineupList").append(K)});b(".lineUpSubmit").live("click",function(){b(".zipError").empty();var K=b("input[name='regioncode']:checked").val();if(m()){document.cookie="oolpantry=; expires=Thu, 2 Aug 2001 20:47:11 UTC; path=/; domain=.optimum.net;"}b.ajax({type:"GET",url:G,data:{confirmChannelLineupFormAction:"yes",region:K,zipCode:I},dataType:"json",contentType:"application/json; charset=utf-8",complete:function(){b(".confirmLineup").hide();b(".chooseLineUp, .navSubLinks .linkSpacer:last").show();b(".zipError").html("Your channel line-up has been set. This page will reload momentarily.").show();setTimeout(location.reload(true),10000)}})});b(".confirmLineup").show()}else{b(".zipError").html("No data for "+I+". Please try again.").show()}}}})};var o='	    <style type="text/css">	    #zipCode_popup_wrapper {	    	height:499px;	    	opacity:1;	    	position:absolute;	    	width:760px;	    	z-index:1010;	    }	    #zipCode_shadow {	    	background-color:#000000;	    	height:487px;	    	left:9px;	    	opacity:0.1;	    	position:absolute;	    	top:9px;	    	width:748px;	    	z-index:1100;	    	}	    #zipCode {	    		text-align:left;	    		background-color:#FFFFFF;	    		height:479px;	    		left:13px;	    		opacity:1;	    		overflow:hidden;	    		position:absolute;	    		top:13px;	    		width:740px;	    		z-index:1200;	    }	    #zipCode form {	    	margin: 10px 10px 5px 20px; 	    }	    .zipLabel {	    	 margin: 10px 0 10px 10px;	    }	    .confirmLineup {	    	display: none;	    	margin: 10px auto;	    	padding:0 10px 10px;	    	border: 1px solid #E2ECF7;	    	width:675px;	    	height:360px;	    }	    .zipError {	    	color: #666;	    	margin: 10px 0 10px 50px;	    	display: block;	    }		    input.zipField {	    	border: 1px solid #BEC4C8;	    	background: #FDFF82;	    }	    fieldset { border:none;}	    form.lineUp ul li{	     margin: 0;	      display:block;	      float:left;	    background-image: none;	      _display:inline;	      _float:none;	     }	    .cityList, .cityPortionsList {	    	margin: 0 0 0 20px;	    	display: block;	    }	     form.lineUp ul li::after{	      content:", ";	      white-space:pre;	     }	     	     form.lineUp ul li:last-child::after{	      content:"";	     }	     form.lineUp ul + *{	      clear:left;	     }		    .lineUpSubmit, .zipSubmit {	    	background: #303030;	    	color: #FFFFFF;	    	text-transform: uppercase;	    }	    .lineupList label {	    	display:block;	    	margin:-12px 0 0 30px;	    }	    .lineUp, .cityList li {display:inline;}	    .lineup label {width: 300px;}	    .lineupList {padding:5px 10px;height: 310px;overflow-y:scroll;overflow-x:hidden;width: 388px; margin-top:10px; max-height:285px;background: #E2ECF7;float:left;}	    .lineupList input {display: inline;}	    .lineupHelp {margin:11px 0 0 20px;padding:5px;width:188px;float:left;background:#EFF4FA;}	    #regionCode{margin:0 2px 0 5px;padding:4px 0 0;border:1px solid #C4D9E7;background:#E3EEF6;}	    .regionCode{margin: 0;}	    </style>	    ';var E='	    <div id="regionCode" >	    <form method="POST" class="regionCode">  	       <fieldset>  	         <label class="zipLabel" for="zipSubmit">To see the TV Channels for your area, please sign in or enter your zip code:</label>	         <input type="text" name="zipCode" size="11" value="Enter Zip Code" class="zipField" />  	         <input type="button" class="zipSubmit" name="zipSubmit" value="go" />  	       </fieldset>  	    </form> 	    <span class="zipError">	    </span>	    <div class="confirmLineup">	    </div>	    </div>	    ';var v='	    <div id="zipCode" >	    <form method="POST" class="zipCode">  	       <fieldset>  	         <p>To see TV listings in a different area, enter the ZIP code below and click "GO".</p>	         <label class="zipLabel" for="zipSubmit">ZIP Code : </label>	         <input type="text" name="zipCode" size="11" value="Enter Zip Code" class="zipField" />  	         <input type="button" class="zipSubmit" name="zipSubmit" value="go" />  	       </fieldset>  	    </form> 	    <span class="zipError">	    </span>	    <div class="confirmLineup">	    </div>	    </div>	    ';var C='	    <div id="zipCode_popup_wrapper" style="display:none;">	    <div id="zipCode_shadow"></div>	    '+v+'	    <div id="close_button" class="closeZip" style="position: absolute; top: 0px; left: 0px; z-index: 1300; opacity: 1;">	    <img border="0" src="/images/epg/x_div.png"/>	    </div>	    </div>	    ';var w='	    <form method="POST" class="lineUp">		<fieldset>		<label for="lineUpSubmit"><strong>We have found the following channel lineup for this ZIP. Please select your area and click "Select Lineup".</strong></label>	 	<input type="button" class="lineUpSubmit" value="Select Lineup" />	 	<div class="lineupList"></div>	 	<div class="lineupHelp">	 		<p>Need to select from multiple lineups?</p>	 		<p>Your town may be listed in more than one lineup.</p>	 		<p>This means that parts of your town may be in one lineup and parts may receive another.</p>	 		<p>Select one of the lineups listed to check the lineup against the one on your TV.</p>	 	</div>	 	</fieldset>	 	</form>	 	';b("head").append(o);if(m()||!s()){b(".chooseRegion").replaceWith(E);b("#regionCode").addClass("nocookie").show();b(".chooseLineUp, .navSubLinks .linkSpacer:last, .zipError").hide()}else{b("#regionSelectPlaceholder").replaceWith(C);b(".chooseLineUp, .navSubLinks .linkSpacer:last").show()}};if(typeof PgmSrch==="undefined"){jQuery.getScript(basePath+"/js/veveo_search/veveoSearchBundled.min.js",function(){var c=function(){if(typeof PgmSrch!=="undefined"){a()}else{setTimeout(c,10)}};c()})}else{a()}})();