$.fn.toggleOpacity=function(b,a,c){if(typeof b=="undefined")b=0;if(typeof a=="undefined")a=1;if(typeof c=="undefined")c=3e3;typeof $(this).css("opacity")=="undefined"&&$(this).css({opacity:a});return $(this).animate({opacity:$(this).css("opacity")>b?b:a},c,"",function(){$(this).toggleOpacity(b,a,c)})}
