

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