
Shadowbox.init({
	skipSetup: true,
	players: ['flv']
});

var CituraMovie = {
	content: '/flash/Citura7.flv',
	player: 'flv',
	width: 720,
	height: 576
};

$(function(){
	var ie6 = ($.browser.msie && $.browser.version < 7);

	if (ie6) $('img[src$=.png]').pngfix();
	$('img[hover],input[hover]').imghover();

	// Map small
	if ($('div#map_small').length) {
		var map = $('div#map_small');

		$('map#m_map_small area').hover(function(){
			var r = $(this).attr('rel');
			map.find('img.pin_'+r).attr('src','images/pin_'+r+'_hover.png').pngfix();
		},function(){
			var r = $(this).attr('rel');
			map.find('img.pin_'+r).attr('src','images/pin.png').pngfix();
		});

		// Load champions dyamically
		if (map.hasClass('champions')) {
			$('map#m_map_small area').click(function(){
				$('div#champions').load($(this).attr('href'));
				this.blur();
				return false;
			});
		}
	}

	// Map large
	if ($('div#map_large').length) {
		var map = $('div#map_large');
		$('map#m_map_large area').hover(function(){
			var r = $(this).attr('rel');
			map.find('img.pin_large_'+r).attr('src','images/pin_'+r+'_hover.png').pngfix();
		},function(){
			var r = $(this).attr('rel');
			map.find('img.pin_large_'+r).attr('src','images/pin.png').pngfix();
		});
	}

	$.prefetch(
		'images/pin_eu_hover.png',
		'images/pin_na_hover.png',
		'images/pin_za_hover.png',
		'images/pin_af_hover.png',
		'images/pin_az_hover.png',
		'images/pin_au_hover.png'
	);

	// track dashboard downloads
	$('a.track').click(function(){
		pageTracker._trackPageview($(this).attr('href'));
	});

});