
// this is what gets run when the page loads
$(document).ready(function(){

	if(PC.isEditMode){ return; }	// we want it to be fast

    // handle barker list types without overlays
    PC.makeBlockAnchors(".barkerList dl:not(.disabled)", "mouseover");	// pass in jquery selector and hover css class
    
    // handle barker list types with overlays
    //PC.makeBlockAnchorsWithOverlays(".barkerBlockPromo dl:not(.disabled)", "mouseover");	// pass in jquery selector and hover css class
    //PC.makeBlockAnchorsWithOverlays(".barkerBlockLP dl:not(.disabled)", "mouseover");	// pass in jquery selector and hover css class

    
	// inject the logo with flash that shows the air date.  the PC.currentDateKey will be passed to the flash
	// only do it if there is a currentDateKey
	var headerIdentityDiv2 = document.getElementById("headerIdentityDiv2");
	var html = "";
	if(PC.currentDateKey){
		/*In the future if you have more than one element being placed into the headerIdentityDiv dynamically make sure they are not dependent upon one another.*/
		var file = "http://www.bet.com/Assets/BET/Published/application/x-shockwave-flash/850d9083-8573-1b5f-fc9f-26c21b0849bb-RTRW08ToptDate.swf";
		html = "<div style=\"width: 400px; height: 72px; position: relative; left: 280px; bottom: 6px; z-index: 1;\">";
		html += PC.getFlashHtml(400, 72, file, 8, "", FlashWMode.Transparent, "", true, true);
		html += "</div>";	
		headerIdentityDiv2.innerHTML = html;
		
	}
	
	html = headerIdentityDiv2.innerHTML;
	html += "<div style=\"width: 263px; height: 61px; position: relative; background: transparent url(/WebApplications/betRoot/includes/theme/rtrw2008/img/rtr08_header_blog_graphic.jpg) no-repeat; top: 4px; float: right; right: 23px;\">";
	html += '<table style="position: relative; top: 23px; height: 25px;"><tr>';
	html += '<td style="font-size: 9px; font-weight: bold; padding-left: 5px; width: 86px; text-transform: uppercase;">Looking for Lauren London</td>';
	html += '<td style="text-align: center; width: 37px;"><a href="http://blogs.bet.com/specials/rtrw08/" target="_blank"><img style="z-index: 10;" height="22px" width="21px" src="/WebApplications/betroot/includes/theme/rtrw2008/img/rtr08_blogArrow_1.jpg" alt="GO!"/></a></td>';
	html += '<td style="font-size: 9px; font-weight: bold; padding-left: 5px; width: 86px; text-transform: uppercase;">P.O.V. - Fashion &amp; Runway</td>';
	html += '<td style="text-align:center; width: 37px;"><a href="http://blogs.bet.com/lifestyle/headoverheels/" target="_blank"><img style="z-index: 10;" height="22px" width="21px" src="/WebApplications/betroot/includes/theme/rtrw2008/img/rtr08_blogArrow_2.jpg" alt="GO!"/></a></td>';
	html += '</tr></table>';
	html += "</div>";
	headerIdentityDiv2.innerHTML = html;
	
	
	// on the comments hr element, we need to add a div to get the faded line
	$("div.commentsDiv hr").replaceWith("<div class=\"hrDiv\"></div>");
	
	
	
	
	
});


// set the currentDateKey based on a DateMap
// setup a DateMap to map the current date to a mappedValue.  this will be passed into the flash items.
var dateMap = new DateMap();
dateMap.addMapBegin("0");	// no start date means it is already started
dateMap.addMapBegin("1", 2008, 3, 5, 0, 0, 0);
dateMap.addMapBegin("2", 2008, 3, 8, 0, 0, 0);
// below is how to add an item with an endDate
var item = dateMap.addMapBegin("1000", 2008, 3, 9, 0, 0, 0);
item.setEndDate(2008, 3, 9, 2, 0, 0);   // add the endDate

// set the currentDateKey of the PageController.  this will be passed in to the flash.
PC.currentDateKey = dateMap.getValue(PC.originServeDate);









