(function(C,Q){var D={transition:"elastic",speed:300,width:false,initialWidth:"600",innerWidth:false,maxWidth:false,height:false,initialHeight:"450",innerHeight:false,maxHeight:false,scalePhotos:true,scrolling:true,inline:false,html:false,iframe:false,photo:false,href:false,title:false,rel:false,opacity:0.9,preloading:true,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:false,loop:true,slideshow:false,slideshowAuto:true,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:false,onLoad:false,onComplete:false,onCleanup:false,onClosed:false,overlayClose:true,escKey:true,arrowKey:true},u="colorbox",N="cbox",P=N+"_open",e=N+"_load",O=N+"_complete",r=N+"_cleanup",V=N+"_closed",i=N+"_purge",J=N+"_loaded",s=C.browser.msie&&!C.support.opacity,Y=s&&C.browser.version<7,U=N+"_IE6",L,Z,aa,d,A,n,b,K,c,T,G,j,h,m,q,R,p,M,w,ab,l,g,a,t,k,B,W,y,S,F=false,E,o=N+"Element";function I(ad,ac){ad=ad?' id="'+N+ad+'"':"";ac=ac?' style="'+ac+'"':"";return C("<div"+ad+ac+"/>")}function H(ac,ad){ad=ad==="x"?T.width():T.height();return(typeof ac==="string")?Math.round((ac.match(/%/)?(ad/100)*parseInt(ac,10):parseInt(ac,10))):ac}function x(ac,ad){ac=C.isFunction(ac)?ac.call(ad):ac;return W.photo||ac.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i)}function X(ad){for(var ac in ad){if(C.isFunction(ad[ac])&&ac.substring(0,2)!=="on"){ad[ac]=ad[ac].call(t)}}ad.rel=ad.rel||t.rel||"nofollow";ad.href=ad.href||C(t).attr("href");ad.title=ad.title||t.title;return ad}function z(ac,ad){if(ad){ad.call(t)}C.event.trigger(ac)}function v(){var ad,af=N+"Slideshow_",ag,ae,ac;if(W.slideshow&&c[1]){ag=function(){R.text(W.slideshowStop).bind(O,function(){ad=setTimeout(E.next,W.slideshowSpeed)}).bind(e,function(){clearTimeout(ad)}).one("click",function(){ae()});Z.removeClass(af+"off").addClass(af+"on")};ae=function(){clearTimeout(ad);R.text(W.slideshowStart).unbind(O+" "+e).one("click",function(){ag();ad=setTimeout(E.next,W.slideshowSpeed)});Z.removeClass(af+"on").addClass(af+"off")};R.bind(V,function(){R.unbind();clearTimeout(ad);Z.removeClass(af+"off "+af+"on")});if(W.slideshowAuto){ag()}else{ae()}}}function f(ac){if(!F){t=ac;W=X(C.extend({},C.data(t,u)));c=C(t);B=0;if(W.rel!=="nofollow"){c=C("."+o).filter(function(){var ae=C.data(this,u).rel||this.rel;return(ae===W.rel)});B=c.index(t);if(B===-1){c=c.add(t);B=c.length-1}}if(!y){y=S=true;Z.show();k=t;try{k.blur()}catch(ad){}L.css({opacity:+W.opacity,cursor:W.overlayClose?"pointer":"auto"}).show();W.w=H(W.initialWidth,"x");W.h=H(W.initialHeight,"y");E.position(0);if(Y){T.bind("resize."+U+" scroll."+U,function(){L.css({width:T.width(),height:T.height(),top:T.scrollTop(),left:T.scrollLeft()})}).trigger("scroll."+U)}z(P,W.onOpen);q.add(M).add(p).add(R).add(m).hide();w.html(W.close).show()}E.load(true)}}E=C.fn[u]=C[u]=function(ac,af){var ad=this,ae;if(!ad[0]&&ad.selector){return ad}ac=ac||{};if(af){ac.onComplete=af}if(!ad[0]||ad.selector===undefined){ad=C("<a/>");ac.open=true}ad.each(function(){C.data(this,u,C.extend({},C.data(this,u)||D,ac));C(this).addClass(o)});ae=ac.open;if(C.isFunction(ae)){ae=ae.call(ad)}if(ae){f(ad[0])}return ad};E.init=function(){T=C(Q);Z=I().attr({id:u,"class":s?N+"IE":""});L=I("Overlay",Y?"position:absolute":"").hide();aa=I("Wrapper");d=I("Content").append(G=I("LoadedContent","width:0; height:0; overflow:hidden"),h=I("LoadingOverlay").add(I("LoadingGraphic")),m=I("Title"),q=I("Current"),p=I("Next"),M=I("Previous"),R=I("Slideshow").bind(P,v),w=I("Close"));aa.append(I().append(I("TopLeft"),A=I("TopCenter"),I("TopRight")),I(false,"clear:left").append(n=I("MiddleLeft"),d,b=I("MiddleRight")),I(false,"clear:left").append(I("BottomLeft"),K=I("BottomCenter"),I("BottomRight"))).children().children().css({"float":"left"});j=I(false,"position:absolute; width:9999px; visibility:hidden; display:none");C("body").prepend(L,Z.append(aa,j));d.children().hover(function(){C(this).addClass("hover")},function(){C(this).removeClass("hover")}).addClass("hover");ab=A.height()+K.height()+d.outerHeight(true)-d.height();l=n.width()+b.width()+d.outerWidth(true)-d.width();g=G.outerHeight(true);a=G.outerWidth(true);Z.css({"padding-bottom":ab,"padding-right":l}).hide();p.click(E.next);M.click(E.prev);w.click(E.close);d.children().removeClass("hover");C("."+o).live("click",function(ac){if(!((ac.button!==0&&typeof ac.button!=="undefined")||ac.ctrlKey||ac.shiftKey||ac.altKey)){ac.preventDefault();f(this)}});L.click(function(){if(W.overlayClose){E.close()}});C(document).bind("keydown",function(ac){if(y&&W.escKey&&ac.keyCode===27){ac.preventDefault();E.close()}if(y&&W.arrowKey&&!S&&c[1]){if(ac.keyCode===37&&(B||W.loop)){ac.preventDefault();M.click()}else{if(ac.keyCode===39&&(B<c.length-1||W.loop)){ac.preventDefault();p.click()}}}})};E.remove=function(){Z.add(L).remove();C("."+o).die("click").removeData(u).removeClass(o)};E.position=function(ag,ad){var af,ae=Math.max(document.documentElement.clientHeight-W.h-g-ab,0)/2+T.scrollTop(),ac=Math.max(T.width()-W.w-a-l,0)/2+T.scrollLeft();af=(Z.width()===W.w+a&&Z.height()===W.h+g)?0:ag;aa[0].style.width=aa[0].style.height="9999px";function ah(ai){A[0].style.width=K[0].style.width=d[0].style.width=ai.style.width;h[0].style.height=h[1].style.height=d[0].style.height=n[0].style.height=b[0].style.height=ai.style.height}Z.dequeue().animate({width:W.w+a,height:W.h+g,top:ae,left:ac},{duration:af,complete:function(){ah(this);S=false;aa[0].style.width=(W.w+a+l)+"px";aa[0].style.height=(W.h+g+ab)+"px";if(ad){ad()}},step:function(){ah(this)}})};E.resize=function(ac){if(y){ac=ac||{};if(ac.width){W.w=H(ac.width,"x")-a-l}if(ac.innerWidth){W.w=H(ac.innerWidth,"x")}G.css({width:W.w});if(ac.height){W.h=H(ac.height,"y")-g-ab}if(ac.innerHeight){W.h=H(ac.innerHeight,"y")}if(!ac.innerHeight&&!ac.height){var ad=G.wrapInner("<div style='overflow:auto'></div>").children();W.h=ad.height();ad.replaceWith(ad.children())}G.css({height:W.h});E.position(W.transition==="none"?0:W.speed)}};E.prep=function(af){if(!y){return}var ae,ag=W.transition==="none"?0:W.speed;T.unbind("resize."+N);G.remove();G=I("LoadedContent").html(af);function ac(){W.w=W.w||G.width();W.w=W.mw&&W.mw<W.w?W.mw:W.w;return W.w}function ah(){W.h=W.h||G.height();W.h=W.mh&&W.mh<W.h?W.mh:W.h;return W.h}G.hide().appendTo(j.show()).css({width:ac(),overflow:W.scrolling?"auto":"hidden"}).css({height:ah()}).prependTo(d);j.hide();C("#"+N+"Photo").css({cssFloat:"none",marginLeft:"auto",marginRight:"auto"});if(Y){C("select").not(Z.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(r,function(){this.style.visibility="inherit"})}function ad(al){var an,ao,ak,aj,am=c.length,ai=W.loop;E.position(al,function(){function ap(){if(s){Z[0].style.filter=false}}if(!y){return}if(s){if(ae){G.fadeIn(100)}}G.show();z(J);m.show().html(W.title);if(am>1){q.html(W.current.replace(/\{current\}/,B+1).replace(/\{total\}/,am)).show();p[(ai||B<am-1)?"show":"hide"]().html(W.next);M[(ai||B)?"show":"hide"]().html(W.previous);an=B?c[B-1]:c[am-1];ak=B<am-1?c[B+1]:c[0];if(W.slideshow){R.show();if(B===am-1&&!ai&&Z.is("."+N+"Slideshow_on")){R.click()}}if(W.preloading){aj=C.data(ak,u).href||ak.href;ao=C.data(an,u).href||an.href;if(x(aj,ak)){C("<img/>")[0].src=aj}if(x(ao,an)){C("<img/>")[0].src=ao}}}h.hide();if(W.transition==="fade"){Z.fadeTo(ag,1,function(){ap()})}else{ap()}T.bind("resize."+N,function(){E.position(0)});z(O,W.onComplete)})}if(W.transition==="fade"){Z.fadeTo(ag,0,function(){ad(0)})}else{ad(ag)}};E.load=function(af){var ae,ad,ag,ac=E.prep;S=true;t=c[B];if(!af){W=X(C.extend({},C.data(t,u)))}z(i);z(e,W.onLoad);W.h=W.height?H(W.height,"y")-g-ab:W.innerHeight&&H(W.innerHeight,"y");W.w=W.width?H(W.width,"x")-a-l:W.innerWidth&&H(W.innerWidth,"x");W.mw=W.w;W.mh=W.h;if(W.maxWidth){W.mw=H(W.maxWidth,"x")-a-l;W.mw=W.w&&W.w<W.mw?W.w:W.mw}if(W.maxHeight){W.mh=H(W.maxHeight,"y")-g-ab;W.mh=W.h&&W.h<W.mh?W.h:W.mh}ae=W.href;h.show();if(W.inline){I().hide().insertBefore(C(ae)[0]).one(i,function(){C(this).replaceWith(G.children())});ac(C(ae))}else{if(W.iframe){Z.one(J,function(){var ah=C("<iframe name='"+new Date().getTime()+"' frameborder=0"+(W.scrolling?"":" scrolling='no'")+(s?" allowtransparency='true'":"")+" style='width:100%; height:100%; border:0; display:block;'/>");ah[0].src=W.href;ah.appendTo(G).one(i,function(){ah[0].src="about:blank"})});ac(" ")}else{if(W.html){ac(W.html)}else{if(x(ae,t)){ad=new Image();ad.onload=function(){var ah;ad.onload=null;ad.id=N+"Photo";C(ad).css({border:"none",display:"block",cssFloat:"left"});if(W.scalePhotos){ag=function(){ad.height-=ad.height*ah;ad.width-=ad.width*ah};if(W.mw&&ad.width>W.mw){ah=(ad.width-W.mw)/ad.width;ag()}if(W.mh&&ad.height>W.mh){ah=(ad.height-W.mh)/ad.height;ag()}}if(W.h){ad.style.marginTop=Math.max(W.h-ad.height,0)/2+"px"}if(c[1]&&(B<c.length-1||W.loop)){C(ad).css({cursor:"pointer"}).click(E.next)}if(s){ad.style.msInterpolationMode="bicubic"}setTimeout(function(){ac(ad)},1)};setTimeout(function(){ad.src=ae},1)}else{I().appendTo(j).load(ae,function(ai,ah,aj){ac(ah==="error"?"Request unsuccessful: "+aj.statusText:this)})}}}}};E.next=function(){if(!S){B=B<c.length-1?B+1:0;E.load()}};E.prev=function(){if(!S){B=B?B-1:c.length-1;E.load()}};E.close=function(){if(y&&!F){F=true;y=false;z(r,W.onCleanup);T.unbind("."+N+" ."+U);L.fadeTo("fast",0);Z.stop().fadeTo("fast",0,function(){z(i);G.remove();Z.add(L).css({opacity:1,cursor:"auto"}).hide();try{k.focus()}catch(ac){}setTimeout(function(){F=false;z(V,W.onClosed)},1)})}};E.element=function(){return C(t)};E.settings=D;C(E.init)}(jQuery,this));
