hs.graphicsDir = 'http://www.spectral.org.uk/highslide/graphics/';
hs.allowSizeReduction = false;
hs.preserveContent = false;
hs.dimmingOpacity = .5;
hs.align = 'center';
hs.showCredits = false;

hs.registerOverlay({
	html: '<div class="closebutton" onclick="return hs.close(this)" title="Close"></div>',
	position: 'top right',
	fade: 2,
	useOnHtml: true
});

// Keep the position after window resize
hs.addEventListener(window, 'resize', function() {
	var i, exp;
	hs.getPageSize();

	for (i = 0; i < hs.expanders.length; i++) {
		exp = hs.expanders[i];
		if (exp) {
			var x = exp.x,
				y = exp.y;

			// get new thumb positions
			exp.tpos = hs.getPosition(exp.el);
			x.calcThumb();
			y.calcThumb();

			// calculate new popup position
		 	x.pos = x.tpos - x.cb + x.tb;
			x.scroll = hs.page.scrollLeft;
			x.clientSize = hs.page.width;
			y.pos = y.tpos - y.cb + y.tb;
			y.scroll = hs.page.scrollTop;
			y.clientSize = hs.page.height;
			exp.justify(x, true);
			exp.justify(y, true);

			// set new left and top to wrapper and outline
			exp.moveTo(x.pos, y.pos);
		}
	}
});


// TV
var configBbcArabic = {
	objectType: 'swf',
	width: 570,
	objectWidth: 570, 
	objectHeight: 429, 
	height: 429,
	outlineType: 'black-drop',
	wrapperClassName: 'spectral no-footer',
	maincontentText: 'You need to upgrade your Flash player',
	swfOptions: { version: '8', 
				flashvars: { file: '&file=/flv/Arabic.flv&stretching=fill&autostart=true&skin=/jwplayer/spectral-new.swf' }, 
				params: {allowscriptaccess: 'always', allowfullscreen: 'true', vmode: 'transparent'}
	}
};

var configDiscovery = {
	objectType: 'swf',
	width: 570,
	objectWidth: 570, 
	objectHeight: 429, 
	height: 429,
	outlineType: 'black-drop',
	wrapperClassName: 'spectral no-footer',
	maincontentText: 'You need to upgrade your Flash player',
	swfOptions: { version: '8', 
				flashvars: { file: '&file=/flv/gottoknow.flv&stretching=fill&autostart=true&skin=/jwplayer/spectral-new.swf' }, 
				params: {allowscriptaccess: 'always', allowfullscreen: 'true', vmode: 'transparent'} 
	}
};

var configBbcAfrica = {
	objectType: 'swf',
	width: 570,
	objectWidth: 570, 
	objectHeight: 429, 
	height: 429,
	outlineType: 'black-drop',
	wrapperClassName: 'spectral no-footer',
	maincontentText: 'You need to upgrade your Flash player',
	swfOptions: { version: '8', 
				flashvars: { file: '&file=/flv/Afrique.flv&stretching=fill&autostart=true&skin=/jwplayer/spectral-new.swf' }, 
				params: {allowscriptaccess: 'always', allowfullscreen: 'true', vmode: 'transparent'} 
	}
};

var configDisney = {
	objectType: 'swf',
	width: 570,
	objectWidth: 570, 
	objectHeight: 429, 
	height: 429,
	outlineType: 'black-drop',
	wrapperClassName: 'spectral no-footer',
	maincontentText: 'You need to upgrade your Flash player',
	swfOptions: { version: '8', 
				flashvars: { file: '&file=/flv/fiesta.flv&stretching=fill&autostart=true&skin=/jwplayer/spectral-new.swf' }, 
				params: {allowscriptaccess: 'always', allowfullscreen: 'true', vmode: 'transparent'} 
	}
};

var configCbeebies = {
	objectType: 'swf',
	width: 570,
	objectWidth: 570, 
	objectHeight: 429, 
	height: 429,
	outlineType: 'black-drop',
	wrapperClassName: 'spectral no-footer',
	maincontentText: 'You need to upgrade your Flash player',
	swfOptions: { version: '8', 
				flashvars: { file: '&file=/flv/cbeebies.flv&stretching=fill&autostart=true&skin=/jwplayer/spectral-new.swf' }, 
				params: {allowscriptaccess: 'always', allowfullscreen: 'true', vmode: 'transparent'} 
	}
};

// Commercials
var configNivea = {
	objectType: 'swf',
	width: 570,
	objectWidth: 570, 
	objectHeight: 429, 
	height: 429,
	outlineType: 'black-drop',
	wrapperClassName: 'spectral no-footer',
	maincontentText: 'You need to upgrade your Flash player',
	swfOptions: { version: '8', 
				flashvars: { file: '&file=/flv/nivea.flv&stretching=fill&autostart=true&skin=/jwplayer/spectral-new.swf' }, 
				params: {allowscriptaccess: 'always', allowfullscreen: 'true', vmode: 'transparent'} 
	}
};

