var headerWeb=document.getElementById("web_development_section_div");var webBtns=document.getElementsByClassName("web_btn");for(let i=0;i<webBtns.length;i++){webBtns[i].addEventListener("click",function(){var current=document.getElementsByClassName("web_btn active");current[0].className=current[0].className.replace(" active","");this.className+=" active";});}
function changeTab(evt,Category){var i,tabcontent,tablinks;tabcontent=document.getElementsByClassName("tabcontent");for(i=0;i<tabcontent.length;i++){tabcontent[i].style.display="none";}
tablinks=document.getElementsByClassName("tablinks");for(i=0;i<tablinks.length;i++){tablinks[i].className=tablinks[i].className.replace(" active","");}
document.getElementById(Category).style.display="flex";evt.currentTarget.className+=" active";}
var cursor=document.querySelector(".cursor");var timeout;document.addEventListener("mousemove",function(e){cursor.style.cssText="left: "+e.clientX+"px; top: "+e.clientY+"px;";cursor.style.display="block";function mouseStopped(){cursor.style.display="none";}
clearTimeout(timeout);timeout=setTimeout(mouseStopped,1000);});document.addEventListener("mouseout",()=>{cursor.style.display="none";});let id=(id)=>document.getElementById(id);let classes=(classes)=>document.getElementsByClassName(classes);let name=id("name"),email=id("email"),number=id("number"),errorMsg=classes("error"),successIcon=classes("success-icon"),failureIcon=classes("failure-icon");let contactForm=document.getElementById("contact-form");$('#submit').click(function(){if($.trim($("#name").val())==''||$.trim($("#email").val())==''||$.trim($("#number").val())==''){engine(name,0,"Please enter name","Please entr");engine(email,1,"email is required");engine(number,2,"phone number is required");return false;}});let engine=(id,serial,message)=>{var filter=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;$('#submit').click(function(){if(id.value.trim()===""){errorMsg[serial].innerHTML=message;id.style.border="2px solid red";return false;failureIcon[serial].style.opacity="1";successIcon[serial].style.opacity="0";}else if(id==name&&id.value.length<3){errorMsg[serial].innerHTML="Minimum length of name should be 3";id.style.border="1px solid red";return false;failureIcon[serial].style.opacity="1";successIcon[serial].style.opacity="0";}else if(id==email){if(id.value.match(filter)){errorMsg[serial].innerHTML="";id.style.border="1px solid green";failureIcon[serial].style.opacity="0";successIcon[serial].style.opacity="1";}else{errorMsg[serial].innerHTML="email should be valid";id.style.border="1px solid red";failureIcon[serial].style.opacity="1";successIcon[serial].style.opacity="0";return false;}}else if(id==number&&id.value.length<10){errorMsg[serial].innerHTML="Minimum length of number should be 10";id.style.border="2px solid red";return false;failureIcon[serial].style.opacity="1";successIcon[serial].style.opacity="0";}else{errorMsg[serial].innerHTML="";id.style.border="2px solid green";failureIcon[serial].style.opacity="0";successIcon[serial].style.opacity="1";}});};AOS.init({once:true,});const scrollUp=()=>{const scrollUp=document.getElementById('scroll-up')
this.scrollY>=30?scrollUp.classList.add('show-scroll'):scrollUp.classList.remove('show-scroll')}
window.addEventListener('scroll',scrollUp)