
document.getElementById('banner-ad').onmouseover = function() {
	$('#banner-ad h2').css('padding-bottom', "0");
	$('#banner-ad h2').css('border-bottom', "1px dotted #fff");
}

document.getElementById('banner-ad').onmouseout = function() {
	$('#banner-ad h2').css('padding-bottom', "1px");
	$('#banner-ad h2').css('border-bottom', "none");
}

document.getElementById('banner-ad').onclick = function() {
	window.location.href = "/programme.php";
};

/**/

$(function() {
	firstPass();
	
	$('#text-version a').click(function() {$("link[href*='screen.css']").remove();return false});
	$('#graphics-version a').click(function() {
			$('head').append('<link id="screencss" type="text/css" rel="stylesheet" media="screen" href="_assets/_css/screen.css" />');
			checkReady();
			return false
		}
	);		   
});

function showAll() {
	$('#banner1').html('<div id="layerX" class="bannerImg"><img id="banner4" src="_assets/_img/_banner/Layer_4.jpg" width="720" height="240" alt="A photo of last year\'s conference" /></div>');
}

TIMING = 7000;
FADE = 1000;

function firstPass() {
	setTimeout(function(){ 
						for(i=1;i<=9;i++) {
							$('#layer' + i).fadeOut(0);
						}
						slide(10, 9);
						}, TIMING);	
}

// 2, 1
// 1, 10
// 10, 9

function slide(thisSlide, nextSlide) {		
	$('#layer' + thisSlide).fadeOut(FADE);
	$('#layer' + nextSlide).fadeIn(FADE);
	
	thisSlide = nextSlide;
	nextSlide = thisSlide - 1;
			
	if(nextSlide == 0) nextSlide = 10; 
	
	setTimeout("slide("+thisSlide+", "+nextSlide+")", TIMING);
}

/*
var theImg = 2;
var dir = 1;

$('#banner').click($('#comments').fadeOut(2000));

$('#layer2').fadeOut(0);
$('#layer3').fadeOut(0);
$('#layer4').fadeOut(0);
$('#layer5').fadeOut(0);
$('#layer6').fadeOut(0);
$('#layer7').fadeOut(0);
$('#layer8').fadeOut(0);
$('#layer9').fadeOut(0);
$('#layer10').fadeOut(0);
*/
/*
function fade() {			
	if(theImg < 10) { 
		num = '0' + theImg;
	} else { 
		num = theImg;
	}
	
	if(dir == 1) {
		document.getElementById('img2').style.background = 'url(_assets/_img/_banner/banner' + num + '.jpg) no-repeat';
		$('#img1').fadeOut(2000);
		$('#img2').fadeIn(2000);
		dir = 0;
	} else {
		document.getElementById('img1').style.background = ' url(_assets/_img/_banner/banner' + num + '.jpg) no-repeat'; 
		$('#img2').fadeOut(2000);
		$('#img1').fadeIn(2000);
		dir = 1;
	}
	
	theImg++;
	if(theImg == 12) theImg = 1;			            
	setTimeout("fade()",5000);
}

function start() {
	setTimeout("fade()",5000);
}

window.onload = function() {
	start();
}
*/
