var rocon=function(){var H,y,n,Q,R,o;function I(){if(!J&&(J=true,z.length)){for(var a=0;a<z.length;a++)z[a].call(document);z=null}}function D(a){z.push(a)}function i(a,c,b){if(b)for(var b=0,d=a.length;b<d;b++){if(c.call(a[b],b)===false)break}else for(b=a.length-1;b>=0;b--)if(c.call(a[b],b)===false)break}function S(a,c){for(var b=[],d=0,h=a.length;d<h;d++){var s=c(a[d],d);s!=null&&(b[b.length]=s)}return b.concat.apply([],b)}function t(){}function A(a){function c(a){a=parseInt(a,10).toString(16);return a.length==
1?a+a:a}function b(a){return c(Math.round(a*2.55))}var d;if(d=/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/.exec(a))return"#"+c(d[1])+c(d[2])+c(d[3]);if(d=/rgb\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*\)/.exec(a))return"#"+b(d[1])+b(d[2])+b(d[3]);if(d=/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/i.exec(a))return"#"+d[1]+d[2]+d[3];if(d=/#([a-f0-9])([a-f0-9])([a-f0-9])/i.exec(a))return"#"+d[1]+d[1]+d[2]+d[2]+d[3]+d[3];b=c=null;return a}function x(a,c){var b=document.createElement(a);
if(c)b.className=c;return b}function T(a,c){var b;return a.nodeType==1&&RegExp("\\b"+c+"\\b").test(a.className||"")}function v(a,c){var b,d={},h=function(a,b){return b.toUpperCase()};i(c instanceof Array?c:[c],function(){var c=this.replace(/\-(\w)/g,h);a.style[c]?d[c]=a.style[c]:H?d[c]=a.currentStyle[c]:document.defaultView&&document.defaultView.getComputedStyle&&(b||(b=document.defaultView.getComputedStyle(a,"")),d[c]=b&&b.getPropertyValue(this))});return c instanceof Array?d:d[c.replace(/\-(\w)/g,
h)]}function K(a){a=(a||"").split("_");switch(a.length){case 1:return[a[0],a[0],a[0],a[0]];case 2:return[a[0],a[1],a[0],a[1]];case 3:return[a[0],a[1],a[2],a[1]];case 4:return a}return null}function L(a){var c=a.className,b=null;i(U,function(){if(typeof this.rule=="string"&&c.indexOf(this.rule)!=-1||c.search(this.rule)!=-1)return b=this,false},true);return b}function e(a,c){q.insertRule(a+" {"+c+"}",q.cssRules.length)}function M(a,c){var b=(a.className||"").replace(RegExp("\\s*"+f+"[-_].+?\\b","ig"),
"");c&&(b+=" "+c);a.className=b;return a}function N(){if(!q)if(document.createStyleSheet)q=document.createStyleSheet();else{var a=x("style");a.rel="rocon";document.getElementsByTagName("head")[0].appendChild(a);i(document.styleSheets,function(){if(this.ownerNode.rel=="rocon")return q=this,false})}return q}function ca(a){var c=[],b;i((a||document).getElementsByTagName("*"),function(){(b=E.exec(this.className||""))&&c.push({node:this,radius:parseInt(b[1],10)})});return c}function V(a){a=ca(a);a.length&&
(N(),i(a,function(){t(this.node,this.radius)}))}function W(a,c){var b=a.className||"",c=c||parseInt(b.match(E)[1],10),b=da.test(b),d=L(a),h="";(d=d?d.border_width:parseInt(v(a,"border-left-width"))||0)&&(h=A(v(a,"border-left-color")||"#000"));return{radius:c,bg_color:w(a,b),border_width:d>c?c:d,real_border_width:d,border_color:h,use_shape:b}}function F(a,c){i(a,function(){i(this instanceof Array?this:[this],c)})}function X(a){var c={},b;for(b in a)a.hasOwnProperty(b)&&(c[b]=a[b]);return c}function Y(a,
c,b){var d=v(a,["padding-top","padding-bottom","margin-top","margin-bottom"]),a=Math.max((parseInt(d.paddingTop,10)||0)-b.radius+b.border_width,0),h=Math.max((parseInt(d.paddingBottom,10)||0)-b.radius+b.border_width,0),s=(parseInt(d.marginTop,10)||0)+b.radius,d=(parseInt(d.marginBottom,10)||0)+b.radius,b=b.real_border_width-b.border_width;e("."+c,"border-top-width:"+b+"px;border-bottom-width:"+b+"px;padding-top:"+a+"px;padding-bottom:"+h+"px;margin-top:"+s+"px;margin-bottom:"+d+"px")}var E=/\brc(\d+)\b/,
da=/\brc-shape\b/,f="rocon",U=[],B={update:function(){},bindProperties:function(){var a=1;return function(c,b,d){U.push({id:a++,rule:c,bg:S(K(b),function(a){a.charAt(0)!="#"&&(a="#"+a);return A(a)}),border_width:d||0})}}(),process:function(a){V(a)}},q=null,r={},z=[],J=false,Z=false;o=navigator.userAgent.toLowerCase();var G={};y=(o.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1];n=/webkit/.test(o);Q=/opera/.test(o);H=/msie/.test(o)&&!/opera/.test(o);R=/mozilla/.test(o)&&!/(compatible|webkit)/.test(o);
o=(o.match(/.+(?:on)[\/: ]([\d.]+)/)||[])[1];var w=function(){function a(a){var c;do{if(a.nodeType!=1)break;if(a.rocon_bg)return a.rocon_bg;else if(b.push(a),c=v(a,"background-color"),c!="transparent")return A(c)}while(a=a.parentNode);return d}function c(a){var b;do{if(a.nodeType!=1)break;b=v(a,"background-color");if(b!="transparent")return A(b)}while(a=a.parentNode);return d}var b=[],d="#ffffff";return function(d,s){var g=null,e=/\brcbg([a-f0-9_]+)\b/i.exec(d.className);if(e)return g=S(K(e[1]),function(a){return A("#"+
a)});if(e=L(d))return e.bg;if(!s)d=d.parentNode;w.use_cache?(b=[],g=a(d),i(b,function(){this.rocon_bg=g;w.processed_elems.push(this)}),b=null):g=c(d);return K(g)}}();w.use_cache=true;w.processed_elems=[];D(V);D(function(){i(w.processed_elems,function(){this.removeAttribute("rocon_bg")});w.use_cache=false});(function(){Z||(Z=true,document.addEventListener?document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);I()},false):document.attachEvent&&
(document.attachEvent("onreadystatechange",function(){document.readyState==="complete"&&(document.detachEvent("onreadystatechange",arguments.callee),I())}),document.documentElement.doScroll&&!window.frameElement&&function(){if(!J){try{document.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}I()}}()))})();if(n)t=function(a,c){var b=".rc"+c;G[b]||(e(b,"-webkit-border-radius:"+c+"px; -khtml-border-radius:"+c),G[b]=true)},B.update=function(){F(arguments,function(){var a=
E.exec(this.className||"");a&&t(this,parseInt(a[1]))})};if(R)t=function(a,c){var b=".rc"+c;G[b]||(e(b,"-moz-border-radius:"+c+"px"),G[b]=true)},B.update=function(){F(arguments,function(){var a=E.exec(this.className||"");a&&t(this,parseInt(a[1]))})};if(Q&&o<11.5){N();e("."+f,"position:absolute;background-repeat:no-repeat;z-index:1;display:none");e("."+f+"-init","position:relative;");e("."+f+"-init>."+f,"display:inline-block;");e("."+f+"-tl","top:0;left:0;background-position:100% 100%;");e("."+f+"-tr",
"top:0;right:0;background-position:0 100%;");e("."+f+"-bl","bottom:0;left:0;background-position:100% 0;");e("."+f+"-br","bottom:0;right:0;");var O=x("canvas"),$=function(a){a.border_width=a.border_width>a.radius?a.radius:a.border_width;a.border_width>1&&(a.radius-=a.border_width/2);var c=a.radius*2+a.border_width,b=c;a.use_shape&&(c=2E3,a.border_width<a.real_border_width&&(b+=(a.real_border_width-a.border_width)*2));a.border_width==1&&(c--,b--);O.width=a.width=c;O.height=a.height=b;var d=O.getContext("2d");
d.strokeStyle=a.border_color;d.lineWidth=a.border_width;d.lineJoin="miter";d.lineCap="square";d.fillStyle=a.bg_color[0];d.clearRect(0,0,c,b);return d},aa=function(a,c){var b=Math.PI/2,d=c.radius*2+(c.border_width>1?c.border_width:0);a.beginPath();a.arc(0,0,c.radius,b,0,true);a.stroke();a.beginPath();a.arc(d,0,c.radius,b*2,b,true);a.stroke();a.beginPath();a.arc(d,d,c.radius,-b,b*2,true);a.stroke();a.beginPath();a.arc(0,d,c.radius,0,-b,true);a.stroke()},ea=function(a){var a=X(a),c=$(a),b=Math.PI*2,
d=a.border_width,h=a.radius*2+(d>1?d:0),e=0,g=a.border_width<a.real_border_width,f=function(d,g){c.beginPath();c.arc(d,g,a.radius,0,b,true);c.closePath();c.fill()};g&&(e=a.real_border_width-a.border_width,c.save(),c.translate(0,e));f(0,0);f(h,0);f(h,h);f(0,h);c.fillRect(h,0,a.width,a.height);if(d&&(aa(c,a),c.fillStyle=c.strokeStyle,c.fillRect(h,a.radius-(d>1?d/2:d),a.width,d*2),g))c.restore(),c.fillStyle=a.border_color,c.fillRect(0,0,a.width,e),c.fillRect(0,a.height-e,a.width,e),c.fillStyle=a.bg_color;
return c.canvas.toDataURL()},fa=function(a,c){var b;b=L(c);b=[a.radius,a.bg_color.join("-"),a.real_border_width,a.border_color,a.use_shape,b?b.id:0].join(":");var d=a.radius,h=a.real_border_width||0,s=a.use_shape?h-a.border_width:0;if(!r[b]){var g="rocon__"+q.cssRules.length;r[b]=g;var l=e,j="."+g+">."+f,k;if(a.use_shape)k=ea(a);else{var p=k=a;k=X(k);var m=$(k),i=k.radius,o=i*2+(k.border_width>1?k.border_width:0),p=p.radius,n=Math.PI/2;m.save();m.beginPath();m.arc(0,0,i,n,0,true);m.arc(o,0,i,n*2,
n,true);m.arc(o,o,i,-n,n*2,true);m.arc(0,o,i,0,-n,true);m.closePath();m.clip();m.fillStyle=k.bg_color[2];m.fillRect(0,0,p,p);m.fillStyle=k.bg_color[3];m.fillRect(p,0,p,p);m.fillStyle=k.bg_color[0];m.fillRect(p,p,p,p);m.fillStyle=k.bg_color[1];m.fillRect(0,p,p,p);m.restore();k.border_width&&aa(m,k);k=m.canvas.toDataURL()}l(j,'background-image: url("'+k+'");width: '+d+"px;height: "+(d+s)+"px;");l=-h;j=-h;a.use_shape&&(j=-d-s,Y(c,g,a),e("."+g+">."+f+"-tl, ."+g+">."+f+"-bl","width:auto;left:0;right:"+
(d-h)+"px;background-position:-"+d+"px 100%;"),e("."+g+">."+f+"-bl","background-position:-"+d+"px 0;"));if(l||j)e("."+g+">."+f+"-tl","top:"+j+"px; left:"+l+"px"),e("."+g+">."+f+"-tr","top:"+j+"px; right:"+l+"px"),e("."+g+">."+f+"-bl","bottom:"+j+"px; left:"+l+"px"),e("."+g+">."+f+"-br","bottom:"+j+"px; right:"+l+"px")}return r[b]},t=function(a,c){if(a.className){var b=false;i(a.childNodes,function(){if(T(this,f))return b=true,false});var d=fa(W(a,c),a);b||i(["tl","tr","bl","br"],function(){a.appendChild(x("span",
f+" "+f+"-"+this))});M(a,d+" "+f+"-init")}};D(function(){document.documentElement.style.outline="none"});B.update=function(){F(arguments,function(){t(M(this))})}}if(H){r.ix=0;r.created={};var P="",ga={tl:0,tr:1,br:2,bl:3},u="vml-"+f;try{document.namespaces.v||document.namespaces.add("v","urn:schemas-microsoft-com:vml")}catch(ka){}N();n="."+f;q.cssText="."+u+" {behavior:url(#default#VML);display:inline-block;position:absolute}"+n+"-init {position:relative;zoom:1;}"+n+" {position:absolute; display:inline-block; zoom: 1; overflow:hidden}"+
n+"-tl ."+u+"{flip: 'y'}"+n+"-tr ."+u+"{rotation: 180;right:1px;}"+n+"-br ."+u+"{flip: 'x'; right:1px;}";y<7&&(q.cssText+=n+"-tr, "+n+"-br {margin-left: 100%;}");var e=function(a,c){P+=a+"{"+c+"}"},C=function(a){var c=a.radius,b=a.border_width,d=c+":"+b+":"+a.use_shape;if(!C._cache[d]){var e=x("v:shape");e.className=u;e.strokeweight=b+"px";e.stroked=b?true:false;var f=x("v:stroke");f.className=u;f.joinstyle="miter";e.appendChild(f);f=c;e.style.width=f+"px";e.style.height=f+"px";c-=b/2;c*=10;var b=
b/2*10,f=Math.round((c+b)/f),g=c+b;e.coordorigin=Math.round(f/2)+" "+Math.round(f/2);e.coordsize=g+" "+g;var l="",j=g+f;a.use_shape?(j=2E4,l="m"+j+",0 ns l"+b+",0  qy"+g+","+c+" l"+j+","+c+" e "):l="m0,0 ns l"+b+",0  qy"+g+","+c+" l"+g+","+g+" l0,"+g+" e ";l+="m"+b+","+-f+" nf l"+b+",0 qy"+g+","+c+" l "+j+","+c+" e x";e.path=l;C._cache[d]=e}return C._cache[d].cloneNode(true)};C._cache={};var ha=function(a,c){var b=C(a);b.fillcolor=a.bg_color[ga[c]]||"#000";b.strokecolor=a.border_color||"#000";var d=
x("span",f+" "+f+"-"+c);d.appendChild(b);return d},ia=function(a){i(a.childNodes,function(){T(this,f)&&a.removeChild(this)});M(a)},ba=function(a){a=a.radius+":"+(a.real_border_width||0)+":"+a.use_shape;r[a]||(r[a]="rocon__"+r.ix++);return r[a]},ja=function(a,c){var b=a.radius,d=a.real_border_width||0,h=a.use_shape?a.real_border_width-a.border_width:0,i=ba(a);if(!r.created[i]){var g=y<7?"."+i+" ."+f:"."+i+">."+f,l=-d,j=-1-d;e(g,"width:"+(b+d+1)+"px;height:"+(b+1)+"px");if(a.use_shape){j=-b-1-h;Y(c,
i,a);var h=Math.max(b-d*2,0),k=Math.min(b-d*2,0)*-1;y<7&&(k+=parseInt(v(c,"padding-left")||0)+parseInt(v(c,"padding-right")||0));k="width:100%;clip:rect(auto auto auto "+h+"px);padding-right:"+k+"px;left:"+(-d-h)+"px;";e(g+"-tl",k+"top:"+j+"px;");e(g+"-tl ."+u,"left:"+h+"px");e(g+"-bl",k+"bottom:"+j+"px;");e(g+"-bl ."+u,"left:"+h+"px")}else e(g+"-tl","left:"+l+"px;top:"+j+"px;"),e(g+"-bl","left:"+l+"px;bottom:"+j+"px;");y<7?(l=-b+(d?b%2-d%2:-b%2),e(g+"-tr","left:"+l+"px;top:"+j+"px;"),e(g+"-br","left:"+
l+"px;bottom:"+j+"px;")):(e(g+"-tr","right:"+l+"px;top:"+j+"px;"),e(g+"-br","right:"+l+"px;bottom:"+j+"px;"));r.created[i]=true}},t=function(a,c){var b=W(a,c);ja(b,a);i(["tl","tr","bl","br"],function(){a.appendChild(ha(b,this))});a.className+=" "+ba(b)+" "+f+"-init"};B.update=function(){F(arguments,function(){ia(this);t(this)})};D(function(){q.cssText+=P;P="";e=q.addRule})}return B}();
