1var canload = true; //æ¯å¦è½å è½½ é»è®¤è½å è½½ 2var arrPro; //ProList 产ååç§° æ°ç»["S905","S812","S805","S802","MX","MXS","T866","T826","T868","T828","M6C","M802","M805","M806","M3"] 3var arrurl; // å½å页é¢çUrlç¸å ³åæ°ï¼ä½ä¸ºåºåå½åæ¾ç¤ºå°é£ä¸ªäº§åçå ³é®åæ° 4var thisindex; //å½å对åºçæ¯ç¬¬å 个产åï¼æé arrPro使ç¨ï¼ 5var hengping = false; //é»è®¤ç«å± 6var i = 0; 7var pdleng = $(".Commonbanner").length; 8var ProductWidth, ProductHeight, ProductliWidth, baheight, bannerimg; 9var curPage = 0; 10var shuzu, shuzuTemp, shuzu_Zero; 11var baw, srcW, srcH; 12var image_mem = new Image(); 13var newscrollTop = 0; //æ°é»é¡µé¢çé«åº¦ 14 15var countNum = 0; 16 17var lastScroll; 18 19var urlHistory = new Array(); //ç»è¿è·¯ç±çUrl å°å ç¨æ¥æ¨¡æH5çhistory 20 21 22function myScroll(){ 23 24 var Scroll=parseFloat($(window).height()) + parseFloat($(window).scrollTop()) 25 var direction = (parseInt($(window).scrollTop())-lastScroll)>0?true:false; 26 27 if(parseInt($(window).scrollTop())<100){ 28 $(".Scrolltop span").removeClass("cur"); 29 $(".Scrolltop").removeClass("scblock"); 30 } 31 else if(Scroll<=$(document).height()-10){ 32 //è¿éæ¯æ²¡å°åºå°±ä¸æ¾ç¤º 33 if(direction){ 34 $(".Scrolltop span").removeClass("cur"); 35 $(".Scrolltop").removeClass("scblock"); 36 } 37 else if(!direction){ 38 $(".Scrolltop").addClass("scblock"); 39 setTimeout(function(){ 40 $(".Scrolltop span").addClass("cur"); 41 },10) 42 } 43 } 44 else{ 45 $(".Scrolltop").addClass("scblock"); 46 setTimeout(function(){ 47 $(".Scrolltop span").addClass("cur"); 48 },10) 49 } 50 lastScroll = parseInt($(window).scrollTop()); 51} 52 53$(document).on("click",".Scrolltop",function(){ 54 $("html,body").stop(true).animate({scrollTop:0},300) 55}) 56 57function orient() { 58 if (window.orientation == 0 || window.orientation == 180) { 59 orientation = 'portrait'; 60 hengping = false; 61 return false; 62 } 63 else if (window.orientation == 90 || window.orientation == -90) { 64 orientation = 'landscape'; 65 hengping = true; 66 return false; 67 } 68} 69 70$(function(){ 71 orient(); 72 $(window).bind('orientationchange', function(e){ 73 orient(); 74 onResize(); 75 BannerHeight(); 76 Productbanner(); 77 CaseScroll(); 78 Casedot(nj,1); 79 }); 80}) 81 82 83function Productbanner() { 84 85 $(".Commonbanner").css({ height: $(window).height() }) 86 var pdWidht = $(".bannerwidth").width(); 87 if (thisindex >= 0) { 88 $(".Commonbanner").eq(thisindex).css({ width: pdWidht, left: (0 - pdWidht) * thisindex, "-webkit-transform": "translateX(0)", "-moz-transform": "translateX(0)", "-ms-transform": "translateX(0)", "-o-transform": "translateX(0)", "transform": "translateX(0)" }); 89 pdMovingLayer(); 90 } 91 else { 92 $(".Commonbanner").each(function (i, element) { 93 $(this).css({ "width": pdWidht, left: (0 - pdWidht) * i, "transition-duration": "250ms", "-webkit-transition-duration": "250ms","-o-transition-duration": "250ms","-ms-transition-duration": "250ms","-moz-transition-duration": "250ms", "-webkit-transform": "translateX(" + pdWidht + "px)", "-moz-transform": "translateX(" + pdWidht + "px)", "-ms-transform": "translateX(" + pdWidht + "px)", "-o-transform": "translateX(" + pdWidht + "px)", "transform": "translateX(" + pdWidht + "px)" }); 94 }) 95 } 96 97 if(window.innerWidth>668) 98 { 99 $(".commonclass ul").show().removeClass("cutoverclass"); 100 } 101 else 102 { 103 $(".commonclass ul").hide().addClass("cutoverclass"); 104 } 105 106 if(hengping) 107 { 108 $(".Commonbanner").css({ height: $(window).height()}) 109 if(window.innerWidth>668) 110 { 111 $(".Commonbanner").each(function() { 112 var cmdata = $(this).attr("data-rel"); 113 $(this).css({"background-image":"url("+cmdata+")"}); 114 }); 115 $(".logo").eq(0).show(); 116 } 117 else if(window.innerWidth<668) 118 { 119 $(".Commonbanner").each(function() { 120 var cmattr = $(this).attr("data-rel"); 121 $(this).css({"background-image":"url("+cmattr+")"}); 122 }); 123 $(".logo").eq(0).hide(); 124 } 125 } 126 else 127 { 128 $(".Commonbanner").css({ height: $(window).height()}) 129 if(window.innerWidth>668) 130 { 131 $(".Commonbanner").each(function() { 132 var cmdata = $(this).attr("data-rel"); 133 $(this).css({"background-image":"url("+cmdata+")"}); 134 }); 135 $(".logo").eq(0).show(); 136 } 137 else if(window.innerWidth<668) 138 { 139 $(".Commonbanner").each(function() { 140 var cmattr = $(this).attr("rel"); 141 $(this).css({"background-image":"url("+cmattr+")"}); 142 }); 143 $(".logo").eq(0).hide(); 144 } 145 } 146 147 148 149} 150 151function indexthis() { 152 if (thisindex <= 0) { 153 $(".Productleft").removeAttr("href"); 154 $(".Productright").attr("href", "#Products/" + arrPro[thisindex + 1] + "/index.html"); 155 } 156 else if (thisindex >= arrPro.length - 1) { 157 $(".Productleft").attr("href", "#Products/" + arrPro[thisindex - 1] + "/index.html"); 158 $(".Productright").removeAttr("href") 159 } 160 else { 161 $(".Productleft").attr("href", "#Products/" + arrPro[thisindex - 1] + "/index.html"); 162 $(".Productright").attr("href", "#Products/" + arrPro[thisindex + 1] + "/index.html") 163 } 164 //设置å½å第å 页 165 $(".ProductPage").html((thisindex + 1) + " / <em>" + arrPro.length + "</em>"); 166 $(".nowproduct").html($(".prolist li").eq(thisindex).children("a").html()); 167 document.title = $(".prolist li").eq(thisindex).children("a").html() + ' | Products | Amlogic'; 168 pdMovingLayer(); 169} 170
171function Applicationthis() { 172 if (thisindex <= 0) { 173 $(".Applicationleft").removeAttr("href"); 174 $(".Applicationright").attr("href", "#Application/" + arrPro[thisindex + 1] + "/index01.html"); 175 } 176 else if (thisindex >= arrPro.length - 1) { 177 $(".Applicationleft").attr("href", "#Application/" + arrPro[thisindex - 1] + "/index01.html"); 178 $(".Applicationright").removeAttr("href") 179 } 180 else { 181 $(".Applicationleft").attr("href", "#Application/" + arrPro[thisindex - 1] + "/index01.html"); 182 $(".Applicationright").attr("href", "#Application/" + arrPro[thisindex + 1] + "/index01.html"); 183 } 184 185 //设置å½å第å 页 186 $(".ProductPage").html((thisindex + 1) + " / <em>" + arrPro.length + "</em>"); 187 pdMovingLayer(); 188} 189 190 191 192 193function pdMovingLayer() { 194 pdUnitwidth = $(".bannerwidth").width(); 195 196 for (var j = 0; j < arrPro.length; j++) { 197 if (j < thisindex) { 198 $(".Commonbanner").eq(j).css({ width: pdUnitwidth, left: (0 - pdUnitwidth) * j, "-webkit-transform": "translateX(-" + pdUnitwidth + "px)", "-moz-transform": "translateX(-" + pdUnitwidth + "px)", "-ms-transform": "translateX(-" + pdUnitwidth + "px)", "-o-transform": "translateX(-" + pdUnitwidth + "px)", "transform": "translateX(-" + pdUnitwidth + "px)" }); 199 } 200 else if (j == thisindex) { 201 $(".Commonbanner").eq(j).css({ width: pdUnitwidth, left: (0 - pdUnitwidth) * j, "-webkit-transform": "translateX(0)", "-moz-transform": "translateX(0)", "-ms-transform": "translateX(0)", "-o-transform": "translateX(0)", "transform": "translateX(0)" }); 202 } 203 else if (j > thisindex) { 204 $(".Commonbanner").eq(j).css({ width: pdUnitwidth, left: (0 - pdUnitwidth) * j, "-webkit-transform": "translateX(" + pdUnitwidth + "px)", "-moz-transform": "translateX(" + pdUnitwidth + "px)", "-ms-transform": "translateX(" + pdUnitwidth + "px)", "-o-transform": "translateX(" + pdUnitwidth + "px)", "transform": "translateX(" + pdUnitwidth + "px)" }); 205 } 206 } 207} 208 209 210 211 212 213 214function ProductContents(url, Zero, Hundred, Timing) { 215 216 $.ajax({
217 url: url, 218 type: "GET", 219 dataType : "html", 220 beforeSend: function (res) { 221 $(".Load").show(); 222 Timing = setInterval(function () { 223 if (Zero < Hundred) Zero++; 224 $(".Load").animate({ "width": "" + Zero + "%" }, 600); 225 }, 600); 226 }, 227 complete: function (res) { 228 229 }, success: function (datehtml) { 230 var lujing = $(".Commonbanner").attr("data-rel"); 231 $("<img/>").attr("src",lujing).load(function(){ 232 clearInterval(Timing) 233 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({"width":"0"}); }); 234 $('.web').removeClass('specialefficacy'); 235 $('.web').removeClass('moving'); 236 $(".MobileMenu").removeClass("MobileMenushow") 237 }) 238 $('.web').removeClass('ptal'); 239 240 $("html,body").stop(true).animate({ scrollTop: 0 }, 0) 241 242 setTimeout(function(){ 243 $("#ProductDetailedParameters").html(datehtml) 244 Productbanner(); 245 var f = _.throttle(Productbanner,350) 246 $(window).resize(function () { 247 f(); 248 }) 249 }, 1000) 250 $(".ApplicationSolutionspopup").hide(); 251 252 253 console.log(datehtml) 254 $(".Share").remove(); 255 256 257 //arrPro = ["176","S812","S805"]; 258 arrPro = []; 259 $(".prolist li").each(function () { 260 arrPro[arrPro.length] = $(this).attr("rel"); 261 }); 262 263 arrurl = ((window.location.href).split('#')[1]).split('/')[1]; 264 thisindex = arrPro.indexOf(arrurl); 265 266 indexthis(); 267 268 $(window).bind("scroll",function(){ 269 myScroll(); 270 }) 271 272 delScript("webjs/jquery.zclip.js"); 273 delScript("webjs/newscontjs.js?v=1.0.10"); 274 275 }, 276 error:function(res){ 277 console.log(res) 278 } 279 280 }); 281} 282 283function ProgramContents(url, Timing, Hundred, Zero) { 284 285 $.ajax({
286 url: url, 287 type: "GET", 288 dataType : "html", 289 beforeSend: function () { 290 $(".Load").show(); 291 Timing = setInterval(function () { 292 if (Zero < Hundred) Zero++; 293 $(".Load").animate({ "width": "" + Zero + "%" }, 600); 294 }, 600); 295 }, 296 complete: function () { 297 /*clearInterval(Timing) 298 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({"width":"0"}); }); 299 setTimeout(function () { 300 $('.web').removeClass('specialefficacy'); 301 $('.web').removeClass('moving'); 302 $(".MobileMenu").removeClass("MobileMenushow") 303 }, 1000);*/ 304 var lujing = $(".Commonbanner").attr("data-rel"); 305 $(document).ready(function() { 306 $("<img/>").attr("src",lujing).load(function(){ 307 clearInterval(Timing) 308 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({"width":"0"}); }); 309 $('.web').removeClass('specialefficacy'); 310 $('.web').removeClass('moving'); 311 $(".MobileMenu").removeClass("MobileMenushow") 312 }) 313 }) 314 }, success: function (datehtml) { 315 $(".ApplicationSolutionspopup").hide(); 316 $('.web').removeClass('ptal'); 317 delScript("webjs/jquery.zclip.js"); 318 delScript("webjs/newscontjs.js?v=1.0.10"); 319 320 $(".Share").remove(); 321 322 //arrPro = ["SetTop","SmartTV","SmartHome","SmartTVStick","Projector","Tablet"]; 323 var cururl = ((window.location.href).split('#')[1]).split('/')[2] 324 325 326 var arrProClass = []; 327 $(".Pgclass li").each(function () { 328 var title = $(this).text(); 329 arrProClass[arrProClass.length] = { 330 "name": $(this).attr('rel'), 331 "title": title, 332 "value": ["index01.html", "index02.html", "index03.html"], 333 "values": ["Overview", "Processors", "Devices"] 334 } 335 }); 336 337 //var arrProClass = [ 338 // { 339 // "name": "SetTop", 340 // "title": "æºè½æºé¡¶ç", 341 // "value": ["index01.html", "index02.html", "index03.html"], 342 // "values": ["æ¦è¿°", "è¯ç", "å®¢æ·æ¡ä¾"] 343 // }, 344 // {"name":"SmartTV","title":"æºè½çµè§","value":["index01.html","index02.html","index03.html"],"values":["æ¦è¿°","è¯ç","å®¢æ·æ¡ä¾"]}, 345 // {"name":"SmartHome","title":"æºè½å®¶å± ","value":["index01.html","index02.html","index03.html"],"values":["æ¦è¿°","è¯ç","å®¢æ·æ¡ä¾"]}, 346 // {"name":"SmartTVStick","title":"æºè½çµè§æ£","value":["index01.html","index02.html","index03.html"],"values":["æ¦è¿°","è¯ç","å®¢æ·æ¡ä¾"]}, 347 // {"name":"Projector","title":"æºè½æå½±ä»ª","value":["index01.html","index02.html","index03.html"],"values":["æ¦è¿°","è¯ç","å®¢æ·æ¡ä¾"]}, 348 // {"name":"Tablet","title":"å¹³æ¿çµè","value":["index01.html","index02.html","index03.html"],"values":["æ¦è¿°","è¯ç","å®¢æ·æ¡ä¾"]}] 349 350 arrPro = new Array(); 351 352 for (x = 0; x < arrProClass.length; x++) { 353 arrPro.push(arrProClass[x]["name"]); 354 } 355 arrurl = ((window.location.href).split('#')[1]).split('/')[1]; 356 357 var preUrl = ((window.location.href).split('#')[1]).split('/')[0]; 358 var nexUrl = ((window.location.href).split('#')[1]).split('/')[2]; 359 360 $(".Pgclass a").each(function (index, element) { 361 $(this).attr("href", "#" + preUrl + "/" + arrPro[index] + "/" + nexUrl); 362 }); 363 thisindex = arrPro.indexOf(arrurl); 364 $(".Ejclass,.pgcommclass").html(""); 365 366 for (x = 0; x < arrProClass[thisindex]["value"].length; x++) { 367 $(".Ejclass").append("<li><a href='" + "#" + preUrl + "/" + arrPro[thisindex] + "/" + arrProClass[thisindex]["value"][x] + "' rel='" + arrProClass[thisindex]["value"][x] + "'>" + arrProClass[thisindex]["values"][x] + "</a></li>"); 368 } 369 370 for (x = 0; x < arrProClass[thisindex]["value"].length; x++) { 371 372 $(".pgcommclass").append("<a href='" + "#" + preUrl + "/" + arrPro[thisindex] + "/" + arrProClass[thisindex]["value"][x] + "' rel='" + arrProClass[thisindex]["value"][x] + "'>" + arrProClass[thisindex]["values"][x] + "<b></b></a>"); 373 374 } 375 376 377 $(".pgtitle").text(arrProClass[thisindex]["title"]); 378 379 var urlsplit = ((window.location.href).split('/')); 380 381 var ejnow = arrProClass[thisindex]["value"].indexOf(urlsplit[urlsplit.length - 1]); 382 383 384 $(".pgtitle1").text(arrProClass[thisindex]["values"][ejnow]); 385 386 document.title = arrProClass[thisindex]["values"][ejnow] + " | " + arrProClass[thisindex]["title"] + " | Application | Amlogic"; 387 388 389 $(".Programclass ul a").each(function() { 390 if($(this).attr("rel")==cururl){ 391 $(this).addClass("cur").siblings().removeClass("cur"); 392 } 393 }); 394 395 Applicationthis(); 396 $(window).bind("scroll",function(){ 397 myScroll(); 398 }) 399 setTimeout(function () { 400 $(".Applicationweb").html(datehtml); 401 Productbanner(); 402 var f = _.throttle(Productbanner,350) 403 $(window).resize(function () { 404 f(); 405 }) 406 }, 1000); 407 setTimeout(function () { 408 $(".Applicationweb").removeClass("Applicationtop"); 409 410 }, 1500); 411 412 413 } 414 415 });
416} 417 418 419function newsContents(url, Zero, Hundred, Timing) { 420$.ajax({ 421 url: url, 422 type: "GET", 423 dataType : "html", 424 beforeSend: function () { 425 $(".Load").show(); 426 Timing = setInterval(function () { 427 if (Zero < Hundred) Zero++; 428 $(".Load").animate({ "width": "" + Zero + "%" }, 600) 429 }, 600); 430 }, 431 complete: function () { 432 var lujing = $(".Commonbanner").attr("data-rel"); 433 $(document).ready(function(){ 434 clearInterval(Timing) 435 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({"width":"0"}); }); 436 $('.web').removeClass('specialefficacy'); 437 $('.web').removeClass('moving'); 438 $(".MobileMenu").removeClass("MobileMenushow") 439 }) 440 }, success: function (datehtml) { 441 delScript("webjs/jquery.zclip.js"); 442 delScript("webjs/newscontjs.js?v=1.0.10"); 443 444 $(".jiathis_style").remove(); 445 $("body").find("link").remove(); 446 $("body").find("iframe").remove(); 447 $(".Share").remove(); 448 449 $(".ApplicationSolutionspopup").hide(); 450 $('.web').removeClass('ptal'); 451 $(".Scrolltop").show(); 452 $(".Share").show(); 453 $('body').removeAttr('style'); 454 455 $(window).bind("scroll",function(){ 456 myScroll(); 457 }) 458 459 460 461 $(".newsDetailed").addClass("newsContentboxleft"); 462 463 setTimeout(function () { 464 465 $(".Share").css({top:$(".newsContent").offset().top}) 466 $(".newsDetailed").addClass("newsContentboxright"); 467 },500) 468 469 setTimeout(function(){ 470 $(".newsDetailed").html(datehtml).removeClass("newsContentboxleft"); 471 loadScript("webjs/jquery.zclip.js"); 472 loadScript("webjs/newscontjs.js?v=1.0.10"); 473 },800) 474 475 setTimeout(function(){ 476 $(".newsDetailed").removeClass("newsContentboxright"); 477 var titlenav = $(".newsclass a.cur").text(); 478 var newsContentstitle = $(".newstitle h3").text(); 479 document.title = newsContentstitle + " | " + titlenav + " | News | Amlogic"; 480 $(".newslisttitle").text(titlenav) 481 $(".Share").css({"position":"absolute","top":$(".newsContent").offset().top,left:($(window).width()-$(".newsContent").outerWidth())/2+60}); 482 483 },1000) 484 485 486 } 487 488}); 489} 490 491function cal_arrList(len) { 492 var a1 = new Array(); // prev 493 var a2 = new Array(); // next 494 var lenHalf = parseInt(parseInt(len) / 2); 495 var lenHalfYS = (len % 2) > 0 ? true : false; 496 var prevNum = -3; 497 for (var i = 0; i < len; i++) { 498 if (i < lenHalf) { 499 if (i == lenHalf - 1) { 500 a1.push(-1); 501 } else if (i == lenHalf - 2) { 502 a1.push(-3); 503 prevNum = -3; //模æè®¡ç® åå®è¿éæ¯Arrå¼å§ 504 } 505 else { 506 // a1.push(prevNum*2-1); 507 a1.unshift(prevNum * 2 - 1); 508 prevNum = prevNum * 2 - 1; //Math.abs(lenHalf-(i+lenHalf+1)) 509 } 510 511 } 512 else if (i == lenHalf) { 513 a2.push(0); 514 } 515 else if (i > lenHalf) { 516 if (i == lenHalf + 1) { 517 a2.push(2); 518 prevNum = 1; 519 } else if (i == lenHalf + 2) { 520 a2.push((prevNum * 2) + 1); 521 prevNum = (prevNum * 2) + 1; //模æè®¡ç® åå®è¿éæ¯Arrå¼å§ 522 } 523 else { 524 a2.push((prevNum * 2) + 1); 525 prevNum = (prevNum * 2) + 1; 526 } 527 528 } 529 } 530 return a1.concat(a2); 531} 532 533function cal_index(index) { 534 var allcount = $(".ProductScroll li").length; 535 var Homechip = $(".HomeChipScroll").length; 536 var HomeProduct = $(".HomeProductScroll").length; 537 var HomeNews = $(".HomeNewsScroll").length; 538 var Homesupport = $(".HomesupportScroll").length; 539 var HomeIcon = $(".indexType dl dt p a"); 540 var HomeSlogan = $(".indexTypetext ul li") 541 curPage = index; 542 if ((index + 1) > allcount) { curPage = allcount; return false; } 543 if (index < 0) { curPage = 0; return false; } 544 var t = Math.round((curPage + 1) / 2); 545 546 //setPage(t-1) 547 if (index >= Homechip) { 548 HomeIcon.eq(1).addClass("cur").siblings().removeClass("cur") 549 HomeSlogan.eq(1).addClass("cur").siblings().removeClass("cur") 550 } else { 551 HomeIcon.eq(0).addClass("cur").siblings().removeClass("cur") 552 HomeSlogan.eq(0).addClass("cur").siblings().removeClass("cur") 553 } 554 if (index >= (HomeProduct + Homechip)) { 555 HomeIcon.eq(2).addClass("cur").siblings().removeClass("cur") 556 HomeSlogan.eq(2).addClass("cur").siblings().removeClass("cur") 557 } 558 if (index >= (HomeProduct + Homechip + HomeNews)) { 559 HomeIcon.eq(3).addClass("cur").siblings().removeClass("cur") 560 HomeSlogan.eq(3).addClass("cur").siblings().removeClass("cur") 561 } 562 563 564 565 //if(baw>668){shuzu = [-127,-63,-31,-14.99,-7,-3,-1,0,2,6,14.01,30.03,62.09,126.24,254.52];} 566 if (baw > 668) { shuzu = cal_arrList(allcount * 2 + 1); } 567 else if (baw < 668) { shuzu = [-192, -96, -48, -24, -12, -6, -1.8, 0, 1.8, 6, 12, 24, 48, 96, 192]; } 568 569 shuzuTemp = new Array(); 570 shuzu_Zero = shuzu.indexOf(0);
571 for (var i = 0; i < allcount; i++) { 572 if (i < index) { // åé¢ç 573 shuzuTemp.push(shuzu[shuzu_Zero - (index - i)]); 574 } 575 else if (i == index) { //å½å0 576 shuzuTemp.push(0); 577 } 578 else { //åé¢ç 579 shuzuTemp.push(shuzu[shuzu_Zero + (i - index)]); 580 } 581 } 582 583 var Half = 1; 584 var DHeight = ProductWidth / 2.057; 585 var xiangjia = 0; 586 $(".ProductScroll li").each(function (i) { 587 shuzu_Zero = shuzuTemp.indexOf(0); 588 589 if (i < index) { // åé¢ç 590 Half = Math.pow(2, (i - index)); 591 } 592 else if (i == index) { //å½å0 593 Half = Math.abs(1); 594 } 595 else { //åé¢ç 596 Half = Math.pow(2, (index - i)); 597 } 598 599 600 if (parseInt(shuzuTemp[i]) > 2) { 601 xiangjia = DHeight * 2 * shuzuTemp[i]; 602 } 603 else { 604 xiangjia = DHeight * shuzuTemp[i]; 605 } 606 607 if (baw > 668) { 608 $(this).css({ "-webkit-transform": "scale(" + Half + ") translateY(" + xiangjia + "px)", "transform": "scale(" + Half + ") translateY(" + xiangjia + "px)", "opacity": Half, "rel": Half }); 609 } 610 else if (baw < 668) { 611 $(this).css({ "-webkit-transform": "scale(" + Half + ") translateX(" + xiangjia + "px)", "transform": "scale(" + Half + ") translateX(" + xiangjia + "px)", "opacity": Half, "z-index": Half == 1 ? 2 : 1 }); 612 } 613 614 615 Half = Half / 2; 616 }); 617 var curPageTemp; 618 var thisHoverOpacity; 619 $(".ProductScroll li").hover(function () { 620 curPageTemp = $(this).index(); 621 thisHoverOpacity = $(this).css("opacity"); 622 $(this).css("opacity", 1) 623 }, function () { 624 if (curPageTemp != curPage) { 625 $(this).css("opacity", thisHoverOpacity) 626 } 627 628 }) 629 630} 631 632 633var t = $(this).index(); 634 635$(document).on("click", ".indexType a", function () { 636 t = $(this).attr("class").split(" ")[0]; 637 t = $(".ProductScroll ." + t).eq(0).index(); 638 t1 = $(this).index(); 639 cal_index(t); 640 setPage(t1); 641}); 642 643 644function setPage(t) { 645 setTimeout(function () { 646 $(".indexType a").removeClass("cur").eq(t).addClass("cur") 647 $(".indexTypetext li").removeClass("cur").eq(t).addClass("cur") 648 }, 1); 649} 650 651function onResize() { 652 baw = $(window).width(); 653 baheight = $(window).height(); 654 ProductWidth = $(".ProductScroll").width(); 655 ProductHeight = $(".ProductScroll").height(); 656 657 setTimeout(function () { 658 var image_mem = new Image(); 659 bannerimg = $(".homeimg img") 660 image_mem.onload = function () { 661 srcW = image_mem.width; 662 srcH = image_mem.height; 663 if (baw / baheight > srcW / srcH) {//é«è¶ åº 664 bannerimg.css({ width: baw, height: srcH / srcW * baw }) 665 } else {//å®½è¶ åº 666 bannerimg.css({ width: srcW / srcH * baheight, height: baheight }) 667 } 668 } 669 image_mem.src = bannerimg.attr("src"); 670 }, 110); 671 672 var Fuzzyattr = $(".Fuzzy").attr("rel"); 673 var Blackattr = $(".Black").attr("rel"); 674 var Originalattr = $(".Original").attr("rel"); 675 676 var Fuzzydata = $(".Fuzzy").attr("data-rel"); 677 var Blackdata = $(".Black").attr("data-rel"); 678 var Originaldata = $(".Original").attr("data-rel"); 679 680 681 if(hengping) 682 { 683 if(baw>668){ 684 $(".ProductScroll li").css({width:ProductWidth-62,height:ProductWidth/2.057}); 685 $(".ProductScroll ul").css({"-webkit-transform":"translate3d(0px, "+ProductHeight/3.4+"px, 0px)","transform":"translate3d(0px, "+ProductHeight/3.4+"px, 0px)","height":"100%"}) 686 setTimeout(function(){ 687 $(".Original").attr("src",Originaldata); 688 $(".Black").attr("src",Blackdata); 689 $(".Fuzzy").attr("src",Fuzzydata); 690 }) 691 } 692 else if(baw<668){ 693 baw=$(window).width(); 694 baheight = $(window).height(); 695 ProductWidth = $(".ProductScroll").width(); 696 ProductHeight = $(".ProductScroll").height(); 697 698 $(".ProductScroll li").css({width:baw*0.6,height:ProductWidth/5.2}); 699 $(".ProductScroll ul").css({"-webkit-transform":"translate3d("+(baw*0.2)+"px, 0px, 0px)","transform":"translate3d("+(baw*0.2)+"px, 0px, 0px)","height":ProductWidth/5.2}) 700 setTimeout(function(){ 701 $(".Original").attr("src",Originaldata); 702 $(".Black").attr("src",Blackdata); 703 $(".Fuzzy").attr("src",Fuzzydata); 704 }) 705 } 706 } 707 else 708 { 709 if (baw > 668) { 710 711 $(".ProductScroll li").css({ width: ProductWidth - 62, height: ProductWidth / 2.057 }); 712 $(".ProductScroll ul").css({ "-webkit-transform": "translate3d(0px, " + ProductHeight / 3.4 + "px, 0px)", "transform": "translate3d(0px, " + ProductHeight / 3.4 + "px, 0px)", "height": "100%" }) 713 $(".logo").eq(0).show(); 714 715 setTimeout(function(){ 716 $(".Original").attr("src",Originaldata); 717 $(".Black").attr("src",Blackdata); 718 $(".Fuzzy").attr("src",Fuzzydata); 719 }) 720 } 721 else if (baw < 668) { 722 723 $(".ProductScroll li").css({ width: baw * 0.8, height: ProductWidth / 2.5 }); 724 $(".ProductScroll ul").css({ "-webkit-transform": "translate3d(" + (baw * 0.1) + "px, 0px, 0px)", "transform": "translate3d(" + (baw * 0.1) + "px, 0px, 0px)", "height": ProductWidth / 2.5 }) 725 $(".logo").eq(0).hide(); 726 727 setTimeout(function(){ 728 $(".Original").attr("src",Originalattr); 729 $(".Black").attr("src",Blackattr); 730 $(".Fuzzy").attr("src",Fuzzyattr); 731 }) 732 } 733 734 } 735 736 cal_index(curPage); 737 738 $(".web").removeClass("MenuShow"); 739 $(".web").removeClass("MenuShowheight"); 740 $(".web").removeClass("MenuShowThree"); 741 742} 743 744function BannerHeight() { 745 $(".Commonbanner").css({ height: $(window).height()}) 746 if(window.innerWidth>668) 747 { 748 $(".commonclass ul").show().removeClass("cutoverclass"); 749 } 750 else 751 { 752 $(".commonclass ul").hide().addClass("cutoverclass"); 753 } 754 755 if(hengping) 756 { 757 $(".Commonbanner").css({ height: $(window).height()}) 758 if(window.innerWidth>668) 759 { 760 var cmdata = $(".Commonbanner").attr("data-rel"); 761 $(".Commonbanner").css({"background-image":"url("+cmdata+")"}); 762 $(".logo").eq(0).show(); 763 } 764 else if(window.innerWidth<668) 765 { 766 var cmattr = $(".Commonbanner").attr("data-rel"); 767 $(".Commonbanner").css({"background-image":"url("+cmattr+")"}); 768 $(".logo").eq(0).hide(); 769 } 770 771 } 772 else 773 { 774 $(".Commonbanner").css({ height: $(window).height()}) 775 if(window.innerWidth>668) 776 { 777 var cmdata = $(".Commonbanner").attr("data-rel"); 778 $(".Commonbanner").css({"background-image":"url("+cmdata+")"}); 779 $(".logo").eq(0).show(); 780 } 781 else if(window.innerWidth<668) 782 { 783 var cmattr = $(".Commonbanner").attr("rel"); 784 $(".Commonbanner").css({"background-image":"url("+cmattr+")"}); 785 $(".logo").eq(0).hide(); 786 } 787 788 } 789 790 791} 792 793 794touchstart = "touchstart"; 795touchmove = "touchmove"; 796touchend = "touchend"; 797 798var tStartX, tStartY, tMoveX, tMoveY, tEndX, tEndY; 799var cbox = $(".box"); 800var pdbox = $(".ProductScroll"); 801function Tstart(event) { 802 event.preventDefault() 803 tMoveX = 0; 804 tMoveY = 0; 805 tStartX = event.originalEvent.touches[0].pageX; 806 tStartY = event.originalEvent.touches[0].pageY; 807} 808function Tmove(event) { 809 tMoveX = event.originalEvent.touches[0].pageX; 810 tMoveY = event.originalEvent.touches[0].pageY; 811} 812 813function pdtouchend(event) { 814 if (tMoveX <= 0) { 815 816 $(".web").addClass("specialefficacy"); 817 $(".web").removeClass("MenuShow"); 818 $("nav ul li").removeClass("cur"); 819 820 var Pdurl = event.srcElement.hash; 821 $("#pdurl").attr("href", Pdurl); 822 document.getElementById("pdurl").click(); 823 } 824 else { 825 var FirstP = parseFloat((tStartX - tMoveX) / $(window).width()).toFixed(2) * 100, 826 dier = parseFloat((tMoveX - tStartX) / $(window).width()).toFixed(2) * 100; 827 if (FirstP > 20) { 828 cal_index(curPage + 1); 829 } 830 if (dier > 20) { 831 cal_index(curPage - 1); 832 } 833 834 } 835} 836 837function boxtouchend(event) { 838 if (tMoveX <= 0) { 839 if (event.target.rel == "HomeChip") { 840 var thisclass = event.target.className; 841 thisclass = thisclass.split(' ')[0]; 842 843 if (thisclass.indexOf("cur") <= -1) { 844 cal_index($(".ProductScroll ." + thisclass).eq(0).index()); 845 } 846 } 847 if(event.target.parentNode.className.indexOf("HomeDown")>-1){ 848 $(".web").addClass("moving"); 849 } 850 if(event.target.className.indexOf("Homeup")>-1){ 851 $(".web").removeClass("moving"); 852 } 853 } 854 else { 855 856 var FirstP = parseFloat((tStartY - tMoveY) / $(window).height()).toFixed(2) * 100, 857 dier = parseFloat((tMoveY - tStartY) / $(window).height()).toFixed(2) * 100; 858 859 if (FirstP > 20) { 860 $(".web").addClass("moving"); 861 } 862 if (dier > 20) { 863 $(".web").removeClass("moving"); 864 } 865 } 866} 867 868 869function SetHistory() { 870 urlHistory.push(window.location.href); 871} 872function SetScrollTop(top, isanimate) { 873 if (isanimate) { 874 $('html,body').animate({ scrollTop: top + 'px' }, 200); 875 } 876 else { 877 $('html,body').scrollTop(top); 878 } 879} 880var AppRouter = Backbone.Router.extend({ 881 routes: { 882 "": "index", 883 "News": "newsbox", 884 "News/:query/:file": "newslist", 885 "News/index:query.html": "newscont", 886 "Products": "Productbox", 887 "Products/:query/:file": "Productcont", 888 "Company": "aboutbox", 889 "Company/:query/:file": "aboutcont", 890 "Company/:query/:Area/:file":"jobslist", 891 "Support": "Technologybox", 892 "Support/:query/:file":"Partners", 893 "Application": "Programbox", 894 "Application/:query/:file": "Programcont", 895 "Investor": "Investor",
896 "Investor/:query/:file": "InvestorCon", 897 }, 898 899 index: function () { 900 SetHistory(); 901 $(window).off('resize'); 902 $(window).off('scroll'); 903 $("nav ul p").eq(0).hide(); 904 $("nav ul p").eq(2).show(); 905 var min = 0; 906 var max = 100; 907 var Zero = min; 908 var Hundred = max; 909 var Timing; 910 var indexurl = "index/index.html"; 911 912 $.ajax({ 913 url: indexurl, 914 type: "GET", 915 dataType : "html", 916 beforeSend: function () { 917 $(".Load").show(); 918 Timing = setInterval(function () { 919 if (Zero < Hundred) Zero++; 920 $(".Load").animate({ "width": "" + Zero + "%" }, 600); 921 }, 600); 922 },complete: function () { 923 var lujing = $(".Original").attr("data-rel"); 924 $(document).ready(function() { 925 $("<img/>").attr("src",lujing).load(function(){ 926 clearInterval(Timing) 927 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({"width":"0"}); }); 928 $('.web').removeClass('specialefficacy'); 929 $(".MobileMenu").removeClass("MobileMenushow") 930 }) 931 }); 932 },success: function (datehtml) { 933 $("#webbox").html(datehtml); 934 935 $('body').removeAttr('style'); 936 $(".Share").remove(); 937 delScript("webjs/jquery.zclip.js"); 938 delScript("webjs/newscontjs.js?v=1.0.10"); 939 onResize(); 940 941 var f = _.throttle(onResize, 350) 942 $(window).resize(function () { 943 f(); 944 }) 945 cbox = $(".box"); 946 pdbox = $(".ProductScroll"); 947 948 pdbox.bind("touchstart", Tstart); 949 pdbox.bind("touchmove", Tmove); 950 pdbox.bind("touchend", pdtouchend); 951 952 cbox.bind("touchstart", Tstart); 953 cbox.bind("touchmove", Tmove); 954 cbox.bind("touchend", boxtouchend); 955 } 956 957 }); 958 }, 959 //æ°é»ç»¼å页 960 newsbox: function () { 961 var issettop = false; 962 if (urlHistory.length > 0 && (urlHistory[urlHistory.length - 1]).indexOf("/#News/index") > -1) { //æ¯ä»è¯¦ç»é¡µè·³è½¬è¿æ¥ç 963 SetScrollTop(0, false); 964 issettop = true; 965 } 966 if ((window.location.href).indexOf("?amlogic") > -1) { 967 issettop = true; 968 } 969 //this is a test 970 //console.log(urlHistory.length, (urlHistory[urlHistory.length - 1]), (urlHistory[urlHistory.length - 1]).indexOf("/#News/index") > -1); 971 //test end 972 SetHistory(); 973 $(window).off('resize'); 974 $(window).off('scroll'); 975 document.title = "News | Amlogic"; 976 $("nav ul p").eq(0).show(); 977 $("nav ul p").eq(2).hide(); 978 var min = 0; 979 var max = 100; 980 var Zero = min; 981 var Hundred = max; 982 var Stencilurl = "news/Stencil.html"; 983 var url = "news/index.html"; 984 /*å¼ æ¾ 2015å¹´8æ31æ¥21:22:02 è·åä¿¡æ¯æ»é¡µæ°*/ 985 $.ajax({
986 url: "/ashx/function.ashx?action=getPage&id=", 987 type: "get", 988 success: function (num) { 989 countNum = num; 990 }, 991 }); 992 /*å¼ æ¾ 2015å¹´8æ31æ¥21:22:02 è·åä¿¡æ¯æ»é¡µæ°*/ 993 994 $.ajax({ 995 url: Stencilurl, 996 type: "GET", 997 success: function (datehtml) { 998 $("#webbox").html(datehtml) 999 $.ajax({ 1000 url: url, 1001 type: "GET", 1002 dataType : "html", 1003 beforeSend: function () { 1004 $(".Load").show(); 1005 Timing = setInterval(function () { 1006 if (Zero < Hundred) Zero++; 1007 $(".Load").animate({ "width": "" + Zero + "%" }, 600); 1008 }, 600); 1009 }, 1010 complete: function () { 1011 var lujing = $(".Commonbanner").attr("data-rel"); 1012 $("<img/>").attr("src",lujing).load(function(){ 1013 clearInterval(Timing) 1014 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({"width":"0"}); }); 1015 $('.web').removeClass('specialefficacy'); 1016 $('.web').removeClass('moving'); 1017 $(".MobileMenu").removeClass("MobileMenushow") 1018 //alert("æ°é»ç»¼å页") 1019 1020 //if (newscrollTop > $(document).height()) { 1021 // setTimeout(function () { 1022 // newscrollTop = $(".commonclass").offset().top; 1023 // $(window).scrollTop(newscrollTop); 1024 // }, 800); 1025 //} else { 1026 // setTimeout(function () { 1027 // $(window).scrollTop(newscrollTop); 1028 // }, 800); 1029
1030 /////////////////////////////////////////////////////////////////// 1031 //////æµè¯æ³¨é 1032 if (issettop) { 1033 setTimeout(function () { 1034 newscrollTop = $(window).height(); //$(".commonclass").offset().top; 1035 SetScrollTop(newscrollTop, true); 1036 }, 800); 1037 } 1038 ////if (location.href.indexOf("?amlogic") < 0) { 1039 //// setTimeout(function () { 1040 //// newscrollTop = $(".commonclass").offset().top; 1041 //// $(window).scrollTop(newscrollTop); 1042 //// }, 800); 1043 ////// $(document).on("click", ".newslistbox .newsComplexlist", function (e) { 1044 ////// newscrollTop = $(this).offset().top; 1045 ////// //console.log(newscrollTop) 1046 ////// }); 1047 ////} 1048 1049 1050 }) 1051 }, 1052 success: function (datelisthtml) { 1053 $(".newslistbox").html(datelisthtml); 1054 $(".newsweb").removeClass("newswebright"); 1055 delScript("webjs/jquery.zclip.js"); 1056 delScript("webjs/newscontjs.js?v=1.0.10"); 1057 $(".ApplicationSolutionspopup").hide(); 1058 $(".Share").remove(); 1059 $('body').removeAttr('style'); 1060 $(".web").removeClass('ptal'); 1061 $("html,body").stop(true).animate({ scrollTop: 0 }, 0) 1062 BannerHeight();
1063 var f = _.throttle(BannerHeight, 350) 1064 $(window).resize(function () { 1065 f(); 1066 }); 1067 $(window).bind("scroll",function(){ 1068 myScroll(); 1069 }) 1070 1071 } 1072 }); 1073 } 1074 }); 1075 1076 }, 1077 //æ°é»åç±» 1078 newslist: function (query, file) { 1079 var issettop = false; 1080 if (urlHistory.length > 0 && (urlHistory[urlHistory.length - 1]).indexOf("/#News/index") > -1) { //æ¯ä»è¯¦ç»é¡µè·³è½¬è¿æ¥ç 1081 SetScrollTop(0, false); 1082 issettop = true; 1083 } 1084 //console.log(urlHistory.length, (urlHistory[urlHistory.length - 1]), (urlHistory[urlHistory.length - 1]).indexOf("/#News/index") > -1); 1085 if ((window.location.href).indexOf("?amlogic") > -1) { 1086 issettop = true; 1087 } 1088 SetHistory(); 1089 $(window).off('resize'); 1090 $(window).off('scroll'); 1091 var CookieStencil = "news/Stencil.html"; 1092 $("nav ul p").eq(0).show(); 1093 $("nav ul p").eq(2).hide(); 1094 $(".Share").remove(); 1095 var min = 0; 1096 var max = 100; 1097 var Zero = min; 1098 var Hundred = max; 1099 var url = "news" + "/" + query + "/" + file; 1100 var Timing; 1101 /*å¼ æ¾ 2015å¹´8æ31æ¥21:22:02 è·åä¿¡æ¯æ»é¡µæ°*/ 1102 $.ajax({
1103 url: "/ashx/function.ashx?action=getPage&id=" + query, 1104 type: "get", 1105 success: function (num) { 1106 countNum = num; 1107 1108 }, 1109 }); 1110 /*å¼ æ¾ 2015å¹´8æ31æ¥21:22:02 è·åä¿¡æ¯æ»é¡µæ°*/ 1111 1112 if ($(".newsweb").length <= 0) { 1113 $.ajax({ 1114 url: CookieStencil, 1115 type: "GET", 1116 success: function (Stencilhtml) { 1117 $("#webbox").html(Stencilhtml) 1118 $.ajax({ 1119 url: url, 1120 type: "GET", 1121 beforeSend: function () { 1122 $(".Load").show(); 1123 Timing = setInterval(function () { 1124 if (Zero < Hundred) Zero++; 1125 $(".Load").animate({ "width": "" + Zero + "%" }, 600); 1126 }, 600); 1127 }, 1128 complete: function () { 1129 var lujing = $(".Commonbanner").attr("data-rel"); 1130 $("<img/>").attr("src", lujing).load(function () { 1131 clearInterval(Timing) 1132 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({ "width": "0" }); }); 1133 $('.web').removeClass('specialefficacy'); 1134 $('.web').removeClass('moving'); 1135 $(".MobileMenu").removeClass("MobileMenushow") 1136 //alert("æ°é»å表") 1137 if (countNum == 1) { $(".newsmoer").hide(); } 1138 }); 1139 ///console.log(newscrollTop == 0 || newscrollTop < $(document).height(), newscrollTop, $(document).height()) 1140 //if (newscrollTop > $(document).height()) { 1141 // setTimeout(function () { 1142 // newscrollTop = $(".commonclass").offset().top; 1143 // $(window).scrollTop(newscrollTop); 1144 // }, 800); 1145 //} else { 1146 // setTimeout(function () { 1147 // $(window).scrollTop(newscrollTop); 1148 // }, 800); 1149 //} 1150
1151 ////////////////////////////////////////////////////------------------------------ 1152 if (issettop) { 1153 setTimeout(function () { 1154 newscrollTop = $(window).height();//$(".commonclass").offset().top; 1155 SetScrollTop(newscrollTop, true); 1156 }, 800); 1157 } 1158 //$(document).on("click", ".newslistbox .newsComplexlist", function (e) { 1159 // newscrollTop = $(this).offset().top; 1160 // //console.log(newscrollTop) 1161 //}); 1162 1163 }, success: function (datehtml) { 1164 $("html").removeClass("scrollhide"); 1165 $(".newsweb").removeClass("newswebright"); 1166 $('.web').removeClass('ptal'); 1167 delScript("webjs/jquery.zclip.js"); 1168 delScript("webjs/newscontjs.js?v=1.0.10"); 1169 $(".ApplicationSolutionspopup").hide(); 1170 BannerHeight();
1171 var f = _.throttle(BannerHeight, 350) 1172 $(window).resize(function () { 1173 f(); 1174 }) 1175 $(window).bind("scroll", function () { 1176 myScroll(); 1177 }) 1178 $('body').removeAttr('style'); 1179 var cururl = ((window.location.href).split('#')[1]).split('/')[1] 1180 $(".newsclass ul a").each(function () { 1181 if ($(this).attr("rel") == cururl) { 1182 $(this).addClass("cur").siblings().removeClass("cur"); 1183 $(".newslisttitle").text($(this).text()); 1184 document.title = $(this).text() + " | News | Amlogic" 1185 } 1186 }); 1187 setTimeout(function () { 1188 $(".newsweb").addClass("newswebright").removeClass("newswebleft"); 1189 }, 450); 1190 setTimeout(function () { 1191 $(".newslistbox").html(datehtml); 1192 }, 650); 1193 setTimeout(function () { 1194 $(".newsweb").removeClass("newswebright"); 1195 }, 850); 1196 } 1197 1198 }); 1199 } 1200 }); 1201 } else { 1202 $.ajax({
1203 url: url, 1204 type: "GET", 1205 beforeSend: function () { 1206 $(".Load").show(); 1207 Timing = setInterval(function () { 1208 if (Zero < Hundred) Zero++; 1209 $(".Load").animate({ "width": "" + Zero + "%" }, 600); 1210 }, 600); 1211 }, 1212 complete: function () { 1213 var lujing = $(".Commonbanner").attr("data-rel"); 1214 $(document).ready(function () { 1215 $("<img/>").attr("src", lujing).load(function () { 1216 clearInterval(Timing) 1217 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({ "width": "0" }); }); 1218 $('.web').removeClass('specialefficacy'); 1219 $('.web').removeClass('moving'); 1220 $(".MobileMenu").removeClass("MobileMenushow") 1221 }) 1222 }) 1223 if (countNum == 1) { $(".newsmoer").hide(); } 1224 if (issettop) { 1225 setTimeout(function () { 1226 newscrollTop = $(window).height();//$(".commonclass").offset().top; 1227 SetScrollTop(newscrollTop, true); 1228 }, 800); 1229 } 1230 1231 }, success: function (datehtml) { 1232 $("html").removeClass("scrollhide"); 1233 $('.web').removeClass('ptal'); 1234 delScript("webjs/jquery.zclip.js"); 1235 delScript("webjs/newscontjs.js?v=1.0.10"); 1236 $(".ApplicationSolutionspopup").hide(); 1237 BannerHeight();
1238 var f = _.throttle(BannerHeight, 350) 1239 $(window).resize(function () { 1240 f(); 1241 }) 1242 $(window).bind("scroll", function () { 1243 myScroll(); 1244 }) 1245 1246 $('body').removeAttr('style'); 1247 var cururl = ((window.location.href).split('#')[1]).split('/')[1] 1248 $(".newsclass ul a").each(function () { 1249 if ($(this).attr("rel") == cururl) { 1250 $(this).addClass("cur").siblings().removeClass("cur"); 1251 $(".newslisttitle").text($(this).text()); 1252 document.title = $(this).text() + " | News | Amlogic"; 1253 } 1254 }); 1255 if (typeof loadData == "function") { 1256 $("#nowpage").val("1"); 1257 1258 if (countNum > 1) { $(".newsmoer").show(); } 1259 $(window).on("scroll", function () { 1260 loadData(); 1261 }); 1262 } 1263 1264 setTimeout(function () { 1265 $(".newsweb").addClass("newswebright").removeClass("newswebleft"); 1266 }, 450); 1267 setTimeout(function () { 1268 $(".newslistbox").html(datehtml); 1269 }, 650); 1270 setTimeout(function () { 1271 $(".newsweb").removeClass("newswebright"); 1272 }, 850); 1273 } 1274 1275 }); 1276 } 1277 }, 1278 //æ°é»è¯¦ç»é¡µ 1279 newscont: function (query) { 1280 SetHistory(); 1281 var issettop = false; 1282 if ((window.location.href).indexOf("?amlogic") > -1) { 1283 issettop = true; 1284 } 1285 $(window).off('resize'); 1286 $(window).off('scroll'); 1287 var CookieStencil = "news/StencilDetailed.html"; 1288 $("nav ul p").eq(0).show(); 1289 $("nav ul p").eq(2).hide(); 1290 var min = 0; 1291 var max = 100; 1292 var Zero = min; 1293 var Hundred = max; 1294 var url = "news/index" + query + ".html"; 1295 var Timing; 1296 if($(".newsStencilDetailedbanner").length<=0){ 1297 $.ajax({ 1298 url: CookieStencil, 1299 type: "GET", 1300 success: function (Stencilhtml) { 1301 $("html").removeClass("scrollhide"); 1302 $("#webbox").html(Stencilhtml) 1303 $("html,body").stop(true).animate({ scrollTop: 0 }, 0) 1304 BannerHeight();
1305 var f = _.throttle(BannerHeight, 350) 1306 $(window).resize(function () { 1307 f(); 1308 }) 1309 newsContents(url, Zero, Hundred, Timing); 1310 } 1311 }); 1312 } 1313 else 1314 { 1315 newsContents(url, Zero, Hundred, Timing); 1316 } 1317 1318 }, 1319 //产åå表页 1320 Productbox: function () { 1321 SetHistory(); 1322 var issettop = false; 1323 if ((window.location.href).indexOf("?amlogic") > -1) { 1324 issettop = true; 1325 } 1326 $(window).off('resize'); 1327 $(window).off('scroll'); 1328 $(window).off('mousewheel'); 1329 document.title = "Products | Amlogic"; 1330 $("nav ul p").eq(0).show(); 1331 $("nav ul p").eq(2).hide(); 1332 var min = 0; 1333 var max = 100; 1334 var Zero = min; 1335 var Hundred = max; 1336 var url = "Product/index.html"; 1337 /*å¼ æ¾ 2015å¹´8æ31æ¥21:22:02 è·åä¿¡æ¯æ»é¡µæ°*/ 1338 $.ajax({ 1339 url: "/ashx/function.ashx?action=getProductMore", 1340 type: "get", 1341 success: function (num) { 1342 countNum = num; 1343 //alert(countNum); 1344 }, 1345 }); 1346 /*å¼ æ¾ 2015å¹´8æ31æ¥21:22:02 è·åä¿¡æ¯æ»é¡µæ°*/ 1347 $.ajax({
1348 url: url, 1349 type: "GET", 1350 beforeSend: function () { 1351 $(".Load").show(); 1352 Timing = setInterval(function () { 1353 if (Zero < Hundred) Zero++; 1354 $(".Load").animate({ "width": "" + Zero + "%" }, 600); 1355 }, 600); 1356 }, 1357 complete: function () { 1358 var lujing = $(".Commonbanner").attr("data-rel"); 1359 $("<img/>").attr("src",lujing).load(function(){ 1360 clearInterval(Timing) 1361 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({"width":"0"}); }); 1362 $('.web').removeClass('specialefficacy'); 1363 $('.web').removeClass('moving'); 1364 $(".MobileMenu").removeClass("MobileMenushow") 1365 }) 1366 }, 1367 success: function (datehtml) { 1368 $("html").removeClass("scrollhide"); 1369 $("#webbox").html(datehtml) 1370 $("html,body").stop(true).animate({ scrollTop: 0 }, 0) 1371 delScript("webjs/jquery.zclip.js"); 1372 delScript("webjs/newscontjs.js?v=1.0.10"); 1373 $(".ApplicationSolutionspopup").hide(); 1374 $(".Share").remove(); 1375 $('.web').removeClass('ptal'); 1376 $(window).bind("scroll",function(){ 1377 myScroll(); 1378 }) 1379 BannerHeight();
1380 var f = _.throttle(BannerHeight, 350) 1381 $(window).resize(function () { 1382 f(); 1383 }) 1384 1385 } 1386 }); 1387 }, 1388 //产åè¯¦ç» 1389 Productcont: function (query, file) { 1390 SetHistory(); 1391 var issettop = false; 1392 if ((window.location.href).indexOf("?amlogic") > -1) { 1393 issettop = true; 1394 } 1395 $(window).off('resize'); 1396 $(window).off('scroll'); 1397 var CookieStencil = getCookie("Productcont"); 1398 $("nav ul p").eq(0).show(); 1399 $("nav ul p").eq(2).hide(); 1400 var min = 0; 1401 var max = 100; 1402 var Zero = min; 1403 var Hundred = max; 1404 var url = "Product" + "/" + query + "/" + file; 1405 var Timing; 1406 if ($(".Productheader").length <= 0) { 1407 $.ajax({ 1408 url: CookieStencil, 1409 type: "GET", 1410 success: function (Stencilhtml) { 1411 $("html").removeClass("scrollhide"); 1412 $('body').removeAttr('style'); 1413 $("#webbox").html(Stencilhtml) 1414 ProductContents(url, Zero, Hundred, Timing); 1415 } 1416 }); 1417 } 1418 else { 1419 1420 ProductContents(url, Zero, Hundred, Timing); 1421 } 1422 1423 }, 1424 //å ³äºæ¶æ¨ 1425 aboutbox: function () { 1426 SetHistory(); 1427 var issettop = false; 1428 if ((window.location.href).indexOf("?amlogic") > -1) { 1429 issettop = true; 1430 } 1431 document.title = "Company | Amlogic"; 1432 $(window).off('resize'); 1433 $(window).off('scroll'); 1434 $("nav ul p").eq(0).show(); 1435 $("nav ul p").eq(2).hide(); 1436 var min = 0; 1437 var max = 100; 1438 var Zero = min; 1439 var Hundred = max; 1440 var url = "about/index.html"; 1441 $.ajax({
1442 url: url, 1443 type: "GET", 1444 beforeSend: function () { 1445 $(".Load").show(); 1446 Timing = setInterval(function () { 1447 if (Zero < Hundred) Zero++; 1448 $(".Load").animate({ "width": "" + Zero + "%" }, 600); 1449 }, 600); 1450 }, 1451 complete: function () { 1452 /* clearInterval(Timing) 1453 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({"width":"0"}); }); 1454 setTimeout(function () { 1455 $('.web').removeClass('specialefficacy'); 1456 $('.web').removeClass('moving'); 1457 $(".MobileMenu").removeClass("MobileMenushow") 1458 }, 1000);*/ 1459 var lujing = $(".Commonbanner").attr("data-rel"); 1460 $("<img/>").attr("src",lujing).load(function(){ 1461 clearInterval(Timing) 1462 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({"width":"0"}); }); 1463 $('.web').removeClass('specialefficacy'); 1464 $('.web').removeClass('moving'); 1465 $(".MobileMenu").removeClass("MobileMenushow") 1466 }) 1467 }, 1468 success: function (datehtml) { 1469 $("html").removeClass("scrollhide"); 1470 $("#webbox").html(datehtml) 1471 $("html,body").stop(true).animate({ scrollTop: 0 }, 0) 1472 delScript("webjs/jquery.zclip.js"); 1473 delScript("webjs/newscontjs.js?v=1.0.10"); 1474 $(".ApplicationSolutionspopup").hide(); 1475 $(".Share").remove(); 1476 $('body').removeAttr('style'); 1477 $('.web').removeClass('ptal'); 1478 1479 BannerHeight();
1480 var f = _.throttle(BannerHeight, 350) 1481 $(window).resize(function () { 1482 f(); 1483 }); 1484 $(window).bind("scroll",function(){ 1485 myScroll(); 1486 }) 1487 } 1488 }); 1489 }, 1490 //å ³äºæ¶æ¨-å 页 1491 aboutcont: function (query, file) { 1492 SetHistory(); 1493 var issettop = false; 1494 if ((window.location.href).indexOf("?amlogic") > -1) { 1495 issettop = true; 1496 } 1497 $(window).off('resize'); 1498 $(window).off('scroll'); 1499 $("nav ul p").eq(0).show(); 1500 $("nav ul p").eq(2).hide(); 1501 var min = 0; 1502 var max = 100; 1503 var Zero = min; 1504 var Hundred = max; 1505 switch (query) { 1506 case "About": 1507 query = "Introduction"; 1508 break; 1509 case "Careers": 1510 query = "Jobs"; 1511 break; 1512 default: 1513 break; 1514 } 1515 1516 var url = "about" + "/" + query + "/" + file; 1517 var Timing; 1518 if(query=="jobs"){ 1519 $('.web').removeClass('MenuShow'); 1520 $("nav ul li").removeClass("cur") 1521 } 1522 $.ajax({ 1523 url: url, 1524 type: "GET", 1525 beforeSend: function () { 1526 $(".Load").show(); 1527 Timing = setInterval(function () { 1528 if (Zero < Hundred) Zero++; 1529 $(".Load").animate({ "width": "" + Zero + "%" }, 600); 1530 }, 600); 1531 }, 1532 complete: function () { 1533 /*clearInterval(Timing) 1534 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({"width":"0"}); }); 1535 setTimeout(function () { 1536 $('.web').removeClass('specialefficacy'); 1537 $('.web').removeClass('moving'); 1538 $(".MobileMenu").removeClass("MobileMenushow") 1539 }, 1000);*/ 1540 var lujing = $(".Commonbanner").attr("data-rel"); 1541 $("<img/>").attr("src",lujing).load(function(){ 1542 clearInterval(Timing) 1543 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({"width":"0"}); }); 1544 $('.web').removeClass('specialefficacy'); 1545 $('.web').removeClass('moving'); 1546 $(".MobileMenu").removeClass("MobileMenushow") 1547 }) 1548 }, success: function (datehtml) { 1549 if(query=="jobs"){}else{$("html,body").stop(true).animate({ scrollTop: 0 }, 0)} 1550 $("#webbox").html(datehtml) 1551 $("html").removeClass("scrollhide"); 1552 delScript("webjs/jquery.zclip.js"); 1553 delScript("webjs/newscontjs.js?v=1.0.10"); 1554 $(".ApplicationSolutionspopup").hide(); 1555 $(".Share").remove(); 1556 $('body').removeAttr('style'); 1557 $('.web').removeClass('ptal'); 1558 $(window).bind("scroll",function(){ 1559 myScroll(); 1560 }) 1561 document.title=$(".title span").text()+" | "+$(".title em a").text()+" | Amlogic"; 1562 } 1563 }); 1564 1565 }, 1566 //å ³äºæ¶æ¨-æèå 页 1567 jobslist: function (query, Area, file) { 1568 SetHistory(); 1569 var issettop = false; 1570 if ((window.location.href).indexOf("?amlogic") > -1) { 1571 issettop = true; 1572 } 1573 $(window).off('resize'); 1574 var CookieStencil = getCookie("jobslist"); 1575 $("nav ul p").eq(0).show(); 1576 $("nav ul p").eq(2).hide(); 1577 if(window.innerWidth>669)$(".logo").show(); 1578 var min = 0; 1579 var max = 100; 1580 var Zero = min; 1581 var Hundred = max; 1582 if (query == "Careers") { 1583 query = "Jobs"; 1584 } 1585 var url="about"+"/"+query+"/"+Area+"/"+file; 1586 var Timing; 1587 1588 if($(".Recruitmentpic").length<=0){ 1589 $.ajax({ 1590 url:CookieStencil, 1591 type:"GET", 1592 beforeSend: function(){ 1593 $(".Load").show(); 1594 Timing = setInterval(function(){ 1595 if(Zero<Hundred) Zero++; 1596 $(".Load").animate({"width":""+Zero+"%"},600); 1597 },600); 1598 }, 1599 complete: function(){ 1600 /*clearInterval(Timing) 1601 $(".Load").animate({"width":"100%",},500,function(){$(".Load").hide().css({"width":"0"});}); 1602 setTimeout(function(){ 1603 $('.web').removeClass('specialefficacy'); 1604 $('.web').removeClass('moving'); 1605 $(".MobileMenu").removeClass("MobileMenushow") 1606 },1000);*/ 1607 var lujing = $(".Commonbanner").attr("data-rel"); 1608 $("<img/>").attr("src",lujing).load(function(){ 1609 clearInterval(Timing) 1610 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({"width":"0"}); }); 1611 $('.web').removeClass('specialefficacy'); 1612 $('.web').removeClass('moving'); 1613 $(".MobileMenu").removeClass("MobileMenushow") 1614 }) 1615 },success: function(datehtml){ 1616 $("#webbox").html(datehtml) 1617 var cururl = ((window.location.href).split('#')[1]).split('/')[3] 1618 $(".Recruitmentclass a").each(function() { 1619 if($(this).attr("rel")==cururl){ 1620 $(this).addClass("cur").siblings().removeClass("cur"); 1621 document.title=$(this).text()+" | "+$(".title span").text()+" | "+$(".title em a").text()+" | Amlogic"; 1622 } 1623 });
1624 $("html,body").stop(true).animate({scrollTop:0},0) 1625 delScript("webjs/jquery.zclip.js"); 1626 delScript("webjs/newscontjs.js?v=1.0.10"); 1627 $(".ApplicationSolutionspopup").hide(); 1628 $(".Share").remove(); 1629 $('.web').removeClass('ptal'); 1630 } 1631 }); 1632 } 1633 1634 $.ajax({ 1635 url:url, 1636 type:"GET", 1637 success: function(datehtml){ 1638 1639 var cururl = ((window.location.href).split('#')[1]).split('/')[3] 1640 $(".Recruitmentclass a").each(function() { 1641 if($(this).attr("rel")==cururl){ 1642 $(this).addClass("cur").siblings().removeClass("cur"); 1643 document.title = $(this).text() + " | " + $(".title span").text() + " | " + $(".title em a").text() + " | Amlogic"; 1644 } 1645 }); 1646 1647 $(".Recruitmentlist ul").addClass("Recruitmentlistleft") 1648 1649 setTimeout(function(){ 1650 $(".Recruitmentlist ul").removeClass("Recruitmentlistleft") 1651 $(".Recruitmentlist ul").addClass("Recruitmentlistright") 1652 },300) 1653 setTimeout(function(){ 1654 $(".Recruitmentlist ul").html(datehtml); 1655 },400) 1656 setTimeout(function(){ 1657 $(".Recruitmentlist ul").removeClass("Recruitmentlistright") 1658 },600) 1659 $(window).bind("scroll",function(){ 1660 myScroll(); 1661 }) 1662 } 1663 }); 1664 1665 }, 1666 //ææ¯æ¯æ 1667 Technologybox: function () { 1668 SetHistory(); 1669 var issettop = false; 1670 if ((window.location.href).indexOf("?amlogic") > -1) { 1671 issettop = true; 1672 } 1673 $(window).off('resize'); 1674 $(window).off('scroll'); 1675 $("nav ul p").eq(0).show(); 1676 $("nav ul p").eq(2).hide(); 1677 $(".Menu").removeClass("MenuSearch"); 1678 $(".Mapbutton").removeClass("cur"); 1679 $(".Sitemap").fadeOut(10); 1680 $(".Sitemap").removeClass("SitemapMove"); 1681 var min = 0; 1682 var max = 100; 1683 var Zero = min; 1684 var Hundred = max; 1685 var url = "Technology/index.html"; 1686 $("html,body").stop(true).animate({ scrollTop: 0 }, 0) 1687 $.ajax({
1688 url: url, 1689 type: "GET", 1690 beforeSend: function () { 1691 $(".Load").show(); 1692 Timing = setInterval(function () { 1693 if (Zero < Hundred) Zero++; 1694 $(".Load").animate({ "width": "" + Zero + "%" }, 600); 1695 }, 600); 1696 }, 1697 complete: function () { 1698 /*clearInterval(Timing) 1699 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({"width":"0"}); }); 1700 setTimeout(function () { 1701 $(".Technologyweb").css({ top: 0 }) 1702 $('.web').removeClass('specialefficacy'); 1703 $('.web').removeClass('moving'); 1704 $(".MobileMenu").removeClass("MobileMenushow") 1705 },1000);*/ 1706 var lujing = $(".Technicalsupport").attr("data-rel"); 1707 $("<img/>").attr("src",lujing).load(function(){ 1708 clearInterval(Timing) 1709 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({"width":"0"}); }); 1710 $('.web').removeClass('specialefficacy'); 1711 $('.web').removeClass('moving'); 1712 $(".MobileMenu").removeClass("MobileMenushow") 1713 }) 1714 1715 }, 1716 success: function (datehtml) { 1717 $("#webbox").html(datehtml) 1718 delScript("webjs/jquery.zclip.js"); 1719 delScript("webjs/newscontjs.js?v=1.0.10"); 1720 $(".ApplicationSolutionspopup").hide(); 1721 $(".Share").remove(); 1722 pdbox.unbind("touchstart"); 1723 pdbox.unbind("touchmove"); 1724 pdbox.unbind("touchend"); 1725 cbox.unbind("touchstart"); 1726 cbox.unbind("touchmove"); 1727 cbox.unbind("touchend"); 1728 $('body').removeAttr('style'); 1729 $('.web').removeClass('ptal'); 1730 $(window).bind("scroll",function(){ 1731 myScroll(); 1732 }) 1733 document.title = $(".title").text() + " | Amlogic"; 1734 } 1735 }); 1736 }, 1737 //ææ¯åä½ä¼ä¼´ 1738 Partners: function (query, file) { 1739 SetHistory(); 1740 var issettop = false; 1741 if ((window.location.href).indexOf("?amlogic") > -1) { 1742 issettop = true; 1743 } 1744 $("nav ul p").eq(0).show(); 1745 $("nav ul p").eq(2).hide(); 1746 $(window).off('resize'); 1747 $(window).off('scroll'); 1748 var min = 0; 1749 var max = 100; 1750 var Zero = min; 1751 var Hundred = max; 1752 var url="Technology"+"/"+query+"/"+file; 1753 $.ajax({ 1754 url:url, 1755 type:"GET", 1756 beforeSend: function(){ 1757 $(".Load").show(); 1758 Timing = setInterval(function(){ 1759 if(Zero<Hundred) Zero++; 1760 $(".Load").animate({"width":""+Zero+"%"},600); 1761 },600); 1762 }, 1763 complete: function(){ 1764 /*clearInterval(Timing) 1765 $(".Load").animate({"width":"100%",},500,function(){$(".Load").hide().css({"width":"0"});}); 1766 setTimeout(function(){ 1767 $('.web').removeClass('specialefficacy'); 1768 $('.web').removeClass('moving'); 1769 $(".MobileMenu").removeClass("MobileMenushow") 1770 },1000); */ 1771 var lujing = $(".Commonbanner").attr("data-rel"); 1772 $("<img/>").attr("src",lujing).load(function(){ 1773 clearInterval(Timing) 1774 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({"width":"0"}); }); 1775 $('.web').removeClass('specialefficacy'); 1776 $('.web').removeClass('moving'); 1777 $(".MobileMenu").removeClass("MobileMenushow") 1778 }) 1779 }, 1780 success: function(datehtml){ 1781 delScript("webjs/jquery.zclip.js"); 1782 delScript("webjs/newscontjs.js?v=1.0.10"); 1783 delScript("webjs/jquery.mousewheel.js"); 1784 delScript("webjs/Support.js"); 1785 $(".ApplicationSolutionspopup").hide(); 1786 $(".Share").remove(); 1787 $('.web').removeClass('ptal'); 1788 $("#webbox").html(datehtml) 1789 BannerHeight(); 1790 $("html,body").stop(true).animate({scrollTop:$(".Partnerslist").offset().top},0)
1791 var f = _.throttle(BannerHeight, 350) 1792 $(window).resize(function () { 1793 f(); 1794 }) 1795 document.title = $(".title span").text() + " | " + $(".title em a").text() + " | Amlogic"; 1796 1797 } 1798 }); 1799 }, 1800 //åºç¨æ¹æ¡ 1801 Programbox: function () { 1802 SetHistory(); 1803 var issettop = false; 1804 if ((window.location.href).indexOf("?amlogic") > -1) { 1805 issettop = true; 1806 } 1807 document.title = "Application"; 1808 $(window).off('resize'); 1809 $(window).off('scroll'); 1810 $("nav ul p").eq(0).show(); 1811 $("nav ul p").eq(2).hide(); 1812 var min = 0; 1813 var max = 100; 1814 var Zero = min; 1815 var Hundred = max; 1816 var url = "Program/index.html"; 1817 $.ajax({ 1818 url: url, 1819 type: "GET", 1820 beforeSend: function () { 1821 $(".Load").show(); 1822 Timing = setInterval(function () { 1823 if (Zero < Hundred) Zero++; 1824 $(".Load").animate({ "width": "" + Zero + "%" }, 600); 1825 }, 600); 1826 }, 1827 complete: function () { 1828 /*clearInterval(Timing) 1829 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({"width":"0"}); }); 1830 setTimeout(function () { 1831 $('.web').removeClass('specialefficacy'); 1832 $('.web').removeClass('moving'); 1833 $(".MobileMenu").removeClass("MobileMenushow") 1834 }, 1000);*/ 1835 var lujing = $(".Commonbanner").attr("data-rel"); 1836 $("<img/>").attr("src",lujing).load(function(){ 1837 clearInterval(Timing) 1838 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({"width":"0"}); }); 1839 $('.web').removeClass('specialefficacy'); 1840 $('.web').removeClass('moving'); 1841 $(".MobileMenu").removeClass("MobileMenushow") 1842 }) 1843 }, 1844 success: function (datehtml) { 1845 $("#webbox").html(datehtml); 1846 delScript("webjs/jquery.zclip.js"); 1847 delScript("webjs/newscontjs.js?v=1.0.10"); 1848 $(".ApplicationSolutionspopup").hide(); 1849 $(".Share").remove(); 1850 $('body').removeAttr('style'); 1851 $('.web').removeClass('ptal'); 1852 $(window).bind("scroll",function(){ 1853 myScroll(); 1854 }) 1855 } 1856 }); 1857 }, 1858 //åºç¨æ¹æ¡ 1859 Programcont: function (query, file) { 1860 SetHistory(); 1861 var issettop = false; 1862 if ((window.location.href).indexOf("?amlogic") > -1) { 1863 issettop = true; 1864 } 1865 $(window).off('resize'); 1866 $(window).off('scroll'); 1867 $("nav ul p").eq(0).show(); 1868 $("nav ul p").eq(2).hide(); 1869 $(document).off("click touchend",".caseleft"); 1870 $(document).off("click touchend",".caseright"); 1871 var CookieStencil = getCookie("Program"); 1872 var min = 0; 1873 var max = 100; 1874 var Zero = min; 1875 var Hundred = max; 1876 var url = "Program" + "/" + query + "/" + file; 1877 var Timing; 1878 if ($(".Programheader").length <= 0) { 1879 $.ajax({
1880 url: CookieStencil, 1881 type: "GET", 1882 success: function (Stencilhtml) { 1883 $("html,body").stop(true).animate({ scrollTop: 0 }, 0) 1884 $("#webbox").html() 1885 $('body').removeAttr('style'); 1886 $("#webbox").html(Stencilhtml) 1887 ProgramContents(url, Timing, Hundred, Zero) 1888 if (file == "index01.html") 1889 { $(".commonclass h3 a em").text("Overview") } 1890 else if(file == "index02.html") 1891 { $(".commonclass h3 a em").text("Processors") } 1892 else if(file == "index03.html") 1893 { $(".commonclass h3 a em").text("Devices") } 1894 if (file == "index03.html") { 1895 Banner.GetList(999, query, function (res) { 1896 1897 if (res && res.value) { 1898 if (res.value.length < 12) { 1899 setTimeout(function () { $(".newsmoer").hide(); }, 1000); 1900 } 1901 var html = ''; 1902 for (var i in res.value) { 1903 html += '<article class="ApplicationSolutionspopupbox"><h3 class="Solutionstitle">' + res.value[i].Title + '</h3><div class="ApplicationSolutionspopupleft"><img src="' + res.value[i].ImgurlSmall + '"></div><div class="ApplicationSolutionspopupright">' + 1904 '<div class="ApplicationSolutionspopupContent">' + res.value[i].Content + '</div></div></article>' 1905 } 1906 $(".ApplicationSolutionspopuplist").html(html); 1907 } 1908 }) 1909 } 1910 //setTimeout(function(){Porgramclick();},1000); 1911 } 1912 }); 1913 } 1914 else { 1915 ProgramContents(url, Timing, Hundred, Zero) 1916 if (file == "index01.html") 1917 { $(".commonclass h3 a em").text("Overview") } 1918 else if(file == "index02.html") 1919 { $(".commonclass h3 a em").text("Processors") } 1920 else if(file == "index03.html") 1921 { $(".commonclass h3 a em").text("Devices") } 1922 if (file == "index03.html") { 1923 Banner.GetList(999, query, function (res) { 1924 if (res && res.value) { 1925 if (res.value.length < 12) { 1926 setTimeout(function () { 1927 $(".newsmoer").hide(); 1928 }, 1000); 1929 } 1930 var html = ''; 1931 for (var i in res.value) { 1932 html += '<article class="ApplicationSolutionspopupbox"><h3 class="Solutionstitle">' + res.value[i].Title + '</h3><div class="ApplicationSolutionspopupleft"><img src="' + res.value[i].ImgurlSmall + '"></div><div class="ApplicationSolutionspopupright">' + 1933 '<div class="ApplicationSolutionspopupContent">' + res.value[i].Content + '</div></div></article>' 1934 } 1935 $(".ApplicationSolutionspopuplist").html(html); 1936 } 1937 }) 1938 } 1939 } 1940 1941 1942 }, 1943 //æèµè å ³ç³» 1944 Investor: function () { 1945 SetHistory(); 1946 var issettop = false; 1947 if ((window.location.href).indexOf("?amlogic") > -1) { 1948 issettop = true; 1949 } 1950 $(window).off('resize'); 1951 $(window).off('scroll'); 1952 $("nav ul p").eq(0).show(); 1953 $("nav ul p").eq(3).hide(); 1954 $(".Menu").removeClass("MenuSearch"); 1955 $(".Mapbutton").removeClass("cur"); 1956 $(".Sitemap").fadeOut(10); 1957 $(".Sitemap").removeClass("SitemapMove"); 1958 var min = 0; 1959 var max = 100; 1960 var Zero = min; 1961 var Hundred = max; 1962 var url = "Investor/index.html"; 1963 // $("html,body").stop(true).animate({ scrollTop: 0 }, 0) 1964 $.ajax({
1965 url: url, 1966 type: "GET", 1967 beforeSend: function () { 1968 $(".Load").show(); 1969 Timing = setInterval(function () { 1970 if (Zero < Hundred) Zero++; 1971 $(".Load").animate({ "width": "" + Zero + "%" }, 600); 1972 }, 600); 1973 }, 1974 complete: function () { 1975 /*clearInterval(Timing) 1976 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({"width":"0"}); }); 1977 setTimeout(function () { 1978 $(".Technologyweb").css({ top: 0 }) 1979 $('.web').removeClass('specialefficacy'); 1980 $('.web').removeClass('moving'); 1981 $(".MobileMenu").removeClass("MobileMenushow") 1982 },1000);*/ 1983 var lujing = $(".Technicalsupport").attr("data-rel"); 1984 $("<img/>").attr("src", lujing).load(function () { 1985 clearInterval(Timing) 1986 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({ "width": "0" }); }); 1987 $('.web').removeClass('specialefficacy'); 1988 $('.web').removeClass('ptal'); 1989 $('.web').removeClass('moving'); 1990 $(".MobileMenu").removeClass("MobileMenushow") 1991 }) 1992 1993 }, 1994 success: function (datehtml) { 1995 $("#webbox").html(datehtml) 1996 delScript("webjs/jquery.zclip.js"); 1997 delScript("webjs/newscontjs.js?v=1.0.10"); 1998 $(".ApplicationSolutionspopup").hide(); 1999 $(".Share").remove(); 2000 $('.web').removeClass('specialefficacy'); 2001 $('.web').removeClass('ptal'); 2002 pdbox.unbind("touchstart"); 2003 pdbox.unbind("touchmove"); 2004 pdbox.unbind("touchend"); 2005 cbox.unbind("touchstart"); 2006 cbox.unbind("touchmove"); 2007 cbox.unbind("touchend"); 2008 $('body').removeAttr('style'); 2009 // //$('.web').removeClass('ptal'); 2010 $("html,body").stop(true).animate({ scrollTop: 0 }, 0) 2011 BannerHeight();
2012 var f = _.throttle(BannerHeight, 350) 2013 $(window).resize(function () { 2014 f(); 2015 }); 2016 2017 $(window).bind("scroll", function () { 2018 myScroll(); 2019 }) 2020 document.title = $(".title").text() + " | æ¶æ¨å导ä½"; 2021 } 2022 }); 2023 }, 2024 2025 //æèµè èç³» 2026 InvestorCon: function (query, file) { 2027 SetHistory(); 2028 var issettop = false; 2029 if ((window.location.href).indexOf("?amlogic") > -1) { 2030 issettop = true; 2031 } 2032 $("nav ul p").eq(0).show(); 2033 $("nav ul p").eq(3).hide(); 2034 $(window).off('resize'); 2035 $(window).off('scroll'); 2036 var min = 0; 2037 var max = 100; 2038 var Zero = min; 2039 var Hundred = max; 2040 var url = "Investor" + "/" + query + "/" + file; 2041 $.ajax({ 2042 url: url, 2043 type: "GET", 2044 beforeSend: function () { 2045 $(".Load").show(); 2046 Timing = setInterval(function () { 2047 if (Zero < Hundred) Zero++; 2048 $(".Load").animate({ "width": "" + Zero + "%" }, 600); 2049 }, 600); 2050 }, 2051 complete: function () { 2052 /*clearInterval(Timing) 2053 $(".Load").animate({"width":"100%",},500,function(){$(".Load").hide().css({"width":"0"});}); 2054 setTimeout(function(){ 2055 $('.web').removeClass('specialefficacy'); 2056 $('.web').removeClass('moving'); 2057 $(".MobileMenu").removeClass("MobileMenushow") 2058 },1000); */ 2059 var lujing = $(".Commonbanner").attr("data-rel"); 2060 $("<img/>").attr("src", lujing).load(function () { 2061 clearInterval(Timing) 2062 $(".Load").animate({ "width": "100%", }, 500, function () { $(".Load").hide().css({ "width": "0" }); }); 2063 $('.web').removeClass('specialefficacy'); 2064 $('.web').removeClass('moving'); 2065 $('.web').removeClass('ptal'); 2066 $('.web').removeClass('specialefficacy'); 2067 $(".MobileMenu").removeClass("MobileMenushow") 2068 }) 2069 }, 2070 success: function (datehtml) { 2071 $("html,body").stop(true).animate({ scrollTop: 0 }, 0) 2072 $("#webbox").html(datehtml); 2073 //è·åè°·æå°å¾ 2074 var bd_map_js = $("#bd_map_js").val(); 2075 if (bd_map_js != "" && bd_map_js != null) { 2076 loadScript($("#bd_map_js").val(), function () { 2077 var mapType = google.maps.MapTypeId.ROADMAP; 2078 var latdata = $('.contactA-bdmap').data('lat'); 2079 var lngdata = $('.contactA-bdmap').data('lng'); 2080 var dizhi = $('.contactA-bdmap').data('contactaaddr'); 2081 var zoom = 15; 2082 console.log(latdata, lngdata); 2083 2084 onMapList() 2085 function onMapList() { 2086 var mapOptions = { 2087 center: new google.maps.LatLng(latdata, lngdata), //å°å¾çä¸å¿ç¹ 2088 zoom: zoom, ãããããããããã//å°å¾ç¼©æ¾æ¯ä¾ 2089 mapTypeId: mapType, ãããããããããã//æå®å°å¾å±ç¤ºç±»åï¼å«æå¾åãæ®ééè·¯ 2090 scrollwheel: true ããããããããã //æ¯å¦å 许æ»è½®æ»å¨è¿è¡ç¼©æ¾ 2091 }; 2092 2093 var map = new google.maps.Map(document.getElementById("contactA-bdmap"), mapOptions); 2094 2095 var marker = new google.maps.Marker({ position: mapOptions.center, map: map }); 2096 // è®¾å®æ 注çªå£ï¼é䏿³¨éæå 2097 var infowindow = new google.maps.InfoWindow({ 2098 content: dizhi 2099 }); 2100 // æå¼æ 注çªå£ 2101 marker.addListener('click', function () { 2102 infowindow.open(map, marker); 2103 }); 2104 2105 2106 } 2107 }) 2108 } 2109 2110 //è¡ç¥¨ä¿¡æ¯ 2111 loadScript('https://qt.gtimg.cn/q=sh688099', function () { 2112 var elements = v_sh688099.split("~"); 2113 var jg = parseFloat(elements[3]); 2114 var zs = parseFloat(elements[4]); 2115 if (jg > zs) { 2116 $(".msg-num").removeClass("down"); 2117 } else { 2118 $(".msg-num").addClass("down"); 2119 } 2120 //console.log(elements); 2121 $("#jg").text(elements[3].slice(0, 5)); 2122 $("#dz").text('Changeï¼' + elements[31]); 2123 $("#zdf").text('% Chgï¼' + elements[32] + '%');
2124 $("#jk").text('Open:' + elements[5].slice(0, 5)); 2125 $("#zs").text('Previous Close:' + elements[4].slice(0, 5)); 2126 $("#hsl").text('Turnover ratio:' + elements[38] + '%'); 2127 $("#zg").text('Today\'s High:' + elements[33].slice(0, 5)); 2128 2129 $("#zd").text('Today\'s low:' + elements[34].slice(0, 5)); 2130 $("#sy").text('P/E Ratio:' + elements[39].slice(0, 5)); 2131 $("#cje").text('Share Volume:' + elements[37] + 'ï¼myriadï¼'); 2132 $("#zsz").text('Market Capï¼' + elements[45] + '(hundred million)'); 2133 $("#sj").text('æªè³' + Format(elements[30]) + ' å京æ¶é´ *æ¥ä»·æ15åéæä»¥ä¸å»¶è¿'); 2134 }) 2135 //var bd_map_js = $("#bd_map_js").val(); 2136 //if (bd_map_js != "") { 2137 // bd_map_js = decodeURIComponent(bd_map_js).replace(/\+/g, " ").replace(/\"/g, "\\\""); 2138 // //eval(bd_map_js); 2139 // //document.writeln("<script>" + bd_map_js + "</script>"); 2140 // var script = document.createElement("script"); 2141 // script.type = "text/javascript"; 2142 // script.appendChild(document.createTextNode(bd_map_js)); 2143 // document.body.appendChild(script); 2144 2145 // console.log(bd_map_js); 2146 2147 //} 2148 //else { 2149 // console.error("ç¾åº¦å°å¾Jså è½½åºé ï¼ è¯·æ£æ¥ Investor/Contact.aspx 页颿件"); 2150 //} 2151 2152 $(".ApplicationSolutionspopup").hide(); 2153 $(".Share").remove(); 2154 $('.web').removeClass('specialefficacy'); 2155 $('.web').removeClass('ptal'); 2156 pdbox.unbind("touchstart"); 2157 pdbox.unbind("touchmove"); 2158 pdbox.unbind("touchend"); 2159 cbox.unbind("touchstart"); 2160 cbox.unbind("touchmove"); 2161 cbox.unbind("touchend"); 2162 $('body').removeAttr('style'); 2163 //$('.web').removeClass('ptal'); 2164 $("html,body").stop(true).animate({ scrollTop: 0 }, 0) 2165 // $("html,body").stop(true).animate({scrollTop:$(".picDownLocate").offset().top},0) 2166 BannerHeight();
2167 var f = _.throttle(BannerHeight, 350) 2168 $(window).resize(function () { 2169 f(); 2170 }); 2171 $(window).bind("scroll", function () { 2172 myScroll(); 2173 }) 2174 document.title = $(".title").text() + " | æ¶æ¨å导ä½"; 2175 2176 var uus = ((window.location.href).split('#')[1]).split('/')[2]; 2177 2178 if (uus.match(/[0-9]/g) != null) { 2179 $("html,body").stop(true).animate({ scrollTop: $(".picDownLocate").offset().top }, 0); 2180 } 2181 /*if(uus == "index.html"){ 2182 if(!isCount){ 2183 $("html,body").stop(true).animate({scrollTop:$(".picDownLocate").offset().top},0); 2184 } 2185 }else{ 2186 $("html,body").stop(true).animate({scrollTop:$(".picDownLocate").offset().top},0); 2187 isCount = false; 2188 }*/ 2189 } 2190 }); 2191 }, 2192 2193 2194}); 2195 2196var App_Router = new AppRouter; 2197Backbone.history.start(); 2198 2199 2200function Format(now) { 2201 var yyyy = now.substr(0, 4); 2202 var MM = now.substr(4, 2); 2203 var dd = now.substr(6, 2); 2204 var hh = now.substr(8, 2); 2205 var DD = now.substr(10, 2); 2206 var ss = now.substr(12, 2); 2207 var date = yyyy + "-" + MM + "-" + dd + " " + hh + ":" + DD + ":" + ss; 2208 return date; 2209};
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.