var tme={};
tme.init=$(function(){
var browser = (function(){
var ua = window.navigator.useragent.tolowercase(), sys = null, s;
if(s = ua.match(/rv:([\d.]+)\) like gecko/)){sys = {type:'ie',version:s[1]};}
else if(s = ua.match(/msie ([\d.]+)/)){sys = {type:'ie',version:s[1]};}
else if(s = ua.match(/firefox\/([\d.]+)/)){sys = {type:'firefox',version:s[1]};}
else if(s = ua.match(/chrome\/([\d.]+)/)){sys = {type:'chrome',version:s[1]};}
else if(s = ua.match(/opera.([\d.]+)/)){sys = {type:'opera',version:s[1]};}
else if(s = ua.match(/version\/([\d.]+).*safari/)){sys = {type:'safari',version:s[1]};}
else if(s = ua.match(/ucbrowser\/([\d.]+)/)){sys = {type:'uc',version:s[1]};}
else if(s = ua.match(/micromessenger\/([\d.]+)/)){sys = {type:'wx',version:s[1]};}
else{sys = {type:'unknown',version:'unknown'};}
sys.ismobile = !!ua.match(/applewebkit.*mobile.*!/) || !!ua.match(/(iphone|ipod|android|ios|ipad)/i);
return sys;
})();
/*检测ie*/
if(browser.type =="ie" && browser.version < 8){
location.href="http://www.jltech.cn/upgradebrowser/";
}
/*判断谷歌27*/
if(browser.type == 'chrome' && browser.version <= 27){
$('.font_scale8, .font_scale10').addclass('font_adjust');
}
tme.fnnav();
$('#menu').mmenu();
})
$(document).ready( tme.init );
tme.fnnav=function(){
function fnnav(el){
$(el).css({"opacity":"1","height":"auto"});
}
$(".pcnav ul>li").hover(function(){
$(this).find(".nav_hidden").stop().slidedown(300,function(){
fnnav(this);
})
},function(){
$(this).find(".nav_hidden").stop().fadeout(300,function(){
fnnav(this);
})
});
$(".pcnav ul>li .nav_hidden").hover(function(){
fnnav(this);
})
}
// 加入收藏和设为首页用法
// 加入收藏
// 设为首页
// 设置为主页
function sethome(obj,vrl){
try{
obj.style.behavior='url(#default#homepage)';obj.sethomepage(vrl);
}
catch(e){
if(window.netscape) {
try {
netscape.security.privilegemanager.enableprivilege("universalxpconnect");
}
catch (e) {
alert("此操作被浏览器拒绝!\n请在浏览器地址栏输入“about:config”并回车\n然后将 [signed.applets.codebase_principal_support]的值设置为'true',双击即可。");
}
var prefs = components.classes['@mozilla.org/preferences-service;1'].getservice(components.interfaces.nsiprefbranch);
prefs.setcharpref('browser.startup.homepage',vrl);
}else{
alert("您的浏览器不支持,请按照下面步骤操作:1.打开浏览器设置。2.点击设置网页。3.输入:"+vrl+"点击确定。");
}
}
}
function shoucang(stitle,surl)
{
try
{
window.external.addfavorite(surl, stitle);
}
catch (e)
{
try
{
window.sidebar.addpanel(stitle, surl, "");
}
catch (e)
{
alert("加入收藏失败,请使用ctrl+d进行添加");
}
}
}