1//å¯¼èª 2//è¶ è¿ä¸å®é«åº¦å¯¼èªæ·»å ç±»å 3var nav = $("header"); //å¾å°å¯¼èªå¯¹è±¡ 4var win = $(window); //å¾å°çªå£å¯¹è±¡ 5var sc = $(document);//å¾å°documentææ¡£å¯¹è±¡ã 6win.scroll(function () { 7 if (sc.scrollTop() >= 100) { 8 nav.addClass("on"); 9 } else { 10 nav.removeClass("on"); 11 } 12}) 13 14//ç§»å¨ç«¯å±å¼nav 15$('#navToggle').on('click', function () { 16 $('.m_nav').addClass('open'); 17}) 18//å ³énav 19$('.m_nav .top .closed').on('click', function () { 20 $('.m_nav').removeClass('open'); 21}) 22 23//äºçº§å¯¼èª ç§»å¨ç«¯ 24$(".m_nav .ul li").click(function () { 25 $(this).children("div.dropdown_menu").slideToggle('slow') 26 $(this).siblings('li').children('.dropdown_menu').slideUp('slow'); 27}); 28 29var screenWidth = $(window).width(); 30var screenHeight = $(window).height(); 31//导èªé¼ æ æ»è¿ææ 32if (screenWidth > 1024) { 33 $(".header .nav_content>li").hover(function () { 34 $(this).addClass('on'); 35 $(this).children('div').show(); 36 }, function () { 37 $(this).children('div').hide(); 38 $(this).removeClass('on') 39 }); 40 $(".header .nav_content>li>div>a").hover(function () { 41 $(this).addClass('on'); 42 }, function () { 43 $(this).removeClass('on') 44 }); 45 $(".header .nav_content .nav_con").hover(function () { 46 $(this).children('div').show(); 47 }, function () { 48 $(this).children('div').hide(); 49 }); 50} else { 51 //ä¸å¼æå é 52 $(".header").append($('.nav_top .container1 .select').clone()) 53 54 $(".index_brand").animate({ 55 'bottom': '7%', 56 'opacity': '1', 57 'filter': 'alpha(opacity=100)' 58 }, 700) 59 60 $(".index_brand .left .h2_box").delay(1000).animate({ 61 'left': '0', 62 'opacity': '1', 63 'filter': 'alpha(opacity=100)' 64 }, 700); 65 66 if (screenWidth <= 1024) { 67 for (var i = 0; i < $(".header li").length; i++) { 68 if ($('.header li:eq(' + i + ')').find('div').length > 0) { 69 var href = $('.header li:eq(' + i + ')').children('a').attr('href'); 70 $('.header li:eq(' + i + ')').children('a').removeAttr('href'); 71 $('.header li:eq(' + i + ')').children('a').attr('data-href', href); 72 } 73 }; 74 $(".header .nav li>div").stop().animate({ 75 'height': '0' 76 }); 77 $(".header .nav li").removeClass('on'); 78 } 79 80 //ç¹å»å¯¼èªæé®å ³éæå±å¼å¯¼èª 81 function bodyScroll(event) { 82 event.preventDefault(); 83 } 84 $(".mobile-btn").click(function () { 85 if ($(this).hasClass('show')) { 86 $(".nav_top").show(); 87 $(this).addClass('hidden').removeClass('show'); 88 $(".header ul").css({ 89 'left': '-100%' 90 }); 91 $(".header .nav li").removeClass('on'); 92 $(".header .nav li>div").css({ 93 'height': '0' 94 }) 95 $(".header").css({ 96 "top": '52px' 97 }) 98 $(".bannerBox .bannerSlide video").show(); 99 document.body.removeEventListener('touchmove', bodyScroll, false); 100 $("body").css({ "position": "initial", "height": "auto" }); 101 } else { 102 $(".nav_top").hide(); 103 $(".header").css({ 104 "top": '0' 105 }) 106 $(this).addClass('show').removeClass('hidden'); 107 $(".header ul").css({ 108 'left': '0' 109 }); 110 111 $(".bannerBox .bannerSlide video").hide(); 112 113 document.body.addEventListener('touchmove', bodyScroll, { passive: false }, false); 114 $('body').css({ 'position': 'fixed', "width": "100%" }); 115 } 116 }) 117 118 $(".header .nav_content li>a").click(function () { 119 if ($(this).parent('li').hasClass('on')) { 120 var data_href = $(this).attr('data-href'); 121 $(this).attr('href', data_href).parent('li').siblings().parent('a').removeAttr('href'); 122 } 123 $(this).parent('li').addClass('on').siblings().removeClass('on'); 124 var aLength = $(this).siblings('div').find('a').length; 125 $(this).siblings('div').stop().animate({ 126 'height': aLength * 47 127 }).parent('li').siblings().find('div').stop().animate({ 128 'height': '0' 129 }); 130 }) 131} 132/*if(screenWidth>=500){ 133 var leftHeight=$(".server_c_content .left").height(); 134 var rightHeight=$(".server_c_content .right").height(); 135 if(leftHeight>=rightHeight){ 136 $(".server_c_content .right").css({ 137 'position': 'absolute', 138 'right': 0, 139 'top': '50%', 140 '-webkit-transform': 'translateY(-50%)', 141 '-moz-transform': 'translateY(-50%)', 142 '-ms-transform': 'translateY(-50%)', 143 '-o-transform': 'translateY(-50%)', 144 'transform': 'translateY(-50%)' 145 }) 146 }else{ 147 $(".server_c_content .left").css({ 148 'position': 'absolute', 149 'left': 0, 150 'top': '50%', 151 '-webkit-transform': 'translateY(-50%)', 152 '-moz-transform': 'translateY(-50%)', 153 '-ms-transform': 'translateY(-50%)', 154 '-o-transform': 'translateY(-50%)', 155 'transform': 'translateY(-50%)' 156 }) 157 } 158 }*/ 159 160 161 162 163//é¼ æ å¾ä¸æ»å¨å¯¼èªæ¾ç¤ºï¼å¾ä¸æ»å¨å¯¼èªéè 164var scrollFunc = function (e) { 165 e = e || window.event; 166 // $(".header ul").stop().animate({ 167 // 'left':'-100%' 168 // }); 169 170 if (e.wheelDelta) { //夿æµè§å¨IEï¼è°·ææ»è½®äºä»¶ 171 172 if (e.wheelDelta > 0) { //彿»è½®å䏿»å¨æ¶ 173 174 } 175 if (e.wheelDelta < 0) { //彿»è½®å䏿»å¨æ¶ ã 176 177 } 178 } else if (e.detail) { //Firefoxæ»è½®äºä»¶ 179 if (e.detail > 0) { //彿»è½®å䏿»å¨æ¶ 180 181 } 182 if (e.detail < 0) { //彿»è½®å䏿»å¨æ¶ 183 184 } 185 } 186} 187 188//ç»é¡µé¢ç»å®æ»è½®æ»å¨äºä»¶ 189if (document.addEventListener) {//firefox 190 document.addEventListener('DOMMouseScroll', scrollFunc, false); 191} 192 193//æ»å¨æ»è½®è§¦åscrollFuncæ¹æ³ //ie è°·æ 194window.onmousewheel = document.onmousewheel = scrollFunc; 195 196//å°è£ ç页颿»å¨å å ¥å¨ç»ææ 197function scrollT($Dom) { 198 if ($Dom.offset()) { 199 if ($(window).scrollTop() + $(window).height() >= $Dom.offset().top + 200) { 200 return true; 201 } 202 } 203} 204 205//导èªå¨ç» 206 207if ($(".brand_anchor,.f_title").length > 0) { 208 var offSetTop = $(".brand_anchor,.f_title").offset().top; 209} 210$(window).scroll(function () { 211 if (screenWidth > 1024) { 212 $(".index_brand").animate({ 213 'bottom': '7%', 214 'opacity': '1', 215 'filter': 'alpha(opacity=100)' 216 }, 700); 217 218 $(".index_brand .left .h2_box").delay(1000).animate({ 219 'left': '0', 220 'opacity': '1', 221 'filter': 'alpha(opacity=100)' 222 }, 700); 223 } 224 225 var scrollTop = $(window).scrollTop(); 226 if (screenWidth > 1024) { 227 if (scrollTop >= offSetTop) { 228 $(".brand_anchor,.f_title").css({ 229 'position': 'fixed', 230 'left': '0', 231 "top": '0' 232 }) 233 } else { 234 $(".brand_anchor,.f_title").css({ 235 'position': 'inherit', 236 'top': '0' 237 }) 238 } 239 } else if (screenWidth <= 1024 && screenWidth > 500) { 240 if (scrollTop >= 52) { 241 $(".header").css({ 242 'position': 'fixed', 243 'top': '0', 244 'opacity': '1', 245 'filter': 'alpha(opacity=100)' 246 }); 247 } else { 248 $(".header").css({ 249 'position': 'relative', 250 'top': '0' 251 }) 252 } 253 if ((scrollTop + 104) >= offSetTop) { 254 $(".brand_anchor,.f_title").css({ 255 'position': 'fixed', 256 'left': '0', 257 "top": '73px' 258 }) 259 } else { 260 $(".brand_anchor,.f_title").css({ 261 'position': 'inherit', 262 'top': '0' 263 }) 264 } 265 } else { 266 if (scrollTop >= 52) { 267 $(".header").css({ 268 'position': 'fixed', 269 'top': '0', 270 'opacity': '1', 271 'filter': 'alpha(opacity=100)' 272 }); 273 } else { 274 $(".header").css({ 275 'position': 'relative', 276 'top': '0' 277 }) 278 } 279 if ((scrollTop + 112) >= offSetTop) { 280 $(".brand_anchor,.f_title").css({ 281 'position': 'fixed', 282 'left': '0', 283 "top": '64px' 284 }) 285 } else { 286 $(".brand_anchor,.f_title").css({ 287 'position': 'inherit', 288 'top': '0' 289 }) 290 } 291 } 292}) 293 294if (screenWidth > 1024) { 295 //$(".footer_top .left li:eq(0)").addClass("on"); 296 $(".footer_top .left li:eq(0)").hover(function () { 297 if ($(this).hasClass('on')) { 298 $(this).removeClass('on'); 299 } else { 300 $(this).addClass('on'); 301 } 302 }) 303} else { 304 $(".footer_top .left li:eq(0)").on('click', function () { 305 var e = arguments.callee.caller.arguments[0] || event; 306 if (e && e.stopPropagation) { 307 e.stopPropagation(); 308 } else if (window.event) { 309 window.event.cancelBubble = true; 310 } 311 if ($(this).hasClass('on')) { 312 $(this).removeClass('on'); 313 } else { 314 $(this).addClass('on'); 315 } 316 }) 317} 318 319 320if (screenWidth > 1024) { 321 $(".brand_anchor a").on('click touchend', function () {
322 if ($(".brand_anchor").css("position") == "fixed") { 323 $("html, body").animate({ 324 scrollTop: ($($(this).attr("href")).offset().top - 50) + "px" 325 }, 500); 326 } else { 327 $("html, body").animate({ 328 scrollTop: ($($(this).attr("href")).offset().top - 100) + "px" 329 }, 500); 330 } 331 return false; 332 }); 333} else if (screenWidth > 500 && screenWidth <= 1024) { 334 $(".brand_anchor a").on('click touchend', function () { 335 if ($(".brand_anchor").css("position") === "fixed") { 336 $("html, body").animate({ 337 scrollTop: ($($(this).attr("href")).offset().top - 142) + "px" 338 }, 500); 339 } else { 340 $("html, body").animate({ 341 scrollTop: ($($(this).attr("href")).offset().top - 186) + "px" 342 }, 500); 343 } 344 return false; 345 }); 346} else { 347 $(".brand_anchor a").on('click touchend', function () { 348 if ($(".brand_anchor").css("position") === "fixed") { 349 $("html, body").animate({ 350 scrollTop: ($($(this).attr("href")).offset().top - 115) + "px" 351 }, 500); 352 } else { 353 $("html, body").animate({ 354 scrollTop: ($($(this).attr("href")).offset().top - 165) + "px" 355 }, 500); 356 } 357 return false; 358 }); 359} 360 361$('body').bind('click', function (event) { 362 $(".footer_top .left li:eq(0)").removeClass('on'); 363}); 364 365 366/*$("body").on("click",".img_btn,.data_honor",function(){ 367 var data_src=$(this).attr('data-src'); 368 $("body").append('<img class="data_img" src='+data_src+'><span class="img_mask" onclick="test()"></span><div class="mask_a_btn"><span class="prev"><img src="http://1812115029.pool1-gcsite.make.yun300.cn/repository/image/4YExMB1uRNmrwcZcfgKcHw.png"></span><span class="next" ><img src="http://1812115029.pool1-gcsite.make.yun300.cn/repository/image/RHJgFuNjS2SkPPNY95-UtQ.png"></span></div>'); 369 $("body").css("overflow","hidden"); 370 $(".recruit_search .select_box").stop().slideUp(); 371 372 373 374 }); 375 function test(){ 376 $(".img_mask,.data_img,.mask_a_btn").remove(); 377 $("body").css("overflow","auto"); 378 k=0; 379 }*/ 380 381 382//Img:è¦æ¾å¾ççimgå ç´ ï¼onloadæ¶ä¼ åå¯ç¨this 383//maxHeight :imgå ç´ çé«åº¦ï¼åç´ ï¼å¾çæ¡ æå¤§é«åº¦ï¼ 384//maxWidth:imgå ç´ ç宽度ï¼åç´ ï¼å¾çæ¡ æå¤§å®½åº¦ï¼ 385$.fn.resizeImg = function () { 386 var _this = $(this); 387 var image = new Image(); 388 _this.each(function () { 389 var newWidth = 0, 390 newHeight = 0, 391 maxWidth = $(this).parent()[0].offsetWidth, 392 maxHeight = $(this).parent()[0].offsetHeight; 393 //åå¾çåå§å°åï¼ç¨äºè·ååå¾çççå®å®½é«ï¼å½<img>æ ç¾æå®äºå®½ã髿¶ä¸åå½±åï¼ 394 image.src = $(this)[0].src; 395 // å½å¾çæ¯å¾çæ¡å°æ¶ä¸å任使¹å 396 if (image.width < maxWidth && image.height < maxHeight) { 397 newWidth = image.width; 398 newHeight = image.height; 399 } else 400 //åå¾ç宽髿¯ä¾ å¤§äº å¾çæ¡å®½é«æ¯ä¾,å以æ¡ç宽为æ å缩æ¾ï¼åä¹ä»¥æ¡çé«ä¸ºæ åç¼©æ¾ 401 { 402 if (maxWidth / maxHeight <= image.width / image.height) //åå¾ç宽髿¯ä¾ å¤§äº å¾çæ¡å®½é«æ¯ä¾ 403 { 404 newWidth = maxWidth;//以æ¡ç宽度为æ å 405 newHeight = maxWidth * (image.height / image.width); 406 } 407 else { //åå¾ç宽髿¯ä¾ å°äº å¾çæ¡å®½é«æ¯ä¾ 408 newWidth = maxHeight * (image.width / image.height); 409 newHeight = maxHeight;//以æ¡çé«åº¦ä¸ºæ å 410 } 411 } 412 $(this).css({ "width": newWidth, "height": newHeight, "marginTop": (maxHeight - newHeight) / 2 }); 413 $(this).parent().css({ "textAlign": "center", "overflow": "hidden" }); 414 }); 415} 416 417var t_img; // 宿¶å¨ 418var isLoad = true; // æ§å¶åé 419 420// 夿å¾çå è½½ç¶åµï¼å è½½å®æååè° 421isImgLoad(function () { 422 $(".resize_img").resizeImg(); 423}); 424 425// 夿å¾çå è½½ç彿° 426function isImgLoad(callback) { 427 // 注ææçå¾çç±»å齿¯coverï¼å 为æåªéè¦å¤çcoverãå ¶å®å¾çå¯ä»¥ä¸ç®¡ã 428 // æ¥æ¾ææå°é¢å¾ï¼è¿ä»£å¤ç 429 $('.resize_img').each(function () { 430 // æ¾å°ä¸º0å°±å°isLoad设为falseï¼å¹¶éåºeach 431 if (this.height === 0) { 432 isLoad = false; 433 return false; 434 } 435 }); 436 // 为trueï¼æ²¡æåç°ä¸º0çãå è½½å®æ¯ 437 if (isLoad) { 438 clearTimeout(t_img); // æ¸ é¤å®æ¶å¨ 439 // åè°å½æ° 440 callback(); 441 // 为falseï¼å 为æ¾å°äºæ²¡æå è½½å®æçå¾ï¼å°è°ç¨å®æ¶å¨éå½ 442 } else { 443 isLoad = true; 444 t_img = setTimeout(function () { 445 isImgLoad(callback); // é彿«æ 446 }, 500); // æè¿éè®¾ç½®çæ¯500毫ç§å°±æ«æä¸æ¬¡ï¼å¯ä»¥èªå·±è°æ´ 447 } 448} 449$(".search_btn").click(function () { 450 $(".search_text").slideToggle(); 451}); 452$(".close_search").click(function () { 453 $(".search_text").hide(); 454}); 455//ä¸è±æä¸æè·³è½¬ 456function mbar(sobj) { 457 var docurl = sobj.options[sobj.selectedIndex].value; 458 if (docurl != "") { 459 open(docurl, '_blank'); 460 sobj.selectedIndex = 0; 461 sobj.blur(); 462 } 463} 464$('.select a').each(function () { 465 var lang = $(this).text().trim(); 466 if (lang == "ENG" || lang == "en") { 467 $(this).addClass('on'); 468 } 469})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.