﻿function CopyLink(newItems) {
    var img = newItems.find("> img");
    $("#Module8Link").html(newItems.clone().html(img.attr("alt")));
}

$(function () {
    $("#module7").carouFredSel({
        items: 1,
        auto: {
            play: true,
            pauseDuration: 10000
        },
        scroll: {
            items: 1,
            onAfter: function (oldItems, newItems) {
                CopyLink(newItems);
            }
        },
        pagination: {
            container: "#Module8Pagination"
        },
        next: "#mod8_next",
        prev: "#mod8_prev"
    });

    var anchor = $("#module7 a:first")
    var img = anchor.find("> img");
    $("#Module8Link").html(anchor.clone().html(img.attr("alt")));

    $("#logos").carouFredSel({
        items: 3,
        auto: {
            play: true,
            pauseDuration: 3000
        },
        scroll: {
            items: 3,
            pauseOnHover: false,
            duration: 2000,
            easing: 'linear'
        },
        next: {
            button: "#logos_next",
            duration: 1000
        },
        prev: {
            button: "#logos_prev",
            duration: 1000
        }

    });

    $(".module5_on").hide().css({ opacity: 0.0 });

    var config = {
        over: ShowOn,
        timeout: 1000,
        out: ShowOff
    };

    $(".module5").hoverIntent(config);

    $("#marquee").marquee();
});

function ShowOn() {
    $(".module5_off").stop().animate({ opacity: 0.0 }, function () { $(".module5_on").stop().animate({ height: 'toggle' }, function () { $(".module5_on").animate({ opacity: 1.0 }); }); });
    $(".module5_off").animate({ height: 'toggle' });

}

function ShowOff() {
    $(".module5_on").stop().animate({ opacity: 0.0 }, function () { $(".module5_off").stop().animate({ height: 'toggle' }); $(".module5_on").animate({ height: 'toggle' }, function () { $(".module5_off").animate({ opacity: 1.0 }); }); });

}

