sfHover = function() {
	for(i = 1; i < 28; i++){
		var gallery = 'galleryo'+i;
		if(document.getElementById(gallery) != null){
			var sfEls = document.getElementById(gallery);
				sfEls.onmouseover=function() {
					this.className+=" sfhover";
				}
				sfEls.onmouseout=function() {
					this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
				}
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
