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

