No tags with classname preview so
var preview = document.getElementsByClassName("preview");
will cause that error
this line must be as follows
var preview = document.getElementsByClassName("previewBulk");
and as @raym0nd said the number of div tags must be equal to the number of a tags
EDIT
the problem with your code is you used the index of for loop inside the anonymous function but this function is called with mouseout and mouseover event and after finishing the for loop try the following
var movie = document.getElementsByClassName("movieImg");
for(var i = 0, j=movie.length; i
or test in jsFiddle