//TDO 2009
//Rollover fade animation for product guide links.

$(document).ready(function () {
 	//AlphaImageLoader filter for IE, which otherwise can't handle alpha trans during the fade
	if (jQuery.browser.msie)
    	$('img[src$=.png]').each(function() {
        	this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+this.src+",sizingMethod='scale')";
    });

  // find the div.fade elements and hook the hover event
  $('div.fade').hover(function() {
    // on hover, find the element we want to fade *up*
    var fade = $('> div', this);
   	fade.stop().fadeTo(200, 1);
	fade.fadeIn(300);

  }, function () {
    // on hovering out, fade the element out
    var fade = $('> div', this);
    if (fade.is(':animated')) {
		fade.stop().fadeTo(900, 0);
		
    } else {
      // fade away slowly
	   fade.fadeOut(900);
	  
    }
  });
});
