(function(a,b,c){function j(c,d,e){e=b.createElement("div"),c&&(e.id=m+c),e.style.cssText=d||"";return a(e)}function i(a,b){return Math.round((/%/.test(a)?(b==="x"?G.width():G.height())/100:1)*parseInt(a,10))}function h(a){return R.photo||/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(a)}function g(b){R=a.extend({},a.data(W,l));for(b in R)a.isFunction(R[b])&&b.substring(0,2)!=="on"&&(R[b]=R[b].call(W));R.rel=R.rel||W.rel||"nofollow",R.href=R.href||a(W).attr("href"),R.title=R.title||W.title,typeof R.href=="string"&&(R.href=a.trim(R.href))}function f(b,c){c&&c.call(W),a.event.trigger(b)}function e(){var a,b=m+"Slideshow_",c="click."+m,d,e,f;R.slideshow&&F[1]?(d=function(){M.text(R.slideshowStop).unbind(c).bind(q,function(){if(X"),b.open=!0}c&&(b.onComplete=c),e.each(function(){a.data(this,l,a.extend({},a.data(this,l)||k,b)),a(this).addClass(n)}),(a.isFunction(b.open)&&b.open.call(e)||b.open)&&d(e[0]);return e},bc.init=function(){G=a(c),y=j().attr({id:l,"class":u?m+(v?"IE6":"IE"):""}),x=j("Overlay",v?"position:absolute":"").hide(),z=j("Wrapper"),A=j("Content").append(H=j("LoadedContent","width:0; height:0; overflow:hidden"),J=j("LoadingOverlay").add(j("LoadingGraphic")),K=j("Title"),L=j("Current"),N=j("Next"),O=j("Previous"),M=j("Slideshow").bind(o,e),P=j("Close")),z.append(j().append(j("TopLeft"),B=j("TopCenter"),j("TopRight")),j(!1,"clear:left").append(C=j("MiddleLeft"),A,D=j("MiddleRight")),j(!1,"clear:left").append(j("BottomLeft"),E=j("BottomCenter"),j("BottomRight"))).children().children().css({"float":"left"}),I=j(!1,"position:absolute; width:9999px; visibility:hidden; display:none"),a("body").prepend(x,y.append(z,I)),A.children().hover(function(){a(this).addClass("hover")},function(){a(this).removeClass("hover")}).addClass("hover"),S=B.height()+E.height()+A.outerHeight(!0)-A.height(),T=C.width()+D.width()+A.outerWidth(!0)-A.width(),U=H.outerHeight(!0),V=H.outerWidth(!0),y.css({"padding-bottom":S,"padding-right":T}).hide(),N.click(function(){bc.next()}),O.click(function(){bc.prev()}),P.click(function(){bc.close()}),Q=N.add(O).add(L).add(M),A.children().removeClass("hover"),x.click(function(){R.overlayClose&&bc.close()}),a(b).bind("keydown."+m,function(a){var b=a.keyCode;Z&&R.escKey&&b===27&&(a.preventDefault(),bc.close()),Z&&R.arrowKey&&F[1]&&(b===37?(a.preventDefault(),O.click()):b===39&&(a.preventDefault(),N.click()))})},bc.remove=function(){y.add(x).remove(),a("."+n).removeData(l).removeClass(n)},bc.position=function(a,c){function d(a){B[0].style.width=E[0].style.width=A[0].style.width=a.style.width,J[0].style.height=J[1].style.height=A[0].style.height=C[0].style.height=D[0].style.height=a.style.height}var e=0,f=0;G.unbind("resize."+m),y.hide(),R.fixed&&!v?y.css({position:"fixed"}):(e=G.scrollTop(),f=G.scrollLeft(),y.css({position:"absolute"})),R.right!==!1?f+=Math.max(G.width()-R.w-V-T-i(R.right,"x"),0):R.left!==!1?f+=i(R.left,"x"):f+=Math.round(Math.max(G.width()-R.w-V-T,0)/2),R.bottom!==!1?e+=Math.max(b.documentElement.clientHeight-R.h-U-S-i(R.bottom,"y"),0):R.top!==!1?e+=i(R.top,"y"):e+=Math.round(Math.max(b.documentElement.clientHeight-R.h-U-S,0)/2),y.show(),a=y.width()===R.w+V&&y.height()===R.h+U?0:a||0,z[0].style.width=z[0].style.height="9999px",y.dequeue().animate({width:R.w+V,height:R.h+U,top:e,left:f},{duration:a,complete:function(){d(this),$=!1,z[0].style.width=R.w+V+T+"px",z[0].style.height=R.h+U+S+"px",c&&c(),setTimeout(function(){G.bind("resize."+m,bc.position)},1)},step:function(){d(this)}})},bc.resize=function(a){if(Z){a=a||{},a.width&&(R.w=i(a.width,"x")-V-T),a.innerWidth&&(R.w=i(a.innerWidth,"x")),H.css({width:R.w}),a.height&&(R.h=i(a.height,"y")-U-S),a.innerHeight&&(R.h=i(a.innerHeight,"y"));if(!a.innerHeight&&!a.height){var b=H.wrapInner("
").children();R.h=b.height(),b.replaceWith(b.children())}H.css({height:R.h}),bc.position(R.transition==="none"?0:R.speed)}},bc.prep=function(b){function d(){R.w=R.w||H.width(),R.w=R.mw&&R.mw1?(typeof R.current=="string"&&L.html(R.current.replace("{current}",X+1).replace("{total}",j)).show(),N[R.loop||X")[0].src=i),h(d)&&(a("
")[0].src=d))):Q.hide(),R.iframe?(k=a("").addClass(m+"Iframe")[0],R.fastIframe?n():a(k).one("load",n),k.name=m+ +(new Date),k.src=R.href,R.scrolling||(k.scrolling="no"),u&&(k.frameBorder=0,k.allowTransparency="true"),a(k).appendTo(H).one(t,function(){k.src="//about:blank"})):n(),R.transition==="fade"?y.fadeTo(g,1,b):b())},R.transition==="fade"?y.fadeTo(g,0,function(){bc.position(0,e)}):bc.position(g,e)}},bc.load=function(b){var c,d,e=bc.prep;$=!0,Y=!1,W=F[X],b||g(),f(t),f(p,R.onLoad),R.h=R.height?i(R.height,"y")-U-S:R.innerHeight&&i(R.innerHeight,"y"),R.w=R.width?i(R.width,"x")-V-T:R.innerWidth&&i(R.innerWidth,"x"),R.mw=R.w,R.mh=R.h,R.maxWidth&&(R.mw=i(R.maxWidth,"x")-V-T,R.mw=R.w&&R.wR.mw&&(a=(Y.width-R.mw)/Y.width,d()),R.mh&&Y.height>R.mh&&(a=(Y.height-R.mh)/Y.height,d())),R.h&&(Y.style.marginTop=Math.max(R.h-Y.height,0)/2+"px"),F[1]&&(X