(function(c){function b(e){c.fn.cycle.debug&&g(e)}function g(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function a(e,a,b){var d=c(e).data("cycle.opts"),g=!!e.cyclePause;g&&d.paused?d.paused(e,d,a,b):!g&&d.resumed&&d.resumed(e,d,a,b)}function l(e,n,b){function k(e,a,n){if(!e&&a===!0){e=c(n).data("cycle.opts");if(!e)return g("options not found, can not resume"),!1;if(n.cycleTimeout)clearTimeout(n.cycleTimeout),n.cycleTimeout=0;u(e.elements,e,1,!e.backwards)}} if(e.cycleStop==void 0)e.cycleStop=0;if(n===void 0||n===null)n={};if(n.constructor==String)switch(n){case "destroy":case "stop":b=c(e).data("cycle.opts");if(!b)return!1;e.cycleStop++;e.cycleTimeout&&clearTimeout(e.cycleTimeout);e.cycleTimeout=0;b.elements&&c(b.elements).stop();c(e).removeData("cycle.opts");n=="destroy"&&d(b);return!1;case "toggle":return e.cyclePause=e.cyclePause===1?0:1,k(e.cyclePause,b,e),a(e),!1;case "pause":return e.cyclePause=1,a(e),!1;case "resume":return e.cyclePause=0,k(!1, b,e),a(e),!1;case "prev":case "next":b=c(e).data("cycle.opts");if(!b)return g('options not found, "prev/next" ignored'),!1;c.fn.cycle[n](b);return!1;default:n={fx:n}}else if(n.constructor==Number){var l=n,n=c(e).data("cycle.opts");if(!n)return g("options not found, can not advance slide"),!1;if(l<0||l>=n.elements.length)return g("invalid slide index: "+l),!1;n.nextSlide=l;if(e.cycleTimeout)clearTimeout(e.cycleTimeout),e.cycleTimeout=0;if(typeof b=="string")n.oneTimeFx=b;u(n.elements,n,1,l>=n.currSlide); return!1}return n}function k(e,a){if(!c.support.opacity&&a.cleartype&&e.style.filter)try{e.style.removeAttribute("filter")}catch(b){}}function d(e){e.next&&c(e.next).unbind(e.prevNextEvent);e.prev&&c(e.prev).unbind(e.prevNextEvent);if(e.pager||e.pagerAnchorBuilder)c.each(e.pagerAnchors||[],function(){this.unbind().remove()});e.pagerAnchors=null;e.destroy&&e.destroy(e)}function r(e,n,b,d,l){var f=c.extend({},c.fn.cycle.defaults,d||{},c.metadata?e.metadata():c.meta?e.data():{}),v=c.isFunction(e.data)? e.data(f.metaAttr):null;v&&(f=c.extend(f,v));if(f.autostop)f.countdown=f.autostopCount||b.length;var r=e[0];e.data("cycle.opts",f);f.$cont=e;f.stopCount=r.cycleStop;f.elements=b;f.before=f.before?[f.before]:[];f.after=f.after?[f.after]:[];!c.support.opacity&&f.cleartype&&f.after.push(function(){k(this,f)});f.continuous&&f.after.push(function(){u(b,f,0,!f.backwards)});o(f);!c.support.opacity&&f.cleartype&&!f.cleartypeNoBg&&D(n);e.css("position")=="static"&&e.css("position","relative");f.width&&e.width(f.width); f.height&&f.height!="auto"&&e.height(f.height);if(f.startingSlide)f.startingSlide=parseInt(f.startingSlide,10);else if(f.backwards)f.startingSlide=b.length-1;if(f.random){f.randomMap=[];for(v=0;v<b.length;v++)f.randomMap.push(v);f.randomMap.sort(function(){return Math.random()-0.5});f.randomIndex=1;f.startingSlide=f.randomMap[1]}else if(f.startingSlide>=b.length)f.startingSlide=0;f.currSlide=f.startingSlide||0;var x=f.startingSlide;n.css({position:"absolute",top:0,left:0}).hide().each(function(e){e= f.backwards?x?e<=x?b.length+(e-x):x-e:b.length-e:x?e>=x?b.length-(e-x):x-e:b.length-e;c(this).css("z-index",e)});c(b[x]).css("opacity",1).show();k(b[x],f);f.fit&&(f.aspect?n.each(function(){var e=c(this),a=f.aspect===!0?e.width()/e.height():f.aspect;f.width&&e.width()!=f.width&&(e.width(f.width),e.height(f.width/a));f.height&&e.height()<f.height&&(e.height(f.height),e.width(f.height*a))}):(f.width&&n.width(f.width),f.height&&f.height!="auto"&&n.height(f.height)));f.center&&(!f.fit||f.aspect)&&n.each(function(){var e= c(this);e.css({"margin-left":f.width?(f.width-e.width())/2+"px":0,"margin-top":f.height?(f.height-e.height())/2+"px":0})});f.center&&!f.fit&&!f.slideResize&&n.each(function(){var e=c(this);e.css({"margin-left":f.width?(f.width-e.width())/2+"px":0,"margin-top":f.height?(f.height-e.height())/2+"px":0})});if(f.containerResize&&!e.innerHeight()){for(var A=v=0,z=0;z<b.length;z++){var B=c(b[z]),E=B[0],F=B.outerWidth(),G=B.outerHeight();F||(F=E.offsetWidth||E.width||B.attr("width"));G||(G=E.offsetHeight|| E.height||B.attr("height"));v=F>v?F:v;A=G>A?G:A}v>0&&A>0&&e.css({width:v+"px",height:A+"px"})}var I=!1;f.pause&&e.hover(function(){I=!0;this.cyclePause++;a(r,!0)},function(){I&&this.cyclePause--;a(r,!0)});if(q(f)===!1)return!1;var J=!1;d.requeueAttempts=d.requeueAttempts||0;n.each(function(){var e=c(this);this.cycleH=f.fit&&f.height?f.height:e.height()||this.offsetHeight||this.height||e.attr("height")||0;this.cycleW=f.fit&&f.width?f.width:e.width()||this.offsetWidth||this.width||e.attr("width")|| 0;if(e.is("img")){var e=c.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete,a=c.browser.opera&&(this.cycleW==42&&this.cycleH==19||this.cycleW==37&&this.cycleH==17)&&!this.complete,n=this.cycleH==0&&this.cycleW==0&&!this.complete;if(c.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete||e||a||n)if(l.s&&f.requeueOnImageNotLoaded&&++d.requeueAttempts<100)return g(d.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH),setTimeout(function(){c(l.s, l.c).cycle(d)},f.requeueTimeout),J=!0,!1;else g("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}return!0});if(J)return!1;f.cssBefore=f.cssBefore||{};f.cssAfter=f.cssAfter||{};f.cssFirst=f.cssFirst||{};f.animIn=f.animIn||{};f.animOut=f.animOut||{};n.not(":eq("+x+")").css(f.cssBefore);c(n[x]).css(f.cssFirst);if(f.timeout){f.timeout=parseInt(f.timeout,10);if(f.speed.constructor==String)f.speed=c.fx.speeds[f.speed]||parseInt(f.speed,10);f.sync||(f.speed/=2);for(v=f.fx=="none"? 0:f.fx=="shuffle"?500:250;f.timeout-f.speed<v;)f.timeout+=f.speed}if(f.easing)f.easeIn=f.easeOut=f.easing;if(!f.speedIn)f.speedIn=f.speed;if(!f.speedOut)f.speedOut=f.speed;f.slideCount=b.length;f.currSlide=f.lastSlide=x;if(f.random){if(++f.randomIndex==b.length)f.randomIndex=0;f.nextSlide=f.randomMap[f.randomIndex]}else f.nextSlide=f.backwards?f.startingSlide==0?b.length-1:f.startingSlide-1:f.startingSlide>=b.length-1?0:f.startingSlide+1;if(!f.multiFx)if(v=c.fn.cycle.transitions[f.fx],c.isFunction(v))v(e, n,f);else if(f.fx!="custom"&&!f.multiFx)return g("unknown transition: "+f.fx,"; slideshow terminating"),!1;e=n[x];f.skipInitializationCallbacks||(f.before.length&&f.before[0].apply(e,[e,e,f,!0]),f.after.length&&f.after[0].apply(e,[e,e,f,!0]));f.next&&c(f.next).bind(f.prevNextEvent,function(){return H(f,1)});f.prev&&c(f.prev).bind(f.prevNextEvent,function(){return H(f,0)});(f.pager||f.pagerAnchorBuilder)&&N(b,f);t(f,b);return f}function o(e){e.original={before:[],after:[]};e.original.cssBefore=c.extend({}, e.cssBefore);e.original.cssAfter=c.extend({},e.cssAfter);e.original.animIn=c.extend({},e.animIn);e.original.animOut=c.extend({},e.animOut);c.each(e.before,function(){e.original.before.push(this)});c.each(e.after,function(){e.original.after.push(this)})}function q(e){var a,d,k=c.fn.cycle.transitions;if(e.fx.indexOf(",")>0){e.multiFx=!0;e.fxs=e.fx.replace(/\s*/g,"").split(",");for(a=0;a<e.fxs.length;a++){var l=e.fxs[a];d=k[l];if(!d||!k.hasOwnProperty(l)||!c.isFunction(d))g("discarding unknown transition: ", l),e.fxs.splice(a,1),a--}if(!e.fxs.length)return g("No valid transitions named; slideshow terminating."),!1}else if(e.fx=="all")for(p in e.multiFx=!0,e.fxs=[],k)d=k[p],k.hasOwnProperty(p)&&c.isFunction(d)&&e.fxs.push(p);if(e.multiFx&&e.randomizeEffects){d=Math.floor(Math.random()*20)+30;for(a=0;a<d;a++)k=Math.floor(Math.random()*e.fxs.length),e.fxs.push(e.fxs.splice(k,1)[0]);b("randomized fx sequence: ",e.fxs)}return!0}function t(e,a){e.addSlide=function(b,d){var k=c(b),f=k[0];e.autostopCount||e.countdown++; a[d?"unshift":"push"](f);if(e.els)e.els[d?"unshift":"push"](f);e.slideCount=a.length;k.css("position","absolute");k[d?"prependTo":"appendTo"](e.$cont);d&&(e.currSlide++,e.nextSlide++);!c.support.opacity&&e.cleartype&&!e.cleartypeNoBg&&D(k);e.fit&&e.width&&k.width(e.width);e.fit&&e.height&&e.height!="auto"&&k.height(e.height);f.cycleH=e.fit&&e.height?e.height:k.height();f.cycleW=e.fit&&e.width?e.width:k.width();k.css(e.cssBefore);(e.pager||e.pagerAnchorBuilder)&&c.fn.cycle.createPagerAnchor(a.length- 1,f,c(e.pager),a,e);if(c.isFunction(e.onAddSlide))e.onAddSlide(k);else k.hide()}}function u(e,a,d,k){if(d&&a.busy&&a.manualTrump)b("manualTrump in go(), stopping active transition"),c(e).stop(!0,!0),a.busy=0;if(a.busy)b("transition active, ignoring new tx request");else{var l=a.$cont[0],f=e[a.currSlide],g=e[a.nextSlide];if(!(l.cycleStop!=a.stopCount||l.cycleTimeout===0&&!d))if(!d&&!l.cyclePause&&!a.bounce&&(a.autostop&&--a.countdown<=0||a.nowrap&&!a.random&&a.nextSlide<a.currSlide))a.end&&a.end(a); else{var r=!1;if((d||!l.cyclePause)&&a.nextSlide!=a.currSlide){var r=!0,o=a.fx;f.cycleH=f.cycleH||c(f).height();f.cycleW=f.cycleW||c(f).width();g.cycleH=g.cycleH||c(g).height();g.cycleW=g.cycleW||c(g).width();if(a.multiFx){if(k&&(a.lastFx==void 0||++a.lastFx>=a.fxs.length))a.lastFx=0;else if(!k&&(a.lastFx==void 0||--a.lastFx<0))a.lastFx=a.fxs.length-1;o=a.fxs[a.lastFx]}if(a.oneTimeFx)o=a.oneTimeFx,a.oneTimeFx=null;c.fn.cycle.resetState(a,o);a.before.length&&c.each(a.before,function(e,c){l.cycleStop== a.stopCount&&c.apply(g,[f,g,a,k])});var q=function(){a.busy=0;c.each(a.after,function(e,c){l.cycleStop==a.stopCount&&c.apply(g,[f,g,a,k])})};b("tx firing("+o+"); currSlide: "+a.currSlide+"; nextSlide: "+a.nextSlide);a.busy=1;if(a.fxFn)a.fxFn(f,g,a,q,k,d&&a.fastOnEvent);else if(c.isFunction(c.fn.cycle[a.fx]))c.fn.cycle[a.fx](f,g,a,q,k,d&&a.fastOnEvent);else c.fn.cycle.custom(f,g,a,q,k,d&&a.fastOnEvent)}if(r||a.nextSlide==a.currSlide)if(a.lastSlide=a.currSlide,a.random){a.currSlide=a.nextSlide;if(++a.randomIndex== e.length)a.randomIndex=0;a.nextSlide=a.randomMap[a.randomIndex];if(a.nextSlide==a.currSlide)a.nextSlide=a.currSlide==a.slideCount-1?0:a.currSlide+1}else a.backwards?(d=a.nextSlide-1<0)&&a.bounce?(a.backwards=!a.backwards,a.nextSlide=1,a.currSlide=0):(a.nextSlide=d?e.length-1:a.nextSlide-1,a.currSlide=d?0:a.nextSlide+1):(d=a.nextSlide+1==e.length)&&a.bounce?(a.backwards=!a.backwards,a.nextSlide=e.length-2,a.currSlide=e.length-1):(a.nextSlide=d?0:a.nextSlide+1,a.currSlide=d?e.length-1:a.nextSlide-1); r&&a.pager&&a.updateActivePagerLink(a.pager,a.currSlide,a.activePagerClass);r=0;a.timeout&&!a.continuous?r=z(e[a.currSlide],e[a.nextSlide],a,k):a.continuous&&l.cyclePause&&(r=10);if(r>0)l.cycleTimeout=setTimeout(function(){u(e,a,0,!a.backwards)},r)}}}function z(a,c,d,k){if(d.timeoutFn){for(a=d.timeoutFn.call(a,a,c,d,k);d.fx!="none"&&a-d.speed<250;)a+=d.speed;b("calculated timeout: "+a+"; speed: "+d.speed);if(a!==!1)return a}return d.timeout}function H(a,b){var d=b?1:-1,k=a.elements,g=a.$cont[0],f= g.cycleTimeout;if(f)clearTimeout(f),g.cycleTimeout=0;if(a.random&&d<0){a.randomIndex--;if(--a.randomIndex==-2)a.randomIndex=k.length-2;else if(a.randomIndex==-1)a.randomIndex=k.length-1;a.nextSlide=a.randomMap[a.randomIndex]}else if(a.random)a.nextSlide=a.randomMap[a.randomIndex];else if(a.nextSlide=a.currSlide+d,a.nextSlide<0){if(a.nowrap)return!1;a.nextSlide=k.length-1}else if(a.nextSlide>=k.length){if(a.nowrap)return!1;a.nextSlide=0}g=a.onPrevNextEvent||a.prevNextClick;c.isFunction(g)&&g(d>0,a.nextSlide, k[a.nextSlide]);u(k,a,1,b);return!1}function N(a,b){var d=c(b.pager);c.each(a,function(k,g){c.fn.cycle.createPagerAnchor(k,g,d,a,b)});b.updateActivePagerLink(b.pager,b.startingSlide,b.activePagerClass)}function D(a){function d(a){a=parseInt(a,10).toString(16);return a.length<2?"0"+a:a}function k(a){for(;a&&a.nodeName.toLowerCase()!="html";a=a.parentNode){var e=c.css(a,"background-color");if(e&&e.indexOf("rgb")>=0)return a=e.match(/\d+/g),"#"+d(a[0])+d(a[1])+d(a[2]);if(e&&e!="transparent")return e}return"#ffffff"} b("applying clearType background-color hack");a.each(function(){c(this).css("background-color",k(this))})}if(c.support==void 0)c.support={opacity:!c.browser.msie};c.expr[":"].paused=function(a){return a.cyclePause};c.fn.cycle=function(a,d){var k={s:this.selector,c:this.context};if(this.length===0&&a!="stop"){if(!c.isReady&&k.s)return g("DOM not ready, queuing slideshow"),c(function(){c(k.s,k.c).cycle(a,d)}),this;g("terminating; zero elements found by selector"+(c.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var o= l(this,a,d);if(o!==!1){o.updateActivePagerLink=o.updateActivePagerLink||c.fn.cycle.updateActivePagerLink;this.cycleTimeout&&clearTimeout(this.cycleTimeout);this.cycleTimeout=this.cyclePause=0;var y=c(this),f=o.slideExpr?c(o.slideExpr,this):y.children(),q=f.get(),t=r(y,f,q,o,k);if(t!==!1)if(q.length<2)g("terminating; too few slides: "+q.length);else if(y=t.continuous?10:z(q[t.currSlide],q[t.nextSlide],t,!t.backwards))y+=t.delay||0,y<10&&(y=10),b("first timeout: "+y),this.cycleTimeout=setTimeout(function(){u(q, t,0,!o.backwards)},y)}})};c.fn.cycle.resetState=function(a,b){b=b||a.fx;a.before=[];a.after=[];a.cssBefore=c.extend({},a.original.cssBefore);a.cssAfter=c.extend({},a.original.cssAfter);a.animIn=c.extend({},a.original.animIn);a.animOut=c.extend({},a.original.animOut);a.fxFn=null;c.each(a.original.before,function(){a.before.push(this)});c.each(a.original.after,function(){a.after.push(this)});var d=c.fn.cycle.transitions[b];c.isFunction(d)&&d(a.$cont,c(a.elements),a)};c.fn.cycle.updateActivePagerLink= function(a,b,d){c(a).each(function(){c(this).children().removeClass(d).eq(b).addClass(d)})};c.fn.cycle.next=function(a){H(a,1)};c.fn.cycle.prev=function(a){H(a,0)};c.fn.cycle.createPagerAnchor=function(e,d,k,g,l){c.isFunction(l.pagerAnchorBuilder)?(d=l.pagerAnchorBuilder(e,d),b("pagerAnchorBuilder("+e+", el) returned: "+d)):d='<a href="#">'+(e+1)+"</a>";if(d){var f=c(d);if(f.parents("body").length===0){var o=[];k.length>1?(k.each(function(){var a=f.clone(!0);c(this).append(a);o.push(a[0])}),f=c(o)): f.appendTo(k)}l.pagerAnchors=l.pagerAnchors||[];l.pagerAnchors.push(f);k=function(a){a.preventDefault();l.nextSlide=e;var a=l.$cont[0],b=a.cycleTimeout;if(b)clearTimeout(b),a.cycleTimeout=0;a=l.onPagerEvent||l.pagerClick;c.isFunction(a)&&a(l.nextSlide,g[l.nextSlide]);u(g,l,1,l.currSlide<e)};/mouseenter|mouseover/i.test(l.pagerEvent)?f.hover(k,function(){}):f.bind(l.pagerEvent,k);!/^click/.test(l.pagerEvent)&&!l.allowPagerClickBubble&&f.bind("click.cycle",function(){return!1});var r=l.$cont[0],q=!1; l.pauseOnPagerHover&&f.hover(function(){q=!0;r.cyclePause++;a(r,!0,!0)},function(){q&&r.cyclePause--;a(r,!0,!0)})}};c.fn.cycle.hopsFromLast=function(a,c){var b=a.lastSlide,d=a.currSlide;return c?d>b?d-b:a.slideCount-b:d<b?b-d:b+a.slideCount-d};c.fn.cycle.commonReset=function(a,b,d,k,l,f){c(d.elements).not(a).hide();if(typeof d.cssBefore.opacity=="undefined")d.cssBefore.opacity=1;d.cssBefore.display="block";if(d.slideResize&&k!==!1&&b.cycleW>0)d.cssBefore.width=b.cycleW;if(d.slideResize&&l!==!1&&b.cycleH> 0)d.cssBefore.height=b.cycleH;d.cssAfter=d.cssAfter||{};d.cssAfter.display="none";c(a).css("zIndex",d.slideCount+(f===!0?1:0));c(b).css("zIndex",d.slideCount+(f===!0?0:1))};c.fn.cycle.custom=function(a,b,d,k,l,f){var g=c(a),r=c(b),o=d.speedIn,a=d.speedOut,q=d.easeIn,b=d.easeOut;r.css(d.cssBefore);f&&(o=typeof f=="number"?a=f:a=1,q=b=null);var u=function(){r.animate(d.animIn,o,q,function(){k()})};g.animate(d.animOut,a,b,function(){g.css(d.cssAfter);d.sync||u()});d.sync&&u()};c.fn.cycle.transitions= {fade:function(a,b,d){b.not(":eq("+d.currSlide+")").css("opacity",0);d.before.push(function(a,b,d){c.fn.cycle.commonReset(a,b,d);d.cssBefore.opacity=0});d.animIn={opacity:1};d.animOut={opacity:0};d.cssBefore={top:0,left:0}}};c.fn.cycle.ver=function(){return"2.9995"};c.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:!1,animIn:null,animOut:null,aspect:!1,autostop:0,autostopCount:0,backwards:!1,before:null,center:null,cleartype:!c.support.opacity,cleartypeNoBg:!1,containerResize:1, continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:!0,metaAttr:"cycle",next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:"click.cycle",pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:"click.cycle",random:0,randomizeEffects:1,requeueOnImageNotLoaded:!0,requeueTimeout:250,rev:0,shuffle:null,skipInitializationCallbacks:!1,slideExpr:null, slideResize:1,speed:1E3,speedIn:null,speedOut:null,startingSlide:0,sync:1,timeout:4E3,timeoutFn:null,updateActivePagerLink:null,width:null}})(jQuery); (function(c){c.fn.cycle.transitions.none=function(b,g,a){a.fxFn=function(a,b,d,g){c(b).show();c(a).hide();g()}};c.fn.cycle.transitions.fadeout=function(b,g,a){g.not(":eq("+a.currSlide+")").css({display:"block",opacity:1});a.before.push(function(a,b,d,g,o,q){c(a).css("zIndex",d.slideCount+(!q===!0?1:0));c(b).css("zIndex",d.slideCount+(!q===!0?0:1))});a.animIn.opacity=1;a.animOut.opacity=0;a.cssBefore.opacity=1;a.cssBefore.display="block";a.cssAfter.zIndex=0};c.fn.cycle.transitions.scrollUp=function(b, g,a){b.css("overflow","hidden");a.before.push(c.fn.cycle.commonReset);b=b.height();a.cssBefore.top=b;a.cssBefore.left=0;a.cssFirst.top=0;a.animIn.top=0;a.animOut.top=-b};c.fn.cycle.transitions.scrollDown=function(b,g,a){b.css("overflow","hidden");a.before.push(c.fn.cycle.commonReset);b=b.height();a.cssFirst.top=0;a.cssBefore.top=-b;a.cssBefore.left=0;a.animIn.top=0;a.animOut.top=b};c.fn.cycle.transitions.scrollLeft=function(b,g,a){b.css("overflow","hidden");a.before.push(c.fn.cycle.commonReset);b= b.width();a.cssFirst.left=0;a.cssBefore.left=b;a.cssBefore.top=0;a.animIn.left=0;a.animOut.left=0-b};c.fn.cycle.transitions.scrollRight=function(b,g,a){b.css("overflow","hidden");a.before.push(c.fn.cycle.commonReset);b=b.width();a.cssFirst.left=0;a.cssBefore.left=-b;a.cssBefore.top=0;a.animIn.left=0;a.animOut.left=b};c.fn.cycle.transitions.scrollHorz=function(b,g,a){b.css("overflow","hidden").width();a.before.push(function(a,b,d,g){d.rev&&(g=!g);c.fn.cycle.commonReset(a,b,d);d.cssBefore.left=g?b.cycleW- 1:1-b.cycleW;d.animOut.left=g?-a.cycleW:a.cycleW});a.cssFirst.left=0;a.cssBefore.top=0;a.animIn.left=0;a.animOut.top=0};c.fn.cycle.transitions.scrollVert=function(b,g,a){b.css("overflow","hidden");a.before.push(function(a,b,d,g){d.rev&&(g=!g);c.fn.cycle.commonReset(a,b,d);d.cssBefore.top=g?1-b.cycleH:b.cycleH-1;d.animOut.top=g?a.cycleH:-a.cycleH});a.cssFirst.top=0;a.cssBefore.left=0;a.animIn.top=0;a.animOut.left=0};c.fn.cycle.transitions.slideX=function(b,g,a){a.before.push(function(a,b,d){c(d.elements).not(a).hide(); c.fn.cycle.commonReset(a,b,d,!1,!0);d.animIn.width=b.cycleW});a.cssBefore.left=0;a.cssBefore.top=0;a.cssBefore.width=0;a.animIn.width="show";a.animOut.width=0};c.fn.cycle.transitions.slideY=function(b,g,a){a.before.push(function(a,b,d){c(d.elements).not(a).hide();c.fn.cycle.commonReset(a,b,d,!0,!1);d.animIn.height=b.cycleH});a.cssBefore.left=0;a.cssBefore.top=0;a.cssBefore.height=0;a.animIn.height="show";a.animOut.height=0};c.fn.cycle.transitions.shuffle=function(b,g,a){b=b.css("overflow","visible").width(); g.css({left:0,top:0});a.before.push(function(a,b,d){c.fn.cycle.commonReset(a,b,d,!0,!0,!0)});if(!a.speedAdjusted)a.speed/=2,a.speedAdjusted=!0;a.random=0;a.shuffle=a.shuffle||{left:-b,top:15};a.els=[];for(b=0;b<g.length;b++)a.els.push(g[b]);for(b=0;b<a.currSlide;b++)a.els.push(a.els.shift());a.fxFn=function(a,b,d,g,o){d.rev&&(o=!o);var q=o?c(a):c(b);c(b).css(d.cssBefore);var t=d.slideCount;q.animate(d.shuffle,d.speedIn,d.easeIn,function(){for(var b=c.fn.cycle.hopsFromLast(d,o),k=0;k<b;k++)o?d.els.push(d.els.shift()): d.els.unshift(d.els.pop());if(o){b=0;for(k=d.els.length;b<k;b++)c(d.els[b]).css("z-index",k-b+t)}else b=c(a).css("z-index"),q.css("z-index",parseInt(b,10)+1+t);q.animate({left:0,top:0},d.speedOut,d.easeOut,function(){c(o?this:a).hide();g&&g()})})};c.extend(a.cssBefore,{display:"block",opacity:1,top:0,left:0})};c.fn.cycle.transitions.turnUp=function(b,g,a){a.before.push(function(a,b,d){c.fn.cycle.commonReset(a,b,d,!0,!1);d.cssBefore.top=b.cycleH;d.animIn.height=b.cycleH;d.animOut.width=b.cycleW}); a.cssFirst.top=0;a.cssBefore.left=0;a.cssBefore.height=0;a.animIn.top=0;a.animOut.height=0};c.fn.cycle.transitions.turnDown=function(b,g,a){a.before.push(function(a,b,d){c.fn.cycle.commonReset(a,b,d,!0,!1);d.animIn.height=b.cycleH;d.animOut.top=a.cycleH});a.cssFirst.top=0;a.cssBefore.left=0;a.cssBefore.top=0;a.cssBefore.height=0;a.animOut.height=0};c.fn.cycle.transitions.turnLeft=function(b,g,a){a.before.push(function(a,b,d){c.fn.cycle.commonReset(a,b,d,!1,!0);d.cssBefore.left=b.cycleW;d.animIn.width= b.cycleW});a.cssBefore.top=0;a.cssBefore.width=0;a.animIn.left=0;a.animOut.width=0};c.fn.cycle.transitions.turnRight=function(b,g,a){a.before.push(function(a,b,d){c.fn.cycle.commonReset(a,b,d,!1,!0);d.animIn.width=b.cycleW;d.animOut.left=a.cycleW});c.extend(a.cssBefore,{top:0,left:0,width:0});a.animIn.left=0;a.animOut.width=0};c.fn.cycle.transitions.zoom=function(b,g,a){a.before.push(function(a,b,d){c.fn.cycle.commonReset(a,b,d,!1,!1,!0);d.cssBefore.top=b.cycleH/2;d.cssBefore.left=b.cycleW/2;c.extend(d.animIn, {top:0,left:0,width:b.cycleW,height:b.cycleH});c.extend(d.animOut,{width:0,height:0,top:a.cycleH/2,left:a.cycleW/2})});a.cssFirst.top=0;a.cssFirst.left=0;a.cssBefore.width=0;a.cssBefore.height=0};c.fn.cycle.transitions.fadeZoom=function(b,g,a){a.before.push(function(a,b,d){c.fn.cycle.commonReset(a,b,d,!1,!1);d.cssBefore.left=b.cycleW/2;d.cssBefore.top=b.cycleH/2;c.extend(d.animIn,{top:0,left:0,width:b.cycleW,height:b.cycleH})});a.cssBefore.width=0;a.cssBefore.height=0;a.animOut.opacity=0};c.fn.cycle.transitions.blindX= function(b,g,a){b=b.css("overflow","hidden").width();a.before.push(function(a,b,d){c.fn.cycle.commonReset(a,b,d);d.animIn.width=b.cycleW;d.animOut.left=a.cycleW});a.cssBefore.left=b;a.cssBefore.top=0;a.animIn.left=0;a.animOut.left=b};c.fn.cycle.transitions.blindY=function(b,g,a){b=b.css("overflow","hidden").height();a.before.push(function(a,b,d){c.fn.cycle.commonReset(a,b,d);d.animIn.height=b.cycleH;d.animOut.top=a.cycleH});a.cssBefore.top=b;a.cssBefore.left=0;a.animIn.top=0;a.animOut.top=b};c.fn.cycle.transitions.blindZ= function(b,g,a){g=b.css("overflow","hidden").height();b=b.width();a.before.push(function(a,b,d){c.fn.cycle.commonReset(a,b,d);d.animIn.height=b.cycleH;d.animOut.top=a.cycleH});a.cssBefore.top=g;a.cssBefore.left=b;a.animIn.top=0;a.animIn.left=0;a.animOut.top=g;a.animOut.left=b};c.fn.cycle.transitions.growX=function(b,g,a){a.before.push(function(a,b,d){c.fn.cycle.commonReset(a,b,d,!1,!0);d.cssBefore.left=this.cycleW/2;d.animIn.left=0;d.animIn.width=this.cycleW;d.animOut.left=0});a.cssBefore.top=0;a.cssBefore.width= 0};c.fn.cycle.transitions.growY=function(b,g,a){a.before.push(function(a,b,d){c.fn.cycle.commonReset(a,b,d,!0,!1);d.cssBefore.top=this.cycleH/2;d.animIn.top=0;d.animIn.height=this.cycleH;d.animOut.top=0});a.cssBefore.height=0;a.cssBefore.left=0};c.fn.cycle.transitions.curtainX=function(b,g,a){a.before.push(function(a,b,d){c.fn.cycle.commonReset(a,b,d,!1,!0,!0);d.cssBefore.left=b.cycleW/2;d.animIn.left=0;d.animIn.width=this.cycleW;d.animOut.left=a.cycleW/2;d.animOut.width=0});a.cssBefore.top=0;a.cssBefore.width= 0};c.fn.cycle.transitions.curtainY=function(b,g,a){a.before.push(function(a,b,d){c.fn.cycle.commonReset(a,b,d,!0,!1,!0);d.cssBefore.top=b.cycleH/2;d.animIn.top=0;d.animIn.height=b.cycleH;d.animOut.top=a.cycleH/2;d.animOut.height=0});a.cssBefore.height=0;a.cssBefore.left=0};c.fn.cycle.transitions.cover=function(b,g,a){var l=a.direction||"left",k=b.css("overflow","hidden").width(),d=b.height();a.before.push(function(a,b,g){c.fn.cycle.commonReset(a,b,g);l=="right"?g.cssBefore.left=-k:l=="up"?g.cssBefore.top= d:l=="down"?g.cssBefore.top=-d:g.cssBefore.left=k});a.animIn.left=0;a.animIn.top=0;a.cssBefore.top=0;a.cssBefore.left=0};c.fn.cycle.transitions.uncover=function(b,g,a){var l=a.direction||"left",k=b.css("overflow","hidden").width(),d=b.height();a.before.push(function(a,b,g){c.fn.cycle.commonReset(a,b,g,!0,!0,!0);l=="right"?g.animOut.left=k:l=="up"?g.animOut.top=-d:l=="down"?g.animOut.top=d:g.animOut.left=-k});a.animIn.left=0;a.animIn.top=0;a.cssBefore.top=0;a.cssBefore.left=0};c.fn.cycle.transitions.toss= function(b,g,a){var l=b.css("overflow","visible").width(),k=b.height();a.before.push(function(a,b,g){c.fn.cycle.commonReset(a,b,g,!0,!0,!0);!g.animOut.left&&!g.animOut.top?c.extend(g.animOut,{left:l*2,top:-k/2,opacity:0}):g.animOut.opacity=0});a.cssBefore.left=0;a.cssBefore.top=0;a.animIn.left=0};c.fn.cycle.transitions.wipe=function(b,g,a){var l=b.css("overflow","hidden").width(),k=b.height();a.cssBefore=a.cssBefore||{};var d;a.clip&&(/l2r/.test(a.clip)?d="rect(0px 0px "+k+"px 0px)":/r2l/.test(a.clip)? d="rect(0px "+l+"px "+k+"px "+l+"px)":/t2b/.test(a.clip)?d="rect(0px "+l+"px 0px 0px)":/b2t/.test(a.clip)?d="rect("+k+"px "+l+"px "+k+"px 0px)":/zoom/.test(a.clip)&&(b=parseInt(k/2,10),g=parseInt(l/2,10),d="rect("+b+"px "+g+"px "+b+"px "+g+"px)"));a.cssBefore.clip=a.cssBefore.clip||d||"rect(0px 0px 0px 0px)";var b=a.cssBefore.clip.match(/(\d+)/g),r=parseInt(b[0],10),o=parseInt(b[1],10),q=parseInt(b[2],10),t=parseInt(b[3],10);a.before.push(function(a,b,d){if(a!=b){var g=c(a),D=c(b);c.fn.cycle.commonReset(a, b,d,!0,!0,!1);d.cssAfter.display="block";var e=1,n=parseInt(d.speedIn/13,10)-1;(function K(){var a=r?r-parseInt(e*(r/n),10):0,b=t?t-parseInt(e*(t/n),10):0,c=q<k?q+parseInt(e*((k-q)/n||1),10):k,d=o<l?o+parseInt(e*((l-o)/n||1),10):l;D.css({clip:"rect("+a+"px "+d+"px "+c+"px "+b+"px)"});e++<=n?setTimeout(K,13):g.css("display","none")})()}});c.extend(a.cssBefore,{display:"block",opacity:1,top:0,left:0});a.animIn={left:0};a.animOut={left:0}}})(jQuery); function printpage(c){child=window.open(c,"Smart Space Window","width=580,height=890,resizable=yes,scrollbars=yes,status=0")} function NewWindow(c,b,g,a,l,k,d,r){varws=window.screen?1:0;m=Math;C="center";R="random";M="custom";sw=screen.availWidth;sh=screen.availHeight;T=k==C&&ws?(sh-a)/2:k==R&&ws?m.floor(m.random()*(sh-a)):k==M?r:20;L=k==C&&ws?(sw-g)/2:k==R&&ws?m.floor(m.random()*(sw-g)):k==M?d:20;s="width="+g+",height="+a+",top="+T+",left="+L;s+=!l||l==""?"":","+l;win=window.open(c,b,s);win.focus&&win.focus()} function ppopen(c,b,g,a){g+=32;a+=96;sw=screen.width;c=window.open(c,b,"width="+g+", height="+a+", screenX=20,screenY=600,top=20,left=50, menubar=yes, status=no, toolbar=no, scrollbars=yes, resizable=yes");c.resizeTo(g,a);c.focus();if(!c.opener)c.opener=self} function rosterpop(c,b){if(b=="welcome"){var g="https://www.smartspace.ws/welcome.php?"+c;w=400;h=160;sw=screen.width;sh=screen.height;sx=sw-420;sy=sh-130}else g="https://www.smartspace.ws/sroster.php"+c,w=400,h=350,sw=screen.width,sh=screen.height,sx=sw/2-200,sy=sh/2;g=window.open(g,b,"width="+w+", height="+h+", screenX=20,screenY=600,top="+sy+",left="+sx+", menubar=no, status=no, toolbar=no, scrollbars=no, resizable=yes");g.resizeTo(w,h);g.focus();if(!g.opener)g.opener=self} function sswopen(c,b,g,a){g+=32;a+=96;sw=screen.width;psw=sw-440;c=window.open(c,b,"width="+g+", height="+a+", screenX=20,screenY=600,top=20,left="+psw+", menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes");c.resizeTo(g,a);c.focus();if(!c.opener)c.opener=self}function supressError(){return!0}function load(c){window.onerror=supressError;opener.location.href=c;setTimeout("self.close()",1E3)} function reload(c){self.location="spaces.php?ProgInstanceId="+c.ProgInstanceId.options[c.ProgInstanceId.options.selectedIndex].value}function checkabox(c){return document.msvals.agree.checked==!1?(alert(c),!1):!0}function checkbbox(c,b){return c?c.checked==!1?(alert(b),!1):(self.close(),!0):(self.close(),!0)} function chkflds(c){var b=c.required.value.split(","),g=c.names.value.split(","),a=0,l=0,k=0,d=0,r=0,o,q=b.length,c="Sorry, there is stuff missing:";for(o=0;o<q;o++){var t=document.getElementById(b[o]),u=t.type;u=="text"&&t.value==""&&(a+=1,c+='\n\n - The "'+g[o]+'" text field was left blank.');u=="password"&&t.value==""&&(r+=1,c+='\n\n - The "'+g[o]+'" password field was left blank.');if(u=="select-one"&&(!t.selectedIndex||t.selectedIndex==0))d+=1,c+='\n\n -The "'+g[o]+'" select list was left unselected.'; u=="textarea"&&t.value==""&&(l+=1,c+='\n\n - There was nothing written in "'+g[o]+'" text area.');u=="checkbox"&&!t.checked&&(k+=1,c+='\n\n - The "'+g[o]+'" check box was left unticked.')}b=a+l+k+d+r;return b>0?(c+="\n\nYou must complete "+(b>1?"these fields":"this field")+" if you wish to continue.",alert(c),!1):!0}function reindivid(c,b){self.location=b+"?TraderCustId="+c.TraderCustId.options[c.TraderCustId.options.selectedIndex].value} var popUpCal={selectedMonth:(new Date).getMonth(),selectedYear:(new Date).getFullYear(),selectedDay:(new Date).getDate(),calendarId:"calendarDiv",inputClass:"calendarSelectDate",init:function(){for(var c=getElementsByClass(popUpCal.inputClass,document,"input"),b=document.getElementById(popUpCal.calendarId),g=0;g<c.length;g++)c[g].onfocus=function(){popUpCal.selectedMonth=(new Date).getMonth();setPos(this,b);b.style.display="block";popUpCal.drawCalendar(this);popUpCal.setupLinks(this)}},drawCalendar:function(c){var b= "",b='<a id="closeCalender">Close Calendar</a>';b+='<table cellpadding="0" cellspacing="0" id="linksTable"><tr>';b+='\t<td><a id="prevMonth"><< Prev</a></td>';b+='\t<td><a id="nextMonth">Next >></a></td>';b+="</tr></table>";b+='<table id="calendar" cellpadding="0" cellspacing="0"><tr>';b+='<th colspan="7" class="calendarHeader">'+getMonthName(popUpCal.selectedMonth)+" "+popUpCal.selectedYear+"</th>";b+='</tr><tr class="weekDaysTitleRow">';for(var g="S,M,T,W,T,F,S".split(","),a=0;a<g.length;a++)b+= "<td>"+g[a]+"</td>";var g=getDaysInMonth(popUpCal.selectedYear,popUpCal.selectedMonth),l=getFirstDayofMonth(popUpCal.selectedYear,popUpCal.selectedMonth),a=0,k=1;l!=7&&(a=Math.ceil((l+1+g)/7));for(var l=l!=7?l+1:0,d=(new Date).getDate(),r=(new Date).getMonth(),o=(new Date).getFullYear(),q=0;q<a;q++){b+='<tr class="weekDaysRow">';for(var t=0;t<7;t++)b+=k==d&&popUpCal.selectedYear==o&&popUpCal.selectedMonth==r&&l==0?'<td id="today" class="weekDaysCell">':'<td class="weekDaysCell">',l==0&&(k<=g&&(b+= "<a>"+k+"</a>"),k++),b+="</td>",l>0&&l--;b+="</tr>"}b+="</table>";var u=document.getElementById(popUpCal.calendarId);u.innerHTML=b;document.getElementById("closeCalender").onclick=function(){u.style.display="none"};getElementsByClass(popUpCal.inputClass,document,"input").onlostfocus=function(){u.style.display="none"};document.getElementById("prevMonth").onclick=function(){popUpCal.selectedMonth--;if(popUpCal.selectedMonth<0)popUpCal.selectedMonth=11,popUpCal.selectedYear--;popUpCal.drawCalendar(c); popUpCal.setupLinks(c)};document.getElementById("nextMonth").onclick=function(){popUpCal.selectedMonth++;if(popUpCal.selectedMonth>11)popUpCal.selectedMonth=0,popUpCal.selectedYear++;popUpCal.drawCalendar(c);popUpCal.setupLinks(c)}},setupLinks:function(c){for(var b=document.getElementById("calendar").getElementsByTagName("a"),g=0;g<b.length;g++)b[g].onmouseover=function(){this.parentNode.className="weekDaysCellOver"},b[g].onmouseout=function(){this.parentNode.className="weekDaysCell"},b[g].onclick= function(){document.getElementById(popUpCal.calendarId).style.display="none";popUpCal.selectedDay=this.innerHTML;c.value=formatDate(popUpCal.selectedDay,popUpCal.selectedMonth,popUpCal.selectedYear)}}}; if(typeof window.addEventListener!="undefined")window.addEventListener("load",popUpCal.init,!1);else if(typeof window.attachEvent!="undefined")window.attachEvent("onload",popUpCal.init);else if(window.onload!=null){var oldOnload=window.onload;window.onload=function(c){oldOnload(c);popUpCal.init()}}else window.onload=popUpCal.init;function formatDate(c,b,g){b++;b<10&&(b="0"+b);c<10&&(c="0"+c);return c+"/"+b+"/"+g} function getMonthName(c){return"January,February,March,April,May,June,July,August,September,October,November,December".split(",")[c]}function getDayName(c){return"Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday".split(",")[c]}function getDaysInMonth(c,b){return 32-(new Date(c,b,32)).getDate()}function getFirstDayofMonth(c,b){return(new Date(c,b,0)).getDay()} function getElementsByClass(c,b,g){var a=[];b==null&&(b=document);g==null&&(g="*");b=b.getElementsByTagName(g);g=b.length;c=RegExp("(^|\\s)"+c+"(\\s|$)");for(i=0,j=0;i<g;i++)c.test(b[i].className)&&(a[j]=b[i],j++);return a}function setPos(c,b){var g=findPos(c);b.style.position="absolute";b.style.top=g[1]+20+"px";b.style.left=g[0]+10+"px"} function findPos(c){var b=curtop=0;if(c.offsetParent){b=c.offsetLeft;for(curtop=c.offsetTop;c=c.offsetParent;)b+=c.offsetLeft,curtop+=c.offsetTop}return[b,curtop]};

