/*
 * Generate animated header image
 *
 */
$(function() {

    // set the timer
    var timer = setInterval(animate, 3000);

    // set image location vars
    var image_path_1 = "url(/images/mood.jpg)";
    var image_path_2 = "url(/images/mood-2.jpg)";

    // image status
    var current_image = 1;

    // animate background image
    function animate() {

        // check for image backround
        if (current_image == 1) {
            $("#dialog-image").css("background-image", image_path_2);
            current_image = 2;
        } else {
            $("#dialog-image").css("background-image", image_path_1);
            current_image = 1;
        }

    }

});
