function hide(e){var t=(e.id.toString(),window.getComputedStyle(e).getPropertyValue("display"));dispValue={prop:t},e.style.display="none"}function show(e){e.style.display&&"none"!=e.style.display||(dispValue[e.id.toString()]&&"none"!=dispValue[e.id.toString()]?e.style.display=dispValue[e.id.toString()]:e.style.display="block")}function css(e,t){for(var n in t)e.style[n]=t[n]}function arrowfunc(){var e,t;0===arrowvar?(window.innerWidth>800?(e="35vw",t="80%"):(e="88vw",t="98%"),Velocity(document.getElementById("extra"),{translateY:"0",width:t,height:e,borderRadius:"4px"},500),Velocity(document.getElementById("arrowCircle"),{rotateZ:"180deg"},500),setTimeout(function(){document.getElementById("extra").classList.add("extra"),menushrink(),Velocity(document.getElementById("extraContent"),{opacity:"1"},500),Velocity(document.body,"scroll",{offset:document.getElementById("extra").getBoundingClientRect().top.toString()+"px",mobileHA:!1,duration:500}),Velocity(document.getElementById("charts"),"fadeIn",500)},500),arrowvar=1):(menuswitch2=2,menushrink(),Velocity(document.body,"scroll",500),setTimeout(function(){menuswitch2=0,document.getElementById("extra").classList.remove("extra"),window.innerWidth>800?(e="4vw",t="4vw"):(e="10vw",t="10vw"),Velocity(document.getElementById("extra"),{translateY:"-4vw",width:t,height:e,borderRadius:"5vw"},500),1===chartswitch&&chartbutton(),hide(document.getElementById("charts")),Velocity(document.getElementById("arrowCircle"),{rotateZ:"0deg"},500),Velocity(document.getElementById("extraContent"),{opacity:"0"},500)},500),arrowvar=0)}function menubuttonfunc(){0===menuswitch1?showmenu():hidemenu()}function showmenu(){loc=window.pageYOffset,setTimeout(function(){css(document.getElementById("mainPage"),{overflow:"hidden"}),css(document.getElementById("contents"),{position:"absolute"}),menuswitch1=1},500),menuswitch2=1,menushrink(),Velocity(document.querySelector("#buttonBig hr:nth-child(1)"),{translateY:"7px"},{duration:250,easing:"linear"}),Velocity(document.querySelector("#buttonBig hr:nth-child(1)"),{rotateZ:"45deg"},{duration:250,delay:260,easing:"linear"}),Velocity(document.querySelector("#buttonBig hr:nth-child(2)"),{opacity:"0"},{duration:250,easing:"linear"}),Velocity(document.querySelector("#buttonBig hr:nth-child(3)"),{translateY:"-7px"},{duration:250,easing:"linear"}),Velocity(document.querySelector("#buttonBig hr:nth-child(3)"),{rotateZ:"-45deg"},{duration:250,delay:260,easing:"linear"}),css(document.getElementById("contents"),{position:"fixed"}),Velocity(document.getElementById("contents"),"fadeIn",750),Velocity(document.getElementById("bg1"),"slideDown",500),Velocity(document.getElementById("buttonBig"),{backgroundColor:"rgba(0,0,0,0.5)"},500),clearInterval(intervalId)}function hidemenu(){setTimeout(function(){menuswitch1=0},500),menuswitch2=0,Velocity(document.querySelector("#buttonBig hr:nth-child(1)"),{rotateZ:"0deg"},{duration:250,easing:"linear"}),Velocity(document.querySelector("#buttonBig hr:nth-child(1)"),{translateX:"0",translateY:"0"},{duration:250,delay:260,easing:"linear"}),Velocity(document.querySelector("#buttonBig hr:nth-child(2)"),{opacity:"1"},{duration:250,delay:260,easing:"linear"}),Velocity(document.querySelector("#buttonBig hr:nth-child(3)"),{rotateZ:"0deg"},{duration:250,easing:"linear"}),Velocity(document.querySelector("#buttonBig hr:nth-child(3)"),{translateX:"0px",translateY:"0dpx"},{duration:250,delay:260,easing:"linear"}),Velocity(document.getElementById("contents"),"fadeOut",250);for(var e=0,t=document.querySelectorAll("#contents,#bg1");ee&&(e=60),window.pageYOffset>=e?css(document.getElementById("menu"),{position:"fixed",height:"10%"}):css(document.getElementById("menu"),{position:"absolute",height:"30%"}),css(document.getElementById("logo2"),{position:"fixed"}),window.pageYOffset>=logopos?(hide(document.getElementById("logo")),show(document.getElementById("logo2"))):(hide(document.getElementById("logo2")),show(document.getElementById("logo")))}else 1===menuswitch2?(css(document.getElementById("menu"),{position:"fixed",height:"10%"}),hide(document.getElementById("logo")),show(document.getElementById("logo2"))):2===menuswitch2&&(css(document.getElementById("menu"),{position:"absolute",height:"30%"}),hide(document.getElementById("logo2")),show(document.getElementById("logo")),css(document.getElementById("menu"),{transition:"height 0.5s linear"}),setTimeout(function(){css(document.getElementById("menu"),{transition:"all 0s"})}))}function nav(e,t){if("show"==e)"help"==t?0===help?(Velocity(document.getElementById("help"),"slideDown",1e3),Velocity(document.getElementById("menuHelp"),{color:"black",backgroundColor:"rgba(0,0,0,0.1)",fontWeight:"900"},1e3),help=1):(Velocity(document.getElementById("help"),"slideUp",1e3),Velocity(document.getElementById("menuHelp"),{color:"grey",backgroundColor:"white",fontWeight:"100"},1e3),setTimeout(function(){help=0},1e3)):"about"==t?0===about?(Velocity(document.getElementById("about"),"slideDown",1e3),Velocity(document.getElementById("menuAbout"),{color:"black",backgroundColor:"rgba(0,0,0,0.1)",fontWeight:"900"},1e3),about=1):(Velocity(document.getElementById("about"),"slideUp",1e3),Velocity(document.getElementById("menuAbout"),{color:"grey",backgroundColor:"white",fontWeight:"100"},1e3),setTimeout(function(){about=0},1e3)):0===embed?(Velocity(document.getElementById("embed"),"slideDown",1e3),Velocity(document.getElementById("menuEmbed"),{color:"black",backgroundColor:"rgba(0,0,0,0.1)",fontWeight:"900"},1e3),embed=1):(Velocity(document.getElementById("embed"),"slideUp",1e3),Velocity(document.getElementById("menuEmbed"),{color:"grey",backgroundColor:"white",fontWeight:"100"},1e3),setTimeout(function(){embed=0},1e3));else{for(var n=0,o=document.querySelectorAll("#about,#help,#embed");n800?1!==extraState&&(css(document.getElementById("extra"),{width:"4vw",height:"4vw"}),extraState=1):2!==extraState&&(css(document.getElementById("extra"),{width:"10vw",height:"10vw"}),extraState=2):window.innerWidth>800?3!==extraState&&(css(document.getElementById("extra"),{width:"80%",height:"35vw"}),extraState=3):4!==extraState&&(css(document.getElementById("extra"),{width:"98%",height:"88vw"}),extraState=4)}),document.getElementById("instruct").src="/images/instruct.png",(window.top!==window.self||window.top.location!=window.self.location||"youcount.github.io"!=window.location.hostname||"youcount.github.io"!=window.top.location.hostname)&&(window.top.location=window.self.location),"https:"!=window.location.protocol&&(window.location.href="https:"+window.location.href.substring(window.location.protocol.length));var emailParts=["manas.khurana20","gmail","com",".","@"];document.getElementById("email").innerHTML=emailParts[0]+emailParts[4]+emailParts[1]+emailParts[3]+emailParts[2],document.getElementById("email").href="mailto:"+document.getElementById("email").innerHTML,document.getElementById("buttonBig").addEventListener("click",function(){menubuttonfunc()}),document.getElementById("fb").addEventListener("click",function(){window.open("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(document.querySelector("#pageUrl input").getAttribute("value")),"_blank")}),document.getElementById("tw").addEventListener("click",function(){window.open("https://twitter.com/share?text="+document.getElementById("username").value+" now has "+live.actualCount.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")+" subscribers!&url="+encodeURIComponent(document.querySelector("#pageUrl input").getAttribute("value"))+"&hashtags=YouCount","_blank")}),document.getElementById("lnkdIn").addEventListener("click",function(){window.open("https://www.linkedin.com/shareArticle?mini=true&url="+encodeURIComponent(document.querySelector("#pageUrl input").getAttribute("value"))+"&title="+encodeURIComponent(channelname)+"'s%20Live%20Subscriber%20Count&source=YouCount","_blank")}),document.getElementById("tb").addEventListener("click",function(){window.open("http://www.tumblr.com/share/link?url="+encodeURIComponent(document.querySelector("#pageUrl input").getAttribute("value")),"_blank")}),document.getElementById("rdit").addEventListener("click",function(){window.open("http://www.reddit.com/submit?url="+encodeURIComponent(document.querySelector("#pageUrl input").getAttribute("value"))+"&title="+encodeURIComponent(channelname)+"'s%20Live%20Subscriber%20Count","_blank")}),document.getElementById("link").addEventListener("click",function(){linkshare()});for(var i=0,x=document.querySelectorAll("#menuHelp,#menuAbout,#menuEmbed");in;n++)try{show(t[n]),t[n].dataset.id=e.items[n].snippet.channelId.trim(),document.querySelectorAll(".suggest div")[n].textContent=e.items[n].snippet.title,document.querySelectorAll(".suggestImg")[n].src=e.items[n].snippet.thumbnails["default"].url}catch(o){hide(t[n])}})):void hide(document.getElementById("suggest"))});var arrowvar=0,menuswitch1=0,menuswitch2=0,loc,menushrinkvar=0;setInterval(function(){1===menushrinkvar&&(menushrinkvar=0,menushrink())},100);var logopos=document.getElementById("logo").getBoundingClientRect().top;window.addEventListener("scroll",function(){menushrinkvar=1}),menushrink();var help=0,about=0,embed=0,chartswitch=0,firstload=0;