if(!document.myGetElementsByClassName)document.myGetElementsByClassName=function(a){for(var c=document.getElementsByTagName("*")||document.all,d=[],b=0;b<c.length;b++)for(var l=c[b],f=l.className.split(" "),m=0;m<f.length;m++)if(f[m]==a){d.push(l);break}return d}; var Reflection={defaultHeight:0.5,defaultOpacity:0.5,add:function(a,c){Reflection.remove(a);doptions={height:Reflection.defaultHeight,opacity:Reflection.defaultOpacity};if(c)for(var d in doptions)c[d]||(c[d]=doptions[d]);else c=doptions;try{var b=document.createElement("div"),l=a.className.split(" ");d="";for(j=0;j<l.length;j++)if(l[j]!="reflect"){if(d)d+=" ";d+=l[j]}var f=Math.floor(a.height*c.height),m=Math.floor(a.height*(1+c.height)),g=a.width;if(document.all&&!window.opera){if(a.parentElement.tagName== "A"){b=document.createElement("a");b.href=a.parentElement.href}b.className=d;a.className="reflected";b.style.cssText=a.style.cssText;a.style.cssText="vertical-align: bottom";var h=document.createElement("img");h.src=a.src;h.style.width=g+"px";h.style.display="block";h.style.height=a.height+"px";h.style.marginBottom="-"+(a.height-f)+"px";h.style.filter="flipv progid:DXImageTransform.Microsoft.Alpha(opacity="+c.opacity*100+", style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy="+c.height* 100+")";b.style.width=g+"px";b.style.height=m+"px";a.parentNode.replaceChild(b,a);b.appendChild(a);b.appendChild(h)}else{var k=document.createElement("canvas");if(k.getContext){b.className=d;a.className="reflected";b.style.cssText=a.style.cssText;a.style.cssText="vertical-align: bottom";var e=k.getContext("2d");k.style.height=f+"px";k.style.width=g+"px";k.height=f;k.width=g;b.style.width=g+"px";b.style.height=m+"px";a.parentNode.replaceChild(b,a);b.appendChild(a);b.appendChild(k);e.save();e.translate(0, a.height-1);e.scale(1,-1);e.drawImage(a,0,0,g,a.height);e.restore();e.globalCompositeOperation="destination-out";var n=e.createLinearGradient(0,0,0,f);n.addColorStop(1,"rgba(255, 255, 255, 1.0)");n.addColorStop(0,"rgba(255, 255, 255, "+(1-c.opacity)+")");e.fillStyle=n;e.rect(0,0,g,f*2);e.fill()}}}catch(o){}},remove:function(a){if(a.className=="reflected"){a.className=a.parentNode.className;a.parentNode.parentNode.replaceChild(a,a.parentNode)}}}; function addReflections(){var a=document.myGetElementsByClassName("reflect");for(i=0;i<a.length;i++){var c=null,d=null,b=a[i].className.split(" ");for(j=0;j<b.length;j++)if(b[j].indexOf("rheight")==0)c=b[j].substring(7)/100;else if(b[j].indexOf("ropacity")==0)d=b[j].substring(8)/100;Reflection.add(a[i],{height:c,opacity:d})}}var previousOnload=window.onload;window.onload=function(){previousOnload&&previousOnload();addReflections()};

