blob: 700a9a7ff8f633162ea2186c8995c65738612eef [file] [log] [blame]
!function(){if(!$(".lower-ie").length){document.getElementById("nav-index").className="active";var e=$(".navbar-default");e.addClass("navbar-bg"),$(window).scroll(function(){600<window.pageYOffset?e.removeClass("navbar-bg"):e.addClass("navbar-bg")});n(),$(window).resize(n);var t=21,i=0,o=0;!function n(){requestAnimationFrame(function(){if(0===o)for(var e=1;e<t-1;++e)o+=$(".companies img").eq(e).width()+30;o<(i+=1)&&(i=0),$(".companies").scrollLeft(i),n()})}()}function n(){var e=document.getElementById("video-index");window.innerWidth/window.innerHeight<16/9?(e.style.height=window.innerHeight+"px",e.style.width="auto",e.style.marginLeft=Math.floor((window.innerWidth-window.innerHeight/9*16)/2)+"px",e.style.marginTop=0):(e.style.width=window.innerWidth+"px",e.style.height="auto",e.style.marginTop=Math.floor(window.innerHeight-window.innerWidth/16*9)+"px",e.style.marginLeft=0)}}();var recommendId=3;function recommend(e){recommendId=e;var n=$(".people img").eq(0).remove();$(".people").append(n),$(".people img").removeClass("active"),$(".people img").eq(2).addClass("active"),$(".recommend").removeClass("active"),$(".recommend").eq(e).addClass("active")}function renderHomepage3TouchDemo(e){}function playVideo(e){var n=document.getElementById(e);n&&n.play();var t=document.getElementById(e+"-play");t&&(t.style.display="none");var i=document.getElementById(e+"-pause");i&&(i.style.display="block")}function pauseVideo(e){var n=document.getElementById(e);n&&n.pause();var t=document.getElementById(e+"-play");t&&(t.style.display="block");var i=document.getElementById(e+"-pause");i&&(i.style.display="none")}setInterval(function(){recommend(recommendId),++recommendId===$(".recommend").length&&(recommendId=0)},3e3);