/*�����෽�� ----------------------------------------------*/ //if (browserredirect()) { // //alert("�ƶ��ʊ�templates/main/jscommon.js"); // location.href = '/mobile/default2.aspx'; //} //����ƿ��ƶ��豸���� function browserredirect() { var suseragent = navigator.useragent.tolowercase(); var bisipad = suseragent.match(/ipad/i) == "ipad"; var bisiphoneos = suseragent.match(/iphone os/i) == "iphone os"; var bismidp = suseragent.match(/midp/i) == "midp"; var bisuc7 = suseragent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4"; var bisuc = suseragent.match(/ucweb/i) == "ucweb"; var bisandroid = suseragent.match(/android/i) == "android"; var bisce = suseragent.match(/windows ce/i) == "windows ce"; var biswm = suseragent.match(/windows mobile/i) == "windows mobile"; if (bisipad || bisiphoneos || bismidp || bisuc7 || bisuc || bisandroid || bisce || biswm) { return true; } else { return false; } } $(function () { //zoom $(window).resize(function () { $('[zoom-width][zoom-heigh]:visible').each(function () { $(this).height($(this).width() * parseint($(this).attr('zoom-heigh')) / parseint($(this).attr('zoom-width'))); }); }).resize(); //end if (browserredirect()) { //g_content img $('.g_content img').each(function () { $(this).width('auto').height('auto'); }); //end } else { } //menu $('.g_header .menu').click(function () { var n = $('.g_header .nav'); n.hasclass('show') ? n.removeclass('show') : n.addclass('show'); return false; }); //end //tool $('.g_footer .back').click(function () { $('html,body').animate({ scrolltop: 0 }, 300); return false; }); //end });