jQuery(window).load(function()
{

    $('.sponsorLogo').each(function(index)
    {
            if ($(this).attr("longdesc"))
            {                                    
                $(this).mouseenter(function() 
                {
                    $('#hiddenArea').stop(true, true);
                    $('#hiddenText').stop(true, true);

                    $('#hiddenArea').html("<img src=\"resources/" + $(this).attr("longdesc") + "\" alt=\"picture\" />");
                    $('#mainArea').fadeOut(300, function() { $('#hiddenArea').fadeIn(300); });
                } );
                $(this).mouseleave(function()
                {                    
                    $('#mainArea').stop(true, true);

                    //$('#hiddenArea').html("<img src=\"resources" + $(this).attr("longdesc") + "\" alt=\"picture\" />");
                    $('#hiddenArea').fadeOut(300, function() { $('#mainArea').fadeIn(300); });
                } );
            }

            else if ($(this).attr("title"))
            {
                $(this).mouseenter(function()
                {
                    $('#hiddenText').stop(true, true);
                    $('#textArea').stop(true, true);
                    $('#hiddenArea').stop(true, true);
                    $('#hiddenText').html("<img src=\"resources/" + $(this).attr("title") + "\" alt=\"picture\" />");
                    $('#textArea').fadeOut(300, function() { $('#hiddenText').fadeIn(300); });
                } );
                $(this).mouseleave(function()
                {
                    $('#textArea').stop(true, true);
$('#hiddenText').stop(true, true);
                    //$('#hiddenArea').html("<img src=\"resources" + $(this).attr("longdesc") + "\" alt=\"picture\" />");
                    $('#hiddenText').fadeOut(300, function() { $('#textArea').fadeIn(300); });
                } );
            }
    });

}
);


function showVideo(filename)
{
    $('#mainImage').fadeOut(300, function() {
        $('#mainPic').html("<a href=\"" + filename + "\" id=\"player\" class=\"media {params: { autostart: 1, autoplay: 1 }, width:310, height:301, bgColor: '#141414', autoplay: 1, autostart: 1, isWindowless: 1,caption: 0}\" > </a>");
        $('a.media').media();        
    });    
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

