var DD_roundies={ns:"DD_roundies",IE6:!1,IE7:!1,IE8:!1,IEversion:function(){if(8!=document.documentMode&&document.namespaces&&!document.namespaces[this.ns])this.IE7=this.IE6=!0;else if(8==document.documentMode)this.IE8=!0},querySelector:document.querySelectorAll,selectorsToProcess:[],imgSize:{},createVmlNameSpace:function(){(this.IE6||this.IE7)&&document.namespaces.add(this.ns,"urn:schemas-microsoft-com:vml");this.IE8&&document.writeln('<?import namespace="'+this.ns+'" implementation="#default#VML" ?>')},
createVmlStyleSheet:function(){var a=document.createElement("style");document.documentElement.firstChild.insertBefore(a,document.documentElement.firstChild.firstChild);if(a.styleSheet)try{var c=a.styleSheet;c.addRule(this.ns+"\\:*","{behavior:url(#default#VML)}");this.styleSheet=c}catch(d){}else this.styleSheet=a},addRule:function(a,c,d){if("undefined"==typeof c||null===c)c=0;-1==c.constructor.toString().search("Array")&&(c=c.toString().replace(/[^0-9 ]/g,"").split(" "));for(var b=0;4>b;b++)c[b]=
!c[b]&&0!==c[b]?c[Math.max(b-2,0)]:c[b];if(this.styleSheet)if(this.styleSheet.addRule){a=a.split(",");for(b=0;b<a.length;b++)this.styleSheet.addRule(a[b],"behavior:expression(DD_roundies.roundify.call(this, ["+c.join(",")+"]))")}else d&&(b=c.join("px ")+"px",this.styleSheet.appendChild(document.createTextNode(a+" {border-radius:"+b+"; -moz-border-radius:"+b+";}")),this.styleSheet.appendChild(document.createTextNode(a+" {-webkit-border-top-left-radius:"+c[0]+"px "+c[0]+"px; -webkit-border-top-right-radius:"+
c[1]+"px "+c[1]+"px; -webkit-border-bottom-right-radius:"+c[2]+"px "+c[2]+"px; -webkit-border-bottom-left-radius:"+c[3]+"px "+c[3]+"px;}")));else this.IE8&&this.selectorsToProcess.push({selector:a,radii:c})},readPropertyChanges:function(a){switch(event.propertyName){case "style.border":case "style.borderWidth":case "style.padding":this.applyVML(a);break;case "style.borderColor":this.vmlStrokeColor(a);break;case "style.backgroundColor":case "style.backgroundPosition":case "style.backgroundRepeat":this.applyVML(a);
break;case "style.display":a.vmlBox.style.display="none"==a.style.display?"none":"block";break;case "style.filter":this.vmlOpacity(a);break;case "style.zIndex":a.vmlBox.style.zIndex=a.style.zIndex}},applyVML:function(a){a.runtimeStyle.cssText="";this.vmlFill(a);this.vmlStrokeColor(a);this.vmlStrokeWeight(a);this.vmlOffsets(a);this.vmlPath(a);this.nixBorder(a);this.vmlOpacity(a)},vmlOpacity:function(a){if(-1!=a.currentStyle.filter.search("lpha")){var c=a.currentStyle.filter,c=parseInt(c.substring(c.lastIndexOf("=")+
1,c.lastIndexOf(")")),10)/100,d;for(d in a.vml)a.vml[d].filler.opacity=c}},vmlFill:function(a){if(a.currentStyle){var c=a.currentStyle;a.runtimeStyle.backgroundColor="";a.runtimeStyle.backgroundImage="";var d="transparent"==c.backgroundColor,b=!0;if("none"!=c.backgroundImage||a.isImg){a.isImg?a.vmlBg=a.src:(a.vmlBg=c.backgroundImage,a.vmlBg=a.vmlBg.substr(5,a.vmlBg.lastIndexOf('")')-5));var f=this;if(!f.imgSize[a.vmlBg])b=document.createElement("img"),b.attachEvent("onload",function(){this.width=
this.offsetWidth;this.height=this.offsetHeight;f.vmlOffsets(a)}),b.className=f.ns+"_sizeFinder",b.runtimeStyle.cssText="behavior:none; position:absolute; top:-10000px; left:-10000px; border:none;",b.src=a.vmlBg,b.removeAttribute("width"),b.removeAttribute("height"),document.body.insertBefore(b,document.body.firstChild),f.imgSize[a.vmlBg]=b;a.vml.image.filler.src=a.vmlBg;b=!1}a.vml.image.filled=!b;a.vml.image.fillcolor="none";a.vml.color.filled=!d;a.vml.color.fillcolor=c.backgroundColor;a.runtimeStyle.backgroundImage=
"none";a.runtimeStyle.backgroundColor="transparent"}},vmlStrokeColor:function(a){a.vml.stroke.fillcolor=a.currentStyle.borderColor},vmlStrokeWeight:function(a){var c=["Top","Right","Bottom","Left"];a.bW={};for(var d=0;4>d;d++)a.bW[c[d]]=parseInt(a.currentStyle["border"+c[d]+"Width"],10)||0},vmlOffsets:function(a){for(var c=["Left","Top","Width","Height"],d=0;4>d;d++)a.dim[c[d]]=a["offset"+c[d]];var c=function(b,c){b.style.left=(c?0:a.dim.Left)+"px";b.style.top=(c?0:a.dim.Top)+"px";b.style.width=a.dim.Width+
"px";b.style.height=a.dim.Height+"px"},b;for(b in a.vml)d="image"==b?1:2,a.vml[b].coordsize=a.dim.Width*d+", "+a.dim.Height*d,c(a.vml[b],!0);c(a.vmlBox,!1);if(DD_roundies.IE8)a.vml.stroke.style.margin="-1px","undefined"==typeof a.bW&&this.vmlStrokeWeight(a),a.vml.color.style.margin=a.bW.Top-1+"px "+(a.bW.Left-1)+"px"},vmlPath:function(a){var c=function(a,b,c,d,e,f,k){for(var i=a?"m,qy,l,qx,l,qy,l,qx,l".split(","):"qx,l,qy,l,qx,l,qy,l,m".split(","),e=e*k,f=f*k,b=b*k,c=c*k,d=d.slice(),j=0;4>j;j++)d[j]*=
k,d[j]=Math.min(b/2,c/2,d[j]);b=[i[0]+Math.floor(0+e)+","+Math.floor(d[0]+f),i[1]+Math.floor(d[0]+e)+","+Math.floor(0+f),i[2]+Math.ceil(b-d[1]+e)+","+Math.floor(0+f),i[3]+Math.ceil(b+e)+","+Math.floor(d[1]+f),i[4]+Math.ceil(b+e)+","+Math.ceil(c-d[2]+f),i[5]+Math.ceil(b-d[2]+e)+","+Math.ceil(c+f),i[6]+Math.floor(d[3]+e)+","+Math.ceil(c+f),i[7]+Math.floor(0+e)+","+Math.ceil(c-d[3]+f),i[8]+Math.floor(0+e)+","+Math.floor(d[0]+f)];a||b.reverse();return b.join("")};"undefined"==typeof a.bW&&this.vmlStrokeWeight(a);
var d=a.bW,b=a.DD_radii.slice(),f=c(!0,a.dim.Width,a.dim.Height,b,0,0,2);b[0]-=Math.max(d.Left,d.Top);b[1]-=Math.max(d.Top,d.Right);b[2]-=Math.max(d.Right,d.Bottom);b[3]-=Math.max(d.Bottom,d.Left);for(var e=0;4>e;e++)b[e]=Math.max(b[e],0);e=c(!1,a.dim.Width-d.Left-d.Right,a.dim.Height-d.Top-d.Bottom,b,d.Left,d.Top,2);c=c(!0,a.dim.Width-d.Left-d.Right+1,a.dim.Height-d.Top-d.Bottom+1,b,d.Left,d.Top,1);a.vml.color.path=e;a.vml.image.path=c;a.vml.stroke.path=f+e;this.clipImage(a)},nixBorder:function(a){for(var c=
a.currentStyle,d=["Top","Left","Right","Bottom"],b=0;4>b;b++)a.runtimeStyle["padding"+d[b]]=(parseInt(c["padding"+d[b]],10)||0)+(parseInt(c["border"+d[b]+"Width"],10)||0)+"px";a.runtimeStyle.border="none"},clipImage:function(a){var c=DD_roundies;if(a.vmlBg&&c.imgSize[a.vmlBg]){var d=a.currentStyle,b={X:0,Y:0},f;for(f in b){var e=f,g=d["backgroundPosition"+f],h=!0;switch(g){case "left":case "top":b[e]=0;break;case "center":b[e]=0.5;break;case "right":case "bottom":b[e]=1;break;default:-1!=g.search("%")?
b[e]=0.01*parseInt(g,10):h=!1}var l="X"==e;b[e]=Math.ceil(h?(a.dim[l?"Width":"Height"]-(a.bW[l?"Left":"Top"]+a.bW[l?"Right":"Bottom"]))*b[e]-c.imgSize[a.vmlBg][l?"width":"height"]*b[e]:parseInt(g,10));b[e]+=1}a.vml.image.filler.position=b.X/(a.dim.Width-a.bW.Left-a.bW.Right+1)+","+b.Y/(a.dim.Height-a.bW.Top-a.bW.Bottom+1);e=d.backgroundRepeat;d={T:1,R:a.dim.Width+1,B:a.dim.Height+1,L:1};f={X:{b1:"L",b2:"R",d:"Width"},Y:{b1:"T",b2:"B",d:"Height"}};if("repeat"!=e&&(d={T:b.Y,R:b.X+c.imgSize[a.vmlBg].width,
B:b.Y+c.imgSize[a.vmlBg].height,L:b.X},-1!=e.search("repeat-")&&(c=e.split("repeat-")[1].toUpperCase(),d[f[c].b1]=1,d[f[c].b2]=a.dim[f[c].d]+1),d.B>a.dim.Height))d.B=a.dim.Height+1;a.vml.image.style.clip="rect("+d.T+"px "+d.R+"px "+d.B+"px "+d.L+"px)"}},pseudoClass:function(a){var c=this;setTimeout(function(){c.applyVML(a)},1)},reposition:function(a){this.vmlOffsets(a);this.vmlPath(a)},roundify:function(a){this.style.behavior="none";if(this.currentStyle){var c=this.currentStyle;if(!1!=={BODY:!1,TABLE:!1,
TR:!1,TD:!1,SELECT:!1,OPTION:!1,TEXTAREA:!1}[this.nodeName]){var d=this,b=DD_roundies;this.DD_radii=a;this.dim={};var f={resize:"reposition",move:"reposition"};if("A"==this.nodeName){var a={mouseleave:"pseudoClass",mouseenter:"pseudoClass",focus:"pseudoClass",blur:"pseudoClass"},e;for(e in a)f[e]=a[e]}for(var g in f)this.attachEvent("on"+g,function(){b[f[g]](d)});this.attachEvent("onpropertychange",function(){b.readPropertyChanges(d)});e=function(a){a.style.zoom=1;if("static"==a.currentStyle.position)a.style.position=
"relative"};e(this.offsetParent);e(this);this.vmlBox=document.createElement("ignore");this.vmlBox.runtimeStyle.cssText="behavior:none; position:absolute; margin:0; padding:0; border:0; background:none;";this.vmlBox.style.zIndex=c.zIndex;this.vml={color:!0,image:!0,stroke:!0};for(var h in this.vml)this.vml[h]=document.createElement(b.ns+":shape"),this.vml[h].filler=document.createElement(b.ns+":fill"),this.vml[h].appendChild(this.vml[h].filler),this.vml[h].stroked=!1,this.vml[h].style.position="absolute",
this.vml[h].style.zIndex=c.zIndex,this.vml[h].coordorigin="1,1",this.vmlBox.appendChild(this.vml[h]);this.vml.image.fillcolor="none";this.vml.image.filler.type="tile";this.parentNode.insertBefore(this.vmlBox,this);this.isImg=!1;if("IMG"==this.nodeName)this.isImg=!0,this.style.visibility="hidden";setTimeout(function(){b.applyVML(d)},1)}}}};try{document.execCommand("BackgroundImageCache",!1,!0)}catch(err$$1){}DD_roundies.IEversion();DD_roundies.createVmlNameSpace();DD_roundies.createVmlStyleSheet();
DD_roundies.IE8&&document.attachEvent&&DD_roundies.querySelector&&document.attachEvent("onreadystatechange",function(){if("complete"==document.readyState)for(var a=DD_roundies.selectorsToProcess,c=a.length,d=function(a,b,c){setTimeout(function(){DD_roundies.roundify.call(a,b)},100*c)},b=0;b<c;b++)for(var f=document.querySelectorAll(a[b].selector),e=f.length,g=0;g<e;g++)"INPUT"!=f[g].nodeName&&d(f[g],a[b].radii,g)});

