/* builder */
if(!$.kapow)$.kapow={};
$.kapow.slideshow_builder=function(c){var a=this;a.init=function(){a.opts=$.extend({},$.kapow.slideshow_builder.defaults,c);$.template("popup",'<div id="slideshow" class="popup"><div class="slideshow"></div><div class="thumbnails"><a class="browse prev"></a><div class="scrollable"><div class="items"></div></div><a class="browse next"></a></div></div>');$.template("slide",'<div><table border="0" cellpadding="0" cellspacing="0"><tr><td><img src="${large}" /></td></tr></table><h2>{{html title}}</h2><p>{{html caption}}</p></div>');$.template("thumb",
'<img src="${thumb}" name="${name}" />');$.getJSON(a.opts.input,function(b){$.tmpl("popup").appendTo("body");$.tmpl("slide",b).appendTo("#slideshow .slideshow");$.tmpl("thumb",b).appendTo("#slideshow .thumbnails .items");b=Math.ceil($("#slideshow .thumbnails .items img").length/9);for(i=0;i<b;i++)$("#slideshow .thumbnails .items > img").slice(0,9).wrapAll('<table border="0" cellpadding="0" cellspacing="0" class="page"><tr><td></td></tr></table>');$.kapow.slideshow()})};a.init()};
$.kapow.slideshow_builder.defaults={input:null};

/* slideshow */
$.kapow.slideshow=function(){var a=this;a.$popup=$("#slideshow");a.$popup.data("kapow.slideshow",a);a.$slides=a.$popup.find(".slideshow");a.$scrollable=a.$popup.find(".scrollable");a.$pages=a.$scrollable.find(".items > table.page");a.$thumbs=a.$scrollable.find("img");a.init=function(){a.is_scrollable=a.$pages.length>1?true:false;if(a.is_scrollable)a.scrollable=a.$scrollable.scrollable({keyboard:false,speed:"normal"}).data("scrollable");else $("#slideshow .thumbnails a.browse").remove();a.$popup.hide();
a.overlay=a.$popup.overlay({speed:"fast",top:20,mask:{color:"#000000",loadSpeed:"fast",opacity:0.8},onBeforeLoad:function(){var b,c;b=a.$popup.data("slideshow.start");if(b!==-1){b=a.$thumbs.filter("img[name="+b+"]:first");c=a.$thumbs.index(b);if(c!==-1){a.slides.cycle(parseInt(c,10));b.trigger("click");if(a.is_scrollable){b=a.$pages.index(b.closest(".page"));c=a.scrollable.getIndex();if(b!==c){a.scrollable.seekTo(b,0);a.$scrollable.find(".items").css("left",-b*810)}}}}}}).data("overlay");a.$popup.prepend('<a class="pager right" title="next image"><span></span></a>').hide();
a.$popup.prepend('<a class="pager left" title="previous image"><span></span></a>').hide();a.slides=a.$slides.cycle({nowrap:true,timeout:0,height:450,speed:"normal",containerResize:false,pager:".scrollable",pagerAnchorBuilder:function(b){return"#slideshow .thumbnails .items img:eq("+b+")"},prev:"#slideshow a.pager.left",next:"#slideshow a.pager.right",prevNextClick:function(b,c){a.highlight_scroller_thumbs(c);if(a.is_scrollable){var d,e;d=a.$pages.index(a.$thumbs.filter(".active").closest(".page"));
e=a.scrollable.getIndex();d!==e&&a.scrollable.seekTo(d)}},pagerClick:function(b){a.highlight_scroller_thumbs(b)}});a.$thumbs.filter(":first").trigger("click");a.$popup.find("a.pager").hover(function(){$(this).find("span").show()},function(){$(this).find("span").hide()});$("a.popup").live("click",a.popup_launch)};a.highlight_scroller_thumbs=function(b){a.$thumbs.removeClass("active").eq(b).addClass("active");if(b===0)a.$popup.find("a.pager.left").hide();else b===$(".items img").length-1?a.$popup.find("a.pager.right").hide():
a.$popup.find("a.pager:hidden").show().find("span").hide()};a.popup_launch=function(){var b=$(this).attr("rel");b=b?b:-1;a.$popup.data("slideshow.start",b);a.overlay.load();return false};a.init()};

