/* jquery cycle plugin */
(function(a){function o(b){function d(b){for(;b&&b.nodeName.toLowerCase()!="html";b=b.parentNode){var d=a.css(b,"background-color");if(d.indexOf("rgb")>=0){var e=d.match(/\d+/g);return"#"+c(e[0])+c(e[1])+c(e[2])}if(d&&d!="transparent")return d}return"#ffffff"}function c(a){a=parseInt(a).toString(16);return a.length<2?"0"+a:a}b.each(function(){a(this).css("background-color",d(this))})}function n(b,c){var d=a(c.pager);a.each(b,function(e,f){a.fn.cycle.createPagerAnchor(e,f,d,b,c)});a.fn.cycle.updateActivePagerLink(c.pager,c.startingSlide)}function m(b,c){var d=b.elements;var e=b.$cont[0],f=e.cycleTimeout;if(f){clearTimeout(f);e.cycleTimeout=0}if(b.random&&c<0){b.randomIndex--;if(--b.randomIndex==-2)b.randomIndex=d.length-2;else if(b.randomIndex==-1)b.randomIndex=d.length-1;b.nextSlide=b.randomMap[b.randomIndex]}else if(b.random){if(++b.randomIndex==d.length)b.randomIndex=0;b.nextSlide=b.randomMap[b.randomIndex]}else{b.nextSlide=b.currSlide+c;if(b.nextSlide<0){if(b.nowrap)return false;b.nextSlide=d.length-1}else if(b.nextSlide>=d.length){if(b.nowrap)return false;b.nextSlide=0}}if(a.isFunction(b.prevNextClick))b.prevNextClick(c>0,b.nextSlide,d[b.nextSlide]);k(d,b,1,c>=0);return false}function l(a,b,d,e){if(d.timeoutFn){var f=d.timeoutFn(a,b,d,e);while(f-d.speed<250)f+=d.speed;c("calculated timeout: "+f+"; speed: "+d.speed);if(f!==false)return f}return d.timeout}function k(b,c,d,e){if(d&&c.busy&&c.manualTrump){a(b).stop(true,true);c.busy=false}if(c.busy)return;var f=c.$cont[0],g=b[c.currSlide],h=b[c.nextSlide];if(f.cycleStop!=c.stopCount||f.cycleTimeout===0&&!d)return;if(!d&&!f.cyclePause&&(c.autostop&&--c.countdown<=0||c.nowrap&&!c.random&&c.nextSlide<c.currSlide)){if(c.end)c.end(c);return}if(d||!f.cyclePause){var i=c.fx;g.cycleH=g.cycleH||a(g).height();g.cycleW=g.cycleW||a(g).width();h.cycleH=h.cycleH||a(h).height();h.cycleW=h.cycleW||a(h).width();if(c.multiFx){if(c.lastFx==undefined||++c.lastFx>=c.fxs.length)c.lastFx=0;i=c.fxs[c.lastFx];c.currFx=i}if(c.oneTimeFx){i=c.oneTimeFx;c.oneTimeFx=null}a.fn.cycle.resetState(c,i);if(c.before.length)a.each(c.before,function(a,b){if(f.cycleStop!=c.stopCount)return;b.apply(h,[g,h,c,e])});var j=function(){a.each(c.after,function(a,b){if(f.cycleStop!=c.stopCount)return;b.apply(h,[g,h,c,e])})};if(c.nextSlide!=c.currSlide){c.busy=1;if(c.fxFn)c.fxFn(g,h,c,j,e);else if(a.isFunction(a.fn.cycle[c.fx]))a.fn.cycle[c.fx](g,h,c,j);else a.fn.cycle.custom(g,h,c,j,d&&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{var m=c.nextSlide+1==b.length;c.nextSlide=m?0:c.nextSlide+1;c.currSlide=m?b.length-1:c.nextSlide-1}if(c.pager)a.fn.cycle.updateActivePagerLink(c.pager,c.currSlide)}var n=0;if(c.timeout&&!c.continuous)n=l(g,h,c,e);else if(c.continuous&&f.cyclePause)n=10;if(n>0)f.cycleTimeout=setTimeout(function(){k(b,c,0,!c.rev)},n)}function j(b,c){b.addSlide=function(d,e){var f=a(d),g=f[0];if(!b.autostopCount)b.countdown++;c[e?"unshift":"push"](g);if(b.els)b.els[e?"unshift":"push"](g);b.slideCount=c.length;f.css("position","absolute");f[e?"prependTo":"appendTo"](b.$cont);if(e){b.currSlide++;b.nextSlide++}if(!a.support.opacity&&b.cleartype&&!b.cleartypeNoBg)o(f);if(b.fit&&b.width)f.width(b.width);if(b.fit&&b.height&&b.height!="auto")$slides.height(b.height);g.cycleH=b.fit&&b.height?b.height:f.height();g.cycleW=b.fit&&b.width?b.width:f.width();f.css(b.cssBefore);if(b.pager)a.fn.cycle.createPagerAnchor(c.length-1,g,a(b.pager),c,b);if(a.isFunction(b.onAddSlide))b.onAddSlide(f);else f.hide()}}function i(b){var e,f,g=a.fn.cycle.transitions;if(b.fx.indexOf(",")>0){b.multiFx=true;b.fxs=b.fx.replace(/\s*/g,"").split(",");for(e=0;e<b.fxs.length;e++){var h=b.fxs[e];f=g[h];if(!f||!g.hasOwnProperty(h)||!a.isFunction(f)){d("discarding unknown transition: ",h);b.fxs.splice(e,1);e--}}if(!b.fxs.length){d("No valid transitions named; slideshow terminating.");return false}}else if(b.fx=="all"){b.multiFx=true;b.fxs=[];for(p in g){f=g[p];if(g.hasOwnProperty(p)&&a.isFunction(f))b.fxs.push(p)}}if(b.multiFx&&b.randomizeEffects){var i=Math.floor(Math.random()*20)+30;for(e=0;e<i;e++){var j=Math.floor(Math.random()*b.fxs.length);b.fxs.push(b.fxs.splice(j,1)[0])}c("randomized fx sequence: ",b.fxs)}return true}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 g(b,c,e,g,l){var p=a.extend({},a.fn.cycle.defaults,g||{},a.metadata?b.metadata():a.meta?b.data():{});if(p.autostop)p.countdown=p.autostopCount||e.length;var q=b[0];b.data("cycle.opts",p);p.$cont=b;p.stopCount=q.cycleStop;p.elements=e;p.before=p.before?[p.before]:[];p.after=p.after?[p.after]:[];p.after.unshift(function(){p.busy=0});if(!a.support.opacity&&p.cleartype)p.after.push(function(){f(this,p)});if(p.continuous)p.after.push(function(){k(e,p,0,!p.rev)});h(p);if(!a.support.opacity&&p.cleartype&&!p.cleartypeNoBg)o(c);if(b.css("position")=="static")b.css("position","relative");if(p.width)b.width(p.width);if(p.height&&p.height!="auto")b.height(p.height);if(p.startingSlide)p.startingSlide=parseInt(p.startingSlide);if(p.random){p.randomMap=[];for(var r=0;r<e.length;r++)p.randomMap.push(r);p.randomMap.sort(function(a,b){return Math.random()-.5});p.randomIndex=0;p.startingSlide=p.randomMap[0]}else if(p.startingSlide>=e.length)p.startingSlide=0;p.currSlide=p.startingSlide=p.startingSlide||0;var s=p.startingSlide;c.css({position:"absolute",top:0,left:0}).hide().each(function(b){var c=s?b>=s?e.length-(b-s):s-b:e.length-b;a(this).css("z-index",c)});a(e[s]).css("opacity",1).show();f(e[s],p);if(p.fit&&p.width)c.width(p.width);if(p.fit&&p.height&&p.height!="auto")c.height(p.height);var t=p.containerResize&&!b.innerHeight();if(t){var u=0,v=0;for(var w=0;w<e.length;w++){var x=a(e[w]),y=x[0],z=x.outerWidth(),A=x.outerHeight();if(!z)z=y.offsetWidth;if(!A)A=y.offsetHeight;u=z>u?z:u;v=A>v?A:v}if(u>0&&v>0)b.css({width:u+"px",height:v+"px"})}if(p.pause)b.hover(function(){this.cyclePause++},function(){this.cyclePause--});if(i(p)===false)return false;var B=false;g.requeueAttempts=g.requeueAttempts||0;c.each(function(){var b=a(this);this.cycleH=p.fit&&p.height?p.height:b.height();this.cycleW=p.fit&&p.width?p.width:b.width();if(b.is("img")){var c=a.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete;var e=a.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete;var f=a.browser.opera&&(this.cycleW==42&&this.cycleH==19||this.cycleW==37&&this.cycleH==17)&&!this.complete;var h=this.cycleH==0&&this.cycleW==0&&!this.complete;if(c||e||f||h){if(l.s&&p.requeueOnImageNotLoaded&&++g.requeueAttempts<100){d(g.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){a(l.s,l.c).cycle(g)},p.requeueTimeout);B=true;return false}else{d("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}}return true});if(B)return false;p.cssBefore=p.cssBefore||{};p.animIn=p.animIn||{};p.animOut=p.animOut||{};c.not(":eq("+s+")").css(p.cssBefore);if(p.cssFirst)a(c[s]).css(p.cssFirst);if(p.timeout){p.timeout=parseInt(p.timeout);if(p.speed.constructor==String)p.speed=a.fx.speeds[p.speed]||parseInt(p.speed);if(!p.sync)p.speed=p.speed/2;while(p.timeout-p.speed<250)p.timeout+=p.speed}if(p.easing)p.easeIn=p.easeOut=p.easing;if(!p.speedIn)p.speedIn=p.speed;if(!p.speedOut)p.speedOut=p.speed;p.slideCount=e.length;p.currSlide=p.lastSlide=s;if(p.random){p.nextSlide=p.currSlide;if(++p.randomIndex==e.length)p.randomIndex=0;p.nextSlide=p.randomMap[p.randomIndex]}else p.nextSlide=p.startingSlide>=e.length-1?0:p.startingSlide+1;if(!p.multiFx){var C=a.fn.cycle.transitions[p.fx];if(a.isFunction(C))C(b,c,p);else if(p.fx!="custom"&&!p.multiFx){d("unknown transition: "+p.fx,"; slideshow terminating");return false}}var D=c[s];if(p.before.length)p.before[0].apply(D,[D,D,p,true]);if(p.after.length>1)p.after[1].apply(D,[D,D,p,true]);if(p.next)a(p.next).bind(p.prevNextEvent,function(){return m(p,p.rev?-1:1)});if(p.prev)a(p.prev).bind(p.prevNextEvent,function(){return m(p,p.rev?1:-1)});if(p.pager)n(e,p);j(p,e);return p}function f(b,c){if(!a.support.opacity&&c.cleartype&&b.style.filter){try{b.style.removeAttribute("filter")}catch(d){}}}function e(b,c,e){if(b.cycleStop==undefined)b.cycleStop=0;if(c===undefined||c===null)c={};if(c.constructor==String){switch(c){case"stop":b.cycleStop++;if(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(e===true){c=a(b).data("cycle.opts");if(!c){d("options not found, can not resume");return false}if(b.cycleTimeout){clearTimeout(b.cycleTimeout);b.cycleTimeout=0}k(c.elements,c,1,1)}return false;case"prev":case"next":var f=a(b).data("cycle.opts");if(!f){d('options not found, "prev/next" ignored');return false}a.fn.cycle[c](f);return false;default:c={fx:c}}return c}else if(c.constructor==Number){var g=c;c=a(b).data("cycle.opts");if(!c){d("options not found, can not advance slide");return false}if(g<0||g>=c.elements.length){d("invalid slide index: "+g);return false}c.nextSlide=g;if(b.cycleTimeout){clearTimeout(b.cycleTimeout);b.cycleTimeout=0}if(typeof e=="string")c.oneTimeFx=e;k(c.elements,c,1,g>=c.currSlide);return false}return c}function d(){if(window.console&&window.console.log)window.console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function c(b){if(a.fn.cycle.debug)d(b)}var b="2.74";if(a.support==undefined){a.support={opacity:!a.browser.msie}}a.fn.cycle=function(b,f){var h={s:this.selector,c:this.context};if(this.length===0&&b!="stop"){if(!a.isReady&&h.s){d("DOM not ready, queuing slideshow");a(function(){a(h.s,h.c).cycle(b,f)});return this}d("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var i=e(this,b,f);if(i===false)return;if(this.cycleTimeout)clearTimeout(this.cycleTimeout);this.cycleTimeout=this.cyclePause=0;var j=a(this);var m=i.slideExpr?a(i.slideExpr,this):j.children();var n=m.get();if(n.length<2){d("terminating; too few slides: "+n.length);return}var o=g(j,m,n,i,h);if(o===false)return;var p=o.continuous?10:l(o.currSlide,o.nextSlide,o,!o.rev);if(p){p+=o.delay||0;if(p<10)p=10;c("first timeout: "+p);this.cycleTimeout=setTimeout(function(){k(n,o,0,!o.rev)},p)}})};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)});var d=a.fn.cycle.transitions[c];if(a.isFunction(d))d(b.$cont,a(b.elements),b)};a.fn.cycle.updateActivePagerLink=function(b,c){a(b).each(function(){a(this).find("a").removeClass("activeSlide").filter("a:eq("+c+")").addClass("activeSlide")})};a.fn.cycle.next=function(a){m(a,a.rev?-1:1)};a.fn.cycle.prev=function(a){m(a,a.rev?1:-1)};a.fn.cycle.createPagerAnchor=function(b,c,d,e,f){var g;if(a.isFunction(f.pagerAnchorBuilder))g=f.pagerAnchorBuilder(b,c);else g='<a href="#">'+(b+1)+"</a>";if(!g)return;var h=a(g);if(h.parents("body").length===0){var i=[];if(d.length>1){d.each(function(){var b=h.clone(true);a(this).append(b);i.push(b[0])});h=a(i)}else{h.appendTo(d)}}h.bind(f.pagerEvent,function(c){c.preventDefault();f.nextSlide=b;var d=f.$cont[0],g=d.cycleTimeout;if(g){clearTimeout(g);d.cycleTimeout=0}if(a.isFunction(f.pagerClick))f.pagerClick(f.nextSlide,e[f.nextSlide]);k(e,f,1,f.currSlide<b);return false});if(f.pagerEvent!="click")h.click(function(){return false});if(f.pauseOnPagerHover)h.hover(function(){f.$cont[0].cyclePause++},function(){f.$cont[0].cyclePause--})};a.fn.cycle.hopsFromLast=function(a,b){var c,d=a.lastSlide,e=a.currSlide;if(b)c=e>d?e-d:a.slideCount-d;else c=e<d?d-e:d+a.slideCount-e;return c};a.fn.cycle.commonReset=function(b,c,d,e,f,g){a(d.elements).not(b).hide();d.cssBefore.opacity=1;d.cssBefore.display="block";if(e!==false&&c.cycleW>0)d.cssBefore.width=c.cycleW;if(f!==false&&c.cycleH>0)d.cssBefore.height=c.cycleH;d.cssAfter=d.cssAfter||{};d.cssAfter.display="none";a(b).css("zIndex",d.slideCount+(g===true?1:0));a(c).css("zIndex",d.slideCount+(g===true?0:1))};a.fn.cycle.custom=function(b,c,d,e,f){var g=a(b),h=a(c);var i=d.speedIn,j=d.speedOut,k=d.easeIn,l=d.easeOut;h.css(d.cssBefore);if(f){if(typeof f=="number")i=j=f;else i=j=1;k=l=null}var m=function(){h.animate(d.animIn,i,k,e)};g.animate(d.animOut,j,l,function(){if(d.cssAfter)g.css(d.cssAfter);if(!d.sync)m()});if(d.sync)m()};a.fn.cycle.transitions={fade:function(b,c,d){c.not(":eq("+d.currSlide+")").css("opacity",0);d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d);d.cssBefore.opacity=0});d.animIn={opacity:1};d.animOut={opacity:0};d.cssBefore={top:0,left:0}}};a.fn.cycle.ver=function(){return b};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}})(jQuery);(function(a){a.fn.cycle.transitions.none=function(b,c,d){d.fxFn=function(b,c,d,e){a(c).show();a(b).hide();e()}};a.fn.cycle.transitions.scrollUp=function(b,c,d){b.css("overflow","hidden");d.before.push(a.fn.cycle.commonReset);var e=b.height();d.cssBefore={top:e,left:0};d.cssFirst={top:0};d.animIn={top:0};d.animOut={top:-e}};a.fn.cycle.transitions.scrollDown=function(b,c,d){b.css("overflow","hidden");d.before.push(a.fn.cycle.commonReset);var e=b.height();d.cssFirst={top:0};d.cssBefore={top:-e,left:0};d.animIn={top:0};d.animOut={top:e}};a.fn.cycle.transitions.scrollLeft=function(b,c,d){b.css("overflow","hidden");d.before.push(a.fn.cycle.commonReset);var e=b.width();d.cssFirst={left:0};d.cssBefore={left:e,top:0};d.animIn={left:0};d.animOut={left:0-e}};a.fn.cycle.transitions.scrollRight=function(b,c,d){b.css("overflow","hidden");d.before.push(a.fn.cycle.commonReset);var e=b.width();d.cssFirst={left:0};d.cssBefore={left:-e,top:0};d.animIn={left:0};d.animOut={left:e}};a.fn.cycle.transitions.scrollHorz=function(b,c,d){b.css("overflow","hidden").width();d.before.push(function(b,c,d,e){a.fn.cycle.commonReset(b,c,d);d.cssBefore.left=e?c.cycleW-1:1-c.cycleW;d.animOut.left=e?-b.cycleW:b.cycleW});d.cssFirst={left:0};d.cssBefore={top:0};d.animIn={left:0};d.animOut={top:0}};a.fn.cycle.transitions.scrollVert=function(b,c,d){b.css("overflow","hidden");d.before.push(function(b,c,d,e){a.fn.cycle.commonReset(b,c,d);d.cssBefore.top=e?1-c.cycleH:c.cycleH-1;d.animOut.top=e?b.cycleH:-b.cycleH});d.cssFirst={top:0};d.cssBefore={left:0};d.animIn={top:0};d.animOut={left:0}};a.fn.cycle.transitions.slideX=function(b,c,d){d.before.push(function(b,c,d){a(d.elements).not(b).hide();a.fn.cycle.commonReset(b,c,d,false,true);d.animIn.width=c.cycleW});d.cssBefore={left:0,top:0,width:0};d.animIn={width:"show"};d.animOut={width:0}};a.fn.cycle.transitions.slideY=function(b,c,d){d.before.push(function(b,c,d){a(d.elements).not(b).hide();a.fn.cycle.commonReset(b,c,d,true,false);d.animIn.height=c.cycleH});d.cssBefore={left:0,top:0,height:0};d.animIn={height:"show"};d.animOut={height:0}};a.fn.cycle.transitions.shuffle=function(b,c,d){var e,f=b.css("overflow","visible").width();c.css({left:0,top:0});d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,true,true,true)});if(!d.speedAdjusted){d.speed=d.speed/2;d.speedAdjusted=true}d.random=0;d.shuffle=d.shuffle||{left:-f,top:15};d.els=[];for(e=0;e<c.length;e++)d.els.push(c[e]);for(e=0;e<d.currSlide;e++)d.els.push(d.els.shift());d.fxFn=function(b,c,d,e,f){var g=f?a(b):a(c);a(c).css(d.cssBefore);var h=d.slideCount;g.animate(d.shuffle,d.speedIn,d.easeIn,function(){var c=a.fn.cycle.hopsFromLast(d,f);for(var i=0;i<c;i++)f?d.els.push(d.els.shift()):d.els.unshift(d.els.pop());if(f){for(var j=0,k=d.els.length;j<k;j++)a(d.els[j]).css("z-index",k-j+h)}else{var l=a(b).css("z-index");g.css("z-index",parseInt(l)+1+h)}g.animate({left:0,top:0},d.speedOut,d.easeOut,function(){a(f?this:b).hide();if(e)e()})})};d.cssBefore={display:"block",opacity:1,top:0,left:0}};a.fn.cycle.transitions.turnUp=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,true,false);d.cssBefore.top=c.cycleH;d.animIn.height=c.cycleH});d.cssFirst={top:0};d.cssBefore={left:0,height:0};d.animIn={top:0};d.animOut={height:0}};a.fn.cycle.transitions.turnDown=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,true,false);d.animIn.height=c.cycleH;d.animOut.top=b.cycleH});d.cssFirst={top:0};d.cssBefore={left:0,top:0,height:0};d.animOut={height:0}};a.fn.cycle.transitions.turnLeft=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,false,true);d.cssBefore.left=c.cycleW;d.animIn.width=c.cycleW});d.cssBefore={top:0,width:0};d.animIn={left:0};d.animOut={width:0}};a.fn.cycle.transitions.turnRight=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,false,true);d.animIn.width=c.cycleW;d.animOut.left=b.cycleW});d.cssBefore={top:0,left:0,width:0};d.animIn={left:0};d.animOut={width:0}};a.fn.cycle.transitions.zoom=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,false,false,true);d.cssBefore.top=c.cycleH/2;d.cssBefore.left=c.cycleW/2;d.animIn={top:0,left:0,width:c.cycleW,height:c.cycleH};d.animOut={width:0,height:0,top:b.cycleH/2,left:b.cycleW/2}});d.cssFirst={top:0,left:0};d.cssBefore={width:0,height:0}};a.fn.cycle.transitions.fadeZoom=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,false,false);d.cssBefore.left=c.cycleW/2;d.cssBefore.top=c.cycleH/2;d.animIn={top:0,left:0,width:c.cycleW,height:c.cycleH}});d.cssBefore={width:0,height:0};d.animOut={opacity:0}};a.fn.cycle.transitions.blindX=function(b,c,d){var e=b.css("overflow","hidden").width();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d);d.animIn.width=c.cycleW;d.animOut.left=b.cycleW});d.cssBefore={left:e,top:0};d.animIn={left:0};d.animOut={left:e}};a.fn.cycle.transitions.blindY=function(b,c,d){var e=b.css("overflow","hidden").height();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d);d.animIn.height=c.cycleH;d.animOut.top=b.cycleH});d.cssBefore={top:e,left:0};d.animIn={top:0};d.animOut={top:e}};a.fn.cycle.transitions.blindZ=function(b,c,d){var e=b.css("overflow","hidden").height();var f=b.width();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d);d.animIn.height=c.cycleH;d.animOut.top=b.cycleH});d.cssBefore={top:e,left:f};d.animIn={top:0,left:0};d.animOut={top:e,left:f}};a.fn.cycle.transitions.growX=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,false,true);d.cssBefore.left=this.cycleW/2;d.animIn={left:0,width:this.cycleW};d.animOut={left:0}});d.cssBefore={width:0,top:0}};a.fn.cycle.transitions.growY=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,true,false);d.cssBefore.top=this.cycleH/2;d.animIn={top:0,height:this.cycleH};d.animOut={top:0}});d.cssBefore={height:0,left:0}};a.fn.cycle.transitions.curtainX=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,false,true,true);d.cssBefore.left=c.cycleW/2;d.animIn={left:0,width:this.cycleW};d.animOut={left:b.cycleW/2,width:0}});d.cssBefore={top:0,width:0}};a.fn.cycle.transitions.curtainY=function(b,c,d){d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,true,false,true);d.cssBefore.top=c.cycleH/2;d.animIn={top:0,height:c.cycleH};d.animOut={top:b.cycleH/2,height:0}});d.cssBefore={left:0,height:0}};a.fn.cycle.transitions.cover=function(b,c,d){var e=d.direction||"left";var f=b.css("overflow","hidden").width();var g=b.height();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d);if(e=="right")d.cssBefore.left=-f;else if(e=="up")d.cssBefore.top=g;else if(e=="down")d.cssBefore.top=-g;else d.cssBefore.left=f});d.animIn={left:0,top:0};d.animOut={opacity:1};d.cssBefore={top:0,left:0}};a.fn.cycle.transitions.uncover=function(b,c,d){var e=d.direction||"left";var f=b.css("overflow","hidden").width();var g=b.height();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,true,true,true);if(e=="right")d.animOut.left=f;else if(e=="up")d.animOut.top=-g;else if(e=="down")d.animOut.top=g;else d.animOut.left=-f});d.animIn={left:0,top:0};d.animOut={opacity:1};d.cssBefore={top:0,left:0}};a.fn.cycle.transitions.toss=function(b,c,d){var e=b.css("overflow","visible").width();var f=b.height();d.before.push(function(b,c,d){a.fn.cycle.commonReset(b,c,d,true,true,true);if(!d.animOut.left&&!d.animOut.top)d.animOut={left:e*2,top:-f/2,opacity:0};else d.animOut.opacity=0});d.cssBefore={left:0,top:0};d.animIn={left:0}};a.fn.cycle.transitions.wipe=function(b,c,d){var e=b.css("overflow","hidden").width();var f=b.height();d.cssBefore=d.cssBefore||{};var g;if(d.clip){if(/l2r/.test(d.clip))g="rect(0px 0px "+f+"px 0px)";else if(/r2l/.test(d.clip))g="rect(0px "+e+"px "+f+"px "+e+"px)";else if(/t2b/.test(d.clip))g="rect(0px "+e+"px 0px 0px)";else if(/b2t/.test(d.clip))g="rect("+f+"px "+e+"px "+f+"px 0px)";else if(/zoom/.test(d.clip)){var h=parseInt(f/2);var i=parseInt(e/2);g="rect("+h+"px "+i+"px "+h+"px "+i+"px)"}}d.cssBefore.clip=d.cssBefore.clip||g||"rect(0px 0px 0px 0px)";var j=d.cssBefore.clip.match(/(\d+)/g);var k=parseInt(j[0]),l=parseInt(j[1]),m=parseInt(j[2]),n=parseInt(j[3]);d.before.push(function(b,c,d){if(b==c)return;var g=a(b),h=a(c);a.fn.cycle.commonReset(b,c,d,true,true,false);d.cssAfter.display="block";var i=1,j=parseInt(d.speedIn/13)-1;(function o(){var a=k?k-parseInt(i*(k/j)):0;var b=n?n-parseInt(i*(n/j)):0;var c=m<f?m+parseInt(i*((f-m)/j||1)):f;var d=l<e?l+parseInt(i*((e-l)/j||1)):e;h.css({clip:"rect("+a+"px "+d+"px "+c+"px "+b+"px)"});i++<=j?setTimeout(o,13):g.css("display","none")})()});d.cssBefore={display:"block",opacity:1,top:0,left:0};d.animIn={left:0};d.animOut={left:0}}})(jQuery)
/* input buttons tekst erin */

