

$(document).ready(function() {
    $(".menuoverstate").each(function(i) {

        preload_image = new Image();
        preload_image.src = this.src.replace(".jpg", "_o.jpg");

        $(this).hover(
            function() {
                if (this.src.indexOf("_o.jpg") == -1) {
                    this.src = this.src.replace(".jpg", "_o.jpg");
                }

            },

            function() {
                this.src = this.src.replace("_o.jpg", ".jpg");

            });

    }
        );
        $(".menuoverstate-png").each(function (i) {

            preload_image = new Image();
            preload_image.src = this.src.replace(".png", "_o.png");

            $(this).hover(
            function () {
                if (this.src.indexOf("_o.png") == -1) {
                    this.src = this.src.replace(".png", "_o.png");
                }

            },

            function () {
                this.src = this.src.replace("_o.png", ".png");

            });

        }
        );
});


$(document).ready(function() {

    $('#banner-slider').cycle({
        fx: 'fade',
        speed: 1000,
        timeout: 5000,
        pager: '#banner-slider-nav',
        slideExpr: 'img'
    });

    $('#feedback-slider').cycle({
        fx: 'fade',
        speed: 1000,
        timeout: 5000,
        pager: '#moreinfo-feedback-nav'
    });

    $(".answer").hide();

    $("div.question").toggle(function() {
        $(this).addClass("active");
    }, function() {
        $(this).removeClass("active");
    });

    $("div.question").click(function() {
        $(this).next(".answer").slideToggle("400");
    });

    var toggleStatus = [];

    $(".step-title-wrapper").each(function(i) {
        toggleStatus[i] = false;
        jQuery(this).click(function() {
            if (toggleStatus[i] == false) {
                //for (i = 0; i < toggleStatus.length; i++) {
                //    toggleStatus[i] = false;
                //}

                toggleStatus[i] = true;

                /*$(".hidden-content").slideUp(1000);
                $(".nav_step").removeClass("active");
                $(".step-title").removeClass("active");*/

                $(this).children(".nav_step").addClass("active");
                $(this).children(".step-title").addClass("active");
                $(this).next().slideDown("slow");
            }
            else {
                toggleStatus[i] = false;
                $(this).next().slideUp(1000);
                $(this).children(".nav_step").removeClass("active");
                $(this).children(".step-title").removeClass("active");
            }
        });
    });
});

$(document).ready(function() {
    $(".step-title-wrapper").hover(function() {
        $(this).stop().animate({ opacity: 0.5 }, "fast");
    },

        function() {
            $(this).stop().animate({ opacity: 1.0 }, "fast");
        });
});



