JS vs JQ. Need You Expirience : Today i have problem withs optimization of Js code. Ex.:

       
    
     // JavaScript Document
    
    window.onload = function (){
    setInterval (function (){ 
    var GetMeId = document.getElementsByClassName("prev")[0].getAttribute("id");
    var StyleFor = "display:block; width:100%; height:100%; top:0; left:0; transition:4s;";
    $('.layer').removeAttr('style');//еSIXаный костыль для упрощения кода.
    /*
    document.getElementsByClassName("layer")[0].removeAttribute("style");
    document.getElementsByClassName("layer")[1].removeAttribute("style");
    document.getElementsByClassName("layer")[2].removeAttribute("style");
    document.getElementsByClassName("layer")[3].removeAttribute("style");
    document.getElementsByClassName("layer")[4].removeAttribute("style");
    document.getElementsByClassName("layer")[5].removeAttribute("style");
    document.getElementsByClassName("layer")[6].removeAttribute("style");
    */
    if(document.getElementById(GetMeId) != document.getElementById("p"+GetMeId))
    {
    document.getElementById("p"+GetMeId).setAttribute("style",StyleFor);
    }
    },1000);
    };
How can i do streamline of this code on JavaScript, sach us it have on JQuery?