var fancyboxVideoOverlay = function(item) {
	item = jQuery(item); 

	var oldRightMargin = item.css('margin-right'); 
	item.css({ 'margin': '0px !important', 'padding': '0px !important' }); 

item.addClass('thisisatest'); 

	var oldWidth = item.width(); 
	var oldHeight = item.height(); 
	
	item.addClass('posterFrame'); 
	
	item.parent().css({ 'width': oldWidth + 'px', 'height': oldHeight + 'px', 'display': 'block' }); 
	if (oldRightMargin && oldRightMargin != null && oldRightMargin.length > 1 && oldRightMargin.substring(0, 1) != '0') {
		item.parent().css({ 'margin-right': oldRightMargin }); 
	}
	item.parent().append('<div class="fadeOut" style="display: block; width: ' + oldWidth + 'px; height: ' + oldHeight + 'px;"></div>'); 

	var basePlayButtonSize = 300; // For Webkit browsers that do not detect width of images with dynamically sized heights
	var playButtonHeight = oldHeight * .55; 
	var playButtonPercentage = (playButtonHeight / basePlayButtonSize)
	var playButtonWidth = basePlayButtonSize * playButtonPercentage; 
	
	item.parent().append('<img class="playButton" src="/public/img/graphics/fancybox/fancybox_play-button-icon.png" alt="Play button" border="0" style="top: 0; left: 0; width: ' + playButtonWidth + 'px; height: ' + playButtonHeight + 'px;" />'); 

	var playButton = item.parent().children('.playButton');
	playButton = jQuery(playButton[0]);
	
	var topMargin = (oldHeight / 2) - (playButtonHeight / 2); 
	var leftMargin = (oldWidth / 2) - (playButtonWidth / 2); 

	playButton.css({ 'position': 'absolute', 'top': topMargin + 'px', 'left': leftMargin + 'px' }); 
}

