﻿
(function ($) {

    $.fn.autoMouseOver = function (settings) {
        settings = $.extend({
            outStr: "-over.",    // default string to replace for the "out" images (eg. home-out.png)
            overStr: "-out."   // default string to replace for the "over" images (eg. home-over.png)
        }, settings || {});

        // Preload the images
        var preloadImageArray = new Array();
        $(this).filter("img").each(function () {
            var overImg = $(this).attr("src").replace(settings.outStr, settings.overStr);
            var img = new Image();
            img.src = overImg;
            preloadImageArray.push(img);
        });

        // Set the hover handler
        $(this).filter("img").hover(function () {
            $(this).attr("src", $(this).attr("src").replace(settings.outStr, settings.overStr));
        }, function () {
            $(this).attr("src", $(this).attr("src").replace(settings.overStr, settings.outStr));
        });

        return $;
    };

})(jQuery);


function pageLoad() {
    if (!Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack()) {
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler);
    }
}
function endRequestHandler(sender, args) {
$(document).ready(function () {
    $(".rollover").hover(function () {
        $(this).fadeTo(200, 0.7);
    },
                function () {
                    $(this).fadeTo("fast", 1);
                }
                );
    $(".menuRollover").autoMouseOver();

});
              
}

$(document).ready(function () {
    $(".rollover").hover(function () {
        $(this).fadeTo(200, 0.7);
    },
                function () {
                    $(this).fadeTo("fast", 1);
                }
                );
    $(".menuRollover").autoMouseOver();
});


