(function(j){if(j.browser.msie&&document.namespaces.v==null){document.namespaces.add("v","urn:schemas-microsoft-com:vml");var f=document.createStyleSheet().owningElement;f.styleSheet.cssText="v\\:*{behavior:url(#default#VML);}"}function h(b,d,c,e,p,a,n){var o='<v:rect class=gradientz_inserted style="position:absolute; margin-top: -1;  margin-left: -1; width:'+(e+1)+"px;height:"+(p+1)+"px;"+n+'" stroked="false"  fillcolor="'+c+'" >';o+='<v:fill method="sigma"  color2="'+d+'" type="gradient" angle="'+b+'">';o+="</v:rect>";return o}function i(v,u,s,y,b,z,e){var w=j("<canvas class=gradientz_inserted width="+y+"px height="+b+"px style='position:absolute; ; "+e+"'></canvas>");var a=w[0].getContext("2d");var t=v<0;v=Math.abs(v);var c=Math.sin(v)*z;var d=Math.cos(v)*z;var x=t?a.createLinearGradient(-c,0,0,-d):a.createLinearGradient(0,0,c,d);x.addColorStop(0,u);x.addColorStop(1,s);a.fillStyle=x;a.fillRect(0,0,y,b);return w}function g(b,a){b=Math.abs(b);a=Math.abs(a);return b<a?b:a}j.fn.gradientz=function(c){var b={angle:0,css:"left:0px; top:0px; "};j.extend(b,c||{});var a=Math.PI/180;return this.each(function(){var p=j(this);if(this.style.position!="absolute"){this.style.position="relative";this.style.zoom=1}var r=p.innerWidth();var e=p.innerHeight();b.start=b.start||p.css("backgroundColor");b.end=b.end||p.css("backgroundColor");var t=b.angle*a;var d=Math.cos(t);var q=Math.sin(t);var s=b.distance||g(e/d,r/q);r=g(s/q,r);e=g(s/d,e);p.wrapInner("<div class=inner_gradient style='position: absolute; left: 0px; top: 0px;' ></div>");if(j.browser.msie){var e=h(b.angle,b.start,b.end,r,e,s,b.css);this.innerHTML=e+this.innerHTML;j(this).css({overflow:"hidden"})}else{p.prepend(i(t,b.start,b.end,r,e,s,b.css))}})}})(jQuery);