{"size": 1705, "ext": "js", "max_stars_repo_path": "main.js", "max_stars_repo_name": "zhouxuan2017/banner", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "main.js", "max_issues_repo_name": "zhouxuan2017/banner", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "main.js", "max_forks_repo_name": "zhouxuan2017/banner", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 1705.0, "max_line_length": 1705, "alphanum_fraction": 0.6539589443}
var $banner=function(){var g=1,m=$('<div class="slider" id="slider"><div class="slide"><img src="img/b5.png" alt=""></div><div class="slide"><img src="img/b1.png" alt=""></div><div class="slide"><img src="img/b2.png" alt=""></div><div class="slide"><img src="img/b3.png" alt=""></div><div class="slide"><img src="img/b4.png" alt=""></div><div class="slide"><img src="img/b5.png" alt=""></div><div class="slide"><img src="img/b1.png" alt=""></div></div><span id="left"><</span><span id="right">></span><ul class="nav" id="navs"><li class="active">1</li><li>2</li><li>3</li><li>4</li><li>5</li></ul>');return{show:function(i){var e,s,l=$(i);l.append(m);var a=document.getElementById("slider"),t=document.getElementById("left"),n=document.getElementById("right"),c=document.getElementById("navs").children;function d(i,t,n){clearInterval(s),s=setInterval(function(){var i=!0,e=parseInt(function(i,e){if(getComputedStyle(i))return getComputedStyle(i)[e];i.currentStyle[e]}(a,"left")),l=(-1200*t-e)/20;l=0<l?Math.ceil(l):Math.floor(l),-1200*t!=10+(e-10)&&(i=!1),a.style.left=e+l+"px",i&&(clearInterval(s),n&&n())},i)}function r(){g++,v(),d(10,g,function(){6==g&&(a.style.left="-1200px",g=1)})}function v(){for(var i=0;i<c.length;i++)c[i].className="";6==g?c[0].className="active":0==g?c[4].className="active":c[g-1].className="active"}l.mouseenter(function(){t.style.opacity=.7,n.style.opacity=.7,clearInterval(e)}),l.mouseleave(function(){t.style.opacity=0,n.style.opacity=0,e=setInterval(r,2500)}),e=setInterval(r,2500),t.onclick=function(){g--,v(),d(10,g,function(){0==g&&(a.style.left="-6000px",g=5)})},n.onclick=r;for(var o=0;o<c.length;o++)c[o].idx=o,c[o].onclick=function(){d(10,g=this.idx+1),v()}}}}();