jQuery.fn.highlightFade=function(D){var G=(D&&D.constructor==String)?{start:D}:D||{};var F=jQuery.highlightFade.defaults;var C=G.interval||F.interval;var A=G.attr||F.attr;var E={linear:function(I,J,H,K){return parseInt(I+(K/H)*(J-I))},sinusoidal:function(I,J,H,K){return parseInt(I+Math.sin(((K/H)*90)*(Math.PI/180))*(J-I))},exponential:function(I,J,H,K){return parseInt(I+(Math.pow(K/H,2))*(J-I))}};var B=(G.iterator&&G.iterator.constructor==Function)?G.iterator:E[G.iterator]||E[F.iterator]||E.linear;if(F.iterator&&F.iterator.constructor==Function){B=F.iterator}return this.each(function(){if(!this.highlighting){this.highlighting={}}var J=(this.highlighting[A])?this.highlighting[A].end:jQuery.highlightFade.getBaseValue(this,A)||[255,255,255];var K=jQuery.highlightFade.getRGB(G.start||G.colour||G.color||F.start||[255,255,128]);var H=jQuery.speed(G.speed||F.speed);var I=G["final"]||(this.highlighting[A]&&this.highlighting[A].orig)?this.highlighting[A].orig:jQuery.curCSS(this,A);if(G.end||F.end){I=jQuery.highlightFade.asRGBString(J=jQuery.highlightFade.getRGB(G.end||F.end))}if(typeof G["final"]!="undefined"){I=G["final"]}if(this.highlighting[A]&&this.highlighting[A].timer){window.clearInterval(this.highlighting[A].timer)}this.highlighting[A]={steps:((H.duration)/C),interval:C,currentStep:0,start:K,end:J,orig:I,attr:A};jQuery.highlightFade(this,A,G.complete,B)})};jQuery.highlightFade=function(C,A,D,B){C.highlighting[A].timer=window.setInterval(function(){var F=B(C.highlighting[A].start[0],C.highlighting[A].end[0],C.highlighting[A].steps,C.highlighting[A].currentStep);var E=B(C.highlighting[A].start[1],C.highlighting[A].end[1],C.highlighting[A].steps,C.highlighting[A].currentStep);var G=B(C.highlighting[A].start[2],C.highlighting[A].end[2],C.highlighting[A].steps,C.highlighting[A].currentStep);jQuery(C).css(A,jQuery.highlightFade.asRGBString([F,E,G]));if(C.highlighting[A].currentStep++>=C.highlighting[A].steps){jQuery(C).css(A,C.highlighting[A].orig||"");window.clearInterval(C.highlighting[A].timer);C.highlighting[A]=null;if(D&&D.constructor==Function){D.call(C)}}},C.highlighting[A].interval)};jQuery.highlightFade.defaults={start:[255,255,128],interval:50,speed:400,attr:"backgroundColor"};jQuery.highlightFade.getRGB=function(C,B){var A;if(C&&C.constructor==Array&&C.length==3){return C}if(A=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(C)){return[parseInt(A[1]),parseInt(A[2]),parseInt(A[3])]}else{if(A=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(C)){return[parseFloat(A[1])*2.55,parseFloat(A[2])*2.55,parseFloat(A[3])*2.55]}else{if(A=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(C)){return[parseInt("0x"+A[1]),parseInt("0x"+A[2]),parseInt("0x"+A[3])]}else{if(A=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(C)){return[parseInt("0x"+A[1]+A[1]),parseInt("0x"+A[2]+A[2]),parseInt("0x"+A[3]+A[3])]}else{return jQuery.highlightFade.checkColorName(C)||B||null}}}}};jQuery.highlightFade.asRGBString=function(A){return"rgb("+A.join(",")+")"};jQuery.highlightFade.getBaseValue=function(E,B,A){var D,C;A=A||false;C=B=B||jQuery.highlightFade.defaults.attr;do{D=jQuery(E).css(C||"backgroundColor");if((D!=""&&D!="transparent")||(E.tagName.toLowerCase()=="body")||(!A&&E.highlighting&&E.highlighting[B]&&E.highlighting[B].end)){break}C=false}while(E=E.parentNode);if(!A&&E.highlighting&&E.highlighting[B]&&E.highlighting[B].end){D=E.highlighting[B].end}if(D==undefined||D==""||D=="transparent"){D=[255,255,255]}return jQuery.highlightFade.getRGB(D)};jQuery.highlightFade.checkColorName=function(A){if(!A){return null}switch(A.replace(/^\s*|\s*$/g,"").toLowerCase()){case"aqua":return[0,255,255];case"black":return[0,0,0];case"blue":return[0,0,255];case"fuchsia":return[255,0,255];case"gray":return[128,128,128];case"green":return[0,128,0];case"lime":return[0,255,0];case"maroon":return[128,0,0];case"navy":return[0,0,128];case"olive":return[128,128,0];case"purple":return[128,0,128];case"red":return[255,0,0];case"silver":return[192,192,192];case"teal":return[0,128,128];case"white":return[255,255,255];case"yellow":return[255,255,0]}};