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