PageSourceSearch

https://www.tw-ren.com/sites/default/files/js/js_YJcXZgUdu7qivecaJLiu961wydIEHHhXbfI0BZNHjTw.js

js tw-ren.com collected 2026-10-06 07:31:01 UTC 50,278 bytes, 908 lines download raw bytes

1Drupal.locale = { 'pluralFormula': function ($n) { return Number(($n>1)); }, 'strings': {"":{"Edit":"\u7de8\u8f2f","Upload":"\u4e0a\u8f09","Close":"\u95dc\u9589","Log messages":"\u65e5\u8a8c\u8a0a\u606f","Please select a file.":"\u65b0\u9078\u64c7\u4e00\u500b\u6a94\u6848","Only files with the following extensions are allowed: %files-allowed.":"\u50c5\u5141\u8a31\u4e0b\u5217\u526f\u6a94\u540d\uff1a%files-allowed\u3002","You are not allowed to operate on more than %num files.":"\u4f60\u4e0d\u88ab\u5141\u8a31\u64cd\u4f5c\u8d85\u904e %num \u500b\u6a94\u6848\u3002","Please specify dimensions within the allowed range that is from 1x1 to @dimensions.":"\u8acb\u6307\u5b9a\u5c3a\u5bf8\u5728\u88ab\u5141\u8a31\u7684\u7bc4\u570d\uff0c\u5f9e 1x1 \u5230 @dimensions \u3002","%filename is not an image.":"%filename \u4e0d\u662f\u4e00\u500b\u5716\u6a94\u3002","Do you want to refresh the current directory?":"\u4f60\u60f3\u8981\u91cd\u65b0\u6574\u7406\u76ee\u524d\u7684\u76ee\u9304\uff1f","Delete selected files?":"\u522a\u9664\u9078\u5b9a\u7684\u6a94\u6848\uff1f","Please select a thumbnail.":"\u8acb\u9078\u64c7\u4e00\u500b\u7e2e\u5716\u3002","You must select at least %num files.":"\u4f60\u5fc5\u9808\u9078\u64c7\u81f3\u5c11 %num \u500b\u6a94\u6848\u3002","You can not perform this operation.":"\u4f60\u4e0d\u80fd\u57f7\u884c\u9019\u9805\u64cd\u4f5c\u3002","Insert file":"\u63d2\u5165\u6a94\u6848","Change view":"\u8b8a\u66f4\u6aa2\u8996","Disabled":"\u505c\u7528","Enabled":"\u555f\u7528","Search":"\u641c\u5c0b","None":"\u7121","Add":"\u65b0\u589e","Configure":"\u8a2d\u7f6e","OK":"\u78ba\u5b9a","This field is required.":"\u6b64\u6b04\u4f4d\u662f\u5fc5\u9700\u7684\u3002","Show":"\u986f\u793a","Select all rows in this table":"\u9078\u53d6\u8868\u683c\u4e2d\u7684\u6240\u6709\u5217","Deselect all rows in this table":"\u53d6\u6d88\u9078\u53d6\u8868\u683c\u4e2d\u7684\u6240\u6709\u5217","Not published":"\u672a\u767c\u8868","Please wait...":"\u8acb\u7a0d\u7b49...","Hide":"\u96b1\u85cf","By @name on @date":"\u7531 @name \u65bc @date \u767c\u8868","By @name":"\u4f9d\u540d\u7a31","Not in menu":"\u4e0d\u5b58\u5728\u9078\u55ae\u4e2d","Alias: @alias":"\u5225\u540d\uff1a@alias","No alias":"\u6c92\u6709\u8def\u5f91\u5225\u540d","New revision":"\u5efa\u7acb\u4fee\u8a02\u7248\u672c","Drag to re-order":"\u6293\u53d6\u9805\u76ee\u9032\u884c\u91cd\u65b0\u6392\u5217","Changes made in this table will not be saved until the form is submitted.":"\u5728\u9001\u51fa\u9019\u500b\u8868\u55ae\u4e4b\u524d\uff0c\u9019\u500b\u8868\u683c\u4e2d\u7684\u8b8a\u66f4\u4e0d\u6703\u88ab\u5132\u5b58\u3002","The changes to these blocks will not be saved until the \u003Cem\u003ESave blocks\u003C\/em\u003E button is clicked.":"\u9019\u4e9b\u5340\u584a\u7684\u8b8a\u66f4\u4e0d\u6703\u88ab\u5132\u5b58\u8d77\u4f86\uff0c\u9664\u975e\u60a8\u6309\u4e0b\u003Cem\u003E\u5132\u5b58\u5340\u584a\u003C\/em\u003E \u7684\u6309\u9215\u3002","This permission is inherited from the authenticated user role.":"\u6b64\u6b0a\u9650\u7e7c\u627f\u81ea\u8a3b\u518a\u4f7f\u7528\u8005\u89d2\u8272\u3002","No revision":"\u6c92\u6709\u4fee\u8a02\u7248\u672c","Requires a title":"\u9700\u8981\u586b\u5beb\u6a19\u984c","Not restricted":"\u672a\u53d7\u9650\u5236","(active tab)":"(\u4f5c\u7528\u4e2d\u9801\u7c64)","An AJAX HTTP error occurred.":"\u767c\u751f\u4e00\u500b AJAX HTTP \u932f\u8aa4\u3002","HTTP Result Code: !status":"HTTP \u7d50\u679c\u78bc\uff1a!status","An AJAX HTTP request terminated abnormally.":"\u6709\u500b\u4e0d\u6b63\u5e38\u7d50\u675f\u7684 AJAX HTTP \u8cc7\u6e90\u8acb\u6c42","Debugging information follows.":"\u9644\u4e0a\u5075\u932f\u8cc7\u8a0a\u3002","Path: !uri":"\u8def\u5f91\uff1a!uri","StatusText: !statusText":"\u72c0\u614b\u6587\u5b57\uff1a!statusText","ResponseText: !responseText":"\u56de\u61c9\u6587\u5b57\uff1a!responseText","ReadyState: !readyState":"ReadyState: !readyState","Not customizable":"\u7121\u6cd5\u81ea\u8a02","Restricted to certain pages":"\u53d7\u9650\u65bc\u7279\u5b9a\u9801\u9762","The block cannot be placed in this region.":"\u7121\u6cd5\u628a\u5340\u584a\u653e\u5230\u9019\u500b\u5340\u57df\u3002","Hide summary":"\u96b1\u85cf\u6458\u8981","Edit summary":"\u7de8\u8f2f\u6458\u8981","Don\u0027t display post information":"\u4e0
vendor: 9,881 bytes, lines 1-7
1d\u8981\u986f\u793a\u6587\u7ae0\u7684\u5f35\u8cbc\u8cc7\u8a0a","The selected file %filename cannot be uploaded. Only files with the following extensions are allowed: %extensions.":"\u9078\u64c7\u7684\u6a94\u6848%filename\u7121\u6cd5\u4e0a\u8f09\u3002\u53ea\u6709\u4ee5\u4e0b\u985e\u578b\u7684\u6a94\u6848\u88ab\u5141\u8a31\uff1a%extensions\u3002","Re-order rows by numerical weight instead of dragging.":"\u900f\u904e\u6578\u5b57\u6b0a\u91cd\u65b9\u5f0f\u4f86\u9032\u884c\u91cd\u65b0\u6392\u5e8f\u3002","Show row weights":"\u986f\u793a\u5217\u6b04\u6b0a\u91cd","Hide row weights":"\u96b1\u85cf\u5217\u6b04\u6b0a\u91cd","Autocomplete popup":"\u81ea\u52d5\u5b8c\u6210\u5feb\u986f","Searching for matches...":"\u6b63\u5728\u67e5\u627e\u5339\u914d\u9805...","Other":"\u5176\u4ed6"}} };;
2/*!
3	Colorbox 1.6.4
4	license: MIT
5	http://www.jacklmoore.com/colorbox
6*/
7(function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-cbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(A+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in x[0]&&!x[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),x.focus())}function c(t){c.str!==t&&(x.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){A=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+te).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),A=W.index(_.el),-1===A&&(W=W.add(_.el),A=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),ae.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!U){U=$=!0,c(_.get("className")),x.css({visibility:"hidden",display:"block",opacity:""}),I=n(se,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(I),j=T.height()+k.height()+b.outerHeight(!0)-b.height(),D=C.width()+H.width()+b.outerWidth(!0)-b.width(),N=I.outerHeight(!0),z=I.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=Math.max((l!==!1?Math.min(h,a(l,"x")):h)-z-D,0),_.h=Math.max((f!==!1?Math.min(s,a(f,"y")):s)-N-j,0),I.css({width:"",height:_.h}),J.position(),u(ee),_.get("onOpen"),O.add(F).hide(),x.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),ae.one(re,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&ae.one(re,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?B.html(_.get("close")).appendTo(b):B.appendTo("<div/>"),w()}}function p(){x||(V=!1,E=t(i),x=n(se).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(se,"Overlay").hide(),L=t([n(se,"LoadingOverlay")[0],n(se,"LoadingGraphic")[0]]),y=n(se,"Wrapper"),b=n(se,"Content").append(F=n(se,"Title"),R=n(se,"Current"),P=t('<button type="button"/>').attr({id:Z+"Previous"}),K=t('<button type="button"/>').attr({id:Z+"Next"}),S=t('<button type="button"/>').attr({id:Z+"Slideshow"}),L),B=t('<button type="button"/>').attr({id:Z+"Close"}),y.append(n(se).append(n(se,"TopLeft"),T=n(se,"TopCenter"),n(se,"TopRight")),n(se,!1,"clear:left").append(C=n(se,"MiddleLeft"),b,H=n(se,"MiddleRight")),n(se,!1,"clear:left").append(n(se,"BottomLeft"),k=n(se,"BottomCenter"),n(se,"BottomRight"))).find("div div").css({"float":"left"}),M=n(se,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),O=K.add(P).add(R).add(S)),e.body&&!x.parent().length&&t(e.body).append(v,x.append(y,M))}function m(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),f(this))}return x?(V||(V=!0,K.click(function(){J.next()}),P.click(function(){J.prev()}),B.click(function(){J.close()}),v.click(function(){_.get("overlayClose")&&J.close()}),t(e).bind("keydown."+Z,function(t){var e=t.keyCode;U&&_.get("escKey")&&27===e&&(t.preventDefault(),J.close()),U&&_.get("arrowKey")&&W[1]&&!t.altKey&&(37===e?(t.preventDefault(),P.click()):39===e&&(t.preventDefault(),K.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+Z,"."+te,i):t("."+te).live("click."+Z,i)),!0):!1}function w(){var e,o,r,h=J.prep,d=++le;if($=!0,q=!1,u(he),u(ie),_.get("onLoad"),_.h=_.get("height")?a(_.get("height"),"y")-N-j:_.get("innerHeight")&&a(_.get("innerHeight"),"y"),_.w=_.get("width")?a(_.get("width"),"x")-z-D:_.get("innerWidth")&&a(_.get("innerWidth"),"x"),_.mw=_.w,_.mh=_.h,_.get("maxWidth")&&(_.mw=a(_.get("maxWidth"),"x")-z-D,_.mw=_.w&&_.w<_.mw?_.w:_.mw),_.get("maxHeight")&&(_.mh=a(_.get("maxHeight"),"y")-N-j,_.mh=_.h&&_.h<_.mh?_.h:_.mh),e=_.get("href"),Q=setTimeout(function(){L.show()},100),_.get("inline")){var c=t(e).eq(0);r=t("<div>").hide().insertBefore(c),ae.one(he,function(){r.replaceWith(c)}),h(c)}else _.get("iframe")?h(" "):_.get("html")?h(_.get("html")):s(_,e)?(e=l(_,e),q=_.get("createImg"),t(q).addClass(Z+"Photo").bind("error."+Z,function(){h(n(se,"Error").html(_.get("imgError")))}).one("load",function(){d===le&&setTimeout(function(){var e;_.get("retinaImage")&&i.devicePixelRatio>1&&(q.height=q.height/i.devicePixelRatio,q.width=q.width/i.devicePixelRatio),_.get("scalePhotos")&&(o=function(){q.height-=q.height*e,q.width-=q.width*e},_.mw&&q.width>_.mw&&(e=(q.width-_.mw)/q.width,o()),_.mh&&q.height>_.mh&&(e=(q.height-_.mh)/q.height,o())),_.h&&(q.style.marginTop=Math.max(_.mh-q.height,0)/2+"px"),W[1]&&(_.get("loop")||W[A+1])&&(q.style.cursor="pointer",t(q).bind("click."+Z,function(){J.next()})),q.style.width=q.width+"px",q.style.height=q.height+"px",h(q)},1)}),q.src=e):e&&M.load(e,_.get("data"),function(e,i){d===le&&h("error"===i?n(se,"Error").html(_.get("xhrError")):t(this).contents())})}var v,x,y,b,T,C,H,k,W,E,I,M,L,F,R,S,K,P,B,O,_,j,D,N,z,A,q,U,$,G,Q,J,V,X={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:'<i class="fa fa-angle-left" aria-hidden="true"></i>',next:'<i class="fa fa-angle-right" aria-hidden="true"></i>',close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),n=t(this).data("cbox-iframe-attrs");return"object"==typeof n&&t.each(n,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},Y="colorbox",Z="cbox",te=Z+"Element",ee=Z+"_open",ie=Z+"_load",ne=Z+"_complete",oe=Z+"_cleanup",re=Z+"_closed",he=Z+"_purge",ae=t("<a/>"),se="div",le=0,de={},ce=function(){function t(){clearTimeout(h)}function e(){(_.get("loop")||W[A+1])&&(t(),h=setTimeout(J.next,_.get("slideshowSpeed")))}function i(){S.html(_.get("slideshowStop")).unbind(s).one(s,n),ae.bind(ne,e).bind(ie,t),x.removeClass(a+"off").addClass(a+"on")}function n(){t(),ae.unbind(ne,e).unbind(ie,t),S.html(_.get("slideshowStart")).unbind(s).one(s,function(){J.next(),i()}),x.removeClass(a+"on").addClass(a+"off")}function o(){r=!1,S.hide(),t(),ae.unbind(ne,e).unbind(ie,t),x.removeClass(a+"off "+a+"on")}var r,h,a=Z+"Slideshow_",s="click."+Z;return function(){r?_.get("slideshow")||(ae.unbind(oe,o),o()):_.get("slideshow")&&W[1]&&(r=!0,ae.one(oe,o),_.get("slideshowAuto")?i():n(),S.show())}}();t[Y]||(t(p),J=t.fn[Y]=t[Y]=function(e,i){var n,o=this;return e=e||{},t.isFunction(o)&&(o=t("<a/>"),e.open=!0),o[0]?(p(),m()&&(i&&(e.onComplete=i),o.each(function(){var i=t.data(this,Y)||{};t.data(this,Y,t.extend(i,e))}).addClass(te),n=new r(o[0],e),n.get("open")&&f(o[0])),o):o},J.position=function(e,i){function n(){T[0].style.width=k[0].style.width=b[0].style.width=parseInt(x[0].style.width,10)-D+"px",b[0].style.height=C[0].style.height=H[0].style.height=parseInt(x[0].style.height,10)-j+"px"}var r,h,s,l=0,d=0,c=x.offset();if(E.unbind("resize."+Z),x.css({top:-9e4,left:-9e4}),h=E.scrollTop(),s=E.scrollLeft(),_.get("fixed")?(c.top-=h,c.left-=s,x.css({position:"fixed"})):(l=h,d=s,x.css({position:"absolute"})),d+=_.get("right")!==!1?Math.max(E.width()-_.w-z-D-a(_.get("right"),"x"),0):_.get("left")!==!1?a(_.get("left"),"x"):Math.round(Math.max(E.width()-_.w-z-D,0)/2),l+=_.get("bottom")!==!1?Math.max(o()-_.h-N-j-a(_.get("bottom"),"y"),0):_.get("top")!==!1?a(_.get("top"),"y"):Math.round(Math.max(o()-_.h-N-j,0)/2),x.css({top:c.top,left
7:c.left,visibility:"visible"}),y[0].style.width=y[0].style.height="9999px",r={width:_.w+z+D,height:_.h+N+j,top:l,left:d},e){var g=0;t.each(r,function(t){return r[t]!==de[t]?(g=e,void 0):void 0}),e=g}de=r,e||x.css(r),x.dequeue().animate(r,{duration:e||0,complete:function(){n(),$=!1,y[0].style.width=_.w+z+D+"px",y[0].style.height=_.h+N+j+"px",_.get("reposition")&&setTimeout(function(){E.bind("resize."+Z,J.position)},1),t.isFunction(i)&&i()},step:n})},J.resize=function(t){var e;U&&(t=t||{},t.width&&(_.w=a(t.width,"x")-z-D),t.innerWidth&&(_.w=a(t.innerWidth,"x")),I.css({width:_.w}),t.height&&(_.h=a(t.height,"y")-N-j),t.innerHeight&&(_.h=a(t.innerHeight,"y")),t.innerHeight||t.height||(e=I.scrollTop(),I.css({height:"auto"}),_.h=I.height()),I.css({height:_.h}),e&&I.scrollTop(e),J.position("none"===_.get("transition")?0:_.get("speed")))},J.prep=function(i){function o(){return _.w=_.w||I.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w}function a(){return _.h=_.h||I.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h}if(U){var d,g="none"===_.get("transition")?0:_.get("speed");I.remove(),I=n(se,"LoadedContent").append(i),I.hide().appendTo(M.show()).css({width:o(),overflow:_.get("scrolling")?"auto":"hidden"}).css({height:a()}).prependTo(b),M.hide(),t(q).css({"float":"none"}),c(_.get("className")),d=function(){function i(){t.support.opacity===!1&&x[0].style.removeAttribute("filter")}var n,o,a=W.length;U&&(o=function(){clearTimeout(Q),L.hide(),u(ne),_.get("onComplete")},F.html(_.get("title")).show(),I.show(),a>1?("string"==typeof _.get("current")&&R.html(_.get("current").replace("{current}",A+1).replace("{total}",a)).show(),K[_.get("loop")||a-1>A?"show":"hide"]().html(_.get("next")),P[_.get("loop")||A?"show":"hide"]().html(_.get("previous")),ce(),_.get("preloading")&&t.each([h(-1),h(1)],function(){var i,n=W[this],o=new r(n,t.data(n,Y)),h=o.get("href");h&&s(o,h)&&(h=l(o,h),i=e.createElement("img"),i.src=h)})):O.hide(),_.get("iframe")?(n=_.get("createIframe"),_.get("scrolling")||(n.scrolling="no"),t(n).attr({src:_.get("href"),"class":Z+"Iframe"}).one("load",o).appendTo(I),ae.one(he,function(){n.src="//about:blank"}),_.get("fastIframe")&&t(n).trigger("load")):o(),"fade"===_.get("transition")?x.fadeTo(g,1,i):i())},"fade"===_.get("transition")?x.fadeTo(g,0,function(){J.position(0,d)}):J.position(g,d)}},J.next=function(){!$&&W[1]&&(_.get("loop")||W[A+1])&&(A=h(1),f(W[A]))},J.prev=function(){!$&&W[1]&&(_.get("loop")||A)&&(A=h(-1),f(W[A]))},J.close=function(){U&&!G&&(G=!0,U=!1,u(oe),_.get("onCleanup"),E.unbind("."+Z),v.fadeTo(_.get("fadeOut")||0,0),x.stop().fadeTo(_.get("fadeOut")||0,0,function(){x.hide(),v.hide(),u(he),I.remove(),setTimeout(function(){G=!1,u(re),_.get("onClosed")},1)}))},J.remove=function(){x&&(x.stop(),t[Y].close(),x.stop(!1,!0).remove(),v.remove(),G=!1,x=null,t("."+te).removeData(Y).removeClass(te),t(e).unbind("click."+Z).unbind("keydown."+Z))},J.element=function(){return t(_.el)},J.settings=X)})(jQuery,document,window);;
8/**
9 * @file
10 * Colorbox module init js.
11 */
12
13(function ($) {
14
15Drupal.behaviors.initColorbox = {
16  attach: function (context, settings) {
17    if (!$.isFunction($('a, area, input', context).colorbox) || typeof settings.colorbox === 'undefined') {
18      return;
19    }
20
21    if (settings.colorbox.mobiledetect && window.matchMedia) {
22      // Disable Colorbox for small screens.
23      var mq = window.matchMedia("(max-device-width: " + settings.colorbox.mobiledevicewidth + ")");
24      if (mq.matches) {
25        return;
26      }
27    }
28
29    // Use "data-colorbox-gallery" if set otherwise use "rel".
30    settings.colorbox.rel = function () {
31      if ($(this).data('colorbox-gallery')) {
32        return $(this).data('colorbox-gallery');
33      }
34      else {
35        return $(this).attr('rel');
36      }
37    };
38
39    $('.colorbox', context)
40      .once('init-colorbox').each(function(){
41        $(this).colorbox(settings.colorbox);
42      });
43
44    $(context).bind('cbox_complete', function () {
45      Drupal.attachBehaviors('#cboxLoadedContent');
46    });
47  }
48};
49
50})(jQuery);
51;
52/**
53 * @file
54 * Colorbox module load js.
55 */
56(function ($) {
57
58Drupal.behaviors.initColorboxLoad = {
59  attach: function (context, settings) {
60    if (!$.isFunction($.colorbox) || typeof settings.colorbox === 'undefined') {
61      return;
62    }
63
64    if (settings.colorbox.mobiledetect && window.matchMedia) {
65      // Disable Colorbox for small screens.
66      var mq = window.matchMedia("(max-device-width: " + settings.colorbox.mobiledevicewidth + ")");
67      if (mq.matches) {
68        return;
69      }
70    }
71
72    $.urlParams = function (url) {
73      var p = {},
74          e,
75          a = /\+/g,  // Regex for replacing addition symbol with a space.
76          r = /([^&=]+)=?([^&]*)/g,
77          d = function (s) { return decodeURIComponent(s.replace(a, ' ')); },
78          q = url.split('?');
79      while (e = r.exec(q[1])) {
80        e[1] = d(e[1]);
81        e[2] = d(e[2]);
82        switch (e[2].toLowerCase()) {
83          case 'true':
84          case 'yes':
85            e[2] = true;
86            break;
87          case 'false':
88          case 'no':
89            e[2] = false;
90            break;
91        }
92        if (e[1] == 'width') { e[1] = 'innerWidth'; }
93        if (e[1] == 'height') { e[1] = 'innerHeight'; }
94        p[e[1]] = e[2];
95      }
96      return p;
97    };
98    $('.colorbox-load', context)
99      .once('init-colorbox-load', function () {
100        var params = $.urlParams($(this).attr('href'));
101        $(this).colorbox($.extend({}, settings.colorbox, params));
102      });
103  }
104};
105
106})(jQuery);
107;
108(function ($) {
109  Drupal.behaviors.ienomore = {
110    attach: function (context, settings) {
111      // refs http://www.sharesoft.in/jquery-browser-msie-alternative-fixed/
112      var regex = /msie (\d{1,2})/;
113      var userAgent = navigator.userAgent.toLowerCase();
114      if(userAgent.indexOf('msie') > 0 && regex.test(userAgent)){
115        var version = parseInt(regex.exec(userAgent)[1]);
116        if(version <= 8) {
117          $ienomore = document.getElementById('ienomore');
118          document.body.insertBefore($ienomore,document.body.firstChild);
119          $ienomore.style.display = "block";
120
121          $('.ienomore-img-container').each(function(){
122            var $this = $(this);
123            var src = $this.data('src');
124            var alt = $this.data('alt');
125            $(this).append($('<img src="'+src+'" alt="'+alt+'" />'));
126          })
127        }
128      }
129      
130    }
131  };
132}(jQuery));
133;
134/*
135* Based on the work of
136* Copyright (C) 2009 Joel Sutherland
137* Licenced under the MIT license
138* http://www.newmediacampaigns.com/page/jcaption-a-jquery-plugin-for-simple-image-captions
139*/
140Drupal.behaviors.jcaption = {
141  attach: function(context, settings) {
142      (function($) {
143      
144      var captionSelectors = Drupal.settings.jcaption.jcaption_selectors;
145      
146    	$.fn.jcaption = function(settings) {
147    		settings = $.extend({
148    			wrapperElement: 'span',
149    			wrapperClass: 'caption',
150    			captionElement: 'p',
151    			imageAttr: Drupal.settings.jcaption.jcaption_alt_title,
152    			requireText: Drupal.settings.jcaption.jcaption_requireText,
153    			copyStyle: Drupal.settings.jcaption.jcaption_copyStyle,
154    			removeStyle: Drupal.settings.jcaption.jcaption_removeStyle,
155    			removeClass: Drupal.settings.jcaption.jcaption_removeClass,
156    			removeAlign: Drupal.settings.jcaption.jcaption_removeAlign,
157    			copyAlignmentToClass: Drupal.settings.jcaption.jcaption_copyAlignmentToClass,
158    			copyFloatToClass: Drupal.settings.jcaption.jcaption_copyFloatToClass,
159    			copyClassToClass: Drupal.settings.jcaption.jcaption_copyClassToClass,
160    			autoWidth: Drupal.settings.jcaption.jcaption_autoWidth,
161    			keepLink: Drupal.settings.jcaption.jcaption_keepLink,
162          styleMarkup: Drupal.settings.jcaption.jcaption_styleMarkup,
163    			animate: Drupal.settings.jcaption.jcaption_animate,
164    			show: {opacity: 'show'},
165    			showDuration: Drupal.settings.jcaption.jcaption_showDuration,
166    			hide: {opacity: 'hide'},
167    			hideDuration: Drupal.settings.jcaption.jcaption_hideDuration	
168    		}, settings);
169    
170    		return $(this).each(function(){
171    			//Only add the caption after the image has been loaded.  This makes sure we can know the width of the caption.
172    			
173    			$(this).bind('load', function(){
174    				
175    				//Make sure the captioning isn't applied twice when the IE fix at the bottom is applied
176    				if($(this).data('loaded')) return false;
177    				$(this).data('loaded', true);
178    			
179    				//Shorthand for the image we will be applying the caption to
180    				if($(this).parent("a").length > 0 && !settings.keepLink) {
181    				  var image = $(this).parent("a");
182      			  var cleanimage = $(this);    				
183      			  } 
184    				else {
185      			  var image = $(this);
186      			  var cleanimage = $(this);    				
187    				}
188
189    				//Only create captions if there is content for the caption
190    				if(cleanimage.attr(settings.imageAttr) != undefined && (cleanimage.attr(settings.imageAttr).length >
190 0 || !settings.requireText)){
191    					
192    					//Wrap the image with the caption span
193    					image.wrap("<" + settings.wrapperElement + " class='" + settings.wrapperClass + "'></" + settings.wrapperElement + ">");
194    					
195    					//Save Image Float
196    					var imageFloat = cleanimage.css('float')
197    					
198    					//Save Image Class
199    					var imageClass = cleanimage.attr('class');
200    					if(settings.removeClass) cleanimage.removeAttr('class');
201
202    					//Save Image Style
203    					var imageStyle = cleanimage.attr('style');
204    					if(settings.removeStyle) cleanimage.removeAttr('style');
205    					
206    					//Save Image Align
207    					var imageAlign = cleanimage.attr('align');
208    					if(settings.removeAlign) cleanimage.removeAttr('align');
209    					
210    					//Put Caption in the Wrapper span
211    					var span = image.parent().append('<' + settings.captionElement + '>' + cleanimage.attr(settings.imageAttr) + '</' + settings.captionElement + '>');
212    					
213              //Add css if there is style markup for the paragraph in the settings
214              //if(settings.styleMarkup) 
215              
216              if(settings.styleMarkup) {
217                $('.caption p').attr('style', function() {
218                  return settings.styleMarkup; 
219                });
220              }
221              
222    					if(settings.animate){
223    						$(this).next().hide();
224    						$(this).parent().hover(
225    						function(){
226    							$(this).find('p').animate(settings.show, settings.showDuration);
227    						},
228    						function(){
229    							$(this).find('p').animate(settings.hide, settings.hideDuration);
230    						});
231    					}
232    					
233    					//Copy Image Style to span
234    					if(settings.copyStyle) span.attr('style',imageStyle);
235    					
236    					//If there is an alignment on the image (for example align="left") add "left" as a class on the caption.  This helps deal with older Text Editors like TinyMCE
237    					if(settings.copyAlignmentToClass) span.addClass(imageAlign);
238    					
239    					//Transfers the float style from the image to the caption container
240    					if(settings.copyFloatToClass) span.addClass(imageFloat);
241    					
242     					//Transfers the class from the image to the caption container
243    					if(settings.copyClassToClass) span.addClass(imageClass);
244    					
245    					//Properly size the caption span based on the loaded image's size
246    					if(settings.autoWidth) span.width(image.width());
247    				}
248    			});
249    			
250    			// Thanks to Captify for this bit!
251    			//if the image has already loaded (due to being cached), force the load function to be called
252    			if (this.complete || this.naturalWidth > 0){
253    				$(this).trigger('load');
254    			}
255    		});
256    	}
257    	
258    	$(captionSelectors.join(",")).each(function(index, elem){
259    	  $(elem).jcaption();
260    	});
261    
262    })(jQuery);
263  }
264};
265
266(function ($) {
267  $(document).ready(function(){
268
269  });
270})(jQuery);;
271(function ($) {
272
273  Drupal.behaviors.captcha = {
274    attach: function (context) {
275
276      // Turn off autocompletion for the CAPTCHA response field.
277      // We do it here with JavaScript (instead of directly in the markup)
278      // because this autocomplete attribute is not standard and
279      // it would break (X)HTML compliance.
280      $("#edit-captcha-response").attr("autocomplete", "off");
281
282    }
283  };
284
285  Drupal.behaviors.captchaAdmin = {
286    attach: function (context) {
287      // Add onclick handler to checkbox for adding a CAPTCHA description
288      // so that the textfields for the CAPTCHA description are hidden
289      // when no description should be added.
290      // @todo: div.form-item-captcha-description depends on theming, maybe
291      // it's better to add our own wrapper with id (instead of a class).
292      $("#edit-captcha-add-captcha-description").click(function() {
293        if ($("#edit-captcha-add-captcha-description").is(":checked")) {
294          // Show the CAPTCHA description textfield(s).
295          $("div.form-item-captcha-description").show('slow');
296        }
297        else {
298          // Hide the CAPTCHA description textfield(s).
299          $("div.form-item-captcha-description").hide('slow');
300        }
301      });
302      // Hide the CAPTCHA description textfields if option is disabled on page load.
303      if (!$("#edit-captcha-add-captcha-description").is(":checked")) {
304        $("div.form-item-captcha-description").hide();
305      }
306    }
307
308  };
309
310})(jQuery);
311;
312jQuery(document).ready(function($){
313	$('.superhero-dropdown').find('li.expanded').each(function(){
314		var $submenu = $(this).find('>ul');
315		//var $arrow = $('<i class="icon-angle-right menu-arrow"></i>');
316		var $arrow = $('<i class="fa fa-angle-down menu-arrow"></i>');
317		$(this).find('span').click(function(){
318			$arrow.toggleClass('fa-angle-right fa-angle-down');
319			$submenu.toggleClass('open');
320			$(this).parent().toggleClass('open');
321			return false;
322		})
323		$submenu.before($arrow);
324	});
325	$('.superhero-mobile-menu-toggle').click(function(){
326		$('.superhero-dropdown').toggleClass('open');
327		$(this).toggleClass('open');
328	})
329});
330(function ($, Drupal, window, document, undefined) {
331    'use strict';
332    Drupal.behaviors.loginHistoryFingerprintJs = {
333        attach: function (context, settings) {
334          // in 2021, user privacy is important
335          // we use smallest identifier only for security detection reason
336
337          // this from fingerprint2.js
338          var getCanvasFingerprint = function() {
339            var result = [];
340            var canvas = document.createElement("canvas");
341            // Very simple now, need to make it more complex (geo shapes etc)
342            canvas.width = 1000;
343            canvas.height = 150;
344            canvas.style.display = "inline";
345            var ctx = canvas.getContext("2d");
346
347            // detect browser support of canvas winding
348            // http://blogs.adobe.com/webplatform/2013/01/30/winding-rules-in-canvas/
349            // https://github.com/Modernizr/Modernizr/blob/master/feature-detects/canvas/winding.js
350            ctx.rect(0, 0, 10, 10);
351            ctx.rect(2, 2, 6, 6);
352            result.push("canvas winding:" + ((ctx.isPointInPath(5, 5, "evenodd") === false) ? "yes" : "no"));
353
354            ctx.textBaseline = "alphabetic";
355            ctx.fillStyle = "#f60";
356            ctx.fillRect(125, 1, 62, 20);
357            ctx.fillStyle = "#069";
358
359            // ver 1~11(cat),12(Otter),13(black cat),14(heart hand)
360            var emojilist = String.fromCodePoint(0x1F639, 0x1F9A6, 0x1F408, 0x1FAF6);
361            // 讚한あ
362            var cjklist = String.fromCodePoint('35738', '54620', '12354');
363            // ½¾⋙≢"
364            var mathlist = String.fromCharCode(189, 190, 0x22D9, 0x2262);
365            // special characters
366            var speciallist = String.fromCharCode(1709, 1046, 55358);
367
368            ctx.fillText("glyphs test: "+emojilist+cjklist+mathlist+speciallist, 2, 15);
369            ctx.fillStyle = "rgba(102, 204, 0, 0.2)";
370            ctx.font = "18pt 'no-real-font-123'";
371            ctx.fillText("glyphs test: "+emojilist+cjklist+mathlist+speciallist, 4, 45);
372
373            // canvas blending
374            // http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas/
375            // http://jsfiddle.net/NDYV8/16/
376            ctx.globalCompositeOperation = "multiply";
377            ctx.fillStyle = "rgb(255,0,255)";
378            ctx.beginPath();
379            ctx.arc(50, 50, 50, 0, Math.PI * 2, true);
380            ctx.closePath();
381            ctx.fill();
382            ctx.fillStyle = "rgb(0,255,255)";
383            ctx.beginPath();
384            ctx.arc(100, 50, 50, 0, Math.PI * 2, true);
385            ctx.closePath();
386            ctx.fill();
387            ctx.fillStyle = "rgb(255,255,0)";
388            ctx.beginPath();
389            ctx.arc(75, 100, 50, 0, Math.PI * 2, true);
390            ctx.closePath();
391            ctx.fill();
392            ctx.fillStyle = "rgb(255,0,255)";
393
394            // canvas winding
395            // http://blogs.adobe.com/webplatform/2013/01/30/winding-rules-in-canvas/
396            // http://jsfiddle.net/NDYV8/19/
397            ctx.arc(75, 75, 75, 0, Math.PI * 2, true);
398            ctx.arc(75, 75, 25, 0, Math.PI * 2, true);
399            ctx.fill("evenodd");
400
401            var string = canvas.toDataURL();
402            /* debug using image here
403            var i = document.createElement('img');
404            i.src = string;
405            document.body.appendChild(i);
406            */
407            result.push("canvas fp:" + string);
408            return result.join("~");
409          };
410
411          var keys = [];
412
413          // screen resolution
414          var resolution;
415          resolution = screen.availHeight+'x'+screen.availWidth;
416          if(typeof resolution !== "undefined") { // headless browsers
417            keys.push({key: "resolution", value: resolution});
418          } 
419          
420          // pixel ratio
421          var pixelRatio;
422          pixelRatio = window.devicePixelRatio || "";
423          if(typeof pixelRatio !== "undefined") { // headless browsers
424            keys.push({key: "pixelRatio", value: pixelRatio});
425          }
426
427          // time zone
428          var timeZone;
429          timeZone = new Date().getTimezoneOffset();
430          keys.push({key: "timeZone", value: timeZone});
431
432          // gpu
433          var timeZone;
434          var canvasElem = document.createElement("canvas");
435          try {
436            var webGL = canvasElem.getContext("webgl") || canvasElem.getContext("experimental-webgl");
437            if (window.WebGL2RenderingContext && webGL) {
438              var renderer = webGL.getExtension('WEBGL_debug_renderer_info');
439              var gpuInfo = webGL.getParameter(renderer.UNMASKED_RENDERER_WEBGL);
440            }
441          } catch(e) {
442            var gpuInfo = false;
443          }
444          if (typeof gpuInfo !== 'undefined' && gpuInfo) {
445            keys.push({key: "gpuInfo", value: gpuInfo});
446          }
447
448          // canvas
449          var canvasInfo = getCanvasFingerprint(canvasElem);
450          if (typeof canvasInfo !== 'undefined' && canvasInfo) {
451            keys.push({key: "canvasInfo", value: canvasInfo});
452          }
453
454          // console.log(keys);
455
456          var str = JSON.stringify(keys);
457          var hash = 0;
458          for (var i = 0; i < str.length; i++) {
459            var char = str.charCodeAt(i);
460            hash = ((hash<<5)-hash)+char;
461            hash = hash & hash;
462          }
463          $('input[name="fingerprint"]').val(hash);
464        }
465    };
466})(jQuery, Drupal, this, this.document);;
467/*global Drupal: false, jQuery: false */
468/*jslint devel: true, browser: true, maxerr: 50, indent: 2 */
469(function ($) {
470  "use strict";
471
472  /**
473   * Provide the HTML to create the modal dialog.
474   * Clone of function Drupal.theme.prototype.CToolsModalDialog.
475   */
476  Drupal.theme.prototype.HybridAuthModalDialog = function () {
477    var html = '';
478    html += '  <div id="ctools-modal">';
479    html += '    <div id="hybridauth-modal">';
480    html += '      <div class="ctools-modal-content">';
481    html += '        <div class="modal-header">';
482    html += '          <a class="close" href="#">';
483    html += Drupal.CTools.Modal.currentSettings.closeText + Drupal.CTools.Modal.currentSettings.closeImage;
484    html += '          </a>';
485    html += '          <span id="modal-title" class="modal-title"></span>';
486    html += '        </div>';
487    html += '        <div id="modal-content" class="modal-content">';
488    html += '        </div>';
489    html += '      </div>';
490    html += '    </div>';
491    html += '  </div>';
492
493    return html;
494  };
495
496})(jQuery);
497;
498/*global Drupal: false, jQuery: false */
499/*jslint devel: true, browser: true, maxerr: 50, indent: 2 */
500(function ($) {
501  "use strict";
502
503  Drupal.behaviors.hybridauth_onclick = {};
504  Drupal.behaviors.hybridauth_onclick.attach = function(context, settings) {
505    $('.hybridauth-widget-provider', context).each(function() {
506      // $(this).attr('href', $(this).attr('data-hybridauth-url'));
507      this.href = $(this).attr('data-hybridauth-url');
508    });
509    $('.hybridauth-onclick-current:not(.hybridauth-onclick-processed)', context).addClass('hybridauth-onclick-processed').bind('click', function() {
510      $(this).parents('.hybridauth-widget').after('<div>' + Drupal.t('Contacting @title...', {'@title': this.title}) + '</div>');
511    });
512    $('.hybridauth-onclick-popup:not(.hybridauth-onclick-processed)', context).addClass('hybridauth-onclick-processed').bind('click', function() {
513      var width = $(this).attr('data-hybridauth-width'), height = $(this).attr('data-hybridauth-height');
514      var popup_window = window.open(
515        this.href,
516        'hybridauth',
517        'location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no,channelmode=yes,fullscreen=yes,width=' + width + ',height=' + height
518      );
519      popup_window.focus();
520      return false;
521    });
522
523    // Last used provider feature.
524    var last_provider = $.cookie('hybridauth_last_provider');
525    if (last_provider != null) {
526      $('[data-hybridauth-provider="' + last_provider + '"]', context).addClass('hybridauth-last-provider');
527    }
528    $('.hybridauth-widget-provider:not(.hybridauth-provider-processed)', context).addClass('hybridauth-provider-processed').bind('click', function() {
529      $.cookie('hybridauth_last_provider', $(this).attr('data-hybridauth-provider'), {expires: 30, path: '/'});
530    });
531  };
532
533})(jQuery);
534;
535(function ($) {
536
537/**
538 * A progressbar object. Initialized with the given id. Must be inserted into
539 * the DOM afterwards through progressBar.element.
540 *
541 * method is the function which will perform the HTTP request to get the
542 * progress bar state. Either "GET" or "POST".
543 *
544 * e.g. pb = new progressBar('myProgressBar');
545 *      some_element.appendChild(pb.element);
546 */
547Drupal.progressBar = function (id, updateCallback, method, errorCallback) {
548  var pb = this;
549  this.id = id;
550  this.method = method || 'GET';
551  this.updateCallback = updateCallback;
552  this.errorCallback = errorCallback;
553
554  // The WAI-ARIA setting aria-live="polite" will announce changes after users
555  // have completed their current activity and not interrupt the screen reader.
556  this.element = $('<div class="progress" aria-live="polite"></div>').attr('id', id);
557  this.element.html('<div class="bar"><div class="filled"></div></div>' +
558                    '<div class="percentage"></div>' +
559                    '<div class="message">&nbsp;</div>');
560};
561
562/**
563 * Set the percentage and status message for the progressbar.
564 */
565Drupal.progressBar.prototype.setProgress = function (percentage, message) {
566  if (percentage >= 0 && percentage <= 100) {
567    $('div.filled', this.element).css('width', percentage + '%');
568    $('div.percentage', this.element).html(percentage + '%');
569  }
570  $('div.message', this.element).html(message);
571  if (this.updateCallback) {
572    this.updateCallback(percentage, message, this);
573  }
574};
575
576/**
577 * Start monitoring progress via Ajax.
578 */
579Drupal.progressBar.prototype.startMonitoring = function (uri, delay) {
580  this.delay = delay;
581  this.uri = uri;
582  this.sendPing();
583};
584
585/**
586 * Stop monitoring progress via Ajax.
587 */
588Drupal.progressBar.prototype.stopMonitoring = function () {
589  clearTimeout(this.timer);
590  // This allows monitoring to be stopped from within the callback.
591  this.uri = null;
592};
593
594/**
595 * Request progress data from server.
596 */
597Drupal.progressBar.prototype.sendPing = function () {
598  if (this.timer) {
599    clearTimeout(this.timer);
600  }
601  if (this.uri) {
602    var pb = this;
603    // When doing a post request, you need non-null data. Otherwise a
604    // HTTP 411 or HTTP 406 (with Apache mod_security) error may result.
605    $.ajax({
606      type: this.method,
607      url: this.uri,
608      data: '',
609      dataType: 'json',
610      success: function (progress) {
611        // Display errors.
612        if (progress.status == 0) {
613          pb.displayError(progress.data);
614          return;
615        }
616        // Update display.
617        pb.setProgress(progress.percentage, progress.message);
618        // Schedule next timer.
619        pb.timer = setTimeout(function () { pb.sendPing(); }, pb.delay);
620      },
621      error: function (xmlhttp) {
622        pb.displayError(Drupal.ajaxError(xmlhttp, pb.uri));
623      }
624    });
625  }
626};
627
628/**
629 * Display errors on the page.
630 */
631Drupal.progressBar.prototype.displayError = function (string) {
632  var error = $('<div class="messages error"></div>').html(string);
633  $(this.element).before(error).hide();
634
635  if (this.errorCallback) {
636    this.errorCallback(this);
637  }
638};
639
640})(jQuery);
641;
642(function ($) {
643    Drupal.behaviors.colorboxNode = {
644        // Lets find our class name and change our URL to
645        // our defined menu path to open in a colorbox modal.
646        attach: function (context, settings) {
647            // Make sure colorbox exists.
648            if (!$.isFunction($.colorbox) || typeof settings.colorbox === 'undefined') {
649                return;
650            }
651
652            // Mobile detection extracted from the colorbox module.
653            // If the mobile setting is turned on, it will turn off the colorbox modal for mobile devices.
654            if (settings.colorbox.mobiledetect && window.matchMedia) {
655                // Disable Colorbox for small screens.
656                var mq = window.matchMedia("(max-device-width: " + settings.colorbox.mobiledevicewidth + ")");
657                if (mq.matches) {
658                    return;
659                }
660            }
661
662            $('.colorbox-node', context).once('init-colorbox-node-processed', function () {
663                $(this).colorboxNode({'launch': false});
664            });
665
666            // When using contextual links and clicking from within the colorbox
667            // we need to close down colorbox when opening the built in overlay.
668            $('ul.contextual-links a', context).once('colorboxNodeContextual').click(function () {
669                $.colorbox.close();
670            });
671        }
672    };
673
674    // Bind our colorbox node functionality to an anchor
675    $.fn.colorboxNode = function (options) {
676        var settings = {
677            'launch': true,
678            'width': Drupal.settings.colorbox_node.width,
679            'height': Drupal.settings.colorbox_node.height
680        };
681
682        $.extend(settings, options);
683
684        var href = $(this).attr('data-href');
685        if (typeof href == 'undefined' || href == false) {
686            href = $(this).attr('href');
687        }
688        // Create an element so we can parse our a URL no matter if its internal or external.
689        var parse = document.createElement('a');
690        parse.href = href;
691
692        if(!href) {
693            alert(Drupal.t('No url found on element'));
694        }
695
696        // Lets add our colorbox link after the base path if necessary.
697        var base_path = Drupal.settings.basePath;
698        var path_prefix = Drupal.settings.pathPrefix;
699        var pathname = parse.pathname;
700
701        // Lets check to see if the pathname has a forward slash.
702        // This problem happens in IE7/IE8
703        if (pathname.charAt(0) != '/') {
704            pathname = '/' + parse.pathname;
705        }
706
707        // If clean URL's are not turned on, lets check for that.
708        var url = $.getParameterByName('q', href);
709        if (base_path != '/') {
710            if (url != '') {
711                var link = pathname.replace(base_path, base_path + parse.search.replace('?q=', '?q=/' + path_prefix + 'colorbox/'));
712            } else {
713                var link = pathname.replace(base_path, base_path + path_prefix + 'colorbox/') + parse.search;
714            }
715        } else {
716            if (url != '') {
717                var link = base_path + parse.search.replace('?q=', '?q=/' + path_prefix + 'colorbox/');
718            } else {
719                var link = base_path + path_prefix + 'colorbox' + pathname + parse.search;
720            }
721        }
722
723        // Bind Ajax behaviors to all items showing the class.
724        var element_settings = {};
725
726        // This removes any loading/progress bar on the clicked link
727        // and displays the colorbox loading screen instead.
728        element_settings.progress = { 'type': 'none' };
729        // For anchor tags, these will go to the target of the anch
729or rather
730        // than the usual location.
731        if (href) {
732            element_settings.url = link;
733            element_settings.event = 'click';
734        }
735
736        $(this).click(function () {
737            var $this = $(this).clone();
738
739            // Clear out the rel to prevent any confusion if not using the gallery class.
740            if(!$this.hasClass('colorbox-node-gallery')) {
741                $this.attr('rel', '');
742            }
743
744            // Lets extract our width and height giving priority to the data attributes.
745            var innerWidth = $this.data('inner-width');
746            var innerHeight = $this.data('inner-height');
747            if (typeof innerWidth != 'undefined' && typeof innerHeight != 'undefined') {
748                var params = $.urlDataParams(innerWidth, innerHeight);
749            } else {
750                var params = $.urlParams(href);
751            }
752
753            // If we did not find a width or height, lets use the default.
754            if (params.innerHeight == undefined) params.innerHeight = settings.height;
755            if (params.innerWidth == undefined) params.innerWidth = settings.width;
756
757            params.html = '<div id="colorboxNodeLoading"></div>';
758            params.onComplete = function () {
759                $this.colorboxNodeGroup();
760            }
761            params.open = true;
762
763            // Launch our colorbox with the provided settings
764            $this.colorbox($.extend({}, Drupal.settings.colorbox, params));
765        });
766
767        // Log our click handler to our ajax object
768        var base = $(this).attr('id');
769        Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings);
770
771        // Default to auto click for manual call to this function.
772        if (settings.launch) {
773            Drupal.ajax[base].eventResponse(this, 'click');
774            $(this).click();
775        }
776    }
777
778    // Allow for grouping on links to showcase a gallery with left/right arrows.
779    // This function will find the next index of each link on the page b
779y the rel
780    // and manually force a click on the link to call that AJAX and update the
781    // modal window.
782    $.fn.colorboxNodeGroup = function () {
783        // Lets do setup our gallery type of functions.
784        var $this = $(this);
785        var rel = $this.attr('rel');
786        if(rel && $this.hasClass('colorbox-node-gallery')) {
787            if ($('a.colorbox-node-gallery[rel="' + rel + '"]:not("#colorbox a[rel="' + rel + '"]")').length > 1) {
788                $related = $('a.colorbox-node-gallery[rel="' + rel + '"]:not("#colorbox a[rel="' + rel + '"]")');
789
790                // filter $related array by href, to have mutliple colorbox links to the same target
791                // appear as one item in the gallery only
792                var $related_unique = [];
793                $related.each(function() {
794                    $.findHref($related_unique, this.href);
795                    if (!$.findHref($related_unique, this.href).length) {
796                        $related_unique.push(this);
797                    }
798                });
799                // we have to get the actual used element from the filtered list in order to get it's relative index
800                var current = $.findHref($related_unique, $this.get(0).href);
801                $related = $($related_unique);
802                var idx = $related.index($(current));
803                var tot = $related.length;
804
805                // Show our gallery buttons
806                $('#cboxPrevious, #cboxNext').show();
807                $.colorbox.next = function () {
808                    index = getIndex(1);
809                    $related[index].click();
810                };
811                $.colorbox.prev = function () {
812                    index = getIndex(-1);
813                    $related[index].click();
814                };
815
816                // Setup our current HTML
817                $('#cboxCurrent').html(Drupal.settings.colorbox.current.replace('{current}', idx + 1).replace('{total}', tot)).show();
818                $('#cboxNext').html(Drupal.settings.colorbox.next).show();
819                $('#cboxPrevious').html(Drupal.settings.colorbox.previous).show();
820
821                var prefix = 'colorbox';
822                // Remove Bindings and re-add
823                // @TODO: There must be a better way?  If we don't remove it causes a memory to be exhausted.
824                $(document).unbind('keydown.' + prefix);
825
826                // Add Key Bindings
827                $(document).bind('keydown.' + prefix, function (e) {
828                    var key = e.keyCode;
829                    if ($related[1] && !e.altKey) {
830                        if (key === 37) {
831                            e.preventDefault();
832                            $.colorbox.prev();
833                        } else if (key === 39) {
834                            e.preventDefault();
835                            $.colorbox.next();
836                        }
837                    }
838                });
839            }
840
841            function getIndex(increment) {
842                var max = $related.length;
843                var newIndex = (idx + increment) % max;
844                return (newIndex < 0) ? max + newIndex : newIndex;
845            }
846
847        }
848    }
849
850    // Find a colorbox link by href in an array
851    $.findHref = function(items, href) {
852        return $.grep(items, function(n, i){
853            return n.href == href;
854        });
855    };
856
857    // Utility function to parse out our width/height from our url params
858    $.urlParams = function (url) {
859        var p = {},
860            e,
861            a = /\+/g,  // Regex for replacing addition symbol with a space
862            r = /([^&=]+)=?([^&]*)/g,
863            d = function (s) {
864                return decodeURIComponent(s.replace(a, ' '));
865            },
866            q = url.split('?');
867        while (e = r.exec(q[1])) {
868            e[1] = d(e[1]);
869            e[2] = d(e[2]);
870            switch (e[2].toLowerCase()) {
871                case 'true':
872                case 'yes':
873                    e[2] = true;
874                    break;
875                case 'false':
876                case 'no':
877                    e[2] = false;
878                    break;
879            }
880            if (e[1] == 'width') {
881                e[1] = 'innerWidth';
882            }
883            if (e[1] == 'height') {
884                e[1] = 'innerHeight';
885            }
886            p[e[1]] = e[2];
887        }
888        return p;
889    };
890
891    // Utility function to return our data attributes for width/height
892    $.urlDataParams = function (innerWidth, innerHeight) {
893        return {'innerWidth':innerWidth,'innerHeight':innerHeight};
894    };
895
896    $.getParameterByName = function(name, href) {
897        name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
898        var regexString = "[\\?&]" + name + "=([^&#]*)";
899        var regex = new RegExp(regexString);
900        var found = regex.exec(href);
901        if(found == null)
902            return "";
903        else
904            return decodeURIComponent(found[1].replace(/\+/g, " "));
905    }
906
907})(jQuery);
908;

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.