function GetUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) {
//return unescape(r[2]);
return decodeURIComponent(r[2]);
}
return null;
}
$(function(){
initUpdateTable();
initMenu();
initQQ();
});
function initUpdateTable(){
// update-table绫诲悕鐨勮〃鏍硷紝鑷姩璁$畻鏇存柊鏃堕棿
var fileUrl = '//www.tdx.com.cn/products/getfileinfo_sysj.asp?fpath=';
$('.update-table tr').each(function(){
var downfile='';
$(this).find('a').each(function(){
if(/\.(zip|rar)$/i.test(this.href)){
if(this.href.indexOf('/products')!=-1){
downfile='.'+this.href.split('/products')[1];
}
}
});
$(this).find('td').each(function(){
var text=$.trim(this.innerHTML);
if(text=='鏇存柊鏃ユ湡锛?){
$(this).append('');
var url = fileUrl+downfile+'&t=' + new Date().getTime();
$(this).find('.load-update-time').load(url);
}
});
});
}
function initMenu(){
/* 鑿滃崟鍒濆鍖 */
$('#menu>ul>li>ul').find('li:has(ul:not(:empty))>a').append(">"); // 涓烘湁瀛愯彍鍗曠殑鑿滃崟椤规坊鍔?>'绗﹀彿
$("#menu>ul>li").bind('mouseover',function() { // 椤剁骇鑿滃崟椤圭殑榧犳爣绉诲叆鎿嶄綔
$(this).children('ul').slideDown('fast');
}).bind('mouseleave',function() { // 椤剁骇鑿滃崟椤圭殑榧犳爣绉诲嚭鎿嶄綔
$(this).children('ul').slideUp('fast');
});
$('#menu>ul>li>ul li').bind('mouseover',function() { // 瀛愯彍鍗曠殑榧犳爣绉诲叆鎿嶄綔
$(this).children('ul').slideDown('fast');
}).bind('mouseleave',function() { // 瀛愯彍鍗曠殑榧犳爣绉诲嚭鎿嶄綔
$(this).children('ul').slideUp('fast');
});
}
//鏄剧ずQQ瀹㈡湇
function initQQ() {
var _qq = "";
var imgUrl = "//www.tdx.com.cn/images/qqkf";
_qq += '
';
//_qq += '
';
_qq += '
';
_qq += "
";
_qq += '
';
_qq += "
";
/*_qq +=
'
涓哄仛濂界柅鎯呴槻鎺у伐浣?鍑忓皯浜哄憳鑱氶泦,鎴戝徃鏆傚仠鐢佃瘽鏈嶅姟,璇烽€氳繃鍦ㄧ嚎瀹㈡湇鍜ㄨ,鎰熻阿鎮ㄧ殑鐞嗚В鏀寔
鑱旂郴鐢佃瘽';
*/
_qq += '
027-87788668
鍛ㄤ竴鑷冲懆浜擖br/>涓婂崍 8:30-11:30
涓嬪崍 13:30-18:00
鑱旂郴鐢佃瘽'
_qq += '
';
_qq += '
';
_qq += "
";
_qq += '
';
_qq += "
";
_qq +=
'
';
_qq +=
'
';
$(".qq").html(_qq);
$(".cellphone")
.mouseover(function() {
$(".telbox").css({ display: "block" });
})
.mouseout(function() {
$(".telbox").css({ display: "none" });
});
$(".buy_consult_")
.mouseover(function() {
var ms = new Date().getSeconds();
if (ms >= 0 && ms < 20) {
$("#buyQQ").attr(
"src",
imgUrl + "/buy_qq_1.png"
);
// $('#buyQQ1').attr("src", "newl2/images/float/ercode/buy_qq_3.png");
} else if (ms >= 20 && ms < 40) {
$("#buyQQ").attr(
"src",
imgUrl + "/buy_qq_2.png"
);
// $('#buyQQ1').attr("src", "newl2/images/float/ercode/buy_qq_1.png");
} else {
$("#buyQQ").attr(
"src",
imgUrl + "/buy_qq_3.png"
);
// $('#buyQQ1').attr("src", "newl2/images/float/ercode/buy_qq_2.png");
}
$(".buy_box").css({ display: "block" });
})
.mouseout(function() {
$(".buy_box").css({ display: "none" });
});
$(".pro_consult")
.mouseover(function() {
var ms = new Date().getSeconds();
if (ms >= 0 && ms < 20) {
$("#proQQ").attr(
"src",
imgUrl + "/pro_qq_1.png"
);
$("#proQQ1").attr(
"src",
imgUrl + "/pro_qq_3.png"
);
} else if (ms >= 20 && ms < 40) {
$("#proQQ").attr(
"src",
imgUrl + "/pro_qq_2.png"
);
$("#proQQ1").attr(
"src",
imgUrl + "/pro_qq_1.png"
);
} else {
$("#proQQ").attr(
"src",
imgUrl + "/pro_qq_3.png"
);
$("#proQQ1").attr(
"src",
imgUrl + "/pro_qq_2.png"
);
}
$(".pro_box").css({ display: "block" });
})
.mouseout(function() {
$(".pro_box").css({ display: "none" });
});
}