var ImageReflection={defaultHeight:0.5,defaultOpacity:0.5,add:function(_1,_2){ImageReflection.remove(_1);doptions={"height":ImageReflection.defaultHeight,"opacity":ImageReflection.defaultOpacity};if(_2){for(var i in doptions){if(!_2[i]){_2[i]=doptions[i];}}}else{_2=doptions;}try{var d=document.createElement("div");var p=_1;var _6=p.className.split(" ");var _7="";for(j=0;j<_6.length;j++){if(_6[j]!="reflect"){if(_7){_7+=" ";}_7+=_6[j];}}var _8=Math.floor(p.height*_2["height"]);var _9=Math.floor(p.height*(1+_2["height"]));var _a=p.width;if(document.all&&!window.opera){d.className=_7;p.className="reflected";d.style.cssText=p.style.cssText;p.style.cssText="vertical-align: bottom";var _b=document.createElement("img");_b.src=p.src;_b.style.width=_a+"px";_b.style.marginBottom="-"+(p.height-_8)+"px";_b.style.filter="flipv progid:DXImageTransform.Microsoft.Alpha(opacity="+(_2["opacity"]*100)+", style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy="+(_2["height"]*100)+")";d.style.width=_a+"px";d.style.height=_9+"px";p.parentNode.replaceChild(d,p);d.appendChild(p);d.appendChild(_b);}else{var _c=document.createElement("canvas");if(_c.getContext){d.className=_7;p.className="reflected";d.style.cssText=p.style.cssText;p.style.cssText="vertical-align: bottom";var _d=_c.getContext("2d");_c.style.height=_8+"px";_c.style.width=_a+"px";_c.height=_8;_c.width=_a;d.style.width=_a+"px";d.style.height=_9+"px";p.parentNode.replaceChild(d,p);d.appendChild(p);d.appendChild(_c);_d.save();_d.translate(0,_1.height-1);_d.scale(1,-1);_d.drawImage(_1,0,0,_a,_1.height);_d.restore();_d.globalCompositeOperation="destination-out";var _e=_d.createLinearGradient(0,0,0,_8);_e.addColorStop(1,"rgba(255, 255, 255, 1.0)");_e.addColorStop(0,"rgba(255, 255, 255, "+(1-_2["opacity"])+")");_d.fillStyle=_e;if(navigator.appVersion.indexOf("WebKit")!=-1){_d.fill();}else{_d.fillRect(0,0,_a,_8*2);}}}}catch(e){}},remove:function(_f){if(_f.className=="reflected"){_f.className=_f.parentNode.className;_f.parentNode.parentNode.replaceChild(_f,_f.parentNode);}}};
