/*
 * supCSS - jQuery Plugin
 * Supplement to the browser Internet Explorer 6,7,8 to work with border-raduis
 *
 * Examples and documentation at: working..., contact to me spb.piksel@gmail.com
 * 
 * Copyright (c) 2010 - 2011 Pakhtinov Dmitriy
 * 
 * Version: 0.3.9 (01/08/2011)
 * Requires: jQuery v1.4.3+
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */

(function(e,t){function l(b,c){if(!c||!c._br_rect||b!=c._br_rect.content){var a=b.split("/"),f=a[0].split(" ");a=a.length>1?a[1].split(" "):a[0].split(" ");var d={content:b};d.hLeftTop=f.shift();d.hRightTop=f.length>0?f.shift():d.hLeftTop;d.hRightBottom=f.length>0?f.shift():d.hLeftTop;d.hLeftBottom=f.length>0?f.shift():d.hRightTop;d.vLeftTop=a.shift();d.vRightTop=a.length>0?a.shift():d.vLeftTop;d.vRightBottom=a.length>0?a.shift():d.vLeftTop;d.vLeftBottom=a.length>0?a.shift():d.vRightTop;d.hLeftTopN=
e.intval(d.hLeftTop);d.hRightTopN=e.intval(d.hRightTop);d.hRightBottomN=e.intval(d.hRightBottom);d.hLeftBottomN=e.intval(d.hLeftBottom);d.vLeftTopN=e.intval(d.vLeftTop);d.vRightTopN=e.intval(d.vRightTop);d.vRightBottomN=e.intval(d.vRightBottom);d.vLeftBottomN=e.intval(d.vLeftBottom);d.isZero=function(){return d.hLeftTopN+d.hRightTopN+d.hRightBottomN+d.hLeftBottomN+d.vLeftTopN+d.vRightTopN+d.vRightBottomN+d.vLeftBottomN==0};d.regenarated=true;d.toString=function(){return d.hLeftTop+" "+d.hRightTop+
" "+d.hRightBottom+" "+d.hLeftBottom+"/"+d.vLeftTop+" "+d.vRightTop+" "+d.vRightBottom+" "+d.vLeftBottom};d.set=function(g,i){d[g]=i;return d};return d}c._br_rect.regenarated=false;return c._br_rect}function n(b){var c=b.offsetWidth,a=b.offsetHeight;c=c==0?b.style.width=="auto"||b.style.width==""?n(b.parentNode).w:e.intval(b.style.width)+e.intval(b.style.borderLeftWidth)+e.intval(b.style.borderRightWidth):c;a=a==0?b.style.height=="auto"||b.style.height==""?n(b.parentNode).h:e.intval(b.style.height)+
e.intval(b.style.borderTopWidth)+e.intval(b.style.borderBottomWidth):a;return{w:c,h:a}}function p(b){var c=b.supCSS,a=c._br_cs_rect;if(c._br_cf&&c._br_bgImage){a.shiftX=0;a.shiftY=0;var f={X:0,Y:0},d=function(i,k){var h=true;switch(k){case "center":f[i]=0.5;break;case "right":case "bottom":f[i]=1;break;case "left":case "top":k="0";default:if(k.indexOf("%")!=-1)f[i]=e.intval(k)*0.01;else{h=false;if(i=="X"){a.shiftX=a.hLT<0||a.hLB<0?2:1;k=e.intval(k)+a.shiftX;a.shiftX=a.shiftX==1?0:a.shiftX}else{a.shiftY=
a.vLT<0||a.vRT<0?2:1;k=e.intval(k)+a.shiftY;a.shiftY=a.shiftY==1?0:a.shiftY}}}var q=i=="X";f[i]=Math.ceil(h?a[q?"w":"h"]*f[i]-c._br_bgImage_size[q?"w":"h"]*f[i]:k)},g;for(g in f)d(g,b.currentStyle["backgroundPosition"+g]);c._br_cf[0].position=f.X/(a.w+a.shiftX)+","+f.Y/(a.h+a.shiftY)}}function r(b,c){var a=b.supCSS;if(parseInt(e.browser.version)>6)a.adjusted_border={Left:e.intval(b.currentStyle.borderLeftWidth),Right:e.intval(b.currentStyle.borderRightWidth),Top:e.intval(b.currentStyle.borderTopWidth),
Bottom:e.intval(b.currentStyle.borderBottomWidth),w:0,h:0};else{if(c)c=c.replace(/^border/,"").replace(/Width$/,"");if(a.adjusted_border)if(c)b.style["margin"+c]=e.intval(b.currentStyle["margin"+c])-a.adjusted_border[c]+"px";else{b.style.marginLeft=e.intval(b.currentStyle.marginLeft)-a.adjusted_border.Left+"px";b.style.marginTop=e.intval(b.currentStyle.marginTop)-a.adjusted_border.Top+"px";b.style.marginRight=e.intval(b.currentStyle.marginRight)-a.adjusted_border.Right+"px";b.style.marginBottom=e.intval(b.currentStyle.marginBottom)-
a.adjusted_border.Bottom+"px"}if(c){a.adjusted_border[c]=e.intval(b.style["border"+c+"Width"]);b.style["margin"+c]=e.intval(b.currentStyle["margin"+c])+a.adjusted_border[c]+"px"}else{a.adjusted_border={Left:e.intval(b.currentStyle.borderLeftWidth),Right:e.intval(b.currentStyle.borderRightWidth),Top:e.intval(b.currentStyle.borderTopWidth),Bottom:e.intval(b.currentStyle.borderBottomWidth),w:0,h:0};b.style.marginLeft=e.intval(b.currentStyle.marginLeft)+a.adjusted_border.Left+"px";b.style.marginTop=e.intval(b.currentStyle.marginTop)+
a.adjusted_border.Top+"px";b.style.marginRight=e.intval(b.currentStyle.marginRight)+a.adjusted_border.Right+"px";b.style.marginBottom=e.intval(b.currentStyle.marginBottom)+a.adjusted_border.Bottom+"px"}a.adjusted_border.w=a.adjusted_border.Left+a.adjusted_border.Right;a.adjusted_border.h=a.adjusted_border.Top+a.adjusted_border.Bottom;j(b,"borderStyle","none");a._br_handler&&a._br_rect&&e(b).trigger("msieBorderRadiusHandle")}}function u(b){var c=b.supCSS,a=c._br_cs_rect={},f=n(b).w;b=n(b).h;a.bl=c.adjusted_border.Left;
a.br=c.adjusted_border.Right;a.bt=c.adjusted_border.Top;a.bb=c.adjusted_border.Bottom;a.wb=a.bl+a.br;a.hb=a.bt+a.bb;a.bx=0;a.by=0;a.bw=f+c.adjusted_border.w+1;a.bh=b+c.adjusted_border.h+1;a.bcx="-"+a.bl+"px";a.bcy="-"+a.bt+"px";a.bcw=f+c.adjusted_border.w+"px";a.bch=b+c.adjusted_border.h+"px";a.bhLT=c._br_rect.hLeftTopN-1;a.bhRT=c._br_rect.hRightTopN-1;a.bhRB=c._br_rect.hRightBottomN-1;a.bhLB=c._br_rect.hLeftBottomN-1;a.bhLTl=a.bhLT>9?10:a.bhLT>4?5:0;a.bhRTl=a.bhRT>9?10:a.bhRT>4?5:0;a.bhRBl=a.bhRB>
9?10:a.bhRB>4?5:0;a.bhLBl=a.bhLB>9?10:a.bhLB>4?5:0;a.bvLT=c._br_rect.vLeftTopN-1;a.bvRT=c._br_rect.vRightTopN-1;a.bvRB=c._br_rect.vRightBottomN-1;a.bvLB=c._br_rect.vLeftBottomN-1;a.bvLTl=a.bvLT>9?10:a.bvLT>4?5:0;a.bvRTl=a.bvRT>9?10:a.bvRT>4?5:0;a.bvRBl=a.bvRB>9?10:a.bvRB>4?5:0;a.bvLBl=a.bvLB>9?10:a.bvLB>4?5:0;a.x=0;a.y=0;a.w=f-a.wb+c.adjusted_border.w+1;a.h=b-a.hb+c.adjusted_border.h+1;a.cx=a.bl+"px";a.cy=a.bt+"px";a.cw=f-a.wb+c.adjusted_border.w+"px";a.ch=b-a.hb+c.adjusted_border.h+"px";a.hLT=Math.max(a.bhLT-
a.bl,0);a.hRT=Math.max(a.bhRT-a.br,0);a.hRB=Math.max(a.bhRB-a.br,0);a.hLB=Math.max(a.bhLB-a.bl,0);a.hLTl=a.hLT>9?10:a.hLT>4?5:0;a.hRTl=a.hRT>9?10:a.hRT>4?5:0;a.hRBl=a.hRB>9?10:a.hRB>4?5:0;a.hLBl=a.hLB>9?10:a.hLB>4?5:0;a.vLT=Math.max(a.bvLT-a.bt,0);a.vRT=Math.max(a.bvRT-a.bt,0);a.vRB=Math.max(a.bvRB-a.bb,0);a.vLB=Math.max(a.bvLB-a.bb,0);a.vLTl=a.vLT>9?10:a.vLT>4?5:0;a.vRTl=a.vRT>9?10:a.vRT>4?5:0;a.vRBl=a.vRB>9?10:a.vRB>4?5:0;a.vLBl=a.vLB>9?10:a.vLB>4?5:0;a.btx=a.bl+1;a.bty=a.bt+1;a.btw=a.w-2;a.bth=
a.h-2}e.fn.styleSheet=function(b){b=b?e.trim(b):"";for(var c=b==""?[]:null,a=this[0].document.styleSheets,f=0;f<a.length;f++){try{var d=a[f].cssRules?a[f].cssRules:a[f].rules?a[f].rules:[]}catch(g){d=[]}for(var i=0;i<d.length;i++)if(d[i].selectorText)if(b!==""){if(d[i].selectorText.toLowerCase()==b.toLowerCase())return d[i].style}else c.push(d[i])}return c};e.fn.scRedraw=function(b){if(e.browser.msie&&e.browser.version<9){this[0]&&this[0].supCSS&&this.trigger("msieBorderRadiusHandle");b&&this.find("*").each(function(c,
a){a&&a.supCSS&&e(a).trigger("msieBorderRadiusHandle")})}return this};e.extend({styleSheet:function(b){return e(window).styleSheet(b)},intval:function(b){return parseInt(b).toString()==="NaN"?0:parseInt(b)}});var v=function(){var b=this,c=b.supCSS;!c._br_cf&&(c._br_cf=e("<v:fill/>"))&&(c._br_cf[0].type="tile");!c._br_cs&&(c._br_cs=e("<v:shape/>"))&&e.extend(c._br_cs[0].style,{left:"-1px",top:"-1px",zoom:1,position:"absolute"});!c._br_bf&&(c._br_bf=e("<v:fill/>"))&&(c._br_bf[0].type="tile");!c._br_bs&&
(c._br_bs=e("<v:shape/>"))&&e.extend(c._br_bs[0].style,{left:"-1px",top:"-1px",zoom:1,position:"absolute"});u(b);e(b).children('div[class="supCSS_borderRadius"]').length==0&&e(c._br_cs).append(function(){c._br_bgImage&&p(b);c._br_cs_dv=e('<div style="border: 0px; padding: 0px; margin: 0px; background-color: transparent; background-image: none;left: 0px; top: 0px; position: absolute; overflow: hidden;"></div>').append(c._br_cs);c._br_bs_dv=e('<div class="supCSS_borderRadius" style="border: 0px; padding: 0px; margin: 0px; background-color: transparent; background-image: none;'+
(c._br_rect.isZero()&&parseInt(e.browser.version)!=6?"display: none; ":"")+'left: 0px; top: 0px; position: absolute; overflow: hidden;"></div>').append(c._br_bs).append(c._br_cs_dv);c._br_bs.append(c._br_bf);var f=e(b).children('div[class="supCSS_boxShadow"]');f.length==0?e(b).prepend(c._br_bs_dv):e(f).after(c._br_bs_dv);m(b,"style.zIndex");return c._br_cf});c._br_bgImage||m(b,"style.backgroundImage");c._br_bgColor||m(b,"style.backgroundColor");c._br_brColor||m(b,"style.borderColor");var a=c._br_cs_rect;
c._br_bs_dv[0].style.left=a.bcx;c._br_bs_dv[0].style.top=a.bcy;c._br_bs_dv[0].style.width=a.bcw;c._br_bs_dv[0].style.height=a.bch;if(a.wb>0||a.hb>0){c._br_bs[0].fillcolor=c._br_brColor;c._br_bs[0].style.width=a.bw+"px";c._br_bs[0].style.height=a.bh+"px";c._br_bs[0].coordsize&&(c._br_bs[0].coordsize.x=a.bw);c._br_bs[0].coordsize&&(c._br_bs[0].coordsize.y=a.bh);c._br_bs[0].strokeWeight="0";c._br_bs[0].path=" m "+a.bx+","+(a.bvLT+a.bvLTl+a.by)+" l "+(a.bx+1)+","+(a.bvLT+a.by)+" qy"+(a.bhLT+a.bx)+","+
(a.by+1)+" l"+(a.bhLT+a.bhLTl+a.bx)+","+a.by+" l"+(a.bw-a.bhRT-a.bhRTl+a.bx)+","+a.by+" l"+(a.bw-a.bhRT+a.bx)+","+(a.by+1)+" qx"+(a.bw-1+a.bx)+","+(a.bvRT+a.by)+" l"+(a.bw+a.bx)+","+(a.bvRT+a.bvRTl+a.by)+" l"+(a.bw+a.bx)+","+(a.bh-a.bvRB-a.bvRBl+a.by)+" l"+(a.bw-1+a.bx)+","+(a.bh-a.bvRB+a.by)+" qy"+(a.bw-a.bhRB+a.bx)+","+(a.bh-1+a.by)+" l"+(a.bw-a.bhRB-a.bhRBl+a.bx)+","+(a.bh+a.by)+" l"+(a.bhLB-a.bhLBl+a.bx)+","+(a.bh+a.by)+" l"+(a.bhLB+a.bx)+","+(a.bh-1+a.by)+" qx"+(a.bx+1)+","+(a.bh-a.bvLB+a.by)+
" l"+a.bx+","+(a.bh-a.bvLB-a.bvLBl+a.by)+" m "+a.btx+","+(a.vLT+a.vLTl+a.bty)+" l "+(a.btx+1)+","+(a.vLT+a.bty)+" qy"+(a.hLT+a.btx)+","+(a.bty+1)+" l"+(a.hLT+a.hLTl+a.btx)+","+a.bty+" l"+(a.btw-a.hRT-a.hRTl+a.btx)+","+a.bty+" l"+(a.btw-a.hRT+a.btx)+","+(a.bty+1)+" qx"+(a.btw-1+a.btx)+","+(a.vRT+a.bty)+" l"+(a.btw+a.btx)+","+(a.vRT+a.vRTl+a.bty)+" l"+(a.btw+a.btx)+","+(a.bth-a.vRB-a.vRBl+a.bty)+" l"+(a.btw-1+a.btx)+","+(a.bth-a.vRB+a.bty)+" qy"+(a.btw-a.hRB+a.btx)+","+(a.bth-1+a.bty)+" l"+(a.btw-a.hRB-
a.hRBl+a.btx)+","+(a.bth+a.bty)+" l"+(a.hLB-a.hLBl+a.btx)+","+(a.bth+a.bty)+" l"+(a.hLB+a.btx)+","+(a.bth-1+a.bty)+" qx"+(a.btx+1)+","+(a.bth-a.vLB+a.bty)+" l"+a.btx+","+(a.bth-a.vLB-a.vLBl+a.bty)+" ns x e"}c._br_cs_dv[0].style.left=a.cx;c._br_cs_dv[0].style.top=a.cy;c._br_cs_dv[0].style.width=a.cw;c._br_cs_dv[0].style.height=a.ch;c._br_cs[0].fillcolor=c._br_bgColor;c._br_cs[0].style.width=a.w+"px";c._br_cs[0].style.height=a.h+"px";c._br_cs[0].coordsize&&(c._br_cs[0].coordsize.x=a.w);c._br_cs[0].coordsize&&
(c._br_cs[0].coordsize.y=a.h);c._br_cs[0].strokeWeight="0";c._br_cs[0].spath="m "+a.x+","+(a.vLT+a.vLTl+a.y)+" l "+(a.x+1)+","+(a.vLT+a.y)+" qy"+(a.hLT+a.x)+","+(a.y+1)+" l"+(a.hLT+a.hLTl+a.x)+","+a.y+" l"+(a.w-a.hRT-a.hRTl+a.x)+","+a.y+" l"+(a.w-a.hRT+a.x)+","+(a.y+1)+" qx"+(a.w-1+a.x)+","+(a.vRT+a.y)+" l"+(a.w+a.x)+","+(a.vRT+a.vRTl+a.y)+" l"+(a.w+a.x)+","+(a.h-a.vRB-a.vRBl+a.y)+" l"+(a.w-1+a.x)+","+(a.h-a.vRB+a.y)+" qy"+(a.w-a.hRB+a.x)+","+(a.h-1+a.y)+" l"+(a.w-a.hRB-a.hRBl+a.x)+","+(a.h+a.y)+
" l"+(a.hLB-a.hLBl+a.x)+","+(a.h+a.y)+" l"+(a.hLB+a.x)+","+(a.h-1+a.y)+" qx"+(a.x+1)+","+(a.h-a.vLB+a.y)+" l"+a.x+","+(a.h-a.vLB-a.vLBl+a.y)+" "+((!c._br_bgColor||c._br_bgColor===""||c._br_bgColor==="transparent")&&(!c._br_bgImage||c._br_bgImage===""||c._br_bgImage==="none")?" nf ":"")+"ns x e";c._br_cs[0].path=c._br_cs[0].spath};if(e.browser.msie&&e.browser.version<9){var w=function(b){for(var c="",a=["borderColor","borderLeftColor","borderTopColor","borderRightColor","borderBottomColor"],f=0;f<
a.length;f++)if(b.currentStyle[a[f]]!=""){c=b.currentStyle[a[f]];break}return c==""?"transparent":c},j=function(b,c,a){b.style[c]=a;return true},m=function(b,c){var a=c.split("."),f=a.shift(),d=b.supCSS,g=b.style;if(f=="style"){a=a.shift();switch(e.inArray(a,["borderRadius","border-radius","borderTopLeftRadius","border-top-left-radius","borderTopRightRadius","border-top-right-radius","borderBottomRightRadius","border-bottom-right-radius","borderBottomLeftRadius","border-bottom-left-radius","boxShadow",
"box-shadow","zIndex","backgroundColor","backgroundImage","backgroundPosition","backgroundPositionX","backgroundPositionY","borderWidth","borderLeftWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderColor","borderLeftColor","borderTopColor","borderRightColor","borderBottomColor"])){case 0:if(!d._br_handler){e(b).bind("msieBorderRadiusHandle",v);d._br_handler=true;r(b)}d._br_rect=l(g.borderRadius,d);j(b,"borderTopLeftRadius",d._br_rect.hLeftTop+" "+d._br_rect.vLeftTop);j(b,"borderTopRightRadius",
d._br_rect.hRightTop+" "+d._br_rect.vRightTop);j(b,"borderBottomRightRadius",d._br_rect.hRightBottom+" "+d._br_rect.vRightBottom);j(b,"borderBottomLeftRadius",d._br_rect.hLeftBottom+" "+d._br_rect.vLeftBottom);if(d._br_rect.regenarated){if(parseInt(e.browser.version)>6)if(d._br_bs_dv)if(d._br_rect.isZero()){d._br_bs_dv[0].style.display="none";j(b,"backgroundImage","url("+d._br_bgImage+")");j(b,"backgroundColor",d._br_bgColor);j(b,"borderColor",d._br_brColor);break}else if(d._br_bs_dv[0].style.display==
"none"){j(b,"backgroundImage","");j(b,"backgroundColor","transparent");j(b,"borderColor","transparent");d._br_bs_dv[0].style.display="block"}e(b).trigger("msieBorderRadiusHandle")}break;case 1:g.borderRadius=g[a];break;case 2:case 3:j(b,"borderTopLeftRadius",g[a]);a=g[a].split(" ");!d._br_rect&&(d._br_rect=l("0px"));g.borderRadius=d._br_rect.set("hLeftTop",a[0]).set("vLeftTop",a.length>1?a[1]:a[0]).toString();break;case 4:case 5:j(b,"borderTopRightRadius",g[a]);a=g[a].split(" ");!d._br_rect&&(d._br_rect=
l("0px"));g.borderRadius=d._br_rect.set("hRightTop",a[0]).set("vRightTop",a.length>1?a[1]:a[0]).toString();break;case 6:case 7:j(b,"borderBottomRightRadius",g[a]);a=g[a].split(" ");!d._br_rect&&(d._br_rect=l("0px"));g.borderRadius=d._br_rect.set("hRightBottom",a[0]).set("vRightBottom",a.length>1?a[1]:a[0]).toString();break;case 8:case 9:j(b,"borderBottomLeftRadius",g[a]);a=g[a].split(" ");!d._br_rect&&(d._br_rect=l("0px"));g.borderRadius=d._br_rect.set("hLeftBottom",a[0]).set("vLeftBottom",a.length>
1?a[1]:a[0]).toString();break;case 12:j(b,"zIndex",e.intval(g.zIndex));d._br_bs_dv&&(d._br_bs_dv[0].style.zIndex=g.zIndex-1);break;case 13:d._br_handler&&(d._br_bgColor=b.currentStyle.backgroundColor)&&d._br_bs_dv&&d._br_bs_dv[0].style.display!="none"&&j(b,"backgroundColor","transparent");d._br_cf&&(d._br_cf[0].color=d._br_bgColor);break;case 14:a=g.backgroundImage;if(!d._br_bgImage&&g.backgroundImage=="")a=b.currentStyle.backgroundImage;a=a.replace(/^url\((.+)\)$/,"$1").replace(/["']+/g,"");if(d._br_handler&&
d._br_bgImage!=a)if(a===""||a==="none")delete d._br_bgImage;else{var i=new Image;i.self=b;i.onerror=function(){delete this.self.supCSS._br_bgImage};i.onload=function(){this.self.supCSS._br_bgImage_size={w:i.width,h:i.height};this.self.supCSS._br_bgImage=this.src;this.self.supCSS._br_cf&&(this.self.supCSS._br_cf[0].src=this.src);this.self.supCSS._br_cf&&p(b);this.self.supCSS._br_cf&&this.self.supCSS._br_cs&&this.self.supCSS._br_cs[0].spath&&(this.self.supCSS._br_cs[0].path=this.self.supCSS._br_cs[0].spath.toString().replace(/\snf\s/,
""));this.self.supCSS._br_cf&&this.self.supCSS._br_bs_dv[0].style.display!="none"&&j(this.self,"backgroundImage","none")};i.src=a}break;case 15:case 16:case 17:p(b);break;case 18:case 19:case 20:case 21:case 22:r(b,a);break;case 23:case 24:case 25:case 26:case 27:d._br_handler&&(a=="borderColor"&&(d._br_brColor=w(b))||(d._br_brColor=g[a]));d._br_bs_dv&&d._br_bs_dv[0].style.display!="none"&&j(b,"borderColor","transparent");d._br_bf&&(d._br_bf[0].color=d._br_brColor)}}else if(f=="innerHTML")d._br_handler&&
(!d._br_rect.isZero()||parseInt(e.browser.version)==6)&&e(b).trigger("msieBorderRadiusHandle")},s=function(){if(arguments.caller.callee!=j){var b=window.event,c=b.srcElement;b.propertyName!="onpropertychange"&&m(c,b.propertyName)}},o=function(b){if(b)if(!b.supCSS){if(e.inArray(b.currentStyle.position.toLowerCase(),["absolute","fixed"])==-1)b.style.position="relative";b.style.zoom=1;b.supCSS={};e(b).resize(function(){this.supCSS._br_handler&&this.supCSS._br_rect&&(!this.supCSS._br_rect.isZero()||parseInt(e.browser.version)==
6)&&e(this).trigger("msieBorderRadiusHandle");this.supCSS._bs_handler&&e(this).trigger("msieBoxShadowHandle")});if(b.addEventListener)b.addEventListener("propertychange",s,false);else b.attachEvent&&b.attachEvent("onpropertychange",s)}};e.cssHooks.borderRadius={get:function(b){var c=null;if(b.style["border-radius"])c=b.style["border-radius"];else for(var a=b.className.split(" ");a.length>0;){var f=e.trim(a.pop());if((sheet=e(b).styleSheet("."+f))!==null)if(sheet["border-radius"]){c=sheet["border-radius"];
break}}return c==null?"":c},set:function(b,c){o(b);b.style.borderRadius=c}};e.each(["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],function(b,c){e.cssHooks[c]={get:function(a){return a.style[c]?a.style[c]:""},set:function(a,f){o(a);a.style[c]=f}}});e.fn.append=function(){return this.domManip(arguments,true,function(b){if(this.nodeType===1){this.appendChild(b);if(b&&b.style&&b.style.borderRadius)b.style.borderRadius=b.style.borderRadius}})};e.fn.prepend=
function(){return this.domManip(arguments,true,function(b){if(this.nodeType===1){this.insertBefore(b,this.firstChild);if(b&&b.style&&b.style.borderRadius)b.style.borderRadius=b.style.borderRadius}})};e.fn.before=function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(c){this.parentNode.insertBefore(c,this);if(c&&c.style&&c.style.borderRadius)c.style.borderRadius=c.style.borderRadius});else if(arguments.length){var b=e(arguments[0]);b.push.apply(b,this.toArray());return this.pushStack(b,
"before",arguments)}};e.fn.after=function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(c){this.parentNode.insertBefore(c,this.nextSibling);if(c&&c.style&&c.style.borderRadius)c.style.borderRadius=c.style.borderRadius});else if(arguments.length){var b=this.pushStack(this,"after",arguments);b.push.apply(b,e(arguments[0]).toArray());return b}};e(document).ready(function(){function b(f){var d=l("0px");e.each(f.split(";"),function(g,i){var k=e.trim(i);if(k!=""){var h=
k.split(":");k=e.trim(h.shift()).toLowerCase();h=e.trim(h.length>0?h.shift():"");switch(e.inArray(k,["border-radius","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius"])){case 0:d=l(h);break;case 1:h=h.split(" ");d.set("hLeftTop",h[0]).set("vLeftTop",h.length>1?h[1]:h[0]);break;case 2:h=h.split(" ");d.set("hRightTop",h[0]).set("vRightTop",h.length>1?h[1]:h[0]);break;case 3:h=h.split(" ");d.set("hRightBottom",h[0]).set("vRightBottom",h.length>
1?h[1]:h[0]);break;case 4:h=h.split(" ");d.set("hLeftBottom",h[0]).set("vLeftBottom",h.length>1?h[1]:h[0])}}});return d}function c(f,d){var g=null,i="";e(f).each(function(){if(!this.supCSS)if(this.style.borderRadius){o(this);this.style.borderRadius=this.style.borderRadius}else{if(!g){if(d)i=d.style.cssText;else if((sheet=e.styleSheet(f))!==null)i=sheet.cssText;g=b(i);if(g.isZero())g=true}if(g!==true){o(this);this.style.borderRadius=g.toString()}}})}try{document.namespaces.v||document.namespaces.add("v",
"urn:schemas-microsoft-com:vml")}catch(a){}if(document.v_shape_stylesheet==t){document.v_shape_stylesheet=document.createStyleSheet();document.v_shape_stylesheet.addRule("v\\:shape","behavior: url(#default#VML); display: block;");document.v_shape_stylesheet.addRule("v\\:fill","behavior: url(#default#VML);")}e.find.selectors.filters["border-radius"]=function(f){if(f.style["border-radius"]||f.style["border-top-left-radius"]||f.style["border-top-right-radius"]||f.style["border-bottom-right-radius"]||
f.style["border-bottom-left-radius"]){var d=b(f.style.cssText);f.style.borderRadius=d.toString();return true}return false};e.each(e.styleSheet(),function(f,d){if(d.style["border-radius"]||d.style["border-top-left-radius"]||d.style["border-top-right-radius"]||d.style["border-bottom-right-radius"]||d.style["border-bottom-left-radius"])c(d.selectorText,d)});c(":border-radius")})}else e(document).ready(function(){var b=document.createElement("div");e.support.borderRadius=b.style.WebkitBorderRadius===
""?"WebkitBorderRadius":b.style.MozBorderRadius===""?"MozBorderRadius":b.style.borderRadius===""?"borderRadius":false;if(e.support.borderRadius&&e.support.borderRadius!=="borderRadius")e.cssHooks.borderRadius={get:function(c){return e.css(c,e.support.borderRadius)},set:function(c,a){c.style[e.support.borderRadius]=a}}})})(jQuery);

