﻿function ScInit(ids) {
    $(ids).each(function (i) {
        hs(ids[i]);
    });
}
function hs(id) {
    var q = '#' + id + ' dl.marquee dd';
    $(q + ":not(:first)").css("display", "none");
    var B = $(q + ":last");
    var C = $(q + ":first");
    setInterval(function () {
        if (B.is(":visible")) {
            C.fadeIn(500).addClass("in"); B.hide()
        } else {
            $(q + ":visible").addClass("in");
            $(q + ".in").next().fadeIn(500);
            $(q + ".in").hide().removeClass("in")
        }
    }, 3000);
}
if (typeof(stepcarousel)=="function") {
    stepcarousel.setup({
        galleryid: 'viplist', //id of carousel DIV
        beltclass: 'colitems', //class of inner "belt" DIV containing all the panel DIVs
        panelclass: 'vip', //class of panel DIVs each holding content
        panelbehavior: { speed: 300, wraparound: false, persist: true },
        autostep: { enable: true, moveby: 4, pause: 5000 },
        defaultbuttons: { enable: true, moveby: 4, leftnav: ['lk_prev_page', 0, 64], rightnav: ['lk_next_page', -11, 64] },
        statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
        contenttype: ['inline'], //content setting ['inline'] or ['external', 'path_to_external_file']
        oninit: function () {
            isloaded = true;
            $('#vips').show();
        }
    });
}
