When you call hide, it thiswill be an object window, and windowdoes not have an attribute style. That's why you get
this.style is undefined
If you want to hide slika[0], you must bindfunction hidewith slika[0], for example
setTimeout(hide.bind(slika[0]), 4000);
You have now bound the function slika[0]to hide. Therefore, when called hide, it thiswill refer to slika[0], and it will set the display style to none.
, , ,
function hideObject(object) {
object.style.display ='none';
}