$(document).ready(function(){

	globalInit();
	
   $(".magTeaserHi, .magTeaserText").hide();
   $("#magWrapper").corner("20px");
   
    $(".magTeaserHover").mouseover(function() { 
        $(".magTeaserLo").fadeOut(1000);
		    $(".magTeaserHi").fadeIn(1000);
		    $(".magTeaserText").fadeIn(1000);
    });
    $(".magTeaserHover").mouseout(function() {
        $(".magTeaserHi").fadeOut(1000);
		    $(".magTeaserText").fadeOut(1000);
		    $(".magTeaserLo").fadeIn(1000);
	   });
	
	var allImg = document.getElementsByTagName("img");
	var imgLoSrc = "";
	for(i = 0; i < allImg.length; i++)
	{
		allImg[i].onmouseover = function()
		{
		var imgName = this.getAttribute("name");
			if(imgName == "imageChange")
			{				
				imgLoSrc = this.getAttribute("src");
				var imgSrc = this.getAttribute("src").substring(0,this.getAttribute("src").length - 6);
				imgSrc += "hi.gif";
				this.setAttribute("src",imgSrc);
			}
		}
		allImg[i].onmouseout = function()
		{
		var imgName = this.getAttribute("name");
			if(imgName == "imageChange")
			{
				this.setAttribute("src",imgLoSrc);
			}
		}
	}
});