1$(function () { 2 initBackground(); 3 4 initSloganLeft(); 5 initSloganRight(); 6 7 /*é¦é¡µ*/ 8 var pageIndex_index = $("#myFocus1 .indexList"); 9 var ImgList_index = $("#myFocus1 .imgList"); 10 slideBanner(pageIndex_index, ImgList_index, 570) 11 12 /*èµè®¯ä¸å¿*/ 13 var pageIndex_zxzx = $("#zxzxIndexList"); 14 var ImgList_izxzx = $("#zxzxImgList"); 15 slideBanner(pageIndex_zxzx, ImgList_izxzx, 1160); 16 17 /*å³ä¾§äºç»´ç å ³é*/ 18 $("#closeQRCode").click(function () { 19 $("div#QRCode").slideToggle(); 20 }) 21 22 scrollTop(); 23 24 //èµ°è¿è¿å·æ éæ»å¨ 25 initMarquee("outerDiv", "floatImgFirst", "floatImgSecond"); 26 27 initQRCodeImgSwitch(); 28 29 slideLink($("#linkButton"), $("#mbcs_inner_div"), 370); 30 31 32 listenScroll(); 33}) 34 35/*ç嬿»å¨*/ 36function listenScroll() 37{ 38 $(window).scroll(function (event) { 39 var topScroll = window.scrollY; 40 var QRCode = $("#QRCode"); 41 if (topScroll < 400) 42 { 43 QRCode.css({top: '400px'}); 44 } 45 46 if (topScroll >= 400) 47 { 48 QRCode.css({top: '100px'}); 49 } 50 }) 51} 52 53 54/*å³è¾¹è¾¹æ è¯åæ¢ 5-8*/ 55function initSloganRight() 56{ 57 var byRight = $("#byRight"); 58 var index = 5; 59 var timer = setInterval(function () { 60 if (index < 8) 61 { 62 index++; 63 } 64 else 65 { 66 index = 5; 67 } 68 69 byRight.animate({opacity: 0.7}, 750).fadeIn(1000, function () { 70 $(this).attr("src", "/global/ico_by" + index + ".png").animate({opacity: 1}, 500); 71 }); 72 }, 3000); 73} 74 75/*左边æ è¯åæ¢ 1-4*/ 76function initSloganLeft() 77{ 78 var byLeft = $("#byLeft"); 79 var index = 1; 80 var timer = setInterval(function () { 81 if (index < 4) 82 { 83 index++; 84 } 85 else 86 { 87 index = 1; 88 } 89 90 byLeft.animate({opacity: 0.7}, 750).fadeIn(1000, function () { 91 $(this).attr("src", "/global/ico_by" + index + ".png").animate({opacity: 1}, 500); 92 }); 93 }, 3000); 94} 95 96 97/*tab忢ææ:é¦é¡µ*/ 98function switchTab_index(event, className) 99{ 100 if (className) 101 { 102 $(event).parent().find("a").removeClass(className); 103 $(event).addClass(className); 104 } 105 else 106 { 107 $(event).parent().find("a").removeClass("active"); 108 $(event).addClass("active"); 109 } 110 111 112 var index = $(event).index(); 113 $(event).parent().next().children("ul").eq(index).show().siblings("ul").hide(); 114} 115 116function switchTab_zxfw(event) 117{ 118 $(event).parent().find("a").removeClass("active"); 119 $(event).addClass("active"); 120 121 var index = $(event).index(); 122 $(event).parent().parent().next().children("div").eq(index).show().siblings("div").hide(); 123} 124 125function switchTab_zxzx(event) 126{ 127 $(event).parent().find("a").removeClass("zwyw"); 128 $(event).addClass("zwyw"); 129 130 var index = $(event).index(); 131 $(event).parent().next().children("div").eq(index).show().siblings("div").hide(); 132} 133 134 135/*äºç»´ç å¾ç忢*/ 136function initQRCodeImgSwitch() 137{ 138 var qrCodeButton = $("#qrCodeButton").find("div"); 139 var qrCodeImgList = $("#qrCodeImgList"); 140 qrCodeButton.each(function () { 141 $(this).hover(function () { 142 var index = $(this).index(); 143 qrCodeImgList.find("div").hide(); 144 qrCodeImgList.find("div").eq(index).show(); 145 }) 146 }) 147} 148 149 150/*åé¡¶é¨å½æ°*/ 151function scrollTop() 152{ 153 $("#topImg").click(function () { 154 $("html,body").animate({scrollTop: 0}, 1000); 155 }); 156} 157 158/*èæ¯å¾åæ¢*/
159function initBackground() 160{ 161 var background = $("#background"); 162 var index = 1; 163 var timer = setInterval(function () { 164 if (index < 2) 165 { 166 index++; 167 } 168 else 169 { 170 index = 1; 171 } 172 173 background.animate({opacity: 0.7}, 750).fadeIn(1000, function () { 174 $(this).attr("class", "banner" + index).animate({opacity: 1}, 1000); 175 }); 176 }, 5000); 177} 178 179function initMarquee(contentId, firstInfoId, secondInfoId) 180{ 181 var speed = 30; 182 var infoContent = $("#" + contentId); 183 var info1 = $("#" + firstInfoId); 184 var info2 = $("#" + secondInfoId); 185 info2.html(info1.html()); 186 187 function scoll() 188 { 189 if (infoContent.scrollLeft() >= info1.width()) 190 { 191 infoContent.scrollLeft(0); 192 } 193 else 194 { 195 infoContent.scrollLeft(infoContent.scrollLeft() + 1); 196 } 197 }; 198 199 var timer = setInterval(scoll, speed); 200 201 infoContent.mouseover(function () { 202 clearInterval(timer); 203 }); 204 205 infoContent.mouseout(function () { 206 timer = setInterval(scoll, speed); 207 }); 208} 209 210/** 211 * å¾çå·¦å³åæ¢ 212 * @param obj ææ¾åºå·çå ç´ 213 * @param objImg å¾çå表å ç´ 214 * @param width å¾ç宽度 215 */ 216function slideBanner(obj, objImg, width) 217{ 218 var curIndex = 0; //å½åindexf 219 var imgLen = objImg.find("li").length == 0 ? 4 : objImg.find("li").length; //å¾çæ»æ° 220 //宿¶å¨èªå¨åæ¢5ç§æ¯æ¬¡ 221 var autoChange = setInterval(function () { 222 if (curIndex < imgLen - 1) 223 { 224 curIndex++; 225 } 226 else 227 { 228 curIndex = 0; 229 } 230 //è°ç¨åæ¢å¤ç彿° 231 changeTo(curIndex); 232 }, 5000); 233 234 var html = ""; 235 for (var i = 1; i <= imgLen; i++) 236 { 237 html += "<li>" + i + "</li>"; 238 } 239 obj.append(html); 240 obj.find("li:first").addClass("current") 241 //对å³ä¸è§æé®indexè¿è¡äºä»¶ç»å®å¤çç 242 obj.find("li").each(function (item) { 243 $(this).hover(function () { 244 clearInterval(autoChange); 245 changeTo(item); 246 curIndex = item; 247 }, function () { 248 autoChangeAgain(); 249 }); 250 }); 251 252 //æ¸ é¤å®æ¶å¨æ¶åçéç½®å®æ¶å¨--å°è£ 253 function autoChangeAgain() 254 { 255 autoChange = setInterval(function () { 256 if (curIndex < imgLen - 1) 257 { 258 curIndex++; 259 } 260 else 261 { 262 curIndex = 0; 263 } 264 //è°ç¨åæ¢å¤ç彿° 265 changeTo(curIndex); 266 }, 5000); 267 } 268 269 //忢 270 function changeTo(num) 271 { 272 var goLeft = num * width; 273 objImg.animate({ 274 marginLeft: "-" + goLeft + "px" 275 }, width); 276 obj.find("li").removeClass("current").eq(num).addClass("current"); 277 } 278} 279 280/** 281 * å¨çº¿æå¡"å·¦å³åæ¢ææ 282 * @param obj åºå·div 283 * @param objImg å½åå 容çdiv 284 * @param width å¾ç宽度 285 */ 286function slideLink(obj, objImg, width) 287{ 288 var curIndex = 0; //å½åindex 289 var imgLen = objImg.find("div.bmcs").length; //å¾çæ»æ° 290 291 var html = ""; 292 for (var i = 1; i <= imgLen; i++) 293 { 294 html += '<a href="javascript:void(0);">' + i + '</a>'; 295 } 296 obj.append(html); 297 obj.find("a:first").addClass("dq") 298 //对å³ä¸è§æé®indexè¿è¡äºä»¶ç»å®å¤çç 299 obj.find("a").each(function (item) { 300 $(this).hover(function () { 301 changeTo(item); 302 curIndex = item; 303 }); 304 }); 305 306 //忢 307 function changeTo(num) 308 { 309 var goLeft = num * width; 310 objImg.animate({ 311 marginLeft: "-" + goLeft + "px" 312 }, width); 313 obj.find("a").removeClass("dq").eq(num).addClass("dq"); 314 } 315} 316 317/*æ ¹æ®ç¼å·åå¯ç æ¥çä¿¡ä»¶*/ 318function usePwdAndCode() 319{ 320 var url = "/web/inquiry/PublicityCheckPage_M/toDetailPageByCode"; 321 var code = $("#inquiryCode").val().trim(); 322 if (code) 323 { 324 url += "?code=" + code; 325 } 326 else 327 { 328 alert("ç¼å·ä¸è½ä¸ºç©º"); 329 $("#inquiryCode").focus(); 330 return; 331 } 332 var password = $("#inquiryPassword").val().trim(); 333 if (password) 334 { 335 url += "&password=" + password; 336 } 337 else 338 { 339 alert("å¯ç ä¸è½ä¸ºç©º"); 340 $("#inquiryPassword").focus(); 341 return; 342 } 343 344 var ajax = new Cyan.Ajax(); 345 ajax.method = "GET"; 346 ajax.setRequestHeader("Accept", "text/json"); 347 ajax.handleObject = function (result) { 348 if (result == "ok") 349 { 350 window.open("/web/lzxmh/inquiry/inquiry_pwd_detail.ptl?code="+ code+"&pwd=" + password, "_blank") 351 } 352 else if (result == "noInquiryFound") 353 { 354 alert("ç¼å·æè å¯ç å¡«åé误"); 355 } 356 else if (result == "processing") 357 { 358 alert("æ¥ä¿¡æ£å¨å¤çä¸ï¼è¯·èå¿çå"); 359 } 360 else 361 alert(result); 362 } 363 ajax.call(url); 364} 365 366 367/*è¿å ¥å¤é¾æç¤ºé¡µé¢ï¼é使ç¨clickæ¹å¼ å ¼å®¹ie*/ 368function gotoUrl(url) 369{ 370 if (window.VBArray) 371 { 372 var gotoLink = document.createElement('a'); 373 gotoLink.setAttribute("target", "_blank"); 374 gotoLink.href = "/web/external.jsp?url=" + encodeURIComponent(url); 375 document.body.appendChild(gotoLink); 376 gotoLink.click(); 377 } 378 else 379 { 380 window.open(url); 381 } 382}
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.