(function(C){var E=(function(){var H=document.createElement("div");try{H.style.setExpression("width","0+0")}catch(G){return false}return true})();function D(G,H){return parseInt(C.css(G,H))||0}function B(G){var G=parseInt(G).toString(16);return(G.length<2)?"0"+G:G}function F(I){for(;I&&I.nodeName.toLowerCase()!="html";I=I.parentNode){var G=C.css(I,"backgroundColor");if(G.indexOf("rgb")>=0){if(C.browser.safari&&G=="rgba(0, 0, 0, 0)"){continue}var H=G.match(/\d+/g);return"#"+B(H[0])+B(H[1])+B(H[2])}if(G&&G!="transparent"){return G}}return"#ffffff"}function A(I,G,H){switch(I){case"round":return Math.round(H*(1-Math.cos(Math.asin(G/H))));case"cool":return Math.round(H*(1+Math.cos(Math.asin(G/H))));case"sharp":return Math.round(H*(1-Math.cos(Math.acos(G/H))));case"bite":return Math.round(H*(Math.cos(Math.asin((H-G-1)/H))));case"slide":return Math.round(H*(Math.atan2(G,H/G)));case"jut":return Math.round(H*(Math.atan2(H,(H-G-1))));case"curl":return Math.round(H*(Math.atan(G)));case"tear":return Math.round(H*(Math.cos(G)));case"wicked":return Math.round(H*(Math.tan(G)));case"long":return Math.round(H*(Math.sqrt(G)));case"sculpt":return Math.round(H*(Math.log((H-G-1),H)));case"dog":return(G&1)?(G+1):H;case"dog2":return(G&2)?(G+1):H;case"dog3":return(G&3)?(G+1):H;case"fray":return(G%2)*H;case"notch":return H;case"bevel":return G+1}}C.fn.corner=function(K){if(this.length==0){if(!C.isReady&&this.selector){var R=this.selector,O=this.context;C(function(){C(R,O).corner(K)})}return this}K=(K||"").toLowerCase();var H=/keep/.test(K);var L=((K.match(/cc:(#[0-9a-f]+)/)||[])[1]);var P=((K.match(/sc:(#[0-9a-f]+)/)||[])[1]);var J=parseInt((K.match(/(\d+)px/)||[])[1])||10;var Q=/round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/;var M=((K.match(Q)||["round"])[0]);var N={T:0,B:1};var G={TL:/top|tl/.test(K),TR:/top|tr/.test(K),BL:/bottom|bl/.test(K),BR:/bottom|br/.test(K)};if(!G.TL&&!G.TR&&!G.BL&&!G.BR){G={TL:1,TR:1,BL:1,BR:1}}var I=document.createElement("div");I.style.overflow="hidden";I.style.height="1px";I.style.backgroundColor=P||"transparent";I.style.borderStyle="solid";return this.each(function(W){var T={T:parseInt(C.css(this,"paddingTop"))||0,R:parseInt(C.css(this,"paddingRight"))||0,B:parseInt(C.css(this,"paddingBottom"))||0,L:parseInt(C.css(this,"paddingLeft"))||0};if(typeof this.style.zoom!=undefined){this.style.zoom=1}if(!H){this.style.border="none"}I.style.borderColor=L||F(this.parentNode);var Y=C.curCSS(this,"height");for(var U in N){var Z=N[U];if((Z&&(G.BL||G.BR))||(!Z&&(G.TL||G.TR))){I.style.borderStyle="none "+(G[U+"R"]?"solid":"none")+" none "+(G[U+"L"]?"solid":"none");var a=document.createElement("div");C(a).addClass("jquery-corner");var S=a.style;Z?this.appendChild(a):this.insertBefore(a,this.firstChild);if(Z&&Y!="auto"){if(C.css(this,"position")=="static"){this.style.position="relative"}S.position="absolute";S.bottom=S.left=S.padding=S.margin="0";if(E){S.setExpression("width","this.parentNode.offsetWidth")}else{S.width="100%"}}else{if(!Z&&C.browser.msie){if(C.css(this,"position")=="static"){this.style.position="relative"}S.position="absolute";S.top=S.left=S.right=S.padding=S.margin="0";if(E){var b=D(this,"borderLeftWidth")+D(this,"borderRightWidth");S.setExpression("width","this.parentNode.offsetWidth - "+b+'+ "px"')}else{S.width="100%"}}else{S.margin=!Z?"-"+T.T+"px -"+T.R+"px "+(T.T-J)+"px -"+T.L+"px":(T.B-J)+"px -"+T.R+"px -"+T.B+"px -"+T.L+"px"}}for(var V=0;V<J;V++){var c=Math.max(0,A(M,V,J));var X=I.cloneNode(false);X.style.borderWidth="0 "+(G[U+"R"]?c:0)+"px 0 "+(G[U+"L"]?c:0)+"px";Z?a.appendChild(X):a.insertBefore(X,a.firstChild)}}}})};C.fn.uncorner=function(){return C(".jquery-corner",this).remove()}})(jQuery);