/* cycle */
(function(e){function o(a){e.fn.cycle.debug&&l(a)}function l(){window.console&&window.console.log&&window.console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function z(a,b,d){function g(c,i,h){if(!c&&i===true){c=e(h).data("cycle.opts");if(!c){l("options not found, can not resume");return false}if(h.cycleTimeout){clearTimeout(h.cycleTimeout);h.cycleTimeout=0}q(c.elements,c,1,!c.rev&&!c.backwards)}}if(a.cycleStop==undefined)a.cycleStop=0;if(b===undefined||b===null)b={};if(b.constructor==
String){switch(b){case "destroy":case "stop":d=e(a).data("cycle.opts");if(!d)return false;a.cycleStop++;a.cycleTimeout&&clearTimeout(a.cycleTimeout);a.cycleTimeout=0;e(a).removeData("cycle.opts");b=="destroy"&&A(d);return false;case "toggle":a.cyclePause=a.cyclePause===1?0:1;g(a.cyclePause,d,a);return false;case "pause":a.cyclePause=1;return false;case "resume":a.cyclePause=0;g(false,d,a);return false;case "prev":case "next":d=e(a).data("cycle.opts");if(!d){l('options not found, "prev/next" ignored');
return false}e.fn.cycle[b](d);return false;default:b={fx:b}}return b}else if(b.constructor==Number){var f=b;b=e(a).data("cycle.opts");if(!b){l("options not found, can not advance slide");return false}if(f<0||f>=b.elements.length){l("invalid slide index: "+f);return false}b.nextSlide=f;if(a.cycleTimeout){clearTimeout(a.cycleTimeout);a.cycleTimeout=0}if(typeof d=="string")b.oneTimeFx=d;q(b.elements,b,1,f>=b.currSlide);return false}return b}function v(a,b){if(!e.support.opacity&&b.cleartype&&a.style.filter)try{a.style.removeAttribute("filter")}catch(d){}}
function A(a){a.next&&e(a.next).unbind(a.prevNextEvent);a.prev&&e(a.prev).unbind(a.prevNextEvent);if(a.pager||a.pagerAnchorBuilder)e.each(a.pagerAnchors||[],function(){this.unbind().remove()});a.pagerAnchors=null;a.destroy&&a.destroy(a)}function B(a,b,d,g,f){var c=e.extend({},e.fn.cycle.defaults,g||{},e.metadata?a.metadata():e.meta?a.data():{});if(c.autostop)c.countdown=c.autostopCount||d.length;var i=a[0];a.data("cycle.opts",c);c.$cont=a;c.stopCount=i.cycleStop;c.elements=d;c.before=c.before?[c.before]:
[];c.after=c.after?[c.after]:[];c.after.unshift(function(){c.busy=0});!e.support.opacity&&c.cleartype&&c.after.push(function(){v(this,c)});c.continuous&&c.after.push(function(){q(d,c,0,!c.rev&&!c.backwards)});C(c);!e.support.opacity&&c.cleartype&&!c.cleartypeNoBg&&w(b);a.css("position")=="static"&&a.css("position","relative");c.width&&a.width(c.width);c.height&&c.height!="auto"&&a.height(c.height);if(c.startingSlide)c.startingSlide=parseInt(c.startingSlide);else if(c.backwards)c.startingSlide=d.length-
1;if(c.random){c.randomMap=[];for(i=0;i<d.length;i++)c.randomMap.push(i);c.randomMap.sort(function(){return Math.random()-0.5});c.randomIndex=1;c.startingSlide=c.randomMap[1]}else if(c.startingSlide>=d.length)c.startingSlide=0;c.currSlide=c.startingSlide||0;var h=c.startingSlide;b.css({position:"absolute",top:0,left:0}).hide().each(function(k){k=c.backwards?h?k<=h?d.length+(k-h):h-k:d.length-k:h?k>=h?d.length-(k-h):h-k:d.length-k;e(this).css("z-index",k)});e(d[h]).css("opacity",1).show();v(d[h],c);
c.fit&&c.width&&b.width(c.width);c.fit&&c.height&&c.height!="auto"&&b.height(c.height);if(c.containerResize&&!a.innerHeight()){for(var j=i=0,m=0;m<d.length;m++){var n=e(d[m]),r=n[0],s=n.outerWidth(),t=n.outerHeight();s||(s=r.offsetWidth||r.width||n.attr("width"));t||(t=r.offsetHeight||r.height||n.attr("height"));i=s>i?s:i;j=t>j?t:j}i>0&&j>0&&a.css({width:i+"px",height:j+"px"})}c.pause&&a.hover(function(){this.cyclePause++},function(){this.cyclePause--});if(D(c)===false)return false;var x=false;g.requeueAttempts=
g.requeueAttempts||0;b.each(function(){var k=e(this);this.cycleH=c.fit&&c.height?c.height:k.height()||this.offsetHeight||this.height||k.attr("height")||0;this.cycleW=c.fit&&c.width?c.width:k.width()||this.offsetWidth||this.width||k.attr("width")||0;if(k.is("img")){k=e.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete;var E=e.browser.opera&&(this.cycleW==42&&this.cycleH==19||this.cycleW==37&&this.cycleH==17)&&!this.complete,F=this.cycleH==0&&this.cycleW==0&&!this.complete;if(e.browser.msie&&
this.cycleW==28&&this.cycleH==30&&!this.complete||k||E||F)if(f.s&&c.requeueOnImageNotLoaded&&++g.requeueAttempts<100){l(g.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){e(f.s,f.c).cycle(g)},c.requeueTimeout);x=true;return false}else l("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}return true});if(x)return false;c.cssBefore=c.cssBefore||{};c.animIn=c.animIn||{};c.animOut=c.animOut||{};b.not(":eq("+h+
")").css(c.cssBefore);c.cssFirst&&e(b[h]).css(c.cssFirst);if(c.timeout){c.timeout=parseInt(c.timeout);if(c.speed.constructor==String)c.speed=e.fx.speeds[c.speed]||parseInt(c.speed);c.sync||(c.speed/=2);for(i=c.fx=="shuffle"?500:250;c.timeout-c.speed<i;)c.timeout+=c.speed}if(c.easing)c.easeIn=c.easeOut=c.easing;if(!c.speedIn)c.speedIn=c.speed;if(!c.speedOut)c.speedOut=c.speed;c.slideCount=d.length;c.currSlide=c.lastSlide=h;if(c.random){if(++c.randomIndex==d.length)c.randomIndex=0;c.nextSlide=c.randomMap[c.randomIndex]}else c.nextSlide=
c.backwards?c.startingSlide==0?d.length-1:c.startingSlide-1:c.startingSlide>=d.length-1?0:c.startingSlide+1;if(!c.multiFx){i=e.fn.cycle.transitions[c.fx];if(e.isFunction(i))i(a,b,c);else if(c.fx!="custom"&&!c.multiFx){l("unknown transition: "+c.fx,"; slideshow terminating");return false}}a=b[h];c.before.length&&c.before[0].apply(a,[a,a,c,true]);c.after.length>1&&c.after[1].apply(a,[a,a,c,true]);c.next&&e(c.next).bind(c.prevNextEvent,function(){return u(c,c.rev?-1:1)});c.prev&&e(c.prev).bind(c.prevNextEvent,
function(){return u(c,c.rev?1:-1)});if(c.pager||c.pagerAnchorBuilder)G(d,c);H(c,d);return c}function C(a){a.original={before:[],after:[]};a.original.cssBefore=e.extend({},a.cssBefore);a.original.cssAfter=e.extend({},a.cssAfter);a.original.animIn=e.extend({},a.animIn);a.original.animOut=e.extend({},a.animOut);e.each(a.before,function(){a.original.before.push(this)});e.each(a.after,function(){a.original.after.push(this)})}function D(a){var b,d,g=e.fn.cycle.transitions;if(a.fx.indexOf(",")>0){a.multiFx=
true;a.fxs=a.fx.replace(/\s*/g,"").split(",");for(b=0;b<a.fxs.length;b++){var f=a.fxs[b];d=g[f];if(!d||!g.hasOwnProperty(f)||!e.isFunction(d)){l("discarding unknown transition: ",f);a.fxs.splice(b,1);b--}}if(!a.fxs.length){l("No valid transitions named; slideshow terminating.");return false}}else if(a.fx=="all"){a.multiFx=true;a.fxs=[];for(p in g){d=g[p];g.hasOwnProperty(p)&&e.isFunction(d)&&a.fxs.push(p)}}if(a.multiFx&&a.randomizeEffects){d=Math.floor(Math.random()*20)+30;for(b=0;b<d;b++)a.fxs.push(a.fxs.splice(Math.floor(Math.random()*
a.fxs.length),1)[0]);o("randomized fx sequence: ",a.fxs)}return true}function H(a,b){a.addSlide=function(d,g){var f=e(d),c=f[0];a.autostopCount||a.countdown++;b[g?"unshift":"push"](c);if(a.els)a.els[g?"unshift":"push"](c);a.slideCount=b.length;f.css("position","absolute");f[g?"prependTo":"appendTo"](a.$cont);if(g){a.currSlide++;a.nextSlide++}!e.support.opacity&&a.cleartype&&!a.cleartypeNoBg&&w(f);a.fit&&a.width&&f.width(a.width);a.fit&&a.height&&a.height!="auto"&&$slides.height(a.height);c.cycleH=
a.fit&&a.height?a.height:f.height();c.cycleW=a.fit&&a.width?a.width:f.width();f.css(a.cssBefore);if(a.pager||a.pagerAnchorBuilder)e.fn.cycle.createPagerAnchor(b.length-1,c,e(a.pager),b,a);e.isFunction(a.onAddSlide)?a.onAddSlide(f):f.hide()}}function q(a,b,d,g){if(d&&b.busy&&b.manualTrump){o("manualTrump in go(), stopping active transition");e(a).stop(true,true);b.busy=false}if(b.busy)o("transition active, ignoring new tx request");else{var f=b.$cont[0],c=a[b.currSlide],i=a[b.nextSlide];if(!(f.cycleStop!=
b.stopCount||f.cycleTimeout===0&&!d))if(!d&&!f.cyclePause&&!b.bounce&&(b.autostop&&--b.countdown<=0||b.nowrap&&!b.random&&b.nextSlide<b.currSlide))b.end&&b.end(b);else{var h=false;if((d||!f.cyclePause)&&b.nextSlide!=b.currSlide){h=true;var j=b.fx;c.cycleH=c.cycleH||e(c).height();c.cycleW=c.cycleW||e(c).width();i.cycleH=i.cycleH||e(i).height();i.cycleW=i.cycleW||e(i).width();if(b.multiFx){if(b.lastFx==undefined||++b.lastFx>=b.fxs.length)b.lastFx=0;j=b.fxs[b.lastFx];b.currFx=j}if(b.oneTimeFx){j=b.oneTimeFx;
b.oneTimeFx=null}e.fn.cycle.resetState(b,j);b.before.length&&e.each(b.before,function(m,n){f.cycleStop==b.stopCount&&n.apply(i,[c,i,b,g])});j=function(){e.each(b.after,function(m,n){f.cycleStop==b.stopCount&&n.apply(i,[c,i,b,g])})};o("tx firing; currSlide: "+b.currSlide+"; nextSlide: "+b.nextSlide);b.busy=1;if(b.fxFn)b.fxFn(c,i,b,j,g,d&&b.fastOnEvent);else e.isFunction(e.fn.cycle[b.fx])?e.fn.cycle[b.fx](c,i,b,j,g,d&&b.fastOnEvent):e.fn.cycle.custom(c,i,b,j,g,d&&b.fastOnEvent)}if(h||b.nextSlide==b.currSlide){b.lastSlide=
b.currSlide;if(b.random){b.currSlide=b.nextSlide;if(++b.randomIndex==a.length)b.randomIndex=0;b.nextSlide=b.randomMap[b.randomIndex];if(b.nextSlide==b.currSlide)b.nextSlide=b.currSlide==b.slideCount-1?0:b.currSlide+1}else if(b.backwards)if((d=b.nextSlide-1<0)&&b.bounce){b.backwards=!b.backwards;b.nextSlide=1;b.currSlide=0}else{b.nextSlide=d?a.length-1:b.nextSlide-1;b.currSlide=d?0:b.nextSlide+1}else if((d=b.nextSlide+1==a.length)&&b.bounce){b.backwards=!b.backwards;b.nextSlide=a.length-2;b.currSlide=
a.length-1}else{b.nextSlide=d?0:b.nextSlide+1;b.currSlide=d?a.length-1:b.nextSlide-1}}h&&b.pager&&b.updateActivePagerLink(b.pager,b.currSlide,b.activePagerClass);h=0;if(b.timeout&&!b.continuous)h=y(a[b.currSlide],a[b.nextSlide],b,g);else if(b.continuous&&f.cyclePause)h=10;if(h>0)f.cycleTimeout=setTimeout(function(){q(a,b,0,!b.rev&&!b.backwards)},h)}}}function y(a,b,d,g){if(d.timeoutFn){for(a=d.timeoutFn.call(a,a,b,d,g);a-d.speed<250;)a+=d.speed;o("calculated timeout: "+a+"; speed: "+d.speed);if(a!==
false)return a}return d.timeout}function u(a,b){var d=a.elements,g=a.$cont[0],f=g.cycleTimeout;if(f){clearTimeout(f);g.cycleTimeout=0}if(a.random&&b<0){a.randomIndex--;if(--a.randomIndex==-2)a.randomIndex=d.length-2;else if(a.randomIndex==-1)a.randomIndex=d.length-1;a.nextSlide=a.randomMap[a.randomIndex]}else if(a.random)a.nextSlide=a.randomMap[a.randomIndex];else{a.nextSlide=a.currSlide+b;if(a.nextSlide<0){if(a.nowrap)return false;a.nextSlide=d.length-1}else if(a.nextSlide>=d.length){if(a.nowrap)return false;
a.nextSlide=0}}g=a.onPrevNextEvent||a.prevNextClick;e.isFunction(g)&&g(b>0,a.nextSlide,d[a.nextSlide]);q(d,a,1,b>=0);return false}function G(a,b){var d=e(b.pager);e.each(a,function(g,f){e.fn.cycle.createPagerAnchor(g,f,d,a,b)});b.updateActivePagerLink(b.pager,b.startingSlide,b.activePagerClass)}function w(a){function b(g){g=parseInt(g).toString(16);return g.length<2?"0"+g:g}function d(g){for(;g&&g.nodeName.toLowerCase()!="html";g=g.parentNode){var f=e.css(g,"background-color");if(f.indexOf("rgb")>=
0){g=f.match(/\d+/g);return"#"+b(g[0])+b(g[1])+b(g[2])}if(f&&f!="transparent")return f}return"#ffffff"}o("applying clearType background-color hack");a.each(function(){e(this).css("background-color",d(this))})}if(e.support==undefined)e.support={opacity:!e.browser.msie};e.fn.cycle=function(a,b){var d={s:this.selector,c:this.context};if(this.length===0&&a!="stop"){if(!e.isReady&&d.s){l("DOM not ready, queuing slideshow");e(function(){e(d.s,d.c).cycle(a,b)});return this}l("terminating; zero elements found by selector"+
(e.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var g=z(this,a,b);if(g!==false){g.updateActivePagerLink=g.updateActivePagerLink||e.fn.cycle.updateActivePagerLink;this.cycleTimeout&&clearTimeout(this.cycleTimeout);this.cycleTimeout=this.cyclePause=0;var f=e(this),c=g.slideExpr?e(g.slideExpr,this):f.children(),i=c.get();if(i.length<2)l("terminating; too few slides: "+i.length);else{var h=B(f,c,i,g,d);if(h!==false)if(f=h.continuous?10:y(i[h.currSlide],i[h.nextSlide],h,!h.rev)){f+=
h.delay||0;if(f<10)f=10;o("first timeout: "+f);this.cycleTimeout=setTimeout(function(){q(i,h,0,!h.rev&&!g.backwards)},f)}}}})};e.fn.cycle.resetState=function(a,b){b=b||a.fx;a.before=[];a.after=[];a.cssBefore=e.extend({},a.original.cssBefore);a.cssAfter=e.extend({},a.original.cssAfter);a.animIn=e.extend({},a.original.animIn);a.animOut=e.extend({},a.original.animOut);a.fxFn=null;e.each(a.original.before,function(){a.before.push(this)});e.each(a.original.after,function(){a.after.push(this)});var d=e.fn.cycle.transitions[b];
e.isFunction(d)&&d(a.$cont,e(a.elements),a)};e.fn.cycle.updateActivePagerLink=function(a,b,d){e(a).each(function(){e(this).children().removeClass(d).eq(b).addClass(d)})};e.fn.cycle.next=function(a){u(a,a.rev?-1:1)};e.fn.cycle.prev=function(a){u(a,a.rev?1:-1)};e.fn.cycle.createPagerAnchor=function(a,b,d,g,f){if(e.isFunction(f.pagerAnchorBuilder)){b=f.pagerAnchorBuilder(a,b);o("pagerAnchorBuilder("+a+", el) returned: "+b)}else b='<a href="#">'+(a+1)+"</a>";if(b){var c=e(b);if(c.parents("body").length===
0){var i=[];if(d.length>1){d.each(function(){var h=c.clone(true);e(this).append(h);i.push(h[0])});c=e(i)}else c.appendTo(d)}f.pagerAnchors=f.pagerAnchors||[];f.pagerAnchors.push(c);c.bind(f.pagerEvent,function(h){h.preventDefault();f.nextSlide=a;h=f.$cont[0];var j=h.cycleTimeout;if(j){clearTimeout(j);h.cycleTimeout=0}h=f.onPagerEvent||f.pagerClick;e.isFunction(h)&&h(f.nextSlide,g[f.nextSlide]);q(g,f,1,f.currSlide<a)});!/^click/.test(f.pagerEvent)&&!f.allowPagerClickBubble&&c.bind("click.cycle",function(){return false});
f.pauseOnPagerHover&&c.hover(function(){f.$cont[0].cyclePause++},function(){f.$cont[0].cyclePause--})}};e.fn.cycle.hopsFromLast=function(a,b){var d=a.lastSlide,g=a.currSlide;return b?g>d?g-d:a.slideCount-d:g<d?d-g:d+a.slideCount-g};e.fn.cycle.commonReset=function(a,b,d,g,f,c){e(d.elements).not(a).hide();d.cssBefore.opacity=1;d.cssBefore.display="block";if(g!==false&&b.cycleW>0)d.cssBefore.width=b.cycleW;if(f!==false&&b.cycleH>0)d.cssBefore.height=b.cycleH;d.cssAfter=d.cssAfter||{};d.cssAfter.display=
"none";e(a).css("zIndex",d.slideCount+(c===true?1:0));e(b).css("zIndex",d.slideCount+(c===true?0:1))};e.fn.cycle.custom=function(a,b,d,g,f,c){var i=e(a),h=e(b),j=d.speedIn;a=d.speedOut;var m=d.easeIn;b=d.easeOut;h.css(d.cssBefore);if(c){j=typeof c=="number"?a=c:a=1;m=b=null}i.animate(d.animOut,a,b,function(){d.cssAfter&&i.css(d.cssAfter);d.sync||h.animate(d.animIn,j,m,g)});d.sync&&h.animate(d.animIn,j,m,g)};e.fn.cycle.transitions={fade:function(a,b,d){b.not(":eq("+d.currSlide+")").css("opacity",0);
d.before.push(function(g,f,c){e.fn.cycle.commonReset(g,f,c);c.cssBefore.opacity=0});d.animIn={opacity:1};d.animOut={opacity:0};d.cssBefore={top:0,left:0}}};e.fn.cycle.ver=function(){return"2.89"};e.fn.cycle.defaults={fx:"fade",timeout:4E3,timeoutFn:null,continuous:0,speed:1E3,speedIn:null,speedOut:null,next:null,prev:null,onPrevNextEvent:null,prevNextEvent:"click.cycle",pager:null,onPagerEvent:null,pagerEvent:"click.cycle",allowPagerClickBubble:false,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:!e.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250,activePagerClass:"activeSlide",updateActivePagerLink:null,backwards:false}})(jQuery);

/* expose */
(function(b){function k(){if(b.browser.msie){var a=b(document).height(),d=b(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a-d<20?d:a]}return[b(document).width(),b(document).height()]}function h(a){if(a)return a.call(b.mask)}b.tools=b.tools||{version:"@VERSION"};var l;l=b.tools.expose={conf:{maskId:"exposeMask",loadSpeed:"slow",closeSpeed:"fast",closeOnClick:true,closeOnEsc:true,zIndex:9998,opacity:0.8,startOpacity:0,color:"#fff",onLoad:null,
onClose:null}};var c,i,e,g,j;b.mask={load:function(a,d){if(e)return this;if(typeof a=="string")a={color:a};a=a||g;g=a=b.extend(b.extend({},l.conf),a);c=b("#"+a.maskId);if(!c.length){c=b("<div/>").attr("id",a.maskId);b("body").append(c)}var m=k();c.css({position:"absolute",top:0,left:0,width:m[0],height:m[1],display:"none",opacity:a.startOpacity,zIndex:a.zIndex});a.color&&c.css("backgroundColor",a.color);if(h(a.onBeforeLoad)===false)return this;a.closeOnEsc&&b(document).bind("keydown.mask",function(f){f.keyCode==
27&&b.mask.close(f)});a.closeOnClick&&c.bind("click.mask",function(f){b.mask.close(f)});b(window).bind("resize.mask",function(){b.mask.fit()});if(d&&d.length){j=d.eq(0).css("zIndex");b.each(d,function(){var f=b(this);/relative|absolute|fixed/i.test(f.css("position"))||f.css("position","relative")});i=d.css({zIndex:Math.max(a.zIndex+1,j=="auto"?0:j)})}c.css({display:"block"}).fadeTo(a.loadSpeed,a.opacity,function(){b.mask.fit();h(a.onLoad);e="full"});e=true;return this},close:function(){if(e){if(h(g.onBeforeClose)===
false)return this;c.fadeOut(g.closeSpeed,function(){h(g.onClose);i&&i.css({zIndex:j})});b(document).unbind("keydown.mask");c.unbind("click.mask");b(window).unbind("resize.mask");e=false}return this},fit:function(){if(e){var a=k();c.css({width:a[0],height:a[1]})}},getMask:function(){return c},isLoaded:function(a){return a?e=="full":e},getConf:function(){return g},getExposed:function(){return i}};b.fn.mask=function(a){b.mask.load(a);return this};b.fn.expose=function(a){b.mask.load(a,this);return this}})(jQuery);

/* overlay */
(function(a){function t(d,b){var c=this,i=d.add(c),o=a(window),k,f,m,g=a.tools.expose&&(b.mask||b.expose),n=Math.random().toString().slice(10);if(g){if(typeof g=="string")g={color:g};g.closeOnClick=g.closeOnEsc=false}var p=b.target||d.attr("rel");f=p?a(p):d;if(!f.length)throw"Could not find Overlay: "+p;d&&d.index(f)==-1&&d.click(function(e){c.load(e);return e.preventDefault()});a.extend(c,{load:function(e){if(c.isOpened())return c;var h=q[b.effect];if(!h)throw'Overlay: cannot find effect : "'+b.effect+
'"';b.oneInstance&&a.each(s,function(){this.close(e)});e=e||a.Event();e.type="onBeforeLoad";i.trigger(e);if(e.isDefaultPrevented())return c;m=true;g&&a(f).expose(g);var j=b.top,r=b.left,u=f.outerWidth({margin:true}),v=f.outerHeight({margin:true});if(typeof j=="string")j=j=="center"?Math.max((o.height()-v)/2,0):parseInt(j,10)/100*o.height();if(r=="center")r=Math.max((o.width()-u)/2,0);h[0].call(c,{top:j,left:r},function(){if(m){e.type="onLoad";i.trigger(e)}});g&&b.closeOnClick&&a.mask.getMask().one("click",
c.close);b.closeOnClick&&a(document).bind("click."+n,function(l){a(l.target).parents(f).length||c.close(l)});b.closeOnEsc&&a(document).bind("keydown."+n,function(l){l.keyCode==27&&c.close(l)});return c},close:function(e){if(!c.isOpened())return c;e=e||a.Event();e.type="onBeforeClose";i.trigger(e);if(!e.isDefaultPrevented()){m=false;q[b.effect][1].call(c,function(){e.type="onClose";i.trigger(e)});a(document).unbind("click."+n).unbind("keydown."+n);g&&a.mask.close();return c}},getOverlay:function(){return f},
getTrigger:function(){return d},getClosers:function(){return k},isOpened:function(){return m},getConf:function(){return b}});a.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(e,h){a.isFunction(b[h])&&a(c).bind(h,b[h]);c[h]=function(j){a(c).bind(h,j);return c}});k=f.find(b.close||".close");if(!k.length&&!b.close){k=a('<a class="close"></a>');f.prepend(k)}k.click(function(e){c.close(e)});b.load&&c.load()}a.tools=a.tools||{version:"@VERSION"};a.tools.overlay={addEffect:function(d,
b,c){q[d]=[b,c]},conf:{close:null,closeOnClick:true,closeOnEsc:true,closeSpeed:"fast",effect:"default",fixed:!a.browser.msie||a.browser.version>6,left:"center",load:false,mask:null,oneInstance:true,speed:"normal",target:null,top:"10%"}};var s=[],q={};a.tools.overlay.addEffect("default",function(d,b){var c=this.getConf(),i=a(window);if(!c.fixed){d.top+=i.scrollTop();d.left+=i.scrollLeft()}d.position=c.fixed?"fixed":"absolute";this.getOverlay().css(d).fadeIn(c.speed,b)},function(d){this.getOverlay().fadeOut(this.getConf().closeSpeed,
d)});a.fn.overlay=function(d){var b=this.data("overlay");if(b)return b;if(a.isFunction(d))d={onBeforeLoad:d};d=a.extend(true,{},a.tools.overlay.conf,d);this.each(function(){b=new t(a(this),d);s.push(b);a(this).data("overlay",b)});return d.api?b:this}})(jQuery);

/* scrollable */
(function(e){function n(f,c){var a=e(c);return a.length<2?a:f.parent().find(c)}function t(f,c){var a=this,l=f.add(a),g=f.children(),k=0,m=c.vertical;j||(j=a);if(g.length>1)g=e(c.items,f);e.extend(a,{getConf:function(){return c},getIndex:function(){return k},getSize:function(){return a.getItems().size()},getNaviButtons:function(){return o.add(p)},getRoot:function(){return f},getItemWrap:function(){return g},getItems:function(){return g.children(c.item).not("."+c.clonedClass)},move:function(b,d){return a.seekTo(k+
b,d)},next:function(b){return a.move(1,b)},prev:function(b){return a.move(-1,b)},begin:function(b){return a.seekTo(0,b)},end:function(b){return a.seekTo(a.getSize()-1,b)},focus:function(){return j=a},addItem:function(b){b=e(b);if(c.circular){g.children("."+c.clonedClass+":last").before(b);g.children("."+c.clonedClass+":first").replaceWith(b.clone().addClass(c.clonedClass))}else g.append(b);l.trigger("onAddItem",[b]);return a},seekTo:function(b,d,h){b.jquery||(b*=1);if(c.circular&&b===0&&k==-1&&d!==
0)return a;if(!c.circular&&b<0||b>a.getSize()||b<-1)return a;var i=b;if(b.jquery)b=a.getItems().index(b);else i=a.getItems().eq(b);var q=e.Event("onBeforeSeek");if(!h){l.trigger(q,[b,d]);if(q.isDefaultPrevented()||!i.length)return a}i=m?{top:-i.position().top}:{left:-i.position().left};k=b;j=a;if(d===undefined)d=c.speed;g.animate(i,d,c.easing,h||function(){l.trigger("onSeek",[b])});return a}});e.each(["onBeforeSeek","onSeek","onAddItem"],function(b,d){e.isFunction(c[d])&&e(a).bind(d,c[d]);a[d]=function(h){e(a).bind(d,
h);return a}});if(c.circular){var r=a.getItems().slice(-1).clone().prependTo(g),s=a.getItems().eq(1).clone().appendTo(g);r.add(s).addClass(c.clonedClass);a.onBeforeSeek(function(b,d,h){if(!b.isDefaultPrevented())if(d==-1){a.seekTo(r,h,function(){a.end(0)});return b.preventDefault()}else d==a.getSize()&&a.seekTo(s,h,function(){a.begin(0)})});a.seekTo(0,0)}var o=n(f,c.prev).click(function(){a.prev()}),p=n(f,c.next).click(function(){a.next()});!c.circular&&a.getSize()>1&&a.onBeforeSeek(function(b,d){setTimeout(function(){if(!b.isDefaultPrevented()){o.toggleClass(c.disabledClass,
d<=0);p.toggleClass(c.disabledClass,d>=a.getSize()-1)}},1)});c.mousewheel&&e.fn.mousewheel&&f.mousewheel(function(b,d){if(c.mousewheel){a.move(d<0?1:-1,c.wheelSpeed||50);return false}});c.keyboard&&e(document).bind("keydown.scrollable",function(b){if(!(!c.keyboard||b.altKey||b.ctrlKey||e(b.target).is(":input")))if(!(c.keyboard!="static"&&j!=a)){var d=b.keyCode;if(m&&(d==38||d==40)){a.move(d==38?-1:1);return b.preventDefault()}if(!m&&(d==37||d==39)){a.move(d==37?-1:1);return b.preventDefault()}}});
e(a).trigger("onBeforeSeek",[c.initialIndex])}e.tools=e.tools||{version:"@VERSION"};e.tools.scrollable={conf:{activeClass:"active",circular:false,clonedClass:"cloned",disabledClass:"disabled",easing:"swing",initialIndex:0,item:null,items:".items",keyboard:true,mousewheel:false,next:".next",prev:".prev",speed:400,vertical:false,wheelSpeed:0}};var j;e.fn.scrollable=function(f){var c=this.data("scrollable");if(c)return c;f=e.extend({},e.tools.scrollable.conf,f);this.each(function(){c=new t(e(this),f);
e(this).data("scrollable",c)});return f.api?c:this}})(jQuery);

/* templates */
(function(d){function r(a,b,e,c){c={data:c||(b?b.data:{}),_wrap:b?b._wrap:null,tmpl:null,parent:b||null,nodes:[],calls:I,nest:J,wrap:K,html:L,update:M};a&&d.extend(c,a,{nodes:[],parent:b});if(e){c.tmpl=e;c._ctnt=c._ctnt||c.tmpl(d,c);c.key=++p;(s.length?v:l)[p]=c}return c}function w(a,b,e){var c;e=d.map(e,function(f){return typeof f==="string"?f.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+t+'="'+a.key+'" $2'):w(f,a,f._ctnt)});if(b)return e;e=e.join("");e.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,
function(f,g,h,k){c=d(h).get();C(c);if(g)c=z(g).concat(c);if(k)c=c.concat(z(k))});return c?c:z(e)}function z(a){var b=document.createElement("div");b.innerHTML=a;return d.makeArray(b.childNodes)}function D(a){return new Function("jQuery","$item","var $=jQuery,_=[],$data=$item.data;with($data){_.push('"+$.trim(a).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\${([^}]*)}/g,"{{= $1}}").replace(/{{(\/?)(\w+|.)(?:\(((?:.(?!}}))*?)?\))?(?:\s+(.*?)?)?(\((.*?)\))?\s*}}/g,function(b,e,c,f,g,
h,k){b=d.tmpl.tags[c];var q;if(!b)throw"Template command not found: "+c;c=b._default||[];if(g){g=A(g);k=k?","+A(k)+")":h?")":"";if(h&&g.indexOf(".")>-1){g+=h;k=""}h=k?"("+g+").call($item"+k:g;q=k?h:"(typeof("+g+")==='function'?("+g+").call($item):("+g+"))"}else h=c.$1||"null";f=A(f);return"');"+b[e?"close":"open"].split("$notnull_1").join("typeof("+g+")!=='undefined' && ("+g+")!=null").split("$1a").join(q).split("$1").join(h).split("$2").join(f?f.replace(/\s*([^\(]+)\s*(\((.*?)\))?/g,function(n,x,
m,j){return(j=j?","+j+")":m?")":"")?"("+x+").call($item"+j:n}):c.$2||"")+"_.push('"})+"');}return _;")}function E(a){if(a.wrapped){var b=a.wrapped;a._wrap=w(a,true,d.isArray(b)?b:[F.test(b)?b:d(b).html()]).join("")}}function A(a){return a?a.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function C(a){function b(n){function x(B){B+=e;i=g[B]=g[B]||r(i,l[i.parent.key+e]||i.parent,null,true)}var m,j=n,i,u;if(u=n.getAttribute(t)){for(;(j=j.parentNode).nodeType===1&&!(m=j.getAttribute(t)););if(m!==u){j=
j.nodeType===11?0:j.getAttribute(t)||0;if(!(i=l[u])){i=v[u];i=r(i,l[j]||v[j],null,true);i.key=++p;l[p]=i}o&&x(u)}n.removeAttribute(t)}else if(o&&(i=d.data(n,"tmplItem"))){x(i.key);l[i.key]=i;j=(j=d.data(n.parentNode,"tmplItem"))?j.key:0}if(i){for(m=i;m&&m.key!=j;){m.nodes.push(n);m=m.parent}delete i._ctnt;delete i._wrap;d.data(n,"tmplItem",i)}}for(var e="_"+o,c,f,g={},h=0,k=a.length;h<k;h++)if((c=a[h]).nodeType===1){f=c.getElementsByTagName("*");for(var q=f.length-1;q>=0;q--)b(f[q]);b(c)}}function I(a,
b,e,c){if(!a)return s.pop();var f=s.length;s.push({_:a,tmpl:b,parent:f?s[f-1].item:this,item:this,data:e,options:c})}function J(a,b,e){return d.tmpl(d.template(a),b,e,this)}function K(a,b){var e=a.options||{};e.wrapped=b;return d.tmpl(d.template(a.tmpl),a.data,e,a.parent)}function L(a,b){var e=this._wrap;return d.map(d(d.isArray(e)?e.join(""):e).filter(a||"*"),function(c){if(b)c=c.innerText||c.textContent;else{var f;if(!(f=c.outerHTML)){f=document.createElement("div");f.appendChild(c.cloneNode(true));
f=f.innerHTML}c=f}return c})}function M(){var a=this.nodes;d.tmpl(null,null,null,this).insertBefore(a[0]);d(a).remove()}var G=d.fn.domManip,t="_tmplitem",F=/^[^<]*(<[\w\W]+>)[^>]*$/,l={},v={},y,H={key:0,data:{}},p=0,o=0,s=[];d.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){d.fn[a]=function(e){var c=[];e=d(e);var f=this.length===1&&this[0].parentNode;y=l||{};if(f&&f.nodeType===11&&f.childNodes.length===1&&e.length===1){e[b](this[0]);
c=this}else{f=0;for(var g=e.length;f<g;f++){o=f;var h=(f>0?this.clone(true):this).get();d.fn[b].apply(d(e[f]),h);c=c.concat(h)}o=0;c=this.pushStack(c,a,e.selector)}e=y;y=null;d.tmpl.complete(e);return c}});d.fn.extend({tmpl:function(a,b,e){return d.tmpl(this[0],a,b,e)},tmplItem:function(){return d.tmplItem(this[0])},template:function(a){return d.template(a,this[0])},domManip:function(a,b,e){if(a[0].nodeType){for(var c=d.makeArray(arguments),f=a.length,g=0,h;g<f&&!(h=d.data(a[g++],"tmplItem")););if(f>
1)c[0]=[d.makeArray(a)];if(h&&o)c[2]=function(k){d.tmpl.afterManip(this,k,e)};G.apply(this,c)}else G.apply(this,arguments);o=0;y||d.tmpl.complete(l);return this}});d.extend({tmpl:function(a,b,e,c){var f=!c;if(f){c=H;a=d.template[a]||d.template(null,a)}else if(!a){a=c.tmpl;l[c.key]=c;c.nodes=[];E(c);return d(w(c,null,c.tmpl(d,c)))}if(!a)return[];if(typeof b==="function")b=b.call(c||{});if(e&&e.wrapped){c=r(e,c,null,b);c.key=++p;v[p]=c;c.tmpl=a;E(c)}b=d.isArray(b)?d.map(b,function(g){return g?r(e,c,
a,g):null}):[r(e,c,a,b)];return f?d(w(c,null,b)):b},tmplItem:function(a){var b;if(a instanceof d)a=tmpl[0];for(;a&&a.nodeType===1&&!(b=d.data(a,"tmplItem"))&&(a=a.parentNode););return b||H},template:function(a,b){if(b){if(typeof b==="string")b=D(b);else if(b instanceof d)b=b[0]||{};if(b.nodeType)b=d.data(b,"tmpl")||d.data(b,"tmpl",D(b.innerHTML));return typeof a==="string"?d.template[a]=b:b}return typeof a!=="string"?d.template(null,a):d.template[a]||d.template(null,F.test(a)?a:d(a))},encode:function(a){return(""+
a).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}});d.extend(d.tmpl,{tags:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){_=_.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(_,$1,$2);_=[];",close:"call=$item.calls();_=call._.concat($item.wrap(call,_));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{open:"}else{"},
html:{open:"if($notnull_1){_.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){_.push($.encode($1a));}"}},complete:function(){l={}},afterManip:function(a,b,e){var c=b.nodeType===11?d.makeArray(b.childNodes):b.nodeType===1?[b]:[];e.call(a,b);C(c);o++}})})(jQuery);
