

function homeFPInit() {

    homeFPAnimatePrepareNextStep();
}

function homeFPAnimatePrepareNextStep() {

    setTimeout(homeFPAnimate, 1000 * 5);
}

function homeFPAnimate() {

    var fp = $("[class^=homeFP]");

    if (fp)
        fp.each(
            function () {

                var $class = $(this).attr("class");

                // homeFP0
                if ((!$class) || (7 != $class.length))
                    return;

                $(this).attr("class", "homeFP" + ((parseInt($class.charAt(6)) + 1) % 3));
            }
        );

    homeFPAnimatePrepareNextStep();
}
