$(document).ready(function() {
	if (navigator.appVersion.match(/MSIE [0-6]\./)) {
		$('*').each(function () {
			  if (this.currentStyle.backgroundImage != 'none') {
				src = this.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/);
			    if (src) {
			        src = src[1]; 
				    $(this).css({'backgroundImage': 'none', 'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='" + src + "')"});
				 }
			  }
		});
		$('IMG').each(function () {
			if (this.src.indexOf(".png")>0) {
		        src = this.src; 
		        this.src = RootAddress + 'images/spacer.gif';
			    $(this).css({'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='" + src + "')"});
			 }
		});
	}
	$(".BlockBanner").each(function() {
		this.innerHTML = '<table width="100%" height="88" cellSpacing=0 cellPadding=0 border=0><tr><td width=17><img src="'+DocumentRoot+'images/home/banner_l.jpg"></td><td>'+this.innerHTML+'</td><td width=17><img src="'+DocumentRoot+'images/home/banner_r.jpg"></td></tr></table>'
	});
	$(".Shadow").each(function() {
		this.innerHTML = '<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td height="9" width="9"><img src="'+DocumentRoot+'images/shadow/lt.gif"></td><td background="'+DocumentRoot+'images/shadow/t2.gif"><div style="background:url('+DocumentRoot+'images/shadow/t3.gif) no-repeat right"><img src="'+DocumentRoot+'images/shadow/t1.gif"></div></td><td width="9"><img src="'+DocumentRoot+'images/shadow/rt.gif"></td></tr><tr><td height="8" background="'+DocumentRoot+'images/shadow/l2.gif" valign="top"><img src="'+DocumentRoot+'images/shadow/l1.gif"></td><td rowspan="2">'+this.innerHTML+'</td><td background="'+DocumentRoot+'images/shadow/r2.gif" valign="top"><img src="'+DocumentRoot+'images/shadow/r1.gif"></td></tr><tr><td background="'+DocumentRoot+'images/shadow/l2.gif" valign="bottom"><img src="'+DocumentRoot+'images/shadow/l3.gif"></td><td background="'+DocumentRoot+'images/shadow/r2.gif" valign="bottom"><img src="'+DocumentRoot+'images/shadow/r3.gif"></td></tr><tr><td height="9" width="9"><img src="'+DocumentRoot+'images/shadow/lb.gif"></td><td background="'+DocumentRoot+'images/shadow/b2.gif"><div style="background:url('+DocumentRoot+'images/shadow/b3.gif) no-repeat right"><img src="'+DocumentRoot+'images/shadow/b1.gif"></div></td><td width="9"><img src="'+DocumentRoot+'images/shadow/rb.gif"></td></tr></table>'
	});
	$('#MainMenu A')
		.css( {backgroundPosition: "0px 0px"} )
		.mouseover(function(){ $(this).stop().animate({backgroundPosition:"(0px -35px)"}, {duration:300}) })
		.mouseout (function(){ $(this).stop().animate({backgroundPosition:"(0px 0px)"}, {duration:200, complete:function(){ $(this).css({backgroundPosition: "0px 0px"}) }}) });
	$('#MainMenu A.a')
		.css( {backgroundPosition: "0px -35px"} )
		.mouseover(function(){ $(this).stop().animate({backgroundPosition:"(0px -15px)"}, {duration:300}) })
		.mouseout (function(){ $(this).stop().animate({backgroundPosition:"(0px -35px)"}, {duration:200, complete:function(){ $(this).css({backgroundPosition: "0px -35px"}) }}) });
	$('INPUT').each(function(){ if(this.alt!='') $(this).blur(function(){ changeText(this,this.alt,0) }).focus(function(){ changeText(this,this.alt,1) }); });
});