/* fix footer */
$(document).ready(function(){var a=$("#wrapper").height();var b=$(window).height();if(a<b){var c=$("#footer").height();var d=$("#footer").offset().top;var e=b-d;$("#footer").height(e+"px")}$(".fancybox").fancybox({openEffect:'none',closeEffect:'none'})});(function(window,document,$){var W=$(window),D=$(document),F=$.fancybox=function(){F.open.apply(this,arguments)},didResize=false,resizeTimer=null;$.extend(F,{version:'2.0.4',defaults:{padding:15,margin:20,width:800,height:600,minWidth:200,minHeight:200,maxWidth:9999,maxHeight:9999,autoSize:true,fitToView:true,aspectRatio:false,topRatio:0.5,fixed:!$.browser.msie||$.browser.version>6||!document.documentElement.hasOwnProperty('ontouchstart'),scrolling:'auto',wrapCSS:'fancybox-default',arrows:true,closeBtn:true,closeClick:false,nextClick:false,mouseWheel:true,autoPlay:false,playSpeed:3000,modal:false,loop:true,ajax:{},keys:{next:[13,32,34,39,40],prev:[8,33,37,38],close:[27]},index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe class="fancybox-iframe" name="fancybox-frame{rnd}" frameborder="0" hspace="0" '+($.browser.msie?'allowtransparency="true""':'')+' scrolling="{scrolling}" src="{href}"></iframe>',swf:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="wmode" value="transparent" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{href}" /><embed src="{href}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="100%" height="100%" wmode="transparent"></embed></object>',error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<div title="Close" class="fancybox-item fancybox-close"></div>',next:'<a title="Next" class="fancybox-item fancybox-next"><span></span></a>',prev:'<a title="Previous" class="fancybox-item fancybox-prev"><span></span></a>'},openEffect:'fade',openSpeed:250,openEasing:'swing',openOpacity:true,openMethod:'zoomIn',closeEffect:'fade',closeSpeed:250,closeEasing:'swing',closeOpacity:true,closeMethod:'zoomOut',nextEffect:'elastic',nextSpeed:300,nextEasing:'swing',nextMethod:'changeIn',prevEffect:'elastic',prevSpeed:300,prevEasing:'swing',prevMethod:'changeOut',helpers:{overlay:{speedIn:0,speedOut:300,opacity:0.8,css:{cursor:'pointer'},closeClick:true},title:{type:'float'}},onCancel:$.noop,beforeLoad:$.noop,afterLoad:$.noop,beforeShow:$.noop,afterShow:$.noop,beforeClose:$.noop,afterClose:$.noop},group:{},opts:{},coming:null,current:null,isOpen:false,isOpened:false,wrap:null,outer:null,inner:null,player:{timer:null,isActive:false},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(group,opts){if(!$.isArray(group)){group=[group]}if(!group.length){return}F.close(true);F.opts=$.extend(true,{},F.defaults,opts);F.group=group;F._start(F.opts.index||0)},cancel:function(){if(F.coming&&false===F.trigger('onCancel')){return}F.coming=null;F.hideLoading();if(F.ajaxLoad){F.ajaxLoad.abort()}F.ajaxLoad=null;if(F.imgPreload){F.imgPreload.onload=F.imgPreload.onabort=F.imgPreload.onerror=null}},close:function(a){F.cancel();if(!F.current||false===F.trigger('beforeClose')){return}F.unbindEvents();if(!F.isOpen||(a&&a[0]===true)){$(".fancybox-wrap").stop().trigger('onReset').remove();F._afterZoomOut()}else{F.isOpen=F.isOpened=false;$(".fancybox-item").remove();F.wrap.stop(true).removeClass('fancybox-opened');F.inner.css('overflow','hidden');F.transitions[F.current.closeMethod]()}},play:function(a){var clear=function(){clearTimeout(F.player.timer)},set=function(){clear();if(F.current&&F.player.isActive){F.player.timer=setTimeout(F.next,F.current.playSpeed)}},stop=function(){clear();$('body').unbind('.player');F.player.isActive=false;F.trigger('onPlayEnd')},start=function(){if(F.current&&(F.current.loop||F.current.index<F.group.length-1)){F.player.isActive=true;$('body').bind({'afterShow.player onUpdate.player':set,'onCancel.player beforeClose.player':stop,'beforeLoad.player':clear});set();F.trigger('onPlayStart')}};if(F.player.isActive||(a&&a[0]===false)){stop()}else{start()}},next:function(){if(F.current){F.jumpto(F.current.index+1)}},prev:function(){if(F.current){F.jumpto(F.current.index-1)}},jumpto:function(index){if(!F.current){return}index=parseInt(index,10);if(F.group.length>1&&F.current.loop){if(index>=F.group.length){index=0}else if(index<0){index=F.group.length-1}}if(typeof F.group[index]!=='undefined'){F.cancel();F._start(index)}},reposition:function(a){if(F.isOpen){F.wrap.css(F._getPosition(a))}},update:function(){if(F.isOpen){if(!didResize){resizeTimer=setInterval(function(){if(didResize){didResize=false;clearTimeout(resizeTimer);if(F.current){if(F.current.autoSize){F.inner.height('auto');F.current.height=F.inner.height()}F._setDimension();if(F.current.canGrow){F.inner.height('auto')}F.reposition();F.trigger('onUpdate')}}},100)}didResize=true}},toggle:function(){if(F.isOpen){F.current.fitToView=!F.current.fitToView;F.update()}},hideLoading:function(){$("#fancybox-loading").remove()},showLoading:function(){F.hideLoading();$('<div id="fancybox-loading"></div>').click(F.cancel).appendTo('body')},getViewport:function(){return{x:W.scrollLeft(),y:W.scrollTop(),w:W.width(),h:W.height()}},unbindEvents:function(){if(F.wrap){F.wrap.unbind('.fb')}D.unbind('.fb');W.unbind('.fb')},bindEvents:function(){var current=F.current,keys=current.keys;if(!current){return}W.bind('resize.fb, orientationchange.fb',F.update);if(keys){D.bind('keydown.fb',function(e){var code;if(!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey&&$.inArray(e.target.tagName.toLowerCase(),['input','textarea','select','button'])<0){code=e.keyCode;if($.inArray(code,keys.close)>-1){F.close();e.preventDefault()}else if($.inArray(code,keys.next)>-1){F.next();e.preventDefault()}else if($.inArray(code,keys.prev)>-1){F.prev();e.preventDefault()}}})}if($.fn.mousewheel&&current.mouseWheel&&F.group.length>1){F.wrap.bind('mousewheel.fb',function(e,delta){var target=$(e.target).get(0);if(target.clientHeight===0||target.scrollHeight===target.clientHeight){e.preventDefault();F[delta>0?'prev':'next']()}})}},trigger:function(event){var ret,obj=F[$.inArray(event,['onCancel','beforeLoad','afterLoad'])>-1?'coming':'current'];if(!obj){return}if($.isFunction(obj[event])){ret=obj[event].apply(obj,Array.prototype.slice.call(arguments,1))}if(ret===false){return false}if(obj.helpers){$.each(obj.helpers,function(helper,opts){if(opts&&typeof F.helpers[helper]!=='undefined'&&$.isFunction(F.helpers[helper][event])){F.helpers[helper][event](opts,obj)}})}$.event.trigger(event+'.fb')},isImage:function(str){return str&&str.match(/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i)},isSWF:function(str){return str&&str.match(/\.(swf)(.*)?$/i)},_start:function(index){var coming={},element=F.group[index]||null,isDom,href,type,rez;if(typeof element==='object'&&(element.nodeType||element instanceof $)){isDom=true;if($.metadata){coming=$(element).metadata()}}coming=$.extend(true,{},F.opts,{index:index,element:element},($.isPlainObject(element)?element:coming));$.each(['href','title','content','type'],function(i,v){coming[v]=F.opts[v]||(isDom&&$(element).attr(v))||coming[v]||null});if(typeof coming.margin==='number'){coming.margin=[coming.margin,coming.margin,coming.margin,coming.margin]}if(coming.modal){$.extend(true,coming,{closeBtn:false,closeClick:false,nextClick:false,arrows:false,mouseWheel:false,keys:null,helpers:{overlay:{css:{cursor:'auto'},closeClick:false}}})}F.coming=coming;if(false===F.trigger('beforeLoad')){F.coming=null;return}type=coming.type;href=coming.href;if(!type){if(isDom){rez=$(element).data('fancybox-type');if(!rez&&element.className){rez=element.className.match(/fancybox\.(\w+)/);type=rez?rez[1]:null}}if(!type&&href){if(F.isImage(href)){type='image'}else if(F.isSWF(href)){type='swf'}else if(href.match(/^#/)){type='inline'}}if(!type){type=isDom?'inline':'html'}coming.type=type}if(type==='inline'||type==='html'){coming.content=coming.content||(type==='inline'&&href?$(href):element);if(!coming.content.length){type=null}}else{coming.href=href||element;if(!coming.href){type=null}}coming.group=F.group;if(type==='image'){F._loadImage()}else if(type==='ajax'){F._loadAjax()}else if(type){F._afterLoad()}else{F._error('type')}},_error:function(type){$.extend(F.coming,{type:'html',autoSize:true,minHeight:'0',hasError:type,content:F.coming.tpl.error});F._afterLoad()},_loadImage:function(){F.imgPreload=new Image();F.imgPreload.onload=function(){this.onload=this.onerror=null;F.coming.width=this.width;F.coming.height=this.height;F._afterLoad()};F.imgPreload.onerror=function(){this.onload=this.onerror=null;F._error('image')};F.imgPreload.src=F.coming.href;if(!F.imgPreload.complete){F.showLoading()}},_loadAjax:function(){F.showLoading();F.ajaxLoad=$.ajax($.extend({},F.coming.ajax,{url:F.coming.href,error:function(jqXHR,textStatus){if(textStatus!=='abort'){F._error('ajax',jqXHR)}else{F.hideLoading()}},success:function(data,textStatus){if(textStatus==='success'){F.coming.content=data;F._afterLoad()}}}))},_preload:function(){var group=F.group,index=F.current.index,load=function(href){if(href&&F.isImage(href)){new Image().src=href}};if(group.length>1){load($(group[index+1]||group[0]).attr('href'));load($(group[index-1]||group[group.length-1]).attr('href'))}},_afterLoad:function(){F.hideLoading();if(!F.coming||false===F.trigger('afterLoad',F.current)){F.coming=false;return}if(F.isOpened){$(".fancybox-item").remove();F.wrap.stop(true).removeClass('fancybox-opened');F.inner.css('overflow','hidden');F.transitions[F.current.prevMethod]()}else{$(".fancybox-wrap").stop().trigger('onReset').remove();F.trigger('afterClose')}F.unbindEvents();F.isOpen=false;F.current=F.coming;F.coming=false;F.wrap=$(F.current.tpl.wrap).addClass('fancybox-tmp '+F.current.wrapCSS).appendTo('body');F.outer=$('.fancybox-outer',F.wrap).css('padding',F.current.padding+'px');F.inner=$('.fancybox-inner',F.wrap);F._setContent();F.trigger('beforeShow');F._setDimension();F.wrap.hide().removeClass('fancybox-tmp');F.bindEvents();F._preload();F.transitions[F.isOpened?F.current.nextMethod:F.current.openMethod]()},_setContent:function(){var content,loadingBay,current=F.current,type=current.type;switch(type){case'inline':case'ajax':case'html':content=current.content;if(type==='inline'&&content instanceof $){content=content.show().detach();if(content.parent().hasClass('fancybox-inner')){content.parents('.fancybox-wrap').trigger('onReset').remove()}$(F.wrap).bind('onReset',function(){content.appendTo('body').hide()})}if(current.autoSize){loadingBay=$('<div class="fancybox-tmp"></div>').appendTo($("body")).append(content);current.width=loadingBay.outerWidth();current.height=loadingBay.outerHeight(true);content=loadingBay.contents().detach();loadingBay.remove()}break;case'image':content=current.tpl.image.replace('{href}',current.href);current.aspectRatio=true;break;case'swf':content=current.tpl.swf.replace(/\{width\}/g,current.width).replace(/\{height\}/g,current.height).replace(/\{href\}/g,current.href);break;case'iframe':content=current.tpl.iframe.replace('{href}',current.href).replace('{scrolling}',current.scrolling).replace('{rnd}',new Date().getTime());break}if($.inArray(type,['image','swf','iframe'])>-1){current.autoSize=false;current.scrolling=false}F.inner.append(content)},_setDimension:function(){var wrap=F.wrap,outer=F.outer,inner=F.inner,current=F.current,viewport=F.getViewport(),margin=current.margin,padding2=current.padding*2,width=current.width+padding2,height=current.height+padding2,ratio=current.width/current.height,maxWidth=current.maxWidth,maxHeight=current.maxHeight,minWidth=current.minWidth,minHeight=current.minHeight,height_,space;viewport.w-=(margin[1]+margin[3]);viewport.h-=(margin[0]+margin[2]);if(width.toString().indexOf('%')>-1){width=((viewport.w*parseFloat(width))/100)}if(height.toString().indexOf('%')>-1){height=((viewport.h*parseFloat(height))/100)}if(current.fitToView){maxWidth=Math.min(viewport.w,maxWidth);maxHeight=Math.min(viewport.h,maxHeight)}minWidth=Math.min(width,minWidth);minHeight=Math.min(width,minHeight);maxWidth=Math.max(minWidth,maxWidth);maxHeight=Math.max(minHeight,maxHeight);if(current.aspectRatio){if(width>maxWidth){width=maxWidth;height=((width-padding2)/ratio)+padding2}if(height>maxHeight){height=maxHeight;width=((height-padding2)*ratio)+padding2}if(width<minWidth){width=minWidth;height=((width-padding2)/ratio)+padding2}if(height<minHeight){height=minHeight;width=((height-padding2)*ratio)+padding2}}else{width=Math.max(minWidth,Math.min(width,maxWidth));height=Math.max(minHeight,Math.min(height,maxHeight))}width=Math.round(width);height=Math.round(height);$(wrap.add(outer).add(inner)).width('auto').height('auto');inner.width(width-padding2).height(height-padding2);wrap.width(width);height_=wrap.height();if(width>maxWidth||height_>maxHeight){while((width>maxWidth||height_>maxHeight)&&width>minWidth&&height_>minHeight){height=height-10;if(current.aspectRatio){width=Math.round(((height-padding2)*ratio)+padding2);if(width<minWidth){width=minWidth;height=((width-padding2)/ratio)+padding2}}else{width=width-10}inner.width(width-padding2).height(height-padding2);wrap.width(width);height_=wrap.height()}}current.dim={width:width,height:height_};current.canGrow=current.autoSize&&height>minHeight&&height<maxHeight;current.canShrink=false;current.canExpand=false;if((width-padding2)<current.width||(height-padding2)<current.height){current.canExpand=true}else if((width>viewport.w||height_>viewport.h)&&width>minWidth&&height>minHeight){current.canShrink=true}space=height_-padding2;F.innerSpace=space-inner.height();F.outerSpace=space-outer.height()},_getPosition:function(a){var current=F.current,viewport=F.getViewport(),margin=current.margin,width=F.wrap.width()+margin[1]+margin[3],height=F.wrap.height()+margin[0]+margin[2],rez={position:'absolute',top:margin[0]+viewport.y,left:margin[3]+viewport.x};if(current.fixed&&(!a||a[0]===false)&&height<=viewport.h&&width<=viewport.w){rez={position:'fixed',top:margin[0],left:margin[3]}}rez.top=Math.ceil(Math.max(rez.top,rez.top+((viewport.h-height)*current.topRatio)))+'px';rez.left=Math.ceil(Math.max(rez.left,rez.left+((viewport.w-width)*0.5)))+'px';return rez},_afterZoomIn:function(){var current=F.current;F.isOpen=F.isOpened=true;F.wrap.addClass('fancybox-opened').css('overflow','visible');F.update();F.inner.css('overflow',current.scrolling==='auto'?'auto':(current.scrolling==='yes'?'scroll':'hidden'));if(current.closeClick||current.nextClick){F.inner.css('cursor','pointer').bind('click.fb',current.nextClick?F.next:F.close)}if(current.closeBtn){$(current.tpl.closeBtn).appendTo(F.wrap).bind('click.fb',F.close)}if(current.arrows&&F.group.length>1){if(current.loop||current.index>0){$(current.tpl.prev).appendTo(F.wrap).bind('click.fb',F.prev)}if(current.loop||current.index<F.group.length-1){$(current.tpl.next).appendTo(F.wrap).bind('click.fb',F.next)}}F.trigger('afterShow');if(F.opts.autoPlay&&!F.player.isActive){F.opts.autoPlay=false;F.play()}},_afterZoomOut:function(){F.trigger('afterClose');F.wrap.trigger('onReset').remove();$.extend(F,{group:{},opts:{},current:null,isOpened:false,isOpen:false,wrap:null,outer:null,inner:null})}});F.transitions={getOrigPosition:function(){var element=F.current.element,pos={},width=50,height=50,image,viewport;if(element&&element.nodeName&&$(element).is(':visible')){image=$(element).find('img:first');if(image.length){pos=image.offset();width=image.outerWidth();height=image.outerHeight()}else{pos=$(element).offset()}}else{viewport=F.getViewport();pos.top=viewport.y+(viewport.h-height)*0.5;pos.left=viewport.x+(viewport.w-width)*0.5}pos={top:Math.ceil(pos.top)+'px',left:Math.ceil(pos.left)+'px',width:Math.ceil(width)+'px',height:Math.ceil(height)+'px'};return pos},step:function(now,fx){var ratio,innerValue,outerValue;if(fx.prop==='width'||fx.prop==='height'){innerValue=outerValue=Math.ceil(now-(F.current.padding*2));if(fx.prop==='height'){ratio=(now-fx.start)/(fx.end-fx.start);if(fx.start>fx.end){ratio=1-ratio}innerValue-=F.innerSpace*ratio;outerValue-=F.outerSpace*ratio}F.inner[fx.prop](innerValue);F.outer[fx.prop](outerValue)}},zoomIn:function(){var wrap=F.wrap,current=F.current,startPos,endPos,dim=current.dim;if(current.openEffect==='elastic'){endPos=$.extend({},dim,F._getPosition(true));delete endPos.position;startPos=this.getOrigPosition();if(current.openOpacity){startPos.opacity=0;endPos.opacity=1}wrap.css(startPos).show().animate(endPos,{duration:current.openSpeed,easing:current.openEasing,step:this.step,complete:F._afterZoomIn})}else{wrap.css($.extend({},dim,F._getPosition()));if(current.openEffect==='fade'){wrap.fadeIn(current.openSpeed,F._afterZoomIn)}else{wrap.show();F._afterZoomIn()}}},zoomOut:function(){var wrap=F.wrap,current=F.current,endPos;if(current.closeEffect==='elastic'){if(wrap.css('position')==='fixed'){wrap.css(F._getPosition(true))}endPos=this.getOrigPosition();if(current.closeOpacity){endPos.opacity=0}wrap.animate(endPos,{duration:current.closeSpeed,easing:current.closeEasing,step:this.step,complete:F._afterZoomOut})}else{wrap.fadeOut(current.closeEffect==='fade'?current.closeSpeed:0,F._afterZoomOut)}},changeIn:function(){var wrap=F.wrap,current=F.current,startPos;if(current.nextEffect==='elastic'){startPos=F._getPosition(true);startPos.opacity=0;startPos.top=(parseInt(startPos.top,10)-200)+'px';wrap.css(startPos).show().animate({opacity:1,top:'+=200px'},{duration:current.nextSpeed,complete:F._afterZoomIn})}else{wrap.css(F._getPosition());if(current.nextEffect==='fade'){wrap.hide().fadeIn(current.nextSpeed,F._afterZoomIn)}else{wrap.show();F._afterZoomIn()}}},changeOut:function(){var wrap=F.wrap,current=F.current,cleanUp=function(){$(this).trigger('onReset').remove()};wrap.removeClass('fancybox-opened');if(current.prevEffect==='elastic'){wrap.animate({'opacity':0,top:'+=200px'},{duration:current.prevSpeed,complete:cleanUp})}else{wrap.fadeOut(current.prevEffect==='fade'?current.prevSpeed:0,cleanUp)}}};F.helpers.overlay={overlay:null,update:function(){var width,scrollWidth,offsetWidth;this.overlay.width(0).height(0);if($.browser.msie){scrollWidth=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);offsetWidth=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);width=scrollWidth<offsetWidth?W.width():scrollWidth}else{width=D.width()}this.overlay.width(width).height(D.height())},beforeShow:function(opts){if(this.overlay){return}this.overlay=$('<div id="fancybox-overlay"></div>').css(opts.css||{background:'black'}).appendTo('body');this.update();if(opts.closeClick){this.overlay.bind('click.fb',F.close)}W.bind("resize.fb",$.proxy(this.update,this));this.overlay.fadeTo(opts.speedIn||"fast",opts.opacity||1)},onUpdate:function(){this.update()},afterClose:function(opts){if(this.overlay){this.overlay.fadeOut(opts.speedOut||"fast",function(){$(this).remove()})}this.overlay=null}};F.helpers.title={beforeShow:function(opts){var title,text=F.current.title;if(text){title=$('<div class="fancybox-title fancybox-title-'+opts.type+'-wrap">'+text+'</div>').appendTo('body');if(opts.type==='float'){title.width(title.width());title.wrapInner('<span class="child"></span>');F.current.margin[2]+=Math.abs(parseInt(title.css('margin-bottom'),10))}title.appendTo(opts.type==='over'?F.inner:(opts.type==='outside'?F.wrap:F.outer))}}};$.fn.fancybox=function(options){var opts=options||{},selector=this.selector||'';function run(e){var group=[],relType,relVal,rel=this.rel;if(!(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)){e.preventDefault();relVal=$(this).data('fancybox-group');if(typeof relVal!=='undefined'){relType=relVal?'data-fancybox-group':false}else if(rel&&rel!==''&&rel!=='nofollow'){relVal=rel;relType='rel'}if(relType){group=selector.length?$(selector).filter('['+relType+'="'+relVal+'"]'):$('['+relType+'="'+relVal+'"]')}if(group.length){opts.index=group.index(this);F.open(group.get(),opts)}else{F.open(this,opts)}}}if(selector){D.undelegate(selector,'click.fb-start').delegate(selector,'click.fb-start',run)}else{$(this).unbind('click.fb-start').bind('click.fb-start',run)}return this}}(window,document,jQuery));
/* cycle */
$(document).ready(function(){$('.slideshow').cycle({fx:'scrollDown',sync:0,delay:-2000})});

