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