(function($){$.fn.gradientLite=function(options){var endColor=$(this).css("background-color");var startColor=$(this).css("border-top-color");Number.prototype.clamp=function(min,max)
{var c=this;if(c<min)
c=min;if(c>max)
c=max;return c;};String.prototype.right=function(n)
{return n<this.length?this.slice(this.length-n):this;};RGB=function(r,g,b)
{this.r=0;this.g=0;this.b=0;if(typeof r=="string"){if(r.substr(0,1)=="#"){if(r.length==7){this.r=parseInt(r.substr(1,2),16)/255;this.g=parseInt(r.substr(3,2),16)/255;this.b=parseInt(r.substr(5,2),16)/255;}else{this.r=parseInt(r.substr(1,1),16)/15;this.g=parseInt(r.substr(2,1),16)/15;this.b=parseInt(r.substr(3,1),16)/15;}}else{var rgbPattern=/rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/;var c=r.match(rgbPattern);if(c){this.r=parseInt(c[1],10)/255;this.g=parseInt(c[2],10)/255;this.b=parseInt(c[3],10)/255;}}}else{this.r=r;this.g=g;this.b=b;}
return this;}
RGB.prototype.mix=function(c,f)
{return new RGB(this.r+(c.r-this.r)*f,this.g+(c.g-this.g)*f,this.b+(c.b-this.b)*f);};RGB.prototype.toString=function()
{return"#"+("0"+Math.floor(this.r.clamp(0,1)*255).toString(16)).right(2)+
("0"+Math.floor(this.g.clamp(0,1)*255).toString(16)).right(2)+
("0"+Math.floor(this.b.clamp(0,1)*255).toString(16)).right(2);};options=$.extend({hicolors:false,locolors:[new RGB(startColor),new RGB(endColor)],horizontal:false},options||{});return this.each(function(){var $this=$(this),html=[];if(!options.hicolors)
options.hicolors=options.locolors;for(var t=0;t<=100;t+=2){var bar=document.createElement("div");bar.style.position="absolute";bar.style.left=options.horizontal?t+"%":0;bar.style.top=options.horizontal?0:t+"%";bar.style.width=options.horizontal?(101-t)+"%":"100%";bar.style.height=options.horizontal?"100%":(101-t)+"%";bar.style.zIndex=0;var p=t/100*(options.locolors.length-1);bar.style.backgroundColor=options.hicolors[Math.floor(p)].mix(options.locolors[Math.ceil(p)],p-Math.floor(p)).toString();html.push(bar);}
$this.wrapInner('<div class="holder" style="display: block; position: relative; z-index: 2;"></div>');$this.css({position:'relative'});$this.append("<div class='gradient' style='position: absolute; top:0; left:0; width:100%; height:"+$this.outerHeight()+"px'></div>");$(".gradient").append(html);});};})(jQuery);