(function(a){function i(n,r){r=r==="x"?x.width():x.height();return typeof n==="string"?Math.round(n.match(/%/)?r/100*parseInt(n,10):parseInt(n,10)):n}function o(n){n=a.isFunction(n)?n.call(A):n;return g.photo||n.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i)}function e(){for(var n in g)if(a.isFunction(g[n])&&n.substring(0,2)!=="on")g[n]=g[n].call(A);g.rel=g.rel||A.rel;g.href=g.href||A.href;g.title=g.title||A.title}function l(n){A=n;g=a(A).data(j);e();if(g.rel&&g.rel!=="nofollow"){w=
a(".cboxElement").filter(function(){return(a(this).data(j).rel||this.rel)===g.rel});F=w.index(A);if(F<0){w=w.add(A);F=w.length-1}}else{w=a(A);F=0}if(!S){T=S=u;aa=A;aa.blur();a(document).bind("keydown.cbox_close",function(r){if(r.keyCode===27){r.preventDefault();q.close()}}).bind("keydown.cbox_arrows",function(r){if(w.length>1)if(r.keyCode===37){r.preventDefault();U.click()}else if(r.keyCode===39){r.preventDefault();V.click()}});g.overlayClose&&c.css({cursor:"pointer"}).one("click",q.close);a.event.trigger(B);
g.onOpen&&g.onOpen.call(A);c.css({opacity:g.opacity}).show();g.w=i(g.initialWidth,"x");g.h=i(g.initialHeight,"y");q.position(0);I&&x.bind("resize.cboxie6 scroll.cboxie6",function(){c.css({width:x.width(),height:x.height(),top:x.scrollTop(),left:x.scrollLeft()})}).trigger("scroll.cboxie6")}W.add(U).add(V).add(L).add(X).hide();ba.html(g.close).show();q.slideshow();q.load()}var j="colorbox",h="hover",u=true,q,v=!a.support.opacity,I=v&&!window.XMLHttpRequest,B="cbox_open",G="cbox_load",J="cbox_complete",
b="resize.cbox_resize",c,f,k,m,d,s,t,C,w,x,D,K,M,E,X,W,L,V,U,ba,P,Q,N,O,A,aa,F,g,S,T,ca={transition:"elastic",speed:350,width:false,height:false,innerWidth:false,innerHeight:false,initialWidth:"400",initialHeight:"400",maxWidth:false,maxHeight:false,scalePhotos:u,scrolling:u,inline:false,html:false,iframe:false,photo:false,href:false,title:false,rel:false,opacity:0.9,preloading:u,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:false,overlayClose:u,slideshow:false,
slideshowAuto:u,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:false,onLoad:false,onComplete:false,onCleanup:false,onClosed:false};q=a.fn.colorbox=function(n,r){var z=this;if(!z.length)if(z.selector===""){z=a("<a/>");n.open=u}else return this;z.each(function(){var y=a.extend({},a(this).data(j)?a(this).data(j):ca,n);a(this).data(j,y).addClass("cboxElement");if(r)a(this).data(j).onComplete=r});n&&n.open&&l(z);return this};q.init=function(){function n(r){return a('<div id="cbox'+
r+'"/>')}x=a(window);f=a('<div id="colorbox"/>');c=n("Overlay").hide();k=n("Wrapper");m=n("Content").append(D=n("LoadedContent").css({width:0,height:0}),M=n("LoadingOverlay"),E=n("LoadingGraphic"),X=n("Title"),W=n("Current"),L=n("Slideshow"),V=n("Next"),U=n("Previous"),ba=n("Close"));k.append(a("<div/>").append(n("TopLeft"),d=n("TopCenter"),n("TopRight")),a("<div/>").append(s=n("MiddleLeft"),m,t=n("MiddleRight")),a("<div/>").append(n("BottomLeft"),C=n("BottomCenter"),n("BottomRight"))).children().children().css({"float":"left"});
K=a("<div style='position:absolute; top:0; left:0; width:9999px; height:0;'/>");a("body").prepend(c,f.append(k,K));if(v){f.addClass("cboxIE");I&&c.css("position","absolute")}m.children().bind("mouseover mouseout",function(){a(this).toggleClass(h)}).addClass(h);P=d.height()+C.height()+m.outerHeight(u)-m.height();Q=s.width()+t.width()+m.outerWidth(u)-m.width();N=D.outerHeight(u);O=D.outerWidth(u);f.css({"padding-bottom":P,"padding-right":Q}).hide();V.click(q.next);U.click(q.prev);ba.click(q.close);
m.children().removeClass(h);a(".cboxElement").live("click",function(r){if(r.button!==0&&typeof r.button!=="undefined")return u;else{l(this);return false}})};q.position=function(n,r){function z(R){d[0].style.width=C[0].style.width=m[0].style.width=R.style.width;E[0].style.height=M[0].style.height=m[0].style.height=s[0].style.height=t[0].style.height=R.style.height}var y=x.height();y=Math.max(y-g.h-N-P,0)/2+x.scrollTop();var H=Math.max(document.documentElement.clientWidth-g.w-O-Q,0)/2+x.scrollLeft();
n=f.width()===g.w+O&&f.height()===g.h+N?0:n;k[0].style.width=k[0].style.height="9999px";f.dequeue().animate({width:g.w+O,height:g.h+N,top:y,left:H},{duration:n,complete:function(){z(this);T=false;k[0].style.width=g.w+O+Q+"px";k[0].style.height=g.h+N+P+"px";r&&r()},step:function(){z(this)}})};q.resize=function(n){function r(){g.w=g.w||D.width();g.w=g.mw&&g.mw<g.w?g.mw:g.w;return g.w}function z(){g.h=g.h||D.height();g.h=g.mh&&g.mh<g.h?g.mh:g.h;return g.h}function y(Y){q.position(Y,function(){if(S){if(v){R&&
D.fadeIn(100);f[0].style.removeAttribute("filter")}if(g.iframe)D.append("<iframe id='cboxIframe'"+(g.scrolling?" ":"scrolling='no'")+" name='iframe_"+(new Date).getTime()+"' frameborder=0 src='"+g.href+"' "+(v?"allowtransparency='true'":"")+" />");D.show();X.show().html(g.title);if(w.length>1){W.html(g.current.replace(/\{current\}/,F+1).replace(/\{total\}/,w.length)).show();V.html(g.next).show();U.html(g.previous).show();g.slideshow&&L.show()}M.hide();E.hide();a.event.trigger(J);g.onComplete&&g.onComplete.call(A);
g.transition==="fade"&&f.fadeTo(Z,1,function(){v&&f[0].style.removeAttribute("filter")});x.bind(b,function(){q.position(0)})}})}if(S){var H,R,Z=g.transition==="none"?0:g.speed;x.unbind(b);if(n){D.remove();D=a('<div id="cboxLoadedContent"/>').html(n);D.hide().appendTo(K).css({width:r(),overflow:g.scrolling?"auto":"hidden"}).css({height:z()}).prependTo(m);a("#cboxPhoto").css({cssFloat:"none"});I&&a("select:not(#colorbox select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("cbox_cleanup",
function(){this.style.visibility="inherit"});g.transition==="fade"&&f.fadeTo(Z,0,function(){y(0)})||y(Z);if(g.preloading&&w.length>1){n=F>0?w[F-1]:w[w.length-1];H=F<w.length-1?w[F+1]:w[0];H=a(H).data(j).href||H.href;n=a(n).data(j).href||n.href;o(H)&&a("<img />").attr("src",H);o(n)&&a("<img />").attr("src",n)}}else setTimeout(function(){var Y=D.wrapInner("<div style='overflow:auto'></div>").children();g.h=Y.height();D.css({height:g.h});Y.replaceWith(Y.children());q.position(Z)},1)}};q.load=function(){var n,
r,z,y=q.resize;T=u;A=w[F];g=a(A).data(j);e();a.event.trigger(G);g.onLoad&&g.onLoad.call(A);g.h=g.height?i(g.height,"y")-N-P:g.innerHeight?i(g.innerHeight,"y"):false;g.w=g.width?i(g.width,"x")-O-Q:g.innerWidth?i(g.innerWidth,"x"):false;g.mw=g.w;g.mh=g.h;if(g.maxWidth){g.mw=i(g.maxWidth,"x")-O-Q;g.mw=g.w&&g.w<g.mw?g.w:g.mw}if(g.maxHeight){g.mh=i(g.maxHeight,"y")-N-P;g.mh=g.h&&g.h<g.mh?g.h:g.mh}n=g.href;M.show();E.show();if(g.inline){a('<div id="cboxInlineTemp" />').hide().insertBefore(a(n)[0]).bind(G+
" cbox_cleanup",function(){a(this).replaceWith(D.children())});y(a(n))}else if(g.iframe)y(" ");else if(g.html)y(g.html);else if(o(n)){r=new Image;r.onload=function(){var H;r.onload=null;r.id="cboxPhoto";a(r).css({margin:"auto",border:"none",display:"block",cssFloat:"left"});if(g.scalePhotos){z=function(){r.height-=r.height*H;r.width-=r.width*H};if(g.mw&&r.width>g.mw){H=(r.width-g.mw)/r.width;z()}if(g.mh&&r.height>g.mh){H=(r.height-g.mh)/r.height;z()}}if(g.h)r.style.marginTop=Math.max(g.h-r.height,
0)/2+"px";y(r);w.length>1&&a(r).css({cursor:"pointer"}).click(q.next);if(v)r.style.msInterpolationMode="bicubic"};r.src=n}else a("<div />").appendTo(K).load(n,function(H,R){R==="success"?y(this):y(a("<p>Request unsuccessful.</p>"))})};q.next=function(){if(!T){F=F<w.length-1?F+1:0;q.load()}};q.prev=function(){if(!T){F=F>0?F-1:w.length-1;q.load()}};q.slideshow=function(){function n(){L.text(g.slideshowStop).bind(J,function(){z=setTimeout(q.next,g.slideshowSpeed)}).bind(G,function(){clearTimeout(z)}).one("click",
function(){r();a(this).removeClass(h)});f.removeClass(y+"off").addClass(y+"on")}var r,z,y="cboxSlideshow_";L.bind("cbox_closed",function(){L.unbind();clearTimeout(z);f.removeClass(y+"off "+y+"on")});r=function(){clearTimeout(z);L.text(g.slideshowStart).unbind(J+" "+G).one("click",function(){n();z=setTimeout(q.next,g.slideshowSpeed);a(this).removeClass(h)});f.removeClass(y+"on").addClass(y+"off")};if(g.slideshow&&w.length>1)g.slideshowAuto?n():r()};q.close=function(){a.event.trigger("cbox_cleanup");
g.onCleanup&&g.onCleanup.call(A);S=false;a(document).unbind("keydown.cbox_close keydown.cbox_arrows");x.unbind(b+" resize.cboxie6 scroll.cboxie6");c.css({cursor:"auto"}).fadeOut("fast");f.stop(u,false).fadeOut("fast",function(){a("#colorbox iframe").attr("src","about:blank");D.remove();f.css({opacity:1});try{aa.focus()}catch(n){}a.event.trigger("cbox_closed");g.onClosed&&g.onClosed.call(A)})};q.element=function(){return a(A)};q.settings=ca;a(q.init)})(jQuery);
(function(a){function i(b){a.fn.cycle.debug&&o(b)}function o(){window.console&&window.console.log&&window.console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function e(b,c,f){if(b.cycleStop==undefined)b.cycleStop=0;if(c===undefined||c===null)c={};if(c.constructor==String){switch(c){case "stop":b.cycleStop++;b.cycleTimeout&&clearTimeout(b.cycleTimeout);b.cycleTimeout=0;a(b).removeData("cycle.opts");return false;case "toggle":b.cyclePause=b.cyclePause===1?0:1;return false;case "pause":b.cyclePause=
1;return false;case "resume":b.cyclePause=0;if(f===true){c=a(b).data("cycle.opts");if(!c){o("options not found, can not resume");return false}if(b.cycleTimeout){clearTimeout(b.cycleTimeout);b.cycleTimeout=0}v(c.elements,c,1,1)}return false;case "prev":case "next":b=a(b).data("cycle.opts");if(!b){o('options not found, "prev/next" ignored');return false}a.fn.cycle[c](b);return false;default:c={fx:c}}return c}else if(c.constructor==Number){var k=c;c=a(b).data("cycle.opts");if(!c){o("options not found, can not advance slide");
return false}if(k<0||k>=c.elements.length){o("invalid slide index: "+k);return false}c.nextSlide=k;if(b.cycleTimeout){clearTimeout(b.cycleTimeout);b.cycleTimeout=0}if(typeof f=="string")c.oneTimeFx=f;v(c.elements,c,1,k>=c.currSlide);return false}return c}function l(b,c){if(!a.support.opacity&&c.cleartype&&b.style.filter)try{b.style.removeAttribute("filter")}catch(f){}}function j(b,c,f,k,m){var d=a.extend({},a.fn.cycle.defaults,k||{},a.metadata?b.metadata():a.meta?b.data():{});if(d.autostop)d.countdown=
d.autostopCount||f.length;var s=b[0];b.data("cycle.opts",d);d.$cont=b;d.stopCount=s.cycleStop;d.elements=f;d.before=d.before?[d.before]:[];d.after=d.after?[d.after]:[];d.after.unshift(function(){d.busy=0});!a.support.opacity&&d.cleartype&&d.after.push(function(){l(this,d)});d.continuous&&d.after.push(function(){v(f,d,0,!d.rev)});h(d);!a.support.opacity&&d.cleartype&&!d.cleartypeNoBg&&J(c);b.css("position")=="static"&&b.css("position","relative");d.width&&b.width(d.width);d.height&&d.height!="auto"&&
b.height(d.height);if(d.startingSlide)d.startingSlide=parseInt(d.startingSlide);if(d.random){d.randomMap=[];for(s=0;s<f.length;s++)d.randomMap.push(s);d.randomMap.sort(function(){return Math.random()-0.5});d.randomIndex=1;d.startingSlide=d.randomMap[1]}else if(d.startingSlide>=f.length)d.startingSlide=0;d.currSlide=d.startingSlide||0;var t=d.startingSlide;c.css({position:"absolute",top:0,left:0}).hide().each(function(E){E=t?E>=t?f.length-(E-t):t-E:f.length-E;a(this).css("z-index",E)});a(f[t]).css("opacity",
1).show();l(f[t],d);d.fit&&d.width&&c.width(d.width);d.fit&&d.height&&d.height!="auto"&&c.height(d.height);if(d.containerResize&&!b.innerHeight()){for(var C=s=0,w=0;w<f.length;w++){var x=a(f[w]),D=x[0],K=x.outerWidth();x=x.outerHeight();if(!K)K=D.offsetWidth;if(!x)x=D.offsetHeight;s=K>s?K:s;C=x>C?x:C}s>0&&C>0&&b.css({width:s+"px",height:C+"px"})}d.pause&&b.hover(function(){this.cyclePause++},function(){this.cyclePause--});if(u(d)===false)return false;var M=false;k.requeueAttempts=k.requeueAttempts||
0;c.each(function(){var E=a(this);this.cycleH=d.fit&&d.height?d.height:E.height();this.cycleW=d.fit&&d.width?d.width:E.width();if(E.is("img")){E=a.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete;var X=a.browser.opera&&(this.cycleW==42&&this.cycleH==19||this.cycleW==37&&this.cycleH==17)&&!this.complete,W=this.cycleH==0&&this.cycleW==0&&!this.complete;if(a.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete||E||X||W)if(m.s&&d.requeueOnImageNotLoaded&&++k.requeueAttempts<
100){o(k.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){a(m.s,m.c).cycle(k)},d.requeueTimeout);M=true;return false}else o("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}return true});if(M)return false;d.cssBefore=d.cssBefore||{};d.animIn=d.animIn||{};d.animOut=d.animOut||{};c.not(":eq("+t+")").css(d.cssBefore);d.cssFirst&&a(c[t]).css(d.cssFirst);if(d.timeout){d.timeout=parseInt(d.timeout);if(d.speed.constructor==
String)d.speed=a.fx.speeds[d.speed]||parseInt(d.speed);for(d.sync||(d.speed/=2);d.timeout-d.speed<250;)d.timeout+=d.speed}if(d.easing)d.easeIn=d.easeOut=d.easing;if(!d.speedIn)d.speedIn=d.speed;if(!d.speedOut)d.speedOut=d.speed;d.slideCount=f.length;d.currSlide=d.lastSlide=t;if(d.random){if(++d.randomIndex==f.length)d.randomIndex=0;d.nextSlide=d.randomMap[d.randomIndex]}else d.nextSlide=d.startingSlide>=f.length-1?0:d.startingSlide+1;if(!d.multiFx){s=a.fn.cycle.transitions[d.fx];if(a.isFunction(s))s(b,
c,d);else if(d.fx!="custom"&&!d.multiFx){o("unknown transition: "+d.fx,"; slideshow terminating");return false}}b=c[t];d.before.length&&d.before[0].apply(b,[b,b,d,true]);d.after.length>1&&d.after[1].apply(b,[b,b,d,true]);d.next&&a(d.next).bind(d.prevNextEvent,function(){return B(d,d.rev?-1:1)});d.prev&&a(d.prev).bind(d.prevNextEvent,function(){return B(d,d.rev?1:-1)});d.pager&&G(f,d);q(d,f);return d}function h(b){b.original={before:[],after:[]};b.original.cssBefore=a.extend({},b.cssBefore);b.original.cssAfter=
a.extend({},b.cssAfter);b.original.animIn=a.extend({},b.animIn);b.original.animOut=a.extend({},b.animOut);a.each(b.before,function(){b.original.before.push(this)});a.each(b.after,function(){b.original.after.push(this)})}function u(b){var c,f,k=a.fn.cycle.transitions;if(b.fx.indexOf(",")>0){b.multiFx=true;b.fxs=b.fx.replace(/\s*/g,"").split(",");for(c=0;c<b.fxs.length;c++){var m=b.fxs[c];f=k[m];if(!f||!k.hasOwnProperty(m)||!a.isFunction(f)){o("discarding unknown transition: ",m);b.fxs.splice(c,1);
c--}}if(!b.fxs.length){o("No valid transitions named; slideshow terminating.");return false}}else if(b.fx=="all"){b.multiFx=true;b.fxs=[];for(p in k){f=k[p];k.hasOwnProperty(p)&&a.isFunction(f)&&b.fxs.push(p)}}if(b.multiFx&&b.randomizeEffects){f=Math.floor(Math.random()*20)+30;for(c=0;c<f;c++){k=Math.floor(Math.random()*b.fxs.length);b.fxs.push(b.fxs.splice(k,1)[0])}i("randomized fx sequence: ",b.fxs)}return true}function q(b,c){b.addSlide=function(f,k){f=a(f);var m=f[0];b.autostopCount||b.countdown++;
c[k?"unshift":"push"](m);if(b.els)b.els[k?"unshift":"push"](m);b.slideCount=c.length;f.css("position","absolute");f[k?"prependTo":"appendTo"](b.$cont);if(k){b.currSlide++;b.nextSlide++}!a.support.opacity&&b.cleartype&&!b.cleartypeNoBg&&J(f);b.fit&&b.width&&f.width(b.width);b.fit&&b.height&&b.height!="auto"&&$slides.height(b.height);m.cycleH=b.fit&&b.height?b.height:f.height();m.cycleW=b.fit&&b.width?b.width:f.width();f.css(b.cssBefore);b.pager&&a.fn.cycle.createPagerAnchor(c.length-1,m,a(b.pager),
c,b);a.isFunction(b.onAddSlide)?b.onAddSlide(f):f.hide()}}function v(b,c,f,k){if(f&&c.busy&&c.manualTrump){a(b).stop(true,true);c.busy=false}if(!c.busy){var m=c.$cont[0],d=b[c.currSlide],s=b[c.nextSlide];if(!(m.cycleStop!=c.stopCount||m.cycleTimeout===0&&!f))if(!f&&!m.cyclePause&&(c.autostop&&--c.countdown<=0||c.nowrap&&!c.random&&c.nextSlide<c.currSlide))c.end&&c.end(c);else{if(f||!m.cyclePause){var t=c.fx;d.cycleH=d.cycleH||a(d).height();d.cycleW=d.cycleW||a(d).width();s.cycleH=s.cycleH||a(s).height();
s.cycleW=s.cycleW||a(s).width();if(c.multiFx){if(c.lastFx==undefined||++c.lastFx>=c.fxs.length)c.lastFx=0;t=c.fxs[c.lastFx];c.currFx=t}if(c.oneTimeFx){t=c.oneTimeFx;c.oneTimeFx=null}a.fn.cycle.resetState(c,t);c.before.length&&a.each(c.before,function(C,w){m.cycleStop==c.stopCount&&w.apply(s,[d,s,c,k])});t=function(){a.each(c.after,function(C,w){m.cycleStop==c.stopCount&&w.apply(s,[d,s,c,k])})};if(c.nextSlide!=c.currSlide){c.busy=1;if(c.fxFn)c.fxFn(d,s,c,t,k);else a.isFunction(a.fn.cycle[c.fx])?a.fn.cycle[c.fx](d,
s,c,t):a.fn.cycle.custom(d,s,c,t,f&&c.fastOnEvent)}c.lastSlide=c.currSlide;if(c.random){c.currSlide=c.nextSlide;if(++c.randomIndex==b.length)c.randomIndex=0;c.nextSlide=c.randomMap[c.randomIndex]}else{f=c.nextSlide+1==b.length;c.nextSlide=f?0:c.nextSlide+1;c.currSlide=f?b.length-1:c.nextSlide-1}c.pager&&c.updateActivePagerLink(c.pager,c.currSlide,c.activePagerClass)}f=0;if(c.timeout&&!c.continuous)f=I(d,s,c,k);else if(c.continuous&&m.cyclePause)f=10;if(f>0)m.cycleTimeout=setTimeout(function(){v(b,
c,0,!c.rev)},f)}}}function I(b,c,f,k){if(f.timeoutFn){for(b=f.timeoutFn(b,c,f,k);b-f.speed<250;)b+=f.speed;i("calculated timeout: "+b+"; speed: "+f.speed);if(b!==false)return b}return f.timeout}function B(b,c){var f=b.elements,k=b.$cont[0],m=k.cycleTimeout;if(m){clearTimeout(m);k.cycleTimeout=0}if(b.random&&c<0){b.randomIndex--;if(--b.randomIndex==-2)b.randomIndex=f.length-2;else if(b.randomIndex==-1)b.randomIndex=f.length-1;b.nextSlide=b.randomMap[b.randomIndex]}else if(b.random)b.nextSlide=b.randomMap[b.randomIndex];
else{b.nextSlide=b.currSlide+c;if(b.nextSlide<0){if(b.nowrap)return false;b.nextSlide=f.length-1}else if(b.nextSlide>=f.length){if(b.nowrap)return false;b.nextSlide=0}}a.isFunction(b.prevNextClick)&&b.prevNextClick(c>0,b.nextSlide,f[b.nextSlide]);v(f,b,1,c>=0);return false}function G(b,c){var f=a(c.pager);a.each(b,function(k,m){a.fn.cycle.createPagerAnchor(k,m,f,b,c)});c.updateActivePagerLink(c.pager,c.startingSlide,c.activePagerClass)}function J(b){function c(k){k=parseInt(k).toString(16);return k.length<
2?"0"+k:k}function f(k){for(;k&&k.nodeName.toLowerCase()!="html";k=k.parentNode){var m=a.css(k,"background-color");if(m.indexOf("rgb")>=0){k=m.match(/\d+/g);return"#"+c(k[0])+c(k[1])+c(k[2])}if(m&&m!="transparent")return m}return"#ffffff"}b.each(function(){a(this).css("background-color",f(this))})}if(a.support==undefined)a.support={opacity:!a.browser.msie};a.fn.cycle=function(b,c){var f={s:this.selector,c:this.context};if(this.length===0&&b!="stop"){if(!a.isReady&&f.s){o("DOM not ready, queuing slideshow");
a(function(){a(f.s,f.c).cycle(b,c)});return this}o("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var k=e(this,b,c);if(k!==false){k.updateActivePagerLink=k.updateActivePagerLink||a.fn.cycle.updateActivePagerLink;this.cycleTimeout&&clearTimeout(this.cycleTimeout);this.cycleTimeout=this.cyclePause=0;var m=a(this),d=k.slideExpr?a(k.slideExpr,this):m.children(),s=d.get();if(s.length<2)o("terminating; too few slides: "+s.length);
else{var t=j(m,d,s,k,f);if(t!==false)if(k=t.continuous?10:I(t.currSlide,t.nextSlide,t,!t.rev)){k+=t.delay||0;if(k<10)k=10;i("first timeout: "+k);this.cycleTimeout=setTimeout(function(){v(s,t,0,!t.rev)},k)}}}})};a.fn.cycle.resetState=function(b,c){c=c||b.fx;b.before=[];b.after=[];b.cssBefore=a.extend({},b.original.cssBefore);b.cssAfter=a.extend({},b.original.cssAfter);b.animIn=a.extend({},b.original.animIn);b.animOut=a.extend({},b.original.animOut);b.fxFn=null;a.each(b.original.before,function(){b.before.push(this)});
a.each(b.original.after,function(){b.after.push(this)});c=a.fn.cycle.transitions[c];a.isFunction(c)&&c(b.$cont,a(b.elements),b)};a.fn.cycle.updateActivePagerLink=function(b,c,f){a(b).each(function(){a(this).find("a").removeClass(f).filter("a:eq("+c+")").addClass(f)})};a.fn.cycle.next=function(b){B(b,b.rev?-1:1)};a.fn.cycle.prev=function(b){B(b,b.rev?1:-1)};a.fn.cycle.createPagerAnchor=function(b,c,f,k,m){if(c=a.isFunction(m.pagerAnchorBuilder)?m.pagerAnchorBuilder(b,c):'<a href="#">'+(b+1)+"</a>"){var d=
a(c);if(d.parents("body").length===0){var s=[];if(f.length>1){f.each(function(){var t=d.clone(true);a(this).append(t);s.push(t[0])});d=a(s)}else d.appendTo(f)}d.bind(m.pagerEvent,function(t){t.preventDefault();m.nextSlide=b;t=m.$cont[0];var C=t.cycleTimeout;if(C){clearTimeout(C);t.cycleTimeout=0}a.isFunction(m.pagerClick)&&m.pagerClick(m.nextSlide,k[m.nextSlide]);v(k,m,1,m.currSlide<b);return false});m.pagerEvent!="click"&&d.click(function(){return false});m.pauseOnPagerHover&&d.hover(function(){m.$cont[0].cyclePause++},
function(){m.$cont[0].cyclePause--})}};a.fn.cycle.hopsFromLast=function(b,c){var f=b.lastSlide,k=b.currSlide;return c?k>f?k-f:b.slideCount-f:k<f?f-k:f+b.slideCount-k};a.fn.cycle.commonReset=function(b,c,f,k,m,d){a(f.elements).not(b).hide();f.cssBefore.opacity=1;f.cssBefore.display="block";if(k!==false&&c.cycleW>0)f.cssBefore.width=c.cycleW;if(m!==false&&c.cycleH>0)f.cssBefore.height=c.cycleH;f.cssAfter=f.cssAfter||{};f.cssAfter.display="none";a(b).css("zIndex",f.slideCount+(d===true?1:0));a(c).css("zIndex",
f.slideCount+(d===true?0:1))};a.fn.cycle.custom=function(b,c,f,k,m){var d=a(b),s=a(c),t=f.speedIn;b=f.speedOut;var C=f.easeIn;c=f.easeOut;s.css(f.cssBefore);if(m){t=typeof m=="number"?(b=m):(b=1);C=c=null}var w=function(){s.animate(f.animIn,t,C,k)};d.animate(f.animOut,b,c,function(){f.cssAfter&&d.css(f.cssAfter);f.sync||w()});f.sync&&w()};a.fn.cycle.transitions={fade:function(b,c,f){c.not(":eq("+f.currSlide+")").css("opacity",0);f.before.push(function(k,m,d){a.fn.cycle.commonReset(k,m,d);d.cssBefore.opacity=
0});f.animIn={opacity:1};f.animOut={opacity:0};f.cssBefore={top:0,left:0}}};a.fn.cycle.ver=function(){return"2.75"};a.fn.cycle.defaults={fx:"fade",timeout:4E3,timeoutFn:null,continuous:0,speed:1E3,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,prevNextEvent:"click",pager:null,pagerClick:null,pagerEvent:"click",pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,
height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!a.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250,activePagerClass:"activeSlide",updateActivePagerLink:null}})(jQuery);
(function(a){a.fn.cycle.transitions.none=function(i,o,e){e.fxFn=function(l,j,h,u){a(j).show();a(l).hide();u()}};a.fn.cycle.transitions.scrollUp=function(i,o,e){i.css("overflow","hidden");e.before.push(a.fn.cycle.commonReset);i=i.height();e.cssBefore={top:i,left:0};e.cssFirst={top:0};e.animIn={top:0};e.animOut={top:-i}};a.fn.cycle.transitions.scrollDown=function(i,o,e){i.css("overflow","hidden");e.before.push(a.fn.cycle.commonReset);i=i.height();e.cssFirst={top:0};e.cssBefore={top:-i,left:0};e.animIn=
{top:0};e.animOut={top:i}};a.fn.cycle.transitions.scrollLeft=function(i,o,e){i.css("overflow","hidden");e.before.push(a.fn.cycle.commonReset);i=i.width();e.cssFirst={left:0};e.cssBefore={left:i,top:0};e.animIn={left:0};e.animOut={left:0-i}};a.fn.cycle.transitions.scrollRight=function(i,o,e){i.css("overflow","hidden");e.before.push(a.fn.cycle.commonReset);i=i.width();e.cssFirst={left:0};e.cssBefore={left:-i,top:0};e.animIn={left:0};e.animOut={left:i}};a.fn.cycle.transitions.scrollHorz=function(i,o,
e){i.css("overflow","hidden").width();e.before.push(function(l,j,h,u){a.fn.cycle.commonReset(l,j,h);h.cssBefore.left=u?j.cycleW-1:1-j.cycleW;h.animOut.left=u?-l.cycleW:l.cycleW});e.cssFirst={left:0};e.cssBefore={top:0};e.animIn={left:0};e.animOut={top:0}};a.fn.cycle.transitions.scrollVert=function(i,o,e){i.css("overflow","hidden");e.before.push(function(l,j,h,u){a.fn.cycle.commonReset(l,j,h);h.cssBefore.top=u?1-j.cycleH:j.cycleH-1;h.animOut.top=u?l.cycleH:-l.cycleH});e.cssFirst={top:0};e.cssBefore=
{left:0};e.animIn={top:0};e.animOut={left:0}};a.fn.cycle.transitions.slideX=function(i,o,e){e.before.push(function(l,j,h){a(h.elements).not(l).hide();a.fn.cycle.commonReset(l,j,h,false,true);h.animIn.width=j.cycleW});e.cssBefore={left:0,top:0,width:0};e.animIn={width:"show"};e.animOut={width:0}};a.fn.cycle.transitions.slideY=function(i,o,e){e.before.push(function(l,j,h){a(h.elements).not(l).hide();a.fn.cycle.commonReset(l,j,h,true,false);h.animIn.height=j.cycleH});e.cssBefore={left:0,top:0,height:0};
e.animIn={height:"show"};e.animOut={height:0}};a.fn.cycle.transitions.shuffle=function(i,o,e){i=i.css("overflow","visible").width();o.css({left:0,top:0});e.before.push(function(l,j,h){a.fn.cycle.commonReset(l,j,h,true,true,true)});if(!e.speedAdjusted){e.speed/=2;e.speedAdjusted=true}e.random=0;e.shuffle=e.shuffle||{left:-i,top:15};e.els=[];for(i=0;i<o.length;i++)e.els.push(o[i]);for(i=0;i<e.currSlide;i++)e.els.push(e.els.shift());e.fxFn=function(l,j,h,u,q){var v=q?a(l):a(j);a(j).css(h.cssBefore);
var I=h.slideCount;v.animate(h.shuffle,h.speedIn,h.easeIn,function(){for(var B=a.fn.cycle.hopsFromLast(h,q),G=0;G<B;G++)q?h.els.push(h.els.shift()):h.els.unshift(h.els.pop());if(q){B=0;for(G=h.els.length;B<G;B++)a(h.els[B]).css("z-index",G-B+I)}else{B=a(l).css("z-index");v.css("z-index",parseInt(B)+1+I)}v.animate({left:0,top:0},h.speedOut,h.easeOut,function(){a(q?this:l).hide();u&&u()})})};e.cssBefore={display:"block",opacity:1,top:0,left:0}};a.fn.cycle.transitions.turnUp=function(i,o,e){e.before.push(function(l,
j,h){a.fn.cycle.commonReset(l,j,h,true,false);h.cssBefore.top=j.cycleH;h.animIn.height=j.cycleH});e.cssFirst={top:0};e.cssBefore={left:0,height:0};e.animIn={top:0};e.animOut={height:0}};a.fn.cycle.transitions.turnDown=function(i,o,e){e.before.push(function(l,j,h){a.fn.cycle.commonReset(l,j,h,true,false);h.animIn.height=j.cycleH;h.animOut.top=l.cycleH});e.cssFirst={top:0};e.cssBefore={left:0,top:0,height:0};e.animOut={height:0}};a.fn.cycle.transitions.turnLeft=function(i,o,e){e.before.push(function(l,
j,h){a.fn.cycle.commonReset(l,j,h,false,true);h.cssBefore.left=j.cycleW;h.animIn.width=j.cycleW});e.cssBefore={top:0,width:0};e.animIn={left:0};e.animOut={width:0}};a.fn.cycle.transitions.turnRight=function(i,o,e){e.before.push(function(l,j,h){a.fn.cycle.commonReset(l,j,h,false,true);h.animIn.width=j.cycleW;h.animOut.left=l.cycleW});e.cssBefore={top:0,left:0,width:0};e.animIn={left:0};e.animOut={width:0}};a.fn.cycle.transitions.zoom=function(i,o,e){e.before.push(function(l,j,h){a.fn.cycle.commonReset(l,
j,h,false,false,true);h.cssBefore.top=j.cycleH/2;h.cssBefore.left=j.cycleW/2;h.animIn={top:0,left:0,width:j.cycleW,height:j.cycleH};h.animOut={width:0,height:0,top:l.cycleH/2,left:l.cycleW/2}});e.cssFirst={top:0,left:0};e.cssBefore={width:0,height:0}};a.fn.cycle.transitions.fadeZoom=function(i,o,e){e.before.push(function(l,j,h){a.fn.cycle.commonReset(l,j,h,false,false);h.cssBefore.left=j.cycleW/2;h.cssBefore.top=j.cycleH/2;h.animIn={top:0,left:0,width:j.cycleW,height:j.cycleH}});e.cssBefore={width:0,
height:0};e.animOut={opacity:0}};a.fn.cycle.transitions.blindX=function(i,o,e){i=i.css("overflow","hidden").width();e.before.push(function(l,j,h){a.fn.cycle.commonReset(l,j,h);h.animIn.width=j.cycleW;h.animOut.left=l.cycleW});e.cssBefore={left:i,top:0};e.animIn={left:0};e.animOut={left:i}};a.fn.cycle.transitions.blindY=function(i,o,e){i=i.css("overflow","hidden").height();e.before.push(function(l,j,h){a.fn.cycle.commonReset(l,j,h);h.animIn.height=j.cycleH;h.animOut.top=l.cycleH});e.cssBefore={top:i,
left:0};e.animIn={top:0};e.animOut={top:i}};a.fn.cycle.transitions.blindZ=function(i,o,e){o=i.css("overflow","hidden").height();i=i.width();e.before.push(function(l,j,h){a.fn.cycle.commonReset(l,j,h);h.animIn.height=j.cycleH;h.animOut.top=l.cycleH});e.cssBefore={top:o,left:i};e.animIn={top:0,left:0};e.animOut={top:o,left:i}};a.fn.cycle.transitions.growX=function(i,o,e){e.before.push(function(l,j,h){a.fn.cycle.commonReset(l,j,h,false,true);h.cssBefore.left=this.cycleW/2;h.animIn={left:0,width:this.cycleW};
h.animOut={left:0}});e.cssBefore={width:0,top:0}};a.fn.cycle.transitions.growY=function(i,o,e){e.before.push(function(l,j,h){a.fn.cycle.commonReset(l,j,h,true,false);h.cssBefore.top=this.cycleH/2;h.animIn={top:0,height:this.cycleH};h.animOut={top:0}});e.cssBefore={height:0,left:0}};a.fn.cycle.transitions.curtainX=function(i,o,e){e.before.push(function(l,j,h){a.fn.cycle.commonReset(l,j,h,false,true,true);h.cssBefore.left=j.cycleW/2;h.animIn={left:0,width:this.cycleW};h.animOut={left:l.cycleW/2,width:0}});
e.cssBefore={top:0,width:0}};a.fn.cycle.transitions.curtainY=function(i,o,e){e.before.push(function(l,j,h){a.fn.cycle.commonReset(l,j,h,true,false,true);h.cssBefore.top=j.cycleH/2;h.animIn={top:0,height:j.cycleH};h.animOut={top:l.cycleH/2,height:0}});e.cssBefore={left:0,height:0}};a.fn.cycle.transitions.cover=function(i,o,e){var l=e.direction||"left",j=i.css("overflow","hidden").width(),h=i.height();e.before.push(function(u,q,v){a.fn.cycle.commonReset(u,q,v);if(l=="right")v.cssBefore.left=-j;else if(l==
"up")v.cssBefore.top=h;else if(l=="down")v.cssBefore.top=-h;else v.cssBefore.left=j});e.animIn={left:0,top:0};e.animOut={opacity:1};e.cssBefore={top:0,left:0}};a.fn.cycle.transitions.uncover=function(i,o,e){var l=e.direction||"left",j=i.css("overflow","hidden").width(),h=i.height();e.before.push(function(u,q,v){a.fn.cycle.commonReset(u,q,v,true,true,true);if(l=="right")v.animOut.left=j;else if(l=="up")v.animOut.top=-h;else if(l=="down")v.animOut.top=h;else v.animOut.left=-j});e.animIn={left:0,top:0};
e.animOut={opacity:1};e.cssBefore={top:0,left:0}};a.fn.cycle.transitions.toss=function(i,o,e){var l=i.css("overflow","visible").width(),j=i.height();e.before.push(function(h,u,q){a.fn.cycle.commonReset(h,u,q,true,true,true);if(!q.animOut.left&&!q.animOut.top)q.animOut={left:l*2,top:-j/2,opacity:0};else q.animOut.opacity=0});e.cssBefore={left:0,top:0};e.animIn={left:0}};a.fn.cycle.transitions.wipe=function(i,o,e){var l=i.css("overflow","hidden").width(),j=i.height();e.cssBefore=e.cssBefore||{};var h;
if(e.clip)if(/l2r/.test(e.clip))h="rect(0px 0px "+j+"px 0px)";else if(/r2l/.test(e.clip))h="rect(0px "+l+"px "+j+"px "+l+"px)";else if(/t2b/.test(e.clip))h="rect(0px "+l+"px 0px 0px)";else if(/b2t/.test(e.clip))h="rect("+j+"px "+l+"px "+j+"px 0px)";else if(/zoom/.test(e.clip)){i=parseInt(j/2);o=parseInt(l/2);h="rect("+i+"px "+o+"px "+i+"px "+o+"px)"}e.cssBefore.clip=e.cssBefore.clip||h||"rect(0px 0px 0px 0px)";i=e.cssBefore.clip.match(/(\d+)/g);var u=parseInt(i[0]),q=parseInt(i[1]),v=parseInt(i[2]),
I=parseInt(i[3]);e.before.push(function(B,G,J){if(B!=G){var b=a(B),c=a(G);a.fn.cycle.commonReset(B,G,J,true,true,false);J.cssAfter.display="block";var f=1,k=parseInt(J.speedIn/13)-1;(function m(){var d=u?u-parseInt(f*(u/k)):0,s=I?I-parseInt(f*(I/k)):0,t=v<j?v+parseInt(f*((j-v)/k||1)):j,C=q<l?q+parseInt(f*((l-q)/k||1)):l;c.css({clip:"rect("+d+"px "+C+"px "+t+"px "+s+"px)"});f++<=k?setTimeout(m,13):b.css("display","none")})()}});e.cssBefore={display:"block",opacity:1,top:0,left:0};e.animIn={left:0};
e.animOut={left:0}}})(jQuery);
$(document).ready(function(){$("a[rel='photo']").colorbox({transition:"fade",opacity:0.7,current:"",rel:"nofollow"});$("#kizhi").click(function(){$("#major_p").cycle(0)});$("#valaam").click(function(){$("#major_p").cycle(18)});$("#solovki").click(function(){$("#major_p").cycle(34)});$("#kivach").click(function(){$("#major_p").cycle(47)});$("#vodlozero").click(function(){$("#major_p").cycle(55)});$("#paanajarvi").click(function(){$("#major_p").cycle(64)});$(".albums_name").css("margin-left",($(document).width()-997)/2);var a=document.location.toString();if(undefined!==$.fn.cycle){$("#major_p").cycle({fx:"scrollHorz",speed:700,timeout:0,prev:"#p_l_arrow",next:"#p_r_arrow"});$("#major_p > *").length<2&&$("#p_l_arrow,#p_r_arrow").click(function(){return false})}a=document.location.toString();a.split("#")[1]=="paanajarvi"&&$("#major_p").cycle(64);a.split("#")[1]=="vodlozero"&&$("#major_p").cycle(55);a.split("#")[1]=="solovki"&&$("#major_p").cycle(34);
a.split("#")[1]=="kivach"&&$("#major_p").cycle(47);a.split("#")[1]=="valaam"&&$("#major_p").cycle(18)});
