$(window).load(function () {
    var c = 4;
    a(1);
    var e = [];
    setTimeout(function () {
        $(".splash_menu .nav1 a, .splash_menu .nav2 a,.splash_menu .nav3 a,.splash_menu .nav4 a").mouseenter(function () {
            nav1 = $(this);
            nav1.find(".text").fadeOut(300, function () {});
            nav1.find(".text_hover").fadeIn(300, function () {})
        }).mouseleave(function () {
            nav1.find(".text").fadeIn(300, function () {});
            nav1.find(".text_hover").fadeOut(300, function () {})
        })
    }, 2000);

    function a(f) {
        if (f <= c) {
            $(".splash_menu .nav" + f + " img").stop().animate({
                top: "0"
            }, 400, function () {
                a(f + 1)
            });
            b(f)
        }
    }
    function b(f) {
        if (f <= c) {
            $(".splash_menu .nav" + f + " .text").stop().animate({
                top: "340"
            }, 550, function () {
                b(f + 1);
                d(f)
            })
        }
    }
    function d(f) {
        $(".splash_menu .nav" + f + " .text").animate({
            top: "250"
        }, 800)
    }
});
var j = jQuery.noConflict();

    function slideSwitch() {
        var a = j("#slideshow IMG.active");
        if (a.length === 0) {
        a = j("#slideshow IMG:last")
        }
        var b = a.next().length ? a.next() : j("#slideshow IMG:first");
        a.addClass("last-active");
        b.css({
        opacity: 0
        }).animate({
        opacity: 1
        }, 2500).addClass("active").animate({
        opacity: 0
             }, 3000);
        a.removeClass("active last-active")
        }
j(window).load(function () {
    slideSwitch();
    setInterval("slideSwitch()", 5000)
});

    function slideSwitch2() {
        var a = j("#slideshow2 IMG.active");
        if (a.length === 0) {
        a = j("#slideshow2 IMG:last")
        }
        var b = a.next().length ? a.next() : j("#slideshow2 IMG:first");
        a.addClass("last-active");
        b.css({
        opacity: 0
        }).addClass("active red").animate({
        opacity: 1
        }, 3000, function () {
        a.removeClass("active last-active ")
        })
        }
j(window).load(function () {
    slideSwitch2();
    setInterval("slideSwitch2()", 20000)
});

    function slideSwitch3() {
        var a = j("#slideshow3 IMG.active");
        if (a.length === 0) {
        a = j("#slideshow3 IMG:last")
         }
        var b = a.next().length ? a.next() : j("#slideshow3 IMG:first");
        a.addClass("last-active red");
        b.delay(10000).css({
        opacity: 0
        }).addClass("active").animate({
        opacity: 1
        }, 3000, function () {
        a.removeClass("active last-active")
        })
    }
j(window).load(function () {
    slideSwitch3();
    setInterval("slideSwitch3()", 20000)
});

    function slideSwitch4() {
        var a = j("#slideshow4 IMG.active");
        if (a.length === 0) {
        a = j("#slideshow4 IMG:last")
        }
        var b = a.next().length ? a.next() : j("#slideshow4 IMG:first");
        a.addClass("last-active red");
        b.delay(5000).css({
        opacity: 0
        }).addClass("active").animate({
        opacity: 1
        }, 3000, function () {
        a.removeClass("active last-active")
        })
    }
j(window).load(function () {
    slideSwitch4();
    setInterval("slideSwitch4()", 20000)
});

    function slideSwitch5() {
         var a = j("#slideshow5 IMG.active");
        if (a.length === 0) {
        a = j("#slideshow5 IMG:last")
        }
        var b = a.next().length ? a.next() : j("#slideshow5 IMG:first");
        a.addClass("last-active red");
        b.delay(15000).css({
        opacity: 0
        }).addClass("active").animate({
        opacity: 1
         }, 3000, function () {
        a.removeClass("active last-active")
        })
    }
j(window).load(function () {
    slideSwitch5();
    setInterval("slideSwitch5()", 20000)
});
