
/*overstate*/
$(document).ready(function() {
    $(".menuoverstate").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");

            });

    }
        );

    $(".menuoverstate-jpg").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");

            });

    }
        );

    $('#slideshow').cycle({
        fx: 'scrollHorz',
        prev: '#prev',
        next: '#next',
        timeout: 10000
    });

    $('#slideshow-home').cycle({
        fx: 'scrollHorz',
        prev: '#prev',
        next: '#next',
        timeout: 10000
    });

    $("#quote").click(function() {
        //$("#quote").hide();
        $("#get-a-quote-form").slideToggle('500');
    });

    $("#hide").click(function() {
        $("#get-a-quote-form").slideToggle('500');
        $("#quote").show();
    });
});