var configMaltesers = {
	objectType: 'swf',
	width: 570,
	objectWidth: 570, 
	objectHeight: 429, 
	height: 429,
	outlineType: 'black-drop',
	wrapperClassName: 'spectral no-footer',
	maincontentText: 'You need to upgrade your Flash player',
	swfOptions: { version: '8', 
				flashvars: { file: '&file=/flv/maltesers.flv&stretching=fill&autostart=true&skin=/jwplayer/spectral-new.swf' }, 
				params: {allowscriptaccess: 'always', allowfullscreen: 'true', vmode: 'transparent'} 
	}
};

var configClearasil = {
	objectType: 'swf',
	width: 570,
	objectWidth: 570, 
	objectHeight: 429, 
	height: 429,
	outlineType: 'black-drop',
	wrapperClassName: 'spectral no-footer',
	maincontentText: 'You need to upgrade your Flash player',
	swfOptions: { version: '8', 
				flashvars: { file: '&file=/flv/clearasil.flv&stretching=fill&autostart=true&skin=/jwplayer/spectral-new.swf' }, 
				params: {allowscriptaccess: 'always', allowfullscreen: 'true', vmode: 'transparent'} 
	}
};

var configOlay = {
	objectType: 'swf',
	width: 570,
	objectWidth: 570, 
	objectHeight: 429, 
	height: 429,
	outlineType: 'black-drop',
	wrapperClassName: 'spectral no-footer',
	maincontentText: 'You need to upgrade your Flash player',
	swfOptions: { version: '8', 
				flashvars: { file: '&file=/flv/olay.flv&stretching=fill&autostart=true&skin=/jwplayer/spectral-new.swf' }, 
				params: {allowscriptaccess: 'always', allowfullscreen: 'true', vmode: 'transparent'} 
	}
};

var configBlueCross = {
	objectType: 'swf',
	width: 570,
	objectWidth: 570, 
	objectHeight: 429, 
	height: 429,
	outlineType: 'black-drop',
	wrapperClassName: 'spectral no-footer',
	maincontentText: 'You need to upgrade your Flash player',
	swfOptions: { version: '8', 
				flashvars: { file: '&file=/flv/wilfy.flv&stretching=fill&autostart=true&skin=/jwplayer/spectral-new.swf' }, 
				params: {allowscriptaccess: 'always', allowfullscreen: 'true', vmode: 'transparent'} 
	}
};

var configUncleBen = {
	objectType: 'swf',
	width: 570,
	objectWidth: 570, 
	objectHeight: 429, 
	height: 429,
	outlineType: 'black-drop',
	wrapperClassName: 'spectral no-footer',
	maincontentText: 'You need to upgrade your Flash player',
	swfOptions: { version: '8', 
				flashvars: { file: '&file=/flv/UncleBen.flv&stretching=fill&autostart=true&skin=/jwplayer/spectral-new.swf' }, 
				params: {allowscriptaccess: 'always', allowfullscreen: 'true', vmode: 'transparent'} 
	}
};

var configSacla = {
	objectType: 'swf',
	width: 570,
	objectWidth: 570, 
	objectHeight: 429, 
	height: 429,
	outlineType: 'black-drop',
	wrapperClassName: 'spectral no-footer',
	maincontentText: 'You need to upgrade your Flash player',
	swfOptions: { version: '8', 
				flashvars: { file: '&file=/flv/sacla.flv&stretching=fill&autostart=true&skin=/jwplayer/spectral-new.swf' }, 
				params: {allowscriptaccess: 'always', allowfullscreen: 'true', vmode: 'transparent'} 
	}
};

var configFirstPlus = {
	objectType: 'swf',
	width: 570,
	objectWidth: 570, 
	objectHeight: 429, 
	height: 429,
	outlineType: 'black-drop',
	wrapperClassName: 'spectral no-footer',
	maincontentText: 'You need to upgrade your Flash player',
	swfOptions: { version: '8', 
				flashvars: { file: '&file=/flv/firstplus.flv&stretching=fill&autostart=true&skin=/jwplayer/spectral-new.swf' }, 
				params: {allowscriptaccess: 'always', allowfullscreen: 'true', vmode: 'transparent'} 
	}
};

var configShreddies = {
	objectType: 'swf',
	width: 570,
	objectWidth: 570, 
	objectHeight: 429, 
	height: 429,
	outlineType: 'black-drop',
	wrapperClassName: 'spectral no-footer',
	maincontentText: 'You need to upgrade your Flash player',
	swfOptions: { version: '8', 
				flashvars: { file: '&file=/flv/shreddies.flv&stretching=fill&autostart=true&skin=/jwplayer/spectral-new.swf' }, 
				params: {allowscriptaccess: 'always', allowfullscreen: 'true', vmode: 'transparent'} 
	}
};

// About
var configAbout = {
	outlineType: 'drop-shadow',
	objectType: 'iframe',
	wrapperClassName: 'no-footer spectralAbout',
	width: 450,
	easing: 'easeInBack',
	easingClose: 'easeOutBack'
};
