1Drupal.locale = { 'pluralFormula': function ($n) { return Number(($n!=1)); }, 'strings': {"":{"An AJAX HTTP error occurred.":"Si \u00e8 verificato un errore HTTP in AJAX.","HTTP Result Code: !status":"Codice HTTP di risposta: !status","An AJAX HTTP request terminated abnormally.":"Una richiesta AJAX HTTP \u00e8 terminata in modo anomalo.","Debugging information follows.":"Di seguito le informazioni di debug.","Path: !uri":"Percorso: !uri","StatusText: !statusText":"StatusText: !statusText","ResponseText: !responseText":"ResponseText: !responseText","ReadyState: !readyState":"ReadyState: !readyState","CustomMessage: !customMessage":"Messaggio personalizzato: !customMessage","Next":"Seguente","Disabled":"Disattivato","Enabled":"Attivato","Edit":"Modifica","Sunday":"Domenica","Monday":"Luned\u00ec","Tuesday":"Marted\u00ec","Wednesday":"Mercoled\u00ec","Thursday":"Gioved\u00ec","Friday":"Venerd\u00ec","Saturday":"Sabato","Add":"Aggiungi","View":"Visualizza","Upload":"Carica","Configure":"Configura","All":"Tutti","Done":"Fatto","This field is required.":"Questo campo \u00e8 obbligatorio.","Prev":"Precedente","Mon":"Lun","Tue":"Mar","Wed":"Mer","Thu":"Gio","Fri":"Ven","Sat":"Sab","Sun":"Dom","January":"Gennaio","February":"Febbraio","March":"Marzo","April":"Aprile","May":"Mag","June":"Giugno","July":"Luglio","August":"Agosto","September":"Settembre","October":"Ottobre","November":"Novembre","December":"Dicembre","Show":"Mostra","Select all rows in this table":"Seleziona tutte le righe in questa tabella","Deselect all rows in this table":"Deseleziona tutte le righe in questa tabella","Today":"Oggi","Jan":"Gen","Feb":"Feb","Mar":"Mar","Apr":"Apr","Jun":"Giu","Jul":"Lug","Aug":"Ago","Sep":"Set","Oct":"Ott","Nov":"Nov","Dec":"Dic","Su":"Do","Mo":"Lu","Tu":"Ma","We":"Me","Th":"Gi","Fr":"Ve","Sa":"Sa","Not published":"Non pubblicato","Please wait...":"Attendere prego...","Hide":"Nascondi","Loading":"Caricamento","mm\/dd\/yy":"mm\/gg\/aa","Only files with the following extensions are allowed: %files-allowed.":"Sono consentiti solo i file con le seguenti estensioni: %files-allowed.","By @name on @date":"Da @name il @date","By @name":"Da @name","Not in menu":"Non nel menu","Alias: @alias":"Alias: @alias","No alias":"Nessun alias","New revision":"Nuova revisione","Drag to re-order":"Trascina per riordinare","Changes made in this table will not be saved until the form is submitted.":"I cambiamenti fatti a questa tabella non saranno salvati finch\u00e8 il form non viene inviato.","The changes to these blocks will not be saved until the \u003Cem\u003ESave blocks\u003C\/em\u003E button is clicked.":"I cambiamenti a questi blocchi non saranno salvati finch\u00e9 il bottone \u003Cem\u003ESalva blocchi\u003C\/em\u003E \u00e8 cliccato.","Flag translations as outdated":"Segna traduzioni come obsolete","Show shortcuts":"Mostra scorciatoie","This permission is inherited from the authenticated user role.":"Questo permesso viene ereditato dal ruolo utente autenticato.","No revision":"Nessuna revisione","@number comments per page":"@number commenti per pagina","Requires a title":"Richiede un titolo","Not restricted":"Non limitato","(active tab)":"(scheda attiva)","Not customizable":"Non personalizzabile","Restricted to certain pages":"Limitato a certe pagine","The block cannot be placed in this region.":"Il blocco non pu\u00f2 essere posizionato in questa regione.","Customize dashboard":"Personalizza la dashboard","Hide summary":"Nascondi sommario","Edit summary":"Modifica sommario","Don\u0027t display post information":"Non mostrare le informazioni di pubblicazione","@title dialog":"Finestra di dialogo @title","The selected file %filename cannot be uploaded. Only files with the following extensions are allowed: %extensions.":"Il file selezionato %filename non pu\u00f2 essere caricato. Sono consentiti solo file con le seguenti estensioni: %extensions.","Re-order rows by numerical weight instead of dragging.":"Riordina le righe utilizzando il peso numerico invece del trascinamento.","Show row weights":"Visualizza i pesi delle righe","Hide row weights":"Nascondi i pesi delle righe","Autocomplete popup":"Popup di autocompletamento","Searching for matches...":"Ricerca in corso...","Hide shortcuts":"Nascondi scorciatoie","The response failed verification so will not be processed.":"La risposta non ha superato la verifica, quindi non verr\u00e0 elaborata.","The callback URL is not local and n
vendor: 18,605 bytes, lines 1-9
1ot trusted: !url":"L\u0027URL di callback non \u00e8 locale o non \u00e8 affidabile: !url","No results":"Nessun risultato","Read more":"Leggi tutto","The content of this section has been blocked for compliance with EU cookie regulation.":"Il contenuto di questa sezione \u00e8 stato bloccato per conformit\u00e0 con la normativa UE sui cookie.","To view the frame you need accept youtube cookies":"Per visualizzare il frame \u00e8 necessario accettare i cookie di youtube","To view the Video content you must accept YouTube cookies by clicking on the Privacy banner at the bottom of the page.":"Per visualizzare i contenuti video \u00e8 necessario accettare i cookie di YouTube cliccando sul banner Privacy in fondo pagina","To view this content you must accept the cookies. Click here or on the Cookie Preferences banner at the bottom and accept the video\/social cookies.":"Per visualizzare questo contenuto \u00e8 necessario accettare i cookie. Clicca qui o sul banner in fondo Preferenze Cookie e accetta i cookie video\/social."}} };; 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: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/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */ 9!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return e.apply(t,o)}),s||(s=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return new e(...n)});const u=D(Array.prototype.forEach),m=D(Array.prototype.lastIndexOf),p=D(Array.prototype.pop),f=D(Array.prototype.push),d=D(Array.prototype.splice),h=D(String.prototype.toLowerCase),g=D(String.prototype.toString),T=D(String.prototype.match),y=D(String.prototype.replace),E=D(String.prototype.indexOf),A=D(String.prototype.trim),_=D(Object.prototype.hasOwnProperty),b=D(RegExp.prototype.test),S=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(N,t)});var N;function D(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function R(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function w(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function C(t){const n=l(null);for(const[o,r]of e(t)){_(t,o)&&(Array.isArray(r)?n[o]=w(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=C(r):n[o]=r)}return n}function O(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return D(n.get);if("function"==typeof n.value)return D(n.value)}e=o(e)}return function(){return null}}const v=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),k=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),L=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),M=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
9spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),F=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),H=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),G=a(/<%[\w\W]*|[\w\W]*%>/gm),W=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:G,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:W});const J=1,Q=3,ee=7,te=8,ne=9,oe=function(){return"undefined"==typeof window?null:window};var re=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const o=e=>t(e);if(o.version="3.3.3",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:D,Element:w,NodeFilter:B,NamedNodeMap:G=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:W,DOMParser:Y,trustedTypes:j}=n,q=w.prototype,$=O(q,"cloneNode"),V=O(q,"remove"),re=O(q,"nextSibling"),ie=O(q,"childNodes"),ae=O(q,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let le,ce="";const{implementation:se,createNodeIterator:ue,createDocumentFragment:me,getElementsByTagName:pe}=r,{importNode:fe}=a;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ae&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:Te,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:be}=Z;let{IS_ALLOWED_URI:Se}=Z,Ne=null;const De=R({},[...v,...k,...x,...I,...U]);let Re=null;const we=R({},[...z,...P,...F,...H]);let Ce=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Oe=null,ve=null;
vendor: 4,218 bytes, line 9
9const ke=Object.seal(l(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let xe=!0,Le=!0,Ie=!1,Me=!0,Ue=!1,ze=!0,Pe=!1,Fe=!1,He=!1,Be=!1,Ge=!1,We=!1,Ye=!0,je=!1,Xe=!0,qe=!1,$e={},Ke=null;const Ve=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ze=null;const Je=R({},["audio","video","img","source","image","track"]);let Qe=null;const et=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tt="http://www.w3.org/1998/Math/MathML",nt="http://www.w3.org/2000/svg",ot="http://www.w3.org/1999/xhtml";let rt=ot,it=!1,at=null;const lt=R({},[tt,nt,ot],g);let ct=R({},["mi","mo","mn","ms","mtext"]),st=R({},["annotation-xml"]);const ut=R({},["title","style","font","a","script"]);let mt=null;const pt=["application/xhtml+xml","text/html"];let ft=null,dt=null;const ht=r.createElement("form"),gt=function(e){return e instanceof RegExp||e instanceof Function},Tt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!dt||dt!==e){if(e&&"object"==typeof e||(e={}),e=C(e),mt=-1===pt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ft="application/xhtml+xml"===mt?g:h,Ne=_(e,"ALLOWED_TAGS")?R({},e.ALLOWED_TAGS,ft):De,Re=_(e,"ALLOWED_ATTR")?R({},e.ALLOWED_ATTR,ft):we,at=_(e,"ALLOWED_NAMESPACES")?R({},e.ALLOWED_NAMESPACES,g):lt,Qe=_(e,"ADD_URI_SAFE_ATTR")?R(C(et),e.ADD_URI_SAFE_ATTR,ft):et,Ze=_(e,"ADD_DATA_URI_TAGS")?R(C(Je),e.ADD_DATA_URI_TAGS,ft):Je,Ke=_(e,"FORBID_CONTENTS")?R({},e.FORBID_CONTENTS,ft):Ve,Oe=_(e,"FORBID_TAGS")?R({},e.FORBID_TAGS,ft):C({}),ve=_(e,"FORBID_ATTR")?R({},e.FORBID_ATTR,ft):C({}),$e=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,xe=!1!==e.ALLOW_ARIA_ATTR,Le=!1!==e.ALLOW_DATA_ATTR,Ie=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ue=e.SAFE_FOR_TEMPLATES||!1,ze=!1!==e.SAFE_FOR_XML,Pe=e.WHOLE_DOCUMENT||!1,Be=e.RETURN_DOM||!1,Ge=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,Ye=!1!==e.SANITIZE_DOM,je=e.SANITIZE_NAMED_PROPS||!1,Xe=!1!==e.KEEP_CONTENT,qe=e.IN_PLACE||!1,Se=e.ALLOWED_URI_REGEXP||X,rt=e.NAMESPACE||ot,ct=e.MATHML_TEXT_INTEGRATION_POINTS||ct,st=e.HTML_INTEGRATION_POINTS||st,Ce=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&>(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&>(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ue&&(Le=!1),Ge&&(Be=!0),$e&&(Ne=R({},U),Re=l(null),!0===$e.html&&(R(Ne,v),R(Re,z)),!0===$e.svg&&(R(Ne,k),R(Re,P),R(Re,H)),!0===$e.svgFilters&&(R(Ne,x),R(Re,P),R(Re,H)),!0===$e.mathMl&&(R(Ne,I),R(Re,F),R(Re,H))),_(e,"ADD_TAGS")||(ke.tagCheck=null),_(e,"ADD_ATTR")||(ke.attributeCheck=null),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?ke.tagCheck=e.ADD_TAGS:(Ne===De&&(Ne=C(Ne)),R(Ne,e.ADD_TAGS,ft))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?ke.attributeCheck=e.ADD_ATTR:(Re===we&&(Re=C(Re)),R(Re,e.ADD_ATTR,ft))),e.ADD_URI_SAFE_ATTR&&R(Qe,e.ADD_URI_SAFE_ATTR,ft),e.FORBID_CONTENTS&&(Ke===Ve&&(Ke=C(Ke)),R(Ke,e.FORBID_CONTENTS,ft)),e.ADD_FORBID_CONTENTS&&(Ke===Ve&&(Ke=C(Ke)),R(Ke,e.ADD_FORBID_CONTENTS,ft)),Xe&&(Ne["#text"]=!0),Pe&&R(Ne,["html","head","body"]),Ne.table&&(R(Ne,["tbody"]),delete Oe.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');le=e.TRUSTED_TYPES_POLICY,ce=le.createHTML("")}else void 0===le&&(le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;
vendor: 7,610 bytes, line 9
9const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,c)),null!==le&&"string"==typeof ce&&(ce=le.createHTML(""));i&&i(e),dt=e}},yt=R({},[...k,...x,...L]),Et=R({},[...I,...M]),At=function(e){f(o.removed,{element:e});try{ae(e).removeChild(e)}catch(t){V(e)}},_t=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Be||Ge)try{At(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},bt=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===mt&&rt===ot&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=le?le.createHTML(e):e;if(rt===ot)try{t=(new Y).parseFromString(o,mt)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(rt,"template",null);try{t.documentElement.innerHTML=it?ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),rt===ot?pe.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:i},St=function(e){return ue.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},Nt=function(e){return e instanceof W&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof G)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Dt=function(e){return"function"==typeof D&&e instanceof D};function Rt(e,t,n){u(e,(e=>{e.call(o,t,n,dt)}))}const wt=function(e){let t=null;if(Rt(de.beforeSanitizeElements,e,null),Nt(e))return At(e),!0;const n=ft(e.nodeName);if(Rt(de.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),ze&&e.hasChildNodes()&&!Dt(e.firstElementChild)&&b(/<[/\w!]/g,e.innerHTML)&&b(/<[/\w!]/g,e.textContent))return At(e),!0;if(e.nodeType===ee)return At(e),!0;if(ze&&e.nodeType===te&&b(/<[/\w]/g,e.data))return At(e),!0;if(!(ke.tagCheck instanceof Function&&ke.tagCheck(n))&&(!Ne[n]||Oe[n])){if(!Oe[n]&&Ot(n)){if(Ce.tagNameCheck instanceof RegExp&&b(Ce.tagNameCheck,n))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))return!1}if(Xe&&!Ke[n]){const t=ae(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return At(e),!0}return e instanceof w&&!function(e){let t=ae(e);t&&t.tagName||(t={namespaceURI:rt,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!at[e.namespaceURI]&&(e.namespaceURI===nt?t.namespaceURI===ot?"svg"===n:t.namespaceURI===tt?"svg"===n&&("annotation-xml"===o||ct[o]):Boolean(yt[n]):e.namespaceURI===tt?t.namespaceURI===ot?"math"===n:t.namespaceURI===nt?"math"===n&&st[o]:Boolean(Et[n]):e.namespaceURI===ot?!(t.namespaceURI===nt&&!st[o])&&!(t.namespaceURI===tt&&!ct[o])&&!Et[n]&&(ut[n]||!yt[n]):!("application/xhtml+xml"!==mt||!at[e.namespaceURI]))}(e)?(At(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ue&&e.nodeType===Q&&(t=e.textContent,u([he,ge,Te],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Rt(de.afterSanitizeElements,e,null),!1):(At(e),!0)},Ct=function(e,t,n){if(ve[t])return!1;if(Ye&&("id"===t||"name"===t)&&(n in r||n in ht))return!1;if(Le&&!ve[t]&&b(ye,t));else if(xe&&b(Ee,t));else if(ke.attributeCheck instanceof Function&&ke.attributeCheck(t,e));else if(!Re[t]||ve[t]){if(!(Ot(e)&&(Ce.tagNameCheck instanceof RegExp&&b(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&b(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t,e))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&b(Ce.tagNameCheck,n)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))))return!1}else if(Qe[t]);else if(b(Se,y(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ze[e]){if(Ie&&!b(Ae,y(n,_e,"")));else if(n)return!1}else;return!0},Ot=function(e){return"annotation-xml"!==e&&T(e,be)},vt=function(e){Rt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Nt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Re,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=ft(a),m=c;let f="value"===a?m:A(m);if(n.attrName=s,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,Rt(de.uponSanitizeAttribute,e,n),f=n.attrValue,!je||"id"!==s&&"name"!==s||(_t(a,e),f="user-content-"+f),ze&&b(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){_t(a,e);continue}if("attributename"===s&&T(f,"href")){_t(a,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){_t(a,e);continue}if(!Me&&b(/\/>/i,f)){_t(a,e);continue}Ue&&u([he,ge,Te],(e=>{f=y(f,e," ")}));const d=ft(e.nodeName);if(Ct(d,s,f)){if(le&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(d,s)){case"TrustedHTML":f=le.createHTML(f);break;case"TrustedScriptURL":f=le.createScriptURL(f)}if(f!==m)try{l?e.setAttributeNS(l,a,f):e.setAttribute(a,f),Nt(e)?At(e):p(o.removed)}catch(t){_t(a,e)}}else _t(a,e)}Rt(de.afterSanitizeAttributes,e,null)},kt=function e(t){let n=null;const o=St(t);for(Rt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Rt(de.uponSanitizeShadowNode,n,null),wt(n),vt(n),n.content instanceof s&&e(n.content);Rt(de.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(it=!e,it&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Dt(e)){if("function"!=typeof e.toString)throw S("toString is not a function");if("string"!=typeof(e=e.toString()))throw S("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Fe||Tt(t),o.removed=[],"string"==typeof e&&(qe=!1),qe){if(e.nodeName){const t=ft(e.nodeName);if(!Ne[t]||Oe[t])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof D)n=bt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Be&&!Ue&&!Pe&&-1===e.indexOf("<"))return le&&We?le.createHTML(e):e;if(n=bt(e),!n)return Be?null:We?ce:""}n&&He&&At(n.firstChild);const c=St(qe?e:n);for(;i=c.nextNode();)wt(i),vt(i),i.content instanceof s&&kt(i.content);if(qe)return e;if(Be){if(Ge)for(l=me.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Re.shadowroot||Re.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let m=Pe?n.outerHTML:n.innerHTML;return Pe&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&b(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Ue&&u([he,ge,Te],(e=>{m=y(m,e," ")})),le&&We?le.createHTML(m):m},o.setConfig=function(){Tt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Fe=!0},o.clearConfig=function(){dt=null,Fe=!1},o.isValidAttribute=function(e,t,n){dt||Tt({});const o=ft(e),r=ft(t);return Ct(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(de[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(de[e],t);
9return-1===n?void 0:d(de[e],n,1)[0]}return p(de[e])},o.removeHooks=function(e){de[e]=[]},o.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return re})); 10 11; 12/** 13 * @file 14 * Colorbox module init js. 15 */ 16 17(function ($) { 18 19Drupal.behaviors.initColorbox = { 20 attach: function (context, settings) { 21 if (!$.isFunction($('a, area, input', context).colorbox) || typeof settings.colorbox === 'undefined') { 22 return; 23 } 24 25 if (settings.colorbox.mobiledetect && window.matchMedia) { 26 // Disable Colorbox for small screens. 27 var mq = window.matchMedia("(max-device-width: " + settings.colorbox.mobiledevicewidth + ")"); 28 if (mq.matches) { 29 return; 30 } 31 } 32 33 // Use "data-colorbox-gallery" if set otherwise use "rel". 34 settings.colorbox.rel = function () { 35 if ($(this).data('colorbox-gallery')) { 36 return $(this).data('colorbox-gallery'); 37 } 38 else { 39 return $(this).attr('rel'); 40 } 41 }; 42 43 $('.colorbox', context) 44 .once('init-colorbox').each(function(){ 45 // Only images are supported for the "colorbox" class. 46 // The "photo" setting forces the href attribute to be treated as an image. 47 var extendParams = { 48 photo: true 49 }; 50 // If a title attribute is supplied, sanitize it. 51 var title = $(this).attr('title'); 52 if (title) { 53 extendParams.title = Drupal.colorbox.sanitizeMarkup(title); 54 } 55 $(this).colorbox($.extend({}, settings.colorbox, extendParams)); 56 }); 57 58 $(context).bind('cbox_complete', function () { 59 Drupal.attachBehaviors($('#cboxLoadedContent')); 60 }); 61 } 62}; 63 64// Create colorbox namespace if it doesn't exist. 65if (!Drupal.hasOwnProperty('colorbox')) { 66 Drupal.colorbox = {}; 67} 68 69/** 70 * Global function to allow sanitizing captions and control strings. 71 * 72 * @param markup 73 * String containing potential markup. 74 * @return @string 75 * Sanitized string with potentially dangerous markup removed. 76 */ 77Drupal.colorbox.sanitizeMarkup = function(markup) { 78 // If DOMPurify installed, allow some HTML. Otherwise, treat as plain text. 79 if (typeof DOMPurify !== 'undefined') { 80 var purifyConfig = { 81 ALLOWED_TAGS: [ 82 'a', 83 'b', 84 'strong', 85 'i', 86 'em', 87 'u', 88 'cite', 89 'code', 90 'br' 91 ], 92 ALLOWED_ATTR: [ 93 'href', 94 'hreflang', 95 'title', 96 'target' 97 ] 98 } 99 if (Drupal.settings.hasOwnProperty('dompurify_custom_config')) { 100 purifyConfig = Drupal.settings.dompurify_custom_config; 101 } 102 return DOMPurify.sanitize(markup, purifyConfig); 103 } 104 else { 105 return Drupal.checkPlain(markup); 106 } 107} 108 109})(jQuery); 110; 111/** 112 * @file 113 * Colorbox module load js. 114 */ 115(function ($) { 116 117Drupal.behaviors.initColorboxLoad = { 118 attach: function (context, settings) { 119 if (!$.isFunction($.colorbox) || typeof settings.colorbox === 'undefined') { 120 return; 121 } 122 123 if (settings.colorbox.mobiledetect && window.matchMedia) { 124 // Disable Colorbox for small screens. 125 var mq = window.matchMedia("(max-device-width: " + settings.colorbox.mobiledevicewidth + ")"); 126 if (mq.matches) { 127 return; 128 } 129 } 130 131 $.urlParams = function (url) { 132 var p = {}, 133 e, 134 a = /\+/g, // Regex for replacing addition symbol with a space. 135 r = /([^&=]+)=?([^&]*)/g, 136 d = function (s) { return decodeURIComponent(s.replace(a, ' ')); }, 137 q = url.split('?'); 138 while (e = r.exec(q[1])) { 139 e[1] = d(e[1]); 140 e[2] = d(e[2]); 141 switch (e[2].toLowerCase()) { 142 case 'true': 143 case 'yes': 144 e[2] = true; 145 break; 146 case 'false': 147 case 'no': 148 e[2] = false; 149 break; 150 } 151 if (e[1] == 'width') { e[1] = 'innerWidth'; }
152 if (e[1] == 'height') { e[1] = 'innerHeight'; } 153 if (e[2]) { 154 e[2] = Drupal.checkPlain(e[2]); 155 } 156 p[e[1]] = e[2]; 157 } 158 return p; 159 }; 160 161 $('.colorbox-load', context) 162 .once('init-colorbox-load', function () { 163 var href = $(this).attr('href'); 164 165 var params = $.urlParams(href); 166 167 // Always load in an iframe. 168 params.iframe = true; 169 170 // Set inner width and height if not already specified. 171 if (!params.hasOwnProperty('innerWidth')) { 172 params.innerWidth = $(window).width() * .8; 173 } 174 if (!params.hasOwnProperty('innerHeight')) { 175 params.innerHeight = $(window).height() * .8; 176 } 177 178 if (!params.hasOwnProperty('title')) { 179 // If a title attribute is supplied, sanitize it. 180 var title = $(this).attr('title'); 181 if (title) { 182 params.title = Drupal.colorbox.sanitizeMarkup(title); 183 } 184 } 185 $(this).colorbox($.extend({}, settings.colorbox, params)); 186 }); 187 } 188}; 189 190})(jQuery); 191; 192/** 193 * @file 194 * Colorbox module inline js. 195 */ 196 197(function ($) { 198 199Drupal.behaviors.initColorboxInline = { 200 attach: function (context, settings) { 201 if (!$.isFunction($.colorbox) || typeof settings.colorbox === 'undefined') { 202 return; 203 } 204 205 if (settings.colorbox.mobiledetect && window.matchMedia) { 206 // Disable Colorbox for small screens. 207 var mq = window.matchMedia("(max-device-width: " + settings.colorbox.mobiledevicewidth + ")"); 208 if (mq.matches) { 209 return; 210 } 211 } 212 213 $.urlParam = function(name, url){ 214 if (name == 'fragment') { 215 var results = new RegExp('(#[^&#]*)').exec(url); 216 } 217 else { 218 var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(url); 219 } 220 if (!results) { return ''; } 221 return results[1] || ''; 222 }; 223 $('.colorbox-inline', context).once('init-colorbox-inline').colorbox({ 224 transition:settings.colorbox.transition, 225 speed:settings.colorbox.speed, 226 opacity:settings.colorbox.opacity, 227 slideshow:settings.colorbox.slideshow, 228 slideshowAuto:settings.colorbox.slideshowAuto, 229 slideshowSpeed:settings.colorbox.slideshowSpeed, 230 slideshowStart:settings.colorbox.slideshowStart, 231 slideshowStop:settings.colorbox.slideshowStop, 232 current:settings.colorbox.current, 233 previous:settings.colorbox.previous, 234 next:settings.colorbox.next, 235 close:settings.colorbox.close, 236 overlayClose:settings.colorbox.overlayClose, 237 maxWidth:settings.colorbox.maxWidth, 238 maxHeight:settings.colorbox.maxHeight, 239 innerWidth:function(){ 240 return $.urlParam('width', $(this).attr('href')); 241 }, 242 innerHeight:function(){ 243 return $.urlParam('height', $(this).attr('href')); 244 }, 245 title:function(){ 246 return Drupal.colorbox.sanitizeMarkup( 247 decodeURIComponent($.urlParam('title', $(this).attr('href')))); 248 }, 249 iframe:function(){ 250 return $.urlParam('iframe', $(this).attr('href')); 251 }, 252 inline:function(){ 253 return $.urlParam('inline', $(this).attr('href')); 254 }, 255 href:function(){ 256 return $.urlParam('fragment', $(this).attr('href')); 257 } 258 }); 259 } 260}; 261 262})(jQuery); 263; 264(function ($) { 265 266 Drupal.behaviors.captcha = { 267 attach: function (context) { 268 269 // Turn off autocompletion for the CAPTCHA response field. 270 // We do it here with JavaScript (instead of directly in the markup) 271 // because this autocomplete attribute is not standard and 272 // it would break (X)HTML compliance. 273 $("#edit-captcha-response").attr("autocomplete", "off"); 274 275 } 276 }; 277 278 Drupal.behaviors.captchaAdmin = { 279 attach: function (context) { 280 // Add onclick handler to checkbox for adding a CAPTCHA description 281 // so that the textfields for the CAPTCHA description are hidden 282 // when no description should be added. 283 // @todo: div.form-item-captcha-description depends on theming, maybe
284 // it's better to add our own wrapper with id (instead of a class). 285 $("#edit-captcha-add-captcha-description").click(function() { 286 if ($("#edit-captcha-add-captcha-description").is(":checked")) { 287 // Show the CAPTCHA description textfield(s). 288 $("div.form-item-captcha-description").show('slow'); 289 } 290 else { 291 // Hide the CAPTCHA description textfield(s). 292 $("div.form-item-captcha-description").hide('slow'); 293 } 294 }); 295 // Hide the CAPTCHA description textfields if option is disabled on page load. 296 if (!$("#edit-captcha-add-captcha-description").is(":checked")) { 297 $("div.form-item-captcha-description").hide(); 298 } 299 } 300 301 }; 302 303})(jQuery); 304; 305/** 306 * @file 307 * Some basic behaviors and utility functions for Views. 308 */ 309(function ($) { 310 311 Drupal.Views = {}; 312 313 /** 314 * JQuery UI tabs, Views integration component. 315 */ 316 Drupal.behaviors.viewsTabs = { 317 attach: function (context) { 318 if ($.viewsUi && $.viewsUi.tabs) { 319 $('#views-tabset').once('views-processed').viewsTabs({ 320 selectedClass: 'active' 321 }); 322 } 323 324 $('a.views-remove-link').once('views-processed').click(function (event) { 325 var id = $(this).attr('id').replace('views-remove-link-', ''); 326 $('#views-row-' + id).hide(); 327 $('#views-removed-' + id).get(0).checked = true; 328 event.preventDefault(); 329 }); 330 // Here is to handle display deletion 331 // (checking in the hidden checkbox and hiding out the row). 332 $('a.display-remove-link') 333 .addClass('display-processed') 334 .click(function () { 335 var id = $(this).attr('id').replace('display-remove-link-', ''); 336 $('#display-row-' + id).hide(); 337 $('#display-removed-' + id).get(0).checked = true; 338 return false; 339 }); 340 } 341 }; 342 343 /** 344 * Helper function to parse a querystring. 345 */ 346 Drupal.Views.parseQueryString = function (query) { 347 var args = {}; 348 var pos = query.indexOf('?'); 349 if (pos != -1) { 350 query = query.substring(pos + 1); 351 } 352 var pairs = query.split('&'); 353 for (var i in pairs) { 354 if (typeof(pairs[i]) == 'string') { 355 var pair = pairs[i].split('='); 356 // Ignore the 'q' path argument, if present. 357 if (pair[0] != 'q' && pair[1]) { 358 args[decodeURIComponent(pair[0].replace(/\+/g, ' '))] = decodeURIComponent(pair[1].replace(/\+/g, ' ')); 359 } 360 } 361 } 362 return args; 363 }; 364 365 /** 366 * Helper function to return a view's arguments based on a path. 367 */ 368 Drupal.Views.parseViewArgs = function (href, viewPath) { 369 // Provide language prefix. 370 if (Drupal.settings.pathPrefix) { 371 var viewPath = Drupal.settings.pathPrefix + viewPath; 372 } 373 var returnObj = {}; 374 var path = Drupal.Views.getPath(href); 375 // Ensure there is a correct path. 376 if (viewPath && path.substring(0, viewPath.length + 1) == viewPath + '/') { 377 var args = decodeURIComponent(path.substring(viewPath.length + 1, path.length)); 378 returnObj.view_args = args; 379 returnObj.view_path = path; 380 } 381 return returnObj; 382 }; 383 384 /** 385 * Strip off the protocol plus domain from an href. 386 */ 387 Drupal.Views.pathPortion = function (href) { 388 // Remove e.g. http://example.com if present. 389 var protocol = window.location.protocol; 390 if (href.substring(0, protocol.length) == protocol) { 391 // 2 is the length of the '//' that normally follows the protocol. 392 href = href.substring(href.indexOf('/', protocol.length + 2)); 393 } 394 return href; 395 }; 396 397 /** 398 * Return the Drupal path portion of an href. 399 */ 400 Drupal.Views.getPath = function (href) { 401 href = Drupal.Views.pathPortion(href); 402 href = href.substring(Drupal.settings.basePath.length, href.length); 403 // 3 is the length of the '?q=' added to the URL without clean URLs. 404 if (href.substring(0, 3) == '?q=') { 405 href = href.substring(3, href.length); 406 } 407 var chars = ['#', '?', '&']; 408 for (var i in chars) { 409 if (href.indexOf(chars[i]) > -1) { 410 href = href.substr(0, href.indexOf(chars[i])); 411 } 412 } 413 return href; 414 }; 415 416})(jQuery); 417; 418(function ($) { 419 420/** 421 * A progressbar object. Initialized with the given id. Must be inserted into 422 * the DOM afterwards through progressBar.element. 423 * 424 * method is the function which will perform the HTTP request to get the 425 * progress bar state. Either "GET" or "POST". 426 * 427 * e.g. pb = new progressBar('myProgressBar'); 428 * some_element.appendChild(pb.element); 429 */ 430Drupal.progressBar = function (id, updateCallback, method, errorCallback) { 431 var pb = this; 432 this.id = id; 433 this.method = method || 'GET'; 434 this.updateCallback = updateCallback; 435 this.errorCallback = errorCallback; 436
437 // The WAI-ARIA setting aria-live="polite" will announce changes after users 438 // have completed their current activity and not interrupt the screen reader. 439 this.element = $('<div class="progress" aria-live="polite"></div>').attr('id', id); 440 this.element.html('<div class="bar"><div class="filled"></div></div>' + 441 '<div class="percentage"></div>' + 442 '<div class="message"> </div>'); 443}; 444 445/** 446 * Set the percentage and status message for the progressbar. 447 */ 448Drupal.progressBar.prototype.setProgress = function (percentage, message) { 449 if (percentage >= 0 && percentage <= 100) { 450 $('div.filled', this.element).css('width', percentage + '%'); 451 $('div.percentage', this.element).html(percentage + '%'); 452 } 453 $('div.message', this.element).html(message); 454 if (this.updateCallback) { 455 this.updateCallback(percentage, message, this); 456 } 457}; 458 459/** 460 * Start monitoring progress via Ajax. 461 */ 462Drupal.progressBar.prototype.startMonitoring = function (uri, delay) { 463 this.delay = delay; 464 this.uri = uri; 465 this.sendPing(); 466}; 467 468/** 469 * Stop monitoring progress via Ajax. 470 */ 471Drupal.progressBar.prototype.stopMonitoring = function () { 472 clearTimeout(this.timer); 473 // This allows monitoring to be stopped from within the callback. 474 this.uri = null; 475}; 476 477/** 478 * Request progress data from server. 479 */ 480Drupal.progressBar.prototype.sendPing = function () { 481 if (this.timer) { 482 clearTimeout(this.timer); 483 } 484 if (this.uri) { 485 var pb = this; 486 // When doing a post request, you need non-null data. Otherwise a 487 // HTTP 411 or HTTP 406 (with Apache mod_security) error may result. 488 $.ajax({ 489 type: this.method, 490 url: this.uri, 491 data: '', 492 dataType: 'json', 493 success: function (progress) { 494 // Display errors. 495 if (progress.status == 0) { 496 pb.displayError(progress.data); 497 return; 498 } 499 // Update display. 500 pb.setProgress(progress.percentage, progress.message); 501 // Schedule next timer. 502 pb.timer = setTimeout(function () { pb.sendPing(); }, pb.delay); 503 }, 504 error: function (xmlhttp) { 505 pb.displayError(Drupal.ajaxError(xmlhttp, pb.uri)); 506 } 507 }); 508 } 509}; 510 511/** 512 * Display errors on the page. 513 */ 514Drupal.progressBar.prototype.displayError = function (string) { 515 var error = $('<div class="messages error"></div>').html(string); 516 $(this.element).before(error).hide(); 517 518 if (this.errorCallback) { 519 this.errorCallback(this); 520 } 521}; 522 523})(jQuery); 524; 525(function ($) { 526 // Implement a show/hide. 527 Drupal.behaviors.menu_attach_block = { 528 attach: function (context, settings) { 529 // Attach hover events, if this link has been defined as hoverable. 530 $('a.menu-attach-block-drop-link.expand-on-hover', context).hover( 531 /** 532 * Show on mouse in. 533 */ 534 function() { 535 // Show the block if it is not already shown. 536 if (!($(this).hasClass('dropped'))) { 537 expand_toggle($(this)); 538 } 539 }, 540 /** 541 * Hide on mouse out. 542 */ 543 function() { 544 expand_toggle($(this)); 545 } 546 ); 547 548 // Attach click events for links configured to use that. 549 $('a.menu-attach-block-drop-link.expand-on-click', context).click(function(event) { 550 expand_toggle($(this)); 551 event.preventDefault(); 552 }); 553 554 /** 555 * Shows a block embedded inside a menu item. 556 * 557 * @param link 558 * The link attached to this menu item, which triggers block show. 559 */ 560 function expand_toggle(link) { 561 if (link.hasClass('menu-ajax-enabled')) { 562 // Load contents using AJAX. 563 if (!link.hasClass('menu-ajax-loaded')) { 564 ajax_path = Drupal.settings.basePath + 'menu_attach_block/ajax/' + (link).attr('data-block-id'); 565 $.ajax({ 566 type: 'GET', 567 url: ajax_path, 568 data: '', 569 dataType: 'HTML', 570 success: function ($block_html) { 571 $(link).next('.menu-attach-block-wrapper').html($block_html); 572 Drupal.attachBehaviors(link); 573 } 574 }); 575 } 576 } 577 // Show/hide the link. 578 $(link).next('.menu-attach-block-wrapper').slideToggle('fast'); 579 $(link).toggleClass('dropped'); 580 } 581 } 582 } 583}(jQuery)); 584; 585/*! 586 * jCarousel - Riding carousels with jQuery 587 * http://sorgalla.com/jcarousel/ 588 * 589 * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com) 590 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 591 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. 592 * 593 * Built on top of the jQuery library 594 * http://jquery.com 595 * 596 * Inspired by the "Carousel Component" by Bill Scott 597 * http://billwscott.com/carousel/ 598 */ 599 600(function(c){var d={vertical:false,rtl:false,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,setupCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,animationStepCallback:null,buttonNextHTML:"<div></div>",buttonPrevHTML:"<div></div>",buttonNextEvent:"click",buttonPrevEvent:"click",buttonNextCallback:null,buttonPrevCallback:null,itemFallbackDimension:null},b=false;
600c(window).bind("load.jcarousel",function(){b=true});c.jcarousel=function(l,g){this.options=c.extend({},d,g||{});this.locked=false;this.autoStopped=false;this.container=null;this.clip=null;this.list=null;this.buttonNext=null;this.buttonPrev=null;this.buttonNextState=null;this.buttonPrevState=null;if(!g||g.rtl===undefined){this.options.rtl=(c(l).attr("dir")||c("html").attr("dir")||"").toLowerCase()=="rtl"}this.wh=!this.options.vertical?"width":"height";this.lt=!this.options.vertical?(this.options.rtl?"right":"left"):"top";var q="",n=l.className.split(" ");for(var k=0;k<n.length;k++){if(n[k].indexOf("jcarousel-skin")!=-1){c(l).removeClass(n[k]);q=n[k];break}}if(l.nodeName.toUpperCase()=="UL"||l.nodeName.toUpperCase()=="OL"){this.list=c(l);this.clip=this.list.parents(".jcarousel-clip");this.container=this.list.parents(".jcarousel-container")}else{this.container=c(l);this.list=this.container.find("ul,ol").eq(0);this.clip=this.container.find(".jcarousel-clip")}if(this.clip.size()===0){this.clip=this.list.wrap("<div></div>").parent()}if(this.container.size()===0){this.container=this.clip.wrap("<div></div>").parent()}if(q!==""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1){this.container.wrap('<div class=" '+q+'"></div>')}this.buttonPrev=c(".jcarousel-prev",this.container);if(this.buttonPrev.size()===0&&this.options.buttonPrevHTML!==null){this.buttonPrev=c(this.options.buttonPrevHTML).appendTo(this.container)}this.buttonPrev.addClass(this.className("jcarousel-prev"));this.buttonNext=c(".jcarousel-next",this.container);if(this.buttonNext.size()===0&&this.options.buttonNextHTML!==null){this.buttonNext=c(this.options.buttonNextHTML).appendTo(this.container)}this.buttonNext.addClass(this.className("jcarousel-next"));this.clip.addClass(this.className("jcarousel-clip")).css({position:"relative"});this.list.addClass(this.className("jcarousel-list")).css({overflow:"hidden",position:"relative",top:0,margin:0,padding:0}).css((this.options.rtl?"right":"left"),0);this.container.addClass(this.className("jcarousel-container")).css({position:"relative"});if(!this.options.vertical&&this.options.rtl){this.container.addClass("jcarousel-direction-rtl").attr("dir","rtl")}var m=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null;var p=this.list.children("li");var r=this;if(p.size()>0){var f=0,h=this.options.offset;p.each(function(){r.format(this,h++);f+=r.dimension(this,m)});this.list.css(this.wh,(f+100)+"px");if(!g||g.size===undefined){this.options.size=p.size()}}this.container.css("display","block");this.buttonNext.css("display","block");this.buttonPrev.css("display","block");this.funcNext=function(){r.next();return false};this.funcPrev=function(){r.prev();return false};this.funcResize=function(){if(r.resizeTimer){clearTimeout(r.resizeTimer)}r.resizeTimer=setTimeout(function(){r.reload()},100)};if(this.options.initCallback!==null){this.options.initCallback(this,"init")}if(!b&&a.isSafari()){this.buttons(false,false);c(window).bind("load.jcarousel",function(){r.setup()})}else{this.setup()}};var a=c.jcarousel;a.fn=a.prototype={jcarousel:"0.2.9"};a.fn.extend=a.extend=c.extend;a.fn.extend({setup:function(){this.first=null;this.last=null;this.prevFirst=null;this.prevLast=null;this.animating=false;this.timer=null;this.resizeTimer=null;this.tail=null;this.inTail=false;if(this.locked){return}this.list.css(this.lt,this.pos(this.options.offset)+"px");var e=this.pos(this.options.start,true);this.prevFirst=this.prevLast=null;this.animate(e,false);c(window).unbind("resize.jcarousel",this.funcResize).bind("resize.jcarousel",this.funcResize);if(this.options.setupCallback!==null){this.options.setupCallback(this)}},reset:function(){this.list.empty();this.list.css(this.lt,"0px");this.list.css(this.wh,"10px");if(this.options.initCallback!==null){this.options.initCallback(this,"reset")}this.setup()},reload:function(){if(this.tail!==null&&this.inTail){this.list.css(this.lt,a.intval(this.list.css(this.lt))+this.tail)}this.tail=null;this.inTail=false;if(this.options.reloadCallback!==null){this.options.reloadCallback(this)}if(this.options.visible!==null){var g=this;var h=Math.ceil(this.clipping()/this.options.visible),f=0,e=0;this.list.children("li").each(function(j){f+=g.dimension(this,h);
600if(parseInt(jQuery(this).attr("jcarouselindex"))<g.first){e=f}});this.list.css(this.wh,f+"px");this.list.css(this.lt,-e+"px")}this.scroll(this.first,false)},lock:function(){this.locked=true;this.buttons()},unlock:function(){this.locked=false;this.buttons()},size:function(e){if(e!==undefined){this.options.size=e;if(!this.locked){this.buttons()}}return this.options.size},has:function(g,h){if(h===undefined||!h){h=g}if(this.options.size!==null&&h>this.options.size){h=this.options.size}for(var f=g;f<=h;f++){var k=this.get(f);if(!k.length||k.hasClass("jcarousel-item-placeholder")){return false}}return true},get:function(e){return c(">.jcarousel-item-"+e,this.list)},add:function(l,q){var m=this.get(l),h=0,g=c(q);if(m.length===0){var p,k=a.intval(l);m=this.create(l);while(true){p=this.get(--k);if(k<=0||p.length){if(k<=0){this.list.prepend(m)}else{p.after(m)}break}}}else{h=this.dimension(m)}if(g.get(0).nodeName.toUpperCase()=="LI"){m.replaceWith(g);m=g}else{m.empty().append(q)}this.format(m.removeClass(this.className("jcarousel-item-placeholder")),l);var o=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null;var f=this.dimension(m,o)-h;if(l>0&&l<this.first){this.list.css(this.lt,a.intval(this.list.css(this.lt))-f+"px")}this.list.css(this.wh,a.intval(this.list.css(this.wh))+f+"px");return m},remove:function(f){var g=this.get(f);if(!g.length||(f>=this.first&&f<=this.last)){return}var h=this.dimension(g);if(f<this.first){this.list.css(this.lt,a.intval(this.list.css(this.lt))+h+"px")}g.remove();this.list.css(this.wh,a.intval(this.list.css(this.wh))-h+"px")},next:function(){if(this.tail!==null&&!this.inTail){this.scrollTail(false)}else{this.scroll(((this.options.wrap=="both"||this.options.wrap=="last")&&this.options.size!==null&&this.last==this.options.size)?1:this.first+this.options.scroll)}},prev:function(){if(this.tail!==null&&this.inTail){this.scrollTail(true)}else{this.scroll(((this.options.wrap=="both"||this.options.wrap=="first")&&this.options.size!==null&&this.first==1)?this.options.size:this.first-this.options.scroll)}},scrollTail:function(e){if(this.locked||this.animating||!this.tail){return}this.pauseAuto();var f=a.intval(this.list.css(this.lt));f=!e?f-this.tail:f+this.tail;this.inTail=!e;this.prevFirst=this.first;this.prevLast=this.last;this.animate(f)},scroll:function(f,e){if(this.locked||this.animating){return}this.pauseAuto();this.animate(this.pos(f),e)},pos:function(C,k){var n=a.intval(this.list.css(this.lt));if(this.locked||this.animating){return n}if(this.options.wrap!="circular"){C=C<1?1:(this.options.size&&C>this.options.size?this.options.size:C)}var z=this.first>C;var E=this.options.wrap!="circular"&&this.first<=1?1:this.first;var H=z?this.get(E):this.get(this.last);var B=z?E:E-1;var F=null,A=0,w=false,G=0,D;while(z?--B>=C:++B<C){F=this.get(B);w=!F.length;if(F.length===0){F=this.create(B).addClass(this.className("jcarousel-item-placeholder"));H[z?"before":"after"](F);if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(B<=0||B>this.options.size)){D=this.get(this.index(B));if(D.length){F=this.add(B,D.clone(true))}}}H=F;G=this.dimension(F);if(w){A+=G}if(this.first!==null&&(this.options.wrap=="circular"||(B>=1&&(this.options.size===null||B<=this.options.size)))){n=z?n+G:n-G}}var s=this.clipping(),u=[],h=0,t=0;H=this.get(C-1);B=C;while(++h){F=this.get(B);w=!F.length;if(F.length===0){F=this.create(B).addClass(this.className("jcarousel-item-placeholder"));if(H.length===0){this.list.prepend(F)}else{H[z?"before":"after"](F)}if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(B<=0||B>this.options.size)){D=this.get(this.index(B));if(D.length){F=this.add(B,D.clone(true))}}}H=F;G=this.dimension(F);if(G===0){throw new Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...")}if(this.options.wrap!="circular"&&this.options.size!==null&&B>this.options.size){u.push(F)}else{if(w){A+=G}}t+=G;if(t>=s){break}B++}for(var r=0;r<u.length;r++){u[r].remove()}if(A>0){this.list.css(this.wh,this.dimension(this.list)+A+"px");if(z){n-=A;this.list.css(this.lt,a.intval(this.list.css(this.lt))-A+"px")}}var q=C+h-1;if(this.options.wrap!="circular"&&this.options.size&&q>this.options.size){q=this.options.size}if(B>q){h=0;B=q;t=0;while(++h){F=this.get(B--);if(!F.length){break}t+=this.dimension(F);if(t>=s){break}}}var o=q-h+1;if(this.options.wrap!="circular"&&o<1){o=1}if(this.inTail&&z){n+=this.tail;this.inTail=false}this.tail=null;if(this.options.wrap!="circular"&&q==this.options.size&&(q-h+1)>=1){var y=a.intval(this.get(q).css(!this.options.vertical?"marginRight":"marginBottom"));if((t-y)>s){this.tail=t-s-y}}if(k&&C===this.options.size&&this.tail){n-=this.tail;this.inTail=true}while(C-->o){n+=this.dimension(this.get(C))}this.prevFirst=this.first;this.prevLast=this.last;this.first=o;this.last=q;return n},animate:function(i,e){if(this.locked||this.animating){return}this.animating=true;var f=this;var g=function(){f.animating=false;if(i===0){f.list.css(f.lt,0)}if(!f.autoStopped&&(f.options.wrap=="circular"||f.options.wrap=="both"||f.options.wrap=="last"||f.options.size===null||f.last<f.options.size||(f.last==f.options.size&&f.tail!==null&&!f.inTail))){f.startAuto()}f.buttons();f.notify("onAfterAnimation");if(f.options.wrap=="circular"&&f.options.size!==null){for(var k=f.prevFirst;k<=f.prevLast;k++){if(k!==null&&!(k>=f.first&&k<=f.last)&&(k<1||k>f.options.size)){f.remove(k)}}}};this.notify("onBeforeAnimation");if(!this.options.animation||e===false){this.list.css(this.lt,i+"px");g()}else{var j=!this.options.vertical?(this.options.rtl?{right:i}:{left:i}):{top:i};var h={duration:this.options.animation,easing:this.options.easing,complete:g};if(c.isFunction(this.options.animationStepCallback)){h.step=this.options.animationStepCallback}this.list.animate(j,h)}},startAuto:function(f){if(f!==undefined){this.options.auto=f}if(this.options.auto===0){return this.stopAuto()}if(this.timer!==null){return}this.autoStopped=false;var e=this;this.timer=window.setTimeout(function(){e.next()},this.options.auto*1000)},stopAuto:function(){this.pauseAuto();this.autoStopped=true},pauseAuto:function(){if(this.timer===null){return}window.clearTimeout(this.timer);this.timer=null},buttons:function(g,f){if(g==null){g=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!="first")||this.options.size===null||this.last<this.options.size);if(!this.locked&&(!this.options.wrap||this.options.wrap=="first")&&this.options.size!==null&&this.last>=this.options.size){g=this.tail!==null&&!this.inTail}}if(f==null){f=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!="last")||this.first>1);if(!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!==null&&this.first==1){f=this.tail!==null&&this.inTail}}var e=this;if(this.buttonNext.size()>0){this.buttonNext.unbind(this.options.buttonNextEvent+".jcarousel",this.funcNext);if(g){this.buttonNext.bind(this.options.buttonNextEvent+".jcarousel",this.funcNext)}this.buttonNext[g?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",g?false:true);if(this.options.buttonNextCallback!==null&&this.buttonNext.data("jcarou
600selstate")!=g){this.buttonNext.each(function(){e.options.buttonNextCallback(e,this,g)}).data("jcarouselstate",g)}}else{if(this.options.buttonNextCallback!==null&&this.buttonNextState!=g){this.options.buttonNextCallback(e,null,g)}}if(this.buttonPrev.size()>0){this.buttonPrev.unbind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev);if(f){this.buttonPrev.bind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev)}this.buttonPrev[f?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",f?false:true);if(this.options.buttonPrevCallback!==null&&this.buttonPrev.data("jcarouselstate")!=f){this.buttonPrev.each(function(){e.options.buttonPrevCallback(e,this,f)}).data("jcarouselstate",f)}}else{if(this.options.buttonPrevCallback!==null&&this.buttonPrevState!=f){this.options.buttonPrevCallback(e,null,f)}}this.buttonNextState=g;this.buttonPrevState=f},notify:function(e){var f=this.prevFirst===null?"init":(this.prevFirst<this.first?"next":"prev");this.callback("itemLoadCallback",e,f);if(this.prevFirst!==this.first){this.callback("itemFirstInCallback",e,f,this.first);this.callback("itemFirstOutCallback",e,f,this.prevFirst)}if(this.prevLast!==this.last){this.callback("itemLastInCallback",e,f,this.last);this.callback("itemLastOutCallback",e,f,this.prevLast)}this.callback("itemVisibleInCallback",e,f,this.first,this.last,this.prevFirst,this.prevLast);this.callback("itemVisibleOutCallback",e,f,this.prevFirst,this.prevLast,this.first,this.last)},callback:function(j,m,e,k,h,g,f){if(this.options[j]==null||(typeof this.options[j]!="object"&&m!="onAfterAnimation")){return}var n=typeof this.options[j]=="object"?this.options[j][m]:this.options[j];if(!c.isFunction(n)){return}var o=this;if(k===undefined){n(o,e,m)}else{if(h===undefined){this.get(k).each(function(){n(o,this,k,e,m)})}else{var p=function(q){o.get(q).each(function(){n(o,this,q,e,m)})};for(var l=k;l<=h;l++){if(l!==null&&!(l>=g&&l<=f)){p(l)}}}}},create:function(e){return this.format("<li></li>",e)},format:function(k,h){k=c(k);var g=k.get(0).className.split(" ");for(var f=0;f<g.length;f++){if(g[f].indexOf("jcarousel-")!=-1){k.removeClass(g[f])}}k.addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-"+h)).css({"float":(this.options.rtl?"right":"left"),"list-style":"none"}).attr("jcarouselindex",h);return k},className:function(e){return e+" "+e+(!this.options.vertical?"-horizontal":"-vertical")},dimension:function(h,i){var g=c(h);if(i==null){return !this.options.vertical?((g.innerWidth()+a.intval(g.css("margin-left"))+a.intval(g.css("margin-right"))+a.intval(g.css("border-left-width"))+a.intval(g.css("border-right-width")))||a.intval(this.options.itemFallbackDimension)):((g.innerHeight()+a.intval(g.css("margin-top"))+a.intval(g.css("margin-bottom"))+a.intval(g.css("border-top-width"))+a.intval(g.css("border-bottom-width")))||a.intval(this.options.itemFallbackDimension))}else{var f=!this.options.vertical?i-a.intval(g.css("marginLeft"))-a.intval(g.css("marginRight")):i-a.intval(g.css("marginTop"))-a.intval(g.css("marginBottom"));c(g).css(this.wh,f+"px");return this.dimension(g)}},clipping:function(){return !this.options.vertical?this.clip[0].offsetWidth-a.intval(this.clip.css("borderLeftWidth"))-a.intval(this.clip.css("borderRightWidth")):this.clip[0].offsetHeight-a.intval(this.clip.css("borderTopWidth"))-a.intval(this.clip.css("borderBottomWidth"))},index:function(e,f){if(f==null){f=this.options.size}return Math.round((((e-1)/f)-Math.floor((e-1)/f))*f)+1}});a.extend({defaults:function(e){return c.extend(d,e||{})},intval:function(e){e=parseInt(e,10);return isNaN(e)?0:e},windowLoaded:function(){b=true},isSafari:function(){var g=navigator.userAgent.toLowerCase(),f=/(chrome)[ \/]([\w.]+)/.exec(g)||/(webkit)[ \/]([\w.]+)/.exec(g)||[],e=f[1]||"";return e==="webkit"}});c.fn.jcarousel=function(g){if(typeof g=="string"){var e=c(this).data("jcarousel"),f=Array.prototype.slice.call(arguments,1);return e[g].apply(e,f)}else{return this.each(function(){var h=c(this).data("jcarousel");if(h){if(g){c.extend(h.options,g)}h.reload()}
600else{c(this).data("jcarousel",new a(this,g))}})}}})(jQuery); 601; 602/** 603 * @file 604 * Add jCarousel behaviors to the page and provide Views-support. 605 */ 606 607(function($) { 608 609Drupal.behaviors.jcarousel = {}; 610Drupal.behaviors.jcarousel.attach = function(context, settings) { 611 settings = settings || Drupal.settings; 612 613 // If no carousels exist on this part of the page, work no further. 614 if (!settings.jcarousel || !settings.jcarousel.carousels) { 615 return; 616 } 617 618 $("ul.jcarousel li").css("display", ""); 619 620 $.each(settings.jcarousel.carousels, function(key, options) { 621 var $carousel = $(options.selector + ':not(.jcarousel-processed)', context); 622 623 // If this carousel has already been processed or doesn't exist, move on. 624 if (!$carousel.length) { 625 return; 626 } 627 628 // Callbacks need to be converted from a string to an actual function. 629 $.each(options, function(optionKey) { 630 if (optionKey.match(/Callback$/) && typeof options[optionKey] == 'string') { 631 var callbackFunction = window; 632 var callbackParents = options[optionKey].split('.'); 633 $.each(callbackParents, function(objectParent) { 634 callbackFunction = callbackFunction[callbackParents[objectParent]]; 635 }); 636 options[optionKey] = callbackFunction; 637 } 638 }); 639 640 // Add standard options required for AJAX functionality. 641 if (options.ajax && !options.itemLoadCallback) { 642 options.itemLoadCallback = Drupal.jcarousel.ajaxLoadCallback; 643 } 644 645 // If auto-scrolling, pause animation when hoving over the carousel. 646 if (options.auto && options.autoPause && !options.initCallback) { 647 options.initCallback = function(carousel, state) { 648 Drupal.jcarousel.autoPauseCallback(carousel, state); 649 }; 650 } 651 652 // Add responsive behavior. 653 if (options.responsive && !options.reloadCallback) { 654 options.vertical = false;
655 options.visible = null; 656 options.reloadCallback = Drupal.jcarousel.reloadCallback; 657 } 658 659 // Add navigation to the carousel if enabled. 660 if (!options.setupCallback) { 661 options.setupCallback = function(carousel) { 662 Drupal.jcarousel.setupCarousel(carousel); 663 if (options.navigation) { 664 Drupal.jcarousel.addNavigation(carousel, options.navigation); 665 } 666 if (options.responsive) { 667 carousel.reload(); 668 } 669 }; 670 if (options.navigation && !options.itemVisibleInCallback) { 671 options.itemLastInCallback = { 672 onAfterAnimation: Drupal.jcarousel.updateNavigationActive 673 }; 674 } 675 } 676 677 if (!options.hasOwnProperty('buttonNextHTML') && !options.hasOwnProperty('buttonPrevHTML')) { 678 options.buttonNextHTML = Drupal.theme('jCarouselButton', 'next'); 679 options.buttonPrevHTML = Drupal.theme('jCarouselButton', 'previous'); 680 } 681 682 // Initialize the jcarousel. 683 $carousel.addClass('jcarousel-processed').jcarousel(options); 684 }); 685}; 686 687Drupal.jcarousel = {}; 688Drupal.jcarousel.reloadCallback = function(carousel) { 689 // Set the clip and container to auto width so that they will fill 690 // the available space. 691 carousel.container.css('width', 'auto'); 692 carousel.clip.css('width', 'auto'); 693 var clipWidth = carousel.clip.width(); 694 var containerExtra = carousel.container.width() - carousel.clip.outerWidth(true); 695 // Determine the width of an item. 696 var itemWidth = carousel.list.find('li').first().outerWidth(true); 697 var numItems = Math.floor(carousel.clip.width() / itemWidth) || 1; 698 // Set the new scroll number. 699 carousel.options.scroll = numItems; 700 var newClipWidth = numItems * itemWidth; 701 var newContainerWidth = newClipWidth + containerExtra; 702 // Resize the clip and container. 703 carousel.clip.width(newClipWidth); 704 carousel.container.width(newContainerWidth); 705}; 706Drupal.jcarousel.ajaxLoadCallback = function(jcarousel, state) { 707 // Check if the requested items already exist. 708 if (state == 'init' || jcarousel.has(jcarousel.first, jcarousel.last)) { 709 return; 710 } 711 712 var $list = jcarousel.list; 713 var $view = $list.parents('.view:first'); 714 var ajaxPath = Drupal.settings.jcarousel.ajaxPath; 715 var target = $view.get(0); 716 717 // Find this view's settings in the Views AJAX settings. 718 var settings; 719 $.each(Drupal.settings.jcarousel.carousels, function(domID, carouselSettings) { 720 if ($list.is('.' + domID)) { 721 settings = carouselSettings['view_options']; 722 } 723 }); 724 725 // Copied from ajax_view.js: 726 var viewData = { 'js': 1, 'first': jcarousel.first - 1, 'last': jcarousel.last }; 727 // Construct an object using the settings defaults and then overriding 728 // with data specific to the link. 729 $.extend( 730 viewData, 731 settings 732 ); 733 734 $.ajax({ 735 url: ajaxPath, 736 type: 'GET', 737 data: viewData, 738 success: function(response) { 739 Drupal.jcarousel.ajaxResponseCallback(jcarousel, target, response); 740 }, 741 error: function(xhr) { 742 Drupal.jcarousel.ajaxErrorCallback(xhr, ajaxPath); 743 }, 744 dataType: 'json' 745 }); 746 747}; 748 749/** 750 * Init callback for jCarousel. Pauses the carousel when hovering over. 751 */ 752Drupal.jcarousel.autoPauseCallback = function(carousel, state) { 753 function pauseAuto() { 754 carousel.stopAuto(); 755 } 756 function resumeAuto() { 757 carousel.startAuto(); 758 } 759 carousel.clip.hover(pauseAuto, resumeAuto); 760 carousel.buttonNext.hover(pauseAuto, resumeAuto); 761 carousel.buttonPrev.hover(pauseAuto, resumeAuto); 762}; 763 764/** 765 * Setup callback for jCarousel. Calculates number of pages. 766 */ 767Drupal.jcarousel.setupCarousel = function(carousel) { 768 // Determine the number of pages this carousel includes. 769 // This only works for a positive starting point. Also, .first is 1-based 770 // while .last is a count, so we need to reset the .first number to be 771 // 0-based to make the math work. 772 carousel.pageSize = carousel.last - (carousel.first - 1); 773 774 // jCarousel's Views integration sets "size" in the carousel options. Use that 775 // if available, otherwise count the number of items in the carousel. 776 var itemCount = carousel.options.size ? carousel.options.size : $(carou
776sel.list).children('li').length; 777 carousel.pageCount = Math.ceil(itemCount / carousel.pageSize); 778 carousel.pageNumber = 1; 779 780 // Disable the previous/next arrows if there is only one page. 781 if (carousel.options.wrap != 'circular' && carousel.pageCount == 1) { 782 carousel.buttons(false, false); 783 } 784 785 // Always remove the hard-coded display: block from the navigation. 786 carousel.buttonNext.css('display', ''); 787 carousel.buttonPrev.css('display', ''); 788} 789 790/** 791 * Setup callback for jCarousel. Adds the navigation to the carousel if enabled. 792 */ 793Drupal.jcarousel.addNavigation = function(carousel, position) { 794 // Don't add a pager if there's only one page of results. 795 if (carousel.pageCount <= 1) { 796 return; 797 } 798 799 // Add a class to the wrapper so it can adjust CSS. 800 $(carousel.list).parents('.jcarousel-container:first').addClass('jcarousel-navigation-' + position); 801 802 var navigation = $('<ul class="jcarousel-navigation"></ul>'); 803 804 for (var i = 1; i <= carousel.pageCount; i++) { 805 var pagerItem = $(Drupal.theme('jCarouselPageLink', i)); 806 var listItem = $('<li></li>').attr('jcarousel-page', i).append(pagerItem); 807 navigation.append(listItem); 808 809 // Make the first page active by default. 810 if (i === 1) { 811 listItem.addClass('active'); 812 } 813 814 // Scroll to the correct page when a pager is clicked. 815 pagerItem.bind('click', function() { 816 // We scroll to the new page based on item offsets. This works with 817 // circular carousels that do not divide items evenly, making it so that 818 // going back or forward in pages will not skip or repeat any items. 819 var newPageNumber = $(this).parent().attr('jcarousel-page'); 820 var itemOffset = (newPageNumber - carousel.pageNumber) * carousel.pageSize; 821 822 if (itemOffset) { 823 carousel.scroll(carousel.first + itemOffset); 824 } 825 826 return false; 827 }); 828 } 829 830 $(carousel.list).parents('.jcarousel-clip:first')[position](navigation); 831} 832 833/** 834 * itemVisibleInCallback for jCarousel. Update the navigation after page change. 835 */ 836Drupal.jcarousel.updateNavigationActive = function(carousel, item, idx, state) { 837 // The navigation doesn't even exist yet when this is called on init. 838 var $listItems = $(carousel.list).parents('.jcarousel-container:first').find('.jcarousel-navigation li'); 839 if ($listItems.length == 0) { 840 return; 841 } 842 843 // jCarousel does some very odd things with circular wraps. Items before the 844 // first item are given negative numbers and items after the last are given 845 // numbers beyond the total number of items. This complicated logic calculates 846 // which page number is active based off this numbering scheme. 847 var pageNumber = Math.ceil(idx / carousel.pageSize); 848 if (pageNumber <= 0 || pageNumber > carousel.pageCount) { 849 pageNumber = pageNumber % carousel.pageCount; 850 pageNumber = pageNumber == 0 ? carousel.pageCount : pageNumber; 851 pageNumber = pageNumber < 0 ? pageNumber + carousel.pageCount : pageNumber; 852 } 853 carousel.pageNumber = pageNumber; 854 var currentPage = $listItems.get(carousel.pageNumber - 1); 855 856 // Set the current page to be active. 857 $listItems.not(currentPage).removeClass('active'); 858 $(currentPage).addClass('active'); 859} 860 861/** 862 * AJAX callback for all jCarousel-style views. 863 */ 864Drupal.jcarousel.ajaxResponseCallback = function(jcarousel, target, response) { 865 if (response.debug) { 866 alert(response.debug); 867 } 868 869 var $view = $(target); 870 var jcarousel = $view.find('ul.jcarousel').data('jcarousel'); 871 872 // Add items to the jCarousel. 873 $('ul.jcarousel > li', response.display).each(function(i) { 874 var itemNumber = this.className.replace(/.*?jcarousel-item-(\d+).*/, '$1'); 875 jcarousel.add(itemNumber, this.innerHTML); 876 }); 877 878 // Add Drupal behaviors to the content of the carousel to affect new items. 879 Drupal.attachBehaviors(jcarousel.list.get(0)); 880 881 // Treat messages the same way that Views typically handles messages. 882 if (response.messages) { 883 // Show any messages (but first remove old ones, if there are any). 884 $view.find('.views-messages').remove().end().prepend(response.messages); 885 } 886}; 887 888/** 889 * Display error messages using the same mechanism as Views module. 890 */ 891Drupal.jcarousel.ajaxErrorCallback = function (xhr, path) { 892 var error_text = ''; 893 894 if ((xhr.status == 500 && xhr.responseText) || xhr.status == 200) { 895 error_text = xhr.responseText; 896 897 // Replace all < and > by < and > 898 error_text = error_text.replace("/&(lt|gt);/g", function (m, p) { 899 return (p == "lt")? "<" : ">"; 900 }); 901 902 // Now, replace all html tags by empty spaces 903 error_text = error_text.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi,""); 904 905 // Fix end lines 906 error_text = error_text.replace(/[\n]+\s+/g,"\n"); 907 } 908 else if (xhr.status == 500) { 909 error_text = xhr.status + ': ' + Drupal.t("Internal server error. Please see server or PHP logs for error information."); 910 } 911 else { 912 error_text = xhr.status + ': ' + xhr.statusText; 913 } 914 915 alert(Drupal.t("An error occurred at @path.\n\nError Description: @error", {'@path': path, '@error': error_text})); 916}; 917
918Drupal.theme.prototype.jCarouselButton = function(type) { 919 // Use links for buttons for accessibility. 920 return '<a href="javascript:void(0)"></a>'; 921}; 922 923Drupal.theme.prototype.jCarouselPageLink = function(pageNumber) { 924 return '<a href="javascript:void(0)"><span>' + (pageNumber) + '</span></a>'; 925}; 926 927})(jQuery); 928; 929/** 930 * @file 931 * Handles AJAX fetching of views, including filter submission and response. 932 */ 933(function ($) { 934 935 /** 936 * Attaches the AJAX behavior to exposed filter forms and key views links. 937 */ 938 Drupal.behaviors.ViewsAjaxView = {}; 939 Drupal.behaviors.ViewsAjaxView.attach = function () { 940 if (Drupal.settings && Drupal.settings.views && Drupal.settings.views.ajaxViews) { 941 $.each(Drupal.settings.views.ajaxViews, function (i, settings) { 942 Drupal.views.instances[i] = new Drupal.views.ajaxView(settings); 943 }); 944 } 945 }; 946 947 Drupal.views = {}; 948 Drupal.views.instances = {}; 949 950 /** 951 * JavaScript object for a certain view. 952 */ 953 Drupal.views.ajaxView = function (settings) { 954 var selector = '.view-dom-id-' + settings.view_dom_id; 955 this.$view = $(selector); 956 957 // If view is not present return to prevent errors. 958 if (!this.$view.length) { 959 return; 960 } 961 962 // Retrieve the path to use for views' ajax. 963 var ajax_path = Drupal.settings.views.ajax_path; 964 965 // If there are multiple views this might've ended up showing up multiple 966 // times. 967 if (ajax_path.constructor.toString().indexOf("Array") != -1) { 968 ajax_path = ajax_path[0]; 969 } 970 971 // Check if there are any GET parameters to send to views. 972 var queryString = window.location.search || ''; 973 if (queryString !== '') { 974 // Remove the question mark and Drupal path component if any. 975 var queryString = queryString.slice(1).replace(/q=[^&]+&?|&?render=[^&]+/, ''); 976 if (queryString !== '') { 977 // If there is a '?' in ajax_path, clean url are on and & should be 978 // used to add parameters. 979 queryString = ((/\?/.test(ajax_path)) ? '&' : '?') + queryString; 980 } 981 } 982 983 this.element_settings = { 984 url: ajax_path + queryString, 985 submit: settings, 986 setClick: true, 987 event: 'click', 988 selector: selector, 989 progress: { 990 type: 'throbber' 991 } 992 }; 993 994 this.settings = settings; 995 996 // Add the ajax to exposed forms. 997 this.$exposed_form = $('#views-exposed-form-' + settings.view_name.replace(/_/g, '-') + '-' + settings.view_display_id.replace(/_/g, '-')); 998 this.$exposed_form.once(jQuery.proxy(this.attachExposedFormAjax, this)); 999 1000 // Store Drupal.ajax objects here for all pager links. 1001 this.links = []; 1002 1003 // Add the ajax to pagers. 1004 this.$view 1005 .once(jQuery.proxy(this.attachPagerAjax, this)); 1006 1007 // Add a trigger to update this view specifically. In order to trigger a 1008 // refresh use the following code. 1009 // 1010 // @code 1011 // jQuery('.view-name').trigger('RefreshView'); 1012 // @endcode 1013 // Add a trigger to update this view specifically. 1014 var self_settings = this.element_settings; 1015 self_settings.event = 'RefreshView'; 1016 var self = this; 1017 this.$view.once('refresh', function () { 1018 self.refreshViewAjax = new Drupal.ajax(self.selector, self.$view, self_settings); 1019 }); 1020 }; 1021 1022 Drupal.views.ajaxView.prototype.attachExposedFormAjax = function () { 1023 var button = $('input[type=submit], button[type=submit], input[type=image]', this.$exposed_form); 1024 button = button[0]; 1025 1026 // Call the autocomplete submit before doing AJAX. 1027 $(button).click(function () { 1028 if (Drupal.autocompleteSubmit) { 1029 Drupal.autocompleteSubmit(); 1030 } 1031 }); 1032 1033 this.exposedFormAjax = new Drupal.ajax($(button).attr('id'), button, this.element_settings); 1034 }; 1035 1036 /** 1037 * Attach the ajax behavior to each link. 1038 */ 1039 Drupal.views.ajaxView.prototype.attachPagerAjax = function () { 1040 this.$view.find('ul.pager > li > a, ol.pager > li > a, th.views-field a, .attachment .views-summary a') 1041 .each(jQuery.proxy(this.attachPagerLinkAjax, this)); 1042 }; 1043 1044 /** 1045 * Attach the ajax behavior to a single link. 1046 */ 1047 Drupal.views.ajaxView.prototype.attachPagerLinkAjax = function (id, link) { 1048 var $link = $(link); 1049 var viewData = {}; 1050 var href = $link.attr('href'); 1051 // Don't attach to pagers inside nested views. 1052 if ($link.closest('.view')[0] !== this.$view[0] && 1053 $link.closest('.view').parent().hasClass('attachment') === false) { 1054 return; 1055 } 1056 1057 // Provide a default page if none has been set. This must be done 1058 // prior to merging with settings to avoid accidentally using the 1059 // page landed on instead of page 1. 1060 if (typeof(viewData.page) === 'undefined') { 1061 viewData.page = 0; 1062 } 1063 1064 // Construct an object using the settings defaults and then overriding 1065 // with data specific to the link. 1066 $.extend( 1067 viewData, 1068 this.settings, 1069 Drupal.Views.parseQueryString(href), 1070 // Extract argument data from the URL. 1071 Drupal.Views.parseViewArgs(href, this.settings.view_base_path) 1072 ); 1073
1074 // For anchor tags, these will go to the target of the anchor rather 1075 // than the usual location. 1076 $.extend(viewData, Drupal.Views.parseViewArgs(href, this.settings.view_base_path)); 1077 1078 // Construct an object using the element settings defaults, 1079 // then overriding submit with viewData. 1080 var pager_settings = $.extend({}, this.element_settings); 1081 pager_settings.submit = viewData; 1082 this.pagerAjax = new Drupal.ajax(false, $link, pager_settings); 1083 this.links.push(this.pagerAjax); 1084 }; 1085 1086 Drupal.ajax.prototype.commands.viewsScrollTop = function (ajax, response, status) { 1087 // Scroll to the top of the view. This will allow users 1088 // to browse newly loaded content after e.g. clicking a pager 1089 // link. 1090 var offset = $(response.selector).offset(); 1091 // We can't guarantee that the scrollable object should be 1092 // the body, as the view could be embedded in something 1093 // more complex such as a modal popup. Recurse up the DOM 1094 // and scroll the first element that has a non-zero top. 1095 var scrollTarget = response.selector; 1096 while ($(scrollTarget).scrollTop() == 0 && $(scrollTarget).parent()) { 1097 scrollTarget = $(scrollTarget).parent(); 1098 } 1099 // Only scroll upward. 1100 if (offset.top - 10 < $(scrollTarget).scrollTop()) { 1101 $(scrollTarget).animate({scrollTop: (offset.top - 10)}, 500); 1102 } 1103 }; 1104 1105})(jQuery); 1106; 1107/** 1108 * @file 1109 * JavaScript functions of Views Refresh module. 1110 */ 1111 1112(function ($) { 1113 'use strict'; 1114 1115 function attachEvents(view, dom_id, settings, page) { 1116 var selector = '.view-dom-id-' + dom_id; 1117 // Retrieve the path to use for views' ajax. 1118 var ajax_path = Drupal.settings.views.ajax_path + '/views-refresh'; 1119 1120 // If there are multiple views this might've ended up showing up multiple times. 1121 if (ajax_path.constructor.toString().indexOf("Array") !== -1) { 1122 ajax_path = ajax_path[0]; 1123 } 1124 1125 // Check if there are any GET parameters to send to views. 1126 var queryString = window.location.search || ''; 1127 if (queryString !== '') { 1128 // Remove the question mark and Drupal path component if any. 1129 queryString = queryString.slice(1).replace(/q=[^&]+&?|&?render=[^&]+/, ''); 1130 if (queryString !== '') { 1131 // If there is a '?' in ajax_path, clean url are on and & should be used to add parameters. 1132 queryString = ((/\?/.test(ajax_path)) ? '&' : '?') + queryString; 1133 } 1134 } 1135 1136 var pageOptions = $.extend({}, settings, (page ? {page: page} : {})); 1137 var noScrollOptions = $.extend({}, pageOptions, {views_refresh_noscroll: 1}); 1138 var pageFirstOptions = $.extend({}, settings, {}); 1139 var noScrollFirstOptions = $.extend({}, pageFirstOptions, {views_refresh_noscroll: 1}); 1140 1141 var ajaxSettings = { 1142 url: ajax_path + queryString, 1143 setClick: true, 1144 selector: selector, 1145 progress: { type: 'throbber' } 1146 }; 1147 1148 var refreshAjax = new Drupal.ajax(selector, view, $.extend({}, ajaxSettings, {submit: noScrollOptions, event: 'views_refresh'})); 1149 var refreshScrollAjax = new Drupal.ajax(selector, view, $.extend({}, ajaxSettings, {submit: pageOptions, event: 'views_refresh_scroll'})); 1150 var refreshFirstAjax = new Drupal.ajax(selector, view, $.extend({}, ajaxSettings, {submit: noScrollFirstOptions, event: 'views_refresh_first'})); 1151 var refreshScrollFirstAjax = new Drupal.ajax(selector, view, $.extend({}, ajaxSettings, {submit: pageFirstOptions, event: 'views_refresh_scroll_first'})); 1152 } 1153 1154 Drupal.ajax.prototype.commands.viewsRefresh = function (ajax, response, status) { 1155 var view = $(response.selector); 1156 var event = response.first ? (response.scroll ? 'views_refresh_scroll_first' : 'views_refresh_first') : (response.scroll ? 'views_refresh_scroll' : 'views_refresh'); 1157 view.trigger(event); 1158 }; 1159 1160 Drupal.behaviors.viewsRefresh = { 1161 attach: function (context) { 1162 if (Drupal.settings && Drupal.settings.viewsRefresh && Drupal.settings.views && Drupal.settings.views.ajaxViews) { 1163 $.each(Drupal.settings.viewsRefresh, function (dom_id, page) { 1164 var view = $('.view-dom-id-' + dom_id).once('views-refresh-processed'); 1165 if ((view.length > 0) && (Drupal.settings.views.ajaxViews['views_dom_id:' + dom_id])) { 1166 attachEvents(view, dom_id, Drupal.settings.views.ajaxViews['views_dom_id:' + dom_id], page); 1167 } 1168 }); 1169 } 1170 } 1171 }; 1172 1173})(jQuery); 1174; 1175(function ($) { 1176Drupal.behaviors.lang_dropdown = { 1177 attach: function (context, settings) { 1178 var settings = settings || Drupal.settings; 1179 1180 if (settings.lang_dropdown) { 1181 var flags, msddSettings; 1182 for (key in settings.lang_dropdown) { 1183 msddSettings = settings.lang_dropdown[key].jsWidget; 1184 flags = msddSettings.languageicons; 1185 if (flags) { 1186 $.each(flags, function(index, value) { 1187 if (msddSettings.widget == "msdropdown") { 1188 $('select#lang-dropdown-select-' + key + ' option[value="' + index + '"]', context).attr('data-image', value); 1189 } 1190 else if (msddSettings.widget == "ddslick" && Boolean(msddSettings.showSelectedHTML)) { 1191 $('select#lang-dropdown-select-' + key + ' option[value="' + index + '"]', context).attr('data-imagesrc', value); 1192 } 1193 }); 1194 } 1195 1196 if (msddSettings.widget == "msdropdown") { 1197 try { 1198 $('select#lang-dropdown-select-' + key, context).msDropDown({ 1199 visibleRows: msddSettings.visibleRows, 1200 roundedCorner: Boolean(msddSettings.roundedCorner), 1201 animStyle: msddSettings.animStyle, 1202 event: msddSettings.event, 1203 mainCSS: msddSettings.mainCSS 1204 }); 1205 } 1206 catch (e) { 1207 if (console) { console.log(e); } 1208 } 1209 } 1210 else if (msddSettings.widget == "chosen") { 1211 $('select#lang-dropdown-select-' + key, context).chosen({ 1212 disable_search: msddSettings.disable_search, 1213 no_results_text: msddSettings.no_results_text 1214 }); 1215 } 1216 else if (msddSettings.widget == "ddslick") {
1217 $('select#lang-dropdown-select-' + key, context).ddslick({ 1218 width: (msddSettings.width == 0) ? null : msddSettings.width, 1219 height: (msddSettings.height == 0) ? null : msddSettings.height, 1220 showSelectedHTML: Boolean(msddSettings.showSelectedHTML), 1221 imagePosition: msddSettings.imagePosition, 1222 onSelected: function(data) { 1223 // ddselect also fires this function on initialization, so we have 1224 // to make sure this select has already been initialized. 1225 if (!data.selectedItem.parent().data('ddslick-has-been-initialized')) { 1226 data.selectedItem.parent().data('ddslick-has-been-initialized', true); 1227 return; 1228 } 1229 1230 var lang = data.selectedData.value; 1231 var href = $('#lang-dropdown-select-'+key, context).parents('form').find('input[name="' + lang + '"]').val(); 1232 window.location.href = href; 1233 } 1234 }); 1235 } 1236 } 1237 } 1238 1239 $('select.lang-dropdown-select-element', context).change(function() { 1240 var lang = this.options[this.selectedIndex].value; 1241 var href = $(this).closest('form').find('input[name="' + lang + '"]').val(); 1242 window.location.href = href; 1243 }); 1244 1245 $('form.lang-dropdown-form', context).after('<div style="clear:both;"></div>'); 1246 } 1247}; 1248})(jQuery); 1249; 1250/* 1251 * sf-Touchscreen v1.3b - Provides touchscreen compatibility for the jQuery Superfish plugin. 1252 * 1253 * Developer's note: 1254 * Built as a part of the Superfish project for Drupal (http://drupal.org/project/superfish) 1255 * Found any bug? have any cool ideas? contact me right away! http://drupal.org/user/619294/contact 1256 * 1257 * jQuery version: 1.3.x or higher. 1258 * 1259 * Dual licensed under the MIT and GPL licenses: 1260 * http://www.opensource.org/licenses/mit-license.php 1261 * http://www.gnu.org/licenses/gpl.html 1262 */ 1263 1264(function($){ 1265 $.fn.sftouchscreen = function(options){ 1266 options = $.extend({ 1267 mode: 'inactive', 1268 breakpoint: 768, 1269 breakpointUnit: 'px', 1270 useragent: '', 1271 behaviour: 2, 1272 disableHover: false 1273 }, options); 1274 1275 function activate(menu){ 1276 var eventHandler = (('ontouchstart' in window) || (window.DocumentTouch && document instanceof DocumentTouch)) ? ['click touchstart','mouseup touchend'] : ['click','mouseup']; 1277 // Select hyperlinks from parent menu items. 1278 menu.find('li:has(ul)').children('a,span.nolink').each(function(){ 1279 var item = $(this), 1280 parent = item.closest('li'); 1281 if (options.disableHover){ 1282 parent.unbind('mouseenter mouseleave'); 1283 } 1284 if (options.behaviour == 2){ 1285 if (parent.children('a.menuparent,span.nolink.menuparent').length > 0 && parent.children('ul').children('.sf-clone-parent').length == 0){ 1286 var 1287 // Cloning the hyperlink of the parent menu item. 1288 cloneLink = parent.children('a.menuparent,span.nolink.menuparent').clone(), 1289 // Wrapping the hyerplinks in <li>. 1290 cloneLink = $('<li class="sf-clone-parent" />').html(cloneLink); 1291 // Removing unnecessary stuff. 1292 cloneLink.find('.sf-sub-indicator').remove(), 1293 // Adding a helper class and attaching them to the sub-menus. 1294 parent.children('ul').addClass('sf-has-clone-parent').prepend(cloneLink); 1295 } 1296 } 1297 // No .toggle() here as it's not possible to reset it. 1298 item.bind(eventHandler[0], function(event){ 1299 // Already clicked? 1300 if (item.hasClass('sf-clicked')){ 1301 // Depending on the preferred behaviour, either proceed to the URL. 1302 if (options.behaviour == 0){ 1303 window.location = item.attr('href'); 1304 } 1305 // or collapse the sub-menu. 1306 else if (options.behaviour == 1 || options.behaviour == 2){ 1307 event.preventDefault(); 1308 item.removeClass('sf-clicked'); 1309 parent.hideSuperfishUl().find('a,span.nolink').removeClass('sf-clicked'); 1310 } 1311 } 1312 // Prevent the default action otherwise. 1313 else { 1314 event.preventDefault(); 1315 item.addClass('sf-clicked'); 1316 parent.showSuperfishUl().siblings('li:has(ul)').hideSuperfishUl().find('.sf-clicked').removeClass('sf-clicked'); 1317 } 1318 }); 1319 }); 1320 1321 $(document).bind(eventHandler[1], function(event){ 1322 if (menu.not(event.target) && menu.has(event.target).length === 0){ 1323 menu.find('.sf-clicked').removeClass('sf-clicked'); 1324 menu.find('li:has(ul)').hideSuperfishUl(); 1325 } 1326 }); 1327 }
1328 // Return original object to support chaining. 1329 // This is not necessary actually because of the way the module uses these plugins. 1330 for (var b = 0; b < this.length; b++) { 1331 var menu = $(this).eq(b), 1332 mode = options.mode; 1333 // The rest is crystal clear, isn't it? :) 1334 if (mode == 'always_active'){ 1335 activate(menu); 1336 } 1337 else if (mode == 'window_width'){ 1338 var breakpoint = (options.breakpointUnit == 'em') ? (options.breakpoint * parseFloat($('body').css('font-size'))) : options.breakpoint, 1339 windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, 1340 timer; 1341 if ((typeof Modernizr === 'undefined' || typeof Modernizr.mq !== 'function') && windowWidth < breakpoint){ 1342 activate(menu); 1343 } 1344 else if (typeof Modernizr !== 'undefined' && typeof Modernizr.mq === 'function' && Modernizr.mq('(max-width:' + (breakpoint - 1) + 'px)')) { 1345 activate(menu); 1346 } 1347 $(window).resize(function(){ 1348 clearTimeout(timer); 1349 timer = setTimeout(function(){ 1350 var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; 1351 if ((typeof Modernizr === 'undefined' || typeof Modernizr.mq !== 'function') && windowWidth < breakpoint){ 1352 activate(menu); 1353 } 1354 else if (typeof Modernizr !== 'undefined' && typeof Modernizr.mq === 'function' && Modernizr.mq('(max-width:' + (breakpoint - 1) + 'px)')) { 1355 activate(menu); 1356 } 1357 }, 50); 1358 }); 1359 } 1360 else if (mode == 'useragent_custom'){ 1361 if (options.useragent != ''){ 1362 var ua = RegExp(options.useragent, 'i'); 1363 if (navigator.userAgent.match(ua)){ 1364 activate(menu); 1365 } 1366 } 1367 } 1368 else if (mode == 'useragent_predefined' && navigator.userAgent.match(/(android|bb\d+|meego)|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i)){ 1369 activate(menu); 1370 } 1371 } 1372 return this; 1373 } 1374})(jQuery); 1375; 1376/* 1377 * sf-Smallscreen v1.2b - Provides small-screen compatibility for the jQuery Superfish plugin. 1378 * 1379 * Developer's note: 1380 * Built as a part of the Superfish project for Drupal (http://drupal.org/project/superfish) 1381 * Found any bug? have any cool ideas? contact me right away! http://drupal.org/user/619294/contact 1382 * 1383 * jQuery version: 1.3.x or higher. 1384 * 1385 * Dual licensed under the MIT and GPL licenses: 1386 * http://www.opensource.org/licenses/mit-license.php 1387 * http://www.gnu.org/licenses/gpl.html 1388 */ 1389 1390(function($){ 1391 $.fn.sfsmallscreen = function(options){ 1392 options = $.extend({ 1393 mode: 'inactive', 1394 type: 'accordion', 1395 breakpoint: 768, 1396 breakpointUnit: 'px', 1397 useragent: '', 1398 title: '', 1399 addSelected: false, 1400 menuClasses: false, 1401 hyperlinkClasses: false, 1402 excludeClass_menu: '', 1403 excludeClass_hyperlink: '', 1404 includeClass_menu: '', 1405 includeClass_hyperlink: '', 1406 accordionButton: 1, 1407 expandText: 'Expand', 1408 collapseText: 'Collapse' 1409 }, options); 1410 1411 // We need to clean up the menu from anything unnecessary. 1412 function refine(menu){ 1413 var 1414 refined = menu.clone(), 1415 // Things that should not be in the small-screen menus. 1416 rm = refined.find('span.sf-sub-indicator, span.sf-description'), 1417 // This is a helper class for those who need to add extra markup that shouldn't exist 1418 // in the small-screen versions. 1419 rh = refined.find('.sf-smallscreen-remove'), 1420 // Mega-menus has to be removed too. 1421 mm = refined.find('ul.sf-megamenu'); 1422 for (var a = 0; a < rh.length; a++){ 1423 rh.eq(a).replaceWith(rh.eq(a).html()); 1424 } 1425 for (var b = 0; b < rm.length; b++){ 1426 rm.eq(b).remove(); 1427 } 1428 if (mm.length > 0){ 1429 mm.removeClass('sf-megamenu'); 1430 var ol = refined.find('div.sf-megamenu-column > ol'); 1431 for (var o = 0; o < ol.length; o++){ 1432 ol.eq(o).replaceWith('<ul>' + ol.eq(o).html() + '</ul>'); 1433 } 1434 var elements = ['div.sf-megamenu-column','.sf-megamenu-wrapper > ol','li.sf-megamenu-wrapper']; 1435 for (var i = 0; i < elements.length; i++){ 1436 obj = refined.find(elements[i]); 1437 for (var t = 0; t < obj.length; t++){ 1438 obj.eq(t).replaceWith(obj.eq(t).html()); 1439 } 1440 } 1441 refined.find('.sf-megamenu-column').removeClass('sf-megamenu-column'); 1442 } 1443 refined.add(refined.find('*')).css({width:''}); 1444 return refined; 1445 } 1446 1447 // Creating <option> elements out of the menu. 1448 function toSelect(menu, level){ 1449 var 1450 items = '', 1451 childLI = $(menu).children('li'); 1452 for (var a = 0; a < childLI.length; a++){ 1453 var list = childLI.eq(a), parent = list.children('a, span'); 1454 for (var b = 0; b < parent.length; b++){ 1455 var 1456 item = parent.eq(b), 1457 path = item.is('a') ? item.attr('href') : '', 1458 // Class names modification. 1459 itemClone = item.clone(), 1460 classes = (options.hyperlinkClasses) ? ((options.excludeClass_hyperlink && itemClone.hasClass(options.excludeClass_hyperlink)) ? itemClone.removeClass(options.excludeClass_hyperlink).attr('class') : itemClone.attr('class')) : '', 1461 classes = (options.includeClass_hyperlink && !itemClone.hasClass(options.includeClass_hyperlink)) ? ((options.hyperlinkClasses) ? itemClone.addClass(options.includeClass_hyperlink).attr('class') : options.includeClass_hyperlink) : classes; 1462 // Retaining the active class if requested. 1463 if (options.addSelected && item.hasClass('active')){ 1464 classes += ' active'; 1465 } 1466 // <option> has to be disabled if the item is not a link. 1467 disable = item.is('span') || item.attr('href')=='#' ? ' disabled="disabled"' : '', 1468 // Crystal clear. 1469 subIndicator = 1 < level ? Array(level).join('-') + ' ' : ''; 1470 // Preparing the <option> element. 1471 items += '<option value="' + path + '" class="' + classes + '"' + disable + '>' + subIndicator + $.trim(item.text()) +'</option>', 1472 childUL = list.find('> ul'); 1473 // Using the function for the sub-menu of this item. 1474 for (var u = 0; u < childUL.length; u++){
1475 items += toSelect(childUL.eq(u), level + 1); 1476 } 1477 } 1478 } 1479 return items; 1480 } 1481 1482 // Create the new version, hide the original. 1483 function convert(menu){ 1484 var menuID = menu.attr('id'), 1485 // Creating a refined version of the menu. 1486 refinedMenu = refine(menu); 1487 // Currently the plugin provides two reactions to small screens. 1488 // Converting the menu to a <select> element, and converting to an accordion version of the menu. 1489 if (options.type == 'accordion'){ 1490 var 1491 toggleID = menuID + '-toggle', 1492 accordionID = menuID + '-accordion'; 1493 // Making sure the accordion does not exist. 1494 if ($('#' + accordionID).length == 0){ 1495 var 1496 // Getting the style class. 1497 styleClass = menu.attr('class').split(' ').filter(function(item){ 1498 return item.indexOf('sf-style-') > -1 ? item : ''; 1499 }), 1500 // Creating the accordion. 1501 accordion = $(refinedMenu).attr('id', accordionID); 1502 // Removing unnecessary classes. 1503 accordion.removeClass('sf-horizontal sf-vertical sf-navbar sf-shadow sf-js-enabled'); 1504 // Adding necessary classes. 1505 accordion.addClass('sf-accordion sf-hidden'); 1506 // Removing style attributes and any unnecessary class. 1507 accordion.children('li').removeAttr('style').removeClass('sfHover'); 1508 // Doing the same and making sure all the sub-menus are off-screen (hidden). 1509 accordion.find('ul').removeAttr('style').not('.sf-hidden').addClass('sf-hidden'); 1510 // Creating the accordion toggle switch. 1511 var toggle = '<div class="sf-accordion-toggle ' + styleClass + '"><a href="#" id="' + toggleID + '"><span>' + options.title + '</span></a></div>'; 1512 1513 // Adding Expand\Collapse buttons if requested. 1514 if (options.accordionButton == 2){ 1515 var parent = accordion.find('li.menuparent'); 1516 for (var i = 0; i < parent.length; i++){ 1517 parent.eq(i).prepend('<a href="#" class="sf-accordion-button">' + options.expandText + '</a>'); 1518 } 1519 } 1520 // Inserting the according and hiding the original menu. 1521 menu.before(toggle).before(accordion).hide(); 1522 1523 var 1524 accordionElement = $('#' + accordionID), 1525 // Deciding what should be used as accordion buttons. 1526 buttonElement = (options.accordionButton < 2) ? 'a.menuparent,span.nolink.menuparent' : 'a.sf-accordion-button', 1527 button = accordionElement.find(buttonElement); 1528 1529 // Attaching a click event to the toggle switch. 1530 $('#' + toggleID).bind('click', function(e){ 1531 // Preventing the click. 1532 e.preventDefault(); 1533 // Adding the sf-expanded class. 1534 $(this).toggleClass('sf-expanded'); 1535 1536 if (accordionElement.hasClass('sf-expanded')){ 1537 // If the accordion is already expanded: 1538 // Hiding its expanded sub-menus and then the accordion itself as well. 1539 accordionElement.add(accordionElement.find('li.sf-expanded')).removeClass('sf-expanded') 1540 .end().find('ul').hide() 1541 // This is a bit tricky, it's the same trick that has been in use in the main plugin for sometime. 1542 // Basically we'll add a class that keeps the sub-menu off-screen and still visible, 1543 // and make it invisible and removing the class one moment before showing or hiding it. 1544 // This helps screen reader software access all the menu items. 1545 .end().hide().addClass('sf-hidden').show(); 1546 // Changing the caption of any existing accordion buttons to 'Expand'. 1547 if (options.accordionButton == 2){ 1548 accordionElement.find('a.sf-accordion-button').text(options.expandText); 1549 } 1550 } 1551 else { 1552 // But if it's collapsed, 1553 accordionElement.addClass('sf-expanded').hide().removeClass('sf-hidden').show(); 1554 } 1555 }); 1556 1557 // Attaching a click event to the buttons. 1558 button.bind('click', function(e){ 1559 // Making sure the buttons does not exist already. 1560 if ($(this).closest('li').children('ul').length > 0){ 1561 e.preventDefault(); 1562 // Selecting the parent menu items. 1563 var parent = $(this).closest('li'); 1564 // Creating and inserting Expand\Collapse buttons to the parent menu items, 1565 // of course only if not already happened.
1566 if (options.accordionButton == 1 && parent.children('a.menuparent,span.nolink.menuparent').length > 0 && parent.children('ul').children('li.sf-clone-parent').length == 0){ 1567 var 1568 // Cloning the hyperlink of the parent menu item. 1569 cloneLink = parent.children('a.menuparent,span.nolink.menuparent').clone(), 1570 // Wrapping the hyerplinks in <li>. 1571 cloneLink = $('<li class="sf-clone-parent" />').html(cloneLink); 1572 // Adding a helper class and attaching them to the sub-menus. 1573 parent.children('ul').addClass('sf-has-clone-parent').prepend(cloneLink); 1574 } 1575 // Once the button is clicked, collapse the sub-menu if it's expanded. 1576 if (parent.hasClass('sf-expanded')){ 1577 parent.children('ul').slideUp('fast', function(){ 1578 // Doing the accessibility trick after hiding the sub-menu. 1579 $(this).closest('li').removeClass('sf-expanded').end().addClass('sf-hidden').show(); 1580 }); 1581 // Changing the caption of the inserted Collapse link to 'Expand', if any is inserted. 1582 if (options.accordionButton == 2 && parent.children('.sf-accordion-button').length > 0){ 1583 parent.children('.sf-accordion-button').text(options.expandText); 1584 } 1585 } 1586 // Otherwise, expand the sub-menu. 1587 else { 1588 // Doing the accessibility trick and then showing the sub-menu. 1589 parent.children('ul').hide().removeClass('sf-hidden').slideDown('fast') 1590 // Changing the caption of the inserted Expand link to 'Collape', if any is inserted. 1591 .end().addClass('sf-expanded').children('a.sf-accordion-button').text(options.collapseText) 1592 // Hiding any expanded sub-menu of the same level. 1593 .end().siblings('li.sf-expanded').children('ul') 1594 .slideUp('fast', function(){ 1595 // Doing the accessibility trick after hiding it. 1596 $(this).closest('li').removeClass('sf-expanded').end().addClass('sf-hidden').show(); 1597 }) 1598 // Assuming Expand\Collapse buttons do exist, resetting captions, in those hidden sub-menus. 1599 .parent().children('a.sf-accordion-button').text(options.expandText); 1600 } 1601 } 1602 }); 1603 } 1604 } 1605 else { 1606 var 1607 // Class names modification. 1608 menuClone = menu.clone(), classes = (options.menuClasses) ? ((options.excludeClass_menu && menuClone.hasClass(options.excludeClass_menu)) ? menuClone.removeClass(options.excludeClass_menu).attr('class') : menuClone.attr('class')) : '', 1609 classes = (options.includeClass_menu && !menuClone.hasClass(options.includeClass_menu)) ? ((options.menuClasses) ? menuClone.addClass(options.includeClass_menu).attr('class') : options.includeClass_menu) : classes, 1610 classes = (classes) ? ' class="' + classes + '"' : ''; 1611 1612 // Making sure the <select> element does not exist already. 1613 if ($('#' + menuID + '-select').length == 0){ 1614 // Creating the <option> elements. 1615 var newMenu = toSelect(refinedMenu, 1), 1616 // Creating the <select> element and assigning an ID and class name. 1617 selectList = $('<select' + classes + ' id="' + menuID + '-select"/>') 1618 // Attaching the title and the items to the <select> element. 1619 .html('<option>' + options.title + '</option>' + newMenu) 1620 // Attaching an event then. 1621 .change(function(){ 1622 // Except for the first option that is the menu title and not a real menu item. 1623 if ($('option:selected', this).index()){ 1624 window.location = selectList.val(); 1625 } 1626 }); 1627 // Applying the addSelected option to it. 1628 if (options.addSelected){ 1629 selectList.find('.active').attr('selected', !0); 1630 } 1631 // Finally inserting the <select> element into the document then hiding the original menu. 1632 menu.before(selectList).hide(); 1633 } 1634 } 1635 } 1636 1637 // Turn everything back to normal. 1638 function turnBack(menu){ 1639 var 1640 id = '#' + menu.attr('id'); 1641 // Removing the small screen version. 1642 $(id + '-' + options.type).remove(); 1643 // Removing the accordion toggle switch as well. 1644 if (options.type == 'accordion'){ 1645 $(id + '-toggle').parent('div').remove(); 1646 } 1647 // Crystal clear! 1648 $(id).show(); 1649 } 1650
1651 // Return original object to support chaining. 1652 // Although this is unnecessary because of the way the module uses these plugins. 1653 for (var s = 0; s < this.length; s++){ 1654 var 1655 menu = $(this).eq(s), 1656 mode = options.mode; 1657 // The rest is crystal clear, isn't it? :) 1658 if (mode == 'always_active'){ 1659 convert(menu); 1660 } 1661 else if (mode == 'window_width'){ 1662 var breakpoint = (options.breakpointUnit == 'em') ? (options.breakpoint * parseFloat($('body').css('font-size'))) : options.breakpoint, 1663 windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, 1664 timer; 1665 if ((typeof Modernizr === 'undefined' || typeof Modernizr.mq !== 'function') && windowWidth < breakpoint){ 1666 convert(menu); 1667 } 1668 else if (typeof Modernizr !== 'undefined' && typeof Modernizr.mq === 'function' && Modernizr.mq('(max-width:' + (breakpoint - 1) + 'px)')) { 1669 convert(menu); 1670 } 1671 $(window).resize(function(){ 1672 clearTimeout(timer); 1673 timer = setTimeout(function(){ 1674 var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; 1675 if ((typeof Modernizr === 'undefined' || typeof Modernizr.mq !== 'function') && windowWidth < breakpoint){ 1676 convert(menu); 1677 } 1678 else if (typeof Modernizr !== 'undefined' && typeof Modernizr.mq === 'function' && Modernizr.mq('(max-width:' + (breakpoint - 1) + 'px)')) { 1679 convert(menu); 1680 } 1681 else { 1682 turnBack(menu); 1683 } 1684 }, 50); 1685 }); 1686 } 1687 else if (mode == 'useragent_custom'){ 1688 if (options.useragent != ''){ 1689 var ua = RegExp(options.useragent, 'i'); 1690 if (navigator.userAgent.match(ua)){ 1691 convert(menu); 1692 } 1693 } 1694 } 1695 else if (mode == 'useragent_predefined' && navigator.userAgent.match(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i)){ 1696 convert(menu); 1697 } 1698 } 1699 return this; 1700 } 1701})(jQuery); 1702; 1703/* 1704 * Supposition v0.2 - an optional enhancer for Superfish jQuery menu widget. 1705 * 1706 * Copyright (c) 2008 Joel Birch - based mostly on work by Jesse Klaasse and credit goes largely to him. 1707 * Special thanks to Karl Swedberg for valuable input. 1708 * 1709 * Dual licensed under the MIT and GPL licenses: 1710 * http://www.opensource.org/licenses/mit-license.php 1711 * http://www.gnu.org/licenses/gpl.html 1712 */ 1713/* 1714 * This is not the original jQuery Supposition plugin. 1715 * Please refer to the README for more information. 1716 */ 1717 1718(function($){ 1719 $.fn.supposition = function(){ 1720 var $w = $(window), /*do this once instead of every onBeforeShow call*/ 1721 _offset = function(dir) { 1722 return window[dir == 'y' ? 'pageYOffset' : 'pageXOffset'] 1723 || document.documentElement && document.documentElement[dir=='y' ? 'scrollTop' : 'scrollLeft'] 1724 || document.body[dir=='y' ? 'scrollTop' : 'scrollLeft']; 1725 }, 1726 onHide = function(){ 1727 this.css({bottom:''}); 1728 }, 1729 onBeforeShow = function(){ 1730 this.each(function(){ 1731 var $u = $(this); 1732 $u.css('display','block'); 1733 var $mul = $u.closest('.sf-menu'), 1734 level = $u.parents('ul').length, 1735 menuWidth = $u.width(), 1736 menuParentWidth = $u.closest('li').outerWidth(true), 1737 menuParentLeft = $u.closest('li').offset().left, 1738 totalRight = $w.width() + _offset('x'), 1739 menuRight = $u.offset().left + menuWidth, 1740 exactMenuWidth = (menuRight > (menuParentWidth + menuParentLeft)) ? menuWidth - (menuRight - (menuParentWidth + menuParentLeft)) : menuWidth; 1741 if ($u.parents('.sf-js-enabled').hasClass('rtl')) { 1742 if (menuParentLeft < exactMenuWidth) { 1743 if (($mul.hasClass('sf-horizontal') && level == 1) || ($mul.hasClass('sf-navbar') && level == 2)){ 1744 $u.css({left:0,right:'auto'}); 1745 } 1746 else { 1747 $u.css({left:menuParentWidth + 'px',right:'auto'}); 1748 } 1749 } 1750 } 1751 else { 1752 if (menuRight > totalRight && menuParentLeft > menuWidth) { 1753 if (($mul.hasClass('sf-horizontal') && level == 1) || ($mul.hasClass('sf-navbar') && level == 2)){ 1754 $u.css({right:0,left:'auto'}); 1755 } 1756 else { 1757 $u.css({right:menuParentWidth + 'px',left:'auto'}); 1758 } 1759 } 1760 } 1761 var windowHeight = $w.height(), 1762 offsetTop = $u.offset().top, 1763 menuParentShadow = ($mul.hasClass('sf-shadow') && $u.css('padding-bottom').length > 0) ? parseInt($u.css('padding-bottom').slice(0,-2)) : 0, 1764 menuParentHeight = ($mul.hasClass('sf-vertical')) ? '-' + menuParentShadow : $u.parent().outerHeight(true) - menuParentShadow, 1765 menuHeight = $u.height(), 1766 baseline = windowHeight + _offset('y'); 1767 var expandUp = ((offsetTop + menuHeight > baseline) && (offsetTop > menuHeight)); 1768 if (expandUp) { 1769 $u.css({bottom:menuParentHeight + 'px',top:'auto'}); 1770 } 1771 $u.css('display','none'); 1772 }); 1773 }; 1774 1775 return this.each(function() { 1776 var o = $.fn.superfish.o[this.serial]; /* get this menu's options */ 1777 1778 /* if callbacks already set, store them */ 1779 var _onBeforeShow = o.onBeforeShow, 1780 _onHide = o.onHide; 1781 1782 $.extend($.fn.superfish.o[this.serial],{ 1783 onBeforeShow: function() { 1784 onBeforeShow.call(this); /* fire our Supposition callback */ 1785 _onBeforeShow.call(this); /* fire stored callbacks */ 1786 }, 1787 onHide: function() { 1788 onHide.call(this); /* fire our Supposition callback */ 1789 _onHide.call(this); /* fire stored callbacks */ 1790 } 1791 }); 1792 }); 1793 }; 1794})(jQuery);; 1795/* Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net) 1796 * Licensed under the MIT License (LICENSE.txt). 1797 * 1798 * Version 2.1.2 1799 */ 1800(function(a){a.fn.bgiframe=(a.browser.msie&&/msie 6\.0/i.test(navigator.userAgent)?function(d){d=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},d);var c='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+d.src+'"style="display:block;position:absolute;z-index:-1;'+(d.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(d.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":b(d.top))+";left:"+(d.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":b(d.left))+";width:"+(d.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":b(d.width))+";height:"+(d.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":b(d.height))+';"/>';return this.each(function(){if(a(this).children("iframe.bgiframe").length===0){this.insertBefore(document.createElement(c),this.firstChild)}})}:function(){return this});a.fn.bgIframe=a.fn.bgiframe;function b(c){return c&&c.constructor===Number?c+"px":c}})(jQuery);; 1801/* 1802 * Superfish v1.4.8 - jQuery menu widget 1803 * Copyright (c) 2008 Joel Birch 1804 * 1805 * Dual licensed under the MIT and GPL licenses: 1806 * http://www.opensource.org/licenses/mit-license.php 1807 * http://www.gnu.org/licenses/gpl.html 1808 * 1809 * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt 1810 */ 1811/* 1812 * This is not the original jQuery Superfish plugin. 1813 * Please refer to the README for more information. 1814 */ 1815 1816(function($){ 1817 $.fn.superfish = function(op){ 1818 var sf = $.fn.superfish, 1819 c = sf.c, 1820 $arrow = $(['<span class="',c.arrowClass,'"> »</span>'].join('')), 1821 over = function(){ 1822 var $$ = $(this), menu = getMenu($$); 1823 clearTimeout(menu.sfTimer); 1824 $$.showSuperfishUl().siblings().hideSuperfishUl(); 1825 }, 1826 out = function(){ 1827 var $$ = $(this), menu = getMenu($$), o = sf.op; 1828 clearTimeout(menu.sfTimer); 1829 menu.sfTimer=setTimeout(function(){ 1830 if ($$.children('.sf-clicked').length == 0){ 1831 o.retainPath=($.inArray($$[0],o.$path)>-1);
1832 $$.hideSuperfishUl(); 1833 if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);} 1834 } 1835 },o.delay); 1836 }, 1837 getMenu = function($menu){ 1838 var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0]; 1839 sf.op = sf.o[menu.serial]; 1840 return menu; 1841 }, 1842 addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); }; 1843 1844 return this.each(function() { 1845 var s = this.serial = sf.o.length; 1846 var o = $.extend({},sf.defaults,op); 1847 o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels), 1848 p = o.$path; 1849 for (var l = 0; l < p.length; l++){ 1850 p.eq(l).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass); 1851 } 1852 sf.o[s] = sf.op = o; 1853 1854 $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() { 1855 if (o.autoArrows) addArrow( $(this).children('a:first-child, span.nolink:first-child') ); 1856 }) 1857 .not('.'+c.bcClass) 1858 .hideSuperfishUl(); 1859 1860 var $a = $('a, span.nolink',this); 1861 $a.each(function(i){ 1862 var $li = $a.eq(i).parents('li'); 1863 $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);}); 1864 }); 1865 o.onInit.call(this); 1866 1867 }).each(function() { 1868 var menuClasses = [c.menuClass], 1869 addShadow = true; 1870 if ($.browser !== undefined){ 1871 if ($.browser.msie && $.browser.version < 7){ 1872 addShadow = false; 1873 } 1874 } 1875 if (sf.op.dropShadows && addShadow){ 1876 menuClasses.push(c.shadowClass); 1877 } 1878 $(this).addClass(menuClasses.join(' ')); 1879 }); 1880 }; 1881 1882 var sf = $.fn.superfish; 1883 sf.o = []; 1884 sf.op = {}; 1885 sf.IE7fix = function(){ 1886 var o = sf.op; 1887 if ($.browser !== undefined){ 1888 if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity != undefined) { 1889 this.toggleClass(sf.c.shadowClass+'-off'); 1890 } 1891 } 1892 }; 1893 sf.c = { 1894 bcClass: 'sf-breadcrumb', 1895 menuClass: 'sf-js-enabled', 1896 anchorClass: 'sf-with-ul', 1897 arrowClass: 'sf-sub-indicator', 1898 shadowClass: 'sf-shadow' 1899 }; 1900 sf.defaults = { 1901 hoverClass: 'sfHover', 1902 pathClass: 'overideThisToUse', 1903 pathLevels: 1, 1904 delay: 800, 1905 animation: {opacity:'show'}, 1906 speed: 'fast', 1907 autoArrows: true, 1908 dropShadows: true, 1909 disableHI: false, // true disables hoverIntent detection 1910 onInit: function(){}, // callback functions 1911 onBeforeShow: function(){}, 1912 onShow: function(){}, 1913 onHide: function(){} 1914 }; 1915 $.fn.extend({ 1916 hideSuperfishUl : function(){ 1917 var o = sf.op, 1918 not = (o.retainPath===true) ? o.$path : ''; 1919 o.retainPath = false; 1920 var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass) 1921 .children('ul').addClass('sf-hidden'); 1922 o.onHide.call($ul); 1923 return this; 1924 }, 1925 showSuperfishUl : function(){ 1926 var o = sf.op, 1927 sh = sf.c.shadowClass+'-off', 1928 $ul = this.addClass(o.hoverClass) 1929 .children('ul.sf-hidden').hide().removeClass('sf-hidden'); 1930 sf.IE7fix.call($ul); 1931 o.onBeforeShow.call($ul); 1932 $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); }); 1933 return this; 1934 } 1935 }); 1936})(jQuery);; 1937/* 1938 * Supersubs v0.4b - jQuery plugin 1939 * Copyright (c) 2013 Joel Birch 1940 * 1941 * Dual licensed under the MIT and GPL licenses: 1942 * http://www.opensource.org/licenses/mit-license.php 1943 * http://www.gnu.org/licenses/gpl.html 1944 * 1945 * This plugin automatically adjusts submenu widths of suckerfish-style menus to that of 1946 * their longest list item children. If you use this, please expect bugs and report them 1947 * to the jQuery Google Group with the word 'Superfish' in the subject line. 1948 * 1949 */ 1950/* 1951 * This is not the original jQuery Supersubs plugin. 1952 * Please refer to the README for more information. 1953 */ 1954 1955(function($){ // $ will refer to jQuery within this closure 1956 $.fn.supersubs = function(options){ 1957 var opts = $.extend({}, $.fn.supersubs.defaults, options);
1958 // return original object to support chaining 1959 // Although this is unnecessary due to the way the module uses these plugins. 1960 for (var a = 0; a < this.length; a++) { 1961 // cache selections 1962 var $$ = $(this).eq(a), 1963 // support metadata 1964 o = $.meta ? $.extend({}, opts, $$.data()) : opts; 1965 // Jump one level if it's a "NavBar" 1966 if ($$.hasClass('sf-navbar')) { 1967 $$ = $$.children('li').children('ul'); 1968 } 1969 // cache all ul elements 1970 var $ULs = $$.find('ul'), 1971 // get the font size of menu. 1972 // .css('fontSize') returns various results cross-browser, so measure an em dash instead 1973 fontsize = $('<li id="menu-fontsize">—</li>'), 1974 size = fontsize.attr('style','padding:0;position:absolute;top:-99999em;width:auto;') 1975 .appendTo($$)[0].clientWidth; //clientWidth is faster than width() 1976 // remove em dash 1977 fontsize.remove(); 1978 1979 // loop through each ul in menu 1980 for (var b = 0; b < $ULs.length; b++) { 1981 var 1982 // cache this ul 1983 $ul = $ULs.eq(b); 1984 // If a multi-column sub-menu, and only if correctly configured. 1985 if (o.megamenu && $ul.hasClass('sf-megamenu') && $ul.find('.sf-megamenu-column').length > 0){ 1986 // Look through each column. 1987 var $column = $ul.find('div.sf-megamenu-column > ol'), 1988 // Overall width. 1989 mwWidth = 0; 1990 for (var d = 0; d < $column.length; d++){ 1991 resize($column.eq(d)); 1992 // New column width, in pixels. 1993 var colWidth = $column.width(); 1994 // Just a trick to convert em unit to px. 1995 $column.css({width:colWidth}) 1996 // Making column parents the same size. 1997 .parents('.sf-megamenu-column').css({width:colWidth}); 1998 // Overall width. 1999 mwWidth += parseInt(colWidth); 2000 } 2001 // Resizing the columns container too. 2002 $ul.add($ul.find('li.sf-megamenu-wrapper, li.sf-megamenu-wrapper > ol')).css({width:mwWidth}); 2003 } 2004 else { 2005 resize($ul); 2006 } 2007 } 2008 } 2009 function resize($ul){ 2010 var 2011 // get all (li) children of this ul 2012 $LIs = $ul.children(), 2013 // get all anchor grand-children 2014 $As = $LIs.children('a'); 2015 // force content to one line and save current float property 2016 $LIs.css('white-space','nowrap'); 2017 // remove width restrictions and floats so elements remain vertically stacked 2018 $ul.add($LIs).add($As).css({float:'none',width:'auto'}); 2019 // this ul will now be shrink-wrapped to longest li due to position:absolute 2020 // so save its width as ems. 2021 var emWidth = $ul.get(0).clientWidth / size; 2022 // add more width to ensure lines don't turn over at certain sizes in various browsers 2023 emWidth += o.extraWidth; 2024 // restrict to at least minWidth and at most maxWidth 2025 if (emWidth > o.maxWidth) {emWidth = o.maxWidth;} 2026 else if (emWidth < o.minWidth) {emWidth = o.minWidth;} 2027 emWidth += 'em'; 2028 // set ul to width in ems 2029 $ul.css({width:emWidth}); 2030 // restore li floats to avoid IE bugs 2031 // set li width to full width of this ul 2032 // revert white-space to normal 2033 $LIs.add($As).css({float:'',width:'',whiteSpace:''}); 2034 // update offset position of descendant ul to reflect new width of parent. 2035 // set it to 100% in case it isn't already set to this in the CSS 2036 for (var c = 0; c < $LIs.length; c++) { 2037 var $childUl = $LIs.eq(c).children('ul'); 2038 var offsetDirection = $childUl.css('left') !== undefined ? 'left' : 'right'; 2039 $childUl.css(offsetDirection,'100%'); 2040 } 2041 } 2042 return this; 2043 }; 2044 // expose defaults 2045 $.fn.supersubs.defaults = { 2046 megamenu: true, // define width for multi-column sub-menus and their columns. 2047 minWidth: 12, // requires em unit. 2048 maxWidth: 27, // requires em unit. 2049 extraWidth: 1 // extra width can ensure lines don't sometimes turn over due to slight browser differences in how they round-off values 2050 }; 2051})(jQuery); // plugin code ends 2052; 2053/** 2054 * @file 2055 * The Superfish Drupal Behavior to apply the Superfish jQuery plugin to lists. 2056 */ 2057 2058(function ($) { 2059 Drupal.behaviors.superfish = { 2060 attach: function (context, settings) { 2061 // Take a look at each list to apply Superfish to. 2062 $.each(settings.superfish || {}, function(index, options) { 2063 // Process all Superfish lists. 2064 $('#superfish-' + options.id, context).once('superfish', function() { 2065 var list = $(this); 2066 2067 // Check if we are to apply the Supersubs plug-in to it. 2068 if (options.plugins || false) { 2069 if (options.plugins.supersubs || false) { 2070 list.supersubs(options.plugins.supersubs); 2071 } 2072 } 2073 2074 // Apply Superfish to the list. 2075 list.superfish(options.sf); 2076 2077 // Check if we are to apply any other plug-in to it. 2078 if (options.plugins || false) { 2079 if (options.plugins.touchscreen || false) { 2080 list.sftouchscreen(options.plugins.touchscreen); 2081 } 2082 if (options.plugins.smallscreen || false) { 2083 list.sfsmallscreen(options.plugins.smallscreen); 2084 } 2085 if (options.plugins.automaticwidth || false) { 2086 list.sfautomaticwidth(); 2087 } 2088 if (options.plugins.supposition || false) { 2089 list.supposition(); 2090 } 2091 if (options.plugins.bgiframe || false) { 2092 list.find('ul').bgIframe({opacity:false}); 2093 } 2094 } 2095 }); 2096 }); 2097 } 2098 }; 2099})(jQuery);;
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.