document.write("");
document.write("
");
document.write("
上海
");
document.write(" - 客服1
");
document.write("
");
document.write("
");
(function (jQuery) {
jQuery.fn.qqFloat = function (options) {
var opts = jQuery.extend({}, jQuery.fn.qqFloat.defaults, options);
var hiddenObj = jQuery(opts.hiddenObj, jQuery(this));
var showObj = jQuery(opts.showObj, jQuery(this));
var tips = jQuery(this)[0];
var theTop = parseInt(opts.defaultY)/*����Ĭ�ϸ߶�,Խ��Խ����*/;
var old = theTop;
jQuery(this).css("top", parseInt(opts.defaultY));
jQuery(this).css(opts.leftOrRight, parseInt(opts.defaultX));
showObj.css(opts.leftOrRight, parseInt(opts.defaultX));
return this.each(function () {
hiddenObj.mouseenter(function () {
jQuery(this).hide();
showObj.show();
});
showObj.mouseleave(function () {
jQuery(this).hide();
hiddenObj.show();
});
function moveTips() {
var tt = 50;
if (window.innerHeight) {
pos = window.pageYOffset;
}
else if (document.documentElement && document.documentElement.scrollTop) {
pos = document.documentElement.scrollTop;
}
else if (document.body) {
pos = document.body.scrollTop;
}
pos = pos - tips.offsetTop + theTop;
pos = tips.offsetTop + pos / 10;
if (pos < theTop) pos = theTop;
if (pos != old) {
tips.style.top = pos + "px";
tt = 10;
}
old = pos;
setTimeout(moveTips, tt);
}
moveTips();
});
};
jQuery.fn.qqFloat.defaults = {
hiddenObj: '.qqonline',
showObj: '.qqInfo',
defaultY: '100',
defaultX: '0',
leftOrRight: 'right'
};
})(jQuery);
jQuery(document).ready(function () {
jQuery("#floatbox").qqFloat({ leftOrRight: "right", defaultY: 35 });
jQuery('.QQ_close').click(function () {
var width = jQuery('.content-box').width();
if (width == 0) {
jQuery("#floatbox").css("width", "151px");
jQuery('.content-box').animate({ width: 120 }, 500);
} else {
jQuery('.content-box').animate({ width: 0 }, 500, function () { jQuery("#floatbox").css("width", "31px"); });
}
});
})