PageSourceSearch

https://www.mukcbs.org/sites/default/files/js/js_mtZu-NJ2TPBi3fCKaN9rtzsPUBh0oHiEyb-9iH8WTiI.js

js mukcbs.org collected 2026-10-02 10:19:07 UTC 173,300 bytes, 3,078 lines download raw bytes

vendor: 11,960 bytes, lines 1-6
1/*!
2	Colorbox 1.6.4
3	license: MIT
4	http://www.jacklmoore.com/colorbox
5*/
6(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);
vendor: 5,061 bytes, lines 6-8
6;
7/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */
8!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,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=N(Array.prototype.forEach),m=N(Array.prototype.pop),f=N(Array.prototype.push),p=N(String.prototype.toLowerCase),d=N(String.prototype.toString),h=N(String.prototype.match),g=N(String.prototype.replace),T=N(String.prototype.indexOf),y=N(String.prototype.trim),E=N(RegExp.prototype.test),A=(_=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(_,t)});var _;function N(e){return function(t){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 b(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p;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 S(t){const n=l(null);for(const[o,i]of e(t))void 0!==r(t,o)&&(n[o]=i);return n}function R(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return N(n.get);if("function"==typeof n.value)return N(n.value)}e=o(e)}return function(e){return console.warn("fallback value for",e),null}}const w=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","section","select","shadow","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"]),D=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),L=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"]),v=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"]),x=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"]),k=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),C=i(["#text"]),O=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","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
8spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),I=i(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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","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"]),M=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"]),U=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),P=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=a(/<%[\w\W]*|[\w\W]*%>/gm),H=a(/\${[\w\W]*}/gm),z=a(/^data-[\-\w.\u00B7-\uFFFF]/),B=a(/^aria-[\-\w]+$/),W=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=a(/^(?:\w+script|data):/i),Y=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),j=a(/^html$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:P,ERB_EXPR:F,TMPLIT_EXPR:H,DATA_ATTR:z,ARIA_ATTR:B,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:Y,DOCTYPE_NAME:j});const X=function(){return"undefined"==typeof window?null:window},K=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const 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}};var V=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X();const o=e=>t(e);if(o.version="3.0.6",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:_,Node:N,Element:P,NodeFilter:F,NamedNodeMap:H=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:z,DOMParser:B,trustedTypes:G}=n,Y=P.prototype,V=R(Y,"cloneNode"),$=R(Y,"nextSibling"),Z=R(Y,"childNodes"),J=R(Y,"parentNode");if("function"==typeof _){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let Q,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:oe,getElementsByTagName:re}=r,{importNode:ie}=a;let ae={};o.isSupported="function"==typeof e&&"function"==typeof J&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:le,ERB_EXPR:ce,TMPLIT_EXPR:se,DATA_ATTR:ue,ARIA_ATTR:me,IS_SCRIPT_OR_DATA:fe,ATTR_WHITESPACE:pe}=q;let{IS_ALLOWED_URI:de}=q,he=null;const ge=b({},[...w,...D,...L,...x,...C]);let Te=null;const ye=b({},[...O,...I,...M,...U]);let Ee=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}})),Ae=null,_e=null,Ne=!0,be=!0,Se=!1,Re=!0,we=!1,De=!1,Le=!1,ve=!1,xe=!1,ke=!1,Ce=!1,Oe=!0,Ie=!1;const Me="user-content-";let Ue=!0,Pe=!1,Fe={},He=null;const ze=b({},["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 Be=null;const We=b({},["audio","video","img","source","image","track"]);let Ge=null;const Ye=b({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),je="http://www.w3.org/1998/Math/MathML",qe="http://www.w3.org/2000/svg",Xe="http://www.w3.org/1999/xhtml";let Ke=Xe,Ve=!1,$e=null;const Ze=b({},[je,qe,Xe],d);let Je=null;const Qe=["application/xhtml+xml","text/html"],et="text/html";let tt=null,nt=null;const ot=r.createElement("form"),rt=function(e){return e instanceof RegExp||e instanceof Function},it=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!nt||nt!==e){if(e&&"object"==typeof e||(e={}
vendor: 5,478 bytes, line 8
8),e=S(e),Je=Je=-1===Qe.indexOf(e.PARSER_MEDIA_TYPE)?et:e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Je?d:p,he="ALLOWED_TAGS"in e?b({},e.ALLOWED_TAGS,tt):ge,Te="ALLOWED_ATTR"in e?b({},e.ALLOWED_ATTR,tt):ye,$e="ALLOWED_NAMESPACES"in e?b({},e.ALLOWED_NAMESPACES,d):Ze,Ge="ADD_URI_SAFE_ATTR"in e?b(S(Ye),e.ADD_URI_SAFE_ATTR,tt):Ye,Be="ADD_DATA_URI_TAGS"in e?b(S(We),e.ADD_DATA_URI_TAGS,tt):We,He="FORBID_CONTENTS"in e?b({},e.FORBID_CONTENTS,tt):ze,Ae="FORBID_TAGS"in e?b({},e.FORBID_TAGS,tt):{},_e="FORBID_ATTR"in e?b({},e.FORBID_ATTR,tt):{},Fe="USE_PROFILES"in e&&e.USE_PROFILES,Ne=!1!==e.ALLOW_ARIA_ATTR,be=!1!==e.ALLOW_DATA_ATTR,Se=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Re=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,we=e.SAFE_FOR_TEMPLATES||!1,De=e.WHOLE_DOCUMENT||!1,xe=e.RETURN_DOM||!1,ke=e.RETURN_DOM_FRAGMENT||!1,Ce=e.RETURN_TRUSTED_TYPE||!1,ve=e.FORCE_BODY||!1,Oe=!1!==e.SANITIZE_DOM,Ie=e.SANITIZE_NAMED_PROPS||!1,Ue=!1!==e.KEEP_CONTENT,Pe=e.IN_PLACE||!1,de=e.ALLOWED_URI_REGEXP||W,Ke=e.NAMESPACE||Xe,Ee=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ee.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ee.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ee.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),we&&(be=!1),ke&&(xe=!0),Fe&&(he=b({},[...C]),Te=[],!0===Fe.html&&(b(he,w),b(Te,O)),!0===Fe.svg&&(b(he,D),b(Te,I),b(Te,U)),!0===Fe.svgFilters&&(b(he,L),b(Te,I),b(Te,U)),!0===Fe.mathMl&&(b(he,x),b(Te,M),b(Te,U))),e.ADD_TAGS&&(he===ge&&(he=S(he)),b(he,e.ADD_TAGS,tt)),e.ADD_ATTR&&(Te===ye&&(Te=S(Te)),b(Te,e.ADD_ATTR,tt)),e.ADD_URI_SAFE_ATTR&&b(Ge,e.ADD_URI_SAFE_ATTR,tt),e.FORBID_CONTENTS&&(He===ze&&(He=S(He)),b(He,e.FORBID_CONTENTS,tt)),Ue&&(he["#text"]=!0),De&&b(he,["html","head","body"]),he.table&&(b(he,["tbody"]),delete Ae.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Q=e.TRUSTED_TYPES_POLICY,ee=Q.createHTML("")}else void 0===Q&&(Q=K(G,c)),null!==Q&&"string"==typeof ee&&(ee=Q.createHTML(""));i&&i(e),nt=e}},at=b({},["mi","mo","mn","ms","mtext"]),lt=b({},["foreignobject","desc","title","annotation-xml"]),ct=b({},["title","style","font","a","script"]),st=b({},D);b(st,L),b(st,v);const ut=b({},x);b(ut,k);const mt=function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:Ke,tagName:"template"});const n=p(e.tagName),o=p(t.tagName);return!!$e[e.namespaceURI]&&(e.namespaceURI===qe?t.namespaceURI===Xe?"svg"===n:t.namespaceURI===je?"svg"===n&&("annotation-xml"===o||at[o]):Boolean(st[n]):e.namespaceURI===je?t.namespaceURI===Xe?"math"===n:t.namespaceURI===qe?"math"===n&&lt[o]:Boolean(ut[n]):e.namespaceURI===Xe?!(t.namespaceURI===qe&&!lt[o])&&(!(t.namespaceURI===je&&!at[o])&&(!ut[n]&&(ct[n]||!st[n]))):!("application/xhtml+xml"!==Je||!$e[e.namespaceURI]))},ft=function(e){f(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},pt=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&&!Te[e])if(xe||ke)try{ft(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},dt=function(e){let t=null,n=null;if(ve)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Je&&Ke===Xe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=Q?Q.createHTML(e):e;if(Ke===Xe)try{t=(new B).parseFromString(o,Je)}catch(e){}if(!t||!t.documentElement){t=te.createDocument(Ke,"template",null);try{t.documentElement.innerHTML=Ve?ee:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Ke===Xe?re.call(t,De?"html":"body")[0]:De?t.documentElement:i},ht=function(e){return ne.call(e.ownerDocument||e,e,F.SHOW_ELEMENT|F.SHOW_COMMENT|F.SHOW_TEXT,null)},gt=function(e){return e instanceof z&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof H)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Tt=function(e){return"function"==typeof N&&e instanceof N},yt=function(e,t,n){ae[e]&&u(ae[e],(e=>{e.call(o,t,n,nt)}))},Et=function(e){let t=null;if(yt("beforeSanitizeElements",e,null),gt(e))return ft(e),!0;const n=tt(e.nodeName);if(yt("uponSanitizeElement",e,{tagName:n,allowedTags:he}),e.hasChildNodes()&&!Tt(e.firstElementChild)&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return ft(e),!0;if(!he[n]||Ae[n]){if(!Ae[n]&&_t(n)){if(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,n))return!1;if(Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(n))return!1}if(Ue&&!He[n]){const t=J(e)||e.parentNode,n=Z(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o)t.insertBefore(V(n[o],!0),$(e))}}return ft(e),!0}return e instanceof P&&!mt(e)?(ft(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!E(/<\/no(script|embed|frames)/i,e.innerHTML)?(we&&3===e.n
8odeType&&(t=e.textContent,u([le,ce,se],(e=>{t=g(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),yt("afterSanitizeElements",e,null),!1):(ft(e),!0)},At=function(e,t,n){if(Oe&&("id"===t||"name"===t)&&(n in r||n in ot))return!1;if(be&&!_e[t]&&E(ue,t));else if(Ne&&E(me,t));else if(!Te[t]||_e[t]){if(!(_t(e)&&(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,e)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(e))&&(Ee.attributeNameCheck instanceof RegExp&&E(Ee.attributeNameCheck,t)||Ee.attributeNameCheck instanceof Function&&Ee.attributeNameCheck(t))||"is"===t&&Ee.allowCustomizedBuiltInElements&&(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,n)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(n))))return!1}else if(Ge[t]);else if(E(de,g(n,pe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!Be[e]){if(Se&&!E(fe,g(n,pe,"")));else if(n)return!1}else;return!0},_t=function(e){return e.indexOf("-")>0},Nt=function(e){yt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Te};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=tt(a);let f="value"===a?c:y(c);if(n.attrName=s,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,yt("uponSanitizeAttribute",e,n),f=n.attrValue,n.forceKeepAttr)continue;if(pt(a,e),!n.keepAttr)continue;if(!Re&&E(/\/>/i,f)){pt(a,e);continue}we&&u([le,ce,se],(e=>{f=g(f,e," ")}));const p=tt(e.nodeName);if(At(p,s,f)){if(!Ie||"id"!==s&&"name"!==s||(pt(a,e),f=Me+f),Q&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(p,s)){case"TrustedHTML":f=Q.createHTML(f);break;case"TrustedScriptURL":f=Q.createScriptURL(f)}try{l?e.setAttributeNS(l,a,f):e.setAttribute(a,f),m(o.removed)}catch(e){}}}yt("afterSanitizeAttributes",e,null)},bt=function e(t){let n=null;const o=ht(t);for(yt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)yt("uponSanitizeShadowNode",n,null),Et(n)||(n.content instanceof s&&e(n.content),Nt(n));yt("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(Ve=!e,Ve&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Tt(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Le||it(t),o.removed=[],"string"==typeof e&&(Pe=!1),Pe){if(e.nodeName){const t=tt(e.nodeName);if(!he[t]||Ae[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof N)n=dt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!xe&&!we&&!De&&-1===e.indexOf("<"))return Q&&Ce?Q.createHTML(e):e;if(n=dt(e),!n)return xe?null:Ce?ee:""}n&&ve&&ft(n.firstChild);const c=ht(Pe?e:n);for(;i=c.nextNode();)Et(i)||(i.content instanceof s&&bt(i.content),Nt(i));if(Pe)return e;if(xe){if(ke)for(l=oe.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Te.shadowroot||Te.shadowrootmode)&&(l=ie.call(a,l,!0)),l}let m=De?n.outerHTML:n.innerHTML;return De&&he["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&E(j,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),we&&u([le,ce,se],(e=>{m=g(m,e," ")})),Q&&Ce?Q.createHTML(m):m},o.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};it(e),Le=!0},o.clearConfig=function(){nt=null,Le=!1},o.isValidAttribute=function(e,t,n){nt||it({});const o=tt(e),r=tt(t);return At(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(ae[e]=ae[e]||[],f(ae[e],t))},o.removeHook=function(e){if(ae[e])return m(ae[e])},o.removeHooks=function(e){ae[e]&&(ae[e]=[])},o.removeAllHooks=function(){ae={}},o}();return V}));
9
10;
11/**
12 * @file
13 * Colorbox module init js.
14 */
15
16(function ($) {
17
18Drupal.behaviors.initColorbox = {
19  attach: function (context, settings) {
20    if (!$.isFunction($('a, area, input', context).colorbox) || typeof settings.colorbox === 'undefined') {
21      return;
22    }
23
24    if (settings.colorbox.mobiledetect && window.matchMedia) {
25      // Disable Colorbox for small screens.
26      var mq = window.matchMedia("(max-device-width: " + settings.colorbox.mobiledevicewidth + ")");
27      if (mq.matches) {
28        return;
29      }
30    }
31
32    // Use "data-colorbox-gallery" if set otherwise use "rel".
33    settings.colorbox.rel = function () {
34      if ($(this).data('colorbox-gallery')) {
35        return $(this).data('colorbox-gallery');
36      }
37      else {
38        return $(this).attr('rel');
39      }
40    };
41
42    $('.colorbox', context)
43      .once('init-colorbox').each(function(){
44        // Only images are supported for the "colorbox" class.
45        // The "photo" setting forces the href attribute to be treated as an image.
46        var extendParams = {
47          photo: true
48        };
49        // If a title attribute is supplied, sanitize it.
50        var title = $(this).attr('title');
51        if (title) {
52          extendParams.title = Drupal.colorbox.sanitizeMarkup(title);
53        }
54        $(this).colorbox($.extend({}, settings.colorbox, extendParams));
55      });
56
57    $(context).bind('cbox_complete', function () {
58      Drupal.attachBehaviors($('#cboxLoadedContent'));
59    });
60  }
61};
62
63// Create colorbox namespace if it doesn't exist.
64if (!Drupal.hasOwnProperty('colorbox')) {
65  Drupal.colorbox = {};
66}
67
68/**
69 * Global function to allow sanitizing captions and control strings.
70 *
71 * @param markup
72 *   String containing potential markup.
73 * @return @string
74 *  Sanitized string with potentially dangerous markup removed.
75 */
76Drupal.colorbox.sanitizeMarkup = function(markup) {
77  // If DOMPurify installed, allow some HTML. Otherwise, treat as plain text.
78  if (typeof DOMPurify !== 'undefined') {
79    var purifyConfig = {
80      ALLOWED_TAGS: [
81        'a',
82        'b',
83        'strong',
84        'i',
85        'em',
86        'u',
87        'cite',
88        'code',
89        'br'
90      ],
91      ALLOWED_ATTR: [
92        'href',
93        'hreflang',
94        'title',
95        'target'
96      ]
97    }
98    if (Drupal.settings.hasOwnProperty('dompurify_custom_config')) {
99      purifyConfig = Drupal.settings.dompurify_custom_config;
100    }
101    return DOMPurify.sanitize(markup, purifyConfig);
102  }
103  else {
104    return Drupal.checkPlain(markup);
105  }
106}
107
108})(jQuery);
109;
110/**
111 * @file
112 * Colorbox module style js.
113 */
114
115(function ($) {
116
117Drupal.behaviors.initColorboxDefaultStyle = {
118  attach: function (context, settings) {
119    $(context).bind('cbox_complete', function () {
120      // Only run if there is a title.
121      if ($('#cboxTitle:empty', context).length == false) {
122        $('#cboxLoadedContent img', context).bind('mouseover', function () {
123          $('#cboxTitle', context).slideDown();
124        });
125        $('#cboxOverlay', context).bind('mouseover', function () {
126          $('#cboxTitle', context).slideUp();
127        });
128      }
129      else {
130        $('#cboxTitle', context).hide();
131      }
132    });
133  }
134};
135
136})(jQuery);
137;
138/**
139 * @file
140 * Colorbox module load js.
141 */
142(function ($) {
143
144Drupal.behaviors.initColorboxLoad = {
145  attach: function (context, settings) {
146    if (!$.isFunction($.colorbox) || typeof settings.colorbox === 'undefined') {
147      return;
148    }
149
150    if (settings.colorbox.mobiledetect && window.matchMedia) {
151      // Disable Colorbox for small screens.
152      var mq = window.matchMedia("(max-device-width: " + settings.colorbox.mobiledevicewidth + ")");
153      if (mq.matches) {
154        return;
155      }
156    }
157
158    $.urlParams = function (url) {
159      var p = {},
160          e,
161          a = /\+/g,  // Regex for replacing addition symbol with a space.
162          r = /([^&=]+)=?([^&]*)/g,
163          d = function (s) { return decodeURIComponent(s.replace(a, ' ')); },
164          q = url.split('?');
165      while (e = r.exec(q[1])) {
166        e[1] = d(e[1]);
167        e[2] = d(e[2]);
168        switch (e[2].toLowerCase()) {
169          case 'true':
170          case 'yes':
171            e[2] = true;
172            break;
173          case 'false':
174          case 'no':
175            e[2] = false;
176            break;
177        }
178        if (e[1] == 'width') { e[1] = 'innerWidth'; }
179        if (e[1] == 'height') { e[1] = 'innerHeight'; }
180        if (e[2]) {
181          e[2] = Drupal.checkPlain(e[2]);
182        }
183        p[e[1]] = e[2];
184      }
185      return p;
186    };
187
188    $('.colorbox-load', context)
189      .once('init-colorbox-load', function () {
190        var href = $(this).attr('href');
191
192        var params = $.urlParams(href);
193
194        // Always load in an iframe.
195        params.iframe = true;
196
197        // Set inner width and height if not already specified.
198        if (!params.hasOwnProperty('innerWidth')) {
199          params.innerWidth = $(window).width() * .8;
200        }
201        if (!params.hasOwnProperty('innerHeight')) {
202          params.innerHeight = $(window).height() * .8;
203        }
204
205        if (!params.hasOwnProperty('title')) {
206          // If a title attribute is supplied, sanitize it.
207          var title = $(this).attr('title');
208          if (title) {
209            params.title = Drupal.colorbox.sanitizeMarkup(title);
210          }
211        }
212        $(this).colorbox($.extend({}, settings.colorbox, params));
213      });
214  }
215};
216
217})(jQuery);
218;
219/**
220 * @file
221 * Colorbox module inline js.
222 */
223
224(function ($) {
225
226Drupal.behaviors.initColorboxInline = {
227  attach: function (context, settings) {
228    if (!$.isFunction($.colorbox) || typeof settings.colorbox === 'undefined') {
229      return;
230    }
231
232    if (settings.colorbox.mobiledetect && window.matchMedia) {
233      // Disable Colorbox for small screens.
234      var mq = window.matchMedia("(max-device-width: " + settings.colorbox.mobiledevicewidth + ")");
235      if (mq.matches) {
236        return;
237      }
238    }
239
240    $.urlParam = function(name, url){
241      if (name == 'fragment') {
242        var results = new RegExp('(#[^&#]*)').exec(url);
243      }
244      else {
245        var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(url);
246      }
247      if (!results) { return ''; }
248      return results[1] || '';
249    };
250    $('.colorbox-inline', context).once('init-colorbox-inline').colorbox({
251      transition:settings.colorbox.transition,
252      speed:settings.colorbox.speed,
253      opacity:settings.colorbox.opacity,
254      slideshow:settings.colorbox.slideshow,
255      slideshowAuto:settings.colorbox.slideshowAuto,
256      slideshowSpeed:settings.colorbox.slideshowSpeed,
257      slideshowStart:settings.colorbox.slideshowStart,
258      slideshowStop:settings.colorbox.slideshowStop,
259      current:settings.colorbox.current,
260      previous:settings.colorbox.previous,
261      next:settings.colorbox.next,
262      close:settings.colorbox.close,
263      overlayClose:settings.colorbox.overlayClose,
264      maxWidth:settings.colorbox.maxWidth,
265      maxHeight:settings.colorbox.maxHeight,
266      innerWidth:function(){
267        return $.urlParam('width', $(this).attr('href'));
268      },
269      innerHeight:function(){
270        return $.urlParam('height', $(this).attr('href'));
271      },
272      title:function(){
273        return Drupal.colorbox.sanitizeMarkup(
274          decodeURIComponent($.urlParam('title', $(this).attr('href'))));
275      },
276      iframe:function(){
277        return $.urlParam('iframe', $(this).attr('href'));
278      },
279      inline:function(){
280        return $.urlParam('inline', $(this).attr('href'));
281      },
282      href:function(){
283        return $.urlParam('fragment', $(this).attr('href'));
284      }
285    });
286  }
287};
288
289})(jQuery);
290;
291(function ($) {
292
293/**
294 * A progressbar object. Initialized with the given id. Must be inserted into
295 * the DOM afterwards through progressBar.element.
296 *
297 * method is the function which will perform the HTTP request to get the
298 * progress bar state. Either "GET" or "POST".
299 *
300 * e.g. pb = new progressBar('myProgressBar');
301 *      some_element.appendChild(pb.element);
302 */
303Drupal.progressBar = function (id, updateCallback, method, errorCallback) {
304  var pb = this;
305  this.id = id;
306  this.method = method || 'GET';
307  this.updateCallback = updateCallback;
308  this.errorCallback = errorCallback;
309
310  // The WAI-ARIA setting aria-live="polite" will announce changes after users
311  // have completed their current activity and not interrupt the screen reader.
312  this.element = $('<div class="progress" aria-live="polite"></div>').attr('id', id);
313  this.element.html('<div class="bar"><div class="filled"></div></div>' +
314                    '<div class="percentage"></div>' +
315                    '<div class="message">&nbsp;</div>');
316};
317
318/**
319 * Set the percentage and status message for the progressbar.
320 */
321Drupal.progressBar.prototype.setProgress = function (percentage, message) {
322  if (percentage >= 0 && percentage <= 100) {
323    $('div.filled', this.element).css('width', percentage + '%');
324    $('div.percentage', this.element).html(percentage + '%');
325  }
326  $('div.message', this.element).html(message);
327  if (this.updateCallback) {
328    this.updateCallback(percentage, message, this);
329  }
330};
331
332/**
333 * Start monitoring progress via Ajax.
334 */
335Drupal.progressBar.prototype.startMonitoring = function (uri, delay) {
336  this.delay = delay;
337  this.uri = uri;
338  this.sendPing();
339};
340
341/**
342 * Stop monitoring progress via Ajax.
343 */
344Drupal.progressBar.prototype.stopMonitoring = function () {
345  clearTimeout(this.timer);
346  // This allows monitoring to be stopped from within the callback.
347  this.uri = null;
348};
349
350/**
351 * Request progress data from server.
352 */
353Drupal.progressBar.prototype.sendPing = function () {
354  if (this.timer) {
355    clearTimeout(this.timer);
356  }
357  if (this.uri) {
358    var pb = this;
359    // When doing a post request, you need non-null data. Otherwise a
360    // HTTP 411 or HTTP 406 (with Apache mod_security) error may result.
361    $.ajax({
362      type: this.method,
363      url: this.uri,
364      data: '',
365      dataType: 'json',
366      success: function (progress) {
367        // Display errors.
368        if (progress.status == 0) {
369          pb.displayError(progress.data);
370          return;
371        }
372        // Update display.
373        pb.setProgress(progress.percentage, progress.message);
374        // Schedule next timer.
375        pb.timer = setTimeout(function () { pb.sendPing(); }, pb.delay);
376      },
377      error: function (xmlhttp) {
378        pb.displayError(Drupal.ajaxError(xmlhttp, pb.uri));
379      }
380    });
381  }
382};
383
384/**
385 * Display errors on the page.
386 */
387Drupal.progressBar.prototype.displayError = function (string) {
388  var error = $('<div class="messages error"></div>').html(string);
389  $(this.element).before(error).hide();
390
391  if (this.errorCallback) {
392    this.errorCallback(this);
393  }
394};
395
396})(jQuery);
397;
398/**
399 * @file
400 *
401 * Implement a modal form.
402 *
403 * @see modal.inc for documentation.
404 *
405 * This javascript relies on the CTools ajax responder.
406 */
407
408(function ($) {
409  // Make sure our objects are defined.
410  Drupal.CTools = Drupal.CTools || {};
411  Drupal.CTools.Modal = Drupal.CTools.Modal || {};
412
413  /**
414   * Display the modal
415   *
416   * @todo -- document the settings.
417   */
418  Drupal.CTools.Modal.show = function(choice) {
419    var opts = {};
420
421    if (choice && typeof choice == 'string' && Drupal.settings[choice]) {
422      // This notation guarantees we are actually copying it.
423      $.extend(true, opts, Drupal.settings[choice]);
424    }
425    else if (choice) {
426      $.extend(true, opts, choice);
427    }
428
429    var defaults = {
430      modalTheme: 'CToolsModalDialog',
431      throbberTheme: 'CToolsModalThrobber',
432      animation: 'show',
433      animationSpeed: 'fast',
434      modalSize: {
435        type: 'scale',
436        width: .8,
437        height: .8,
438        addWidth: 0,
439        addHeight: 0,
440        // How much to remove from the inner content to make space for the
441        // theming.
442        contentRight: 25,
443        contentBottom: 45
444      },
445      modalOptions: {
446        opacity: .55,
447        background: '#fff'
448      },
449      modalClass: 'default'
450    };
451
452    var settings = {};
453    $.extend(true, settings, defaults, Drupal.settings.CToolsModal, opts);
454
455    if (Drupal.CTools.Modal.currentSettings && Drupal.CTools.Modal.currentSettings != settings) {
456      Drupal.CTools.Modal.modal.remove();
457      Drupal.CTools.Modal.modal = null;
458    }
459
460    Drupal.CTools.Modal.currentSettings = settings;
461
462    var resize = function(e) {
463      // When creating the modal, it actually exists only in a theoretical
464      // place that is not in the DOM. But once the modal exists, it is in the
465      // DOM so the context must be set appropriately.
466      var context = e ? document : Drupal.CTools.Modal.modal;
467
468      if (Drupal.CTools.Modal.currentSettings.modalSize.type == 'scale') {
469        var width = $(window).width() * Drupal.CTools.Modal.currentSettings.modalSize.width;
470        var height = $(window).height() * Drupal.CTools.Modal.currentSettings.modalSize.height;
471      }
472      else {
473        var width = Drupal.CTools.Modal.currentSettings.modalSize.width;
474        var height = Drupal.CTools.Modal.currentSettings.modalSize.height;
475      }
476
477      // Use the additionol pixels for creating the width and height.
478      $('div.ctools-modal-content', context).css({
479        'width': width + Drupal.CTools.Modal.currentSettings.modalSize.addWidth + 'px',
480        'height': height + Drupal.CTools.Modal.currentSettings.modalSize.addHeight + 'px'
481      });
482      $('div.ctools-modal-content .modal-content', context).css({
483        'width': (width - Drupal.CTools.Modal.currentSettings.modalSize.contentRight) + 'px',
484        'height': (height - Drupal.CTools.Modal.currentSettings.modalSize.contentBottom) + 'px'
485      });
486    };
487
488    if (!Drupal.CTools.Modal.modal) {
489      Drupal.CTools.Modal.modal = $(Drupal.theme(settings.modalTheme));
490      if (settings.modalSize.type == 'scale') {
491        $(window).bind('resize', resize);
492      }
493    }
494
495    resize();
496
497    $('span.modal-title', Drupal.CTools.Modal.modal).html(Drupal.CTools.Modal.currentSettings.loadingText);
498    Drupal.CTools.Modal.modalContent(Drupal.CTools.Modal.modal, settings.modalOptions, settings.animation, settings.animationSpeed, settings.modalClass);
499    $('#modalContent .modal-content').html(Drupal.theme(settings.throbberTheme)).addClass('ctools-modal-loading');
500
501    // Position autocomplete results based on the scroll position of the modal.
502    $('#modalContent .modal-content').delegate('input.form-autocomplete', 'keyup', function() {
503      $('#autocomplete').css('top', $(this).position().top + $(this).outerHeight() + $(this).offsetParent().filter('#modal-content').scrollTop());
504    });
505  };
506
507  /**
508   * Hide the modal
509   */
510  Drupal.CTools.Modal.dismiss = function() {
511    if (Drupal.CTools.Modal.modal) {
512      Drupal.CTools.Modal.unmodalContent(Drupal.CTools.Modal.modal);
513    }
514  };
515
516  /**
517   * Provide the HTML to create the modal dialog.
518   */
519  Drupal.theme.prototype.CToolsModalDialog = function () {
520    var html = '';
521    html += '<div id="ctools-modal">';
522    html += '  <div class="ctools-modal-content">'; // panels-modal-content
523    html += '    <div class="modal-header">';
524    html += '      <a class="close" href="#">';
525    html +=          Drupal.CTools.Modal.currentSettings.closeText + Drupal.CTools.Modal.currentSettings.closeImage;
526    html += '      </a>';
527    html += '      <span id="modal-title" class="modal-title">&nbsp;</span>';
528    html += '    </div>';
529    html += '    <div id="modal-content" class="modal-content">';
530    html += '    </div>';
531    html += '  </div>';
532    html += '</div>';
533
534    return html;
535  };
536
537  /**
538   * Provide the HTML to create the throbber.
539   */
540  Drupal.theme.prototype.CToolsModalThrobber = function () {
541    var html = '';
542    html += '<div id="modal-throbber">';
543    html += '  <div class="modal-throbber-wrapper">';
544    html +=      Drupal.CTools.Modal.currentSettings.throbber;
545    html += '  </div>';
546    html += '</div>';
547
548    return html;
549  };
550
551  /**
552   * Figure out what settings string to use to display a modal.
553   */
554  Drupal.CTools.Modal.getSettings = function (object) {
555    var match = $(object).attr('class').match(/ctools-modal-(\S+)/);
556    if (match) {
557      return match[1];
558    }
559  };
560
561  /**
562   * Click function for modals that can be cached.
563   */
564  Drupal.CTools.Modal.clickAjaxCacheLink = function () {
565    Drupal.CTools.Modal.show(Drupal.CTools.Modal.getSettings(this));
566    return Drupal.CTools.AJAX.clickAJAXCacheLink.apply(this);
567  };
568
569  /**
570   * Handler to prepare the modal for the response
571   */
572  Drupal.CTools.Modal.clickAjaxLink = function () {
573    Drupal.CTools.Modal.show(Drupal.CTools.Modal.getSettings(this));
574    return false;
575  };
576
577  /**
578   * Submit responder to do an AJAX submit on all modal forms.
579   */
580  Drupal.CTools.Modal.submitAjaxForm = function(e) {
581    var $form = $(this);
582    var url = $form.attr('action');
583
584    setTimeout(function() { Drupal.CTools.AJAX.ajaxSubmit($form, url); }, 1);
585    return false;
586  };
587
588  /**
589   * Bind links that will open modals to the appropriate function.
590   */
591  Drupal.behaviors.ZZCToolsModal = {
592    attach: function(context) {
593      // Bind links
594      // Note that doing so in this order means that the two classes can be
595      // used together safely.
596      /*
597       * @todo remimplement the warm caching feature
598       $('a.ctools-use-modal-cache', context).once('ctools-use-modal', function() {
599         $(this).click(Drupal.CTools.Modal.clickAjaxCacheLink);
600         Drupal.CTools.AJAX.warmCache.apply(this);
601       });
602        */
603
604      $('area.ctools-use-modal, a.ctools-use-modal', context).once('ctools-use-modal', function() {
605        var $this = $(this);
606        $this.click(Drupal.CTools.Modal.clickAjaxLink);
607        // Create a drupal ajax object
608        var element_settings = {};
609        if ($this.attr('href')) {
610          element_settings.url = $this.attr('href');
611          element_settings.event = 'click';
612          element_settings.progress = { type: 'throbber' };
613        }
614        var base = $this.attr('href');
615        Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings);
616      });
617
618      // Bind buttons
619      $('input.ctools-use-modal, button.ctools-use-modal', context).once('ctools-use-modal', function() {
620        var $this = $(this);
621        $this.click(Drupal.CTools.Modal.clickAjaxLink);
622        var button = this;
623        var element_settings = {};
624
625        // AJAX submits specified in this manner automatically submit to the
626        // normal form action.
627        element_settings.url = Drupal.CTools.Modal.findURL(this);
628        if (element_settings.url == '') {
629          element_settings.url = $(this).closest('form').attr('action');
630        }
631        element_settings.event = 'click';
632        element_settings.setClick = true;
633
634        var base = $this.attr('id');
635        Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings);
636
637        // Make sure changes to settings are reflected in the URL.
638        $('.' + $(button).attr('id') + '-url').change(function() {
639          Drupal.ajax[base].options.url = Drupal.CTools.Modal.findURL(button);
640        });
641      });
642
643      // Bind our custom event to the form submit
644      $('#modal-content form', context).once('ctools-use-modal', function() {
645        var $this = $(this);
646        var element_settings = {};
647
648        element_settings.url = $this.attr('action');
649        element_settings.event = 'submit';
650        element_settings.progress = { 'type': 'throbber' };
651        var base = $this.attr('id');
652
653        Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings);
654        Drupal.ajax[base].form = $this;
655
656        $('input[type=submit], button', this).click(function(event) {
657          Drupal.ajax[base].element = this;
658          this.form.clk = this;
659          // Stop autocomplete from submitting.
660          if (Drupal.autocompleteSubmit && !Drupal.autocompleteSubmit()) {
661            return false;
662          }
663          // An empty event means we were triggered via .click() and
664          // in jquery 1.4 this won't trigger a submit.
665          // We also have to check jQuery version to prevent
666          // IE8 + jQuery 1.4.4 to break on other events
667          // bound to the submit button.
668          if (jQuery.fn.jquery.substr(0, 3) === '1.4' && typeof event.bubbles === "undefined") {
669            $(this.form).trigger('submit');
670            return false;
671          }
672        });
673      });
674
675      // Bind a click handler to allow elements with the 'ctools-close-modal'
676      // class to close the modal.
677      $('.ctools-close-modal', context).once('ctools-close-modal')
678        .click(function() {
679          Drupal.CTools.Modal.dismiss();
680          return false;
681        });
682    }
683  };
684
685  // The following are implementations of AJAX responder commands.
686
687  /**
688   * AJAX responder command to place HTML within the modal.
689   */
690  Drupal.CTools.Modal.modal_display = function(ajax, response, status) {
691    var settings = response.settings || ajax.settings || Drupal.settings;
692    // If the modal does not exist yet, create it.
693    if ($('#modalContent').length == 0) {
694      Drupal.CTools.Modal.show(Drupal.CTools.Modal.getSettings(ajax.element));
695    }
696    // If the modal exists run detachBehaviors before removing existing content.
697    else {
698      Drupal.detachBehaviors($('#modalContent'), settings, 'unload');
699    }
700    $('#modal-title').html(response.title);
701    // Simulate an actual page load by scrolling to the top after adding the
702    // content. This is helpful for allowing users to see error messages at the
703    // top of a form, etc.
704    $('#modal-content').html(response.output).scrollTop(0);
705    $(document).trigger('CToolsAttachBehaviors', $('#modalContent'));
706
707    // Attach behaviors within a modal dialog.
708    Drupal.attachBehaviors($('#modalContent'), settings);
709
710    if ($('#modal-content').hasClass('ctools-modal-loading')) {
711      $('#modal-content').removeClass('ctools-modal-loading');
712    }
713    else {
714      // If the modal was already shown, and we are simply replacing its
715      // content, then focus on the first focusable element in the modal.
716      // (When first showing the modal, focus will be placed on the close
717      // button by the show() function called above.)
718      $('#modal-content :focusable:first').focus();
719    }
720  };
721
722  /**
723   * AJAX responder command to dismiss the modal.
724   */
725  Drupal.CTools.Modal.modal_dismiss = function(command) {
726    Drupal.CTools.Modal.dismiss();
727    $('link.ctools-temporary-css').remove();
728  };
729
730  /**
731   * Display loading
732   */
733  //Drupal.CTools.AJAX.commands.modal_loading = function(command) {
734  Drupal.CTools.Modal.modal_loading = function(command) {
735    Drupal.CTools.Modal.modal_display({
736      output: Drupal.theme(Drupal.CTools.Modal.currentSettings.throbberTheme),
737      title: Drupal.CTools.Modal.currentSettings.loadingText
738    });
739  };
740
741  /**
742   * Find a URL for an AJAX button.
743   *
744   * The URL for this gadget will be composed of the values of items by
745   * taking the ID of this item and adding -url and looking for that
746   * class. They need to be in the form in order since we will
747   * concat them all together using '/'.
748   */
749  Drupal.CTools.Modal.findURL = function(item) {
750    var url = '';
751    var url_class = '.' + $(item).attr('id') + '-url';
752    $(url_class).each(
753      function() {
754        var $this = $(this);
755        if (url && $this.val()) {
756          url += '/';
757        }
758        url += $this.val();
759      });
760    return url;
761  };
762
763
764  /**
765   * modalContent
766   * @param content string to display in the content box
767   * @param css obj of css attributes
768   * @param animation (fadeIn, slideDown, show)
769   * @param speed (valid animation speeds slow, medium, fast or # in ms)
770   * @param modalClass class added to div#modalContent
771   */
772  Drupal.CTools.Modal.modalContent = function(content, css, animation, speed, modalClass) {
773    // If our animation isn't set, make it just show/pop
774    if (!animation) {
775      animation = 'show';
776    }
777    else {
778      // If our animation isn't "fadeIn" or "slideDown" then it always is show
779      if (animation != 'fadeIn' && animation != 'slideDown') {
780        animation = 'show';
781      }
782    }
783
784    if (!speed && 0 !== speed) {
785      speed = 'fast';
786    }
787
788    // Build our base attributes and allow them to be overriden
789    css = jQuery.extend({
790      position: 'absolute',
791      left: '0px',
792      margin: '0px',
793      background: '#000',
794      opacity: '.55'
795    }, css);
796
797    // Add opacity handling for IE.
798    css.filter = 'alpha(opacity=' + (100 * css.opacity) + ')';
799    content.hide();
800
801    // If we already have modalContent, remove it.
802    if ($('#modalBackdrop').length) $('#modalBackdrop').remove();
803    if ($('#modalContent').length) $('#modalContent').remove();
804
805    // position code lifted from http://www.quirksmode.org/viewport/compatibility.html
806    if (self.pageYOffset) { // all except Explorer
807    var wt = self.pageYOffset;
808    } else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
809      var wt = document.documentElement.scrollTop;
810    } else if (document.body) { // all other Explorers
811      var wt = document.body.scrollTop;
812    }
813
814    // Get our dimensions
815
816    // Get the docHeight and (ugly hack) add 50 pixels to make sure we dont have a *visible* border below our div
817    var docHeight = $(document).height() + 50;
818    var docWidth = $(document).width();
819    var winHeight = $(window).height();
820    var winWidth = $(window).width();
821    if( docHeight < winHeight ) docHeight = winHeight;
822
823    // Create our divs
824    $('body').append('<div id="modalBackdrop" class="backdrop-' + modalClass + '" style="z-index: 1000; display: none;"></div><div id="modalContent" class="modal-' + modalClass + '" style="z-index: 1001; position: absolute;">' + $(content).html() + '</div>');
825
826    // Get a list of the tabbable elements in the modal content.
827    var getTabbableElements = function () {
828      var tabbableElements = $('#modalContent :tabbable'),
829          radioButtons = tabbableElements.filter('input[type="radio"]');
830
831      // The list of tabbable elements from jQuery is *almost* right. The
832      // exception is with groups of radio buttons. The list from jQuery will
833      // include all radio buttons, when in fact, only the selected radio button
834      // is tabbable, and if no radio buttons in a group are selected, then only
835      // the first is tabbable.
836      if (radioButtons.length > 0) {
837        // First, build up an index of which groups have an item selected or not.
838        var anySelected = {};
839        radioButtons.each(function () {
840          var name = this.name;
841
842          if (typeof anySelected[name] === 'undefined') {
843            anySelected[name] = radioButtons.filter('input[name="' + name + '"]:checked').length !== 0;
844          }
845        });
846
847        // Next filter out the radio buttons that aren't really tabbable.
848        var found = {};
849        tabbableElements = tabbableElements.filter(function () {
850          var keep = true;
851
852          if (this.type == 'radio') {
853            if (anySelected[this.name]) {
854              // Only keep the selected one.
855              keep = this.checked;
856            }
857            else {
858              // Only keep the first one.
859              if (found[this.name]) {
860                keep = false;
861              }
862              found[this.name] = true;
863            }
864          }
865
866          return keep;
867        });
868      }
869
870      return tabbableElements.get();
871    };
872
873    // Keyboard and focus event handler ensures only modal elements gain focus.
874    modalEventHandler = function( event ) {
875      target = null;
876      if ( event ) { //Mozilla
877        target = event.target;
878      } else { //IE
879        event = window.event;
880        target = event.srcElement;
881      }
882
883      var parents = $(target).parents().get();
884      for (var i = 0; i < parents.length; ++i) {
885        var position = $(parents[i]).css('position');
886        if (position == 'absolute' || position == 'fixed') {
887          return true;
888        }
889      }
890
891      if ($(target).is('#modalContent, body') || $(target).filter('*:visible').parents('#modalContent').length) {
892        // Allow the event only if target is a visible child node
893        // of #modalContent.
894        return true;
895      }
896      else {
897        getTabbableElements()[0].focus();
898      }
899
900      event.preventDefault();
901    };
902    $('body').bind( 'focus', modalEventHandler );
903    $('body').bind( 'keypress', modalEventHandler );
904
905    // Keypress handler Ensures you can only TAB to elements within the modal.
906    // Based on the psuedo-code from WAI-ARIA 1.0 Authoring Practices section
907    // 3.3.1 "Trapping Focus".
908    modalTabTrapHandler = function (evt) {
909      // We only care about the TAB key.
910      if (evt.which != 9) {
911        return true;
912      }
913
914      var tabbableElements = getTabbableElements(),
915          firstTabbableElement = tabbableElements[0],
916          lastTabbableElement = tabbableElements[tabbableElements.length - 1],
917          singleTabbableElement = firstTabbableElement == lastTabbableElement,
918          node = evt.target;
919
920      // If this is the first element and the user wants to go backwards, then
921      // jump to the last element.
922      if (node == firstTabbableElement && evt.shiftKey) {
923        if (!singleTabbableElement) {
924          lastTabbableElement.focus();
925        }
926        return false;
927      }
928      // If this is the last element and the user wants to go forwards, then
929      // jump to the first element.
930      else if (node == lastTabbableElement && !evt.shiftKey) {
931        if (!singleTabbableElement) {
932          firstTabbableElement.focus();
933        }
934        return false;
935      }
936      // If this element isn't in the dialog at all, then jump to the first
937      // or last element to get the user into the game.
938      else if ($.inArray(node, tabbableElements) == -1) {
939        // Make sure the node isn't in another modal (ie. WYSIWYG modal).
940        var parents = $(node).parents().get();
941        for (var i = 0; i < parents.length; ++i) {
942          var position = $(parents[i]).css('position');
943          if (position == 'absolute' || position == 'fixed') {
944            return true;
945          }
946        }
947
948        if (evt.shiftKey) {
949          lastTabbableElement.focus();
950        }
951        else {
952          firstTabbableElement.focus();
953        }
954      }
955    };
956    $('body').bind('keydown', modalTabTrapHandler);
957
958    // Create our content div, get the dimensions, and hide it
959    var modalContent = $('#modalContent').css('top','-1000px');
960    var $modalHeader = modalContent.find('.modal-header');
961    var mdcTop = wt + Math.max((winHeight / 2) - (modalContent.outerHeight() / 2), 0);
962    var mdcLeft = ( winWidth / 2 ) - ( modalContent.outerWidth() / 2);
963    $('#modalBackdrop').css(css).css('top', 0).css('height', docHeight + 'px').css('width', docWidth + 'px').show();
964    modalContent.css({top: mdcTop + 'px', left: mdcLeft + 'px'}).hide()[animation](speed);
965
966    // Bind a click for closing the modalContent
967    modalContentClose = function(){close(); return false;};
968    $('.close', $modalHeader).bind('click', modalContentClose);
969
970    // Bind a keypress on escape for closing the modalContent
971    modalEventEscapeCloseHandler = function(event) {
972      if (event.keyCode == 27) {
973        close();
974        return false;
975      }
976    };
977
978    $(document).bind('keydown', modalEventEscapeCloseHandler);
979
980    // Per WAI-ARIA 1.0 Authoring Practices, initial focus should be on the
981    // close button, but we should save the original focus to restore it after
982    // the dialog is closed.
983    var oldFocus = document.activeElement;
984    $('.close', $modalHeader).focus();
985
986    // Close the open modal content and backdrop
987    function close() {
988      // Unbind the events
989      $(window).unbind('resize',  modalContentResize);
990      $('body').unbind( 'focus', modalEventHandler);
991      $('body').unbind( 'keypress', modalEventHandler );
992      $('body').unbind( 'keydown', modalTabTrapHandler );
993      $('.close', $modalHeader).unbind('click', modalContentClose);
994      $(document).unbind('keydown', modalEventEscapeCloseHandler);
995      $(document).trigger('CToolsCloseModalBehaviors', $('#modalContent'));
996      $(document).trigger('CToolsDetachBehaviors', $('#modalContent'));
997
998      // Closing animation.
999      switch (animation) {
1000        case 'fadeIn':
1001          modalContent.fadeOut(speed, modalContentRemove);
1002          break;
1003
1004        case 'slideDown':
1005          modalContent.slideUp(speed, modalContentRemove);
1006          break;
1007
1008        case 'show':
1009          modalContent.hide(speed, modalContentRemove);
1010          break;
1011      }
1012    }
1013
1014    // Remove the content.
1015    modalContentRemove = function () {
1016      $('#modalContent').remove();
1017      $('#modalBackdrop').remove();
1018
1019      // Restore focus to where it was before opening the dialog.
1020      $(oldFocus).focus();
1021    };
1022
1023    // Move and resize the modalBackdrop and modalContent on window resize.
1024    modalContentResize = function () {
1025      // Reset the backdrop height/width to get accurate document size.
1026      $('#modalBackdrop').css('height', '').css('width', '');
1027
1028      // Position code lifted from:
1029      // http://www.quirksmode.org/viewport/compatibility.html
1030      if (self.pageYOffset) { // all except Explorer
1031        var wt = self.pageYOffset;
1032      } else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
1033        var wt = document.documentElement.scrollTop;
1034      } else if (document.body) { // all other Explorers
1035        var wt = document.body.scrollTop;
1036      }
1037
1038      // Get our heights
1039      var docHeight = $(document).height();
1040      var docWidth = $(document).width();
1041      var winHeight = $(window).height();
1042      var winWidth = $(window).width();
1043      if( docHeight < winHeight ) docHeight = winHeight;
1044
1045      // Get where we should move content to
1046      var modalContent = $('#modalContent');
1047      var mdcTop = wt + Math.max((winHeight / 2) - (modalContent.outerHeight() / 2), 0);
1048      var mdcLeft = ( winWidth / 2 ) - ( modalContent.outerWidth() / 2);
1049
1050      // Apply the changes
1051      $('#modalBackdrop').css('height', docHeight + 'px').css('width', docWidth + 'px').show();
1052      modalContent.css('top', mdcTop + 'px').css('left', mdcLeft + 'px').show();
1053    };
1054    $(window).bind('resize', modalContentResize);
1055  };
1056
1057  /**
1058   * unmodalContent
1059   * @param content (The jQuery object to remove)
1060   * @param animation (fadeOut, slideUp, show)
1061   * @param speed (valid animation speeds slow, medium, fast or # in ms)
1062   */
1063  Drupal.CTools.Modal.unmodalContent = function(content, animation, speed)
1064  {
1065    // If our animation isn't set, make it just show/pop
1066    if (!animation) { var animation = 'show'; } else {
1067      // If our animation isn't "fade" then it always is show
1068      if (( animation != 'fadeOut' ) && ( animation != 'slideUp')) animation = 'show';
1069    }
1070    // Set a speed if we dont have one
1071    if ( !speed ) var speed = 'fast';
1072
1073    // Unbind the events we bound
1074    $(window).unbind('resize', modalContentResize);
1075    $('body').unbind('focus', modalEventHandler);
1076    $('body').unbind('keypress', modalEventHandler);
1077    $('body').unbind( 'keydown', modalTabTrapHandler );
1078    var $modalContent = $('#modalContent');
1079    var $modalHeader = $modalContent.find('.modal-header');
1080    $('.close', $modalHeader).unbind('click', modalContentClose);
1081    $(document).unbind('keydown', modalEventEscapeCloseHandler);
1082    $(document).trigger('CToolsDetachBehaviors', $modalContent);
1083
1084    // jQuery magic loop through the instances and run the animations or removal.
1085    content.each(function(){
1086      if ( animation == 'fade' ) {
1087        $('#modalContent').fadeOut(speed, function() {
1088          $('#modalBackdrop').fadeOut(speed, function() {
1089            $(this).remove();
1090          });
1091          $(this).remove();
1092        });
1093      } else {
1094        if ( animation == 'slide' ) {
1095          $('#modalContent').slideUp(speed,function() {
1096            $('#modalBackdrop').slideUp(speed, function() {
1097              $(this).remove();
1098            });
1099            $(this).remove();
1100          });
1101        } else {
1102          $('#modalContent').remove();
1103          $('#modalBackdrop').remove();
1104        }
1105      }
1106    });
1107  };
1108
1109$(function() {
1110  Drupal.ajax.prototype.commands.modal_display = Drupal.CTools.Modal.modal_display;
1111  Drupal.ajax.prototype.commands.modal_dismiss = Drupal.CTools.Modal.modal_dismiss;
1112});
1113
1114})(jQuery);
1115;
1116/**
1117* Provide the HTML to create the modal dialog.
1118*/
1119Drupal.theme.prototype.ModalFormsPopup = function () {
1120  var html = '';
1121
1122  html += '<div id="ctools-modal" class="popups-box">';
1123  html += '  <div class="ctools-modal-content modal-forms-modal-content">';
1124  html += '    <div class="popups-container">';
1125  html += '      <div class="modal-header popups-title">';
1126  html += '        <span id="modal-title" class="modal-title"></span>';
1127  html += '        <span class="popups-close close">' + Drupal.CTools.Modal.currentSettings.closeText + '</span>';
1128  html += '        <div class="clear-block"></div>';
1129  html += '      </div>';
1130  html += '      <div class="modal-scroll"><div id="modal-content" class="modal-content popups-body"></div></div>';
1131  html += '    </div>';
1132  html += '  </div>';
1133  html += '</div>';
1134
1135  return html;
1136}
1137;
1138(function ($) {
1139
1140Drupal.jQueryUiFilter = Drupal.jQueryUiFilter || {}
1141Drupal.jQueryUiFilter.accordionOptions = Drupal.jQueryUiFilter.accordionOptions || {}
1142
1143/**
1144 * Scroll to an accordion's active element.
1145 */
1146Drupal.jQueryUiFilter.accordionScrollTo = function(accordion) {
1147  var options = $(accordion).data('options') || {}
1148  if (!options['scrollTo'] || !$(accordion).find('.ui-state-active').length) {
1149    return;
1150  }
1151
1152  var top = $(accordion).find('.ui-state-active').offset().top;
1153  if (options['scrollTo']['duration']) {
1154    $('html, body').animate({scrollTop: top}, options['scrollTo']['duration']);
1155  }
1156  else {
1157    $('html, body').scrollTop(top);
1158  }
1159}
1160
1161/**
1162 * Accordion change event handler to bookmark active element in location.hash.
1163 */
1164Drupal.jQueryUiFilter.accordionChangeStart = function(event, ui) {
1165  var href = ui.newHeader.find('a').attr('href');
1166  if (href) {
1167    location.hash = href;
1168    return false;
1168 // Cancel event and let accordionHashChangeEvent handler activate the element.
1169  }
1170  else {
1171    return true;
1172  }
1173}
1174
1175/**
1176 * On hash change activate and scroll to an accordion element.
1177 */
1178Drupal.jQueryUiFilter.accordionHashChangeEvent = function() {
1179  $accordionHeader = $('.ui-accordion > .ui-accordion-header:has(a[href="' + location.hash + '"])')
1180  $accordion = $accordionHeader.parent();
1181  var index = $accordionHeader.prevAll('.ui-accordion-header').length;
1182
1183  if ($.ui.version == '1.8.7') {
1184    // NOTE: Accordion 'Active' property not change'ing http://bugs.jqueryui.com/ticket/4576
1185    $accordion.accordion('activate', index);
1186  }
1187  else {
1188    // NOTE: Accordion 'Active' property http://api.jqueryui.com/accordion/#option-active
1189    $accordion.accordion('option', 'active', index);
1190  }
1191}
1192
1193/**
1194 * jQuery UI filter accordion behavior.
1195 */
1196Drupal.behaviors.jQueryUiFilterAccordion  = {attach: function(context) {
1197  if (Drupal.settings.jQueryUiFilter.disabled) {
1198    return;
1199  }
1200
1201  var headerTag = Drupal.settings.jQueryUiFilter.accordionHeaderTag;
1202
1203  $('div.jquery-ui-filter-accordion', context).once('jquery-ui-filter-accordion', function () {
1204    var options = Drupal.jQueryUiFilter.getOptions('accordion');
1205
1206    // Look for jQuery UI filter header class.
1207    options['header'] = '.jquery-ui-filter-accordion-header';
1208
1209    if ($(this).hasClass('jquery-ui-filter-accordion-collapsed')) { // Set collapsed options
1210      options['collapsible'] = true;
1211      options['active'] = false;
1212    }
1213
1214    // Convert <h*> to div to remove tag and insure the accordion does not use the existing h3 style.
1215    // Sets active item based on location.hash.
1216    var index = 0;
1217    $(this).find(headerTag + '.jquery-ui-filter-accordion-header').each(function(){
1218      var id = this.id || $(this).text().toLowerCase().replace(/[^-a-z0-9]+/gm, '-');
1219      var hash = '#' + id;
1220      if (hash == location.hash) {
1221        options['active'] = index;
1222      }
1223      index++;
1224
1225      $(this).replaceWith('<div class="jquery-ui-filter-header jquery-ui-filter-accordion-header"><a href="' + hash + '">' + $(this).html() + '</a></div>');
1226    });
1227
1228    // DEBUG:
1229    // console.log(options);
1230
1231    // Save options as data and init accordion
1232    $(this).data('options', options).accordion(options);
1233
1234    // Scroll to active
1235    Drupal.jQueryUiFilter.accordionScrollTo(this);
1236
1237    // Bind accordion change event to record history
1238    if (options['history']) {
1239      $(this).bind('accordionchangestart', Drupal.jQueryUiFilter.accordionChangeStart);
1240    }
1241
1242    // Init hash change event handling once
1243    if (!Drupal.jQueryUiFilter.accordionInitialized) {
1244      Drupal.jQueryUiFilter.hashChange(Drupal.jQueryUiFilter.accordionHashChangeEvent);
1245    }
1246    Drupal.jQueryUiFilter.accordionInitialized = true;
1247  });
1248
1249}}
1250
1251})(jQuery);
1252;
1253(function ($) {
1254
1255/**
1256 * Equal height plugin.
1257 *
1258 * From: http://www.problogdesign.com/coding/30-pro-jquery-tips-tricks-and-strategies/
1259 */
1260if (jQuery.fn.equalHeight == undefined) {
1261  jQuery.fn.equalHeight = function () {
1262    var tallest = 0;
1263    this.each(function() {
1264      tallest = ($(this).height() > tallest)? $(this).height() : tallest;
1265    });
1266    return this.height(tallest);
1267  }
1268}
1269
1270Drupal.jQueryUiFilter = Drupal.jQueryUiFilter || {}
1271Drupal.jQueryUiFilter.tabsOptions = Drupal.jQueryUiFilter.tabsOptions || {}
1272
1273/**
1274 * Tabs pagings
1275 *
1276 * Inspired by : http://css-tricks.com/2361-jquery-ui-tabs-with-nextprevious/
1277 */
1278Drupal.jQueryUiFilter.tabsPaging = function(selector, options) {
1279  options = jQuery.extend({paging: {'back': '&#171; Previous', 'next': 'Next &#187;'}}, options);
1280
1281  var $tabs = $(selector);
1282  var numberOfTabs = $tabs.find(".ui-tabs-panel").size() - 1;
1283
1284  // Add back and next buttons.
1285  // NOTE: Buttons are not 'themeable' since they should look like a themerolled jQuery UI button.
1286  $tabs.find('.ui-tabs-panel').each(function(i){
1287    var html = '';
1288    if (i != 0) {
1289      html += '<button type="button" class="ui-tabs-prev" rel="' + (i-1) + '" style="float:left">' + Drupal.t(options.paging.back) + '</button>';
1290    }
1291    if (i != numberOfTabs) {
1292      html += '<button type="button" href="#" class="ui-tabs-next" rel="' + (i+1) + '" style="float:right">' + Drupal.t(options.paging.next) + '</button>';
1293    }
1294    $(this).append('<div class="ui-tabs-paging clearfix clear-block">' +  html + '</div>');
1295  });
1296
1297  // Init buttons
1298  $tabs.find('button.ui-tabs-prev, button.ui-tabs-next').button();
1299
1300  // Add event handler
1301  $tabs.find('.ui-tabs-next, .ui-tabs-prev').click(function() {
1302    if ($.ui.version == '1.8.7') {
1303      $tabs.tabs('select', parseInt($(this).attr("rel")));
1304    }
1305    else {
1306      $tabs.tabs('option', 'active', parseInt($(this).attr("rel")));
1307    }
1308    return false;
1309  });
1310}
1311
1312/**
1313 * Scroll to an accordion's active element.
1314 */
1315Drupal.jQueryUiFilter.tabsScrollTo = function(tabs) {
1316  var options = $(tabs).data('options') || {}
1317  if (!options['scrollTo']) {
1318    return;
1319  }
1320
1321  var top = $(tabs).offset().top;
1322  if (options['scrollTo']['duration']) {
1323    $('html, body').animate({scrollTop: top}, options['scrollTo']['duration']);
1324  }
1325  else {
1326    $('html, body').scrollTop(top);
1327  }
1328}
1329
1330
1331/**
1332 * Tabs select event handler to bookmark selected tab in location.hash.
1333 */
1334Drupal.jQueryUiFilter.tabsSelect = function(event, ui) {
1335  location.hash = $(ui.tab).attr('href');
1336}
1337
1338/**
1339 * On hash change select tab.
1340 *
1341 * Inspired by: http://benalman.com/code/projects/jquery-bbq/examples/fragment-jquery-ui-tabs/
1342 */
1343Drupal.jQueryUiFilter.tabsHashChangeEvent = function() {
1344  var $tab = $('.ui-tabs-nav > li:has(a[href="' + location.hash + '"])');
1345  $tabs = $tab.parent().parent();
1346
1347  var selected = $tab.prevAll().length;
1348
1349  if ($.ui.version == '1.8.7') {
1350    if ($tabs.tabs('option', 'selected') != selected) {
1351      $tabs.tabs('select', selected);
1352    }
1353  }
1354  else {
1355    if ($tabs.tabs('option', 'active') != selected) {
1356      $tabs.tabs('option', 'active', selected);
1357    }
1358  }
1359}
1360
1361/**
1362 * jQuery UI filter tabs behavior
1363 */
1364Drupal.behaviors.jQueryUiFilterTabs = {attach: function(context) {
1365  if (Drupal.settings.jQueryUiFilter.disabled) {
1366    return;
1367  }
1368
1369  var headerTag = Drupal.settings.jQueryUiFilter.tabsHeaderTag;
1370
1371  // Tabs
1372  $('div.jquery-ui-filter-tabs', context).once('jquery-ui-filter-tabs', function () {
1373    var options = Drupal.jQueryUiFilter.getOptions('tabs');
1374
1375    // Get <h*> text and add to tabs.
1376    // Sets selected tab based on location.hash.
1377    var scrollTo = false;
1378    var index = 0;
1379    var tabs = '<ul>';
1380    $(this).find(headerTag + '.jquery-ui-filter-tabs-header').each(function(){
1381      var id = this.id || $(this).text().toLowerCase().replace(/[^-a-z0-9]+/gm, '-');
1382      var hash = '#' + id;
1383
1384      if (hash == location.hash) {
1385        scrollTo = true;
1386        options['selected'] = index;
1387      }
1388      index++;
1389
1390      tabs += '<li><a href="' + hash + '">' + $(this).html() + '</a></li>';
1391      $(this).next('div.jquery-ui-filter-tabs-container').attr('id', id);
1392      $(this).remove();
1393    });
1394    tabs += '</ul>';
1395    $(this).prepend(tabs);
1396
1397    // DEBUG:
1398    // console.log(options);
1399
1400    // Save options as data and init tabs
1401    $(this).data('options', options).tabs(options);
1402
1403    // Equal height tab
1404    $(this).find('.ui-tabs-nav li').equalHeight();
1405
1406    // Add paging.
1407    if (options['paging']) {
1408      Drupal.jQueryUiFilter.tabsPaging(this, options);
1409    }
1410
1411    // Bind tabs select event to record history
1412    if (options['history']) {
1413      $(this).bind('tabsselect', Drupal.jQueryUiFilter.tabsSelect);
1414    }
1415
1416    // Scroll to selected tabs widget
1417    if (scrollTo) {
1418      Drupal.jQueryUiFilter.tabsScrollTo(this);
1419    }
1420
1421    // Init hash change event handling once
1422    if (!Drupal.jQueryUiFilter.hashChangeInit) {
1423      Drupal.jQueryUiFilter.hashChange(Drupal.jQueryUiFilter.tabsHashChangeEvent);
1424    }
1425    Drupal.jQueryUiFilter.hashChangeInit = true;
1426  });
1427}}
1428
1429})(jQuery);
1430;
1431/**
1432 * @file
1433 * Some basic behaviors and utility functions for Views.
1434 */
1435(function ($) {
1436
1437  Drupal.Views = {};
1438
1439  /**
1440   * JQuery UI tabs, Views integration component.
1441   */
1442  Drupal.behaviors.viewsTabs = {
1443    attach: function (context) {
1444      if ($.viewsUi && $.viewsUi.tabs) {
1445        $('#views-tabset').once('views-processed').viewsTabs({
1446          selectedClass: 'active'
1447        });
1448      }
1449
1450      $('a.views-remove-link').once('views-processed').click(function(event) {
1451        var id = $(this).attr('id').replace('views-remove-link-', '');
1452        $('#views-row-' + id).hide();
1453        $('#views-removed-' + id).get(0).checked = true;
1454        event.preventDefault();
1455      });
1456      // Here is to handle display deletion
1457      // (checking in the hidden checkbox and hiding out the row).
1458      $('a.display-remove-link')
1459        .addClass('display-processed')
1460        .click(function() {
1461          var id = $(this).attr('id').replace('display-remove-link-', '');
1462          $('#display-row-' + id).hide();
1463          $('#display-removed-' + id).get(0).checked = true;
1464          return false;
1465        });
1466    }
1467  };
1468
1469  /**
1470   * Helper function to parse a querystring.
1471   */
1472  Drupal.Views.parseQueryString = function (query) {
1473    var args = {};
1474    var pos = query.indexOf('?');
1475    if (pos != -1) {
1476      query = query.substring(pos + 1);
1477    }
1478    var pairs = query.split('&');
1479    for (var i in pairs) {
1480      if (typeof(pairs[i]) == 'string') {
1481        var pair = pairs[i].split('=');
1482        // Ignore the 'q' path argument, if present.
1483        if (pair[0] != 'q' && pair[1]) {
1484          args[decodeURIComponent(pair[0].replace(/\+/g, ' '))] = decodeURIComponent(pair[1].replace(/\+/g, ' '));
1485        }
1486      }
1487    }
1488    return args;
1489  };
1490
1491  /**
1492   * Helper function to return a view's arguments based on a path.
1493   */
1494  Drupal.Views.parseViewArgs = function (href, viewPath) {
1495    // Provide language prefix.
1496    if (Drupal.settings.pathPrefix) {
1497      var viewPath = Drupal.settings.pathPrefix + viewPath;
1498    }
1499    var returnObj = {};
1500    var path = Drupal.Views.getPath(href);
1501    // Ensure there is a correct path.
1502    if (viewPath && path.substring(0, viewPath.length + 1) == viewPath + '/') {
1503      var args = decodeURIComponent(path.substring(viewPath.length + 1, path.length));
1504      returnObj.view_args = args;
1505      returnObj.view_path = path;
1506    }
1507    return returnObj;
1508  };
1509
1510  /**
1511   * Strip off the protocol plus domain from an href.
1512   */
1513  Drupal.Views.pathPortion = function (href) {
1514    // Remove e.g. http://example.com if present.
1515    var protocol = window.location.protocol;
1516    if (href.substring(0, protocol.length) == protocol) {
1517      // 2 is the length of the '//' that normally follows the protocol.
1518      href = href.substring(href.indexOf('/', protocol.length + 2));
1519    }
1520    return href;
1521  };
1522
1523  /**
1524   * Return the Drupal path portion of an href.
1525   */
1526  Drupal.Views.getPath = function (href) {
1527    href = Drupal.Views.pathPortion(href);
1528    href = href.substring(Drupal.settings.basePath.length, href.length);
1529    // 3 is the length of the '?q=' added to the URL without clean URLs.
1530    if (href.substring(0, 3) == '?q=') {
1531      href = href.substring(3, href.length);
1532    }
1533    var chars = ['#', '?', '&'];
1534    for (var i in chars) {
1535      if (href.indexOf(chars[i]) > -1) {
1536        href = href.substr(0, href.indexOf(chars[i]));
1537      }
1538    }
1539    return href;
1540  };
1541
1542})(jQuery);
1543;
1544/**
1545 * @file
1546 * Handles AJAX fetching of views, including filter submission and response.
1547 */
1548(function ($) {
1549
1550  /**
1551   * Attaches the AJAX behavior to exposed filter forms and key views links.
1552   */
1553  Drupal.behaviors.ViewsAjaxView = {};
1554  Drupal.behaviors.ViewsAjaxView.attach = function() {
1555    if (Drupal.settings && Drupal.settings.views && Drupal.settings.views.ajaxViews) {
1556      $.each(Drupal.settings.views.ajaxViews, function(i, settings) {
1557        Drupal.views.instances[i] = new Drupal.views.ajaxView(settings);
1558      });
1559    }
1560  };
1561
1562  Drupal.views = {};
1563  Drupal.views.instances = {};
1564
1565  /**
1566   * JavaScript object for a certain view.
1567   */
1568  Drupal.views.ajaxView = function(settings) {
1569    var selector = '.view-dom-id-' + settings.view_dom_id;
1570    this.$view = $(selector);
1571
1572    // If view is not present return to prevent errors.
1573    if (!this.$view.length) {
1574      return;
1575    }
1576
1577    // Retrieve the path to use for views' ajax.
1578    var ajax_path = Drupal.settings.views.ajax_path;
1579
1580    // If there are multiple views this might've ended up showing up multiple
1581    // times.
1582    if (ajax_path.constructor.toString().indexOf("Array") != -1) {
1583      ajax_path = ajax_path[0];
1584    }
1585
1586    // Check if there are any GET parameters to send to views.
1587    var queryString = window.location.search || '';
1588    if (queryString !== '') {
1589      // Remove the question mark and Drupal path component if any.
1590      var queryString = queryString.slice(1).replace(/q=[^&]+&?|&?render=[^&]+/, '');
1591      if (queryString !== '') {
1592        // If there is a '?' in ajax_path, clean url are on and & should be
1593        // used to add parameters.
1594        queryString = ((/\?/.test(ajax_path)) ? '&' : '?') + queryString;
1595      }
1596    }
1597
1598    this.element_settings = {
1599      url: ajax_path + queryString,
1600      submit: settings,
1601      setClick: true,
1602      event: 'click',
1603      selector: selector,
1604      progress: {
1605        type: 'throbber'
1606      }
1607    };
1608
1609    this.settings = settings;
1610
1611    // Add the ajax to exposed forms.
1612    this.$exposed_form = $('#views-exposed-form-' + settings.view_name.replace(/_/g, '-') + '-' + settings.view_display_id.replace(/_/g, '-'));
1613    this.$exposed_form.once(jQuery.proxy(this.attachExposedFormAjax, this));
1614
1615    // Store Drupal.ajax objects here for all pager links.
1616    this.links = [];
1617
1618    // Add the ajax to pagers.
1619    this.$view
1620      .once(jQuery.proxy(this.attachPagerAjax, this));
1621
1622    // Add a trigger to update this view specifically. In order to trigger a
1623    // refresh use the following code.
1624    //
1625    // @code
1626    // jQuery('.view-name').trigger('RefreshView');
1627    // @endcode
1628    // Add a trigger to update this view specifically.
1629    var self_settings = this.element_settings;
1630    self_settings.event = 'RefreshView';
1631    var self = this;
1632    this.$view.once('refresh', function () {
1633      self.refreshViewAjax = new Drupal.ajax(self.selector, self.$view, self_settings);
1634    });
1635  };
1636
1637  Drupal.views.ajaxView.prototype.attachExposedFormAjax = function() {
1638    var button = $('input[type=submit], button[type=submit], input[type=image]', this.$exposed_form);
1639    button = button[0];
1640
1641    // Call the autocomplete submit before doing AJAX.
1642    $(button).click(function () {
1643      if (Drupal.autocompleteSubmit) {
1644        Drupal.autocompleteSubmit();
1645      }
1646    });
1647
1648    this.exposedFormAjax = new Drupal.ajax($(button).attr('id'), button, this.element_settings);
1649  };
1650
1651  /**
1652   * Attach the ajax behavior to each link.
1653   */
1654  Drupal.views.ajaxView.prototype.attachPagerAjax = function() {
1655    this.$view.find('ul.pager > li > a, ol.pager > li > a, th.views-field a, .attachment .views-summary a')
1656      .each(jQuery.proxy(this.attachPagerLinkAjax, this));
1657  };
1658
1659  /**
1660   * Attach the ajax behavior to a single link.
1661   */
1662  Drupal.views.ajaxView.prototype.attachPagerLinkAjax = function(id, link) {
1663    var $link = $(link);
1664    var viewData = {};
1665    var href = $link.attr('href');
1666    // Don't attach to pagers inside nested views.
1667    if ($link.closest('.view')[0] !== this.$view[0] &&
1668      $link.closest('.view').parent().hasClass('attachment') === false) {
1669      return;
1670    }
1671
1672    // Provide a default page if none has been set. This must be done
1673    // prior to merging with settings to avoid accidentally using the
1674    // page landed on instead of page 1.
1675    if (typeof(viewData.page) === 'undefined') {
1676      viewData.page = 0;
1677    }
1678
1679    // Construct an object using the settings defaults and then overriding
1680    // with data specific to the link.
1681    $.extend(
1682      viewData,
1683      this.settings,
1684      Drupal.Views.parseQueryString(href),
1685      // Extract argument data from the URL.
1686      Drupal.Views.parseViewArgs(href, this.settings.view_base_path)
1687    );
1688
1689    // For anchor tags, these will go to the target of the anchor rather
1690    // than the usual location.
1691    $.extend(viewData, Drupal.Views.parseViewArgs(href, this.settings.view_base_path));
1692
1693    // Construct an object using the element settings defaults,
1694    // then overriding submit with viewData.
1695    var pager_settings = $.extend({}, this.element_settings);
1696    pager_settings.submit = viewData;
1697    this.pagerAjax = new Drupal.ajax(false, $link, pager_settings);
1698    this.links.push(this.pagerAjax);
1699  };
1700
1701  Drupal.ajax.prototype.commands.viewsScrollTop = function (ajax, response, status) {
1702    // Scroll to the top of the view. This will allow users
1703    // to browse newly loaded content after e.g. clicking a pager
1704    // link.
1705    var offset = $(response.selector).offset();
1706    // We can't guarantee that the scrollable object should be
1707    // the body, as the view could be embedded in something
1708    // more complex such as a modal popup. Recurse up the DOM
1709    // and scroll the first element that has a non-zero top.
1710    var scrollTarget = response.selector;
1711    while ($(scrollTarget).scrollTop() == 0 && $(scrollTarget).parent()) {
1712      scrollTarget = $(scrollTarget).parent();
1713    }
1714    // Only scroll upward.
1715    if (offset.top - 10 < $(scrollTarget).scrollTop()) {
1716      $(scrollTarget).animate({scrollTop: (offset.top - 10)}, 500);
1717    }
1718  };
1719
1720})(jQuery);
1721;
1722/*
1723 * jQuery Cycle Plugin (with Transition Definitions)
1724 * Examples and documentation at: http://jquery.malsup.com/cycle/
1725 * Copyright (c) 2007-2013 M. Alsup
1726 * Version: 3.0.3 (11-JUL-2013)
1727 * Dual licensed under the MIT and GPL licenses.
1728 * http://jquery.malsup.com/license.html
1729 * Requires: jQuery v1.7.1 or later
1730 */
1731(function($,undefined){var ver="3.0.3";function debug(s){if($.fn.cycle.debug){log(s);}}function log(){if(window.console&&console.log){console.log("[cycle] "+Array.prototype.join.call(arguments," "));}}$.expr[":"].paused=function(el){return el.cyclePause;};$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length===0&&options!="stop"){if(!$.isReady&&o.s){log("DOM not ready, queuing slideshow");$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.each(function(){var opts=handleArguments(this,options,arg2);if(opts===false){return;}opts.updateActivePagerLink=opts.updateActivePagerLink||$.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;this.cycleStop=0;var $cont=$(this);var $slides=opts.slideExpr?$(opts.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log("terminating; too few slides: "+els.length);return;}var opts2=buildOptions($cont,$slides,els,opts,o);if(opts2===false){return;}var startTime=opts2.continuous?10:getTimeout(els[opts2.currSlide],els[opts2.nextSlide],opts2,!opts2.backwards);if(startTime){startTime+=(opts2.delay||0);if(startTime<10){startTime=10;}debug("first timeout: "+startTime);
1731this.cycleTimeout=setTimeout(function(){go(els,opts2,0,!opts.backwards);},startTime);}});};function triggerPause(cont,byHover,onPager){var opts=$(cont).data("cycle.opts");if(!opts){return;}var paused=!!cont.cyclePause;if(paused&&opts.paused){opts.paused(cont,opts,byHover,onPager);}else{if(!paused&&opts.resumed){opts.resumed(cont,opts,byHover,onPager);}}}function handleArguments(cont,options,arg2){if(cont.cycleStop===undefined){cont.cycleStop=0;}if(options===undefined||options===null){options={};}if(options.constructor==String){switch(options){case"destroy":case"stop":var opts=$(cont).data("cycle.opts");if(!opts){return false;}cont.cycleStop++;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);}cont.cycleTimeout=0;if(opts.elements){$(opts.elements).stop();}$(cont).removeData("cycle.opts");if(options=="destroy"){destroy(cont,opts);}return false;case"toggle":cont.cyclePause=(cont.cyclePause===1)?0:1;checkInstantResume(cont.cyclePause,arg2,cont);triggerPause(cont);return false;case"pause":cont.cyclePause=1;triggerPause(cont);return false;case"resume":cont.cyclePause=0;checkInstantResume(false,arg2,cont);triggerPause(cont);return false;case"prev":case"next":opts=$(cont).data("cycle.opts");if(!opts){log('options not found, "prev/next" ignored');return false;}if(typeof arg2=="string"){opts.oneTimeFx=arg2;}$.fn.cycle[options](opts);return false;default:options={fx:options};}return options;}else{if(options.constructor==Number){var num=options;options=$(cont).data("cycle.opts");if(!options){log("options not found, can not advance slide");return false;}if(num<0||num>=options.elements.length){log("invalid slide index: "+num);return false;}options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}if(typeof arg2=="string"){options.oneTimeFx=arg2;}go(options.elements,options,1,num>=options.currSlide);return false;}}return options;function checkInstantResume(isPaused,arg2,cont){if(!isPaused&&arg2===true){var options=$(cont).data("cycle.opts");if(!options){log("options not found, can not resume");return false;}if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}go(options.elements,options,1,!options.backwards);}}}function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute("filter");}catch(smother){}}}function destroy(cont,opts){if(opts.next){$(opts.next).unbind(opts.prevNextEvent);}if(opts.prev){$(opts.prev).unbind(opts.prevNextEvent);}if(opts.pager||opts.pagerAnchorBuilder){$.each(opts.pagerAnchors||[],function(){this.unbind().remove();});}opts.pagerAnchors=null;$(cont).unbind("mouseenter.cycle mouseleave.cycle");if(opts.destroy){opts.destroy(opts);}}function buildOptions($cont,$slides,els,options,o){var startingSlideSpecified;var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});var meta=$.isFunction($cont.data)?$cont.data(opts.metaAttr):null;if(meta){opts=$.extend(opts,meta);}if(opts.autostop){opts.countdown=opts.autostopCount||els.length;}var cont=$cont[0];$cont.data("cycle.opts",opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];if(!$.support.opacity&&opts.cleartype){opts.after.push(function(){removeFilter(this,opts);});}if(opts.continuous){opts.after.push(function(){go(els,opts,0,!opts.backwards);});}saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($slides);}if($cont.css("position")=="static"){$cont.css("position","relative");}if(opts.width){$cont.width(opts.width);}if(opts.height&&opts.height!="auto"){$cont.height(opts.height);}if(opts.startingSlide!==undefined){opts.startingSlide=parseInt(opts.startingSlide,10);if(opts.startingSlide>=els.length||opts.startSlide<0){opts.startingSlide=0;}else{startingSlideSpecified=true;}}else{if(opts.backwards){opts.startingSlide=els.length-1;}else{opts.startingSlide=0;}}if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++){opts.randomMap.push(i);}opts.randomMap.sort(function(a,b){return Math.random()-0.5;});if(startingSlideSpecified){for(var cnt=0;cnt<els.length;cnt++){if(opts.startingSlide==opts.randomMap[cnt]){opts.randomIndex=cnt;}}}else{opts.randomIndex=1;opts.startingSlide=opts.randomMap[1];}}else{if(opts.startingSlide>=els.length){opts.startingSlide=0;}}opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:"absolute",top:0,left:0}).hide().each(function(i){var z;if(opts.backwards){z=first?i<=first?els.length+(i-first):first-i:els.length-i;}else{z=first?i>=first?els.length-(i-first):first-i:els.length-i;}$(this).css("z-index",z);});$(els[first]).css("opacity",1).show();removeFilter(els[first],opts);if(opts.fit){if(!opts.aspect){if(opts.width){$slides.width(opts.width);}if(opts.height&&opts.height!="auto"){$slides.height(opts.height);}}else{$slides.each(function(){var $slide=$(this);var ratio=(opts.aspect===true)?$slide.width()/$slide.height():opts.aspect;if(opts.width&&$slide.width()!=opts.width){$slide.width(opts.width);$slide.height(opts.width/ratio);}if(opts.height&&$slide.height()<opts.height){$slide.height(opts.height);
1731$slide.width(opts.height*ratio);}});}}if(opts.center&&((!opts.fit)||opts.aspect)){$slides.each(function(){var $slide=$(this);$slide.css({"margin-left":opts.width?((opts.width-$slide.width())/2)+"px":0,"margin-top":opts.height?((opts.height-$slide.height())/2)+"px":0});});}if(opts.center&&!opts.fit&&!opts.slideResize){$slides.each(function(){var $slide=$(this);$slide.css({"margin-left":opts.width?((opts.width-$slide.width())/2)+"px":0,"margin-top":opts.height?((opts.height-$slide.height())/2)+"px":0});});}var reshape=(opts.containerResize||opts.containerResizeHeight)&&$cont.innerHeight()<1;if(reshape){var maxw=0,maxh=0;for(var j=0;j<els.length;j++){var $e=$(els[j]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w){w=e.offsetWidth||e.width||$e.attr("width");}if(!h){h=e.offsetHeight||e.height||$e.attr("height");}maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}if(opts.containerResize&&maxw>0&&maxh>0){$cont.css({width:maxw+"px",height:maxh+"px"});}if(opts.containerResizeHeight&&maxh>0){$cont.css({height:maxh+"px"});}}var pauseFlag=false;if(opts.pause){$cont.bind("mouseenter.cycle",function(){pauseFlag=true;this.cyclePause++;triggerPause(cont,true);}).bind("mouseleave.cycle",function(){if(pauseFlag){this.cyclePause--;}triggerPause(cont,true);});}if(supportMultiTransitions(opts)===false){return false;}var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:($el.height()||this.offsetHeight||this.height||$el.attr("height")||0);this.cycleW=(opts.fit&&opts.width)?opts.width:($el.width()||this.offsetWidth||this.width||$el.attr("width")||0);if($el.is("img")){var loading=(this.cycleH===0&&this.cycleW===0&&!this.complete);if(loading){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options);},opts.requeueTimeout);requeue=true;return false;}else{log("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(requeue){return false;}opts.cssBefore=opts.cssBefore||{};opts.cssAfter=opts.cssAfter||{};opts.cssFirst=opts.cssFirst||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(":eq("+first+")").css(opts.cssBefore);$($slides[first]).css(opts.cssFirst);if(opts.timeout){opts.timeout=parseInt(opts.timeout,10);if(opts.speed.constructor==String){opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed,10);}if(!opts.sync){opts.speed=opts.speed/2;}var buffer=opts.fx=="none"?0:opts.fx=="shuffle"?500:250;while((opts.timeout-opts.speed)<buffer){opts.timeout+=opts.speed;}}if(opts.easing){opts.easeIn=opts.easeOut=opts.easing;}if(!opts.speedIn){opts.speedIn=opts.speed;}if(!opts.speedOut){opts.speedOut=opts.speed;}opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.backwards){opts.nextSlide=opts.startingSlide===0?(els.length-1):opts.startingSlide-1;}else{opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;}}if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init)){init($cont,$slides,opts);}else{if(opts.fx!="custom"&&!opts.multiFx){log("unknown transition: "+opts.fx,"; slideshow terminating");return false;}}}var e0=$slides[first];if(!opts.skipInitializationCallbacks){if(opts.before.length){opts.before[0].apply(e0,[e0,e0,opts,true]);}if(opts.after.length){opts.after[0].apply(e0,[e0,e0,opts,true]);}}if(opts.next){$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1);});}if(opts.prev){$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0);});}if(opts.pager||opts.pagerAnchorBuilder){buildPager(els,opts);}exposeAddSlide(opts,els);return opts;}function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});}function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(",")>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,"").split(",");for(i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log("discarding unknown transition: ",fx);opts.fxs.splice(i,1);i--;}}if(!opts.fxs.length){log("No valid transitions named; slideshow terminating.");return false;}}else{if(opts.fx=="all"){opts.multiFx=true;opts.fxs=[];for(var p in txs){if(txs.hasOwnProperty(p)){tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx)){opts.fxs.push(p);}}}}}if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}debug("randomized fx sequence: ",opts.fxs);}return true;}function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];
1731if(!opts.autostopCount){opts.countdown++;}els[prepend?"unshift":"push"](s);if(opts.els){opts.els[prepend?"unshift":"push"](s);}opts.slideCount=els.length;if(opts.random){opts.randomMap.push(opts.slideCount-1);opts.randomMap.sort(function(a,b){return Math.random()-0.5;});}$s.css("position","absolute");$s[prepend?"prependTo":"appendTo"](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($s);}if(opts.fit&&opts.width){$s.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$s.height(opts.height);}s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager||opts.pagerAnchorBuilder){$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);}if($.isFunction(opts.onAddSlide)){opts.onAddSlide($s);}else{$s.hide();}};}$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init)){init(opts.$cont,$(opts.elements),opts);}};function go(els,opts,manual,fwd){var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(manual&&opts.busy&&opts.manualTrump){debug("manualTrump in go(), stopping active transition");$(els).stop(true,true);opts.busy=0;clearTimeout(p.cycleTimeout);}if(opts.busy){debug("transition active, ignoring new tx request");return;}if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual){return;}if(!manual&&!p.cyclePause&&!opts.bounce&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end){opts.end(opts);}return;}var changed=false;if((manual||!p.cyclePause)&&(opts.nextSlide!=opts.currSlide)){changed=true;var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(fwd&&(opts.lastFx===undefined||++opts.lastFx>=opts.fxs.length)){opts.lastFx=0;}else{if(!fwd&&(opts.lastFx===undefined||--opts.lastFx<0)){opts.lastFx=opts.fxs.length-1;}}fx=opts.fxs[opts.lastFx];}if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}$.fn.cycle.resetState(opts,fx);if(opts.before.length){$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});}var after=function(){opts.busy=0;$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});if(!p.cycleStop){queueNext();}};debug("tx firing("+fx+"); currSlide: "+opts.currSlide+"; nextSlide: "+opts.nextSlide);opts.busy=1;if(opts.fxFn){opts.fxFn(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{if($.isFunction($.fn.cycle[opts.fx])){$.fn.cycle[opts.fx](curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{$.fn.cycle.custom(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}}}else{queueNext();}if(changed||opts.nextSlide==opts.currSlide){var roll;opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;opts.randomMap.sort(function(a,b){return Math.random()-0.5;});}opts.nextSlide=opts.randomMap[opts.randomIndex];if(opts.nextSlide==opts.currSlide){opts.nextSlide=(opts.currSlide==opts.slideCount-1)?0:opts.currSlide+1;}}else{if(opts.backwards){roll=(opts.nextSlide-1)<0;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=1;opts.currSlide=0;}else{opts.nextSlide=roll?(els.length-1):opts.nextSlide-1;opts.currSlide=roll?0:opts.nextSlide+1;}}else{roll=(opts.nextSlide+1)==els.length;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=els.length-2;opts.currSlide=els.length-1;}else{opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}}}}if(changed&&opts.pager){opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass);}function queueNext(){var ms=0,timeout=opts.timeout;if(opts.timeout&&!opts.continuous){ms=getTimeout(els[opts.currSlide],els[opts.nextSlide],opts,fwd);if(opts.fx=="shuffle"){ms-=opts.speedOut;}}
1731else{if(opts.continuous&&p.cyclePause){ms=10;}}if(ms>0){p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.backwards);},ms);}}}$.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){$(pager).each(function(){$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);});};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn.call(curr,curr,next,opts,fwd);while(opts.fx!="none"&&(t-opts.speed)<250){t+=opts.speed;}debug("calculated timeout: "+t+"; speed: "+opts.speed);if(t!==false){return t;}}return opts.timeout;}$.fn.cycle.next=function(opts){advance(opts,1);};$.fn.cycle.prev=function(opts){advance(opts,0);};function advance(opts,moveForward){var val=moveForward?1:-1;var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2){opts.randomIndex=els.length-2;}else{if(opts.randomIndex==-1){opts.randomIndex=els.length-1;}}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.random){opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap){return false;}opts.nextSlide=els.length-1;}else{if(opts.nextSlide>=els.length){if(opts.nowrap){return false;}opts.nextSlide=0;}}}}var cb=opts.onPrevNextEvent||opts.prevNextClick;if($.isFunction(cb)){cb(val>0,opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,moveForward);return false;}function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass);}$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);debug("pagerAnchorBuilder("+i+", el) returned: "+a);}else{a='<a href="#">'+(i+1)+"</a>";}if(!a){return;}var $a=$(a);if($a.parents("body").length===0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(true);$(this).append($clone);arr.push($clone[0]);});$a=$(arr);}else{$a.appendTo($p);}}opts.pagerAnchors=opts.pagerAnchors||[];opts.pagerAnchors.push($a);var pagerFn=function(e){e.preventDefault();opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}var cb=opts.onPagerEvent||opts.pagerClick;if($.isFunction(cb)){cb(opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,opts.currSlide<i);};if(/mouseenter|mouseover/i.test(opts.pagerEvent)){$a.hover(pagerFn,function(){});}else{$a.bind(opts.pagerEvent,pagerFn);}if(!/^click/.test(opts.pagerEvent)&&!opts.allowPagerClickBubble){$a.bind("click.cycle",function(){return false;});}var cont=opts.$cont[0];var pauseFlag=false;if(opts.pauseOnPagerHover){$a.hover(function(){pauseFlag=true;cont.cyclePause++;triggerPause(cont,true,true);},function(){if(pauseFlag){cont.cyclePause--;}triggerPause(cont,true,true);});}};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd){hops=c>l?c-l:opts.slideCount-l;}else{hops=c<l?l-c:l+opts.slideCount-c;}return hops;};function clearTypeFix($slides){debug("applying clearType background-color hack");function hex(s){s=parseInt(s,10).toString(16);return s.length<2?"0"+s:s;}function getBg(e){for(;e&&e.nodeName.toLowerCase()!="html";e=e.parentNode){var v=$.css(e,"background-color");if(v&&v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}if(v&&v!="transparent"){return v;}}return"#ffffff";}$slides.each(function(){$(this).css("background-color",getBg(this));});}$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();if(typeof opts.cssBefore.opacity=="undefined"){opts.cssBefore.opacity=1;}opts.cssBefore.display="block";if(opts.slideResize&&w!==false&&next.cycleW>0){opts.cssBefore.width=next.cycleW;}if(opts.slideResize&&h!==false&&next.cycleH>0){opts.cssBefore.height=next.cycleH;}opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display="none";$(curr).css("zIndex",opts.slideCount+(rev===true?1:0));$(next).css("zIndex",opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,fwd,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut,animInDelay=opts.animInDelay,animOutDelay=opts.animOutDelay;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=="number"){speedIn=speedOut=speedOverride;}else{speedIn=speedOut=1;}easeIn=easeOut=null;}var fn=function(){$n.delay(animInDelay).animate(opts.animIn,speedIn,easeIn,function(){cb();});};$l.delay(animOutDelay).animate(opts.animOut,speedOut,easeOut,function(){$l.css(opts.cssAfter);if(!opts.sync){fn();}});if(opts.sync){fn();}};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css("opacity",0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0}
1731;opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:false,animIn:null,animInDelay:0,animOut:null,animOutDelay:0,aspect:false,autostop:0,autostopCount:0,backwards:false,before:null,center:null,cleartype:!$.support.opacity,cleartypeNoBg:false,containerResize:1,containerResizeHeight:0,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:true,metaAttr:"cycle",next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:"click.cycle",pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:"click.cycle",random:0,randomizeEffects:1,requeueOnImageNotLoaded:true,requeueTimeout:250,rev:0,shuffle:null,skipInitializationCallbacks:false,slideExpr:null,slideResize:1,speed:1000,speedIn:null,speedOut:null,startingSlide:undefined,sync:1,timeout:4000,timeoutFn:null,updateActivePagerLink:null,width:null};})(jQuery);
1732/*
1733 * jQuery Cycle Plugin Transition Definitions
1734 * This script is a plugin for the jQuery Cycle Plugin
1735 * Examples and documentation at: http://malsup.com/jquery/cycle/
1736 * Copyright (c) 2007-2010 M. Alsup
1737 * Version:	 2.73
1738 * Dual licensed under the MIT and GPL licenses:
1739 * http://www.opensource.org/licenses/mit-license.php
1740 * http://www.gnu.org/licenses/gpl.html
1741 */
1742(function($){$.fn.cycle.transitions.none=function($cont,$slides,opts){opts.fxFn=function(curr,next,opts,after){$(next).show();$(curr).hide();after();};};$.fn.cycle.transitions.fadeout=function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css({display:"block",opacity:1});opts.before.push(function(curr,next,opts,w,h,rev){$(curr).css("zIndex",opts.slideCount+(rev!==true?1:0));$(next).css("zIndex",opts.slideCount+(rev!==true?0:1));});opts.animIn.opacity=1;opts.animOut.opacity=0;opts.cssBefore.opacity=1;opts.cssBefore.display="block";opts.cssAfter.zIndex=0;};$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore.top=h;opts.cssBefore.left=0;opts.cssFirst.top=0;opts.animIn.top=0;opts.animOut.top=-h;};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssFirst.top=0;opts.cssBefore.top=-h;opts.cssBefore.left=0;opts.animIn.top=0;opts.animOut.top=h;};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst.left=0;opts.cssBefore.left=w;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.left=0-w;};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst.left=0;opts.cssBefore.left=-w;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.left=w;};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts,fwd){if(opts.rev){fwd=!fwd;}$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW;});opts.cssFirst.left=0;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.top=0;};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts,fwd){if(opts.rev){fwd=!fwd;}$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH;});opts.cssFirst.top=0;opts.cssBefore.left=0;opts.animIn.top=0;opts.animOut.left=0;};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;});opts.cssBefore.left=0;opts.cssBefore.top=0;opts.cssBefore.width=0;opts.animIn.width="show";opts.animOut.width=0;};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;});opts.cssBefore.left=0;opts.cssBefore.top=0;opts.cssBefore.height=0;opts.animIn.height="show";opts.animOut.height=0;};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var i,w=$cont.css("overflow","visible").width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);});if(!opts.speedAdjusted){opts.speed=opts.speed/2;opts.speedAdjusted=true;}opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(i=0;i<$slides.length;i++){opts.els.push($slides[i]);}for(i=0;i<opts.currSlide;i++){opts.els.push(opts.els.shift());}opts.fxFn=function(curr,next,opts,cb,fwd){if(opts.rev){fwd=!fwd;}var $el=fwd?$(curr):$(next);$(next).css(opts.cssBefore);var count=opts.slideCount;$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){var hops=$.fn.cycle.hopsFromLast(opts,fwd);for(var k=0;k<hops;k++){if(fwd){opts.els.push(opts.els.shift());}else{opts.els.unshift(opts.els.pop());}}
1742if(fwd){for(var i=0,len=opts.els.length;i<len;i++){$(opts.els[i]).css("z-index",len-i+count);}}else{var z=$(curr).css("z-index");$el.css("z-index",parseInt(z,10)+1+count);}$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();if(cb){cb();}});});};$.extend(opts.cssBefore,{display:"block",opacity:1,top:0,left:0});};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH;opts.animOut.width=next.cycleW;});opts.cssFirst.top=0;opts.cssBefore.left=0;opts.cssBefore.height=0;opts.animIn.top=0;opts.animOut.height=0;};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssFirst.top=0;opts.cssBefore.left=0;opts.cssBefore.top=0;opts.cssBefore.height=0;opts.animOut.height=0;};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW;});opts.cssBefore.top=0;opts.cssBefore.width=0;opts.animIn.left=0;opts.animOut.width=0;};$.fn.cycle.transitions.turnRight=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});$.extend(opts.cssBefore,{top:0,left:0,width:0});opts.animIn.left=0;opts.animOut.width=0;};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false,true);opts.cssBefore.top=next.cycleH/2;opts.cssBefore.left=next.cycleW/2;$.extend(opts.animIn,{top:0,left:0,width:next.cycleW,height:next.cycleH});$.extend(opts.animOut,{width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2});});opts.cssFirst.top=0;opts.cssFirst.left=0;opts.cssBefore.width=0;opts.cssBefore.height=0;};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false);opts.cssBefore.left=next.cycleW/2;opts.cssBefore.top=next.cycleH/2;$.extend(opts.animIn,{top:0,left:0,width:next.cycleW,height:next.cycleH});});opts.cssBefore.width=0;opts.cssBefore.height=0;opts.animOut.opacity=0;};$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore.left=w;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.left=w;};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore.top=h;opts.cssBefore.left=0;opts.animIn.top=0;opts.animOut.top=h;};$.fn.cycle.transitions.blindZ=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();var w=$cont.width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore.top=h;opts.cssBefore.left=w;opts.animIn.top=0;opts.animIn.left=0;opts.animOut.top=h;opts.animOut.left=w;};$.fn.cycle.transitions.growX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=this.cycleW/2;opts.animIn.left=0;opts.animIn.width=this.cycleW;opts.animOut.left=0;});opts.cssBefore.top=0;opts.cssBefore.width=0;};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=this.cycleH/2;opts.animIn.top=0;opts.animIn.height=this.cycleH;opts.animOut.top=0;});opts.cssBefore.height=0;opts.cssBefore.left=0;};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true,true);opts.cssBefore.left=next.cycleW/2;opts.animIn.left=0;opts.animIn.width=this.cycleW;opts.animOut.left=curr.cycleW/2;opts.animOut.width=0;});opts.cssBefore.top=0;opts.cssBefore.width=0;};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false,true);opts.cssBefore.top=next.cycleH/2;opts.animIn.top=0;opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH/2;opts.animOut.height=0;});opts.cssBefore.height=0;opts.cssBefore.left=0;};$.fn.cycle.transitions.cover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();
1742var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssAfter.display="";if(d=="right"){opts.cssBefore.left=-w;}else{if(d=="up"){opts.cssBefore.top=h;}else{if(d=="down"){opts.cssBefore.top=-h;}else{opts.cssBefore.left=w;}}}});opts.animIn.left=0;opts.animIn.top=0;opts.cssBefore.top=0;opts.cssBefore.left=0;};$.fn.cycle.transitions.uncover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(d=="right"){opts.animOut.left=w;}else{if(d=="up"){opts.animOut.top=-h;}else{if(d=="down"){opts.animOut.top=h;}else{opts.animOut.left=-w;}}}});opts.animIn.left=0;opts.animIn.top=0;opts.cssBefore.top=0;opts.cssBefore.left=0;};$.fn.cycle.transitions.toss=function($cont,$slides,opts){var w=$cont.css("overflow","visible").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(!opts.animOut.left&&!opts.animOut.top){$.extend(opts.animOut,{left:w*2,top:-h/2,opacity:0});}else{opts.animOut.opacity=0;}});opts.cssBefore.left=0;opts.cssBefore.top=0;opts.animIn.left=0;};$.fn.cycle.transitions.wipe=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip){if(/l2r/.test(opts.clip)){clip="rect(0px 0px "+h+"px 0px)";}else{if(/r2l/.test(opts.clip)){clip="rect(0px "+w+"px "+h+"px "+w+"px)";}else{if(/t2b/.test(opts.clip)){clip="rect(0px "+w+"px 0px 0px)";}else{if(/b2t/.test(opts.clip)){clip="rect("+h+"px "+w+"px "+h+"px 0px)";}else{if(/zoom/.test(opts.clip)){var top=parseInt(h/2,10);var left=parseInt(w/2,10);clip="rect("+top+"px "+left+"px "+top+"px "+left+"px)";}}}}}}opts.cssBefore.clip=opts.cssBefore.clip||clip||"rect(0px 0px 0px 0px)";var d=opts.cssBefore.clip.match(/(\d+)/g);var t=parseInt(d[0],10),r=parseInt(d[1],10),b=parseInt(d[2],10),l=parseInt(d[3],10);opts.before.push(function(curr,next,opts){if(curr==next){return;}var $curr=$(curr),$next=$(next);$.fn.cycle.commonReset(curr,next,opts,true,true,false);opts.cssAfter.display="block";var step=1,count=parseInt((opts.speedIn/13),10)-1;(function f(){var tt=t?t-parseInt(step*(t/count),10):0;var ll=l?l-parseInt(step*(l/count),10):0;var bb=b<h?b+parseInt(step*((h-b)/count||1),10):h;var rr=r<w?r+parseInt(step*((w-r)/count||1),10):w;$next.css({clip:"rect("+tt+"px "+rr+"px "+bb+"px "+ll+"px)"});(step++<=count)?setTimeout(f,13):$curr.css("display","none");})();});$.extend(opts.cssBefore,{display:"block",opacity:1,top:0,left:0});opts.animIn={left:0};opts.animOut={left:0};};})(jQuery);;
1743//  json2.js
1744//  2016-05-01
1745//  Public Domain.
1746//  NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
1747//  See http://www.JSON.org/js.html
1748//  This code should be minified before deployment.
1749//  See http://javascript.crockford.com/jsmin.html
1750
1751//  USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
1752//  NOT CONTROL.
1753
1754//  This file creates a global JSON object containing two methods: stringify
1755//  and parse. This file is provides the ES5 JSON capability to ES3 systems.
1756//  If a project might run on IE8 or earlier, then this file should be included.
1757//  This file does nothing on ES5 systems.
1758
1759//      JSON.stringify(value, replacer, space)
1760//          value       any JavaScript value, usually an object or array.
1761//          replacer    an optional parameter that determines how object
1762//                      values are stringified for objects. It can be a
1763//                      function or an array of strings.
1764//          space       an optional parameter that specifies the indentation
1765//                      of nested structures. If it is omitted, the text will
1766//                      be packed without extra whitespace. If it is a number,
1767//                      it will specify the number of spaces to indent at each
1768//                      level. If it is a string (such as "\t" or "&nbsp;"),
1769//                      it contains the characters used to indent at each level.
1770//          This method produces a JSON text from a JavaScript value.
1771//          When an object value is found, if the object contains a toJSON
1772//          method, its toJSON method will be called and the result will be
1773//          stringified. A toJSON method does not serialize: it returns the
1774//          value represented by the name/value pair that should be serialized,
1775//          or undefined if nothing should be serialized. The toJSON method
1776//          will be passed the key associated with the value, and this will be
1777//          bound to the value.
1778
1779//          For example, this would serialize Dates as ISO strings.
1780
1781//              Date.prototype.toJSON = function (key) {
1782//                  function f(n) {
1783//                      // Format integers to have at least two digits.
1784//                      return (n < 10)
1785//                          ? "0" + n
1786//                          : n;
1787//                  }
1788//                  return this.getUTCFullYear()   + "-" +
1789//                       f(this.getUTCMonth() + 1) + "-" +
1790//                       f(this.getUTCDate())      + "T" +
1791//                       f(this.getUTCHours())     + ":" +
1792//                       f(this.getUTCMinutes())   + ":" +
1793//                       f(this.getUTCSeconds())   + "Z";
1794//              };
1795
1796//          You can provide an optional replacer method. It will be passed the
1797//          key and value of each member, with this bound to the containing
1798//          object. The value that is returned from your method will be
1799//          serialized. If your method returns undefined, then the member will
1800//          be excluded from the serialization.
1801
1802//          If the replacer parameter is an array of strings, then it will be
1803//          used to select the members to be serialized. It filters the results
1804//          such that only members with keys listed in the replacer array are
1805//          stringified.
1806
1807//          Values that do not have JSON representations, such as undefined or
1808//          functions, will not be serialized. Such values in objects will be
1809//          dropped; in arrays they will be replaced with null. You can use
1810//          a replacer function to replace those with JSON values.
1811
1812//          JSON.stringify(undefined) returns undefined.
1813
1814//          The optional space parameter produces a stringification of the
1815//          value that is filled with line breaks and indentation to make it
1816//          easier to read.
1817
1818//          If the space parameter is a non-empty string, then that string will
1819//          be used for indentation. If the space parameter is a number, then
1820//          the indentation will be that many spaces.
1821
1822//          Example:
1823
1824//          text = JSON.stringify(["e", {pluribus: "unum"}]);
1825//          // text is '["e",{"pluribus":"unum"}]'
1826
1827//          text = JSON.stringify(["e", {pluribus: "unum"}], null, "\t");
1828//          // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
1829
1830//          text = JSON.stringify([new Date()], function (key, value) {
1831//              return this[key] instanceof Date
1832//                  ? "Date(" + this[key] + ")"
1833//                  : value;
1834//          });
1835//          // text is '["Date(---current time---)"]'
1836
1837//      JSON.parse(text, reviver)
1838//          This method parses a JSON text to produce an object or array.
1839//          It can throw a SyntaxError exception.
1840
1841//          The optional reviver parameter is a function that can filter and
1842//          transform the results. It receives each of the keys and values,
1843//          and its return value is used instead of the original value.
1844//          If it returns what it received, then the structure is not modified.
1845//          If it returns undefined then the member is deleted.
1846
1847//          Example:
1848
1849//          // Parse the text. Values that look like ISO date strings will
1850//          // be converted to Date objects.
1851
1852//          myData = JSON.parse(text, function (key, value) {
1853//              var a;
1854//              if (typeof value === "string") {
1855//                  a =
1856//   /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
1857//                  if (a) {
1858//                      return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
1859//                          +a[5], +a[6]));
1860//                  }
1861//              }
1862//              return value;
1863//          });
1864
1865//          myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
1866//              var d;
1867//              if (typeof value === "string" &&
1868//                      value.slice(0, 5) === "Date(" &&
1869//                      value.slice(-1) === ")") {
1870//                  d = new Date(value.slice(5, -1));
1871//                  if (d) {
1872//                      return d;
1873//                  }
1874//              }
1875//              return value;
1876//          });
1877
1878//  This is a reference implementation. You are free to copy, modify, or
1879//  redistribute.
1880
1881/*jslint
1882    eval, for, this
1883*/
1884
1885/*property
1886    JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
1887    getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
1888    lastIndex, length, parse, prototype, push, replace, slice, stringify,
1889    test, toJSON, toString, valueOf
1890*/
1891
1892
1893// Create a JSON object only if one does not already exist. We create the
1894// methods in a closure to avoid creating global variables.
1895
1896if (typeof JSON !== "object") {
1897    JSON = {};
1898}
1899
1900(function () {
1901    "use strict";
1902
1903    var rx_one = /^[\],:{}\s]*$/;
1904    var rx_two = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g;
1905    var rx_three = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g;
1906    var rx_four = /(?:^|:|,)(?:\s*\[)+/g;
1907    var rx_escapable = /[\
vendor: 11,316 bytes, lines 1907-2248
1907\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
1908    var rx_dangerous = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
1909
1910    function f(n) {
1911        // Format integers to have at least two digits.
1912        return n < 10
1913            ? "0" + n
1914            : n;
1915    }
1916
1917    function this_value() {
1918        return this.valueOf();
1919    }
1920
1921    if (typeof Date.prototype.toJSON !== "function") {
1922
1923        Date.prototype.toJSON = function () {
1924
1925            return isFinite(this.valueOf())
1926                ? this.getUTCFullYear() + "-" +
1927                        f(this.getUTCMonth() + 1) + "-" +
1928                        f(this.getUTCDate()) + "T" +
1929                        f(this.getUTCHours()) + ":" +
1930                        f(this.getUTCMinutes()) + ":" +
1931                        f(this.getUTCSeconds()) + "Z"
1932                : null;
1933        };
1934
1935        Boolean.prototype.toJSON = this_value;
1936        Number.prototype.toJSON = this_value;
1937        String.prototype.toJSON = this_value;
1938    }
1939
1940    var gap;
1941    var indent;
1942    var meta;
1943    var rep;
1944
1945
1946    function quote(string) {
1947
1948// If the string contains no control characters, no quote characters, and no
1949// backslash characters, then we can safely slap some quotes around it.
1950// Otherwise we must also replace the offending characters with safe escape
1951// sequences.
1952
1953        rx_escapable.lastIndex = 0;
1954        return rx_escapable.test(string)
1955            ? "\"" + string.replace(rx_escapable, function (a) {
1956                var c = meta[a];
1957                return typeof c === "string"
1958                    ? c
1959                    : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4);
1960            }) + "\""
1961            : "\"" + string + "\"";
1962    }
1963
1964
1965    function str(key, holder) {
1966
1967// Produce a string from holder[key].
1968
1969        var i;          // The loop counter.
1970        var k;          // The member key.
1971        var v;          // The member value.
1972        var length;
1973        var mind = gap;
1974        var partial;
1975        var value = holder[key];
1976
1977// If the value has a toJSON method, call it to obtain a replacement value.
1978
1979        if (value && typeof value === "object" &&
1980                typeof value.toJSON === "function") {
1981            value = value.toJSON(key);
1982        }
1983
1984// If we were called with a replacer function, then call the replacer to
1985// obtain a replacement value.
1986
1987        if (typeof rep === "function") {
1988            value = rep.call(holder, key, value);
1989        }
1990
1991// What happens next depends on the value's type.
1992
1993        switch (typeof value) {
1994        case "string":
1995            return quote(value);
1996
1997        case "number":
1998
1999// JSON numbers must be finite. Encode non-finite numbers as null.
2000
2001            return isFinite(value)
2002                ? String(value)
2003                : "null";
2004
2005        case "boolean":
2006        case "null":
2007
2008// If the value is a boolean or null, convert it to a string. Note:
2009// typeof null does not produce "null". The case is included here in
2010// the remote chance that this gets fixed someday.
2011
2012            return String(value);
2013
2014// If the type is "object", we might be dealing with an object or an array or
2015// null.
2016
2017        case "object":
2018
2019// Due to a specification blunder in ECMAScript, typeof null is "object",
2020// so watch out for that case.
2021
2022            if (!value) {
2023                return "null";
2024            }
2025
2026// Make an array to hold the partial results of stringifying this object value.
2027
2028            gap += indent;
2029            partial = [];
2030
2031// Is the value an array?
2032
2033            if (Object.prototype.toString.apply(value) === "[object Array]") {
2034
2035// The value is an array. Stringify every element. Use null as a placeholder
2036// for non-JSON values.
2037
2038                length = value.length;
2039                for (i = 0; i < length; i += 1) {
2040                    partial[i] = str(i, value) || "null";
2041                }
2042
2043// Join all of the elements together, separated with commas, and wrap them in
2044// brackets.
2045
2046                v = partial.length === 0
2047                    ? "[]"
2048                    : gap
2049                        ? "[\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "]"
2050                        : "[" + partial.join(",") + "]";
2051                gap = mind;
2052                return v;
2053            }
2054
2055// If the replacer is an array, use it to select the members to be stringified.
2056
2057            if (rep && typeof rep === "object") {
2058                length = rep.length;
2059                for (i = 0; i < length; i += 1) {
2060                    if (typeof rep[i] === "string") {
2061                        k = rep[i];
2062                        v = str(k, value);
2063                        if (v) {
2064                            partial.push(quote(k) + (
2065                                gap
2066                                    ? ": "
2067                                    : ":"
2068                            ) + v);
2069                        }
2070                    }
2071                }
2072            } else {
2073
2074// Otherwise, iterate through all of the keys in the object.
2075
2076                for (k in value) {
2077                    if (Object.prototype.hasOwnProperty.call(value, k)) {
2078                        v = str(k, value);
2079                        if (v) {
2080                            partial.push(quote(k) + (
2081                                gap
2082                                    ? ": "
2083                                    : ":"
2084                            ) + v);
2085                        }
2086                    }
2087                }
2088            }
2089
2090// Join all of the member texts together, separated with commas,
2091// and wrap them in braces.
2092
2093            v = partial.length === 0
2094                ? "{}"
2095                : gap
2096                    ? "{\n" + gap + partial.join(",\n" + gap) + "\n" + mind + "}"
2097                    : "{" + partial.join(",") + "}";
2098            gap = mind;
2099            return v;
2100        }
2101    }
2102
2103// If the JSON object does not yet have a stringify method, give it one.
2104
2105    if (typeof JSON.stringify !== "function") {
2106        meta = {    // table of character substitutions
2107            "\b": "\\b",
2108            "\t": "\\t",
2109            "\n": "\\n",
2110            "\f": "\\f",
2111            "\r": "\\r",
2112            "\"": "\\\"",
2113            "\\": "\\\\"
2114        };
2115        JSON.stringify = function (value, replacer, space) {
2116
2117// The stringify method takes a value and an optional replacer, and an optional
2118// space parameter, and returns a JSON text. The replacer can be a function
2119// that can replace values, or an array of strings that will select the keys.
2120// A default replacer method can be provided. Use of the space parameter can
2121// produce text that is more easily readable.
2122
2123            var i;
2124            gap = "";
2125            indent = "";
2126
2127// If the space parameter is a number, make an indent string containing that
2128// many spaces.
2129
2130            if (typeof space === "number") {
2131                for (i = 0; i < space; i += 1) {
2132                    indent += " ";
2133                }
2134
2135// If the space parameter is a string, it will be used as the indent string.
2136
2137            } else if (typeof space === "string") {
2138                indent = space;
2139            }
2140
2141// If there is a replacer, it must be a function or an array.
2142// Otherwise, throw an error.
2143
2144            rep = replacer;
2145            if (replacer && typeof replacer !== "function" &&
2146                    (typeof replacer !== "object" ||
2147                    typeof replacer.length !== "number")) {
2148                throw new Error("JSON.stringify");
2149            }
2150
2151// Make a fake root object containing our value under the key of "".
2152// Return the result of stringifying the value.
2153
2154            return str("", {"": value});
2155        };
2156    }
2157
2158
2159// If the JSON object does not yet have a parse method, give it one.
2160
2161    if (typeof JSON.parse !== "function") {
2162        JSON.parse = function (text, reviver) {
2163
2164// The parse method takes a text and an optional reviver function, and returns
2165// a JavaScript value if the text is a valid JSON text.
2166
2167            var j;
2168
2169            function walk(holder, key) {
2170
2171// The walk method is used to recursively walk the resulting structure so
2172// that modifications can be made.
2173
2174                var k;
2175                var v;
2176                var value = holder[key];
2177                if (value && typeof value === "object") {
2178                    for (k in value) {
2179                        if (Object.prototype.hasOwnProperty.call(value, k)) {
2180                            v = walk(value, k);
2181                            if (v !== undefined) {
2182                                value[k] = v;
2183                            } else {
2184                                delete value[k];
2185                            }
2186                        }
2187                    }
2188                }
2189                return reviver.call(holder, key, value);
2190            }
2191
2192
2193// Parsing happens in four stages. In the first stage, we replace certain
2194// Unicode characters with escape sequences. JavaScript handles many characters
2195// incorrectly, either silently deleting them, or treating them as line endings.
2196
2197            text = String(text);
2198            rx_dangerous.lastIndex = 0;
2199            if (rx_dangerous.test(text)) {
2200                text = text.replace(rx_dangerous, function (a) {
2201                    return "\\u" +
2202                            ("0000" + a.charCodeAt(0).toString(16)).slice(-4);
2203                });
2204            }
2205
2206// In the second stage, we run the text against regular expressions that look
2207// for non-JSON patterns. We are especially concerned with "()" and "new"
2208// because they can cause invocation, and "=" because it can cause mutation.
2209// But just to be safe, we want to reject all unexpected forms.
2210
2211// We split the second stage into 4 regexp operations in order to work around
2212// crippling inefficiencies in IE's and Safari's regexp engines. First we
2213// replace the JSON backslash pairs with "@" (a non-JSON character). Second, we
2214// replace all simple value tokens with "]" characters. Third, we delete all
2215// open brackets that follow a colon or comma or that begin the text. Finally,
2216// we look to see that the remaining characters are only whitespace or "]" or
2217// "," or ":" or "{" or "}". If that is so, then the text is safe for eval.
2218
2219            if (
2220                rx_one.test(
2221                    text
2222                        .replace(rx_two, "@")
2223                        .replace(rx_three, "]")
2224                        .replace(rx_four, "")
2225                )
2226            ) {
2227
2228// In the third stage we use the eval function to compile the text into a
2229// JavaScript structure. The "{" operator is subject to a syntactic ambiguity
2230// in JavaScript: it can begin a block or an object literal. We wrap the text
2231// in parens to eliminate the ambiguity.
2232
2233                j = eval("(" + text + ")");
2234
2235// In the optional fourth stage, we recursively walk the new structure, passing
2236// each name/value pair to a reviver function for possible transformation.
2237
2238                return (typeof reviver === "function")
2239                    ? walk({"": j}, "")
2240                    : j;
2241            }
2242
2243// If the text is not JSON parseable, then a SyntaxError is thrown.
2244
2245            throw new SyntaxError("JSON.parse");
2246        };
2247    }
2248}());
2249;
2250/**
2251 *  @file
2252 *  A simple jQuery Cycle Div Slideshow Rotator.
2253 */
2254
2255/**
2256 * This will set our initial behavior, by starting up each individual slideshow.
2257 */
2258(function ($) {
2259  Drupal.behaviors.viewsSlideshowCycle = {
2260    attach: function (context) {
2261      $('.views_slideshow_cycle_main:not(.viewsSlideshowCycle-processed)', context).addClass('viewsSlideshowCycle-processed').each(function() {
2262        var fullId = '#' + $(this).attr('id');
2263        var settings = Drupal.settings.viewsSlideshowCycle[fullId];
2264        settings.targetId = '#' + $(fullId + " :first").attr('id');
2265
2266        settings.slideshowId = settings.targetId.replace('#views_slideshow_cycle_teaser_section_', '');
2267        // Pager after function.
2268        var pager_after_fn = function(curr, next, opts) {
2269          // Need to do some special handling on first load.
2270          var slideNum = opts.currSlide;
2271          if (typeof settings.processedAfter == 'undefined' || !settings.processedAfter) {
2272            settings.processedAfter = 1;
2273            slideNum = (typeof settings.opts.startingSlide == 'undefined') ? 0 : settings.opts.startingSlide;
2274          }
2275          if (settings.pause_after_slideshow) {
2276            opts.counter += 1;
2277            if (opts.counter == settings.num_divs + 1) {
2278              opts.counter = 1;
2279              Drupal.viewsSlideshow.action({ "action": 'pause', "slideshowID": settings.slideshowId, "force": true });
2280            }
2281          }
2282          Drupal.viewsSlideshow.action({ "action": 'transitionEnd', "slideshowID": settings.slideshowId, "slideNum": slideNum });
2283        }
2284        // Pager before function.
2285        var pager_before_fn = function(curr, next, opts) {
2286          $(document).trigger('drupal:views_slideshow_cycle:before', {
2287            curr: curr, next: next, opts: opts, settings: settings
2288          });
2289
2290          var slideNum = opts.nextSlide;
2291
2292          // Remember last slide.
2293          if (settings.remember_slide) {
2294            createCookie(settings.vss_id, slideNum, settings.remember_slide_days);
2295          }
2296
2297          // Make variable height.
2298          if (!settings.fixed_height) {
2299            //get the height of the current slide
2300            var $ht = $(next).height();
2301            //set the container's height to that of the current slide
2302            $(next).parent().animate({height: $ht});
2303          }
2304
2305          // Need to do some special handling on first load.
2306          if (typeof settings.processedBefore == 'undefined' || !settings.processedBefore) {
2307            settings.processedBefore = 1;
2308            slideNum = (typeof opts.startingSlide == 'undefined') ? 0 : opts.startingSlide;
2309          }
2310
2311          Drupal.viewsSlideshow.action({ "action": 'transitionBegin', "slideshowID": settings.slideshowId, "slideNum": slideNum });
2312        }
2313        settings.loaded = false;
2314
2315        settings.opts = {
2316          speed:settings.speed,
2317          timeout:settings.timeout,
2318          delay:settings.delay,
2319          sync:settings.sync,
2320          random:settings.random,
2321          nowrap:settings.nowrap,
2322          pause_after_slideshow:settings.pause_after_slideshow,
2323          counter:0,
2324          after:pager_after_fn,
2325          before:pager_before_fn,
2326          cleartype:(settings.cleartype)? true : false,
2327          cleartypeNoBg:(settings.cleartypenobg)? true : false
2328        }
2329
2330        // Set the starting slide if we are supposed to remember the slide
2331        if (settings.remember_slide) {
2332          var startSlide = readCookie(settings.vss_id);
2333          if (startSlide == null) {
2334            startSlide = 0;
2335          }
2336          settings.opts.startingSlide = parseInt(startSlide);
2337        }
2338
2339        if (settings.effect == 'none') {
2340          settings.opts.speed = 1;
2341        }
2342        else {
2343          settings.opts.fx = settings.effect;
2344        }
2345
2346        // Take starting item from fragment.
2347        var hash = location.hash;
2348        if (hash) {
2349          var hash = hash.replace('#', '');
2350          var aHash = hash.split(';');
2351          var aHashLen = aHash.length;
2352
2353          // Loop through all the possible starting points.
2354          for (var i = 0; i < aHashLen; i++) {
2355            // Split the hash into two parts. One part is the slideshow id the
2356            // other is the slide number.
2357            var initialInfo = aHash[i].split(':');
2358            // The id in the hash should match our slideshow.
2359            // The slide number chosen shouldn't be larger than the number of
2360            // slides we have.
2361            if (settings.slideshowId == initialInfo[0] && settings.num_divs >
2361 initialInfo[1]) {
2362              settings.opts.startingSlide = parseInt(initialInfo[1]);
2363            }
2364          }
2365        }
2366
2367        // Pause on hover.
2368        if (settings.pause) {
2369          var mouseIn = function() {
2370            Drupal.viewsSlideshow.action({ "action": 'pause', "slideshowID": settings.slideshowId });
2371          }
2372
2373          var mouseOut = function() {
2374            Drupal.viewsSlideshow.action({ "action": 'play', "slideshowID": settings.slideshowId });
2375          }
2376
2377          if (jQuery.fn.hoverIntent) {
2378            $('#views_slideshow_cycle_teaser_section_' + settings.vss_id).hoverIntent(mouseIn, mouseOut);
2379          }
2380          else {
2381            $('#views_slideshow_cycle_teaser_section_' + settings.vss_id).hover(mouseIn, mouseOut);
2382          }
2383        }
2384
2385        // Play on hover.
2386        if (settings.play_on_hover) {
2387          var mouseIn = function() {
2388            Drupal.viewsSlideshow.action({ "action": 'play', "slideshowID": settings.slideshowId, "force": true });
2389          }
2390
2391          var mouseOut = function() {
2392            Drupal.viewsSlideshow.action({ "action": 'pause', "slideshowID": settings.slideshowId });
2393          }
2394
2395          if (jQuery.fn.hoverIntent) {
2396            $('#views_slideshow_cycle_teaser_section_' + settings.vss_id).hoverIntent(mouseIn, mouseOut);
2397          }
2398          else {
2399            $('#views_slideshow_cycle_teaser_section_' + settings.vss_id).hover(mouseIn, mouseOut);
2400          }
2401        }
2402
2403        // Pause on clicking of the slide.
2404        if (settings.pause_on_click) {
2405          $('#views_slideshow_cycle_teaser_section_' + settings.vss_id).click(function() {
2406            Drupal.viewsSlideshow.action({ "action": 'pause', "slideshowID": settings.slideshowId, "force": true });
2407          });
2408        }
2409
2410        if (typeof JSON != 'undefined') {
2411          var advancedOptions = JSON.parse(settings.advanced_options);
2412          for (var option in advancedOptions) {
2413            switch(option) {
2414
2415              // Standard Options
2416              case "activePagerClass":
2417              case "allowPagerClickBubble":
2418              case "autostop":
2419              case "autostopCount":
2420              case "backwards":
2421              case "bounce":
2422              case "cleartype":
2423              case "cleartypeNoBg":
2424              case "containerResize":
2425              case "continuous":
2426              case "delay":
2427              case "easeIn":
2428              case "easeOut":
2429              case "easing":
2430              case "fastOnEvent":
2431              case "fit":
2432              case "fx":
2433              case "manualTrump":
2434              case "metaAttr":
2435              case "next":
2436              case "nowrap":
2437              case "pager":
2438              case "pagerEvent":
2439              case "pause":
2440              case "pauseOnPagerHover":
2441              case "prev":
2442              case "prevNextEvent":
2443              case "random":
2444              case "randomizeEffects":
2445              case "requeueOnImageNotLoaded":
2446              case "requeueTimeout":
2447              case "rev":
2448              case "slideExpr":
2449              case "slideResize":
2450              case "speed":
2451              case "speedIn":
2452              case "speedOut":
2453              case "startingSlide":
2454              case "sync":
2455              case "timeout":
2456                var optionValue = advancedOptions[option];
2457                optionValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(optionValue);
2458                settings.opts[option] = optionValue;
2459                break;
2460
2461              // If width is set we need to disable resizing.
2462              case "width":
2463                var optionValue = advancedOptions["width"];
2464                optionValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(optionValue);
2465                settings.opts["width"] = optionValue;
2466                settings.opts["containerResize"] = 0;
2467                break;
2468
2469              // If height is set we need to set fixed_height to true.
2470              case "height":
2471                var optionValue = advancedOptions["height"];
2472                optionValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(optionValue);
2473                settings.opts["height"] = optionValue;
2474                settings.fixed_height = 1;
2475                break;
2476
2477              // These process options that look like {top:50, bottom:20}
2478              case "animIn":
2479              case "animInDelay":
2480              case "animOut":
2481              case "animOutDelay":
2482              case "cssBefore":
2483              case "cssAfter":
2484              case "shuffle":
2485                var cssValue = advancedOptions[option];
2486                cssValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(cssValue);
2487                settings.opts[option] = eval('(' + cssValue + ')');
2488                break;
2489
2490              // These options have their own functions.
2491              case "after":
2492                var afterValue = advancedOptions[option];
2493                afterValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(afterValue);
2494                // transition callback (scope set to element that was shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
2495                settings.opts[option] = function(currSlideElement, nextSlideElement, options, forwardFlag) {
2496                  pager_after_fn(currSlideElement, nextSlideElement, options);
2497                  eval(afterValue);
2498                }
2499                break;
2500
2501              case "before":
2502                var beforeValue = advancedOptions[option];
2503                beforeValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(beforeValue);
2504                // transition callback (scope set to element to be shown):     function(currSlideElement, nextSlideElement, options, forwardFlag)
2505                settings.opts[option] = function(currSlideElement, nextSlideElement, options, forwardFlag) {
2506                  pager_before_fn(currSlideElement, nextSlideElement, options);
2507                  eval(beforeValue);
2508                }
2509                break;
2510
2511              case "end":
2512                var endValue = advancedOptions[option];
2513                endValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(endValue);
2514                // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options)
2515                settings.opts[option] = function(options) {
2516                  eval(endValue);
2517                }
2518                break;
2519
2520              case "fxFn":
2521                var fxFnValue = advancedOptions[option];
2522                fxFnValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(fxFnValue);
2523                // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag)
2524                settings.opts[option] = function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag) {
2525                  eval(fxFnValue);
2526                }
2527                break;
2528
2529              case "onPagerEvent":
2530                var onPagerEventValue = advancedOptions[option];
2531                onPagerEventValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(onPagerEventValue);
2532                settings.opts[option] = function(zeroBasedSlideIndex, slideElement) {
2533                  eval(onPagerEventValue);
2534                }
2535                break;
2536
2537              case "onPrevNextEvent":
2538                var onPrevNextEventValue = advancedOptions[option];
2539                onPrevNextEventValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(onPrevNextEventValue);
2540                settings.opts[option] = function(isNext, zeroBasedSlideIndex, slideElement) {
2541                  eval(onPrevNextEventValue);
2542                }
2543                break;
2544
2545              case "pagerAnchorBuilder":
2546                var pagerAnchorBuilderValue = advancedOptions[option];
2547                pagerAnchorBuilderValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(pagerAnchorBuilderValue);
2548                // callback fn for building anchor links:  function(index, DOMelement)
2549                settings.opts[option] = function(index, DOMelement) {
2550                  var returnVal = '';
2551                  eval(pagerAnchorBuilderValue);
2552                  return returnVal;
2553                }
2554                break;
2555
2556              case "pagerClick":
2557                var pagerClickValue = advancedOptions[option];
2558                pagerClickValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(pagerClickValue);
2559                // callback fn for pager clicks:    function(zeroBasedSlideIndex, slideElement)
2560                settings.opts[option] = function(zeroBasedSlideIndex, slideElement) {
2561                  eval(pagerClickValue);
2562                }
2563                break;
2564
2565              case "paused":
2566                var pausedValue = advancedOptions[option];
2567                pausedValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(pausedValue);
2568                // undocumented callback when slideshow is paused:    function(cont, opts, byHover)
2569                settings.opts[option] = function(cont, opts, byHover) {
2570                  eval(pausedValue);
2571                }
2572                break;
2573
2574              case "resumed":
2575                var resumedValue = advancedOptions[option];
2576                resumedValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(resumedValue);
2577                // undocumented callback when slideshow is resumed:    function(cont, opts, byHover)
2578                settings.opts[option] = function(cont, opts, byHover) {
2579                  eval(resumedValue);
2580                }
2581                break;
2582
2583              case "timeoutFn":
2584                var timeoutFnValue = advancedOptions[option];
2585                timeoutFnValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(timeoutFnValue);
2586                settings.opts[option] = function(currSlideElement, nextSlideElement, options, forwardFlag) {
2587                  // Set a sane return value unless function overrides it.
2588                  var returnVal = settings.timeout;
2589                  eval(timeoutFnValue);
2590                  return returnVal;
2591                }
2592                break;
2593
2594              case "updateActivePagerLink":
2595                var updateActivePagerLinkValue = advancedOptions[option];
2596                updateActivePagerLinkValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(updateActivePagerLinkValue);
2597                // callback fn invoked to update the active pager link (adds/removes activePagerClass style)
2598                settings.opts[option] = function(pager, currSlideIndex) {
2599                  eval(updateActivePagerLinkValue);
2600                }
2601                break;
2602            }
2603          }
2604        }
2605
2606        // If selected wait for the images to be loaded.
2607        // otherwise just load the slideshow.
2608        if (settings.wait_for_image_load) {
2609          // For IE/Chrome/Opera we if there are images then we need to make
2610          // sure the images are loaded before starting the slideshow.
2611          settings.totalImages = $(settings.targetId + ' img').length;
2612          if (settings.totalImages) {
2613            settings.loadedImages = 0;
2614
2615            // Add a load event for each image.
2616            $(settings.targetId + ' img').each(function() {
2617              var $imageElement = $(this);
2618              $imageElement.bind('load', function () {
2619                Drupal.viewsSlideshowCycle.imageWait(fullId);
2620              });
2621
2622              // Removing the source and adding it again will fire the load event.
2623              var imgSrc = $imageElement.attr('src');
2624              $imageElement.attr('src', '');
2625              $imageElement.attr('src', imgSrc);
2626            });
2627
2628            // We need to set a timeout so that the slideshow doesn't wait
2629            // indefinitely for all images to load.
2630            setTimeout("Drupal.viewsSlideshowCycle.load('" + fullId + "')", settings.wait_for_image_load_timeout);
2631          }
2632          else {
2633            Drupal.viewsSlideshowCycle.load(fullId);
2634          }
2635        }
2636        else {
2637          Drupal.viewsSlideshowCycle.load(fullId);
2638        }
2639      });
2640    }
2641  };
2642
2643  /**
2644   * Views Slideshow swipe support.
2645   */
2646  Drupal.behaviors.viewsSlideshowSwipe = {
2647    attach: function (context) {
2648      var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0));
2649      if (isTouch === true && $('.views-slideshow-cycle-main-frame').length) {
2650        var $slider = $('.views-slideshow-cycle-main-frame'),
2651          opts = {
2652            start: {x: 0, y: 0},
2653            end: {x: 0, y: 0},
2654            hdiff: 0,
2655            vdiff: 0,
2656            length: 0,
2657            angle: null,
2658            direction: null,
2659          },
2660          optsReset = $.extend(true, {}, opts),
2661         H_THRESHOLD =  110, // roughly one inch effective resolution on ipad
2662         V_THRESHOLD = 50;
2663        $slider.data('bw', opts)
2664        .bind('touchstart.cycle', function (e) {
2665          var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
2666          if (e.originalEvent.touches.length == 1) {
2667            var data = $(this).data('bw');
2668            data.start.x = touch.pageX;
2669            data.start.y = touch.pageY;
2670            $(this).data('bw', data);
2671          }
2672        })
2673        .bind('touchend.cycle', function (e) {
2674          var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
2675          var data = $(this).data('bw');
2676          data.end.x = touch.pageX;
2677          data.end.y = touch.pageY;
2678          $(this).data('bw', data);
2679          if (data.start.x != 0 && data.start.y != 0) {
2680            data.vdiff = data.start.x - data.end.x;
2681            data.hdiff = data.end.y - data.start.y;
2682            if (Math.abs(data.vdiff) == data.start.x && Math.abs(data.hdiff) == data.start.y) {
2683              data.vdiff = 0;
2684              data.hdiff = 0;
2685            }
2686            var length = Math.round(Math.sqrt(Math.pow(data.vdiff,2) + Math.pow(data.hdiff,2)));
2687            var rads = Math.atan2(data.hdiff, data.vdiff);
2688            var angle = Math.round(rads*180/Math.PI);
2689            if (angle < 0) { angle = 360 - Math.abs(angle); }
2690            if (length > H_THRESHOLD && V_THRESHOLD > data.hdiff) {
2691              e.preventDefault();
2692              if (angle > 135 && angle < 225) {
2693                var cyopt = $slider.data('cycle.opts');
2694                if (cyopt.currSlide > 0) {
2695                  $slider.cycle((cyopt.currSlide - 1), 'scrollRight');
2696                }
2697                else {
2698                   $slider.cycle((cyopt.slideCount - 1), 'scrollRight');
2699                }
2700              }
2701              else if (angle > 315 || angle < 45) {
2702                $slider.cycle('next');
2703              }
2704            }
2705          }
2706          data = $.extend(true, {}, optsReset);
2707        });
2708      }
2709    }
2710  };
2711
2712  Drupal.viewsSlideshowCycle = Drupal.viewsSlideshowCycle || {};
2713
2714  // Cleanup the values of advanced options.
2715  Drupal.viewsSlideshowCycle.advancedOptionCleanup = function(value) {
2716    value = $.trim(value);
2717    value = value.replace(/\n/g, '');
2718    if (value.match(/^[\d.]+%$/)) {
2719      // noop
2720    }
2721    else if (!isNaN(parseInt(value))) {
2722      value = parseInt(value);
2723    }
2724    else if (value.toLowerCase() == 'true') {
2725      value = true;
2726    }
2727    else if (value.toLowerCase() == 'false') {
2728      value = false;
2729    }
2730
2731    return value;
2732  }
2733
2734  // This checks to see if all the images have been loaded.
2735  // If they have then it starts the slideshow.
2736  Drupal.viewsSlideshowCycle.imageWait = function(fullId) {
2737    if (++Drupal.settings.viewsSlideshowCycle[fullId].loadedImages == Drupal.settings.viewsSlideshowCycle[fullId].totalImages) {
2738      Drupal.viewsSlideshowCycle.load(fullId);
2739    }
2740  };
2741
2742  // Start the slideshow.
2743  Drupal.viewsSlideshowCycle.load = function (fullId) {
2744    var settings = Drupal.settings.viewsSlideshowCycle[fullId];
2745
2746    // Make sure the slideshow isn't already loaded.
2747    if (!settings.loaded) {
2748      $(settings.targetId).cycle(settings.opts);
2749      $(settings.targetId).parent().parent().addClass('views-slideshow-cycle-processed');
2750      settings.loaded = true;
2751
2752      // Start Paused
2753      if (settings.start_paused) {
2754        Drupal.viewsSlideshow.action({ "action": 'pause', "slideshowID": settings.slideshowId, "force": true });
2755      }
2756
2757      // Pause if hidden.
2758      if (settings.pause_when_hidden) {
2759        var checkPause = function(settings) {
2760          // If the slideshow is visible and it is paused then resume.
2761          // otherwise if the slideshow is not visible and it is not paused then
2762          // pause it.
2763          var visible = viewsSlideshowCycleIsVisible(settings.targetId, settings.pause_when_hidden_type, settings.amount_allowed_visible);
2764          if (visible) {
2765            Drupal.viewsSlideshow.action({ "action": 'play', "slideshowID": settings.slideshowId });
2766          }
2767          else {
2768            Drupal.viewsSlideshow.action({ "action": 'pause', "slideshowID": settings.slideshowId });
2769          }
2770        }
2771
2772        // Check when scrolled.
2773        $(window).scroll(function() {
2774         checkPause(settings);
2775        });
2776
2777        // Check when the window is resized.
2778        $(window).resize(function() {
2779          checkPause(settings);
2780        });
2781      }
2782    }
2783  };
2784
2785  Drupal.viewsSlideshowCycle.pause = function (options) {
2786    //Eat TypeError, cycle doesn't handle pause well if options isn't defined.
2787    try{
2788      if (options.pause_in_middle && $.fn.pause) {
2789        $('#views_slideshow_cycle_teaser_section_' + options.slideshowID).pause();
2790      }
2791      else {
2792        $('#views_slideshow_cycle_teaser_section_' + options.slideshowID).cycle('pause');
2793      }
2794    }
2795    catch(e){
2796      if(!e instanceof TypeError){
2797        throw e;
2798      }
2799    }
2800  };
2801
2802  Drupal.viewsSlideshowCycle.play = function (options) {
2803    Drupal.settings.viewsSlideshowCycle['#views_slideshow_cycle_main_' + options.slideshowID].paused = false;
2804    if (options.pause_in_middle && $.fn.resume) {
2805      $('#views_slideshow_cycle_teaser_section_' + options.slideshowID).resume();
2806    }
2807    else {
2808      $('#views_slideshow_cycle_teaser_section_' + options.slideshowID).cycle('resume');
2809    }
2810  };
2811
2812  Drupal.viewsSlideshowCycle.previousSlide = function (options) {
2813    $('#views_slideshow_cycle_teaser_section_' + options.slideshowID).cycle('prev');
2814  };
2815
2816  Drupal.viewsSlideshowCycle.nextSlide = function (options) {
2817    $('#views_slideshow_cycle_teaser_section_' + options.slideshowID).cycle('next');
2818  };
2819
2820  Drupal.viewsSlideshowCycle.goToSlide = function (options) {
2821    $('#views_slideshow_cycle_teaser_section_' + options.slideshowID).cycle(options.slideNum);
2822  };
2823
2824  // Verify that the value is a number.
2825  function IsNumeric(sText) {
2826    var ValidChars = "0123456789";
2827    var IsNumber=true;
2828    var Char;
2829
2830    for (var i=0; i < sText.length && IsNumber == true; i++) {
2831      Char = sText.charAt(i);
2832      if (ValidChars.indexOf(Char) == -1) {
2833        IsNumber = false;
2834      }
2835    }
2836    return IsNumber;
2837  }
2838
2839  /**
2840   * Cookie Handling Functions
2841   */
2842  function createCookie(name,value,days) {
2843    if (days) {
2844      var date = new Date();
2845      date.setTime(date.getTime()+(days*24*60*60*1000));
2846      var expires = "; expires="+date.toGMTString();
2847    }
2848    else {
2849      var expires = "";
2850    }
2851    document.cookie = name+"="+value+expires+"; path=/";
2852  }
2853
2854  function readCookie(name) {
2855    var nameEQ = name + "=";
2856    var ca = document.cookie.split(';');
2857    for(var i=0;i < ca.length;i++) {
2858      var c = ca[i];
2859      while (c.charAt(0)==' ') c = c.substring(1,c.length);
2860      if (c.indexOf(nameEQ) == 0) {
2861        return c.substring(nameEQ.length,c.length);
2862      }
2863    }
2864    return null;
2865  }
2866
2867  function eraseCookie(name) {
2868    createCookie(name,"",-1);
2869  }
2870
2871  /**
2872   * Checks to see if the slide is visible enough.
2873   * elem = element to check.
2874   * type = The way to calculate how much is visible.
2875   * amountVisible = amount that should be visible. Either in percent or px. If
2876   *                it's not defined then all of the slide must be visible.
2877   *
2878   * Returns true or false
2879   */
2880  function viewsSlideshowCycleIsVisible(elem, type, amountVisible) {
2881    // Get the top and bottom of the window;
2882    var docViewTop = $(window).scrollTop();
2883    var docViewBottom = docViewTop + $(window).height();
2884    var docViewLeft = $(window).scrollLeft();
2885    var docViewRight = docViewLeft + $(window).width();
2886
2887    // Get the top, bottom, and height of the slide;
2888    var elemTop = $(elem).offset().top;
2889    var elemHeight = $(elem).height();
2890    var elemBottom = elemTop + elemHeight;
2891    var elemLeft = $(elem).offset().left;
2892    var elemWidth = $(elem).width();
2893    var elemRight = elemLeft + elemWidth;
2894    var elemArea = elemHeight * elemWidth;
2895
2896    // Calculate what's hiding in the slide.
2897    var missingLeft = 0;
2898    var missingRight = 0;
2899    var missingTop = 0;
2900    var missingBottom = 0;
2901
2902    // Find out how much of the slide is missing from the left.
2903    if (elemLeft < docViewLeft) {
2904      missingLeft = docViewLeft - elemLeft;
2905    }
2906
2907    // Find out how much of the slide is missing from the right.
2908    if (elemRight > docViewRight) {
2909      missingRight = elemRight - docViewRight;
2910    }
2911
2912    // Find out how much of the slide is missing from the top.
2913    if (elemTop < docViewTop) {
2914      missingTop = docViewTop - elemTop;
2915    }
2916
2917    // Find out how much of the slide is missing from the bottom.
2918    if (elemBottom > docViewBottom) {
2919      missingBottom = elemBottom - docViewBottom;
2920    }
2921
2922    // If there is no amountVisible defined then check to see if the whole slide
2923    // is visible.
2924    if (type == 'full') {
2925      return ((elemBottom >= docViewTop) && (elemTop <= docViewBottom)
2926      && (elemBottom <= docViewBottom) &&  (elemTop >= docViewTop)
2927      && (elemLeft >= docViewLeft) && (elemRight <= docViewRight)
2928      && (elemLeft <= docViewRight) && (elemRight >= docViewLeft));
2929    }
2930    else if(type == 'vertical') {
2931      var verticalShowing = elemHeight - missingTop - missingBottom;
2932
2933      // If user specified a percentage then find out if the current shown percent
2934      // is larger than the allowed percent.
2935      // Otherwise check to see if the amount of px shown is larger than the
2936      // allotted amount.
2937      if (typeof amountVisible === 'string' && amountVisible.indexOf('%')) {
2938        return (((verticalShowing/elemHeight)*100) >= parseInt(amountVisible));
2939      }
2940      else {
2941        return (verticalShowing >= parseInt(amountVisible));
2942      }
2943    }
2944    else if(type == 'horizontal') {
2945      var horizontalShowing = elemWidth - missingLeft - missingRight;
2946
2947      // If user specified a percentage then find out if the current shown percent
2948      // is larger than the allowed percent.
2949      // Otherwise check to see if the amount of px shown is larger than the
2950      // allotted amount.
2951      if (typeof amountVisible === 'string' && amountVisible.indexOf('%')) {
2952        return (((horizontalShowing/elemWidth)*100) >= parseInt(amountVisible));
2953      }
2954      else {
2955        return (horizontalShowing >= parseInt(amountVisible));
2956      }
2957    }
2958    else if(type == 'area') {
2959      var areaShowing = (elemWidth - missingLeft - missingRight) * (elemHeight - missingTop - missingBottom);
2960
2961      // If user specified a percentage then find out if the current shown percent
2962      // is larger than the allowed percent.
2963      // Otherwise check to see if the amount of px shown is larger than the
2964      // allotted amount.
2965      if (typeof amountVisible === 'string' && amountVisible.indexOf('%')) {
2966        return (((areaShowing/elemArea)*100) >= parseInt(amountVisible));
2967      }
2968      else {
2969        return (areaShowing >= parseInt(amountVisible));
2970      }
2971    }
2972  }
2973})(jQuery);
2974;
2975(function ($) {
2976
2977/**
2978 * Toggle the visibility of a fieldset using smooth animations.
2979 */
2980Drupal.toggleFieldset = function (fieldset) {
2981  var $fieldset = $(fieldset);
2982  if ($fieldset.is('.collapsed')) {
2983    var $content = $('> .fieldset-wrapper', fieldset).hide();
2984    $fieldset
2985      .removeClass('collapsed')
2986      .trigger({ type: 'collapsed', value: false })
2987      .find('> legend span.fieldset-legend-prefix').html(Drupal.t('Hide'));
2988    $content.slideDown({
2989      duration: 'fast',
2990      easing: 'linear',
2991      complete: function () {
2992        Drupal.collapseScrollIntoView(fieldset);
2993        fieldset.animating = false;
2994      },
2995      step: function () {
2996        // Scroll the fieldset into view.
2997        Drupal.collapseScrollIntoView(fieldset);
2998      }
2999    });
3000  }
3001  else {
3002    $fieldset.trigger({ type: 'collapsed', value: true });
3003    $('> .fieldset-wrapper', fieldset).slideUp('fast', function () {
3004      $fieldset
3005        .addClass('collapsed')
3006        .find('> legend span.fieldset-legend-prefix').html(Drupal.t('Show'));
3007      fieldset.animating = false;
3008    });
3009  }
3010};
3011
3012/**
3013 * Scroll a given fieldset into view as much as possible.
3014 */
3015Drupal.collapseScrollIntoView = function (node) {
3016  var h = document.documentElement.clientHeight || document.body.clientHeight || 0;
3017  var offset = document.documentElement.scrollTop || document.body.scrollTop || 0;
3018  var posY = $(node).offset().top;
3019  var fudge = 55;
3020  if (posY + node.offsetHeight + fudge > h + offset) {
3021    if (node.offsetHeight > h) {
3022      window.scrollTo(0, posY);
3023    }
3024    else {
3025      window.scrollTo(0, posY + node.offsetHeight - h + fudge);
3026    }
3027  }
3028};
3029
3030Drupal.behaviors.collapse = {
3031  attach: function (context, settings) {
3032    $('fieldset.collapsible', context).once('collapse', function () {
3033      var $fieldset = $(this);
3034      // Expand fieldset if there are errors inside, or if it contains an
3035      // element that is targeted by the URI fragment identifier.
3036      var anchor = location.hash && location.hash != '#' ? ', ' + location.hash : '';
3037      if ($fieldset.find('.error' + anchor).length) {
3038        $fieldset.removeClass('collapsed');
3039      }
3040
3041      var summary = $('<span class="summary"></span>');
3042      $fieldset.
3043        bind('summaryUpdated', function () {
3044          var text = $.trim($fieldset.drupalGetSummary());
3045          summary.html(text ? ' (' + text + ')' : '');
3046        })
3047        .trigger('summaryUpdated');
3048
3049      // Turn the legend into a clickable link, but retain span.fieldset-legend
3050      // for CSS positioning.
3051      var $legend = $('> legend .fieldset-legend', this);
3052
3053      $('<span class="fieldset-legend-prefix element-invisible"></span>')
3054        .append($fieldset.hasClass('collapsed') ? Drupal.t('Show') : Drupal.t('Hide'))
3055        .prependTo($legend)
3056        .after(' ');
3057
3058      // .wrapInner() does not retain bound events.
3059      var $link = $('<a class="fieldset-title" href="#"></a>')
3060        .prepend($legend.contents())
3061        .appendTo($legend)
3062        .click(function () {
3063          var fieldset = $fieldset.get(0);
3064          // Don't animate multiple times.
3065          if (!fieldset.animating) {
3066            fieldset.animating = true;
3067            Drupal.toggleFieldset(fieldset);
3068          }
3069          return false;
3070        });
3071
3072      $legend.append(summary);
3073    });
3074  }
3075};
3076
3077})(jQuery);
3078;

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.