Change the var decl to func and remove looking for Element in IE<=8