jQuery(function(a){a("a[rel^='lightbox']").slimbox({},null,function(b){return(this==b)||((this.rel.length>8)&&(this.rel==b.rel))})});
/*
	Slimbox v2.02 - The ultimate lightweight Lightbox clone for jQuery
	(c) 2007-2009 Christophe Beyls <http://www.digitalia.be>
	MIT-style license.
*/
(function(x){var F=x(window),u,g,G=-1,o,y,E,v,z,M,s,n=!window.XMLHttpRequest,e=window.opera&&(document.compatMode=="CSS1Compat")&&(x.browser.version>=9.3),m=document.documentElement,l={},t=new Image(),K=new Image(),I,a,h,q,J,d,H,c,B,L;x(function(){x("body").append(x([I=x('<div id="lbOverlay" />')[0],a=x('<div id="lbCenter" />')[0],H=x('<div id="lbBottomContainer" />')[0]]).css("display","none"));h=x('<div id="lbImage" />').appendTo(a).append(q=x('<div style="position: relative;" />').append([J=x('<a id="lbPrevLink" href="#" />').click(C)[0],d=x('<a id="lbNextLink" href="#" />').click(f)[0]])[0])[0];c=x('<div id="lbBottom" />').appendTo(H).append([x('<a id="lbCloseLink" href="#" />').add(I).click(D)[0],B=x('<div id="lbCaption" />')[0],L=x('<div id="lbNumber" />')[0],x('<div style="clear: both;" />')[0]])[0]});x.slimbox=function(P,O,N){u=x.extend({loop:false,overlayOpacity:0.8,overlayFadeDuration:200,resizeDuration:200,resizeEasing:"swing",initialWidth:250,initialHeight:250,imageFadeDuration:300,captionAnimationDuration:100,counterText:"Bild {x} von {y}",closeKeys:[27,88,67],previousKeys:[37,80],nextKeys:[39,78]},N);if(typeof P=="string"){P=[[P,O]];O=0}z=F.scrollTop()+((e?m.clientHeight:F.height())/2);M=u.initialWidth;s=u.initialHeight;x(a).css({top:Math.max(0,z-(s/2)),width:M,height:s,marginLeft:-M/2}).show();v=n||(I.currentStyle&&(I.currentStyle.position!="fixed"));if(v){I.style.position="absolute"}x(I).css("opacity",u.overlayOpacity).fadeIn(u.overlayFadeDuration);A();k(1);g=P;u.loop=u.loop&&(g.length>1);return b(O)};x.fn.slimbox=function(N,Q,P){Q=Q||function(R){return[R.href,R.title]};P=P||function(){return true};var O=this;return O.unbind("click").click(function(){var T=this,V=0,U,R=0,S;U=x.grep(O,function(X,W){return P.call(T,X,W)});U=w(U);for(S=U.length;R<S;++R){if(U[R]==T){V=R}U[R]=Q(U[R],R)}return x.slimbox(U,V,N)})};function w(P){var N=[];var O=0;var Q=0;var T=false;var R=0;var S=0;O=P.length;for(R=0;R<O;R++){Q=N.length;T=false;for(S=0;S<Q;S++){if(P[R].href==N[S].href){T=true;break}}if(!T){N.push(P[R])}}return N}function A(){var O=F.scrollLeft(),N=e?m.clientWidth:F.width();x([a,H]).css("left",O+(N/2));if(v){x(I).css({left:O,top:F.scrollTop(),width:N,height:F.height()})}}function k(N){x("object").add(n?"select":"embed").each(function(P,Q){if(N){x.data(Q,"slimbox",Q.style.visibility)}Q.style.visibility=N?"hidden":x.data(Q,"slimbox")});var O=N?"bind":"unbind";F[O]("scroll resize",A);x(document)[O]("keydown",p)}function p(P){var O=P.keyCode,N=x.inArray;return(N(O,u.closeKeys)>=0)?D():(N(O,u.nextKeys)>=0)?f():(N(O,u.previousKeys)>=0)?C():false}function C(){return b(y)}function f(){return b(E)}function b(N){if(N>=0){G=N;o=g[G][0];y=(G||(u.loop?g.length:0))-1;E=((G+1)%g.length)||(u.loop?0:-1);r();a.className="lbLoading";l=new Image();l.onload=j;l.src=o}return false}function j(){a.className="";x(h).css({backgroundImage:"url("+o+")",visibility:"hidden",display:""});x(q).width(l.width);x([q,J,d]).height(l.height);x(B).html(g[G][1]||"");x(L).html((((g.length>1)&&u.counterText)||"").replace(/{x}/,G+1).replace(/{y}/,g.length));if(y>=0){t.src=g[y][0]}if(E>=0){K.src=g[E][0]}M=h.offsetWidth;s=h.offsetHeight;var N=Math.max(0,z-(s/2));if(a.offsetHeight!=s){x(a).animate({height:s,top:N},u.resizeDuration,u.resizeEasing)}if(a.offsetWidth!=M){x(a).animate({width:M,marginLeft:-M/2},u.resizeDuration,u.resizeEasing)}x(a).queue(function(){x(H).css({width:M,top:N+s,marginLeft:-M/2,visibility:"hidden",display:""});x(h).css({display:"none",visibility:"",opacity:""}).fadeIn(u.imageFadeDuration,i)})}function i(){if(y>=0){x(J).show()}if(E>=0){x(d).show()}x(c).css("marginTop",-c.offsetHeight).animate({marginTop:0},u.captionAnimationDuration);H.style.visibility=""}function r(){l.onload=null;l.src=t.src=K.src=o;x([a,h,c]).stop(true);x([J,d,h,H]).hide()}function D(){if(G>=0){r();G=y=E=-1;x(a).hide();x(I).stop().fadeOut(u.overlayFadeDuration,k)}return false}})(jQuery);
