/*! slimbox v2.05 - the ultimate lightweight lightbox clone for jquery (c) 2007-2013 christophe beyls mit-style license. */ (function(w){var e=w(window),u,f,f=-1,n,x,d,v,y,l,r,m=!window.xmlhttprequest,s=[],l=document.documentelement,k={},t=new image(),j=new image(),h,a,g,p,i,d,g,c,a,k;w(function(){w("body").append(w([h=w('
').click(c)[0],a=w('
')[0],g=w('
')[0]]).css("display","none"));g=w('
').appendto(a).append(p=w('
').append([i=w('').click(b)[0],d=w('').click(e)[0]])[0])[0];c=w('
').appendto(g).append([w('').click(c)[0],a=w('
')[0],k=w('
')[0],w('
')[0]])[0]});w.slimbox=function(o,n,m){u=w.extend({loop:false,overlayopacity:0.8,overlayfadeduration:400,resizeduration:400,resizeeasing:"swing",initialwidth:250,initialheight:250,imagefadeduration:400,captionanimationduration:400,countertext:"image {x} of {y}",closekeys:[27,88,67],previouskeys:[37,80],nextkeys:[39,78]},m);if(typeof o=="string"){o=[[o,n]];n=0}y=e.scrolltop()+(e.height()/2);l=u.initialwidth;r=u.initialheight;w(a).css({top:math.max(0,y-(r/2)),width:l,height:r,marginleft:-l/2}).show();v=m||(h.currentstyle&&(h.currentstyle.position!="fixed"));if(v){h.style.position="absolute"}w(h).css("opacity",u.overlayopacity).fadein(u.overlayfadeduration);z();j(1);f=o;u.loop=u.loop&&(f.length>1);return b(n)};w.fn.slimbox=function(m,p,o){p=p||function(q){return[q.href,q.title]};o=o||function(){return true};var n=this;return n.unbind("click").click(function(){var s=this,u=0,t,q=0,r;t=w.grep(n,function(w,v){return o.call(s,w,v)});for(r=t.length;q=0)?c():(m(n,u.nextkeys)>=0)?e():(m(n,u.previouskeys)>=0)?b():null}function b(){return b(x)}function e(){return b(d)}function b(m){if(m>=0){f=m;n=f[f][0];x=(f||(u.loop?f.length:0))-1;d=((f+1)%f.length)||(u.loop?0:-1);q();a.classname="lbloading";k=new image();k.onload=i;k.src=n}return false}function i(){a.classname="";w(g).css({backgroundimage:"url("+n+")",visibility:"hidden",display:""});w(p).width(k.width);w([p,i,d]).height(k.height);w(a).html(f[f][1]||"");w(k).html((((f.length>1)&&u.countertext)||"").replace(/{x}/,f+1).replace(/{y}/,f.length));if(x>=0){t.src=f[x][0]}if(d>=0){j.src=f[d][0]}l=g.offsetwidth;r=g.offsetheight;var m=math.max(0,y-(r/2));if(a.offsetheight!=r){w(a).animate({height:r,top:m},u.resizeduration,u.resizeeasing)}if(a.offsetwidth!=l){w(a).animate({width:l,marginleft:-l/2},u.resizeduration,u.resizeeasing)}w(a).queue(function(){w(g).css({width:l,top:m+r,marginleft:-l/2,visibility:"hidden",display:""});w(g).css({display:"none",visibility:"",opacity:""}).fadein(u.imagefadeduration,h)})}function h(){if(x>=0){w(i).show()}if(d>=0){w(d).show()}w(c).css("margintop",-c.offsetheight).animate({margintop:0},u.captionanimationduration);g.style.visibility=""}function q(){k.onload=null;k.src=t.src=j.src=n;w([a,g,c]).stop(true);w([i,d,g,g]).hide()}function c(){if(f>=0){q();f=x=d=-1;w(a).hide();w(h).stop().fadeout(u.overlayfadeduration,j)}return false}})(jquery); // autoload code block (may be changed or removed) if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.useragent)) { jquery(function($) { $("a[rel^='lightbox']").slimbox({/* put custom options here */}, null, function(el) { return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel)); }); }); }