var arVersion = navigator.appVersion.split("MSIE");
var version = parseFloat(arVersion[1]);

window.addEvent('load',function() {

	$$('.macbar').forEach(function(myImage,i){
	   if ((version >= 5.5) && (version < 7) && (document.body.filters)) {
	       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : "";
						 var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : "";
	           var imgTitle = (myImage.title) ?
	                            "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' ";
	           var imgStyle = "display:inline-block;" + myImage.style.cssText;
	           var strNewHTML = "<span " + imgID + imgClass + imgTitle
	                  + " style=\"" + "width:" + myImage.width
	                  + "px; height:" + myImage.height
	                  + "px;" + imgStyle + ";"
	                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
	                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>";
	          myImage.outerHTML = strNewHTML;      
	   }
	});

	$$('.macbar').forEach(function(elem,i){
	  var hFx = new Fx.Style(null,null);
	  var wFx = new Fx.Style(null,null);
		var horig = elem.getStyle('height').toInt();
		var worig = elem.getStyle('width').toInt();
	  elem.getParent().addEvent('mouseenter',function(e){
		  hFx.stop();
		  wFx.stop();
			var percent = 1.21;
			var eh = elem.getStyle('height').toInt();
			var ew = elem.getStyle('width').toInt();
			var myEffect = elem.effects({duration: 75});
			myEffect.start({height: [eh,(horig*percent)], width: [ew,(worig*percent)], transition:[Fx.Transitions.Quad.eashInOut], wait: false});
		});
	  elem.getParent().addEvent('mouseleave',function(e){
		  hFx.stop();
		  wFx.stop();
			var eh = elem.getStyle('height').toInt();
			var ew = elem.getStyle('width').toInt();
			var myEffect = elem.effects({duration: 75});
			myEffect.start({height: [eh,horig], width: [ew,worig], transition:[Fx.Transitions.Quad.eashInOut], wait: false});
		});
	});
	
	var Tips3 = new Tips($$('.mactd'),{
		initialize:function(){
			this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 100, wait: false}).set(0);
		},
		onShow: function(toolTip) {
			this.fx.start(1);
		},
		onHide: function(toolTip) {
			this.fx.start(0);
		}
	});
	fixPNG();
	
});
