View difference between Paste ID: wYEJGQbQ and Kbpvpck9
SHOW: | | - or go back to the newest paste.
1-
document.onload = function(){
1+
(function __init__(){
2-
	var wMenubar = document.getElementById("wMenuBar"),
2+
	if(typeof document.body != 'undefined'){
3-
		wLogo = document.getElementById("wLogo");
3+
		document.body.onload = function(){
4-
	window.onscroll = function (e){
4+
			var wMenubar = document.getElementById("wMenuBar"),
5-
		if(window.scrollY > 50){
5+
				wLogo = document.getElementById("wLogo");
6-
			wMenubar.className="small";
6+
			window.onscroll = function (e){
7-
			wLogo.src = "logo-small.png";
7+
				if(window.scrollY > 50){
8-
		}else{
8+
					wMenubar.className="small";
9-
			wMenubar.className="big";
9+
					wLogo.src = "logo-small.png";
10-
			wLogo.src = "logo.png";
10+
				}else{
11-
		}
11+
					wMenubar.className="big";
12
					wLogo.src = "logo.png";
13-
};
13+
				}
14
			}
15
		};
16
	}else{
17
		setTimeout(__init__,10);
18
	}
19
})();