/*jquery.cookie.js
jquery.cycle.js
jquery.galleriffic.js
jquery.history.js
jquery.nivo.slider.pack.js
jquery.opacityrollover.js
jquery.tablednd_0_5.js
jquery.tinysort.min.js
jquery.treeview.js
pix-autocomplete.js
pix-dropdown.js
pix-mdp.js
pix-tabcontainer.js
pix-toggle.js
pix-treeview.js
pix-upload.js */

jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};(function(w){var t="2.73";if(w.support==undefined){w.support={opacity:!(w.browser.msie)}}function E(a){if(w.fn.cycle.debug){z(a)}}function z(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "))}}w.fn.cycle=function(b,c){var a={s:this.selector,c:this.context};if(this.length===0&&b!="stop"){if(!w.isReady&&a.s){z("DOM not ready, queuing slideshow");w(function(){w(a.s,a.c).cycle(b,c)});return this}z("terminating; zero elements found by selector"+(w.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var e=s(this,b,c);if(e===false){return}if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=this.cyclePause=0;var d=w(this);var j=e.slideExpr?w(e.slideExpr,this):d.children();var g=j.get();if(g.length<2){z("terminating; too few slides: "+g.length);return}var h=u(d,j,g,e,a);if(h===false){return}var f=h.continuous?10:x(h.currSlide,h.nextSlide,h,!h.rev);if(f){f+=(h.delay||0);if(f<10){f=10}E("first timeout: "+f);this.cycleTimeout=setTimeout(function(){A(g,h,0,!h.rev)},f)}})};function s(e,b,d){if(e.cycleStop==undefined){e.cycleStop=0}if(b===undefined||b===null){b={}}if(b.constructor==String){switch(b){case"stop":e.cycleStop++;if(e.cycleTimeout){clearTimeout(e.cycleTimeout)}e.cycleTimeout=0;w(e).removeData("cycle.opts");return false;case"pause":e.cyclePause=1;return false;case"resume":e.cyclePause=0;if(d===true){b=w(e).data("cycle.opts");if(!b){z("options not found, can not resume");return false}if(e.cycleTimeout){clearTimeout(e.cycleTimeout);e.cycleTimeout=0}A(b.elements,b,1,1)}return false;case"prev":case"next":var a=w(e).data("cycle.opts");if(!a){z('options not found, "prev/next" ignored');return false}w.fn.cycle[b](a);return false;default:b={fx:b}}return b}else{if(b.constructor==Number){var c=b;b=w(e).data("cycle.opts");if(!b){z("options not found, can not advance slide");return false}if(c<0||c>=b.elements.length){z("invalid slide index: "+c);return false}b.nextSlide=c;if(e.cycleTimeout){clearTimeout(e.cycleTimeout);e.cycleTimeout=0}if(typeof d=="string"){b.oneTimeFx=d}A(b.elements,b,1,c>=b.currSlide);return false}}return b}function D(c,b){if(!w.support.opacity&&b.cleartype&&c.style.filter){try{c.style.removeAttribute("filter")}catch(a){}}}function u(d,c,l,n,m){var M=w.extend({},w.fn.cycle.defaults,n||{},w.metadata?d.metadata():w.meta?d.data():{});if(M.autostop){M.countdown=M.autostopCount||l.length}var N=d[0];d.data("cycle.opts",M);M.$cont=d;M.stopCount=N.cycleStop;M.elements=l;M.before=M.before?[M.before]:[];M.after=M.after?[M.after]:[];M.after.unshift(function(){M.busy=0});if(!w.support.opacity&&M.cleartype){M.after.push(function(){D(this,M)})}if(M.continuous){M.after.push(function(){A(l,M,0,!M.rev)})}r(M);if(!w.support.opacity&&M.cleartype&&!M.cleartypeNoBg){y(c)}if(d.css("position")=="static"){d.css("position","relative")}if(M.width){d.width(M.width)}if(M.height&&M.height!="auto"){d.height(M.height)}if(M.startingSlide){M.startingSlide=parseInt(M.startingSlide)}if(M.random){M.randomMap=[];for(var g=0;g<l.length;g++){M.randomMap.push(g)}M.randomMap.sort(function(F,G){return Math.random()-0.5});M.randomIndex=0;M.startingSlide=M.randomMap[0]}else{if(M.startingSlide>=l.length){M.startingSlide=0}}M.currSlide=M.startingSlide=M.startingSlide||0;var f=M.startingSlide;c.css({position:"absolute",top:0,left:0}).hide().each(function(G){var F=f?G>=f?l.length-(G-f):f-G:l.length-G;w(this).css("z-index",F)});w(l[f]).css("opacity",1).show();D(l[f],M);if(M.fit&&M.width){c.width(M.width)}if(M.fit&&M.height&&M.height!="auto"){c.height(M.height)}var L=M.containerResize&&!d.innerHeight();if(L){var j=0,O=0;for(var k=0;k<l.length;k++){var P=w(l[k]),b=P[0],Q=P.outerWidth(),e=P.outerHeight();if(!Q){Q=b.offsetWidth}if(!e){e=b.offsetHeight}j=Q>j?Q:j;O=e>O?e:O}if(j>0&&O>0){d.css({width:j+"px",height:O+"px"})}}if(M.pause){d.hover(function(){this.cyclePause++},function(){this.cyclePause--})}if(C(M)===false){return false}var o=false;n.requeueAttempts=n.requeueAttempts||0;c.each(function(){var I=w(this);this.cycleH=(M.fit&&M.height)?M.height:I.height();this.cycleW=(M.fit&&M.width)?M.width:I.width();if(I.is("img")){var F=(w.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var H=(w.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var J=(w.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var G=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(F||H||J||G){if(m.s&&M.requeueOnImageNotLoaded&&++n.requeueAttempts<100){z(n.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){w(m.s,m.c).cycle(n)},M.requeueTimeout);o=true;return false}else{z("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}}return true});if(o){return false}M.cssBefore=M.cssBefore||{};M.animIn=M.animIn||{};M.animOut=M.animOut||{};c.not(":eq("+f+")").css(M.cssBefore);if(M.cssFirst){w(c[f]).css(M.cssFirst)}if(M.timeout){M.timeout=parseInt(M.timeout);if(M.speed.constructor==String){M.speed=w.fx.speeds[M.speed]||parseInt(M.speed)}if(!M.sync){M.speed=M.speed/2}while((M.timeout-M.speed)<250){M.timeout+=M.speed}}if(M.easing){M.easeIn=M.easeOut=M.easing}if(!M.speedIn){M.speedIn=M.speed}if(!M.speedOut){M.speedOut=M.speed}M.slideCount=l.length;M.currSlide=M.lastSlide=f;if(M.random){M.nextSlide=M.currSlide;if(++M.randomIndex==l.length){M.randomIndex=0}M.nextSlide=M.randomMap[M.randomIndex]}else{M.nextSlide=M.startingSlide>=(l.length-1)?0:M.startingSlide+1}if(!M.multiFx){var h=w.fn.cycle.transitions[M.fx];if(w.isFunction(h)){h(d,c,M)}else{if(M.fx!="custom"&&!M.multiFx){z("unknown transition: "+M.fx,"; slideshow terminating");return false}}}var a=c[f];if(M.before.length){M.before[0].apply(a,[a,a,M,true])}if(M.after.length>1){M.after[1].apply(a,[a,a,M,true])}if(M.next){w(M.next).bind(M.prevNextEvent,function(){return q(M,M.rev?-1:1)})}if(M.prev){w(M.prev).bind(M.prevNextEvent,function(){return q(M,M.rev?1:-1)})}if(M.pager){B(l,M)}v(M,l);return M}function r(a){a.original={before:[],after:[]};a.original.cssBefore=w.extend({},a.cssBefore);a.original.cssAfter=w.extend({},a.cssAfter);a.original.animIn=w.extend({},a.animIn);a.original.animOut=w.extend({},a.animOut);w.each(a.before,function(){a.original.before.push(this)});w.each(a.after,function(){a.original.after.push(this)})}function C(a){var c,e,f=w.fn.cycle.transitions;if(a.fx.indexOf(",")>0){a.multiFx=true;a.fxs=a.fx.replace(/\s*/g,"").split(",");for(c=0;c<a.fxs.length;c++){var b=a.fxs[c];e=f[b];if(!e||!f.hasOwnProperty(b)||!w.isFunction(e)){z("discarding unknown transition: ",b);a.fxs.splice(c,1);c--}}if(!a.fxs.length){z("No valid transitions named; slideshow terminating.");return false}}else{if(a.fx=="all"){a.multiFx=true;a.fxs=[];for(p in f){e=f[p];if(f.hasOwnProperty(p)&&w.isFunction(e)){a.fxs.push(p)}}}}if(a.multiFx&&a.randomizeEffects){var d=Math.floor(Math.random()*20)+30;for(c=0;c<d;c++){var g=Math.floor(Math.random()*a.fxs.length);a.fxs.push(a.fxs.splice(g,1)[0])}E("randomized fx sequence: ",a.fxs)}return true}function v(a,b){a.addSlide=function(e,d){var f=w(e),c=f[0];if(!a.autostopCount){a.countdown++}b[d?"unshift":"push"](c);if(a.els){a.els[d?"unshift":"push"](c)}a.slideCount=b.length;f.css("position","absolute");f[d?"prependTo":"appendTo"](a.$cont);if(d){a.currSlide++;a.nextSlide++}if(!w.support.opacity&&a.cleartype&&!a.cleartypeNoBg){y(f)}if(a.fit&&a.width){f.width(a.width)}if(a.fit&&a.height&&a.height!="auto"){$slides.height(a.height)}c.cycleH=(a.fit&&a.height)?a.height:f.height();c.cycleW=(a.fit&&a.width)?a.width:f.width();f.css(a.cssBefore);if(a.pager){w.fn.cycle.createPagerAnchor(b.length-1,c,w(a.pager),b,a)}if(w.isFunction(a.onAddSlide)){a.onAddSlide(f)}else{f.hide()}}}w.fn.cycle.resetState=function(b,c){c=c||b.fx;b.before=[];b.after=[];b.cssBefore=w.extend({},b.original.cssBefore);b.cssAfter=w.extend({},b.original.cssAfter);b.animIn=w.extend({},b.original.animIn);b.animOut=w.extend({},b.original.animOut);b.fxFn=null;w.each(b.original.before,function(){b.before.push(this)});w.each(b.original.after,function(){b.after.push(this)});var a=w.fn.cycle.transitions[c];if(w.isFunction(a)){a(b.$cont,w(b.elements),b)}};function A(f,b,g,e){if(g&&b.busy&&b.manualTrump){w(f).stop(true,true);b.busy=false}if(b.busy){return}var j=b.$cont[0],c=f[b.currSlide],d=f[b.nextSlide];if(j.cycleStop!=b.stopCount||j.cycleTimeout===0&&!g){return}if(!g&&!j.cyclePause&&((b.autostop&&(--b.countdown<=0))||(b.nowrap&&!b.random&&b.nextSlide<b.currSlide))){if(b.end){b.end(b)}return}if(g||!j.cyclePause){var h=b.fx;c.cycleH=c.cycleH||w(c).height();c.cycleW=c.cycleW||w(c).width();d.cycleH=d.cycleH||w(d).height();d.cycleW=d.cycleW||w(d).width();if(b.multiFx){if(b.lastFx==undefined||++b.lastFx>=b.fxs.length){b.lastFx=0}h=b.fxs[b.lastFx];b.currFx=h}if(b.oneTimeFx){h=b.oneTimeFx;b.oneTimeFx=null}w.fn.cycle.resetState(b,h);if(b.before.length){w.each(b.before,function(n,m){if(j.cycleStop!=b.stopCount){return}m.apply(d,[c,d,b,e])})}var l=function(){w.each(b.after,function(n,m){if(j.cycleStop!=b.stopCount){return}m.apply(d,[c,d,b,e])})};if(b.nextSlide!=b.currSlide){b.busy=1;if(b.fxFn){b.fxFn(c,d,b,l,e)}else{if(w.isFunction(w.fn.cycle[b.fx])){w.fn.cycle[b.fx](c,d,b,l)}else{w.fn.cycle.custom(c,d,b,l,g&&b.fastOnEvent)}}}b.lastSlide=b.currSlide;if(b.random){b.currSlide=b.nextSlide;if(++b.randomIndex==f.length){b.randomIndex=0}b.nextSlide=b.randomMap[b.randomIndex]}else{var k=(b.nextSlide+1)==f.length;b.nextSlide=k?0:b.nextSlide+1;b.currSlide=k?f.length-1:b.nextSlide-1}if(b.pager){w.fn.cycle.updateActivePagerLink(b.pager,b.currSlide)}}var a=0;if(b.timeout&&!b.continuous){a=x(c,d,b,e)}else{if(b.continuous&&j.cyclePause){a=10}}if(a>0){j.cycleTimeout=setTimeout(function(){A(f,b,0,!b.rev)},a)}}w.fn.cycle.updateActivePagerLink=function(b,a){w(b).each(function(){w(this).find("a").removeClass("activeSlide").filter("a:eq("+a+")").addClass("activeSlide")})};function x(a,c,b,d){if(b.timeoutFn){var e=b.timeoutFn(a,c,b,d);while((e-b.speed)<250){e+=b.speed}E("calculated timeout: "+e+"; speed: "+b.speed);if(e!==false){return e}}return b.timeout}w.fn.cycle.next=function(a){q(a,a.rev?-1:1)};w.fn.cycle.prev=function(a){q(a,a.rev?1:-1)};function q(d,a){var e=d.elements;var b=d.$cont[0],c=b.cycleTimeout;if(c){clearTimeout(c);b.cycleTimeout=0}if(d.random&&a<0){d.randomIndex--;if(--d.randomIndex==-2){d.randomIndex=e.length-2}else{if(d.randomIndex==-1){d.randomIndex=e.length-1}}d.nextSlide=d.randomMap[d.randomIndex]}else{if(d.random){if(++d.randomIndex==e.length){d.randomIndex=0}d.nextSlide=d.randomMap[d.randomIndex]}else{d.nextSlide=d.currSlide+a;if(d.nextSlide<0){if(d.nowrap){return false}d.nextSlide=e.length-1}else{if(d.nextSlide>=e.length){if(d.nowrap){return false}d.nextSlide=0}}}}if(w.isFunction(d.prevNextClick)){d.prevNextClick(a>0,d.nextSlide,e[d.nextSlide])}A(e,d,1,a>=0);return false}function B(b,a){var c=w(a.pager);w.each(b,function(e,d){w.fn.cycle.createPagerAnchor(e,d,c,b,a)});w.fn.cycle.updateActivePagerLink(a.pager,a.startingSlide)}w.fn.cycle.createPagerAnchor=function(d,c,f,e,b){var g;if(w.isFunction(b.pagerAnchorBuilder)){g=b.pagerAnchorBuilder(d,c)}else{g='<a href="#">'+(d+1)+"</a>"}if(!g){return}var a=w(g);if(a.parents("body").length===0){var h=[];if(f.length>1){f.each(function(){var j=a.clone(true);w(this).append(j);h.push(j[0])});a=w(h)}else{a.appendTo(f)}}a.bind(b.pagerEvent,function(j){j.preventDefault();b.nextSlide=d;var k=b.$cont[0],l=k.cycleTimeout;if(l){clearTimeout(l);k.cycleTimeout=0}if(w.isFunction(b.pagerClick)){b.pagerClick(b.nextSlide,e[b.nextSlide])}A(e,b,1,b.currSlide<d);return false});if(b.pagerEvent!="click"){a.click(function(){return false})}if(b.pauseOnPagerHover){a.hover(function(){b.$cont[0].cyclePause++},function(){b.$cont[0].cyclePause--})}};w.fn.cycle.hopsFromLast=function(b,c){var d,e=b.lastSlide,a=b.currSlide;if(c){d=a>e?a-e:b.slideCount-e}else{d=a<e?e-a:e+b.slideCount-a}return d};function y(a){function b(d){d=parseInt(d).toString(16);return d.length<2?"0"+d:d}function c(d){for(;d&&d.nodeName.toLowerCase()!="html";d=d.parentNode){var f=w.css(d,"background-color");if(f.indexOf("rgb")>=0){var e=f.match(/\d+/g);return"#"+b(e[0])+b(e[1])+b(e[2])}if(f&&f!="transparent"){return f}}return"#ffffff"}a.each(function(){w(this).css("background-color",c(this))})}w.fn.cycle.commonReset=function(a,c,b,e,d,f){w(b.elements).not(a).hide();b.cssBefore.opacity=1;b.cssBefore.display="block";if(e!==false&&c.cycleW>0){b.cssBefore.width=c.cycleW}if(d!==false&&c.cycleH>0){b.cssBefore.height=c.cycleH}b.cssAfter=b.cssAfter||{};b.cssAfter.display="none";w(a).css("zIndex",b.slideCount+(f===true?1:0));w(c).css("zIndex",b.slideCount+(f===true?0:1))};w.fn.cycle.custom=function(c,j,b,m,a){var d=w(c),h=w(j);var l=b.speedIn,e=b.speedOut,k=b.easeIn,f=b.easeOut;h.css(b.cssBefore);if(a){if(typeof a=="number"){l=e=a}else{l=e=1}k=f=null}var g=function(){h.animate(b.animIn,l,k,m)};d.animate(b.animOut,e,f,function(){if(b.cssAfter){d.css(b.cssAfter)}if(!b.sync){g()}});if(b.sync){g()}};w.fn.cycle.transitions={fade:function(b,a,c){a.not(":eq("+c.currSlide+")").css("opacity",0);c.before.push(function(d,f,e){w.fn.cycle.commonReset(d,f,e);e.cssBefore.opacity=0});c.animIn={opacity:1};c.animOut={opacity:0};c.cssBefore={top:0,left:0}}};w.fn.cycle.ver=function(){return t};w.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,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:!w.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250}})(jQuery);(function(b){b.fn.cycle.transitions.none=function(f,e,a){a.fxFn=function(d,k,j,c){b(k).show();b(d).hide();c()}};b.fn.cycle.transitions.scrollUp=function(g,f,h){g.css("overflow","hidden");h.before.push(b.fn.cycle.commonReset);var a=g.height();h.cssBefore={top:a,left:0};h.cssFirst={top:0};h.animIn={top:0};h.animOut={top:-a}};b.fn.cycle.transitions.scrollDown=function(g,f,h){g.css("overflow","hidden");h.before.push(b.fn.cycle.commonReset);var a=g.height();h.cssFirst={top:0};h.cssBefore={top:-a,left:0};h.animIn={top:0};h.animOut={top:a}};b.fn.cycle.transitions.scrollLeft=function(g,f,h){g.css("overflow","hidden");h.before.push(b.fn.cycle.commonReset);var a=g.width();h.cssFirst={left:0};h.cssBefore={left:a,top:0};h.animIn={left:0};h.animOut={left:0-a}};b.fn.cycle.transitions.scrollRight=function(g,f,h){g.css("overflow","hidden");h.before.push(b.fn.cycle.commonReset);var a=g.width();h.cssFirst={left:0};h.cssBefore={left:-a,top:0};h.animIn={left:0};h.animOut={left:a}};b.fn.cycle.transitions.scrollHorz=function(f,e,a){f.css("overflow","hidden").width();a.before.push(function(c,j,d,k){b.fn.cycle.commonReset(c,j,d);d.cssBefore.left=k?(j.cycleW-1):(1-j.cycleW);d.animOut.left=k?-c.cycleW:c.cycleW});a.cssFirst={left:0};a.cssBefore={top:0};a.animIn={left:0};a.animOut={top:0}};b.fn.cycle.transitions.scrollVert=function(f,e,a){f.css("overflow","hidden");a.before.push(function(c,j,d,k){b.fn.cycle.commonReset(c,j,d);d.cssBefore.top=k?(1-j.cycleH):(j.cycleH-1);d.animOut.top=k?c.cycleH:-c.cycleH});a.cssFirst={top:0};a.cssBefore={left:0};a.animIn={top:0};a.animOut={left:0}};b.fn.cycle.transitions.slideX=function(f,e,a){a.before.push(function(c,h,d){b(d.elements).not(c).hide();b.fn.cycle.commonReset(c,h,d,false,true);d.animIn.width=h.cycleW});a.cssBefore={left:0,top:0,width:0};a.animIn={width:"show"};a.animOut={width:0}};b.fn.cycle.transitions.slideY=function(f,e,a){a.before.push(function(c,h,d){b(d.elements).not(c).hide();b.fn.cycle.commonReset(c,h,d,true,false);d.animIn.height=h.cycleH});a.cssBefore={left:0,top:0,height:0};a.animIn={height:"show"};a.animOut={height:0}};b.fn.cycle.transitions.shuffle=function(h,g,j){var k,a=h.css("overflow","visible").width();g.css({left:0,top:0});j.before.push(function(c,e,d){b.fn.cycle.commonReset(c,e,d,true,true,true)});if(!j.speedAdjusted){j.speed=j.speed/2;j.speedAdjusted=true}j.random=0;j.shuffle=j.shuffle||{left:-a,top:15};j.els=[];for(k=0;k<g.length;k++){j.els.push(g[k])}for(k=0;k<j.currSlide;k++){j.els.push(j.els.shift())}j.fxFn=function(c,f,d,q,n){var o=n?b(c):b(f);b(f).css(d.cssBefore);var e=d.slideCount;o.animate(d.shuffle,d.speedIn,d.easeIn,function(){var u=b.fn.cycle.hopsFromLast(d,n);for(var t=0;t<u;t++){n?d.els.push(d.els.shift()):d.els.unshift(d.els.pop())}if(n){for(var m=0,v=d.els.length;m<v;m++){b(d.els[m]).css("z-index",v-m+e)}}else{var l=b(c).css("z-index");o.css("z-index",parseInt(l)+1+e)}o.animate({left:0,top:0},d.speedOut,d.easeOut,function(){b(n?this:c).hide();if(q){q()}})})};j.cssBefore={display:"block",opacity:1,top:0,left:0}};b.fn.cycle.transitions.turnUp=function(f,e,a){a.before.push(function(c,h,d){b.fn.cycle.commonReset(c,h,d,true,false);d.cssBefore.top=h.cycleH;d.animIn.height=h.cycleH});a.cssFirst={top:0};a.cssBefore={left:0,height:0};a.animIn={top:0};a.animOut={height:0}};b.fn.cycle.transitions.turnDown=function(f,e,a){a.before.push(function(c,h,d){b.fn.cycle.commonReset(c,h,d,true,false);d.animIn.height=h.cycleH;d.animOut.top=c.cycleH});a.cssFirst={top:0};a.cssBefore={left:0,top:0,height:0};a.animOut={height:0}};b.fn.cycle.transitions.turnLeft=function(f,e,a){a.before.push(function(c,h,d){b.fn.cycle.commonReset(c,h,d,false,true);d.cssBefore.left=h.cycleW;d.animIn.width=h.cycleW});a.cssBefore={top:0,width:0};a.animIn={left:0};a.animOut={width:0}};b.fn.cycle.transitions.turnRight=function(f,e,a){a.before.push(function(c,h,d){b.fn.cycle.commonReset(c,h,d,false,true);d.animIn.width=h.cycleW;d.animOut.left=c.cycleW});a.cssBefore={top:0,left:0,width:0};a.animIn={left:0};a.animOut={width:0}};b.fn.cycle.transitions.zoom=function(f,e,a){a.before.push(function(c,h,d){b.fn.cycle.commonReset(c,h,d,false,false,true);d.cssBefore.top=h.cycleH/2;d.cssBefore.left=h.cycleW/2;d.animIn={top:0,left:0,width:h.cycleW,height:h.cycleH};d.animOut={width:0,height:0,top:c.cycleH/2,left:c.cycleW/2}});a.cssFirst={top:0,left:0};a.cssBefore={width:0,height:0}};b.fn.cycle.transitions.fadeZoom=function(f,e,a){a.before.push(function(c,h,d){b.fn.cycle.commonReset(c,h,d,false,false);d.cssBefore.left=h.cycleW/2;d.cssBefore.top=h.cycleH/2;d.animIn={top:0,left:0,width:h.cycleW,height:h.cycleH}});a.cssBefore={width:0,height:0};a.animOut={opacity:0}};b.fn.cycle.transitions.blindX=function(g,f,h){var a=g.css("overflow","hidden").width();h.before.push(function(c,e,d){b.fn.cycle.commonReset(c,e,d);d.animIn.width=e.cycleW;d.animOut.left=c.cycleW});h.cssBefore={left:a,top:0};h.animIn={left:0};h.animOut={left:a}};b.fn.cycle.transitions.blindY=function(g,f,h){var a=g.css("overflow","hidden").height();h.before.push(function(c,e,d){b.fn.cycle.commonReset(c,e,d);d.animIn.height=e.cycleH;d.animOut.top=c.cycleH});h.cssBefore={top:a,left:0};h.animIn={top:0};h.animOut={top:a}};b.fn.cycle.transitions.blindZ=function(h,g,j){var k=h.css("overflow","hidden").height();var a=h.width();j.before.push(function(c,e,d){b.fn.cycle.commonReset(c,e,d);d.animIn.height=e.cycleH;d.animOut.top=c.cycleH});j.cssBefore={top:k,left:a};j.animIn={top:0,left:0};j.animOut={top:k,left:a}};b.fn.cycle.transitions.growX=function(f,e,a){a.before.push(function(c,h,d){b.fn.cycle.commonReset(c,h,d,false,true);d.cssBefore.left=this.cycleW/2;d.animIn={left:0,width:this.cycleW};d.animOut={left:0}});a.cssBefore={width:0,top:0}};b.fn.cycle.transitions.growY=function(f,e,a){a.before.push(function(c,h,d){b.fn.cycle.commonReset(c,h,d,true,false);d.cssBefore.top=this.cycleH/2;d.animIn={top:0,height:this.cycleH};d.animOut={top:0}});a.cssBefore={height:0,left:0}};b.fn.cycle.transitions.curtainX=function(f,e,a){a.before.push(function(c,h,d){b.fn.cycle.commonReset(c,h,d,false,true,true);d.cssBefore.left=h.cycleW/2;d.animIn={left:0,width:this.cycleW};d.animOut={left:c.cycleW/2,width:0}});a.cssBefore={top:0,width:0}};b.fn.cycle.transitions.curtainY=function(f,e,a){a.before.push(function(c,h,d){b.fn.cycle.commonReset(c,h,d,true,false,true);d.cssBefore.top=h.cycleH/2;d.animIn={top:0,height:h.cycleH};d.animOut={top:c.cycleH/2,height:0}});a.cssBefore={left:0,height:0}};b.fn.cycle.transitions.cover=function(j,h,k){var d=k.direction||"left";var a=j.css("overflow","hidden").width();var l=j.height();k.before.push(function(c,f,e){b.fn.cycle.commonReset(c,f,e);if(d=="right"){e.cssBefore.left=-a}else{if(d=="up"){e.cssBefore.top=l}else{if(d=="down"){e.cssBefore.top=-l}else{e.cssBefore.left=a}}}});k.animIn={left:0,top:0};k.animOut={opacity:1};k.cssBefore={top:0,left:0}};b.fn.cycle.transitions.uncover=function(j,h,k){var d=k.direction||"left";var a=j.css("overflow","hidden").width();var l=j.height();k.before.push(function(c,f,e){b.fn.cycle.commonReset(c,f,e,true,true,true);if(d=="right"){e.animOut.left=a}else{if(d=="up"){e.animOut.top=-l}else{if(d=="down"){e.animOut.top=l}else{e.animOut.left=-a}}}});k.animIn={left:0,top:0};k.animOut={opacity:1};k.cssBefore={top:0,left:0}};b.fn.cycle.transitions.toss=function(h,g,j){var a=h.css("overflow","visible").width();var k=h.height();j.before.push(function(c,e,d){b.fn.cycle.commonReset(c,e,d,true,true,true);if(!d.animOut.left&&!d.animOut.top){d.animOut={left:a*2,top:-k/2,opacity:0}}else{d.animOut.opacity=0}});j.cssBefore={left:0,top:0};j.animIn={left:0}};b.fn.cycle.transitions.wipe=function(B,l,y){var a=B.css("overflow","hidden").width();var t=B.height();y.cssBefore=y.cssBefore||{};var w;if(y.clip){if(/l2r/.test(y.clip)){w="rect(0px 0px "+t+"px 0px)"}else{if(/r2l/.test(y.clip)){w="rect(0px "+a+"px "+t+"px "+a+"px)"}else{if(/t2b/.test(y.clip)){w="rect(0px "+a+"px 0px 0px)"}else{if(/b2t/.test(y.clip)){w="rect("+t+"px "+a+"px "+t+"px 0px)"}else{if(/zoom/.test(y.clip)){var d=parseInt(t/2);var x=parseInt(a/2);w="rect("+d+"px "+x+"px "+d+"px "+x+"px)"}}}}}}y.cssBefore.clip=y.cssBefore.clip||w||"rect(0px 0px 0px 0px)";var r=y.cssBefore.clip.match(/(\d+)/g);var A=parseInt(r[0]),z=parseInt(r[1]),h=parseInt(r[2]),v=parseInt(r[3]);y.before.push(function(f,k,j){if(f==k){return}var n=b(f),c=b(k);b.fn.cycle.commonReset(f,k,j,true,true,false);j.cssAfter.display="block";var m=1,e=parseInt((j.speedIn/13))-1;(function g(){var u=A?A-parseInt(m*(A/e)):0;var s=v?v-parseInt(m*(v/e)):0;var q=h<t?h+parseInt(m*((t-h)/e||1)):t;var o=z<a?z+parseInt(m*((a-z)/e||1)):a;c.css({clip:"rect("+u+"px "+o+"px "+q+"px "+s+"px)"});(m++<=e)?setTimeout(g,13):n.css("display","none")})()});y.cssBefore={display:"block",opacity:1,top:0,left:0};y.animIn={left:0};y.animOut={left:0}}})(jQuery);(function(b){var d={};var a=0;b.galleriffic={version:"2.0.1",normalizeHash:function(e){return e.replace(/^.*#/,"").replace(/\?.*$/,"")},getImage:function(e){if(!e){return undefined}e=b.galleriffic.normalizeHash(e);return d[e]},gotoImage:function(g,f){var f=f;var h=b.galleriffic.getImage(g);if(!h){return false}var e=h.gallery;e.gotoImage(h,f);return true},removeImageByHash:function(g,f){var h=b.galleriffic.getImage(g);if(!h){return false}var e=h.gallery;if(f&&f!=e){return false}return e.removeImageByIndex(h.index)}};var c={delay:3000,numThumbs:20,preloadAhead:40,enableTopPager:false,enableBottomPager:true,maxPagesToShow:7,imageContainerSel:"",captionContainerSel:"",controlsContainerSel:"",loadingContainerSel:"",renderSSControls:true,renderNavControls:true,playLinkText:"Play",pauseLinkText:"Pause",prevLinkText:"Previous",nextLinkText:"Next",nextPageLinkText:"Next &rsaquo;",prevPageLinkText:"&lsaquo; Prev",enableHistory:false,enableKeyboardNavigation:true,autoStart:false,syncTransitions:false,defaultTransitionDuration:1000,onSlideChange:undefined,onTransitionOut:undefined,onTransitionIn:undefined,onPageTransitionOut:undefined,onPageTransitionIn:undefined,onImageAdded:undefined,onImageRemoved:undefined};b.fn.galleriffic=function(g){b.extend(this,{version:b.galleriffic.version,isSlideshowRunning:false,slideshowTimeout:undefined,clickHandler:function(n,l,k){this.pause();if(!this.enableHistory){if(b(l).attr("href")=="#first"){b(location).attr("href",firstpage)}else{if(b(l).attr("href")=="#last"){b.cookie("gotofichier","oui");b(location).attr("href",lastpage)}else{var m=b.galleriffic.normalizeHash(b(l).attr("href"));b.galleriffic.gotoImage(m,k);n.preventDefault()}}}},appendImage:function(k){this.addImage(k,false,false);return this},insertImage:function(l,k){this.addImage(l,false,true,k);return this},addImage:function(l,r,v,s){var t=(typeof l==="string")?b(l):l;var m=t.find("a.thumb");var n=m.attr("href");var u=m.attr("title");var q=t.find(".caption").remove();var o=m.attr("name");a++;if(!o||d[""+o]){o=a}if(!v){s=this.data.length}var k={title:u,slideUrl:n,caption:q,hash:o,gallery:this,index:s};if(v){this.data.splice(s,0,k);this.updateIndices(s)}else{this.data.push(k)}var w=this;if(!r){this.updateThumbs(function(){var x=w.find("ul.thumbs");if(v){x.children(":eq("+s+")").before(t)}else{x.append(t)}if(w.onImageAdded){w.onImageAdded(k,t)}})}d[""+o]=k;m.attr("rel","history").attr("href","#"+o).removeAttr("name").click(function(x){w.clickHandler(x,this,"thumb")});return this},removeImageByIndex:function(k){if(k<0||k>=this.data.length){return false}var l=this.data[k];if(!l){return false}this.removeImage(l);return true},removeImageByHash:function(k){return b.galleriffic.removeImageByHash(k,this)},removeImage:function(l){var k=l.index;this.data.splice(k,1);delete d[""+l.hash];this.updateThumbs(function(){var m=e.find("ul.thumbs").children(":eq("+k+")").remove();if(e.onImageRemoved){e.onImageRemoved(l,m)}});this.updateIndices(k);return this},updateIndices:function(k){for(i=k;i<this.data.length;i++){this.data[i].index=i}return this},initializeThumbs:function(){this.data=[];var k=this;this.find("ul.thumbs > li").each(function(l){k.addImage(b(this),true,false)});return this},isPreloadComplete:false,preloadRelocate:function(k){this.preloadStartIndex=k;return this},preloadRecursive:function(q,m){if(q!=this.preloadStartIndex){var k=this.getNextIndex(this.preloadStartIndex);return this.preloadRecursive(this.preloadStartIndex,k)}var l=this;var n=m-q;if(n<0){n=this.data.length-1-q+m}if(this.preloadAhead>=0&&n>this.preloadAhead){setTimeout(function(){l.preloadRecursive(q,m)},500);return this}var r=this.data[m];if(!r){return this}if(r.image){return this.preloadNext(q,m)}var o=new Image();o.onload=function(){r.image=this;l.preloadNext(q,m)};o.alt=r.title;o.src=r.slideUrl;return this},preloadNext:function(n,m){var k=this.getNextIndex(m);if(k==n){this.isPreloadComplete=true}else{var l=this;setTimeout(function(){l.preloadRecursive(n,k)},100)}return this},getNextIndex:function(l){var k=l+1;this.goNextPage=false;if(k>=this.data.length){k=0;this.goNextPage=true}return k},getPrevIndex:function(k){var l=k-1;this.goPrevPage=false;if(l<0){this.goPrevPage=true;l=this.data.length-1}this.goNextPage=false;return l},getFirstIndex:function(){return 0},getLastIndex:function(){return a},pause:function(){this.isSlideshowRunning=false;if(this.slideshowTimeout){clearTimeout(this.slideshowTimeout);this.slideshowTimeout=undefined}if(this.$controlsContainer){this.$controlsContainer.find("div.ss-controls a").removeClass().addClass("play").attr("title",this.playLinkText).attr("href","#play").html(this.playLinkText)}return this},play:function(){this.isSlideshowRunning=true;if(this.$controlsContainer){this.$controlsContainer.find("div.ss-controls a").removeClass().addClass("pause").attr("title",this.pauseLinkText).attr("href","#pause").html(this.pauseLinkText)}if(!this.slideshowTimeout){var k=this;this.slideshowTimeout=setTimeout(function(){k.ssAdvance()},this.delay)}return this},toggleSlideshow:function(){if(this.isSlideshowRunning){this.pause()}else{this.play()}return this},ssAdvance:function(){if(this.isSlideshowRunning){this.next(true)}return this},next:function(k,l){this.gotoIndex(this.getNextIndex(this.currentImage.index),k,l);return this},previous:function(k,l){this.gotoIndex(this.getPrevIndex(this.currentImage.index),k,l);return this},nextPage:function(l,q){var n=this.getCurrentPage();var m=this.getNumPages()-1;if(n<m){var o=n*this.numThumbs;var k=o+this.numThumbs;this.gotoIndex(k,l,q)}return this},previousPage:function(k,o){var m=this.getCurrentPage();if(m>0){var n=m*this.numThumbs;var l=n-this.numThumbs;this.gotoIndex(l,k,o)}return this},gotoIndex:function(l,k,m){if(!k){this.pause()}if(l<0){l=0}else{if(l>=this.data.length){l=this.data.length-1}}var n=this.data[l];if(!m&&this.enableHistory){b.historyLoad(String(n.hash))}else{this.gotoImage(n)}return this},gotoImage:function(m,l){var k=m.index;if(l!="thumb"){if(k==0&&this.goNextPage){if(nbpagecourante!=nbpagestotal){b(location).attr("href",nextpage)}else{if(this.onSlideChange){this.onSlideChange(this.currentImage.index,k)}this.currentImage=m;this.preloadRelocate(k);this.refresh()}}else{if(k==this.data.length-1&&this.goPrevPage){if(nbpagecourante!=1){b.cookie("gotofichier","oui");b(location).attr("href",prevpage)}else{if(this.onSlideChange){this.onSlideChange(this.currentImage.index,k)}this.currentImage=m;this.preloadRelocate(k);this.refresh()}}else{if(this.onSlideChange){this.onSlideChange(this.currentImage.index,k)}this.currentImage=m;this.preloadRelocate(k);this.refresh()}}}else{if(this.onSlideChange){this.onSlideChange(this.currentImage.index,k)}this.currentImage=m;this.preloadRelocate(k);this.refresh()}return this},getDefaultTransitionDuration:function(k){if(k){return this.defaultTransitionDuration}return this.defaultTransitionDuration/2},refresh:function(){if(b.cookie("gotofichier")!=null){var o=b.galleriffic.normalizeHash("#"+a);b.cookie("gotofichier",null);b.galleriffic.gotoImage(o,"other")}var k=this.currentImage;if(!k){return this}var q=k.index;document.getElementById("informations-fichier").innerHTML=fichier+" "+((this.numThumbs*(nbpagecourante-1))+q+1)+" "+sur+" "+nbfichiers;if(this.$controlsContainer){this.$controlsContainer.find("div.nav-controls a.first").attr("href","#"+this.data[this.getFirstIndex()].hash).end().find("div.nav-controls a.last").attr("href","#"+this.data[this.getLastIndex()-1].hash).end().find("div.nav-controls a.prev").attr("href","#"+this.data[this.getPrevIndex(q)].hash).end().find("div.nav-controls a.next").attr("href","#"+this.data[this.getNextIndex(q)].hash)}if(this.$controlsContainer){this.$controlsContainer.find("div.nav-controls a.first").attr("href","#first")}if(this.$controlsContainer){this.$controlsContainer.find("div.nav-controls a.last").attr("href","#last")}var t=this.$imageContainer.find("span.current").addClass("previous").removeClass("current");var s=0;if(this.$captionContainer){s=this.$captionContainer.find("span.current").addClass("previous").removeClass("current")}var n=this.syncTransitions&&k.image;var l=true;var u=this;var r=function(){l=false;t.remove();if(s){s.remove()}if(!n){if(k.image&&k.hash==u.data[u.currentImage.index].hash){u.buildImage(k,n)}else{if(u.$loadingContainer){u.$loadingContainer.show()}}}};r();if(n){this.buildImage(k,n)}if(!k.image){var m=new Image();m.onload=function(){k.image=this;if(!l&&k.hash==u.data[u.currentImage.index].hash){u.buildImage(k,n)}};m.alt=k.title;m.src=k.slideUrl}this.relocatePreload=true;return this.syncThumbs()},buildImage:function(r,o){var m=this;var k=this.getNextIndex(r.index);var n=r.slideUrl.replace("FICHIERS_AFFICHAGE","FICHIERS_ZOOM");var l=this.$imageContainer.append('<span class="image-wrapper current"><a class="MagicMagnifyPlus" rel="magnifier:square;" href="'+n+'" title="'+r.title+'">&nbsp;</a></span>').find("span.current").css("opacity","1");l.find("a").append(r.image).click(function(s){if(k==0){b(location).attr("href",nextpage)}else{m.clickHandler(s,this,"other")}});var q=0;if(this.$captionContainer){q=this.$captionContainer.append('<span class="image-caption current"></span>').find("span.current").css("opacity","0").append(r.caption)}if(this.$loadingContainer){this.$loadingContainer.hide()}if(this.onTransitionIn){this.onTransitionIn(l,q,o)}else{l.fadeTo(this.getDefaultTransitionDuration(o),1);if(q){q.fadeTo(this.getDefaultTransitionDuration(o),1)}}if(this.isSlideshowRunning){if(this.slideshowTimeout){clearTimeout(this.slideshowTimeout)}this.slideshowTimeout=setTimeout(function(){m.ssAdvance()},this.delay)}return this},getCurrentPage:function(){return Math.floor(this.currentImage.index/this.numThumbs)},syncThumbs:function(){var l=this.getCurrentPage();if(l!=this.displayedPage){this.updateThumbs()}var k=this.find("ul.thumbs").children();k.filter(".selected").removeClass("selected");k.eq(this.currentImage.index).addClass("selected");b("#infos-fichier-motsclefs").load(motsclefsfichier,{id_fichier:k.eq(this.currentImage.index).attr("id")});b("#infos-fichier-infos").load(infosfichier,{id_fichier:k.eq(this.currentImage.index).attr("id")});b("#infos-fichier-geo").load(geofichier,{id_fichier:k.eq(this.currentImage.index).attr("id")});return this},updateThumbs:function(k){var l=this;var m=function(){if(k){k()}l.rebuildThumbs();if(l.onPageTransitionIn){l.onPageTransitionIn()}else{l.show()}};if(this.onPageTransitionOut){this.onPageTransitionOut(m)}else{this.hide();m()}return this},rebuildThumbs:function(){var m=this.data.length>this.numThumbs;if(this.enableTopPager){var k=this.find("div.top");if(k.length==0){k=this.prepend('<div class="top pagination"></div>').find("div.top")}else{k.empty()}if(m){this.buildPager(k)}}if(this.enableBottomPager){var o=this.find("div.bottom");if(o.length==0){o=this.append('<div class="bottom pagination"></div>').find("div.bottom")}else{o.empty()}if(m){this.buildPager(o)}}var q=this.getCurrentPage();var r=q*this.numThumbs;var l=r+this.numThumbs-1;if(l>=this.data.length){l=this.data.length-1}var n=this.find("ul.thumbs");n.find("li").each(function(s){var t=b(this);if(s>=r&&s<=l){t.show()}else{t.hide()}});this.displayedPage=q;n.removeClass("noscript");return this},getNumPages:function(){return Math.ceil(this.data.length/this.numThumbs)},buildPager:function(m){var v=this;var l=this.getNumPages();var o=this.getCurrentPage();var t=o*this.numThumbs;var k=this.maxPagesToShow-1;var q=o-Math.floor((this.maxPagesToShow-1)/2)+1;if(q>0){var u=l-q;if(u<k){q=q-(k-u)}}if(q<0){q=0}if(o>0){var n=t-this.numThumbs;m.append('<a rel="history" href="#'+this.data[n].hash+'" title="'+this.prevPageLinkText+'">'+this.prevPageLinkText+"</a>")}if(q>0){this.buildPageLink(m,0,l);if(q>1){m.append('<span class="ellipsis">&hellip;</span>')}k--}while(k>0){this.buildPageLink(m,q,l);k--;q++}if(q<l){var s=l-1;if(q<s){m.append('<span class="ellipsis">&hellip;</span>')}this.buildPageLink(m,s,l)}var r=t+this.numThumbs;if(r<this.data.length){m.append('<a rel="history" href="#'+this.data[r].hash+'" title="'+this.nextPageLinkText+'">'+this.nextPageLinkText+"</a>")}m.find("a").click(function(w){v.clickHandler(w,this,"other")});return this},buildPageLink:function(m,q,n){var l=q+1;var o=this.getCurrentPage();if(q==o){m.append('<span class="current">'+l+"</span>")}else{if(q<n){var k=q*this.numThumbs;m.append('<a rel="history" href="#'+this.data[k].hash+'" title="'+l+'">'+l+"</a>")}}return this}});b.extend(this,c,g);if(this.enableHistory&&!b.historyInit){this.enableHistory=false}if(this.imageContainerSel){this.$imageContainer=b(this.imageContainerSel)}if(this.captionContainerSel){this.$captionContainer=b(this.captionContainerSel)}if(this.loadingContainerSel){this.$loadingContainer=b(this.loadingContainerSel)}this.initializeThumbs();if(this.maxPagesToShow<3){this.maxPagesToShow=3}this.displayedPage=-1;this.currentImage=this.data[0];var e=this;if(this.$loadingContainer){this.$loadingContainer.hide()}if(this.controlsContainerSel){this.$controlsContainer=b(this.controlsContainerSel).empty();if(this.renderSSControls){if(this.autoStart){this.$controlsContainer.append('<div class="ss-controls"><a href="#pause" class="pause" title="'+this.pauseLinkText+'">'+this.pauseLinkText+"</a></div>")}else{this.$controlsContainer.append('<div class="ss-controls"><a href="#play" class="play" title="'+this.playLinkText+'">'+this.playLinkText+"</a></div>")}this.$controlsContainer.find("div.ss-controls a").click(function(k){e.toggleSlideshow();k.preventDefault();return false})}if(this.renderNavControls){this.$controlsContainer.append('<div class="nav-controls"><table border="0" align="center"><tr><td><a class="first" rel="history" title="'+this.firstLinkText+'"><img src="/images/icones/first.png" border="0"/></a></td><td><a class="prev" rel="history" title="'+this.prevLinkText+'"><img src="/images/icones/prev.png" border="0"/></a></td><td id="informations-fichier"></td><td><a class="next" rel="history" title="'+this.nextLinkText+'"><img src="/images/icones/next.png" border="0"/></a></td><td><a class="last" rel="history" title="'+this.lastLinkText+'"><img src="/images/icones/last.png" border="0"/></a></td></tr></table></div>').find("div.nav-controls a").click(function(k){e.clickHandler(k,this,"other")})}}var f=!this.enableHistory||!location.hash;if(this.enableHistory&&location.hash){var h=b.galleriffic.normalizeHash(location.hash);var j=d[h];if(!j){f=true}}if(f){this.gotoIndex(0,false,true)}if(this.autoStart){this.play()}return this}})(jQuery);jQuery.extend({historyCurrentHash:undefined,historyCallback:undefined,historyIframeSrc:undefined,historyInit:function(e,d){jQuery.historyCallback=e;if(d){jQuery.historyIframeSrc=d}var c=location.hash.replace(/\?.*$/,"");jQuery.historyCurrentHash=c;if(jQuery.browser.msie){if(jQuery.historyCurrentHash==""){jQuery.historyCurrentHash="#"}jQuery("body").prepend('<iframe id="jQuery_history" style="display: none;"'+(jQuery.historyIframeSrc?' src="'+jQuery.historyIframeSrc+'"':"")+"></iframe>");var a=jQuery("#jQuery_history")[0];var b=a.contentWindow.document;b.open();b.close();b.location.hash=c}else{if(jQuery.browser.safari){jQuery.historyBackStack=[];jQuery.historyBackStack.length=history.length;jQuery.historyForwardStack=[];jQuery.lastHistoryLength=history.length;jQuery.isFirst=true}}if(c){jQuery.historyCallback(c.replace(/^#/,""))}setInterval(jQuery.historyCheck,100)},historyAddHistory:function(a){jQuery.historyBackStack.push(a);jQuery.historyForwardStack.length=0;this.isFirst=true},historyCheck:function(){if(jQuery.browser.msie){var a=jQuery("#jQuery_history")[0];var d=a.contentDocument||a.contentWindow.document;var f=d.location.hash.replace(/\?.*$/,"");if(f!=jQuery.historyCurrentHash){location.hash=f;jQuery.historyCurrentHash=f;jQuery.historyCallback(f.replace(/^#/,""))}}else{if(jQuery.browser.safari){if(jQuery.lastHistoryLength==history.length&&jQuery.historyBackStack.length>jQuery.lastHistoryLength){jQuery.historyBackStack.shift()}if(!jQuery.dontCheck){var b=history.length-jQuery.historyBackStack.length;jQuery.lastHistoryLength=history.length;if(b){jQuery.isFirst=false;if(b<0){for(var c=0;c<Math.abs(b);c++){jQuery.historyForwardStack.unshift(jQuery.historyBackStack.pop())}}else{for(var c=0;c<b;c++){jQuery.historyBackStack.push(jQuery.historyForwardStack.shift())}}var e=jQuery.historyBackStack[jQuery.historyBackStack.length-1];if(e!=undefined){jQuery.historyCurrentHash=location.hash.replace(/\?.*$/,"");jQuery.historyCallback(e)}}else{if(jQuery.historyBackStack[jQuery.historyBackStack.length-1]==undefined&&!jQuery.isFirst){if(location.hash){var f=location.hash;jQuery.historyCallback(location.hash.replace(/^#/,""))}else{var f="";jQuery.historyCallback("")}jQuery.isFirst=true}}}}else{var f=location.hash.replace(/\?.*$/,"");if(f!=jQuery.historyCurrentHash){jQuery.historyCurrentHash=f;jQuery.historyCallback(f.replace(/^#/,""))}}}},historyLoad:function(d){var e;d=decodeURIComponent(d.replace(/\?.*$/,""));if(jQuery.browser.safari){e=d}else{e="#"+d;location.hash=e}jQuery.historyCurrentHash=e;if(jQuery.browser.msie){var a=jQuery("#jQuery_history")[0];var c=a.contentWindow.document;c.open();c.close();c.location.hash=e;jQuery.lastHistoryLength=history.length;jQuery.historyCallback(d)}else{if(jQuery.browser.safari){jQuery.dontCheck=true;this.historyAddHistory(d);var b=function(){jQuery.dontCheck=false};window.setTimeout(b,200);jQuery.historyCallback(d);location.hash=e}else{jQuery.historyCallback(d)}}}});eval(function(h,b,l,f,g,j){g=function(a){return(a<b?"":g(parseInt(a/b)))+((a=a%b)>35?String.fromCharCode(a+29):a.toString(36))};if(!"".replace(/^/,String)){while(l--){j[g(l)]=f[l]||g(l)}f=[function(a){return j[a]}];g=function(){return"\\w+"};l=1}while(l--){if(f[l]){h=h.replace(new RegExp("\\b"+g(l)+"\\b","g"),f[l])}}return h}("(9($){$.1k.1o=9(2b){b 3=$.2g({},$.1k.1o.21,2b);N g.H(9(){b 4={f:0,u:'',W:0,r:'',L:n,1j:n,1S:n};b 5=$(g);5.1T('7:4',4);5.e('2o','2m');5.1f('1o');b d=5.2n();d.H(9(){b l=$(g);b 1t='';6(!l.J('B')){6(l.J('a')){l.1f('7-2h');1t=l}l=l.1m('B:1r')}b 18=l.x();6(18==0)18=l.t('x');b 1b=l.y();6(1b==0)1b=l.t('y');6(18>5.x()){5.x(18)}6(1b>5.y()){5.y(1b)}6(1t!=''){1t.e('P','1q')}l.e('P','1q');4.W++});6(3.19>0){6(3.19>=4.W)3.19=4.W-1;4.f=3.19}6($(d[4.f]).J('B')){4.u=$(d[4.f])}k{4.u=$(d[4.f]).1m('B:1r')}6($(d[4.f]).J('a')){$(d[4.f]).e('P','1A')}5.e('11','10('+4.u.t('E')+') Z-Y');23(b i=0;i<3.h;i++){b G=U.29(5.x()/3.h);6(i==3.h-1){5.O($('<D A=\"7-c\"></D>').e({2a:(G*i)+'1c',x:(5.x()-(G*i))+'1c'}))}k{5.O($('<D A=\"7-c\"></D>').e({2a:(G*i)+'1c',x:G+'1c'}))}}5.O($('<D A=\"7-K\"><p></p></D>').e({P:'1q',z:3.1U}));6(4.u.t('w')!=''){b w=4.u.t('w');6(w.24(0,1)=='#')w=$(w).1d();$('.7-K p',5).1d(w);$('.7-K',5).1z(3.o)}b m=0;6(!3.1p&&d.1g>1){m=1E(9(){F(5,d,3,n)},3.1u)}6(3.S){5.O('<D A=\"7-S\"><a A=\"7-27\">2k</a><a A=\"7-25\">2i</a></D>');6(3.1R){$('.7-S',5).26();5.1V(9(){$('.7-S',5).2j()},9(){$('.7-S',5).26()})}$('a.7-27',5).1C('1F',9(){6(4.L)N n;T(m);m='';4.f-=2;F(5,d,3,'1y')});$('a.7-25',5).1C('1F',9(){6(4.L)N n;T(m);m='';F(5,d,3,'1x')})}6(3.M){b 14=$('<D A=\"7-M\"></D>');5.O(14);23(b i=0;i<d.1g;i++){6(3.1P){b l=d.1B(i);6(!l.J('B')){l=l.1m('B:1r')}6(3.1O){14.O('<a A=\"7-1s\" 1a=\"'+i+'\"><B E=\"'+l.t('1a')+'\" 2e=\"\" /></a>')}k{14.O('<a A=\"7-1s\" 1a=\"'+i+'\"><B E=\"'+l.t('E').2l(3.1M,3.1N)+'\" 2e=\"\" /></a>')}}k{14.O('<a A=\"7-1s\" 1a=\"'+i+'\">'+(i+1)+'</a>')}}$('.7-M a:1B('+4.f+')',5).1f('1h');$('.7-M a',5).1C('1F',9(){6(4.L)N n;6($(g).2f('1h'))N n;T(m);m='';5.e('11','10('+4.u.t('E')+') Z-Y');4.f=$(g).t('1a')-1;F(5,d,3,'1s')})}6(3.1X){$(2s).2F(9(1D){6(1D.1Q=='2D'){6(4.L)N n;T(m);m='';4.f-=2;F(5,d,3,'1y')}6(1D.1Q=='2C'){6(4.L)N n;T(m);m='';F(5,d,3,'1x')}})}6(3.1W){5.1V(9(){4.1j=Q;T(m);m=''},9(){4.1j=n;6(m==''&&!3.1p){m=1E(9(){F(5,d,3,n)},3.1u)}})}5.2E('7:X',9(){4.L=n;$(d).H(9(){6($(g).J('a')){$(g).e('P','1q')}});6($(d[4.f]).J('a')){$(d[4.f]).e('P','1A')}6(m==''&&!4.1j&&!3.1p){m=1E(9(){F(5,d,3,n)},3.1u)}3.20.1w(g)})});9 F(5,d,3,17){b 4=5.1T('7:4');6((!4||4.1S)&&!17)N n;3.1Y.1w(g);6(!17){5.e('11','10('+4.u.t('E')+') Z-Y')}k{6(17=='1y'){5.e('11','10('+4.u.t('E')+') Z-Y')}6(17=='1x'){5.e('11','10('+4.u.t('E')+') Z-Y')}}4.f++;6(4.f==4.W){4.f=0;3.2d.1w(g)}6(4.f<0)4.f=(4.W-1);6($(d[4.f]).J('B')){4.u=$(d[4.f])}k{4.u=$(d[4.f]).1m('B:1r')}6(3.M){$('.7-M a',5).2B('1h');$('.7-M a:1B('+4.f+')',5).1f('1h')}6(4.u.t('w')!=''){b w=4.u.t('w');6(w.24(0,1)=='#')w=$(w).1d();6($('.7-K',5).e('P')=='1A'){$('.7-K p',5).2c(3.o,9(){$(g).1d(w);$(g).1z(3.o)})}k{$('.7-K p',5).1d(w)}$('.7-K',5).1z(3.o)}k{$('.7-K',5).2c(3.o)}b i=0;$('.7-c',5).H(9(){b G=U.29(5.x()/3.h);$(g).e({y:'R',z:'0',11:'10('+4.u.t('E')+') Z-Y -'+((G+(i*G))-G)+'1c 0%'});i++});6(3.j=='1l'){b V=2H 2G(\"1K\",\"12\",\"1H\",\"1e\",\"1G\",\"13\",\"1I\",\"1v\");4.r=V[U.22(U.1l()*(V.1g+1))];6(4.r==2I)4.r='1v'}6(3.j.2p(',')!=-1){b V=3.j.2t(',');4.r=$.2A(V[U.22(U.1l()*V.1g)])}4.L=Q;6(3.j=='2r'||3.j=='1K'||4.r=='1K'||3.j=='12'||4.r=='12'){b q=0;b i=0;b h=$('.7-c',5);6(3.j=='12'||4.r=='12')h=$('.7-c',5).1n();h.H(9(){b c=$(g);c.e('1L','R');6(i==3.h-1){I(9(){c.C({y:'s%',z:'1.0'},3.o,'',9(){5.16('7:X')})},(s+q))}k{I(9(){c.C({y:'s%',z:'1.0'},3.o)},(s+q))}q+=1i;i++})}k 6(3.j=='2q'||3.j=='1H'||4.r=='1H'||3.j=='1e'||4.r=='1e'){b q=0;b i=0;b h=$('.7-c',5);6(3.j=='1e'||4.r=='1e')h=$('.7-c',5).1n();h.H(9(){b c=$(g);c.e('28','R');6(i==3.h-1){I(9(){c.C({y:'s%',z:'1.0'},3.o,'',9(){5.16('7:X')})},(s+q))}k{I(9(){c.C({y:'s%',z:'1.0'},3.o)},(s+q))}q+=1i;i++})}k 6(3.j=='1G'||3.j=='2u'||4.r=='1G'||3.j=='13'||4.r=='13'){b q=0;b i=0;b v=0;b h=$('.7-c',5);6(3.j=='13'||4.r=='13')h=$('.7-c',5).1n();h.H(9(){b c=$(g);6(i==0){c.e('1L','R');i++}k{c.e('28','R');i=0}6(v==3.h-1){I(9(){c.C({y:'s%',z:'1.0'},3.o,'',9(){5.16('7:X')})},(s+q))}k{I(9(){c.C({y:'s%',z:'1.0'},3.o)},(s+q))}q+=1i;v++})}k 6(3.j=='1I'||4.r=='1I'){b q=0;b i=0;$('.7-c',5).H(9(){b c=$(g);b 1J=c.x();c.e({1L:'R',y:'s%',x:'R'});6(i==3.h-1){I(9(){c.C({x:1J,z:'1.0'},3.o,'',9(){5.16('7:X')})},(s+q))}k{I(9(){c.C({x:1J,z:'1.0'},3.o)},(s+q))}q+=1i;i++})}k 6(3.j=='1v'||4.r=='1v'){b i=0;$('.7-c',5).H(9(){$(g).e('y','s%');6(i==3.h-1){$(g).C({z:'1.0'},(3.o*2),'',9(){5.16('7:X')})}k{$(g).C({z:'1.0'},(3.o*2))}i++})}}};$.1k.1o.21={j:'1l',h:15,o:2v,1u:2y,19:0,S:Q,1R:Q,M:Q,1P:n,1O:n,1M:'.1Z',1N:'2x.1Z',1X:Q,1W:Q,1p:n,1U:0.8,1Y:9(){},20:9(){},2d:9(){}};$.1k.1n=[].2w})(2z);",62,169,"|||settings|vars|slider|if|nivo||function||var|slice|kids|css|currentSlide|this|slices||effect|else|child|timer|false|animSpeed||timeBuff|randAnim|100|attr|currentImage||title|width|height|opacity|class|img|animate|div|src|nivoRun|sliceWidth|each|setTimeout|is|caption|running|controlNav|return|append|display|true|0px|directionNav|clearInterval|Math|anims|totalSlides|animFinished|repeat|no|url|background|sliceDownLeft|sliceUpDownLeft|nivoControl||trigger|nudge|childWidth|startSlide|rel|childHeight|px|html|sliceUpLeft|addClass|length|active|50|paused|fn|random|find|_reverse|nivoSlider|manualAdvance|none|first|control|link|pauseTime|fade|call|next|prev|fadeIn|block|eq|live|event|setInterval|click|sliceUpDown|sliceUpRight|fold|origWidth|sliceDownRight|top|controlNavThumbsSearch|controlNavThumbsReplace|controlNavThumbsFromRel|controlNavThumbs|keyCode|directionNavHide|stop|data|captionOpacity|hover|pauseOnHover|keyboardNav|beforeChange|jpg|afterChange|defaults|floor|for|substr|nextNav|hide|prevNav|bottom|round|left|options|fadeOut|slideshowEnd|alt|hasClass|extend|imageLink|Next|show|Prev|replace|relative|children|position|indexOf|sliceUp|sliceDown|window|split|sliceUpDownRight|500|reverse|_thumb|3000|jQuery|trim|removeClass|39|37|bind|keypress|Array|new|undefined".split("|"),0,{}));(function(a){var b={mouseOutOpacity:1,mouseOverOpacity:0.85,fadeSpeed:300,exemptionSelector:".selected"};a.fn.opacityrollover=function(d){a.extend(this,b,d);var c=this;function e(h,g){var f=a(h);if(c.exemptionSelector){f=f.not(c.exemptionSelector)}f.fadeTo(c.fadeSpeed,g)}this.css("opacity",this.mouseOutOpacity).hover(function(){e(this,c.mouseOverOpacity)},function(){e(this,c.mouseOutOpacity)});return this}})(jQuery);jQuery.tableDnD={currentTable:null,dragObject:null,mouseOffset:null,oldY:0,build:function(a){this.each(function(){this.tableDnDConfig=jQuery.extend({onDragStyle:null,onDropStyle:null,onDragClass:"tDnD_whileDrag",onDrop:null,onDragStart:null,scrollAmount:5,serializeRegexp:/[^\-]*$/,serializeParamName:null,dragHandle:null},a||{});jQuery.tableDnD.makeDraggable(this)});jQuery(document).bind("mousemove",jQuery.tableDnD.mousemove).bind("mouseup",jQuery.tableDnD.mouseup);return this},makeDraggable:function(c){var b=c.tableDnDConfig;if(c.tableDnDConfig.dragHandle){var a=jQuery("td."+c.tableDnDConfig.dragHandle,c);a.each(function(){jQuery(this).mousedown(function(e){jQuery.tableDnD.dragObject=this.parentNode;jQuery.tableDnD.currentTable=c;jQuery.tableDnD.mouseOffset=jQuery.tableDnD.getMouseOffset(this,e);if(b.onDragStart){b.onDragStart(c,this)}return false})})}else{var d=jQuery("tr",c);d.each(function(){var e=jQuery(this);if(!e.hasClass("nodrag")){e.mousedown(function(f){if(f.target.tagName=="TD"){jQuery.tableDnD.dragObject=this;jQuery.tableDnD.currentTable=c;jQuery.tableDnD.mouseOffset=jQuery.tableDnD.getMouseOffset(this,f);if(b.onDragStart){b.onDragStart(c,this)}return false}}).css("cursor","move")}})}},updateTables:function(){this.each(function(){if(this.tableDnDConfig){jQuery.tableDnD.makeDraggable(this)}})},mouseCoords:function(a){if(a.pageX||a.pageY){return{x:a.pageX,y:a.pageY}}return{x:a.clientX+document.body.scrollLeft-document.body.clientLeft,y:a.clientY+document.body.scrollTop-document.body.clientTop}},getMouseOffset:function(d,c){c=c||window.event;var b=this.getPosition(d);var a=this.mouseCoords(c);return{x:a.x-b.x,y:a.y-b.y}},getPosition:function(c){var b=0;var a=0;if(c.offsetHeight==0){c=c.firstChild}while(c.offsetParent){b+=c.offsetLeft;a+=c.offsetTop;c=c.offsetParent}b+=c.offsetLeft;a+=c.offsetTop;return{x:b,y:a}},mousemove:function(g){if(jQuery.tableDnD.dragObject==null){return}var d=jQuery(jQuery.tableDnD.dragObject);var b=jQuery.tableDnD.currentTable.tableDnDConfig;var j=jQuery.tableDnD.mouseCoords(g);var f=j.y-jQuery.tableDnD.mouseOffset.y;var c=window.pageYOffset;if(document.all){if(typeof document.compatMode!="undefined"&&document.compatMode!="BackCompat"){c=document.documentElement.scrollTop}else{if(typeof document.body!="undefined"){c=document.body.scrollTop}}}if(j.y-c<b.scrollAmount){window.scrollBy(0,-b.scrollAmount)}else{var a=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight;if(a-(j.y-c)<b.scrollAmount){window.scrollBy(0,b.scrollAmount)}}if(f!=jQuery.tableDnD.oldY){var e=f>jQuery.tableDnD.oldY;jQuery.tableDnD.oldY=f;if(b.onDragClass){d.addClass(b.onDragClass)}else{d.css(b.onDragStyle)}var h=jQuery.tableDnD.findDropTargetRow(d,f);if(h){if(e&&jQuery.tableDnD.dragObject!=h){jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject,h.nextSibling)}else{if(!e&&jQuery.tableDnD.dragObject!=h){jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject,h)}}}}return false},findDropTargetRow:function(f,g){var j=jQuery.tableDnD.currentTable.rows;for(var e=0;e<j.length;e++){var h=j[e];var b=this.getPosition(h).y;var a=parseInt(h.offsetHeight)/2;if(h.offsetHeight==0){b=this.getPosition(h.firstChild).y;a=parseInt(h.firstChild.offsetHeight)/2}if((g>b-a)&&(g<(b+a))){if(h==f){return null}var c=jQuery.tableDnD.currentTable.tableDnDConfig;if(c.onAllowDrop){if(c.onAllowDrop(f,h)){return h}else{return null}}else{var d=jQuery(h).hasClass("nodrop");if(!d){return h}else{return null}}return h}}return null},mouseup:function(c){if(jQuery.tableDnD.currentTable&&jQuery.tableDnD.dragObject){var b=jQuery.tableDnD.dragObject;var a=jQuery.tableDnD.currentTable.tableDnDConfig;if(a.onDragClass){jQuery(b).removeClass(a.onDragClass)}else{jQuery(b).css(a.onDropStyle)}jQuery.tableDnD.dragObject=null;if(a.onDrop){a.onDrop(jQuery.tableDnD.currentTable,b)}jQuery.tableDnD.currentTable=null}},serialize:function(){if(jQuery.tableDnD.currentTable){return jQuery.tableDnD.serializeTable(jQuery.tableDnD.currentTable)}else{return"Error: No Table id set, you need to set an id on your table and every row"}},serializeTable:function(d){var a="";var c=d.id;var e=d.rows;for(var b=0;b<e.length;b++){if(a.length>0){a+="&"}var f=e[b].id;if(f&&f&&d.tableDnDConfig&&d.tableDnDConfig.serializeRegexp){f=f.match(d.tableDnDConfig.serializeRegexp)[0]}a+=c+"[]="+f}return a},serializeTables:function(){var a="";this.each(function(){a+=jQuery.tableDnD.serializeTable(this)});return a}};jQuery.fn.extend({tableDnD:jQuery.tableDnD.build,tableDnDUpdate:jQuery.tableDnD.updateTables,tableDnDSerialize:jQuery.tableDnD.serializeTables});(function(d){d.tinysort={id:"TinySort",version:"1.0.4",defaults:{order:"asc",attr:"",place:"start",returns:false}};d.fn.extend({tinysort:function(y,x){if(y&&typeof(y)!="string"){x=y;y=null}var B=d.extend({},d.tinysort.defaults,x);var c={};this.each(function(j){var g=(!y||y=="")?d(this):d(this).find(y);var h=B.order=="rand"?""+Math.random():(B.attr==""?g.text():g.attr(B.attr));var k=d(this).parent();if(!c[k]){c[k]={s:[],n:[]}}if(g.length>0){c[k].s.push({s:h,e:d(this),n:j})}else{c[k].n.push({e:d(this),n:j})}});for(var z in c){var C=c[z];C.s.sort(function w(j,k){var h=j.s.toLowerCase?j.s.toLowerCase():j.s;var g=k.s.toLowerCase?k.s.toLowerCase():k.s;if(f(j.s)&&f(k.s)){h=parseFloat(j.s);g=parseFloat(k.s)}return(B.order=="asc"?1:-1)*(h<g?-1:(h>g?1:0))})}var u=[];for(var z in c){var C=c[z];var t=[];var A=d(this).length;switch(B.place){case"first":d.each(C.s,function(h,g){A=Math.min(A,g.n)});break;case"org":d.each(C.s,function(h,g){t.push(g.n)});break;case"end":A=C.n.length;break;default:A=0}var b=[0,0];for(var v=0;v<d(this).length;v++){var s=v>=A&&v<A+C.s.length;if(e(t,v)){s=true}var a=(s?C.s:C.n)[b[s?0:1]].e;a.parent().append(a);if(s||!B.returns){u.push(a.get(0))}b[s?0:1]++}}return this.pushStack(u)}});function f(a){var b=/^\s*?[\+-]?(\d*\.?\d*?)\s*?$/.exec(a);return b&&b.length>0?b[1]:false}function e(b,a){var c=false;d.each(b,function(j,k){if(!c){c=k==a}});return c}d.fn.TinySort=d.fn.Tinysort=d.fn.tsort=d.fn.tinysort})(jQuery);(function(a){a.extend(a.fn,{swapClass:function(e,d){var c=this.filter("."+e);this.filter("."+d).removeClass(d).addClass(e);c.removeClass(e).addClass(d);return this},replaceClass:function(d,c){return this.filter("."+d).removeClass(d).addClass(c).end()},hoverClass:function(c){c=c||"hover";return this.hover(function(){a(this).addClass(c)},function(){a(this).removeClass(c)})},heightToggle:function(c,d){c?this.animate({height:"toggle"},c,d):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();if(d){d.apply(this,arguments)}})},heightHide:function(c,d){if(c){this.animate({height:"hide"},c,d)}else{this.hide();if(d){this.each(d)}}},prepareBranches:function(c){if(!c.prerendered){this.filter(":last-child:not(ul)").addClass(b.last);this.filter((c.collapsed?"":"."+b.closed)+":not(."+b.open+")").find(">ul").hide()}return this.filter(":has(>ul)")},applyClasses:function(c,d){this.filter(":has(>ul):not(:has(>a))").find(">span").click(function(e){d.apply(a(this).next())}).add(a("a",this)).hoverClass();if(!c.prerendered){this.filter(":has(>ul:hidden)").addClass(b.expandable).replaceClass(b.last,b.lastExpandable);this.not(":has(>ul:hidden)").addClass(b.collapsable).replaceClass(b.last,b.lastCollapsable);this.prepend('<div class="'+b.hitarea+'"/>').find("div."+b.hitarea).each(function(){var e="";a.each(a(this).parent().attr("class").split(" "),function(){e+=this+"-hitarea "});a(this).addClass(e)})}this.find("div."+b.hitarea).click(d)},treeview:function(d){d=a.extend({cookieId:"treeview"},d);if(d.add){return this.trigger("add",[d.add])}if(d.toggle){var j=d.toggle;d.toggle=function(){return j.apply(a(this).parent()[0],arguments)}}function c(m,o){function n(q){return function(){f.apply(a("div."+b.hitarea,m).filter(function(){return q?a(this).parent("."+q).length:true}));return false}}a("a:eq(0)",o).click(n(b.collapsable));a("a:eq(1)",o).click(n(b.expandable));a("a:eq(2)",o).click(n())}function f(){a(this).parent().find(">.hitarea").swapClass(b.collapsableHitarea,b.expandableHitarea).swapClass(b.lastCollapsableHitarea,b.lastExpandableHitarea).end().swapClass(b.collapsable,b.expandable).swapClass(b.lastCollapsable,b.lastExpandable).find(">ul").heightToggle(d.animated,d.toggle);if(d.unique){a(this).parent().siblings().find(">.hitarea").replaceClass(b.collapsableHitarea,b.expandableHitarea).replaceClass(b.lastCollapsableHitarea,b.lastExpandableHitarea).end().replaceClass(b.collapsable,b.expandable).replaceClass(b.lastCollapsable,b.lastExpandable).find(">ul").heightHide(d.animated,d.toggle)}}function l(){function n(o){return o?1:0}var m=[];k.each(function(o,q){m[o]=a(q).is(":has(>ul:visible)")?1:0});a.cookie(d.cookieId,m.join(""))}function e(){var m=a.cookie(d.cookieId);if(m){var n=m.split("");k.each(function(o,q){a(q).find(">ul")[parseInt(n[o])?"show":"hide"]()})}}this.addClass("treeview");var k=this.find("li").prepareBranches(d);switch(d.persist){case"cookie":var h=d.toggle;d.toggle=function(){l();if(h){h.apply(this,arguments)}};e();break;case"location":var g=this.find("a").filter(function(){return this.href.toLowerCase()==location.href.toLowerCase()});if(g.length){g.addClass("selected").parents("ul, li").add(g.next()).show()}break}k.applyClasses(d,f);if(d.control){c(this,d.control);a(d.control).show()}return this.bind("add",function(n,m){a(m).prev().removeClass(b.last).removeClass(b.lastCollapsable).removeClass(b.lastExpandable).find(">.hitarea").removeClass(b.lastCollapsableHitarea).removeClass(b.lastExpandableHitarea);a(m).find("li").andSelf().prepareBranches(d).applyClasses(d,f)})}});var b=a.fn.treeview.classes={open:"open",closed:"closed",expandable:"expandable",expandableHitarea:"expandable-hitarea",lastExpandableHitarea:"lastExpandable-hitarea",collapsable:"collapsable",collapsableHitarea:"collapsable-hitarea",lastCollapsableHitarea:"lastCollapsable-hitarea",lastCollapsable:"lastCollapsable",lastExpandable:"lastExpandable",last:"last",hitarea:"hitarea"};a.fn.Treeview=a.fn.treeview})(jQuery);


function affichersuitepays(){if(document.getElementById("utilisateur_pays_id").selectedIndex=="38"){$("#suitepays").show();$("#utilisateur_suitepays_id").load(urlShowsuitepays,{pays:"ca"})}if(document.getElementById("utilisateur_pays_id").selectedIndex=="61"){$("#suitepays").show();$("#utilisateur_suitepays_id").load(urlShowsuitepays,{pays:"us"})}if(document.getElementById("utilisateur_pays_id").selectedIndex!="38"&&document.getElementById("utilisateur_pays_id").selectedIndex!="61"){$("#suitepays").hide()}}function affichersuitepays2(){if(document.getElementById("contact_pays_id").selectedIndex=="38"){$("#suitepays").show();$("#contact_suitepays_id").load(urlShowsuitepays,{pays:"ca"})}if(document.getElementById("contact_pays_id").selectedIndex=="61"){$("#suitepays").show();$("#contact_suitepays_id").load(urlShowsuitepays,{pays:"us"})}if(document.getElementById("contact_pays_id").selectedIndex!="38"&&document.getElementById("contact_pays_id").selectedIndex!="61"){$("#suitepays").hide()}}function adminaffichersuitepays(){if(document.getElementById("sf_guard_user_utilisateur_pays_id").selectedIndex=="38"){$("#sf_guard_user_utilisateur_suitepays_id").load(urlShowsuitepays,{pays:"ca"})}if(document.getElementById("sf_guard_user_utilisateur_pays_id").selectedIndex=="61"){$("#sf_guard_user_utilisateur_suitepays_id").load(urlShowsuitepays,{pays:"us"})}}function afficheralbumpere(){$("#album_album_id").load(urlIndexalbumspere,{categorie:document.getElementById("album_categorie_id").value})}function affichercategorie(){$("#album_categorie_id").load(urlIndexcategoriesref,{id:document.getElementById("album_album_id").value})}function afficherMDPoublie(){document.getElementById("identification").style.display="none";document.getElementById("mdpoublie").style.display=""}function afficherLogin(){document.getElementById("identification").style.display="";document.getElementById("mdpoublie").style.display="none"}dojo.addOnLoad(function(){dojo.query("div[rel]").forEach(function(b){var a=dojo.attr(b,"rel");dojo.attr(b,"dojoType",a)});dojo.parser.parse("container-affichage-details");dojo.parser.parse("container-affichage-preview");dojo.parser.parse("container-affichage-info");dojo.parser.parse("container-affichage-navigation");dojo.parser.parse("container-menu-arbo");$("#loader-menu-arbo").hide();$("#container-menu-arbo").show();dojo.parser.parse("container-menu-nuage");$("#container-menu-nuage").show();dojo.parser.parse("header-menu");$("#loader-menu-utilisateur").hide();$("#header-menu").show();dojo.parser.parse("container-central-filariane");dojo.parser.parse("container-central-navigation");dojo.parser.parse("container-central-affichage");dojo.parser.parse("footer");$(".xmpl").tagcloud({sizemin:12,sizemax:26,colormin:"ccc",colormax:"666"}).find("li").tsort();dojo.parser.parse("container-home-nuage");$("#loader-home-nuage").hide();$("#container-home-nuage").show();dojo.parser.parse("container-slider-actus");$("#container-slider-actus").show();dojo.parser.parse("container-derniers-albums");$("#container-derniers-albums").show()});function masquergauche(){document.getElementById("container-menu").style.display="none";document.getElementById("masquer-gauche").style.display="none";document.getElementById("afficher-gauche").style.display="";document.getElementById("toggle1").style.width="10px"}function masquerdroite(){document.getElementById("container-affichage").style.display="none";document.getElementById("masquer-droite").style.display="none";document.getElementById("afficher-droite").style.display="";document.getElementById("toggle3").style.width="10px"}function affichergauche(){document.getElementById("container-menu").style.display="";document.getElementById("masquer-gauche").style.display="";document.getElementById("afficher-gauche").style.display="none";document.getElementById("toggle1").style.width="220px";dijit.byId("tabcontainer-arbo").resize()}function afficherdroite(){document.getElementById("container-affichage").style.display="";document.getElementById("masquer-droite").style.display="";document.getElementById("afficher-droite").style.display="none";document.getElementById("toggle3").style.width="452px";dijit.byId("tabcontainer-infos").resize()}$(function(){$("#tree").treeview({collapsed:true,animated:"medium",control:"#sidetreecontrol",persist:"location"});$("#tree2").treeview({collapsed:true,animated:"medium",control:"#sidetreecontrol",persist:"location"});$("#tree3").treeview({collapsed:true,animated:"medium",control:"#sidetreecontrol",persist:"location"});$("#tree4").treeview({collapsed:true,animated:"medium",control:"#sidetreecontrol",persist:"location"})});$(document).ready(function(){$("#lien-creation-album").click(function(){$("#loader-upload").show();$("#creation-nouvel-album").load(urlNewalbum);$("#creation-selection-album").hide();$("#loader-upload").hide()});$("#letest").click(function(){alert("le test")});$("#liste-selection-album").change(function(){$("#loader-upload").show();$("#creation-selection-album").hide();$("#uploader").load(urlUploader,{query:$(this).val()});$("#loader-upload").hide()})});

		/*Affichge des containers*/
        dojo.require("dijit.layout.TabContainer");
        dojo.require("dijit.layout.ContentPane");
        dojo.require("dojo.parser");
		dojo.require("dijit.Toolbar");
        dojo.require("dijit.form.DropDownButton");
        dojo.require("dijit.TooltipDialog");
        dojo.require("dijit.form.TextBox");
		dojo.require("dijit.layout.BorderContainer");
		
		<!-- Pour le changement d'onglet dans le panneau de gauche -->
		dojo.subscribe("tabcontainer-arbo-selectChild", function(child){
			if(child.attr('id') == 'panneau-keyword')
				$.post(urlcookiestabcontainerkeyword);
			
			if(child.attr('id') == 'panneau-category')
				$.post(urlcookiestabcontainercategory);
			
			if(child.attr('id') == 'panneau-admin')
				$.post(urlcookiestabcontaineradmin);
		});
		/*Cocher toutes les checkbox de la page*/
		function checkAll()
		{
		  var boxes = document.getElementsByTagName('input'); 
		  for(var index = 0; index < boxes.length; index++) 
		  { 
			box = boxes[index]; 
			if (box.type == 'checkbox' && box.className == 'sf_admin_batch_checkbox') 
				box.checked = document.getElementById('sf_admin_list_batch_checkbox').checked 
		  } 
		  return true;
		}
