﻿//index.shtml setTab
var $j = jQuery;  
function setTab(name, cursel, n) {
    for (i = 1; i <= n; i++) {
        var menu = document.getElementById(name + i);
        var con = document.getElementById("con_" + name + "_" + i);
        menu.className = i == cursel ? "hover" : "";
        con.style.display = i == cursel ? "block" : "none";
    }
}

var scrollableShow = function(isShowBig, num) {
    var htmlContent = "";
    $j("#brandChained .items").children().each(function(i) {
        if (i == 0)
            htmlContent += ("<div><div>" + $j(this).html() + "</div>");
        else if (i % num == 0)
            htmlContent += ("</div><div><div>" + $j(this).html() + "</div>");
        else if (i == $j("#brandChained .items").children().length)
            htmlContent += ("<div>" + $j(this).html() + "</div></div>");
        else
            htmlContent += ("<div>" + $j(this).html() + "</div>");
    });
    $j("#brandChained .items").html(htmlContent);
    if (isShowBig) {
        $j(".bigScrollable").scrollable({ circular: true, mousewheel: true }).navigator().autoscroll({ interval: 5000 });
    }
    $j("#brandChained").scrollable({ circular: true, mousewheel: true, next: ".top_right", prev: ".top_left" }).navigator().autoscroll({ interval: 4000 });
}





