$(function () { if (!IsPC()) { var DEFAULT_WIDTH = 600, // 页面的默认宽度 ua = navigator.userAgent.toLowerCase(), // 根据 user agent 的信息获取浏览器信息 deviceWidth = window.screen.width, // 设备的宽度 devicePixelRatio = window.devicePixelRatio || 1, // 物理像素和设备独立像素的比例,默认为1 targetDensitydpi; // Android4.0以下手机不支持viewport的width,需要设置target-densitydpi if (ua.indexOf("android") !== -1 && parseFloat(ua.slice(ua.indexOf("android") + 8)) < 4) { targetDensitydpi = DEFAULT_WIDTH / deviceWidth * devicePixelRatio * 160; $('meta[name="viewport"]').attr('content', 'target-densitydpi=' + targetDensitydpi + ', width=device-width, user-scalable=yes'); } $("a").each(function () { if ($(this).attr("data-mobile")) { $(this).attr({ "href": $(this).attr("data-mobile") }); } }); $('.act-banner .list').each(function () { if ($(this).height() > 100) { $(this).height($(this).height() * 0.5); } }) } common.load(); //图片延迟加载 var list_img = $("body").find(".lazy"); var w_height = $(window).height(); scrollControl(list_img, w_height); $(window).scroll(function () { scrollControl(list_img, w_height) }) })
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://"); document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fabfdfdca04c4cb6f2732be0cf4940627' type='text/javascript'%3E%3C/script%3E"));