// JavaScript Document$(function () {

 $(function () {

    var counter = 0,
        divs = $('#div1, #div2');

    function showDiv () {
        divs.hide() // hide all divs
            .filter(function (index) { return index == counter % 2; }) // figure out correct div to show
            .fadeIn("slow"); // and show it

        counter++;
    }; // function to loop through divs and show correct div

    showDiv(); // show first div    

    setInterval(function () {
        showDiv(); // show next div
    }, 10 * 1000); // do this every 10 seconds    

});
