(function(g){var e=[];g.tools=g.tools||{};g.tools.tooltip={version:"1.1.3",conf:{effect:"toggle",fadeOutSpeed:"fast",tip:null,predelay:0,delay:30,opacity:1,lazy:undefined,position:["top","center"],offset:[0,0],cancelDefault:true,relative:false,oneInstance:true,events:{def:"mouseover,mouseout",input:"focus,blur",widget:"focus mouseover,blur mouseout",tooltip:"mouseover,mouseout"},api:false},addEffect:function(b,a,c){f[b]=[a,c]}};var f={toggle:[function(c){var d=this.getConf(),a=this.getTip(),b=d.opacity;if(b<1){a.css({opacity:b})}a.show();c.call()},function(a){this.getTip().hide();a.call()}],fade:[function(a){this.getTip().fadeIn(this.getConf().fadeInSpeed,a)},function(a){this.getTip().fadeOut(this.getConf().fadeOutSpeed,a)}]};function h(w,x){var b=this,d=g(this);w.data("tooltip",b);var u=w.next();if(x.tip){u=g(x.tip);if(u.length>1){u=w.nextAll(x.tip).eq(0);if(!u.length){u=w.parent().nextAll(x.tip).eq(0)}}}function t(n){var m=x.relative?w.position().top:w.offset().top,j=x.relative?w.position().left:w.offset().left,l=x.position[0];m-=u.outerHeight()-x.offset[0];j+=w.outerWidth()+x.offset[1];var k=u.outerHeight()+w.outerHeight();if(l=="center"){m+=k/2}if(l=="bottom"){m+=k}l=x.position[1];var i=u.outerWidth()+w.outerWidth();if(l=="center"){j-=i/2}if(l=="left"){j-=i}return{top:m,left:j}}var r=w.is(":input"),a=r&&w.is(":checkbox, :radio, select, :button"),q=w.attr("type"),s=x.events[q]||x.events[r?(a?"widget":"input"):"def"];s=s.split(/,\s*/);if(s.length!=2){throw"Tooltip: bad events configuration for "+q}w.bind(s[0],function(i){if(x.oneInstance){g.each(e,function(){this.hide()})}var j=u.data("trigger");if(j&&j[0]!=this){u.hide().stop(true,true)}i.target=this;b.show(i);s=x.events.tooltip.split(/,\s*/);u.bind(s[0],function(){b.show(i)});if(s[1]){u.bind(s[1],function(){b.hide(i)})}});w.bind(s[1],function(i){b.hide(i)});if(!g.browser.msie&&!r&&!x.predelay){w.mousemove(function(){if(!b.isShown()){w.triggerHandler("mouseover")}})}if(x.opacity<1){u.css("opacity",x.opacity)}var v=0,c=w.attr("title");if(c&&x.cancelDefault){w.removeAttr("title");w.data("title",c)}g.extend(b,{show:function(i){if(i){w=g(i.target)}clearTimeout(u.data("timer"));if(u.is(":animated")||u.is(":visible")){return b}function j(){u.data("trigger",w);var l=t(i);if(x.tip&&c){u.html(w.data("title"))}i=i||g.Event();i.type="onBeforeShow";d.trigger(i,[l]);if(i.isDefaultPrevented()){return b}l=t(i);u.css({position:"absolute",top:l.top,left:l.left});var k=f[x.effect];if(!k){throw'Nonexistent effect "'+x.effect+'"'}k[0].call(b,function(){i.type="onShow";d.trigger(i)})}if(x.predelay){clearTimeout(v);v=setTimeout(j,x.predelay)}else{j()}return b},hide:function(i){clearTimeout(u.data("timer"));clearTimeout(v);if(!u.is(":visible")){return}function j(){i=i||g.Event();i.type="onBeforeHide";d.trigger(i);if(i.isDefaultPrevented()){return}f[x.effect][1].call(b,function(){i.type="onHide";d.trigger(i)})}if(x.delay&&i){u.data("timer",setTimeout(j,x.delay))}else{j()}return b},isShown:function(){return u.is(":visible, :animated")},getConf:function(){return x},getTip:function(){return u},getTrigger:function(){return w},bind:function(j,i){d.bind(j,i);return b},onHide:function(i){return this.bind("onHide",i)},onBeforeShow:function(i){return this.bind("onBeforeShow",i)},onShow:function(i){return this.bind("onShow",i)},onBeforeHide:function(i){return this.bind("onBeforeHide",i)},unbind:function(i){d.unbind(i);return b}});g.each(x,function(j,i){if(g.isFunction(i)){b.bind(j,i)}})}g.prototype.tooltip=function(b){var c=this.eq(typeof b=="number"?b:0).data("tooltip");if(c){return c}var a=g.extend(true,{},g.tools.tooltip.conf);if(g.isFunction(b)){b={onBeforeShow:b}}else{if(typeof b=="string"){b={tip:b}}}b=g.extend(true,a,b);if(typeof b.position=="string"){b.position=b.position.split(/,?\s/)}if(b.lazy!==false&&(b.lazy===true||this.length>20)){this.one("mouseover",function(d){c=new h(g(this),b);c.show(d);e.push(c)})}else{this.each(function(){c=new h(g(this),b);e.push(c)})}return b.api?c:this}})(jQuery);(function(d){var f=d.tools.tooltip;f.effects=f.effects||{};f.effects.slide={version:"1.0.0"};d.extend(f.conf,{direction:"up",bounce:false,slideOffset:10,slideInSpeed:200,slideOutSpeed:200,slideFade:!d.browser.msie});var e={up:["-","top"],down:["+","top"],left:["-","left"],right:["+","left"]};d.tools.tooltip.addEffect("slide",function(b){var j=this.getConf(),a=this.getTip(),c=j.slideFade?{opacity:j.opacity}:{},i=e[j.direction]||e.up;c[i[1]]=i[0]+"="+j.slideOffset;if(j.slideFade){a.css({opacity:0})}a.show().animate(c,j.slideInSpeed,b)},function(c){var a=this.getConf(),b=a.slideOffset,j=a.slideFade?{opacity:0}:{},l=e[a.direction]||e.up;var k=""+l[0];if(a.bounce){k=k=="+"?"-":"+"}j[l[1]]=k+"="+b;this.getTip().animate(j,a.slideOutSpeed,function(){d(this).hide();c.call()})})})(jQuery);(function(e){var g=e.tools.tooltip;g.plugins=g.plugins||{};g.plugins.dynamic={version:"1.0.1",conf:{api:false,classNames:"top right bottom left"}};function f(a){var b=e(window);var c=b.width()+b.scrollLeft();var d=b.height()+b.scrollTop();return[a.offset().top<=b.scrollTop(),c<=a.offset().left+a.width(),d<=a.offset().top+a.height(),b.scrollLeft()>=a.offset().left]}function h(b){var a=b.length;while(a--){if(b[a]){return false}}return true}e.fn.dynamic=function(a){var b=e.extend({},g.plugins.dynamic.conf),j;if(typeof a=="number"){a={speed:a}}a=e.extend(b,a);var c=a.classNames.split(/\s/),d;this.each(function(){if(e(this).tooltip().jquery){throw"Lazy feature not supported by dynamic plugin. set lazy: false for tooltip"}var i=e(this).tooltip().onBeforeShow(function(p,q){var s=this.getTip(),r=this.getConf();if(!d){d=[r.position[0],r.position[1],r.offset[0],r.offset[1],e.extend({},r)]}e.extend(r,d[4]);r.position=[d[0],d[1]];r.offset=[d[2],d[3]];s.css({visibility:"hidden",position:"absolute",top:q.top,left:q.left}).show();var t=f(s);if(!h(t)){if(t[2]){e.extend(r,a.top);r.position[0]="top";s.addClass(c[0])}if(t[3]){e.extend(r,a.right);r.position[1]="right";s.addClass(c[1])}if(t[0]){e.extend(r,a.bottom);r.position[0]="bottom";s.addClass(c[2])}if(t[1]){e.extend(r,a.left);r.position[1]="left";s.addClass(c[3])}if(t[0]||t[2]){r.offset[0]*=-1}if(t[1]||t[3]){r.offset[1]*=-1}}s.css({visibility:"visible"}).hide()});i.onShow(function(){var m=this.getConf(),n=this.getTip();m.position=[d[0],d[1]];m.offset=[d[2],d[3]]});i.onHide(function(){var l=this.getTip();l.removeClass(a.classNames)});j=i});return a.api?j:this}})(jQuery);(function(m){var i="2.86";if(m.support==undefined){m.support={opacity:!(m.browser.msie)}}function l(r){if(m.fn.cycle.debug){q(r)}}function q(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "))}}m.fn.cycle=function(s,t){var r={s:this.selector,c:this.context};if(this.length===0&&s!="stop"){if(!m.isReady&&r.s){q("DOM not ready, queuing slideshow");m(function(){m(r.s,r.c).cycle(s,t)});return this}q("terminating; zero elements found by selector"+(m.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var v=n(this,s,t);if(v===false){return}v.updateActivePagerLink=v.updateActivePagerLink||m.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=this.cyclePause=0;var u=m(this);var y=v.slideExpr?m(v.slideExpr,this):u.children();var z=y.get();if(z.length<2){q("terminating; too few slides: "+z.length);return}var w=g(u,y,z,v,r);if(w===false){return}var x=w.continuous?10:c(w.currSlide,w.nextSlide,w,!w.rev);if(x){x+=(w.delay||0);if(x<10){x=10}l("first timeout: "+x);this.cycleTimeout=setTimeout(function(){h(z,w,0,!w.rev)},x)}})};function n(t,u,w){if(t.cycleStop==undefined){t.cycleStop=0}if(u===undefined||u===null){u={}}if(u.constructor==String){switch(u){case"destroy":case"stop":var s=m(t).data("cycle.opts");if(!s){return false}t.cycleStop++;if(t.cycleTimeout){clearTimeout(t.cycleTimeout)}t.cycleTimeout=0;m(t).removeData("cycle.opts");if(u=="destroy"){f(s)}return false;case"toggle":t.cyclePause=(t.cyclePause===1)?0:1;r(t.cyclePause,w,t);return false;case"pause":t.cyclePause=1;return false;case"resume":t.cyclePause=0;r(false,w,t);return false;case"prev":case"next":var s=m(t).data("cycle.opts");if(!s){q('options not found, "prev/next" ignored');return false}m.fn.cycle[u](s);return false;default:u={fx:u}}return u}else{if(u.constructor==Number){var v=u;u=m(t).data("cycle.opts");if(!u){q("options not found, can not advance slide");return false}if(v<0||v>=u.elements.length){q("invalid slide index: "+v);return false}u.nextSlide=v;if(t.cycleTimeout){clearTimeout(t.cycleTimeout);t.cycleTimeout=0}if(typeof w=="string"){u.oneTimeFx=w}h(u.elements,u,1,v>=u.currSlide);return false}}return u;function r(x,A,y){if(!x&&A===true){var z=m(y).data("cycle.opts");if(!z){q("options not found, can not resume");return false}if(y.cycleTimeout){clearTimeout(y.cycleTimeout);y.cycleTimeout=0}h(z.elements,z,1,1)}}}function j(r,s){if(!m.support.opacity&&s.cleartype&&r.style.filter){try{r.style.removeAttribute("filter")}catch(t){}}}function f(r){if(r.next){m(r.next).unbind(r.prevNextEvent)}if(r.prev){m(r.prev).unbind(r.prevNextEvent)}if(r.pager||r.pagerAnchorBuilder){m.each(r.pagerAnchors||[],function(){this.unbind().remove()})}r.pagerAnchors=null;if(r.destroy){r.destroy(r)}}function g(J,M,r,F,y){var E=m.extend({},m.fn.cycle.defaults,F||{},m.metadata?J.metadata():m.meta?J.data():{});if(E.autostop){E.countdown=E.autostopCount||r.length}var t=J[0];J.data("cycle.opts",E);E.$cont=J;E.stopCount=t.cycleStop;E.elements=r;E.before=E.before?[E.before]:[];E.after=E.after?[E.after]:[];E.after.unshift(function(){E.busy=0});if(!m.support.opacity&&E.cleartype){E.after.push(function(){j(this,E)})}if(E.continuous){E.after.push(function(){h(r,E,0,!E.rev)})}k(E);if(!m.support.opacity&&E.cleartype&&!E.cleartypeNoBg){d(M)}if(J.css("position")=="static"){J.css("position","relative")}if(E.width){J.width(E.width)}if(E.height&&E.height!="auto"){J.height(E.height)}if(E.startingSlide){E.startingSlide=parseInt(E.startingSlide)}if(E.random){E.randomMap=[];for(var x=0;x<r.length;x++){E.randomMap.push(x)}E.randomMap.sort(function(N,w){return Math.random()-0.5});E.randomIndex=1;E.startingSlide=E.randomMap[1]}else{if(E.startingSlide>=r.length){E.startingSlide=0}}E.currSlide=E.startingSlide||0;var s=E.startingSlide;M.css({position:"absolute",top:0,left:0}).hide().each(function(w){var N=s?w>=s?r.length-(w-s):s-w:r.length-w;m(this).css("z-index",N)});m(r[s]).css("opacity",1).show();j(r[s],E);if(E.fit&&E.width){M.width(E.width)}if(E.fit&&E.height&&E.height!="auto"){M.height(E.height)}var D=E.containerResize&&!J.innerHeight();if(D){var A=0,C=0;for(var u=0;u<r.length;u++){var G=m(r[u]),B=G[0],z=G.outerWidth(),v=G.outerHeight();if(!z){z=B.offsetWidth||B.width||G.attr("width")}if(!v){v=B.offsetHeight||B.height||G.attr("height")}A=z>A?z:A;C=v>C?v:C}if(A>0&&C>0){J.css({width:A+"px",height:C+"px"})}}if(E.pause){J.hover(function(){this.cyclePause++},function(){this.cyclePause--})}if(o(E)===false){return false}var H=false;F.requeueAttempts=F.requeueAttempts||0;M.each(function(){var O=m(this);this.cycleH=(E.fit&&E.height)?E.height:(O.height()||this.offsetHeight||this.height||O.attr("height")||0);this.cycleW=(E.fit&&E.width)?E.width:(O.width()||this.offsetWidth||this.width||O.attr("width")||0);if(O.is("img")){var w=(m.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var Q=(m.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var P=(m.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var N=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(w||Q||P||N){if(y.s&&E.requeueOnImageNotLoaded&&++F.requeueAttempts<100){q(F.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){m(y.s,y.c).cycle(F)},E.requeueTimeout);H=true;return false}else{q("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}}return true});if(H){return false}E.cssBefore=E.cssBefore||{};E.animIn=E.animIn||{};E.animOut=E.animOut||{};M.not(":eq("+s+")").css(E.cssBefore);if(E.cssFirst){m(M[s]).css(E.cssFirst)}if(E.timeout){E.timeout=parseInt(E.timeout);if(E.speed.constructor==String){E.speed=m.fx.speeds[E.speed]||parseInt(E.speed)}if(!E.sync){E.speed=E.speed/2}var I=E.fx=="shuffle"?500:250;while((E.timeout-E.speed)<I){E.timeout+=E.speed}}if(E.easing){E.easeIn=E.easeOut=E.easing}if(!E.speedIn){E.speedIn=E.speed}if(!E.speedOut){E.speedOut=E.speed}E.slideCount=r.length;E.currSlide=E.lastSlide=s;if(E.random){if(++E.randomIndex==r.length){E.randomIndex=0}E.nextSlide=E.randomMap[E.randomIndex]}else{E.nextSlide=E.startingSlide>=(r.length-1)?0:E.startingSlide+1}if(!E.multiFx){var K=m.fn.cycle.transitions[E.fx];if(m.isFunction(K)){K(J,M,E)}else{if(E.fx!="custom"&&!E.multiFx){q("unknown transition: "+E.fx,"; slideshow terminating");return false}}}var L=M[s];if(E.before.length){E.before[0].apply(L,[L,L,E,true])}if(E.after.length>1){E.after[1].apply(L,[L,L,E,true])}if(E.next){m(E.next).bind(E.prevNextEvent,function(){return e(E,E.rev?-1:1)})}if(E.prev){m(E.prev).bind(E.prevNextEvent,function(){return e(E,E.rev?1:-1)})}if(E.pager||E.pagerAnchorBuilder){b(r,E)}a(E,r);return E}function k(r){r.original={before:[],after:[]};r.original.cssBefore=m.extend({},r.cssBefore);r.original.cssAfter=m.extend({},r.cssAfter);r.original.animIn=m.extend({},r.animIn);r.original.animOut=m.extend({},r.animOut);m.each(r.before,function(){r.original.before.push(this)});m.each(r.after,function(){r.original.after.push(this)})}function o(t){var s,x,r=m.fn.cycle.transitions;if(t.fx.indexOf(",")>0){t.multiFx=true;t.fxs=t.fx.replace(/\s*/g,"").split(",");for(s=0;s<t.fxs.length;s++){var w=t.fxs[s];x=r[w];if(!x||!r.hasOwnProperty(w)||!m.isFunction(x)){q("discarding unknown transition: ",w);t.fxs.splice(s,1);s--}}if(!t.fxs.length){q("No valid transitions named; slideshow terminating.");return false}}else{if(t.fx=="all"){t.multiFx=true;t.fxs=[];for(p in r){x=r[p];if(r.hasOwnProperty(p)&&m.isFunction(x)){t.fxs.push(p)}}}}if(t.multiFx&&t.randomizeEffects){var u=Math.floor(Math.random()*20)+30;for(s=0;s<u;s++){var v=Math.floor(Math.random()*t.fxs.length);t.fxs.push(t.fxs.splice(v,1)[0])}l("randomized fx sequence: ",t.fxs)}return true}function a(r,s){r.addSlide=function(t,v){var w=m(t),u=w[0];if(!r.autostopCount){r.countdown++}s[v?"unshift":"push"](u);if(r.els){r.els[v?"unshift":"push"](u)}r.slideCount=s.length;w.css("position","absolute");w[v?"prependTo":"appendTo"](r.$cont);if(v){r.currSlide++;r.nextSlide++}if(!m.support.opacity&&r.cleartype&&!r.cleartypeNoBg){d(w)}if(r.fit&&r.width){w.width(r.width)}if(r.fit&&r.height&&r.height!="auto"){$slides.height(r.height)}u.cycleH=(r.fit&&r.height)?r.height:w.height();u.cycleW=(r.fit&&r.width)?r.width:w.width();w.css(r.cssBefore);if(r.pager||r.pagerAnchorBuilder){m.fn.cycle.createPagerAnchor(s.length-1,u,m(r.pager),s,r)}if(m.isFunction(r.onAddSlide)){r.onAddSlide(w)}else{w.hide()}}}m.fn.cycle.resetState=function(s,r){r=r||s.fx;s.before=[];s.after=[];s.cssBefore=m.extend({},s.original.cssBefore);s.cssAfter=m.extend({},s.original.cssAfter);s.animIn=m.extend({},s.original.animIn);s.animOut=m.extend({},s.original.animOut);s.fxFn=null;m.each(s.original.before,function(){s.before.push(this)});m.each(s.original.after,function(){s.after.push(this)});var t=m.fn.cycle.transitions[r];if(m.isFunction(t)){t(s.$cont,m(s.elements),s)}};function h(u,A,w,z){if(w&&A.busy&&A.manualTrump){l("manualTrump in go(), stopping active transition");m(u).stop(true,true);A.busy=false}if(A.busy){l("transition active, ignoring new tx request");return}var s=A.$cont[0],y=u[A.currSlide],B=u[A.nextSlide];if(s.cycleStop!=A.stopCount||s.cycleTimeout===0&&!w){return}if(!w&&!s.cyclePause&&((A.autostop&&(--A.countdown<=0))||(A.nowrap&&!A.random&&A.nextSlide<A.currSlide))){if(A.end){A.end(A)}return}var C=false;if((w||!s.cyclePause)&&(A.nextSlide!=A.currSlide)){C=true;var x=A.fx;y.cycleH=y.cycleH||m(y).height();y.cycleW=y.cycleW||m(y).width();B.cycleH=B.cycleH||m(B).height();B.cycleW=B.cycleW||m(B).width();if(A.multiFx){if(A.lastFx==undefined||++A.lastFx>=A.fxs.length){A.lastFx=0}x=A.fxs[A.lastFx];A.currFx=x}if(A.oneTimeFx){x=A.oneTimeFx;A.oneTimeFx=null}m.fn.cycle.resetState(A,x);if(A.before.length){m.each(A.before,function(D,E){if(s.cycleStop!=A.stopCount){return}E.apply(B,[y,B,A,z])})}var t=function(){m.each(A.after,function(D,E){if(s.cycleStop!=A.stopCount){return}E.apply(B,[y,B,A,z])})};l("tx firing; currSlide: "+A.currSlide+"; nextSlide: "+A.nextSlide);A.busy=1;if(A.fxFn){A.fxFn(y,B,A,t,z,w&&A.fastOnEvent)}else{if(m.isFunction(m.fn.cycle[A.fx])){m.fn.cycle[A.fx](y,B,A,t,z,w&&A.fastOnEvent)}else{m.fn.cycle.custom(y,B,A,t,z,w&&A.fastOnEvent)}}}if(C||A.nextSlide==A.currSlide){A.lastSlide=A.currSlide;if(A.random){A.currSlide=A.nextSlide;if(++A.randomIndex==u.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{var v=(A.nextSlide+1)==u.length;A.nextSlide=v?0:A.nextSlide+1;A.currSlide=v?u.length-1:A.nextSlide-1}}if(C&&A.pager){A.updateActivePagerLink(A.pager,A.currSlide,A.activePagerClass)}var r=0;if(A.timeout&&!A.continuous){r=c(y,B,A,z)}else{if(A.continuous&&s.cyclePause){r=10}}if(r>0){s.cycleTimeout=setTimeout(function(){h(u,A,0,!A.rev)},r)}}m.fn.cycle.updateActivePagerLink=function(s,t,r){m(s).each(function(){m(this).children().removeClass(r).eq(t).addClass(r)})};function c(v,s,r,w){if(r.timeoutFn){var u=r.timeoutFn(v,s,r,w);while((u-r.speed)<250){u+=r.speed}l("calculated timeout: "+u+"; speed: "+r.speed);if(u!==false){return u}}return r.timeout}m.fn.cycle.next=function(r){e(r,r.rev?-1:1)};m.fn.cycle.prev=function(r){e(r,r.rev?1:-1)};function e(s,w){var v=s.elements;var t=s.$cont[0],r=t.cycleTimeout;if(r){clearTimeout(r);t.cycleTimeout=0}if(s.random&&w<0){s.randomIndex--;if(--s.randomIndex==-2){s.randomIndex=v.length-2}else{if(s.randomIndex==-1){s.randomIndex=v.length-1}}s.nextSlide=s.randomMap[s.randomIndex]}else{if(s.random){s.nextSlide=s.randomMap[s.randomIndex]}else{s.nextSlide=s.currSlide+w;if(s.nextSlide<0){if(s.nowrap){return false}s.nextSlide=v.length-1}else{if(s.nextSlide>=v.length){if(s.nowrap){return false}s.nextSlide=0}}}}var u=s.onPrevNextEvent||s.prevNextClick;if(m.isFunction(u)){u(w>0,s.nextSlide,v[s.nextSlide])}h(v,s,1,w>=0);return false}function b(t,s){var r=m(s.pager);m.each(t,function(u,v){m.fn.cycle.createPagerAnchor(u,v,r,t,s)});s.updateActivePagerLink(s.pager,s.startingSlide,s.activePagerClass)}m.fn.cycle.createPagerAnchor=function(u,t,y,s,v){var x;if(m.isFunction(v.pagerAnchorBuilder)){x=v.pagerAnchorBuilder(u,t);l("pagerAnchorBuilder("+u+", el) returned: "+x)}else{x='<a href="#">'+(u+1)+"</a>"}if(!x){return}var r=m(x);if(r.parents("body").length===0){var w=[];if(y.length>1){y.each(function(){var z=r.clone(true);m(this).append(z);w.push(z[0])});r=m(w)}else{r.appendTo(y)}}v.pagerAnchors=v.pagerAnchors||[];v.pagerAnchors.push(r);r.bind(v.pagerEvent,function(A){A.preventDefault();v.nextSlide=u;var B=v.$cont[0],z=B.cycleTimeout;if(z){clearTimeout(z);B.cycleTimeout=0}var C=v.onPagerEvent||v.pagerClick;if(m.isFunction(C)){C(v.nextSlide,s[v.nextSlide])}h(s,v,1,v.currSlide<u)});if(!/^click/.test(v.pagerEvent)&&!v.allowPagerClickBubble){r.bind("click.cycle",function(){return false})}if(v.pauseOnPagerHover){r.hover(function(){v.$cont[0].cyclePause++},function(){v.$cont[0].cyclePause--})}};m.fn.cycle.hopsFromLast=function(r,v){var t,s=r.lastSlide,u=r.currSlide;if(v){t=u>s?u-s:r.slideCount-s}else{t=u<s?s-u:s+r.slideCount-u}return t};function d(s){l("applying clearType background-color hack");function t(u){u=parseInt(u).toString(16);return u.length<2?"0"+u:u}function r(u){for(;u&&u.nodeName.toLowerCase()!="html";u=u.parentNode){var x=m.css(u,"background-color");if(x.indexOf("rgb")>=0){var w=x.match(/\d+/g);return"#"+t(w[0])+t(w[1])+t(w[2])}if(x&&x!="transparent"){return x}}return"#ffffff"}s.each(function(){m(this).css("background-color",r(this))})}m.fn.cycle.commonReset=function(x,t,s,u,r,v){m(s.elements).not(x).hide();s.cssBefore.opacity=1;s.cssBefore.display="block";if(u!==false&&t.cycleW>0){s.cssBefore.width=t.cycleW}if(r!==false&&t.cycleH>0){s.cssBefore.height=t.cycleH}s.cssAfter=s.cssAfter||{};s.cssAfter.display="none";m(x).css("zIndex",s.slideCount+(v===true?1:0));m(t).css("zIndex",s.slideCount+(v===true?0:1))};m.fn.cycle.custom=function(w,D,y,z,x,s){var r=m(w),v=m(D);var C=y.speedIn,u=y.speedOut,t=y.easeIn,B=y.easeOut;v.css(y.cssBefore);if(s){if(typeof s=="number"){C=u=s}else{C=u=1}t=B=null}var A=function(){v.animate(y.animIn,C,t,z)};r.animate(y.animOut,u,B,function(){if(y.cssAfter){r.css(y.cssAfter)}if(!y.sync){A()}});if(y.sync){A()}};m.fn.cycle.transitions={fade:function(r,t,s){t.not(":eq("+s.currSlide+")").css("opacity",0);s.before.push(function(w,v,u){m.fn.cycle.commonReset(w,v,u);u.cssBefore.opacity=0});s.animIn={opacity:1};s.animOut={opacity:0};s.cssBefore={top:0,left:0}}};m.fn.cycle.ver=function(){return i};m.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,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:!m.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250,activePagerClass:"activeSlide",updateActivePagerLink:null}})(jQuery);(function(R,J,X){var E="function",D="password",H="maxLength",L="type",P="",Q=true,G="placeholder",K=false,F="watermark",T=F,S="watermarkClass",C="watermarkFocus",N="watermarkSubmit",M="watermarkMaxLength",V="watermarkPassword",U="watermarkText",I=/\r/g,A="input:data("+T+"),textarea:data("+T+")",O="input:text,input:password,input[type=search],input:not([type]),textarea",B=["Page_ClientValidate"],z=K,W=G in document.createElement("input");R.watermark=R.watermark||{version:"3.1.3",runOnce:Q,options:{className:F,useNative:Q,hideBeforeUnload:Q},hide:function(a){R(a).filter(A).each(function(){R.watermark._hide(R(this))})},_hide:function(n,b){var d=n[0],e=(d.value||P).replace(I,P),h=n.data(U)||P,j=n.data(M)||0,f=n.data(S);if(h.length&&e==h){d.value=P;if(n.data(V)){if((n.attr(L)||P)==="text"){var o=n.data(V)||[],k=n.parent()||[];if(o.length&&k.length){k[0].removeChild(n[0]);k[0].appendChild(o[0]);n=o}}}if(j){n.attr(H,j);n.removeData(M)}if(b){n.attr("autocomplete","off");J.setTimeout(function(){n.select()},1)}}f&&n.removeClass(f)},show:function(a){R(a).filter(A).each(function(){R.watermark._show(R(this))})},_show:function(n){var b=n[0],d=(b.value||P).replace(I,P),e=n.data(U)||P,a=n.attr(L)||P,c=n.data(S);if((d.length==0||d==e)&&!n.data(C)){z=Q;if(n.data(V)){if(a===D){var k=n.data(V)||[],j=n.parent()||[];if(k.length&&j.length){j[0].removeChild(n[0]);j[0].appendChild(k[0]);n=k;n.attr(H,e.length);b=n[0]}}}if(a==="text"||a==="search"){var f=n.attr(H)||0;if(f>0&&e.length>f){n.data(M,f);n.attr(H,e.length)}}c&&n.addClass(c);b.value=e}else{R.watermark._hide(n)}},hideAll:function(){if(z){R.watermark.hide(O);z=K}},showAll:function(){R.watermark.show(O)}};R.fn.watermark=R.fn.watermark||function(c,d){var e="string";if(!this.length){return this}var b=K,a=typeof c===e;if(a){c=c.replace(I,P)}if(typeof d==="object"){b=typeof d.className===e;d=R.extend({},R.watermark.options,d)}else{if(typeof d===e){b=Q;d=R.extend({},R.watermark.options,{className:d})}else{d=R.watermark.options}}if(typeof d.useNative!==E){d.useNative=d.useNative?function(){return Q}:function(){return K}}return this.each(function(){var h="dragleave",k="dragenter",m=this,l=R(m);if(!l.is(O)){return}if(l.data(T)){if(a||b){R.watermark._hide(l);a&&l.data(U,c);b&&l.data(S,d.className)}}else{if(W&&d.useNative.call(m,l)&&(l.attr("tagName")||P)!=="TEXTAREA"){a&&l.attr(G,c);return}l.data(U,a?c:P);l.data(S,d.className);l.data(T,1);if((l.attr(L)||P)===D){var j=l.wrap("<span>").parent(),g=R(j.html().replace(/type=["']?password["']?/i,'type="text"'));g.data(U,l.data(U));g.data(S,l.data(S));g.data(T,1);g.attr(H,c.length);g.focus(function(){R.watermark._hide(g,Q)}).bind(k,function(){R.watermark._hide(g)}).bind("dragend",function(){J.setTimeout(function(){g.blur()},1)});l.blur(function(){R.watermark._show(l)}).bind(h,function(){R.watermark._show(l)});g.data(V,l);l.data(V,g)}else{l.focus(function(){l.data(C,1);R.watermark._hide(l,Q)}).blur(function(){l.data(C,0);R.watermark._show(l)}).bind(k,function(){R.watermark._hide(l)}).bind(h,function(){R.watermark._show(l)}).bind("dragend",function(){J.setTimeout(function(){R.watermark._show(l)},1)}).bind("drop",function(i){var o=l[0],p=i.originalEvent.dataTransfer.getData("Text");if((o.value||P).replace(I,P).replace(p,P)===l.data(U)){o.value=p}l.focus()})}if(m.form){var f=m.form,n=R(f);if(!n.data(N)){n.submit(R.watermark.hideAll);if(f.submit){n.data(N,f.submit);f.submit=function(o,i){return function(){var p=i.data(N);R.watermark.hideAll();if(p.apply){p.apply(o,Array.prototype.slice.call(arguments))}else{p()}}}(f,n)}else{n.data(N,1);f.submit=function(i){return function(){R.watermark.hideAll();delete i.submit;i.submit()}}(f)}}}}R.watermark._show(l)})};if(R.watermark.runOnce){R.watermark.runOnce=K;R.extend(R.expr[":"],{data:function(f,a,e){return !!R.data(f,e[3])}});(function(a){R.fn.val=function(){var b=this;if(!b.length){return arguments.length?b:X}if(!arguments.length){if(b.data(T)){var c=(b[0].value||P).replace(I,P);return c===(b.data(U)||P)?P:c}else{return a.apply(b,arguments)}}else{a.apply(b,arguments);R.watermark.show(b);return b}}})(R.fn.val);B.length&&R(function(){for(var e,f,a=B.length-1;a>=0;a--){e=B[a];f=J[e];if(typeof f===E){J[e]=function(c){return function(){R.watermark.hideAll();return c.apply(null,Array.prototype.slice.call(arguments))}}(f)}}});R(J).bind("beforeunload",function(){R.watermark.options.hideBeforeUnload&&R.watermark.hideAll()})}})(jQuery,window);var liveString="http://"+window.location.host;if(liveString.indexOf("spektrummedia.com")>0){liveString=liveString+"/ville_st-augustin"}else{if(liveString.indexOf("localhost")>0){liveString=liveString+"/SaintAugustin/StAugustin"}else{liveString=liveString+"/"}}sfHover=function(){var a=document.getElementById("main_menu_header").getElementsByTagName("LI");for(var b=0;b<a.length;b++){a[b].onmouseover=function(){this.className+=" sfhover"};a[b].onmouseout=function(){this.className=this.className.replace(new RegExp(" sfhover\\b"),"")}}};if(window.attachEvent){window.attachEvent("onload",sfHover)}$(document).ready(function(){$("#newsletter-email").watermark("Votre adresse courriel");$("#search_box .search_txt_field").watermark("Saisir votre texte");$("#submitSearch").click(function(){$(this).parents("form:first").submit();return false});$("#btn-newsletter-subscription").click(function(){var a=$("#newsletter-email").val();if(a!=""&&a!="Votre adresse courriel"){$("#newsletter-form-content").hide();$("#newsletter-form").append('<div id="newsletter-result"><p class="waiting-text">Envoi en cours...</p></div>');$.post(liveString+"SubscribeMailing",{email:a},function(b){if(b=="success"){$("#newsletter-result").html('<p class="confirm-text">Vous avez &eacute;t&eacute; ajout&eacute; &agrave; notre liste.</p>')}else{$("#newsletter-result").html('<p class="error-text">Vous avez saisie une adresse courriel invalide ou une erreur s\'est produite.<br /><a href="#" id="btn-newsletter-refresh">Essayer de nouveau</a></p>');$("#btn-newsletter-refresh").click(function(){$("#newsletter-result").remove();$("#newsletter-form-content").show();return false})}})}return false})});(function(b){b.fn.numeric=function(d){var c=b.extend(b.fn.numeric.defaults,d);return this.each(function(){var e=b(this);e.keydown(function(g){var f=g.charCode||g.keyCode||0;if(c.allowControlKeys&&a(f)){return true}return((f>=48&&f<=57)||(f>=96&&f<=105)||f==190||f==110)});e.focus(function(){if(e.val()=="0"){e.val("")}});e.blur(function(){if(e.val()==""){e.val("0")}})})};function a(c){var d=new Array(8,9,46,37,38,39,40);return b.inArray(c,d)>-1}b.fn.numeric.defaults={allowControlKeys:true}})(jQuery);function showHomeBanner(){bgImageTotal=4;var a=Math.round(Math.random()*(bgImageTotal-1))+1;imgPath=(liveString+"/Content/images/top_bgs/home/banniere"+a+".jpg");$("#homepage").css("background-image",('url("'+imgPath+'")'))}function showCompanies(){$("#companies_list_content").cycle("destroy");$("#COMPANIESLIST_CONTENT").empty();$.post(liveString+"/Enterprises/GetAll",function(a){$("#COMPANIESLIST_CONTENT").empty().append(a);$("#companies_list_content").cycle({fx:"fade",timeout:0,cleartype:1,cleartypeNoBg:true});$("#companies_list_content").children(".slide").each(function(b){pageNum=b+1;var c="slideNav";if(b==0){c="activeSlide"}$('<a href="#" class="'+c+'">'+pageNum+"</a>").click(function(){$(".activeSlide").removeClass("activeSlide");$(this).addClass("activeSlide");$("#companies_list_content").cycle(b)}).appendTo("#companies-nav")})})}function showOrganisms(){$("#companies_list_content").cycle("destroy");$.post(liveString+"/Organisms/GetAll",function(a){$("#COMPANIESLIST_CONTENT").empty().append(a);$("#companies_list_content").cycle({fx:"fade",timeout:0,cleartype:1,cleartypeNoBg:true});$("#companies_list_content").children(".slide").each(function(b){pageNum=b+1;var c="slideNav";if(b==0){c="activeSlide"}$('<a href="#" class="'+c+'">'+pageNum+"</a>").click(function(){$(".activeSlide").removeClass("activeSlide");$(this).addClass("activeSlide");$("#companies_list_content").cycle(b)}).appendTo("#companies-nav")})})}$(document).ready(function(){showHomeBanner();$(".lien-jour").tooltip({offset:[10,0],effect:"slide"});$("#COMPANIESLIST_BUTTON").parent().parent().css({backgroundPosition:"-1px -121px"});$("#ORGANISMLIST_BUTTON").parent().parent().css({backgroundPosition:"-1px -121px"});$("#COMPANIESLIST_BUTTON").click(function(){var a=$(this).parent().parent();if(a.hasClass("active")){if(a.find("#ORGANISMLIST_BUTTON.active").get(0)){a.find("div.active").toggleClass("active");showCompanies()}else{a.stop().animate({backgroundPosition:"(-1px -121px)"},{duration:500,complete:function(){a.toggleClass("active")}});$("#COMPANIESLIST_CONTENT").hide()}}else{showCompanies();a.stop().animate({backgroundPosition:"(-1px -209px)"},{duration:500,complete:function(){a.toggleClass("active")}});$("#COMPANIESLIST_CONTENT").show()}$(this).toggleClass("active")});$("#ORGANISMLIST_BUTTON").click(function(){var a=$(this).parent().parent();if(a.hasClass("active")){if(a.find("#COMPANIESLIST_BUTTON.active").get(0)){a.find("div.active").toggleClass("active");showOrganisms()}else{a.stop().animate({backgroundPosition:"(-1px -121px)"},{duration:500,complete:function(){a.toggleClass("active")}});$("#COMPANIESLIST_CONTENT").hide()}}else{showOrganisms();a.stop().animate({backgroundPosition:"(-1px -209px)"},{duration:500,complete:function(){a.toggleClass("active")}});$("#COMPANIESLIST_CONTENT").show()}$(this).toggleClass("active")})});(function(a){a.extend(a.fx.step,{backgroundPosition:function(c){if(c.state===0&&typeof c.end=="string"){var f=a.curCSS(c.elem,"backgroundPosition");f=d(f);c.start=[f[0],f[2]];var e=d(c.end);c.end=[e[0],e[2]];c.unit=[e[1],e[3]]}var b=[];b[0]=((c.end[0]-c.start[0])*c.pos)+c.start[0]+c.unit[0];b[1]=((c.end[1]-c.start[1])*c.pos)+c.start[1]+c.unit[1];c.elem.style.backgroundPosition=b[0]+" "+b[1];function d(h){h=h.replace(/left|top/g,"0px");h=h.replace(/right|bottom/g,"100%");h=h.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");var g=h.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(g[1],10),g[2],parseFloat(g[3],10),g[4]]}}})})(jQuery);
