﻿var jq = jQuery.noConflict();
jq(function () {

    //买家卖家帮助
    jq("#buyer").mouseover(function () {
        jq("#buyerimg").css("left", jq(this).offset().left - jq("#buyerimg").width() + jq(this).width());
        jq("#buyerimg").css("top", jq(this).offset().top + jq(this).height());
        jq("#buyerimg").css("display", "");
    });
    jq("#buyer").mouseout(function () {
        jq("#buyerimg").css("display", "none");
    });
    jq("#sellers").mouseover(function () {
        jq("#sellersimg").css("left", jq(this).offset().left - jq("#sellersimg").width() + jq(this).width());
        jq("#sellersimg").css("top", jq(this).offset().top + jq(this).height());
        jq("#sellersimg").css("display", "");
    });
    jq("#sellers").mouseout(function () {
        jq("#sellersimg").css("display", "none");
    });
    //招商分类eq(0):表示第一项"卫浴"
    jq("#category li:eq(0)").mouseover(function () {
        jq(this).find("ul").css("left", jq(this).offset().left - jq(this).width() / 2 + 12);
        jq(this).find("ul").css("top", jq(this).offset().top + jq(this).height());
        jq(this).find("ul").css("display", "block");
    });
    jq("#category:eq(0)").mouseout(function () {
        jq(this).find("ul").css("display", "none");
    });

});
var $ = jQuery.noConflict();

 
//在线客户--Start
services = function (id, _top, _left) {
    var me = id.charAt ? document.getElementById(id) : id, d1 = document.body, d2 = document.documentElement;
    d1.style.height = d2.style.height = '100%'; me.style.top = _top ? _top + 'px' : 0; me.style.right = _left + "px"; //[(_left>0?'left':'left')]=_left?Math.abs(_left)+'px':0;
    me.style.position = 'absolute';
    setInterval(function () { me.style.top = parseInt(me.style.top) + (Math.max(d1.scrollTop, d2.scrollTop) + _top - parseInt(me.style.top)) * 0.1 + 'px'; }, 10 + parseInt(Math.random() * 20));
    document.getElementById("xixi").style.display = "";
    return arguments.callee;
};
//window.onload = function () {
//    services('xixi', 100, 0)
//}
$(function () {
    services('xixi', 100, 0);
});

lastScrollY = 0;

var InterTime = 1;

var BigInter;
var SmallInter;

function Big() {
    document.getElementById("serviceContent").style.display = "";
    document.getElementById("serviceBtn").style.display = "none";
}
function toBig() {
    clearInterval(SmallInter);
    clearInterval(BigInter);
    BigInter = setInterval(Big, InterTime);
}
function Small() {
    document.getElementById("serviceContent").style.display = "none";
    document.getElementById("serviceBtn").style.display = "";
}
function toSmall() {
    clearInterval(SmallInter);
    clearInterval(BigInter);
    SmallInter = setInterval(Small, InterTime);
}
//在线客服--End	
