//this function generates a smooth transition between a normal and over button state. The button fades to the specified value at the specified speed

(function($){

$.fn.FadeOpacity = function(opt)
{   
    var defaults = {
        opacity:0.5,
        duration:305
    };
    
    var options = $.extend(defaults, opt);
    
    $(this).mouseover(function() 
    {
      $(this).animate({opacity:options.opacity},{queue:false, duration:options.duration});
    });   
    
    $(this).mouseout(function() 
    {            
      $(this).animate({opacity:1},{queue:false, duration:options.duration});
    });
};

})(jQuery);