if (document.layers) {browserType = "nn4"}
if (document.all) {browserType = "ie"}
if (window.navigator.userAgent.toLowerCase().match("gecko")) {
   browserType= "gecko"
}

function divPopUp() {
}

function ShowImg(vImg) {
}

function setToPage(sSel) {}

function setSeizoen() {
	//var speed = 500;
	var dmy=new Date();
	var m=dmy.getMonth();
	m++;
	var d=dmy.getDate();
	var sPic = 'assets/templates/zilverpark/images/zilverpark_4_winter.jpg';
	if ((m>2) && (d>20)) {
	 sPic = 'assets/templates/zilverpark/images/zilverpark_1_lente.jpg';
	}
	if (m>3) {
	 sPic = 'assets/templates/zilverpark/images/zilverpark_1_lente.jpg';
	}
	if ((m>5) && (d>20)) {
	 sPic = 'assets/templates/zilverpark/images/zilverpark_2_zomer.jpg';
	}
	if (m>6) {
	 sPic = 'assets/templates/zilverpark/images/zilverpark_2_zomer.jpg';
	}
	if ((m>8) && (d>20)) {
	 sPic = 'assets/templates/zilverpark/images/zilverpark_3_herfst.jpg';
	}
	if (m>9) {
	 sPic = 'assets/templates/zilverpark/images/zilverpark_3_herfst.jpg';
	}
	if ((m>11) && (d>20)) { 
	 sPic = 'assets/templates/zilverpark/images/zilverpark_4_winter.jpg';
	}
	$("#seizoenIMG").attr("src", sPic);
}


function slideSwitch() {    var $active = $('#slideshow IMG.active');

    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#slideshow IMG:first');

    // uncomment the 3 lines below to pull the images in random order
    
    // var $sibs  = $active.siblings();
    // var rndNum = Math.floor(Math.random() * $sibs.length );
    // var $next  = $( $sibs[ rndNum ] );


    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval( "slideSwitch()", 6000 );
});

setSeizoen();
