var h1 = document.querySelector("h1.title");
var a = document.getElementsByTagName("h1"), b = a.length, h1; while(b--) if( ~a[b].className.indexOf("title") ){ h1 = a[b]; break;} h1// OHO