
/*overstate*/
$(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");

            });

    }
        );
});

/*overstate logos*/
$(document).ready(function() {
    $(".logooverstate").css("opacity","0.4");
        $(".logooverstate").hover(function () {
            $(this).stop().animate({opacity: 1.0}, "fast");
        },

        function () {
            $(this).stop().animate({opacity: 0.4}, "fast");
        });
});

/*equal columns*/

function equalHeight(group) {
    var tallest = 0;
    group.each(function() {
        var thisHeight = $(this).height();
        if (thisHeight > tallest) {
            tallest = thisHeight;
        }
    });
    group.height(tallest);
}

$(document).ready(function() {
    equalHeight($(".column"));
});

/*main slideshow*/
$(document).ready(function() {
    $('.slideshow').cycle({
    fx: 'fade',
    pause: 1,
    pager:  '.banner-nav',
    pagerAnchorBuilder: function(idx, slide) {
    return '<li><a href="' + slide.src + '">' + slide.title + '</a></li>';
    }
    });
});
