InitShadowBox = {};
InitShadowBox.redirectUrlOnClose;
		
Shadowbox.init({
	adapter: "base",
	modal:true,
	enableKeys:false,
    players: ["iframe", "html"] ,
    onClose : onCloseEvent,
    overlayColor : "#000000",
    overlayOpacity : "0.8"
});

function openShadow(player, title, content, width, height, redirectUrlOnClose) {
			
	Shadowbox.open({
	    player:     player,
	    title:      title,
	    content:    content,
	    width: 		width,
	    height:     height	    
	});
	
	InitShadowBox.redirectUrlOnClose = redirectUrlOnClose;
};

function ShadowBoxClose() {
	
	Shadowbox.close();
	
};


function onCloseEvent() {
	ShadowBoxClose();
	
	if (InitShadowBox.redirectUrlOnClose) {
		window.location.href = InitShadowBox.redirectUrlOnClose;
	}	
}