﻿function NextSlide() {
    var currentSlide = parseInt($('#splashSlide').attr('qrslide')) + 1;
    if (currentSlide > 4) {
        currentSlide = 1;
    }
    $('#splashSlide').attr('qrslide', currentSlide);

    $('#splashSlide').fadeOut(function () {
        $(this).load(function () {
            $(this).fadeIn();
        });
        $(this).attr('src', 'css/im/' + currentSlide + '.jpg');
        setTimeout(function () {
            NextSlide();
        }, 15000);
    });
}

function preload(arrayOfImages) {
    $(arrayOfImages).each(function () {
        $('<img/>')[0].src = this;
    });
}

function LoadDropDownMenus() {
    $('.navigation').mouseover(function () {
        var navBodyHeight = $(this).find('.navbody').find('.navBodyInner').height() + 10 + 'px';
        try {
            $(this).find('.navbody').stop().animate({ height: navBodyHeight }, { queue: false, duration: 300 })
        }
        catch (e) {
        }
    });

    $('.navigation').mouseout(function () {
        $(this).find('.navbody').stop().animate({ height: '0px' }, { queue: false, duration: 300 })
    });

    $('.navigation').find('.navbody').stop().animate({ height: '10px' }, { queue: false, duration: 300 })
    $('.navigation').find('.navbody').stop().animate({ height: '0px' }, { queue: false, duration: 0 })
}

function HookupRows() {
    $('.qrRow').mouseover(function () {
        $(this).attr('class', 'qrRow RowOver');
    });

    $('.qrRow').mouseout(function () {
        $(this).attr('class', 'qrRow RowOff');
    });
}

function ChangeURL(inURL) {
    location.href = inURL;
}
