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