var intervalFunction;
var playing = true;
var bannerArray = new Array(
	"<a href='http://www.stockactie.be/wedstrijd.aspx' id='wedstrijdHeader' onclick='openWedstrijd(); return false'><img src='img/header_Wedstrijd.jpg' alt='Neem hier deel aan de wedstrijd' /></a>",
	"<a href='#' id='wedstrijdHeader' onclick='return false;'><img src='img/header_Weekend.jpg' alt='Kom naar het stockactieweekend...' /></a>"

)
var counter = 0;	
function changeBanner () {
	/*counter++
	counter = (counter>bannerArray.length-1)? counter = 0: counter = counter;
	$("#banner").eq(0).fadeOut("normal",function() {
		$("#bannerContent").html(bannerArray[counter]).parent().fadeIn("normal");								 
	});*/
}
function openWedstrijd() {
	window.open('http://www.stockactie.be/wedstrijd.aspx','Wedstrijd','width=600,height=500,scrollbars=1,resizable=1');
}
$(document).ready(function(){
	intervalFunction = setInterval(	function () {changeBanner();}, 3300);
	$(document).pngFix();
	$("#container").animate({top:"-58px" }, 1000 );
	$("#contact").css({display:"block", width:"260px"});
	$("a#pauze").click(function() {
		if (playing) {
			clearInterval(intervalFunction);
			jQuery(this).html("<img src='img/play.gif' alt='play'/>");
			playing = false;
		}
		else {
			intervalFunction = setInterval(	function () {changeBanner();}, 3300);
			jQuery(this).html("<img src='img/pauze.gif' alt='pauzeer'/>");
			playing = true;
		}
		return false;
	});

});


