function css_browser_selector(u){var ua=u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1},g="gecko",w="webkit",s="safari",o="opera",h=document.getElementsByTagName("html")[0],b=[!/opera|webtv/i.test(ua)&&/msie\s(\d)/.test(ua)?"ie ie"+RegExp.$1:is("firefox/2")?g+" ff2":is("firefox/3.5")?g+" ff3 ff3_5":is("firefox/3")?g+" ff3":is("gecko/")?g:is("opera")?o+(/version\/(\d+)/.test(ua)?" "+o+RegExp.$1:/opera(\s|\/)(\d+)/.test(ua)?" "+o+RegExp.$2:""):is("konqueror")?"konqueror":is("chrome")?w+" chrome":
is("iron")?w+" iron":is("applewebkit/")?w+" "+s+(/version\/(\d+)/.test(ua)?" "+s+RegExp.$1:""):is("mozilla/")?g:"",is("j2me")?"mobile":is("iphone")?"iphone":is("ipod")?"ipod":is("mac")?"mac":is("darwin")?"mac":is("webtv")?"webtv":is("win")?"win":is("freebsd")?"freebsd":is("x11")||is("linux")?"linux":"","js"];c=b.join(" ");h.className+=" "+c;return c}css_browser_selector(navigator.userAgent);
var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),
af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),
10):0}}else if(typeof O.ActiveXObject!=D)try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3)return;if(typeof j.readyState!=D&&j.readyState=="complete"||typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))f();if(!J){if(typeof j.addEventListener!=D)j.addEventListener("DOMContentLoaded",
f,false);if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top)(function(){if(J)return;try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}if(M.wk)(function(){if(J)return;if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})();s(f)}}();function f(){if(J)return;try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=
true;var X=U.length;for(var Y=0;Y<X;Y++)U[Y]()}function K(X){if(J)X();else U[U.length]=X}function s(Y){if(typeof O.addEventListener!=D)O.addEventListener("load",Y,false);else if(typeof j.addEventListener!=D)j.addEventListener("load",Y,false);else if(typeof O.attachEvent!=D)i(O,"onload",Y);else if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else O.onload=Y}function h(){if(T)V();else H()}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",
q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else if(Y<10){Y++;setTimeout(arguments.callee,10);return}X.removeChild(aa);Z=null;H()})()}else H()}function H(){var ag=o.length;if(ag>0)for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae)if(F(o[af].swfVersion)&&
!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class"))ai.styleclass=ae.getAttribute("class");if(ae.getAttribute("align"))ai.align=ae.getAttribute("align");var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++)if(X[ad].getAttribute("name").toLowerCase()!="movie")ah[X[ad].getAttribute("name")]=
X[ad].getAttribute("value");P(ai,ah,Y,ab)}else{p(ae);if(ab)ab(aa)}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT")if(typeof Y.SetVariable!=D)X=Y;else{var Z=Y.getElementsByTagName(r)[0];if(Z)X=Z}return X}function A(){return!a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);
Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)aa.width="310";if(typeof aa.height==D||!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)aa.height="137";j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D)ab.flashvars+="&"+ac;else ab.flashvars=ac;if(M.ie&&M.win&&ae.readyState!=
4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4)ae.parentNode.removeChild(ae);else setTimeout(arguments.callee,10)})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4)Y.parentNode.removeChild(Y);else setTimeout(arguments.callee,10)})()}else Y.parentNode.replaceChild(g(Y),
Y)}function g(ab){var aa=C("div");if(M.win&&M.ie)aa.innerHTML=ab.innerHTML;else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++)if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8))aa.appendChild(ad[Z].cloneNode(true))}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312)return X;if(aa){if(typeof ai.id==D)ai.id=Y;if(M.ie&&M.win){var ah="";for(var ae in ai)if(ai[ae]!=Object.prototype[ae])if(ae.toLowerCase()=="data")ag.movie=
ai[ae];else if(ae.toLowerCase()=="styleclass")ah+=' class="'+ai[ae]+'"';else if(ae.toLowerCase()!="classid")ah+=" "+ae+'="'+ai[ae]+'"';var af="";for(var ad in ag)if(ag[ad]!=Object.prototype[ad])af+='<param name="'+ad+'" value="'+ag[ad]+'" />';aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai)if(ai[ac]!=Object.prototype[ac])if(ac.toLowerCase()=="styleclass")Z.setAttribute("class",
ai[ac]);else if(ac.toLowerCase()!="classid")Z.setAttribute(ac,ai[ac]);for(var ab in ag)if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie")e(Z,ab,ag[ab]);aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT")if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4)b(Y);else setTimeout(arguments.callee,10)})()}else X.parentNode.removeChild(X)}
function b(Z){var Y=c(Z);if(Y){for(var X in Y)if(typeof Y[X]=="function")Y[X]=null;Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return Y[0]>X[0]||Y[0]==X[0]&&Y[1]>X[1]||Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]?true:false}function v(ac,Y,ad,ab){if(M.ie&&
M.mac)return;var aa=j.getElementsByTagName("head")[0];if(!aa)return;var X=ad&&typeof ad=="string"?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0)n=j.styleSheets[j.styleSheets.length-1];G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r)n.addRule(ac,Y)}else if(n&&typeof j.createTextNode!=D)n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}function w(Z,
X){if(!m)return;var Y=X?"visible":"hidden";if(J&&c(Z))c(Z).style.visibility=Y;else v("#"+Z,"visibility:"+Y)}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win)window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++)I[ab][0].detachEvent(I[ab][1],I[ab][2]);var Z=N.length;for(var aa=0;aa<Z;aa++)y(N[aa]);for(var Y in M)M[Y]=null;M=null;for(var X in swfobject)swfobject[X]=null;swfobject=
null})}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else if(Z)Z({success:false,id:ab})},getObjectById:function(X){if(M.w3)return z(X)},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r)for(var al in af)aj[al]=af[al];aj.data=ab;aj.width=ae;aj.height=ag;
var am={};if(ad&&typeof ad===r)for(var ak in ad)am[ak]=ad[ak];if(Z&&typeof Z===r)for(var ai in Z)if(typeof am.flashvars!=D)am.flashvars+="&"+ai+"="+Z[ai];else am.flashvars=ai+"="+Z[ai];if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah)w(ah,true);X.success=true;X.ref=an}else if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else w(ah,true);if(ac)ac(X)})}else if(ac)ac(X)},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,
createSWF:function(Z,Y,X){if(M.w3)return u(Z,Y,X);else return undefined},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A())P(Z,aa,X,Y)},removeSWF:function(X){if(M.w3)y(X)},createCSS:function(aa,Z,Y,X){if(M.w3)v(aa,Z,Y,X)},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z))Z=Z.split("?")[1];if(aa==null)return L(Z);var Y=Z.split("&");for(var X=0;X<Y.length;X++)if(Y[X].substring(0,Y[X].indexOf("="))==aa)return L(Y[X].substring(Y[X].indexOf("=")+
1))}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win)l.style.display="block"}if(E)E(B)}a=false}}}}();
(function($){window.addEvent("domready",function(){if(Browser.Engine.trident4){$$("#header #menu li.realizacje a.realizacje").addEvent("click",function(event){$$("#header #menu li.realizacje").addClass("menurealizacje");return false});$$("#header #menu li.realizacje .ukryj a").addEvent("click",function(event){$$("#header #menu li.menurealizacje").removeClass("menurealizacje");return false})}var opacity=0.1,toOpacity=1;$$("#floatdiv span.kontakt").set("opacity",0);$$("#floatdiv a.aktywny").set("opacity",
opacity).addEvents({mouseenter:function(){this.tween("opacity",toOpacity);$$("#floatdiv span.kontakt").tween("opacity",toOpacity)},mouseleave:function(){this.tween("opacity",opacity);$$("#floatdiv span.kontakt").tween("opacity",0)}})})})(document.id);
var PulseFade=new Class({Implements:[Options,Events],options:{min:0,max:1,duration:2E3,times:9999},initialize:function(el,options){this.setOptions(options);this.element=$(el);this.times=0},start:function(times){if(!times)times=this.options.times*2;this.running=1;this.fireEvent("start").run(times-1)},stop:function(){this.running=0;this.fireEvent("stop")},run:function(times){var self=this;var to=self.element.get("opacity")==self.options.min?self.options.max:self.options.min;self.fx=(new Fx.Tween(self.element,
{duration:self.options.duration/2,onComplete:function(){self.fireEvent("tick");if(self.running&&times)self.run(times-1);else self.fireEvent("complete")}})).start("opacity",to)}});var floatingMenu={hasInner:typeof window.innerWidth=="number",hasElement:typeof document.documentElement=="object"&&typeof document.documentElement.clientWidth=="number"};var floatingArray=[];
floatingMenu.add=function(obj,options){var name;var menu;if(typeof obj==="string")name=obj;else menu=obj;if(options==undefined)floatingArray.push({id:name,menu:menu,targetLeft:0,targetTop:0,distance:0.07,snap:true});else floatingArray.push({id:name,menu:menu,targetLeft:options.targetLeft,targetRight:options.targetRight,targetTop:options.targetTop,targetBottom:options.targetBottom,centerX:options.centerX,centerY:options.centerY,prohibitXMovement:options.prohibitXMovement,prohibitYMovement:options.prohibitYMovement,
distance:options.distance!=undefined?options.distance:0.07,snap:options.snap,ignoreParentDimensions:options.ignoreParentDimensions,scrollContainer:options.scrollContainer,scrollContainerId:options.scrollContainerId})};floatingMenu.findSingle=function(item){if(item.id)item.menu=document.getElementById(item.id);if(item.scrollContainerId)item.scrollContainer=document.getElementById(item.scrollContainerId)};
floatingMenu.move=function(item){if(!item.prohibitXMovement){item.menu.style.left=item.nextX+"px";item.menu.style.right=""}if(!item.prohibitYMovement){item.menu.style.top=item.nextY+"px";item.menu.style.bottom=""}};floatingMenu.scrollLeft=function(item){if(item.scrollContainer)return item.scrollContainer.scrollLeft;var w=window;while(w!=w.parent)w=w.parent;return this.hasInner?w.pageXOffset:this.hasElement?w.document.documentElement.scrollLeft:w.document.body.scrollLeft};
floatingMenu.scrollTop=function(item){if(item.scrollContainer)return item.scrollContainer.scrollTop;var w=window;while(w!=w.parent)w=w.parent;return this.hasInner?w.pageYOffset:this.hasElement?w.document.documentElement.scrollTop:w.document.body.scrollTop};floatingMenu.windowWidth=function(){return this.hasElement?document.documentElement.clientWidth:document.body.clientWidth};
floatingMenu.windowHeight=function(){if(floatingMenu.hasElement&&floatingMenu.hasInner)return document.documentElement.clientHeight>window.innerHeight?window.innerHeight:document.documentElement.clientHeight;else return floatingMenu.hasElement?document.documentElement.clientHeight:document.body.clientHeight};
floatingMenu.documentHeight=function(){var innerHeight=this.hasInner?window.innerHeight:0;var body=document.body,html=document.documentElement;return Math.max(body.scrollHeight,body.offsetHeight,html.clientHeight,html.scrollHeight,html.offsetHeight,innerHeight)};
floatingMenu.documentWidth=function(){var innerWidth=this.hasInner?window.innerWidth:0;var body=document.body,html=document.documentElement;return Math.max(body.scrollWidth,body.offsetWidth,html.clientWidth,html.scrollWidth,html.offsetWidth,innerWidth)};
floatingMenu.calculateCornerX=function(item){var offsetWidth=item.menu.offsetWidth;if(item.centerX)return this.scrollLeft(item)+(this.windowWidth()-offsetWidth)/2;var result=this.scrollLeft(item)-item.parentLeft;if(item.targetLeft==undefined)result+=this.windowWidth()-item.targetRight-offsetWidth;else result+=item.targetLeft;if(document.body!=item.menu.parentNode&&result+offsetWidth>=item.confinedWidthReserve)result=item.confinedWidthReserve-offsetWidth;if(result<0)result=0;return result};
floatingMenu.calculateCornerY=function(item){var offsetHeight=item.menu.offsetHeight;if(item.centerY)return this.scrollTop(item)+(this.windowHeight()-offsetHeight)/2;var result=this.scrollTop(item)-item.parentTop;if(item.targetTop===undefined)result+=this.windowHeight()-item.targetBottom-offsetHeight;else result+=item.targetTop;if(document.body!=item.menu.parentNode&&result+offsetHeight>=item.confinedHeightReserve)result=item.confinedHeightReserve-offsetHeight;if(result<0)result=0;return result};
floatingMenu.computeParent=function(item){if(item.ignoreParentDimensions){item.confinedHeightReserve=this.documentHeight();item.confinedWidthReserver=this.documentWidth();item.parentLeft=0;item.parentTop=0;return}var parentNode=item.menu.parentNode;var parentOffsets=this.offsets(parentNode,item);item.parentLeft=parentOffsets.left;item.parentTop=parentOffsets.top;item.confinedWidthReserve=parentNode.clientWidth;var obj=parentNode;var objOffsets=this.offsets(obj,item);while(obj.clientHeight+objOffsets.top<
item.menu.offsetHeight+parentOffsets.top){obj=obj.parentNode;objOffsets=this.offsets(obj,item)}item.confinedHeightReserve=obj.clientHeight-(parentOffsets.top-objOffsets.top)};
floatingMenu.offsets=function(obj,item){var result={left:0,top:0};if(obj===item.scrollContainer)return;while(obj.offsetParent&&obj.offsetParent!=item.scrollContainer){result.left+=obj.offsetLeft;result.top+=obj.offsetTop;obj=obj.offsetParent}if(window==window.parent)return result;var iframes=window.parent.document.body.getElementsByTagName("IFRAME");for(var i=0;i<iframes.length;i++){if(iframes[i].contentWindow!=window)continue;obj=iframes[i];while(obj.offsetParent){result.left+=obj.offsetLeft;result.top+=
obj.offsetTop;obj=obj.offsetParent}}return result};
floatingMenu.doFloatSingle=function(item){this.findSingle(item);var stepX,stepY;this.computeParent(item);var cornerX=this.calculateCornerX(item);var stepX=(cornerX-item.nextX)*item.distance;if(Math.abs(stepX)<0.5&&item.snap||Math.abs(cornerX-item.nextX)==1)stepX=cornerX-item.nextX;var cornerY=this.calculateCornerY(item);var stepY=(cornerY-item.nextY)*item.distance;if(Math.abs(stepY)<0.5&&item.snap||Math.abs(cornerY-item.nextY)==1)stepY=cornerY-item.nextY;if(Math.abs(stepX)>0||Math.abs(stepY)>0){item.nextX+=
stepX;item.nextY+=stepY;this.move(item)}};floatingMenu.fixTargets=function(){};floatingMenu.fixTarget=function(item){};floatingMenu.doFloat=function(){this.fixTargets();for(var i=0;i<floatingArray.length;i++){this.fixTarget(floatingArray[i]);this.doFloatSingle(floatingArray[i])}setTimeout("floatingMenu.doFloat()",20)};
floatingMenu.insertEvent=function(element,event,handler){if(element.addEventListener!=undefined){element.addEventListener(event,handler,false);return}var listener="on"+event;if(element.attachEvent!=undefined){element.attachEvent(listener,handler);return}var oldHandler=element[listener];element[listener]=function(e){e=e?e:window.event;var result=handler(e);return oldHandler!=undefined&&oldHandler(e)==true&&result==true}};
floatingMenu.init=function(){floatingMenu.fixTargets();for(var i=0;i<floatingArray.length;i++)floatingMenu.initSingleMenu(floatingArray[i]);setTimeout("floatingMenu.doFloat()",100)};floatingMenu.initSingleMenu=function(item){this.findSingle(item);this.computeParent(item);this.fixTarget(item);item.nextX=this.calculateCornerX(item);item.nextY=this.calculateCornerY(item);this.move(item)};floatingMenu.insertEvent(window,"load",floatingMenu.init);
if(typeof jQuery!=="undefined")(function($){$.fn.addFloating=function(options){return this.each(function(){floatingMenu.add(this,options)})}})(jQuery);floatingMenu.add("floatdiv",{targetRight:10,targetTop:80,snap:true});window.addEvent("domready",function(){var pf=new PulseFade("pulse-fade");pf.start()});
function browserdetect(){var agent=navigator.userAgent.toLowerCase();this.isIE=agent.indexOf("msie")>-1;if(this.isIE){this.ieVer=/msie\s(\d\.\d)/.exec(agent)[1];this.quirksMode=!document.compatMode||document.compatMode.indexOf("BackCompat")>-1;this.get_style=function(obj,prop){if(!(prop in obj.currentStyle))return"";var matches=/^([\d.]+)(\w*)/.exec(obj.currentStyle[prop]);if(!matches)return obj.currentStyle[prop];if(matches[1]==0)return"0";if(matches[2]&&matches[2]!=="px"){var style=obj.style.left;
var rtStyle=obj.runtimeStyle.left;obj.runtimeStyle.left=obj.currentStyle.left;obj.style.left=matches[1]+matches[2];matches[0]=obj.style.pixelLeft;obj.style.left=style;obj.runtimeStyle.left=rtStyle}return matches[0]};this.supportsCorners=false}else{this.ieVer=this.quirksMode=0;this.get_style=function(obj,prop){prop=prop.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return document.defaultView.getComputedStyle(obj,"").getPropertyValue(prop)};this.isSafari=agent.indexOf("safari")!=-1;this.isWebKit=
agent.indexOf("webkit")!=-1;this.isOp="opera"in window;if(this.isOp)this.supportsCorners=(this.isOp=window.opera.version())>=10.5;else{if(!this.isWebkit)if(!(this.isMoz=agent.indexOf("firefox")!==-1))for(var i=document.childNodes.length;--i>=0;)if("style"in document.childNodes[i]){this.isMoz="MozBorderRadius"in document.childNodes[i];break}this.supportsCorners=this.isWebKit||this.isMoz}}}var curvyBrowser=new browserdetect;
if(curvyBrowser.isIE)try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}function curvyCnrSpec(selText){this.selectorText=selText;this.tlR=this.trR=this.blR=this.brR=0;this.tlu=this.tru=this.blu=this.bru="";this.antiAlias=true}
curvyCnrSpec.prototype.setcorner=function(tb,lr,radius,unit){if(!tb){this.tlR=this.trR=this.blR=this.brR=parseInt(radius);this.tlu=this.tru=this.blu=this.bru=unit}else{propname=tb.charAt(0)+lr.charAt(0);this[propname+"R"]=parseInt(radius);this[propname+"u"]=unit}};
curvyCnrSpec.prototype.get=function(prop){if(/^(t|b)(l|r)(R|u)$/.test(prop))return this[prop];if(/^(t|b)(l|r)Ru$/.test(prop)){var pname=prop.charAt(0)+prop.charAt(1);return this[pname+"R"]+this[pname+"u"]}if(/^(t|b)Ru?$/.test(prop)){var tb=prop.charAt(0);tb+=this[tb+"lR"]>this[tb+"rR"]?"l":"r";var retval=this[tb+"R"];if(prop.length===3&&prop.charAt(2)==="u")retval+=this[tb="u"];return retval}throw new Error("Don't recognize property "+prop);};
curvyCnrSpec.prototype.radiusdiff=function(tb){if(tb!=="t"&&tb!=="b")throw new Error("Param must be 't' or 'b'");return Math.abs(this[tb+"lR"]-this[tb+"rR"])};curvyCnrSpec.prototype.setfrom=function(obj){this.tlu=this.tru=this.blu=this.bru="px";if("tl"in obj)this.tlR=obj.tl.radius;if("tr"in obj)this.trR=obj.tr.radius;if("bl"in obj)this.blR=obj.bl.radius;if("br"in obj)this.brR=obj.br.radius;if("antiAlias"in obj)this.antiAlias=obj.antiAlias};
curvyCnrSpec.prototype.cloneOn=function(box){var props=["tl","tr","bl","br"];var converted=0;var i,propu;for(i in props)if(!isNaN(i)){propu=this[props[i]+"u"];if(propu!==""&&propu!=="px"){converted=new curvyCnrSpec;break}}if(!converted)converted=this;else{var propi,propR,save=curvyBrowser.get_style(box,"left");for(i in props)if(!isNaN(i)){propi=props[i];propu=this[propi+"u"];propR=this[propi+"R"];if(propu!=="px"){var save=box.style.left;box.style.left=propR+propu;propR=box.style.pixelLeft;box.style.left=
save}converted[propi+"R"]=propR;converted[propi+"u"]="px"}box.style.left=save}return converted};curvyCnrSpec.prototype.radiusSum=function(tb){if(tb!=="t"&&tb!=="b")throw new Error("Param must be 't' or 'b'");return this[tb+"lR"]+this[tb+"rR"]};curvyCnrSpec.prototype.radiusCount=function(tb){var count=0;if(this[tb+"lR"])++count;if(this[tb+"rR"])++count;return count};
curvyCnrSpec.prototype.cornerNames=function(){var ret=[];if(this.tlR)ret.push("tl");if(this.trR)ret.push("tr");if(this.blR)ret.push("bl");if(this.brR)ret.push("br");return ret};
function operasheet(sheetnumber){var txt=document.styleSheets.item(sheetnumber).ownerNode.text;txt=txt.replace(/\/\*(\n|\r|.)*?\*\//g,"");var pat=new RegExp("^\\s*([\\w.#][-\\w.#, ]+)[\\n\\s]*\\{([^}]+border-((top|bottom)-(left|right)-)?radius[^}]*)\\}","mg");var matches;this.rules=[];while((matches=pat.exec(txt))!==null){var pat2=new RegExp("(..)border-((top|bottom)-(left|right)-)?radius:\\s*([\\d.]+)(in|em|px|ex|pt)","g");var submatches,cornerspec=new curvyCnrSpec(matches[1]);while((submatches=
pat2.exec(matches[2]))!==null)if(submatches[1]!=="z-")cornerspec.setcorner(submatches[3],submatches[4],submatches[5],submatches[6]);this.rules.push(cornerspec)}}operasheet.contains_border_radius=function(sheetnumber){return/border-((top|bottom)-(left|right)-)?radius/.test(document.styleSheets.item(sheetnumber).ownerNode.text)};
function curvyCorners(){var i,j,boxCol,settings,startIndex;if(typeof arguments[0]!=="object")throw curvyCorners.newError("First parameter of curvyCorners() must be an object.");if(arguments[0]instanceof curvyCnrSpec){settings=arguments[0];if(!settings.selectorText&&typeof arguments[1]==="string")settings.selectorText=arguments[1]}else{if(typeof arguments[1]!=="object"&&typeof arguments[1]!=="string")throw curvyCorners.newError("Second parameter of curvyCorners() must be an object or a class name.");
j=arguments[1];if(typeof j!=="string")j="";if(j!==""&&j.charAt(0)!=="."&&"autoPad"in arguments[0])j="."+j;settings=new curvyCnrSpec(j);settings.setfrom(arguments[0])}if(settings.selectorText){startIndex=0;var args=settings.selectorText.replace(/\s+$/,"").split(/,\s*/);boxCol=new Array;for(i=0;i<args.length;++i){if((j=args[i].lastIndexOf("#"))!==-1)args[i]=args[i].substr(j);boxCol=boxCol.concat(curvyCorners.getElementsBySelector(args[i].split(/\s+/)))}}else{startIndex=1;boxCol=arguments}for(i=startIndex,
j=boxCol.length;i<j;++i){var theBox=boxCol[i];var skipCorners=false;if(!theBox.className)theBox.className="curvyIgnore";else{skipCorners=theBox.className.indexOf("curvyIgnore")!==-1;if(!skipCorners)theBox.className+=" curvyIgnore"}if(!skipCorners){if(theBox.className.indexOf("curvyRedraw")!==-1){if(typeof curvyCorners.redrawList==="undefined")curvyCorners.redrawList=new Array;curvyCorners.redrawList.push({node:theBox,spec:settings,copy:theBox.cloneNode(false)})}var obj=new curvyObject(settings,theBox);
obj.applyCorners()}}}curvyCorners.prototype.applyCornersToAll=function(){throw curvyCorners.newError("This function is now redundant. Just call curvyCorners(). See documentation.");};
curvyCorners.redraw=function(){if(curvyBrowser.supportsCorners)return;if(!curvyCorners.redrawList)throw curvyCorners.newError("curvyCorners.redraw() has nothing to redraw.");var old_block_value=curvyCorners.block_redraw;curvyCorners.block_redraw=true;for(var i in curvyCorners.redrawList){if(isNaN(i))continue;var o=curvyCorners.redrawList[i];if(!o.node.clientWidth)continue;var newchild=o.copy.cloneNode(false);for(var contents=o.node.firstChild;contents!=null;contents=contents.nextSibling)if(contents.className===
"autoPadDiv")break;if(!contents){curvyCorners.alert("Couldn't find autoPad DIV");break}o.node.parentNode.replaceChild(newchild,o.node);var scripts=contents.getElementsByTagName("script");for(var j=scripts.length-1;j>=0;--j)scripts[j].parentNode.removeChild(scripts[j]);while(contents.firstChild)newchild.appendChild(contents.removeChild(contents.firstChild));o=new curvyObject(o.spec,o.node=newchild);o.applyCorners()}curvyCorners.block_redraw=old_block_value};
curvyCorners.adjust=function(obj,prop,newval){if(!curvyBrowser.supportsCorners){if(!curvyCorners.redrawList)throw curvyCorners.newError("curvyCorners.adjust() has nothing to adjust.");var i,j=curvyCorners.redrawList.length;for(i=0;i<j;++i)if(curvyCorners.redrawList[i].node===obj)break;if(i===j)throw curvyCorners.newError("Object not redrawable");obj=curvyCorners.redrawList[i].copy}if(prop.indexOf(".")===-1)obj[prop]=newval;else eval("obj."+prop+"='"+newval+"'")};curvyCorners.handleWinResize=function(){if(!curvyCorners.block_redraw)curvyCorners.redraw()};
curvyCorners.setWinResize=function(onoff){curvyCorners.block_redraw=!onoff};curvyCorners.newError=function(errorMessage){return new Error("curvyCorners Error:\n"+errorMessage)};curvyCorners.alert=function(errorMessage){if(typeof curvyCornersVerbose==="undefined"||curvyCornersVerbose)alert(errorMessage)};
function curvyObject(){var boxDisp;this.box=arguments[1];this.settings=arguments[0];this.topContainer=this.bottomContainer=this.shell=boxDisp=null;var boxWidth=this.box.clientWidth;if("canHaveChildren"in this.box&&!this.box.canHaveChildren||this.box.tagName==="TABLE")throw new Error(this.errmsg("You cannot apply corners to "+this.box.tagName+" elements.","Error"));if(!boxWidth&&curvyBrowser.isIE){this.box.style.zoom=1;boxWidth=this.box.clientWidth}if(!boxWidth&&curvyBrowser.get_style(this.box,"display")===
"inline"){this.box.style.display="inline-block";curvyCorners.alert(this.errmsg("Converting inline element to inline-block","warning"));boxWidth=this.box.clientWidth}if(!boxWidth){if(!this.box.parentNode)throw this.newError("box has no parent!");for(boxDisp=this.box;;boxDisp=boxDisp.parentNode){if(!boxDisp||boxDisp.tagName==="BODY"){this.applyCorners=function(){};curvyCorners.alert(this.errmsg("zero-width box with no accountable parent","warning"));return}if(curvyBrowser.get_style(boxDisp,"display")===
"none")break}var boxDispSave=boxDisp.style.display;boxDisp.style.display="block";boxWidth=this.box.clientWidth}if(!boxWidth){curvyCorners.alert(this.errmsg("zero-width box, cannot display","error"));this.applyCorners=function(){};return}if(arguments[0]instanceof curvyCnrSpec)this.spec=arguments[0].cloneOn(this.box);else{this.spec=new curvyCnrSpec("");this.spec.setfrom(this.settings)}var borderWidth=curvyBrowser.get_style(this.box,"borderTopWidth");var borderWidthB=curvyBrowser.get_style(this.box,
"borderBottomWidth");var borderWidthL=curvyBrowser.get_style(this.box,"borderLeftWidth");var borderWidthR=curvyBrowser.get_style(this.box,"borderRightWidth");var borderColour=curvyBrowser.get_style(this.box,"borderTopColor");var borderColourB=curvyBrowser.get_style(this.box,"borderBottomColor");var borderColourL=curvyBrowser.get_style(this.box,"borderLeftColor");var borderColourR=curvyBrowser.get_style(this.box,"borderRightColor");var borderStyle=curvyBrowser.get_style(this.box,"borderTopStyle");
var borderStyleB=curvyBrowser.get_style(this.box,"borderBottomStyle");var borderStyleL=curvyBrowser.get_style(this.box,"borderLeftStyle");var borderStyleR=curvyBrowser.get_style(this.box,"borderRightStyle");var boxColour=curvyBrowser.get_style(this.box,"backgroundColor");var backgroundImage=curvyBrowser.get_style(this.box,"backgroundImage");var backgroundRepeat=curvyBrowser.get_style(this.box,"backgroundRepeat");var backgroundPosX,backgroundPosY;if(this.box.currentStyle&&this.box.currentStyle.backgroundPositionX){backgroundPosX=
curvyBrowser.get_style(this.box,"backgroundPositionX");backgroundPosY=curvyBrowser.get_style(this.box,"backgroundPositionY")}else{backgroundPosX=curvyBrowser.get_style(this.box,"backgroundPosition");backgroundPosX=backgroundPosX.split(" ");backgroundPosY=backgroundPosX.length===2?backgroundPosX[1]:0;backgroundPosX=backgroundPosX[0]}var boxPosition=curvyBrowser.get_style(this.box,"position");var topPadding=curvyBrowser.get_style(this.box,"paddingTop");var bottomPadding=curvyBrowser.get_style(this.box,
"paddingBottom");var leftPadding=curvyBrowser.get_style(this.box,"paddingLeft");var rightPadding=curvyBrowser.get_style(this.box,"paddingRight");var border=curvyBrowser.get_style(this.box,"border");var filter=curvyBrowser.ieVer>7?curvyBrowser.get_style(this.box,"filter"):null;var topMaxRadius=this.spec.get("tR");var botMaxRadius=this.spec.get("bR");var styleToNPx=function(val){if(typeof val==="number")return val;if(typeof val!=="string")throw new Error("unexpected styleToNPx type "+typeof val);var matches=
/^[-\d.]([a-z]+)$/.exec(val);if(matches&&matches[1]!="px")throw new Error("Unexpected unit "+matches[1]);if(isNaN(val=parseInt(val)))val=0;return val};var min0Px=function(val){return val<=0?"0":val+"px"};try{this.borderWidth=styleToNPx(borderWidth);this.borderWidthB=styleToNPx(borderWidthB);this.borderWidthL=styleToNPx(borderWidthL);this.borderWidthR=styleToNPx(borderWidthR);this.boxColour=curvyObject.format_colour(boxColour);this.topPadding=styleToNPx(topPadding);this.bottomPadding=styleToNPx(bottomPadding);
this.leftPadding=styleToNPx(leftPadding);this.rightPadding=styleToNPx(rightPadding);this.boxWidth=boxWidth;this.boxHeight=this.box.clientHeight;this.borderColour=curvyObject.format_colour(borderColour);this.borderColourB=curvyObject.format_colour(borderColourB);this.borderColourL=curvyObject.format_colour(borderColourL);this.borderColourR=curvyObject.format_colour(borderColourR);this.borderString=this.borderWidth+"px"+" "+borderStyle+" "+this.borderColour;this.borderStringB=this.borderWidthB+"px"+
" "+borderStyleB+" "+this.borderColourB;this.borderStringL=this.borderWidthL+"px"+" "+borderStyleL+" "+this.borderColourL;this.borderStringR=this.borderWidthR+"px"+" "+borderStyleR+" "+this.borderColourR;this.backgroundImage=backgroundImage!="none"?backgroundImage:"";this.backgroundRepeat=backgroundRepeat}catch(e){throw this.newError(e.message);}var clientHeight=this.boxHeight;var clientWidth=boxWidth;if(curvyBrowser.isOp){backgroundPosX=styleToNPx(backgroundPosX);backgroundPosY=styleToNPx(backgroundPosY);
if(backgroundPosX){var t=clientWidth+this.borderWidthL+this.borderWidthR;if(backgroundPosX>t)backgroundPosX=t;backgroundPosX=t/backgroundPosX*100+"%"}if(backgroundPosY){var t=clientHeight+this.borderWidth+this.borderWidthB;if(backgroundPosY>t)backgroundPosY=t;backgroundPosY=t/backgroundPosY*100+"%"}}if(curvyBrowser.quirksMode);else{this.boxWidth-=this.leftPadding+this.rightPadding;this.boxHeight-=this.topPadding+this.bottomPadding}this.contentContainer=document.createElement("div");if(filter)this.contentContainer.style.filter=
filter;while(this.box.firstChild)this.contentContainer.appendChild(this.box.removeChild(this.box.firstChild));if(boxPosition!="absolute")this.box.style.position="relative";this.box.style.padding="0";this.box.style.border=this.box.style.backgroundImage="none";this.box.style.backgroundColor="transparent";this.box.style.width=clientWidth+this.borderWidthL+this.borderWidthR+"px";this.box.style.height=clientHeight+this.borderWidth+this.borderWidthB+"px";var newMainContainer=document.createElement("div");
newMainContainer.style.position="absolute";if(filter)newMainContainer.style.filter=filter;if(curvyBrowser.quirksMode)newMainContainer.style.width=clientWidth+this.borderWidthL+this.borderWidthR+"px";else newMainContainer.style.width=clientWidth+"px";newMainContainer.style.height=min0Px(clientHeight+this.borderWidth+this.borderWidthB-topMaxRadius-botMaxRadius);newMainContainer.style.padding="0";newMainContainer.style.top=topMaxRadius+"px";newMainContainer.style.left="0";if(this.borderWidthL)newMainContainer.style.borderLeft=
this.borderStringL;if(this.borderWidth&&!topMaxRadius)newMainContainer.style.borderTop=this.borderString;if(this.borderWidthR)newMainContainer.style.borderRight=this.borderStringR;if(this.borderWidthB&&!botMaxRadius)newMainContainer.style.borderBottom=this.borderStringB;newMainContainer.style.backgroundColor=boxColour;newMainContainer.style.backgroundImage=this.backgroundImage;newMainContainer.style.backgroundRepeat=this.backgroundRepeat;newMainContainer.style.direction="ltr";this.shell=this.box.appendChild(newMainContainer);
boxWidth=curvyBrowser.get_style(this.shell,"width");if(boxWidth===""||boxWidth==="auto"||boxWidth.indexOf("%")!==-1)throw this.newError("Shell width is "+boxWidth);this.boxWidth=boxWidth!=""&&boxWidth!="auto"&&boxWidth.indexOf("%")==-1?parseInt(boxWidth):this.shell.clientWidth;this.applyCorners=function(){this.backgroundPosX=this.backgroundPosY=0;if(this.backgroundObject){var bgOffset=function(style,imglen,boxlen){if(style===0)return 0;var retval;if(style==="right"||style==="bottom")return boxlen-
imglen;if(style==="center")return(boxlen-imglen)/2;if(style.indexOf("%")>0)return(boxlen-imglen)*100/parseInt(style);return styleToNPx(style)};this.backgroundPosX=bgOffset(backgroundPosX,this.backgroundObject.width,clientWidth);this.backgroundPosY=bgOffset(backgroundPosY,this.backgroundObject.height,clientHeight)}else if(this.backgroundImage){this.backgroundPosX=styleToNPx(backgroundPosX);this.backgroundPosY=styleToNPx(backgroundPosY)}if(topMaxRadius){newMainContainer=document.createElement("div");
newMainContainer.style.width=this.boxWidth+"px";newMainContainer.style.fontSize="1px";newMainContainer.style.overflow="hidden";newMainContainer.style.position="absolute";newMainContainer.style.paddingLeft=this.borderWidth+"px";newMainContainer.style.paddingRight=this.borderWidth+"px";newMainContainer.style.height=topMaxRadius+"px";newMainContainer.style.top=-topMaxRadius+"px";newMainContainer.style.left=-this.borderWidthL+"px";this.topContainer=this.shell.appendChild(newMainContainer)}if(botMaxRadius){var newMainContainer=
document.createElement("div");newMainContainer.style.width=this.boxWidth+"px";newMainContainer.style.fontSize="1px";newMainContainer.style.overflow="hidden";newMainContainer.style.position="absolute";newMainContainer.style.paddingLeft=this.borderWidthB+"px";newMainContainer.style.paddingRight=this.borderWidthB+"px";newMainContainer.style.height=botMaxRadius+"px";newMainContainer.style.bottom=-botMaxRadius+"px";newMainContainer.style.left=-this.borderWidthL+"px";this.bottomContainer=this.shell.appendChild(newMainContainer)}var corners=
this.spec.cornerNames();for(var i in corners)if(!isNaN(i)){var cc=corners[i];var specRadius=this.spec[cc+"R"];var bwidth,bcolor,borderRadius,borderWidthTB;if(cc=="tr"||cc=="tl"){bwidth=this.borderWidth;bcolor=this.borderColour;borderWidthTB=this.borderWidth}else{bwidth=this.borderWidthB;bcolor=this.borderColourB;borderWidthTB=this.borderWidthB}borderRadius=specRadius-borderWidthTB;var newCorner=document.createElement("div");newCorner.style.height=this.spec.get(cc+"Ru");newCorner.style.width=this.spec.get(cc+
"Ru");newCorner.style.position="absolute";newCorner.style.fontSize="1px";newCorner.style.overflow="hidden";var intx,inty,outsideColour;var trans=filter?parseInt(/alpha\(opacity.(\d+)\)/.exec(filter)[1]):100;for(intx=0;intx<specRadius;++intx){var y1=intx+1>=borderRadius?-1:Math.floor(Math.sqrt(Math.pow(borderRadius,2)-Math.pow(intx+1,2)))-1;if(borderRadius!=specRadius){var y2=intx>=borderRadius?-1:Math.ceil(Math.sqrt(Math.pow(borderRadius,2)-Math.pow(intx,2)));var y3=intx+1>=specRadius?-1:Math.floor(Math.sqrt(Math.pow(specRadius,
2)-Math.pow(intx+1,2)))-1}var y4=intx>=specRadius?-1:Math.ceil(Math.sqrt(Math.pow(specRadius,2)-Math.pow(intx,2)));if(y1>-1)this.drawPixel(intx,0,this.boxColour,trans,y1+1,newCorner,true,specRadius);if(borderRadius!=specRadius)if(this.spec.antiAlias){for(inty=y1+1;inty<y2;++inty)if(this.backgroundImage!=""){var borderFract=curvyObject.pixelFraction(intx,inty,borderRadius)*100;this.drawPixel(intx,inty,bcolor,trans,1,newCorner,borderFract>=30,specRadius)}else if(this.boxColour!=="transparent"){var pixelcolour=
curvyObject.BlendColour(this.boxColour,bcolor,curvyObject.pixelFraction(intx,inty,borderRadius));this.drawPixel(intx,inty,pixelcolour,trans,1,newCorner,false,specRadius)}else this.drawPixel(intx,inty,bcolor,trans>>1,1,newCorner,false,specRadius);if(y3>=y2){if(y2==-1)y2=0;this.drawPixel(intx,y2,bcolor,trans,y3-y2+1,newCorner,false,0)}outsideColour=bcolor;inty=y3}else{if(y3>y1)this.drawPixel(intx,y1+1,bcolor,trans,y3-y1,newCorner,false,0)}else{outsideColour=this.boxColour;inty=y1}if(this.spec.antiAlias&&
this.boxColour!=="transparent")while(++inty<y4)this.drawPixel(intx,inty,outsideColour,curvyObject.pixelFraction(intx,inty,specRadius)*trans,1,newCorner,borderWidthTB<=0,specRadius)}for(var t=0,k=newCorner.childNodes.length;t<k;++t){var pixelBar=newCorner.childNodes[t];var pixelBarTop=parseInt(pixelBar.style.top);var pixelBarLeft=parseInt(pixelBar.style.left);var pixelBarHeight=parseInt(pixelBar.style.height);if(cc=="tl"||cc=="bl")pixelBar.style.left=specRadius-pixelBarLeft-1+"px";if(cc=="tr"||cc==
"tl")pixelBar.style.top=specRadius-pixelBarHeight-pixelBarTop+"px";pixelBar.style.backgroundRepeat=this.backgroundRepeat;if(this.backgroundImage)switch(cc){case "tr":pixelBar.style.backgroundPosition=this.backgroundPosX-this.borderWidthL+specRadius-clientWidth-pixelBarLeft+"px "+(this.backgroundPosY+pixelBarHeight+pixelBarTop+this.borderWidth-specRadius)+"px";break;case "tl":pixelBar.style.backgroundPosition=this.backgroundPosX-specRadius+pixelBarLeft+1+this.borderWidthL+"px "+(this.backgroundPosY-
specRadius+pixelBarHeight+pixelBarTop+this.borderWidth)+"px";break;case "bl":pixelBar.style.backgroundPosition=this.backgroundPosX-specRadius+pixelBarLeft+1+this.borderWidthL+"px "+(this.backgroundPosY-clientHeight-this.borderWidth+(curvyBrowser.quirksMode?pixelBarTop:-pixelBarTop)+specRadius)+"px";break;case "br":if(curvyBrowser.quirksMode)pixelBar.style.backgroundPosition=this.backgroundPosX-this.borderWidthL-clientWidth+specRadius-pixelBarLeft+"px "+(this.backgroundPosY-clientHeight-this.borderWidth+
pixelBarTop+specRadius)+"px";else pixelBar.style.backgroundPosition=this.backgroundPosX-this.borderWidthL-clientWidth+specRadius-pixelBarLeft+"px "+(this.backgroundPosY-clientHeight-this.borderWidth+specRadius-pixelBarTop)+"px"}}switch(cc){case "tl":newCorner.style.top=newCorner.style.left="0";this.topContainer.appendChild(newCorner);break;case "tr":newCorner.style.top=newCorner.style.right="0";this.topContainer.appendChild(newCorner);break;case "bl":newCorner.style.bottom=newCorner.style.left="0";
this.bottomContainer.appendChild(newCorner);break;case "br":newCorner.style.bottom=newCorner.style.right="0";this.bottomContainer.appendChild(newCorner)}}var radiusDiff={t:this.spec.radiusdiff("t"),b:this.spec.radiusdiff("b")};for(z in radiusDiff){if(typeof z==="function")continue;if(!this.spec.get(z+"R"))continue;if(radiusDiff[z]){var smallerCornerType=this.spec[z+"lR"]<this.spec[z+"rR"]?z+"l":z+"r";var newFiller=document.createElement("div");newFiller.style.height=radiusDiff[z]+"px";newFiller.style.width=
this.spec.get(smallerCornerType+"Ru");newFiller.style.position="absolute";newFiller.style.fontSize="1px";newFiller.style.overflow="hidden";newFiller.style.backgroundColor=this.boxColour;if(filter)newFiller.style.filter=filter;newFiller.style.backgroundImage=this.backgroundImage;newFiller.style.backgroundRepeat=this.backgroundRepeat;switch(smallerCornerType){case "tl":newFiller.style.bottom=newFiller.style.left="0";newFiller.style.borderLeft=this.borderStringL;newFiller.style.backgroundPosition=this.backgroundPosX+
"px "+(this.borderWidth+this.backgroundPosY-this.spec.tlR)+"px";this.topContainer.appendChild(newFiller);break;case "tr":newFiller.style.bottom=newFiller.style.right="0";newFiller.style.borderRight=this.borderStringR;newFiller.style.backgroundPosition=this.backgroundPosX-this.boxWidth+this.spec.trR+"px "+(this.borderWidth+this.backgroundPosY-this.spec.trR)+"px";this.topContainer.appendChild(newFiller);break;case "bl":newFiller.style.top=newFiller.style.left="0";newFiller.style.borderLeft=this.borderStringL;
newFiller.style.backgroundPosition=this.backgroundPosX+"px "+(this.backgroundPosY-this.borderWidth-this.boxHeight+radiusDiff[z]+this.spec.blR)+"px";this.bottomContainer.appendChild(newFiller);break;case "br":newFiller.style.top=newFiller.style.right="0";newFiller.style.borderRight=this.borderStringR;newFiller.style.backgroundPosition=this.borderWidthL+this.backgroundPosX-this.boxWidth+this.spec.brR+"px "+(this.backgroundPosY-this.borderWidth-this.boxHeight+radiusDiff[z]+this.spec.brR)+"px";this.bottomContainer.appendChild(newFiller)}}var newFillerBar=
document.createElement("div");if(filter)newFillerBar.style.filter=filter;newFillerBar.style.position="relative";newFillerBar.style.fontSize="1px";newFillerBar.style.overflow="hidden";newFillerBar.style.width=this.fillerWidth(z);newFillerBar.style.backgroundColor=this.boxColour;newFillerBar.style.backgroundImage=this.backgroundImage;newFillerBar.style.backgroundRepeat=this.backgroundRepeat;switch(z){case "t":if(this.topContainer){if(curvyBrowser.quirksMode)newFillerBar.style.height=100+topMaxRadius+
"px";else newFillerBar.style.height=100+topMaxRadius-this.borderWidth+"px";newFillerBar.style.marginLeft=this.spec.tlR?this.spec.tlR-this.borderWidthL+"px":"0";newFillerBar.style.borderTop=this.borderString;if(this.backgroundImage){var x_offset=this.spec.tlR?this.borderWidthL+this.backgroundPosX-this.spec.tlR+"px ":this.backgroundPosX+"px ";newFillerBar.style.backgroundPosition=x_offset+this.backgroundPosY+"px";this.shell.style.backgroundPosition=this.backgroundPosX+"px "+(this.backgroundPosY-topMaxRadius+
this.borderWidthL)+"px"}this.topContainer.appendChild(newFillerBar)}break;case "b":if(this.bottomContainer){if(curvyBrowser.quirksMode)newFillerBar.style.height=botMaxRadius+"px";else newFillerBar.style.height=botMaxRadius-this.borderWidthB+"px";newFillerBar.style.marginLeft=this.spec.blR?this.spec.blR-this.borderWidthL+"px":"0";newFillerBar.style.borderBottom=this.borderStringB;if(this.backgroundImage){var x_offset=this.spec.blR?this.backgroundPosX+this.borderWidthL-this.spec.blR+"px ":this.backgroundPosX+
"px ";newFillerBar.style.backgroundPosition=x_offset+(this.backgroundPosY-clientHeight-this.borderWidth+botMaxRadius)+"px"}this.bottomContainer.appendChild(newFillerBar)}}}this.contentContainer.style.position="absolute";this.contentContainer.className="autoPadDiv";this.contentContainer.style.left=this.borderWidthL+"px";this.contentContainer.style.paddingTop=this.topPadding+"px";this.contentContainer.style.top=this.borderWidth+"px";this.contentContainer.style.paddingLeft=this.leftPadding+"px";this.contentContainer.style.paddingRight=
this.rightPadding+"px";z=clientWidth;if(!curvyBrowser.quirksMode)z-=this.leftPadding+this.rightPadding;this.contentContainer.style.width=z+"px";this.contentContainer.style.textAlign=curvyBrowser.get_style(this.box,"textAlign");this.box.style.textAlign="left";this.box.appendChild(this.contentContainer);if(boxDisp)boxDisp.style.display=boxDispSave};if(this.backgroundImage){backgroundPosX=this.backgroundCheck(backgroundPosX);backgroundPosY=this.backgroundCheck(backgroundPosY);if(this.backgroundObject){this.backgroundObject.holdingElement=
this;this.dispatch=this.applyCorners;this.applyCorners=function(){if(this.backgroundObject.complete)this.dispatch();else this.backgroundObject.onload=new Function("curvyObject.dispatch(this.holdingElement);")}}}}
curvyObject.prototype.backgroundCheck=function(style){if(style==="top"||style==="left"||parseInt(style)===0)return 0;if(!/^[-\d.]+px$/.test(style)&&!this.backgroundObject){this.backgroundObject=new Image;var imgName=function(str){var matches=/url\("?([^'"]+)"?\)/.exec(str);return matches?matches[1]:str};this.backgroundObject.src=imgName(this.backgroundImage)}return style};curvyObject.dispatch=function(obj){if("dispatch"in obj)obj.dispatch();else throw obj.newError("No dispatch function");};
curvyObject.prototype.drawPixel=function(intx,inty,colour,transAmount,height,newCorner,image,cornerRadius){var pixel=document.createElement("div");pixel.style.height=height+"px";pixel.style.width="1px";pixel.style.position="absolute";pixel.style.fontSize="1px";pixel.style.overflow="hidden";var topMaxRadius=this.spec.get("tR");pixel.style.backgroundColor=colour;if(image&&this.backgroundImage!=""){pixel.style.backgroundImage=this.backgroundImage;pixel.style.backgroundPosition="-"+(this.boxWidth-(cornerRadius-
intx)+this.borderWidth)+"px -"+(this.boxHeight+topMaxRadius+inty-this.borderWidth)+"px"}if(transAmount!=100)curvyObject.setOpacity(pixel,transAmount);pixel.style.top=inty+"px";pixel.style.left=intx+"px";newCorner.appendChild(pixel)};
curvyObject.prototype.fillerWidth=function(tb){var b_width,f_width;b_width=curvyBrowser.quirksMode?0:this.spec.radiusCount(tb)*this.borderWidthL;if((f_width=this.boxWidth-this.spec.radiusSum(tb)+b_width)<0)throw this.newError("Radius exceeds box width");return f_width+"px"};
curvyObject.prototype.errmsg=function(msg,gravity){var extradata="\ntag: "+this.box.tagName;if(this.box.id)extradata+="\nid: "+this.box.id;if(this.box.className)extradata+="\nclass: "+this.box.className;var parent;if((parent=this.box.parentNode)===null)extradata+="\n(box has no parent)";else{extradata+="\nParent tag: "+parent.tagName;if(parent.id)extradata+="\nParent ID: "+parent.id;if(parent.className)extradata+="\nParent class: "+parent.className}if(gravity===undefined)gravity="warning";return"curvyObject "+
gravity+":\n"+msg+extradata};curvyObject.prototype.newError=function(msg){return new Error(this.errmsg(msg,"exception"))};curvyObject.IntToHex=function(strNum){var hexdig=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"];return hexdig[strNum>>>4]+""+hexdig[strNum&15]};
curvyObject.BlendColour=function(Col1,Col2,Col1Fraction){if(Col1==="transparent"||Col2==="transparent")throw this.newError("Cannot blend with transparent");if(Col1.charAt(0)!=="#")Col1=curvyObject.format_colour(Col1);if(Col2.charAt(0)!=="#")Col2=curvyObject.format_colour(Col2);var red1=parseInt(Col1.substr(1,2),16);var green1=parseInt(Col1.substr(3,2),16);var blue1=parseInt(Col1.substr(5,2),16);var red2=parseInt(Col2.substr(1,2),16);var green2=parseInt(Col2.substr(3,2),16);var blue2=parseInt(Col2.substr(5,
2),16);if(Col1Fraction>1||Col1Fraction<0)Col1Fraction=1;var endRed=Math.round(red1*Col1Fraction+red2*(1-Col1Fraction));if(endRed>255)endRed=255;if(endRed<0)endRed=0;var endGreen=Math.round(green1*Col1Fraction+green2*(1-Col1Fraction));if(endGreen>255)endGreen=255;if(endGreen<0)endGreen=0;var endBlue=Math.round(blue1*Col1Fraction+blue2*(1-Col1Fraction));if(endBlue>255)endBlue=255;if(endBlue<0)endBlue=0;return"#"+curvyObject.IntToHex(endRed)+curvyObject.IntToHex(endGreen)+curvyObject.IntToHex(endBlue)};
curvyObject.pixelFraction=function(x,y,r){var fraction;var rsquared=r*r;var xvalues=new Array(2);var yvalues=new Array(2);var point=0;var whatsides="";var intersect=Math.sqrt(rsquared-Math.pow(x,2));if(intersect>=y&&intersect<y+1){whatsides="Left";xvalues[point]=0;yvalues[point]=intersect-y;++point}intersect=Math.sqrt(rsquared-Math.pow(y+1,2));if(intersect>=x&&intersect<x+1){whatsides+="Top";xvalues[point]=intersect-x;yvalues[point]=1;++point}intersect=Math.sqrt(rsquared-Math.pow(x+1,2));if(intersect>=
y&&intersect<y+1){whatsides+="Right";xvalues[point]=1;yvalues[point]=intersect-y;++point}intersect=Math.sqrt(rsquared-Math.pow(y,2));if(intersect>=x&&intersect<x+1){whatsides+="Bottom";xvalues[point]=intersect-x;yvalues[point]=0}switch(whatsides){case "LeftRight":fraction=Math.min(yvalues[0],yvalues[1])+(Math.max(yvalues[0],yvalues[1])-Math.min(yvalues[0],yvalues[1]))/2;break;case "TopRight":fraction=1-(1-xvalues[0])*(1-yvalues[1])/2;break;case "TopBottom":fraction=Math.min(xvalues[0],xvalues[1])+
(Math.max(xvalues[0],xvalues[1])-Math.min(xvalues[0],xvalues[1]))/2;break;case "LeftBottom":fraction=yvalues[0]*xvalues[1]/2;break;default:fraction=1}return fraction};curvyObject.rgb2Array=function(rgbColour){var rgbValues=rgbColour.substring(4,rgbColour.indexOf(")"));return rgbValues.split(", ")};
curvyObject.rgb2Hex=function(rgbColour){try{var rgbArray=curvyObject.rgb2Array(rgbColour);var red=parseInt(rgbArray[0]);var green=parseInt(rgbArray[1]);var blue=parseInt(rgbArray[2]);var hexColour="#"+curvyObject.IntToHex(red)+curvyObject.IntToHex(green)+curvyObject.IntToHex(blue)}catch(e){var msg="getMessage"in e?e.getMessage():e.message;throw new Error("Error ("+msg+") converting RGB value to Hex in rgb2Hex");}return hexColour};
curvyObject.setOpacity=function(obj,opacity){opacity=opacity==100?99.999:opacity;if(curvyBrowser.isSafari&&obj.tagName!="IFRAME"){var rgbArray=curvyObject.rgb2Array(obj.style.backgroundColor);var red=parseInt(rgbArray[0]);var green=parseInt(rgbArray[1]);var blue=parseInt(rgbArray[2]);obj.style.backgroundColor="rgba("+red+", "+green+", "+blue+", "+opacity/100+")"}else if(typeof obj.style.opacity!=="undefined")obj.style.opacity=opacity/100;else if(typeof obj.style.MozOpacity!=="undefined")obj.style.MozOpacity=
opacity/100;else if(typeof obj.style.filter!=="undefined")obj.style.filter="alpha(opacity="+opacity+")";else if(typeof obj.style.KHTMLOpacity!=="undefined")obj.style.KHTMLOpacity=opacity/100};curvyCorners.addEvent=function(elm,evType,fn,useCapture){if(elm.addEventListener){elm.addEventListener(evType,fn,useCapture);return true}if(elm.attachEvent)return elm.attachEvent("on"+evType,fn);elm["on"+evType]=fn;return false};if(typeof addEvent==="undefined")addEvent=curvyCorners.addEvent;
curvyObject.getComputedColour=function(colour){var d=document.createElement("DIV");d.style.backgroundColor=colour;document.body.appendChild(d);if(window.getComputedStyle){var rtn=document.defaultView.getComputedStyle(d,null).getPropertyValue("background-color");d.parentNode.removeChild(d);if(rtn.substr(0,3)==="rgb")rtn=curvyObject.rgb2Hex(rtn);return rtn}else{var rng=document.body.createTextRange();rng.moveToElementText(d);rng.execCommand("ForeColor",false,colour);var iClr=rng.queryCommandValue("ForeColor");
var rgb="rgb("+(iClr&255)+", "+((iClr&65280)>>8)+", "+((iClr&16711680)>>16)+")";d.parentNode.removeChild(d);rng=null;return curvyObject.rgb2Hex(rgb)}};
curvyObject.format_colour=function(colour){if(colour!=""&&colour!="transparent")if(colour.substr(0,3)==="rgb")colour=curvyObject.rgb2Hex(colour);else if(colour.charAt(0)!=="#")colour=curvyObject.getComputedColour(colour);else if(colour.length===4)colour="#"+colour.charAt(1)+colour.charAt(1)+colour.charAt(2)+colour.charAt(2)+colour.charAt(3)+colour.charAt(3);return colour};
curvyCorners.getElementsByClass=function(searchClass,node){var classElements=new Array;if(node===undefined)node=document;searchClass=searchClass.split(".");var tag="*";if(searchClass.length===1){tag=searchClass[0];searchClass=false}else{if(searchClass[0])tag=searchClass[0];searchClass=searchClass[1]}var i,els,elsLen;if(tag.charAt(0)==="#"){els=document.getElementById(tag.substr(1));if(els)classElements.push(els)}else{els=node.getElementsByTagName(tag);elsLen=els.length;if(searchClass){var pattern=
new RegExp("(^|\\s)"+searchClass+"(\\s|$)");for(i=0;i<elsLen;++i)if(pattern.test(els[i].className))classElements.push(els[i])}else for(i=0;i<elsLen;++i)classElements.push(els[i])}return classElements};
curvyCorners.getElementsBySelector=function(selectors,parent){var ret;var sel=selectors[0];if(parent===undefined)parent=document;if(sel.indexOf("#")!==-1)ret=[parent.getElementById(sel.substr(1))];else ret=curvyCorners.getElementsByClass(sel,parent);if(selectors.length>1){var subret=[];for(var i=ret.length;--i>=0;)subret=subret.concat(curvyCorners.getElementsBySelector(selectors.slice(1),ret[i]));ret=subret}return ret};
if(curvyBrowser.supportsCorners){var curvyCornersNoAutoScan=true;curvyCorners.init=function(){}}else{curvyCorners.scanStyles=function(){function units(num){if(!parseInt(num))return"px";var matches=/^[\d.]+(\w+)$/.exec(num);return matches[1]}var t,i,j;if(curvyBrowser.isIE){function procIEStyles(rule){var style=rule.style;if(curvyBrowser.ieVer>6){var allR=style["-moz-border-radius"]||0;var tR=style["-moz-border-radius-topright"]||0;var tL=style["-moz-border-radius-topleft"]||0;var bR=style["-moz-border-radius-bottomright"]||
0;var bL=style["-moz-border-radius-bottomleft"]||0}else{var allR=style["moz-border-radius"]||0;var tR=style["moz-border-radius-topright"]||0;var tL=style["moz-border-radius-topleft"]||0;var bR=style["moz-border-radius-bottomright"]||0;var bL=style["moz-border-radius-bottomleft"]||0}if(allR){var t=allR.split("/");t=t[0].split(/\s+/);if(t[t.length-1]==="")t.pop();switch(t.length){case 3:tL=t[0];tR=bL=t[1];bR=t[2];allR=false;break;case 2:tL=bR=t[0];tR=bL=t[1];allR=false;case 1:break;case 4:tL=t[0];tR=
t[1];bR=t[2];bL=t[3];allR=false;break;default:curvyCorners.alert("Illegal corners specification: "+allR)}}if(allR||tL||tR||bR||bL){var settings=new curvyCnrSpec(rule.selectorText);if(allR)settings.setcorner(null,null,parseInt(allR),units(allR));else{if(tR)settings.setcorner("t","r",parseInt(tR),units(tR));if(tL)settings.setcorner("t","l",parseInt(tL),units(tL));if(bL)settings.setcorner("b","l",parseInt(bL),units(bL));if(bR)settings.setcorner("b","r",parseInt(bR),units(bR))}curvyCorners(settings)}}
for(t=0;t<document.styleSheets.length;++t)try{if(document.styleSheets[t].imports)for(i=0;i<document.styleSheets[t].imports.length;++i)for(j=0;j<document.styleSheets[t].imports[i].rules.length;++j)procIEStyles(document.styleSheets[t].imports[i].rules[j]);for(i=0;i<document.styleSheets[t].rules.length;++i)procIEStyles(document.styleSheets[t].rules[i])}catch(e){if(typeof curvyCornersVerbose!=="undefined"&&curvyCornersVerbose)alert(e.message+" - ignored")}}else if(curvyBrowser.isOp)for(t=0;t<document.styleSheets.length;++t){if(operasheet.contains_border_radius(t)){j=
new operasheet(t);for(i in j.rules)if(!isNaN(i))curvyCorners(j.rules[i])}}else curvyCorners.alert("Scanstyles does nothing in Webkit/Firefox/Opera")};curvyCorners.init=function(){if(arguments.callee.done)return;arguments.callee.done=true;if(curvyBrowser.isWebKit&&curvyCorners.init.timer){clearInterval(curvyCorners.init.timer);curvyCorners.init.timer=null}curvyCorners.scanStyles()}}
if(typeof curvyCornersNoAutoScan==="undefined"||curvyCornersNoAutoScan===false)if(curvyBrowser.isOp)document.addEventListener("DOMContentLoaded",curvyCorners.init,false);else curvyCorners.addEvent(window,"load",curvyCorners.init,false);window.addEvent("load",function(){$("facebook").addEvents({mouseenter:function(){this.set("tween",{duration:1E3,transition:Fx.Transitions.Bounce.easeOut}).tween("width","292px")},mouseleave:function(){this.set("tween",{}).tween("width","0")}})});

