﻿var currentDiv = "";

$(document).ready(function () {

    // turn one on at random
    var randomnumber = Math.floor(Math.random() * 3 + 1)
    switchSpot(randomnumber);

});


function switchSpot(divToShow) {

    if (currentDiv == "") {

        $("#divPic" + divToShow).show();

    } else {

        $("#divPic" + currentDiv).fadeOut(400, function () {

            $('#divPic' + divToShow).fadeIn(400);

        });


    }

    currentDiv = divToShow;

}
