
// 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
	var headerIdentityDiv2 = document.getElementById("headerIdentityDiv2");
	var html = headerIdentityDiv2.innerHTML;
	html += '<div style="width:200px;float:right;position:relative;top:16px;right:8px;">';
	html += '<a href="http://www.bet.com/specials/betawards08/">';
	html += '<img src="/webapplications/betroot/includes/theme/mbib2008/img/mbib_backtobetawards.gif" />';
	html += '</a></div>';
	headerIdentityDiv2.innerHTML = html;
    
	// 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

	
	// on the comments hr element, we need to add a div to get the faded line
	$("div.commentsDiv hr").replaceWith("<div class=\"hrDiv\"></div>");
	
	
	/*var xsbList = document.getElementById("extraSmallBarkerListDiv2");*/
	/*var header = "";
	header+='<div class="msnTitle">';
	header+='<a target="_blank" href="http://www.msn.com">More on MSN ></a>';
	header+='</div>';
	
	$(".extraSmallBarkerList").before(header);
	*/
	
	
	
	
	var urlGrabber ="";
	urlGrabber+='<div class="grabber">';
    urlGrabber+='<span>URL:</span>';
    urlGrabber+='<input class="actionUrlBox" name="urlText" type="text" readonly="readonly" id="widgetText" onclick="javascript:this.form.widgetText.focus();this.form.widgetText.select();" />';
    urlGrabber+='</div>'; 
       
    $(".videoDetails").after(urlGrabber);
       
	var locationUrl = window.location.toString();
	var qs = locationUrl.indexOf('?', 0);
	qs = qs >= 0 ? qs : locationUrl.length;
	jQuery('.actionUrlBox').val(locationUrl.substring(0, qs));
		
	
	
});


// 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);









