
/*商品分类移上去的效果*/
$(document).ready(function(){
    $('.sidelist').mousemove(function(){
        $(this).find('.i-list').show();
        $(this).find('h3').addClass('hover');
    });
    $('.sidelist').mouseleave(function(){
        $(this).find('.i-list').hide();
        $(this).find('h3').removeClass('hover');
    });
});

function asdasd()
{
		
}

/**
移上去显示隐藏层


startList = function() {
if (document.all&&document.getElementById) {
provincesRoot = document.getElementById("provinces");
for (i=0; i<provincesRoot.childNodes.length; i++) {
node = provincesRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}
window.onload=startList;
**/



/**
TB切换
**/
function nTabs(thisObj,Num){
    if(thisObj.className == "active")return;
    var tabObj = thisObj.parentNode.id;
    var tabList = document.getElementById(tabObj).getElementsByTagName("li");
    for(i=0; i <tabList.length; i++)
    {
        if (i == Num)
        {
            thisObj.className = "active"; 
            document.getElementById(tabObj+"_Content"+i).style.display = "block";
        }else{
            tabList[i].className = "normal"; 
            document.getElementById(tabObj+"_Content"+i).style.display = "none";
        }
    } 
};





/*内页HOVER事情*/

if (typeof (HTMLElement) != "undefined")    //给firefox定义contains()方法，ie下不起作用
{
    HTMLElement.prototype.contains = function (obj) {
        while (obj != null && typeof (obj.tagName) != "undefind") { //通过循环对比来判断是不是obj的父元素
            if (obj == this) return true;
            obj = obj.parentNode;
        }
        return false;
    };
}
function outDiv(theEvent) { //theEvent用来传入事件，Firefox的方式
    if (theEvent) {
        var browser = navigator.userAgent;   //取得浏览器属性
        if (browser.indexOf("Firefox") > 0) { //如果是Firefox
            if (document.getElementById('categories').contains(theEvent.relatedTarget)) { //如果是子元素
                return;   //结束函式
            }
        }
        if (browser.indexOf("MSIE") > 0) { //如果是IE
            if (document.getElementById('categories').contains(event.toElement)) { //如果是子元素
                return; //结束函式
            }
        }
    }
    document.getElementById('categories').style.display = 'none';
          
}

function overDiv() {
    document.getElementById('categories').style.display = 'inline';
}
	  
	  
/*排行榜JS*/
function nTabs(thisObj,Num){
    if(thisObj.className == "active")return;
    var tabObj = thisObj.parentNode.id;
    var tabList = document.getElementById(tabObj).getElementsByTagName("li");
    for(i=0; i <tabList.length; i++)
    {
        if (i == Num)
        {
            thisObj.className = "active";
            document.getElementById(tabObj+"_Content"+i).style.display = "block";
        }else{
            tabList[i].className = "normal";
            document.getElementById(tabObj+"_Content"+i).style.display = "none";
        }
    }
}
var show_king_id = 1;
function show_king_list(e,k)
{
    if(show_king_id == k) return true;
    o = document.getElementById("a"+show_king_id);
    o.className = "bg";
    e.className = " ";
    show_king_id = k;
}
var show_kinga_id = 1;
function show_kinga_list(f,l)
{
    if(show_kinga_id == l) return true;
    o = document.getElementById("b"+show_kinga_id);
    o.className = "bg";
    f.className = " ";
    show_kinga_id = l;
}

var show_king_id_sp = 1;
function show_king_list_sp(e,k,a)
{
    if(show_king_id_sp == k) return true;
    o = document.getElementById("a"+a+show_king_id_sp);
    if (o != null) {
        o.className = "bg";        
    }
    e.className = " ";
    show_king_id_sp = k;
}
	  
