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