PageSourceSearch

https://www.sostenible.cat/sites/sostenible.cat/files/public/js/js…GDgUrp6zcgK9RZZ9JIGCaKzo3AkQBdOJrCZPeZbA.js

js sostenible.cat collected 2026-10-02 05:19:52 UTC 41,677 bytes, 727 lines download raw bytes

1Drupal.locale = { 'pluralFormula': function ($n) { return Number(($n>1)); }, 'strings': {"":{"An AJAX HTTP error occurred.":"Hi ha hagut un error HTTP d\u0027AJAX.","HTTP Result Code: !status":"Codi de resultat HTTP: !status","An AJAX HTTP request terminated abnormally.":"Una petici\u00f3 HTTP d\u0027AJAX ha acabat de forma anormal.","Debugging information follows.":"A continuaci\u00f3 hi ha informaci\u00f3 de depuraci\u00f3.","Path: !uri":"Cam\u00ed: !uri","StatusText: !statusText":"StatusText: !statusText","ResponseText: !responseText":"ResponseText: !responseText","ReadyState: !readyState":"ReadyState: !readyState","CustomMessage: !customMessage":"CustomMessage: !customMessage","Loading":"Carregant","(active tab)":"(pestanya activa)","Hide":"Oculta","Show":"Mostra","@title dialog":"Quadre de @title","Configure":"Configura","Show shortcuts":"Mostra els accessos directes","Hide shortcuts":"Amaga els accessos directes","Select all rows in this table":"Selecciona totes les fileres d\u0027aquesta taula","Deselect all rows in this table":"Deselecciona totes les fileres d\u0027aquesta taula","Re-order rows by numerical weight instead of dragging.":"Reordeneu les files per pes num\u00e8ric en comptes d\u0027arrossegar-les.","Show row weights":"Mostra el pes de les files","Hide row weights":"Amaga el pes de les files","Drag to re-order":"Arrossegueu per canviar l\u0027ordre","Changes made in this table will not be saved until the form is submitted.":"Els canvis fets en aquesta taula no es desaran fins que no envieu el formulari.","Available tokens":"Comodins disponibles","Other":"Altres","Enabled":"Habilitat","Tuesday":"dimarts","Tue":"dt.","Sep":"set.","Wednesday":"dimecres","Monday":"dilluns","Sunday":"diumenge","Thursday":"dijous","Friday":"divendres","Saturday":"dissabte","- None -":"- Cap -","E
1dit":"Edita","Close":"Tanca","Status":"Estat","Show description":"Mostra la descripci\u00f3","Hide description":"Amaga la descripci\u00f3","Cancel":"Cancel\u00b7la","Disabled":"Inhabilitat","Wed":"dc.","Fri":"dv.","Mon":"dl.","Sat":"ds.","Thu":"dj.","Sun":"dg.","Filename":"Nom de fitxer","Save":"Desa","Next":"Seg\u00fcent","Size":"Mida","Add":"Afegeix","Upload":"Puja","Done":"Fet","N\/A":"No aplica","This field is required.":"Aquest camp \u00e9s obligatori.","Prev":"Ant.","January":"gener","February":"febrer","March":"mar\u00e7","April":"abril","May":"maig","June":"juny","July":"juliol","August":"agost","September":"setembre","October":"octubre","November":"novembre","December":"desembre","Today":"Avui","Jan":"gen.","Feb":"febr.","Apr":"abr.","Jun":"jun","Jul":"jul.","Aug":"ag.","Oct":"oct.","Nov":"nov.","Dec":"des.","Su":"Dg.","Mo":"Dl.","Tu":"Dt.","We":"Dc.","Th":"Dj.","Fr":"Dv.","Sa":"Ds.","Not published":"No publicat","Please wait...":"Si us plau, espereu...","mm\/dd\/yy":"mm\/dd\/aa","Only files with the following extensions are allowed: %files-allowed.":"Nom\u00e9s els arxius amb les seg\u00fcents extensions estan permesos: %files-allowed","By @name on @date":"Per @name el @date","By @name":"Per @name","Not in menu":"No est\u00e0 al men\u00fa","Alias: @alias":"\u00c0lies: @alias","No alias":"No hi ha \u00e0lies","New revision":"Nova revisi\u00f3","The changes to these blocks will not be saved until the \u003Cem\u003ESave blocks\u003C\/em\u003E button is clicked.":"Els canvis fets a aquest bloc no es desaran fins que no es premi el bot\u00f3 \u003Cem\u003EDesar blocs\u003C\/em\u003E.","This permission is inherited from the authenticated user role.":"Aquest perm\u00eds s\u0027hereta del rol d\u0027usuari autentificat.","No revision":"No hi ha cap revisi\u00f3","@number comments per page":"@number comentaris per p\u00e0gina","Requires a title":"Requereix un t\u00edtol","Not restricted":"Sense restriccions","Not customizable":"No personalitzable","Restricted to certain pages":"Restringit a certes p\u00e0gines","The block cannot be placed in this region.":"No es pot posar el bloc en aquesta regi\u00f3.","Hide summary":"Amaga el resum","Edit summary":"Edita el resum","Don\u0027t display post information":"No mostris la informaci\u00f3 de l\u0027e
vendor: 11,395 bytes, lines 1-7
1ntrada.","The selected file %filename cannot be uploaded. Only files with the following extensions are allowed: %extensions.":"No s\u0027ha pogut carregar el fitxer %filename seleccionat. Nom\u00e9s s\u00f3n permesos els fitxers amb les seg\u00fcents extensions: %extensions.","Autocomplete popup":"Autocompleci\u00f3 en finestra emergent","Searching for matches...":"Buscant coincid\u00e8ncies...","Downloads":"Desc\u00e0rregues","One domain with multiple subdomains":"Un domini amb m\u00faltiples subdominis","Multiple top-level domains":"M\u00faltiples dominis de primer nivell","Automatic alias":"\u00c0lies autom\u00e0tic","Add files":"Afegeix fitxers","Add files to the upload queue and click the start button.":"Afegiu fitxers a la cua de c\u00e0rrega i feu clic al bot\u00f3 d\u0027inici.","Drag files here.":"Arrossegueu fitxers aqu\u00ed.","File extension error.":"Error d\u0027extensi\u00f3 de fitxer.","File size error.":"Error de mida de fitxer.","HTTP Error.":"Error HTTP.","Security error.":"Error de seguretat.","Generic error.":"Error gen\u00e8ric.","%d files queued":"%d fitxers encuats","Remove group":"Elimina el grup","Apply (all displays)":"Aplica (a totes les presentacions)","Apply (this display)":"Aplica (a aquesta presentaci\u00f3)","Revert to default":"Tornar als valors per defecte","The response failed verification so will not be processed.":"La resposta no ha passat la verificaci\u00f3, de manera que no es processar\u00e0.","The callback URL is not local and not trusted: !url":"L\u0027URL de la crida de retorn no \u00e9s local i no \u00e9s de confian\u00e7a: !url","Mar":"mar\u00e7",", or use your browser geolocation system by clicking this link":", o utilitza el sistema de geolocalitzaci\u00f3 del navegador fent clic en aquest enlla\u00e7","My Location":"La meva localitzaci\u00f3","%filename is not an image.":"%filename no \u00e9s una imatge.","Insert file":"Inserta el fitxer","Change view":"Canvia la vista","Directory":"Directori","Please select a file.":"Si us plau tria un fitxer.","Select all children":"Selecciona tots els fills","Not scheduled":"No programat","Scheduled for publishing":"Programat per publicar","Scheduled for unpublishing":"Programat per despublicar","Publishing enabled":"S\u0027ha habilitat la publicaci\u00f3","Unpublishing enabled":"S\u0027ha habilitat la despublicaci\u00f3","@label: @value":"@label: @value"}} };;
2/*!
3	Colorbox 1.6.4
4	license: MIT
5	http://www.jacklmoore.com/colorbox
6*/
7(function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-cbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(A+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in x[0]&&!x[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),x.focus())}function c(t){c.str!==t&&(x.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){A=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+te).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),A=W.index(_.el),-1===A&&(W=W.add(_.el),A=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),ae.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!U){U=$=!0,c(_.get("className")),x.css({visibility:"hidden",display:"block",opacity:""}),I=n(se,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(I),j=T.height()+k.height()+b.outerHeight(!0)-b.height(),D=C.width()+H.width()+b.outerWidth(!0)-b.width(),N=I.outerHeight(!0),z=I.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=Math.max((l!==!1?Math.min(h,a(l,"x")):h)-z-D,0),_.h=Math.max((f!==!1?Math.min(s,a(f,"y")):s)-N-j,0),I.css({width:"",height:_.h}),J.position(),u(ee),_.get("onOpen"),O.add(F).hide(),x.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),ae.one(re,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&ae.one(re,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?B.html(_.get("close")).appendTo(b):B.appendTo("<div/>"),w()}}function p(){x||(V=!1,E=t(i),x=n(se).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(se,"Overlay").hide(),L=t([n(se,"LoadingOverlay")[0],n(se,"LoadingGraphic")[0]]),y=n(se,"Wrapper"),b=n(se,"Content").append(F=n(se,"Title"),R=n(se,"Current"),P=t('<button type="button"/>').attr({id:Z+"Previous"}),K=t('<button type="button"/>').attr({id:Z+"Next"}),S=t('<button type="button"/>').attr({id:Z+"Slideshow"}),L),B=t('<button type="button"/>').attr({id:Z+"Close"}),y.append(n(se).append(n(se,"TopLeft"),T=n(se,"TopCenter"),n(se,"TopRight")),n(se,!1,"clear:left").append(C=n(se,"MiddleLeft"),b,H=n(se,"MiddleRight")),n(se,!1,"clear:left").append(n(se,"BottomLeft"),k=n(se,"BottomCenter"),n(se,"BottomRight"))).find("div div").css({"float":"left"}),M=n(se,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),O=K.add(P).add(R).add(S)),e.body&&!x.parent().length&&t(e.body).append(v,x.append(y,M))}function m(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),f(this))}return x?(V||(V=!0,K.click(function(){J.next()}),P.click(function(){J.prev()}),B.click(function(){J.close()}),v.click(function(){_.get("overlayClose")&&J.close()}),t(e).bind("keydown."+Z,function(t){var e=t.keyCode;U&&_.get("escKey")&&27===e&&(t.preventDefault(),J.close()),U&&_.get("arrowKey")&&W[1]&&!t.altKey&&(37===e?(t.preventDefault(),P.click()):39===e&&(t.preventDefault(),K.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+Z,"."+te,i):t("."+te).live("click."+Z,i)),!0):!1}function w(){var e,o,r,h=J.prep,d=++le;if($=!0,q=!1,u(he),u(ie),_.get("onLoad"),_.h=_.get("height")?a(_.get("height"),"y")-N-j:_.get("innerHeight")&&a(_.get("innerHeight"),"y"),_.w=_.get("width")?a(_.get("width"),"x")-z-D:_.get("innerWidth")&&a(_.get("innerWidth"),"x"),_.mw=_.w,_.mh=_.h,_.get("maxWidth")&&(_.mw=a(_.get("maxWidth"),"x")-z-D,_.mw=_.w&&_.w<_.mw?_.w:_.mw),_.get("maxHeight")&&(_.mh=a(_.get("maxHeight"),"y")-N-j,_.mh=_.h&&_.h<_.mh?_.h:_.mh),e=_.get("href"),Q=setTimeout(function(){L.show()},100),_.get("inline")){var c=t(e).eq(0);r=t("<div>").hide().insertBefore(c),ae.one(he,function(){r.replaceWith(c)}),h(c)}else _.get("iframe")?h(" "):_.get("html")?h(_.get("html")):s(_,e)?(e=l(_,e),q=_.get("createImg"),t(q).addClass(Z+"Photo").bind("error."+Z,function(){h(n(se,"Error").html(_.get("imgError")))}).one("load",function(){d===le&&setTimeout(function(){var e;_.get("retinaImage")&&i.devicePixelRatio>1&&(q.height=q.height/i.devicePixelRatio,q.width=q.width/i.devicePixelRatio),_.get("scalePhotos")&&(o=function(){q.height-=q.height*e,q.width-=q.width*e},_.mw&&q.width>_.mw&&(e=(q.width-_.mw)/q.width,o()),_.mh&&q.height>_.mh&&(e=(q.height-_.mh)/q.height,o())),_.h&&(q.style.marginTop=Math.max(_.mh-q.height,0)/2+"px"),W[1]&&(_.get("loop")||W[A+1])&&(q.style.cursor="pointer",t(q).bind("click."+Z,function(){J.next()})),q.style.width=q.width+"px",q.style.height=q.height+"px",h(q)},1)}),q.src=e):e&&M.load(e,_.get("data"),function(e,i){d===le&&h("error"===i?n(se,"Error").html(_.get("xhrError")):t(this).contents())})}var v,x,y,b,T,C,H,k,W,E,I,M,L,F,R,S,K,P,B,O,_,j,D,N,z,A,q,U,$,G,Q,J,V,X={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),n=t(this).data("cbox-iframe-attrs");return"object"==typeof n&&t.each(n,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},Y="colorbox",Z="cbox",te=Z+"Element",ee=Z+"_open",ie=Z+"_load",ne=Z+"_complete",oe=Z+"_cleanup",re=Z+"_closed",he=Z+"_purge",ae=t("<a/>"),se="div",le=0,de={},ce=function(){function t(){clearTimeout(h)}function e(){(_.get("loop")||W[A+1])&&(t(),h=setTimeout(J.next,_.get("slideshowSpeed")))}function i(){S.html(_.get("slideshowStop")).unbind(s).one(s,n),ae.bind(ne,e).bind(ie,t),x.removeClass(a+"off").addClass(a+"on")}function n(){t(),ae.unbind(ne,e).unbind(ie,t),S.html(_.get("slideshowStart")).unbind(s).one(s,function(){J.next(),i()}),x.removeClass(a+"on").addClass(a+"off")}function o(){r=!1,S.hide(),t(),ae.unbind(ne,e).unbind(ie,t),x.removeClass(a+"off "+a+"on")}var r,h,a=Z+"Slideshow_",s="click."+Z;return function(){r?_.get("slideshow")||(ae.unbind(oe,o),o()):_.get("slideshow")&&W[1]&&(r=!0,ae.one(oe,o),_.get("slideshowAuto")?i():n(),S.show())}}();t[Y]||(t(p),J=t.fn[Y]=t[Y]=function(e,i){var n,o=this;return e=e||{},t.isFunction(o)&&(o=t("<a/>"),e.open=!0),o[0]?(p(),m()&&(i&&(e.onComplete=i),o.each(function(){var i=t.data(this,Y)||{};t.data(this,Y,t.extend(i,e))}).addClass(te),n=new r(o[0],e),n.get("open")&&f(o[0])),o):o},J.position=function(e,i){function n(){T[0].style.width=k[0].style.width=b[0].style.width=parseInt(x[0].style.width,10)-D+"px",b[0].style.height=C[0].style.height=H[0].style.height=parseInt(x[0].style.height,10)-j+"px"}var r,h,s,l=0,d=0,c=x.offset();if(E.unbind("resize."+Z),x.css({top:-9e4,left:-9e4}),h=E.scrollTop(),s=E.scrollLeft(),_.get("fixed")?(c.top-=h,c.left-=s,x.css({position:"fixed"})):(l=h,d=s,x.css({position:"absolute"})),d+=_.get("right")!==!1?Math.max(E.width()-_.w-z-D-a(_.get("right"),"x"),0):_.get("left")!==!1?a(_.get("left"),"x"):Math.round(Math.max(E.width()-_.w-z-D,0)/2),l+=_.get("bottom")!==!1?Math.max(o()-_.h-N-j-a(_.get("bottom"),"y"),0):_.get("top")!==!1?a(_.get("top"),"y"):Math.round(Math.max(o()-_.h-N-j,0)/2),x.css({top:c.top,left
7:c.left,visibility:"visible"}),y[0].style.width=y[0].style.height="9999px",r={width:_.w+z+D,height:_.h+N+j,top:l,left:d},e){var g=0;t.each(r,function(t){return r[t]!==de[t]?(g=e,void 0):void 0}),e=g}de=r,e||x.css(r),x.dequeue().animate(r,{duration:e||0,complete:function(){n(),$=!1,y[0].style.width=_.w+z+D+"px",y[0].style.height=_.h+N+j+"px",_.get("reposition")&&setTimeout(function(){E.bind("resize."+Z,J.position)},1),t.isFunction(i)&&i()},step:n})},J.resize=function(t){var e;U&&(t=t||{},t.width&&(_.w=a(t.width,"x")-z-D),t.innerWidth&&(_.w=a(t.innerWidth,"x")),I.css({width:_.w}),t.height&&(_.h=a(t.height,"y")-N-j),t.innerHeight&&(_.h=a(t.innerHeight,"y")),t.innerHeight||t.height||(e=I.scrollTop(),I.css({height:"auto"}),_.h=I.height()),I.css({height:_.h}),e&&I.scrollTop(e),J.position("none"===_.get("transition")?0:_.get("speed")))},J.prep=function(i){function o(){return _.w=_.w||I.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w}function a(){return _.h=_.h||I.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h}if(U){var d,g="none"===_.get("transition")?0:_.get("speed");I.remove(),I=n(se,"LoadedContent").append(i),I.hide().appendTo(M.show()).css({width:o(),overflow:_.get("scrolling")?"auto":"hidden"}).css({height:a()}).prependTo(b),M.hide(),t(q).css({"float":"none"}),c(_.get("className")),d=function(){function i(){t.support.opacity===!1&&x[0].style.removeAttribute("filter")}var n,o,a=W.length;U&&(o=function(){clearTimeout(Q),L.hide(),u(ne),_.get("onComplete")},F.html(_.get("title")).show(),I.show(),a>1?("string"==typeof _.get("current")&&R.html(_.get("current").replace("{current}",A+1).replace("{total}",a)).show(),K[_.get("loop")||a-1>A?"show":"hide"]().html(_.get("next")),P[_.get("loop")||A?"show":"hide"]().html(_.get("previous")),ce(),_.get("preloading")&&t.each([h(-1),h(1)],function(){var i,n=W[this],o=new r(n,t.data(n,Y)),h=o.get("href");h&&s(o,h)&&(h=l(o,h),i=e.createElement("img"),i.src=h)})):O.hide(),_.get("iframe")?(n=_.get("createIframe"),_.get("scrolling")||(n.scrolling="no"),t(n).attr({src:_.get("href"),"class":Z+"Iframe"}).one("load",o).appendTo(I),ae.one(he,function(){n.src="//about:blank"}),_.get("fastIframe")&&t(n).trigger("load")):o(),"fade"===_.get("transition")?x.fadeTo(g,1,i):i())},"fade"===_.get("transition")?x.fadeTo(g,0,function(){J.position(0,d)}):J.position(g,d)}},J.next=function(){!$&&W[1]&&(_.get("loop")||W[A+1])&&(A=h(1),f(W[A]))},J.prev=function(){!$&&W[1]&&(_.get("loop")||A)&&(A=h(-1),f(W[A]))},J.close=function(){U&&!G&&(G=!0,U=!1,u(oe),_.get("onCleanup"),E.unbind("."+Z),v.fadeTo(_.get("fadeOut")||0,0),x.stop().fadeTo(_.get("fadeOut")||0,0,function(){x.hide(),v.hide(),u(he),I.remove(),setTimeout(function(){G=!1,u(re),_.get("onClosed")},1)}))},J.remove=function(){x&&(x.stop(),t[Y].close(),x.stop(!1,!0).remove(),v.remove(),G=!1,x=null,t("."+te).removeData(Y).removeClass(te),t(e).unbind("click."+Z).unbind("keydown."+Z))},J.element=function(){return t(_.el)},J.settings=X)})(jQuery,document,window);;
8/**
9 * @file
10 * Colorbox module init js.
11 */
12
13(function ($) {
14
15Drupal.behaviors.initColorbox = {
16  attach: function (context, settings) {
17    if (!$.isFunction($('a, area, input', context).colorbox) || typeof settings.colorbox === 'undefined') {
18      return;
19    }
20
21    if (settings.colorbox.mobiledetect && window.matchMedia) {
22      // Disable Colorbox for small screens.
23      var mq = window.matchMedia("(max-device-width: " + settings.colorbox.mobiledevicewidth + ")");
24      if (mq.matches) {
25        return;
26      }
27    }
28
29    // Use "data-colorbox-gallery" if set otherwise use "rel".
30    settings.colorbox.rel = function () {
31      if ($(this).data('colorbox-gallery')) {
32        return $(this).data('colorbox-gallery');
33      }
34      else {
35        return $(this).attr('rel');
36      }
37    };
38
39    $('.colorbox', context)
40      .once('init-colorbox').each(function(){
41        // Only images are supported for the "colorbox" class.
42        // The "photo" setting forces the href attribute to be treated as an image.
43        var extendParams = {
44          photo: true
45        };
46        // If a title attribute is supplied, sanitize it.
47        var title = $(this).attr('title');
48        if (title) {
49          extendParams.title = Drupal.checkPlain(title);
50        }
51        $(this).colorbox($.extend({}, settings.colorbox, extendParams));
52      });
53
54    $(context).bind('cbox_complete', function () {
55      Drupal.attachBehaviors('#cboxLoadedContent');
56    });
57  }
58};
59
60})(jQuery);
61;
62/**
63 * @file
64 * Colorbox module style js.
65 */
66
67(function ($) {
68
69Drupal.behaviors.initColorboxDefaultStyle = {
70  attach: function (context, settings) {
71    $(context).bind('cbox_complete', function () {
72      // Only run if there is a title.
73      if ($('#cboxTitle:empty', context).length == false) {
74        $('#cboxLoadedContent img', context).bind('mouseover', function () {
75          $('#cboxTitle', context).slideDown();
76        });
77        $('#cboxOverlay', context).bind('mouseover', function () {
78          $('#cboxTitle', context).slideUp();
79        });
80      }
81      else {
82        $('#cboxTitle', context).hide();
83      }
84    });
85  }
86};
87
88})(jQuery);
89;
90
91(function($) {
92
93/**
94 * Drupal FieldGroup object.
95 */
96Drupal.FieldGroup = Drupal.FieldGroup || {};
97Drupal.FieldGroup.Effects = Drupal.FieldGroup.Effects || {};
98Drupal.FieldGroup.groupWithfocus = null;
99
100Drupal.FieldGroup.setGroupWithfocus = function(element) {
101  element.css({display: 'block'});
102  Drupal.FieldGroup.groupWithfocus = element;
103}
104
105/**
106 * Implements Drupal.FieldGroup.processHook().
107 */
108Drupal.FieldGroup.Effects.processFieldset = {
109  execute: function (context, settings, type) {
110    if (type == 'form') {
111      // Add required fields mark to any fieldsets containing required fields
112      $('fieldset.fieldset', context).once('fieldgroup-effects', function(i) {
113        if ($(this).is('.required-fields') && $(this).find('.form-required').length > 0) {
114          $('legend span.fieldset-legend', $(this)).eq(0).append(' ').append($('.form-required').eq(0).clone());
115        }
116        if ($('.error', $(this)).length) {
117          $('legend span.fieldset-legend', $(this)).eq(0).addClass('error');
118          Drupal.FieldGroup.setGroupWithfocus($(this));
119        }
120      });
121    }
122  }
123}
124
125/**
126 * Implements Drupal.FieldGroup.processHook().
127 */
128Drupal.FieldGroup.Effects.processAccordion = {
129  execute: function (context, settings, type) {
130    $('div.field-group-accordion-wrapper', context).once('fieldgroup-effects', function () {
131      var wrapper = $(this);
132
133      // Get the index to set active.
134      var active_index = false;
135      wrapper.find('.accordion-item').each(function(i) {
136        if ($(this).hasClass('field-group-accordion-active')) {
137          active_index = i;
138        }
139      });
140
141      wrapper.accordion({
142        heightStyle: "content",
143        active: active_index,
144        collapsible: true,
145        changestart: function(event, ui) {
146          if ($(this).hasClass('effect-none')) {
147            ui.options.animated = false;
148          }
149          else {
150            ui.options.animated = 'slide';
151          }
152        }
153      });
154
155      if (type == 'form') {
156
157        var $firstErrorItem = false;
158
159        // Add required fields mark to any element containing required fields
160        wrapper.find('div.field-group-accordion-item').each(function(i) {
161
162          if ($(this).is('.required-fields') && $(this).find('.form-required').length > 0) {
163            $('h3.ui-accordion-header a').eq(i).append(' ').append($('.form-required').eq(0).clone());
164          }
165          if ($('.error', $(this)).length) {
166            // Save first error item, for focussing it.
167            if (!$firstErrorItem) {
168              $firstErrorItem = $(this).parent().accordion("activate" , i);
169            }
170            $('h3.ui-accordion-header').eq(i).addClass('error');
171          }
172        });
173
174        // Save first error item, for focussing it.
175        if (!$firstErrorItem) {
176          $('.ui-accordion-content-active', $firstErrorItem).css({height: 'auto', width: 'auto', display: 'block'});
177        }
178
179      }
180    });
181  }
182}
183
184/**
185 * Implements Drupal.FieldGroup.processHook().
186 */
187Drupal.FieldGroup.Effects.processHtabs = {
188  execute: function (context, settings, type) {
189    if (type == 'form') {
190      // Add required fields mark to any element containing required fields
191      $('fieldset.horizontal-tabs-pane', context).once('fieldgroup-effects', function(i) {
192        if ($(this).is('.required-fields') && $(this).find('.form-required').length > 0) {
193          $(this).data('horizontalTab').link.find('strong:first').after($('.form-required').eq(0).clone()).after(' ');
194        }
195        if ($('.error', $(this)).length) {
196          $(this).data('horizontalTab').link.parent().addClass('error');
197          Drupal.FieldGroup.setGroupWithfocus($(this));
198          $(this).data('horizontalTab').focus();
199        }
200      });
201    }
202  }
203}
204
205/**
206 * Implements Drupal.FieldGroup.processHook().
207 */
208Drupal.FieldGroup.Effects.processTabs = {
209  execute: function (context, settings, type) {
210    if (type == 'form') {
211
212      var errorFocussed = false;
213
214      // Add required fields mark to any fieldsets containing required fields
215      $('fieldset.vertical-tabs-pane', context).once('fieldgroup-effects', function(i) {
216        if ($(this).is('.required-fields') && $(this).find('.form-required').length > 0) {
217          $(this).data('verticalTab').link.find('strong:first').after($('.form-required').eq(0).clone()).after(' ');
218        }
219        if ($('.error', $(this)).length) {
220          $(this).data('verticalTab').link.parent().addClass('error');
221          // Focus the first tab with error.
222          if (!errorFocussed) {
223            Drupal.FieldGroup.setGroupWithfocus($(this));
224            $(this).data('verticalTab').focus();
225            errorFocussed = true;
226          }
227        }
228      });
229    }
230  }
231}
232
233/**
234 * Implements Drupal.FieldGroup.processHook().
235 *
236 * TODO clean this up meaning check if this is really
237 *      necessary.
238 */
239Drupal.FieldGroup.Effects.processDiv = {
240  execute: function (context, settings, type) {
241
242    $('div.collapsible', context).once('fieldgroup-effects', function() {
243      var $wrapper = $(this);
244
245      // Turn the legend into a clickable link, but retain span.field-group-format-toggler
246      // for CSS positioning.
247
248      var $toggler = $('span.field-group-format-toggler:first', $wrapper);
249      var $link = $('<a class="field-group-format-title" href="#"></a>');
250      $link.prepend($toggler.contents());
251
252      // Add required field markers if needed
253      if ($(this).is('.required-fields') && $(this).find('.form-required').length > 0) {
254        $link.append(' ').append($('.form-required').eq(0).clone());
255      }
256
257      $link.appendTo($toggler);
258
259      // .wrapInner() does not retain bound events.
260      $link.click(function () {
261        var wrapper = $wrapper.get(0);
262        // Don't animate multiple times.
263        if (!wrapper.animating) {
264          wrapper.animating = true;
265          var speed = $wrapper.hasClass('speed-fast') ? 300 : 1000;
266          if ($wrapper.hasClass('effect-none') && $wrapper.hasClass('speed-none')) {
267            $('> .field-group-format-wrapper', wrapper).toggle();
268          }
269          else if ($wrapper.hasClass('effect-blind')) {
270            $('> .field-group-format-wrapper', wrapper).toggle('blind', {}, speed);
271          }
272          else {
273            $('> .field-group-format-wrapper', wrapper).toggle(speed);
274          }
275          wrapper.animating = false;
276        }
277        $wrapper.toggleClass('collapsed');
278        return false;
279      });
280
281    });
282  }
283};
284
285/**
286 * Behaviors.
287 */
288Drupal.behaviors.fieldGroup = {
289  attach: function (context, settings) {
290    settings.field_group = settings.field_group || Drupal.settings.field_group;
291    if (settings.field_group == undefined) {
292      return;
293    }
294
295    // Execute all of them.
296    $.each(Drupal.FieldGroup.Effects, function (func) {
297      // We check for a wrapper function in Drupal.field_group as
298      // alternative for dynamic string function calls.
299      var type = func.toLowerCase().replace("process", "");
300      if (settings.field_group[type] != undefined && $.isFunction(this.execute)) {
301        this.execute(context, settings, settings.field_group[type]);
302      }
303    });
304
305    // Fixes css for fieldgroups under vertical tabs.
306    $('.fieldset-wrapper .fieldset > legend').css({display: 'block'});
307    $('.vertical-tabs fieldset.fieldset').addClass('default-fallback');
308
309    // Add a new ID to each fieldset.
310    $('.group-wrapper .horizontal-tabs-panes > fieldset', context).once('group-wrapper-panes-processed', function() {
311      // Tats bad, but we have to keep the actual id to prevent layouts to break.
312      var fieldgroupID = 'field_group-' + $(this).attr('id');
313      $(this).attr('id', fieldgroupID);
314    });
315    // Set the hash in url to remember last userselection.
316    $('.group-wrapper ul li').once('group-wrapper-ul-processed', function() {
317      var fieldGroupNavigationListIndex = $(this).index();
318      $(this).children('a').click(function() {
319        var fieldset = $('.group-wrapper fieldset').get(fieldGroupNavigationListIndex);
320        // Grab the first id, holding the wanted hashurl.
321        var hashUrl = $(fieldset).attr('id').replace(/^field_group-/, '').split(' ')[0];
322        window.location.hash = hashUrl;
323      });
324    });
325
326  }
327};
328
329})(jQuery);
330;
331/**
332 * @file
333 * Some basic behaviors and utility functions for Views.
334 */
335(function ($) {
336
337  Drupal.Views = {};
338
339  /**
340   * JQuery UI tabs, Views integration component.
341   */
342  Drupal.behaviors.viewsTabs = {
343    attach: function (context) {
344      if ($.viewsUi && $.viewsUi.tabs) {
345        $('#views-tabset').once('views-processed').viewsTabs({
346          selectedClass: 'active'
347        });
348      }
349
350      $('a.views-remove-link').once('views-processed').click(function(event) {
351        var id = $(this).attr('id').replace('views-remove-link-', '');
352        $('#views-row-' + id).hide();
353        $('#views-removed-' + id).attr('checked', true);
354        event.preventDefault();
355      });
356      /**
357    * Here is to handle display deletion
358    * (checking in the hidden checkbox and hiding out the row).
359    */
360      $('a.display-remove-link')
361        .addClass('display-processed')
362        .click(function() {
363          var id = $(this).attr('id').replace('display-remove-link-', '');
364          $('#display-row-' + id).hide();
365          $('#display-removed-' + id).attr('checked', true);
366          return false;
367        });
368    }
369  };
370
371  /**
372 * Helper function to parse a querystring.
373 */
374  Drupal.Views.parseQueryString = function (query) {
375    var args = {};
376    var pos = query.indexOf('?');
377    if (pos != -1) {
378      query = query.substring(pos + 1);
379    }
380    var pairs = query.split('&');
381    for (var i in pairs) {
382      if (typeof(pairs[i]) == 'string') {
383        var pair = pairs[i].split('=');
384        // Ignore the 'q' path argument, if present.
385        if (pair[0] != 'q' && pair[1]) {
386          args[decodeURIComponent(pair[0].replace(/\+/g, ' '))] = decodeURIComponent(pair[1].replace(/\+/g, ' '));
387        }
388      }
389    }
390    return args;
391  };
392
393  /**
394 * Helper function to return a view's arguments based on a path.
395 */
396  Drupal.Views.parseViewArgs = function (href, viewPath) {
397
398    // Provide language prefix.
399    if (Drupal.settings.pathPrefix) {
400      var viewPath = Drupal.settings.pathPrefix + viewPath;
401    }
402    var returnObj = {};
403    var path = Drupal.Views.getPath(href);
404    // Ensure we have a correct path.
405    if (viewPath && path.substring(0, viewPath.length + 1) == viewPath + '/') {
406      var args = decodeURIComponent(path.substring(viewPath.length + 1, path.length));
407      returnObj.view_args = args;
408      returnObj.view_path = path;
409    }
410    return returnObj;
411  };
412
413  /**
414 * Strip off the protocol plus domain from an href.
415 */
416  Drupal.Views.pathPortion = function (href) {
417    // Remove e.g. http://example.com if present.
418    var protocol = window.location.protocol;
419    if (href.substring(0, protocol.length) == protocol) {
420      // 2 is the length of the '//' that normally follows the protocol.
421      href = href.substring(href.indexOf('/', protocol.length + 2));
422    }
423    return href;
424  };
425
426  /**
427 * Return the Drupal path portion of an href.
428 */
429  Drupal.Views.getPath = function (href) {
430    href = Drupal.Views.pathPortion(href);
431    href = href.substring(Drupal.settings.basePath.length, href.length);
432    // 3 is the length of the '?q=' added to the url without clean urls.
433    if (href.substring(0, 3) == '?q=') {
434      href = href.substring(3, href.length);
435    }
436    var chars = ['#', '?', '&'];
437    for (var i in chars) {
438      if (href.indexOf(chars[i]) > -1) {
439        href = href.substr(0, href.indexOf(chars[i]));
440      }
441    }
442    return href;
443  };
444
445})(jQuery);
446;
447(function ($) {
448
449/**
450 * A progressbar object. Initialized with the given id. Must be inserted into
451 * the DOM afterwards through progressBar.element.
452 *
453 * method is the function which will perform the HTTP request to get the
454 * progress bar state. Either "GET" or "POST".
455 *
456 * e.g. pb = new progressBar('myProgressBar');
457 *      some_element.appendChild(pb.element);
458 */
459Drupal.progressBar = function (id, updateCallback, method, errorCallback) {
460  var pb = this;
461  this.id = id;
462  this.method = method || 'GET';
463  this.updateCallback = updateCallback;
464  this.errorCallback = errorCallback;
465
466  // The WAI-ARIA setting aria-live="polite" will announce changes after users
467  // have completed their current activity and not interrupt the screen reader.
468  this.element = $('<div class="progress-wrapper" aria-live="polite"></div>');
469  this.element.html('<div id ="' + id + '" class="progress progress-striped active">' +
470                    '<div class="progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0">' +
471                    '<div class="percentage sr-only"></div>' +
472                    '</div></div>' +
473                    '</div><div class="percentage pull-right"></div>' +
474                    '<div class="message">&nbsp;</div>');
475};
476
477/**
478 * Set the percentage and status message for the progressbar.
479 */
480Drupal.progressBar.prototype.setProgress = function (percentage, message) {
481  if (percentage >= 0 && percentage <= 100) {
482    $('div.progress-bar', this.element).css('width', percentage + '%');
483    $('div.progress-bar', this.element).attr('aria-valuenow', percentage);
484    $('div.percentage', this.element).html(percentage + '%');
485  }
486  $('div.message', this.element).html(message);
487  if (this.updateCallback) {
488    this.updateCallback(percentage, message, this);
489  }
490};
491
492/**
493 * Start monitoring progress via Ajax.
494 */
495Drupal.progressBar.prototype.startMonitoring = function (uri, delay) {
496  this.delay = delay;
497  this.uri = uri;
498  this.sendPing();
499};
500
501/**
502 * Stop monitoring progress via Ajax.
503 */
504Drupal.progressBar.prototype.stopMonitoring = function () {
505  clearTimeout(this.timer);
506  // This allows monitoring to be stopped from within the callback.
507  this.uri = null;
508};
509
510/**
511 * Request progress data from server.
512 */
513Drupal.progressBar.prototype.sendPing = function () {
514  if (this.timer) {
515    clearTimeout(this.timer);
516  }
517  if (this.uri) {
518    var pb = this;
519    // When doing a post request, you need non-null data. Otherwise a
520    // HTTP 411 or HTTP 406 (with Apache mod_security) error may result.
521    $.ajax({
522      type: this.method,
523      url: this.uri,
524      data: '',
525      dataType: 'json',
526      success: function (progress) {
527        // Display errors.
528        if (progress.status == 0) {
529          pb.displayError(progress.data);
530          return;
531        }
532        // Update display.
533        pb.setProgress(progress.percentage, progress.message);
534        // Schedule next timer.
535        pb.timer = setTimeout(function () { pb.sendPing(); }, pb.delay);
536      },
537      error: function (xmlhttp) {
538        pb.displayError(Drupal.ajaxError(xmlhttp, pb.uri));
539      }
540    });
541  }
542};
543
544/**
545 * Display errors on the page.
546 */
547Drupal.progressBar.prototype.displayError = function (string) {
548  var error = $('<div class="alert alert-block alert-error"><a class="close" data-dismiss="alert" href="#">&times;</a><h4>Error message</h4></div>').append(string);
549  $(this.element).before(error).hide();
550
551  if (this.errorCallback) {
552    this.errorCallback(this);
553  }
554};
555
556})(jQuery);
557;
558/**
559 * @file
560 * Handles AJAX fetching of views, including filter submission and response.
561 */
562(function ($) {
563
564  /**
565   * Attaches the AJAX behavior to exposed filter forms and key views links.
566   */
567  Drupal.behaviors.ViewsAjaxView = {};
568  Drupal.behaviors.ViewsAjaxView.attach = function() {
569    if (Drupal.settings && Drupal.settings.views && Drupal.settings.views.ajaxViews) {
570      $.each(Drupal.settings.views.ajaxViews, function(i, settings) {
571        Drupal.views.instances[i] = new Drupal.views.ajaxView(settings);
572      });
573    }
574  };
575
576  Drupal.views = {};
577  Drupal.views.instances = {};
578
579  /**
580   * JavaScript object for a certain view.
581   */
582  Drupal.views.ajaxView = function(settings) {
583    var selector = '.view-dom-id-' + settings.view_dom_id;
584    this.$view = $(selector);
585
586    // Retrieve the path to use for views' ajax.
587    var ajax_path = Drupal.settings.views.ajax_path;
588
589    // If there are multiple views this might've ended up showing up multiple
590    // times.
591    if (ajax_path.constructor.toString().indexOf("Array") != -1) {
592      ajax_path = ajax_path[0];
593    }
594
595    // Check if there are any GET parameters to send to views.
596    var queryString = window.location.search || '';
597    if (queryString !== '') {
598      // Remove the question mark and Drupal path component if any.
599      var queryString = queryString.slice(1).replace(/q=[^&]+&?|&?render=[^&]+/, '');
600      if (queryString !== '') {
601        // If there is a '?' in ajax_path, clean url are on and & should be
602        // used to add parameters.
603        queryString = ((/\?/.test(ajax_path)) ? '&' : '?') + queryString;
604      }
605    }
606
607    this.element_settings = {
608      url: ajax_path + queryString,
609      submit: settings,
610      setClick: true,
611      event: 'click',
612      selector: selector,
613      progress: {
614        type: 'throbber'
615      }
616    };
617
618    this.settings = settings;
619
620    // Add the ajax to exposed forms.
621    this.$exposed_form = $('#views-exposed-form-' + settings.view_name.replace(/_/g, '-') + '-' + settings.view_display_id.replace(/_/g, '-'));
622    this.$exposed_form.once(jQuery.proxy(this.attachExposedFormAjax, this));
623
624    // Store Drupal.ajax objects here for all pager links.
625    this.links = [];
626
627    // Add the ajax to pagers.
628    this.$view
629      .once(jQuery.proxy(this.attachPagerAjax, this));
630
631    // Add a trigger to update this view specifically. In order to trigger a
632    // refresh use the following code.
633    //
634    // @code
635    // jQuery('.view-name').trigger('RefreshView');
636    // @endcode
637    // Add a trigger to update this view specifically.
638    var self_settings = this.element_settings;
639    self_settings.event = 'RefreshView';
640    var self = this;
641    this.$view.once('refresh', function () {
642      self.refreshViewAjax = new Drupal.ajax(self.selector, self.$view, self_settings);
643    });
644  };
645
646  Drupal.views.ajaxView.prototype.attachExposedFormAjax = function() {
647    var button = $('input[type=submit], button[type=submit], input[type=image]', this.$exposed_form);
648    button = button[0];
649
650    // Call the autocomplete submit before doing AJAX.
651    $(button).click(function () {
652      if (Drupal.autocompleteSubmit) {
653        Drupal.autocompleteSubmit();
654      }
655    });
656
657    this.exposedFormAjax = new Drupal.ajax($(button).attr('id'), button, this.element_settings);
658  };
659
660  /**
661   * Attach the ajax behavior to each link.
662   */
663  Drupal.views.ajaxView.prototype.attachPagerAjax = function() {
664    this.$view.find('ul.pager > li > a, ol.pager > li > a, th.views-field a, .attachment .views-summary a')
665      .each(jQuery.proxy(this.attachPagerLinkAjax, this));
666  };
667
668  /**
669   * Attach the ajax behavior to a single link.
670   */
671  Drupal.views.ajaxView.prototype.attachPagerLinkAjax = function(id, link) {
672    var $link = $(link);
673    var viewData = {};
674    var href = $link.attr('href');
675    // Don't attach to pagers inside nested views.
676    if ($link.closest('.view')[0] !== this.$view[0] &&
677      $link.closest('.view').parent().hasClass('attachment') === false) {
678      return;
679    }
680
681    // Provide a default page if none has been set. This must be done
682    // prior to merging with settings to avoid accidentally using the
683    // page landed on instead of page 1.
684    if (typeof(viewData.page) === 'undefined') {
685      viewData.page = 0;
686    }
687
688    // Construct an object using the settings defaults and then overriding
689    // with data specific to the link.
690    $.extend(
691      viewData,
692      this.settings,
693      Drupal.Views.parseQueryString(href),
694      // Extract argument data from the URL.
695      Drupal.Views.parseViewArgs(href, this.settings.view_base_path)
696    );
697
698    // For anchor tags, these will go to the target of the anchor rather
699    // than the usual location.
700    $.extend(viewData, Drupal.Views.parseViewArgs(href, this.settings.view_base_path));
701
702    this.element_settings.submit = viewData;
703    this.pagerAjax = new Drupal.ajax(false, $link, this.element_settings);
704    this.links.push(this.pagerAjax);
705  };
706
707  Drupal.ajax.prototype.commands.viewsScrollTop = function (ajax, response, status) {
708    // Scroll to the top of the view. This will allow users
709    // to browse newly loaded content after e.g. clicking a pager
710    // link.
711    var offset = $(response.selector).offset();
712    // We can't guarantee that the scrollable object should be
713    // the body, as the view could be embedded in something
714    // more complex such as a modal popup. Recurse up the DOM
715    // and scroll the first element that has a non-zero top.
716    var scrollTarget = response.selector;
717    while ($(scrollTarget).scrollTop() == 0 && $(scrollTarget).parent()) {
718      scrollTarget = $(scrollTarget).parent();
719    }
720    // Only scroll upward.
721    if (offset.top - 10 < $(scrollTarget).scrollTop()) {
722      $(scrollTarget).animate({scrollTop: (offset.top - 10)}, 500);
723    }
724  };
725
726})(jQuery);
727;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.