if(!ask){var ask={};
}if(!a10){var a10={};
}a10.jf=function(C,B,A,D){this.initialized=false;
this.current=0;
this.target=0;
this.timer=0;
this.currentIndex=0;
this.jfDivId=C;
this.jfCaptionId=B;
this.jfDivWidth=0;
this.aspectRatio=1.1425,this.allImages=new Array();
this.allCaptions=new Array();
this.action=null;
this.init(A,D);
};
a10.jf.prototype.step=function(){if(this.target<this.current-1||this.target>this.current+1){this.moveTo(this.current+(this.target-this.current)/5);
var A=this;
window.setTimeout(function(){A.step();
},50);
this.timer=1;
}else{this.timer=0;
if(!this.initialized){this.initialized=true;
}}};
a10.jf.prototype.glideTo=function(A,B){this.target=A;
if(this.timer==0){var D=this;
window.setTimeout(function(){D.step();
},50);
this.timer=1;
}var C=document.getElementById(this.jfCaptionId);
if(C){C.innerHTML=this.allCaptions[B];
}this.currentIndex=B;
};
a10.jf.prototype.moveTo=function(J){this.current=J;
var A=document.getElementById(this.jfDivId);
var B=this.jfDivWidth;
var N=B*0.5;
var E=B*0.6;
var I=A.childNodes.length;
for(var G=0;
G<this.allImages.length;
G++){var D=this.allImages[G];
if(J<0){I++;
}else{I--;
}if(D.i<this.currentIndex-4||D.i>this.currentIndex+4){D.style.visibility="hidden";
J+=150;
continue;
}else{D.style.visibility="visible";
}var H=Math.sqrt(10000+J*J)+100;
var C=J/H*N+N;
D.style.left=Math.round(C-50/H*E)+"px";
D.style.top=Math.round((B*0.34-(1/this.aspectRatio*115)/H*N)*0.5)+"px";
D.style.width=Math.round(100/H*E)+"px";
D.style.height=Math.round(100/this.aspectRatio/H*E)+"px";
D.style.zIndex=I;
D.childNodes[0].style.width=D.style.width;
D.childNodes[1].style.width=D.style.width;
var M=Math.round(100/this.aspectRatio/H*E/5);
if(document.all){D.childNodes[1].style.height=M*4+"px";
}else{D.childNodes[1].style.height=M+"px";
}if(D.i==this.currentIndex){var L=this.allImages[this.currentIndex].json;
var K=this.action;
D.onclick=function(){K(L);
};
}else{var F=this;
D.onclick=function(){F.glideTo(this.x_pos,this.i);
};
}J+=150;
}};
a10.jf.prototype.init=function(E,D){var G=document.getElementById(this.jfDivId);
this.jfDivWidth=parseInt(G.style.width);
var A=this.jfDivWidth*0.4;
var F=document.getElementById(this.jfCaptionId);
if(F){F.style.zIndex=100;
}for(var C=0;
C<E.length;
C++){var B=document.createElement("img");
B.src=E[C].src;
B.alt=E[C].alt;
B.className="reflect cel";
B.style.cursor="pointer";
G.appendChild(B);
a10.jf.addReflection(B,{height:0.25,opacity:0.5});
this.allImages[C]=B.parentNode;
this.allImages[C].json=E[C];
this.allCaptions[C]=B.alt;
B.parentNode.onclick=function(){this.glideTo(-C*150,C);
};
B.parentNode.x_pos=(-C*150);
B.parentNode.i=C;
B.parentNode.style.visibility="hidden";
B.removeAttribute("width");
B.removeAttribute("height");
}this.glideTo(-150*D,D);
};
a10.jf.prototype.shift=function(B){var A=this.currentIndex+B;
if(A<0||A>=this.allImages.length){return ;
}this.glideTo(-150*A,A);
};
a10.jf.addReflection=function(E,M){try{var J=document.createElement("div");
var C=E;
var F=C.className.split(" ");
var G="";
for(j=0;
j<F.length;
j++){if(F[j]!="reflect"){if(G){G+=" ";
}G+=F[j];
}}var N=Math.floor(C.height*M["height"]);
var H=Math.floor(C.height*(1+M["height"]));
var L=C.width;
if(document.all&&!window.opera){J.className=G;
C.className="reflected";
J.style.cssText=C.style.cssText;
C.style.cssText="vertical-align: bottom";
var A=document.createElement("img");
A.src=C.src;
A.style.width=L+"px";
A.style.display="block";
A.style.height=C.height+"px";
A.style.display="block";
A.style.marginBottom="-"+(C.height-N)+"px";
A.style.filter="flipv progid:DXImageTransform.Microsoft.Alpha(opacity="+(M["opacity"]*100)+", style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy="+(M["height"]*100)+")";
J.style.width=L+"px";
J.style.height=H+"px";
C.parentNode.replaceChild(J,C);
J.appendChild(C);
J.appendChild(A);
}else{var D=document.createElement("canvas");
if(D.getContext){J.className=G;
C.className="reflected";
J.style.cssText=C.style.cssText;
C.style.cssText="vertical-align: bottom";
var B=D.getContext("2d");
D.style.height=N+"px";
D.style.width=L+"px";
D.style.marginTop="-1px";
D.style.display="block";
D.height=N;
D.width=L;
J.style.width=L+"px";
J.style.height=H+"px";
C.parentNode.replaceChild(J,C);
J.appendChild(C);
J.appendChild(D);
B.save();
B.translate(0,E.height-1);
B.scale(1,-1);
B.drawImage(E,0,0,L,E.height);
B.restore();
B.globalCompositeOperation="destination-out";
var K=B.createLinearGradient(0,0,0,N);
K.addColorStop(1,"rgba(255, 255, 255, 1.0)");
K.addColorStop(0,"rgba(255, 255, 255, "+(1-M["opacity"])+")");
B.fillStyle=K;
B.rect(0,0,L,N*2);
B.fill();
}}}catch(I){}};
if(typeof jfLoaded!="undefined"){jfLoaded();
}
