﻿$(document).ready(function () {


    showMessage();


});

function pulOut() {

    $('.messenger').animate({
        border: "20px solid black"
    }, 3000, function () {
        // Animation complete.
        pulIn();
    });

}

function pulIn() {
    $('.messenger').animate({
        border: "0px solid black"

    }, 3000, function () {
        // Animation complete.
        pulOut();
    });
}

function flashTextOn() {
    $(".messenger h3").css("color", "#8E1B22");
    $(".messenger h3").css("backgroundColor", "#ffffff");
    setTimeout(flashTextOff, 1000);
}

function flashTextOff() {
    $(".messenger h3").css("color", "#ffffff");
    $(".messenger h3").css("backgroundColor", "#8E1B22");
    setTimeout(flashTextOn, 1000);

}

function showMessage() {
   /* $('.messenger').animate({
        width: 300
    }, 3000, function () {
        // Animation complete.
        //pulOut();
        flashTextOn();
    });*/
    flashTextOn();
}
