window.onload = function() {
    var browser=navigator.appName;
	var b_version=navigator.appVersion;
	var version=parseFloat(b_version);
	if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ 
		 var ieversion=new Number(RegExp.$1) 
		 if (ieversion<=6) {
		  	$("div#headerContainer").replaceWith("<img src='http://www.whynet.info/images/homeHeadImg.jpg' \/>");
		 }
		 
	}
	lastBlock = $("#a1");
    maxWidth = 684;
    minWidth = 68;	
	$(lastBlock).animate({width: maxWidth+"px"}, 600, "swing");
    $("ul#header > li > div.anchor").click(function(){	
		if (this == lastBlock) {
			return false;
		}
		$("a.linkSection").click(function(){	
			window.location = $(this).attr("href");
		});
	  	clicked = this;
        $(lastBlock).animate({width: minWidth+"px"}, 400, "swing", function(){
			$(clicked).animate({width: maxWidth+"px"}, 600, "swing");
		} );
		
		lastBlock = this;	
     });
}
