
/*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");

            });

    }
        );

    /*thumbs*/
    $(".thumb-hover").hide();
    $(".about-thumb").hover(function() {
        $(this).find(".thumb-hover").show();
    },
        function() {
            $(this).find(".thumb-hover").hide();
        });

        /*read more buttons*/

    $(".news-hover, .promotions-hover").hide();

    $(".news-section, .promotions-section").hover(
        function() {
            $(this).children(".news-hover, .promotions-hover").show();
        },
        function() {
            $(this).children(".news-hover, .promotions-hover").hide();
        }
    );

    jQuery("table.pricing-table tbody tr:even").addClass('odd');

    /*slideshow*/
    $('#slideshow').cycle({
        fx: 'fade',
        speed: 'slow',
        timeout: 5000,
        next: '#right',
        prev: '#left'
    });

});

jQuery(document).ready(function() {
    jQuery(".news-category-icon img").hover(function() {
        jQuery(this).fadeTo("2000", 0.4);
    }, function() {
        jQuery(this).fadeTo("2000", 1.0);
    });
});

jQuery(document).ready(function () {
    jQuery(".hoverfade").hover(function () {
        jQuery(this).fadeTo("2000", 0.6);
    }, function () {
        jQuery(this).fadeTo("2000", 1.0);
    });
});
