/* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ - Llicència BSD */
/* anythingSlider v1.1 - Chris Coyier - http://css-tricks.com - Llicència lliure */
/* ColorBox v1.2.9b - www.colorpowered.com - Llicència MIT */
jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});(function(a){a.anythingSlider=function(c,b){var d=this;d.$el=a(c);d.el=c;d.currentPage=1;d.timer=null;d.playing=false;d.$el.data("AnythingSlider",d);d.init=function(){d.options=a.extend({},a.anythingSlider.defaults,b);d.$wrapper=d.$el.find("> div").css("overflow","hidden");d.$slider=d.$wrapper.find("> ul");d.$items=d.$slider.find("> li");d.$single=d.$items.filter(":first");if(d.options.buildNavigation){d.buildNavigation()}d.singleWidth=d.$single.outerWidth();d.pages=d.$items.length;d.$items.filter(":first").before(d.$items.filter(":last").clone().addClass("cloned"));d.$items.filter(":last").after(d.$items.filter(":first").clone().addClass("cloned"));d.$items=d.$slider.find("> li");d.buildNextBackButtons();if(d.options.autoPlay){d.playing=!d.options.startStopped;d.buildAutoPlay()}if(d.options.pauseOnHover){d.$el.hover(function(){d.clearTimer()},function(){d.startStop(d.playing)})}if((d.options.hashTags==true&&!d.gotoHash())||d.options.hashTags==false){d.setCurrentPage(1)}};d.gotoPage=function(g,f){if(f!==true){f=false}if(!f){d.startStop(false)}if(typeof(g)=="undefined"||g==null){g=1;d.setCurrentPage(1)}if(g>d.pages+1){g=d.pages}if(g<0){g=1}var e=g<d.currentPage?-1:1,i=Math.abs(d.currentPage-g),h=d.singleWidth*e*i;d.$wrapper.filter(":not(:animated)").animate({scrollLeft:"+="+h},d.options.animationTime,d.options.easing,function(){if(g==0){d.$wrapper.scrollLeft(d.singleWidth*d.pages);g=d.pages}else{if(g>d.pages){d.$wrapper.scrollLeft(d.singleWidth);g=1}}d.setCurrentPage(g)})};d.setCurrentPage=function(f,e){if(d.options.buildNavigation){d.$nav.find(".cur").removeClass("cur");a(d.$navLinks[f-1]).addClass("cur")}if(e!==false){d.$wrapper.scrollLeft(d.singleWidth*f)}d.currentPage=f};d.goForward=function(e){if(e!==true){e=false}d.gotoPage(d.currentPage+1,e)};d.goBack=function(){d.gotoPage(d.currentPage-1)};d.gotoHash=function(){if(/^#?panel-\d+$/.test(window.location.hash)){var f=parseInt(window.location.hash.substr(7));var e=d.$items.filter(":eq("+f+")");if(e.length!=0){d.setCurrentPage(f);return true}}return false};d.buildNavigation=function(){d.$nav=a("<div id='thumbNav'></div>").appendTo(d.$el);d.$items.each(function(f,g){var e=f+1;var h=a("<a href='#'></a>");if(typeof(d.options.navigationFormatter)=="function"){h.html(d.options.navigationFormatter(e,a(this)))}else{h.text(e)}h.click(function(i){d.gotoPage(e);if(d.options.hashTags){d.setHash("panel-"+e)}i.preventDefault()});d.$nav.append(h)});d.$navLinks=d.$nav.find("> a")};d.buildNextBackButtons=function(){var e=a('<a class="arrow forward">&gt;</a>'),f=a('<a class="arrow back">&lt;</a>');f.click(function(g){d.goBack();g.preventDefault()});e.click(function(g){d.goForward();g.preventDefault()});d.$wrapper.after(f).after(e)};d.buildAutoPlay=function(){d.$startStop=a("<a href='#' id='start-stop'></a>").html(d.playing?d.options.stopText:d.options.startText);d.$el.append(d.$startStop);d.$startStop.click(function(f){d.startStop(!d.playing);f.preventDefault()});d.startStop(d.playing)};d.startStop=function(e){if(e!==true){e=false}d.playing=e;d.$startStop.toggleClass("playing",e).html(e?d.options.stopText:d.options.startText);if(e){d.clearTimer();d.timer=window.setInterval(function(){d.goForward(true)},d.options.delay)}else{d.clearTimer()}};d.clearTimer=function(){if(d.timer){window.clearInterval(d.timer)}};d.setHash=function(e){if(typeof window.location.hash!=="undefined"){if(window.location.hash!==e){window.location.hash=e}}else{if(location.hash!==e){location.hash=e}}return e};d.init()};a.anythingSlider.defaults={easing:"swing",autoPlay:true,startStopped:false,delay:3000,animationTime:600,hashTags:true,buildNavigation:true,pauseOnHover:true,startText:"Start",stopText:"Stop",navigationFormatter:null};a.fn.anythingSlider=function(b){if(typeof(b)=="object"){return this.each(function(c){(new a.anythingSlider(this,b));b.hashTags=false})}else{if(typeof(b)=="number"){return this.each(function(c){var d=a(this).data("AnythingSlider");if(d){d.gotoPage(b)}})}}}})(jQuery);(function(C){var I,X,Y,d,A,k,b,H,c,T,F,f,s,j,m,R,l,J,t,E,Z,i,g,a,w,S,p,B,V,x,K,q="colorbox",o="hover",z,e,U,N,M,L,r,O,y="cbox_open",Q="cbox_load",u="cbox_complete",h="cbox_close",n="cbox_closed",D={transition:"elastic",speed:350,width:false,height:false,initialWidth:"400",initialHeight:"400",maxWidth:false,maxHeight:false,resize:true,inline:false,html:false,iframe:false,photo:false,href:false,title:false,rel:false,opacity:0.9,preloading:true,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:false,overlayClose:true,slideshow:false,slideshowAuto:true,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow"};function P(aa){if(aa.keyCode===37){aa.preventDefault();J.click()}else{if(aa.keyCode===39){aa.preventDefault();l.click()}}}function G(aa,ab){ab=ab==="x"?document.documentElement.clientWidth:document.documentElement.clientHeight;return(typeof aa==="string")?(aa.match(/%/)?(ab/100)*parseInt(aa,10):parseInt(aa,10)):aa}function v(aa){return V.photo?true:aa.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i)}function W(){for(var aa in V){if(typeof(V[aa])==="function"){V[aa]=V[aa].call(p)}}}C.fn.colorbox=function(ab,aa){if(this.length){this.each(function(){var ac=C(this).data(q)?C.extend({},C(this).data(q),ab):C.extend({},D,ab);C(this).data(q,ac).addClass("cboxelement")})}else{C(this).data(q,C.extend({},D,ab))}C(this).unbind("click.colorbox").bind("click.colorbox",function(ad){p=this;V=C(p).data(q);W();C().bind("keydown.cbox_close",function(ae){if(ae.keyCode===27){ae.preventDefault();t.click()}});if(V.overlayClose===true){I.css({cursor:"pointer"}).one("click",O)}p.blur();K=aa||false;var ac=V.rel||p.rel;if(ac&&ac!=="nofollow"){c=C(".cboxelement").filter(function(){var ae=C(this).data(q).rel||this.rel;return(ae===ac)});B=c.index(p);if(B<0){c=c.add(p);B=c.length-1}}else{c=C(p);B=0}if(!x){C.event.trigger(y);t.html(V.close);I.css({opacity:V.opacity}).show();x=true;M(G(V.initialWidth,"x"),G(V.initialHeight,"y"),0);if(C.browser.msie&&C.browser.version<7){T.bind("resize.cboxie6 scroll.cboxie6",function(){I.css({width:T.width(),height:T.height(),top:T.scrollTop(),left:T.scrollLeft()})}).trigger("scroll.cboxie6")}}r();N();ad.preventDefault()});if(ab&&ab.open){C(this).triggerHandler("click.colorbox")}return this};U=function(){function aa(ab){return C('<div id="cbox'+ab+'" class="png-ie6"/>')}T=C(window);X=C('<div id="colorbox"/>');I=aa("Overlay").hide();Y=aa("Wrapper");d=aa("Content").append(F=aa("LoadedContent").css({width:0,height:0}),f=aa("LoadingOverlay"),s=aa("LoadingGraphic"),j=aa("Title"),m=aa("Current"),R=aa("Slideshow"),l=aa("Next"),J=aa("Previous"),t=aa("Close"));Y.append(C("<div/>").append(aa("TopLeft"),A=aa("TopCenter"),aa("TopRight")),C("<div/>").append(k=aa("MiddleLeft"),d,b=aa("MiddleRight")),C("<div/>").append(aa("BottomLeft"),H=aa("BottomCenter"),aa("BottomRight"))).children().children().css({"float":"left"});C("body").prepend(I,X.append(Y));if(C.browser.msie&&C.browser.version<7){I.css("position","absolute")}d.children().addClass(o).mouseover(function(){C(this).addClass(o)}).mouseout(function(){C(this).removeClass(o)}).hide();Z=A.height()+H.height()+d.outerHeight(true)-d.height();i=k.width()+b.width()+d.outerWidth(true)-d.width();g=F.outerHeight(true);a=F.outerWidth(true);X.css({"padding-bottom":Z,"padding-right":i}).hide();l.click(e);J.click(z);t.click(O);d.children().removeClass(o)};M=function(ad,ac,ab,ae){var af=document.documentElement.clientHeight,ah=af/2-ac/2,ag=document.documentElement.clientWidth/2-ad/2,aa;if(ac>af){ah-=(ac-af)}if(ah<0){ah=0}if(ag<0){ag=0}ah+=T.scrollTop();ag+=T.scrollLeft();ad=ad-i;ac=ac-Z;aa=(X.width()===ad&&X.height()===ac)?0:ab;Y[0].style.width=Y[0].style.height="9999px";function ai(aj){A[0].style.width=H[0].style.width=d[0].style.width=aj.style.width;s[0].style.height=f[0].style.height=d[0].style.height=k[0].style.height=b[0].style.height=aj.style.height}X.dequeue().animate({height:ac,width:ad,top:ah,left:ag},{duration:aa,complete:function(){ai(this);Y[0].style.width=(ad+i)+"px";Y[0].style.height=(ac+Z)+"px";if(ae){ae()}},step:function(){ai(this)}})};L=function(af){if(!x){return}T.unbind("resize.cbox_resize");var ab,al,ag,ae,ac,ai,am,aa,ad=V.transition==="none"?0:V.speed;F.remove();F=C(af);function aj(){if(V.width){ab=w}else{ab=w&&w<F.width()?w:F.width()}return ab}function ah(){if(V.height){al=S}else{al=S&&S<F.height()?S:F.height()}return al}F.hide().appendTo("body").attr({id:"cboxLoadedContent"}).css({width:aj()}).css({height:ah()}).prependTo(d);if(C.browser.msie&&C.browser.version<7){C("select:not(#colorbox select)").filter(function(){return C(this).css("visibility")!=="hidden"}).css({visibility:"hidden"}).one(h,function(){C(this).css({visibility:"inherit"})})}aa=C("#cboxPhoto")[0];if(aa&&V.height){ag=(al-parseInt(aa.style.height,10))/2;aa.style.marginTop=(ag>0?ag:0)+"px"}function ak(ao){var an=ab+a+i,ap=al+g+Z;M(an,ap,ao,function(){if(!x){return}if(C.browser.msie){if(aa){F.fadeIn(100)}X.css("filter","")}d.children().show();C("#cboxIframeTemp").after("<iframe id='cboxIframe' name='iframe_"+new Date().getTime()+"' frameborder=0 src='"+(V.href||p.href)+"' />").remove();f.hide();s.hide();R.hide();if(c.length>1){m.html(V.current.replace(/\{current\}/,B+1).replace(/\{total\}/,c.length));l.html(V.next);J.html(V.previous);C().unbind("keydown",P).bind("keydown",P);if(V.slideshow){R.show()}}else{m.hide();l.hide();J.hide()}j.html(V.title||p.title);C.event.trigger(u);if(K){K.call(p)}if(V.transition==="fade"){X.fadeTo(ad,1,function(){if(C.browser.msie){d.css("filter","")}})}T.bind("resize.cbox_resize",function(){M(an,ap,0)})})}if(V.transition==="fade"){X.fadeTo(ad,0,function(){ak(0)})}else{ak(ad)}if(V.preloading&&c.length>1){ae=B>0?c[B-1]:c[c.length-1];ai=B<c.length-1?c[B+1]:c[0];am=C(ai).data(q).href||ai.href;ac=C(ae).data(q).href||ae.href;if(v(am)){C("<img />").attr("src",am)}if(v(ac)){C("<img />").attr("src",ac)}}};N=function(){var aa,ad,ab,ac;p=c[B];V=C(p).data(q);W();C.event.trigger(Q);aa=V.height?G(V.height,"y")-g-Z:false;ad=V.width?G(V.width,"x")-a-i:false;ab=V.href||p.href;f.show();s.show();t.show();if(V.maxHeight){S=V.maxHeight?G(V.maxHeight,"y")-g-Z:false;aa=aa&&aa<S?aa:S}if(V.maxWidth){w=V.maxWidth?G(V.maxWidth,"x")-a-i:false;ad=ad&&ad<w?ad:w}S=aa;w=ad;if(V.inline){C('<div id="cboxInlineTemp" />').hide().insertBefore(C(ab)[0]).bind(Q+" "+h,function(){F.children().insertBefore(this);C(this).remove()});L(C(ab).wrapAll("<div/>").parent())}else{if(V.iframe){L(C("<div><div id='cboxIframeTemp' /></div>"))}else{if(V.html){L(C("<div/>").html(V.html))}else{if(v(ab)){ac=new Image();ac.onload=function(){ac.onload=null;if((S||w)&&V.resize){var ag=this.width,ae=this.height,ai=0,ah=this,af=function(){ae+=ae*ai;ag+=ag*ai;ah.height=ae;ah.width=ag};if(w&&ag>w){ai=(w-ag)/ag;af()}if(S&&ae>S){ai=(S-ae)/ae;af()}}L(C("<div />").css({width:this.width,height:this.height}).append(C(this).css({width:this.width,height:this.height,display:"block",margin:"auto",border:0}).attr("id","cboxPhoto")));if(c.length>1){C(this).css({cursor:"pointer"}).click(e)}if(C.browser.msie&&C.browser.version==7){this.style.msInterpolationMode="bicubic"}};ac.src=ab}else{C("<div />").load(ab,function(ae,af){if(af==="success"){L(C(this))}else{L(C("<p>Request unsuccessful.</p>"))}})}}}}};e=function(){B=B<c.length-1?B+1:0;N()};z=function(){B=B>0?B-1:c.length-1;N()};r=function(){var ab,aa,ac="cboxSlideshow_";R.bind(h,function(){clearTimeout(aa);R.unbind()});function ad(){R.text(V.slideshowStop).bind(u,function(){aa=setTimeout(e,V.slideshowSpeed)}).bind(Q,function(){clearTimeout(aa)}).one("click",function(){ab();C(this).removeClass(o)});X.removeClass(ac+"off").addClass(ac+"on")}ab=function(){clearTimeout(aa);R.text(V.slideshowStart).unbind(u+" "+Q).one("click",function(){ad();aa=setTimeout(e,V.slideshowSpeed);C(this).removeClass(o)});X.removeClass(ac+"on").addClass(ac+"off")};if(V.slideshow&&c.length>1){if(V.slideshowAuto){ad()}else{ab()}}};O=function(){C.event.trigger(h);x=false;C().unbind("keydown",P).unbind("keydown.cbox_close");T.unbind("resize.cbox_resize resize.cboxie6 scroll.cboxie6");I.css({cursor:"auto"}).fadeOut("fast");d.children().hide();X.stop(true,false).removeClass().fadeOut("fast",function(){F.remove();X.css({opacity:1});C.event.trigger(n)})};E=C.fn.colorbox;E.init=U;E.next=e;E.prev=z;E.close=O;E.load=N;E.position=M;E.dimensions=L;E.element=function(){return p};E.settings=D;C(function(){U()})}(jQuery));function formatText(b,a){return b+""}$(function(){$(".anythingSlider").anythingSlider({easing:"easeInOutExpo",autoPlay:true,delay:3000,startStopped:false,animationTime:600,hashTags:true,buildNavigation:true,pauseOnHover:true,startText:"Reproduir &rsaquo;",stopText:"Pausar &iota;&iota;",navigationFormatter:formatText});$("#slide-jump").click(function(){$(".anythingSlider").anythingSlider(6)})});$(document).ready(function(){$(".video-termotur").colorbox({width:1002,height:595,iframe:true})});$("a[rel='publicacions']").colorbox({current:" {current} de {total}"});function menu_seleccio_idiomes(){$(" #nav ul ").css({display:"none"});$(" #nav li").hover(function(){$(this).find("ul:first").css({visibility:"visible",display:"none"}).show(0)},function(){$(this).find("ul:first").css({visibility:"hidden"})})}$(document).ready(function(){menu_seleccio_idiomes()});