$.fn.vkfade=function(a){var a=a||"ff8000";this.addClass("fade-"+a);Fat.fade_all();this.removeClass("fade-"+a);return this};var Fat={make_hex:function(r,g,b){r=r.toString(16);if(r.length==1)r='0'+r;g=g.toString(16);if(g.length==1)g='0'+g;b=b.toString(16);if(b.length==1)b='0'+b;return"#"+r+g+b},fade_all:function(b){var a=document.getElementsByTagName("*");for(var i=0;i<a.length;i++){var o=a[i];var r=/fade-?(\w{3,6})?/.exec(o.className);if(r){if(!r[1])r[1]="";if(o.id)Fat.fade_element(o.id,null,b,"#"+r[1])}}},fade_element:function(a,c,d,e,f){if(!c)c=30;if(!d)d=3000;if(!e||e=="#")e="#FFFF33";if(!f)f=this.get_bgcolor(a);var i=Math.round(c*(d/1000));var j=d/i;var k=j;var l=0;if(e.length<7)e+=e.substr(1,3);if(f.length<7)f+=f.substr(1,3);var m=parseInt(e.substr(1,2),16);var n=parseInt(e.substr(3,2),16);var o=parseInt(e.substr(5,2),16);var p=parseInt(f.substr(1,2),16);var q=parseInt(f.substr(3,2),16);var s=parseInt(f.substr(5,2),16);var r,g,b,h;while(l<i){r=Math.floor(m*((i-l)/i)+p*(l/i));g=Math.floor(n*((i-l)/i)+q*(l/i));b=Math.floor(o*((i-l)/i)+s*(l/i));h=this.make_hex(r,g,b);setTimeout("Fat.set_bgcolor('"+a+"','"+h+"')",k);l++;k=j*l}setTimeout("Fat.set_bgcolor('"+a+"','"+f+"')",k)},set_bgcolor:function(a,c){var o=document.getElementById(a);o.style.backgroundColor=c},get_bgcolor:function(a){var o=document.getElementById(a);while(o){var c;if(window.getComputedStyle)c=window.getComputedStyle(o,null).getPropertyValue("background-color");if(o.currentStyle)c=o.currentStyle.backgroundColor;if((c!=""&&c!="transparent")||o.tagName=="BODY"){break}o=o.parentNode}if(c==undefined||c==""||c=="transparent")c="#FFFFFF";var b=c.match(/rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/);if(b)c=this.make_hex(parseInt(b[1]),parseInt(b[2]),parseInt(b[3]));return c}}