jQuery.fn.reflect=function(A){A=jQuery.extend({height:0.5,opacity:0.5,inline:false},A);this.each(function(){var C=null;var B=null;if(A.inline){var D=this.className.split(" ");for(j=0;j<D.length;j++){if(D[j].indexOf("rheight")==0){A.height=D[j].substring(7)/100}else{if(D[j].indexOf("ropacity")==0){A.opacity=D[j].substring(8)/100}}}}jQuery.Reflection.add(this,A)});return this};jQuery.Reflection={add:function(D,N){jQuery.Reflection.remove(D);try{var K=document.createElement("div");var B=D;var E=B.className.split(" ");var G="";for(j=0;j<E.length;j++){if(E[j]!="reflect"){if(G){G+=" "}G+=E[j]}}var I=Math.floor(B.height*N.height);var H=Math.floor(B.height*(1+N.height));var M=B.width;if(document.all&&!window.opera){K.className=G;B.className="reflected";K.style.cssText=B.style.cssText;B.style.cssText="vertical-align: bottom";var F=document.createElement("img");F.src=B.src;F.style.width=M+"px";F.style.marginBottom="-"+(B.height-I)+"px";F.style.filter="flipv progid:DXImageTransform.Microsoft.Alpha(opacity="+(N.opacity*100)+", style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy="+(N.height*100)+")";K.style.width=M+"px";K.style.height=H+"px";B.parentNode.replaceChild(K,B);K.appendChild(B);K.appendChild(F)}else{var C=document.createElement("canvas");if(C.getContext){K.className=G;B.className="reflected";K.style.cssText=B.style.cssText;B.style.cssText="vertical-align: bottom";var A=C.getContext("2d");C.style.height=I+"px";C.style.width=M+"px";C.height=I;C.width=M;K.style.width=M+"px";K.style.height=H+"px";B.parentNode.replaceChild(K,B);K.appendChild(B);K.appendChild(C);A.save();A.translate(0,D.height-1);A.scale(1,-1);A.drawImage(D,0,0,M,D.height);A.restore();A.globalCompositeOperation="destination-out";var L=A.createLinearGradient(0,0,0,I);L.addColorStop(1,"rgba(255, 255, 255, 1.0)");L.addColorStop(0,"rgba(255, 255, 255, "+(1-N.opacity)+")");A.fillStyle=L;if(navigator.appVersion.indexOf("WebKit")!=-1){A.fill()}else{A.fillRect(0,0,M,I*2)}}}}catch(J){}},remove:function(A){if(A.className=="reflected"){A.className=A.parentNode.className;A.parentNode.parentNode.replaceChild(A,A.parentNode)}}};
