
// 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/eae72412-3f8c-8ae1-b40d-a059cf93e8e9-SB08ToptDate.swf";
		html = "<div style=\"width: 313px; height: 43px; position: relative; left: 313px; top: 35px; z-index: 1;\">";
		html += PC.getFlashHtml(313, 43, file, 8, "", FlashWMode.Transparent, "", true, true);
		html += "</div>";	
		headerIdentityDiv2.innerHTML = html;
		html += "<div style=\"width: 263px; height: 61px; position: relative; background: transparent url(/WebApplications/betRoot/includes/theme/spr2008/img/sb08_comp_header_blog_graphic.jpg) no-repeat; bottom: 39px; float: right; right: 4px;\">";
		html += '<table style="position: relative; top: 26px; height: 29px;"><tr>';
		html += '<td style="font-size: 11px; font-weight: bold; padding-left: 5px; width: 86px; text-transform: uppercase; text-align: right; vertical-align:center;">Spring Bling POV</td>';
		html += '<td style="text-align:center; width: 37px;"><a href="http://blogs.bet.com/specials/sb08" target="_blank"><img style="z-index: 10;" height="22px" width="21px" src="/WebApplications/betroot/includes/theme/spr2008/img/sb08_blogArrow_left.jpg" alt="GO!"/></a></td>';
		html += '<td style="font-size: 11px; font-weight: bold; padding-left: 5px; width: 86px; text-transform: uppercase; text-align: right; vertical-align:center;">Sound Off Blog</td>';
		html += '<td style="text-align:center; width: 37px;"><a href="http://blogs.bet.com/music/soundOff/?cat=187" target="_blank"><img style="z-index: 10;" height="22px" width="21px" src="/WebApplications/betroot/includes/theme/spr2008/img/sb08_blogArrow_rght.jpg" alt="GO!"/></a></td>';
		html += '</tr></table>';
		html += "</div>";
		headerIdentityDiv2.innerHTML = html; 
		
	}
	else {
		html = headerIdentityDiv2.innerHTML;
		html += "<div style=\"width: 263px; height: 61px; position: relative; background: transparent url(/WebApplications/betRoot/includes/theme/spr2008/img/sb08_comp_header_blog_graphic.jpg) no-repeat; top: 4px; float: right; right: 4px;\">";
		html += '<table style="position: relative; top: 26px; height: 29px;"><tr>';
		html += '<td style="font-size: 11px; font-weight: bold; padding-left: 5px; width: 86px; text-transform: uppercase; text-align: right; vertical-align:center;">Spring Bling POV</td>';
		html += '<td style="text-align:center; width: 37px;"><a href="http://blogs.bet.com/specials/sb08" target="_blank"><img style="z-index: 10;" height="22px" width="21px" src="/WebApplications/betroot/includes/theme/spr2008/img/sb08_blogArrow_left.jpg" alt="GO!"/></a></td>';
		html += '<td style="font-size: 11px; font-weight: bold; padding-left: 5px; width: 86px; text-transform: uppercase; text-align: right; vertical-align:center;">Sound Off Blog</td>';
		html += '<td style="text-align:center; width: 37px;"><a href="http://blogs.bet.com/music/soundOff/?cat=187" target="_blank"><img style="z-index: 10;" height="22px" width="21px" src="/WebApplications/betroot/includes/theme/spr2008/img/sb08_blogArrow_rght.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, 4, 11, 0, 0, 0);
dateMap.addMapBegin("2", 2008, 4, 12, 0, 0, 0);
// below is how to add an item with an endDate
var item = dateMap.addMapBegin("1000", 2008, 4, 13, 0, 0, 0);
item.setEndDate(2008, 4, 14, 0, 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);









